@@ -68,7 +68,7 @@ describe('DstackClientV1', () => {
6868 describe ( 'getKey' , ( ) => {
6969 it ( 'should derive a secp256k1 key with a public key and a two-link chain' , async ( ) => {
7070 const client = new DstackClientV1 ( )
71- const result = await client . getKey ( 'wallet ' , 'secp256k1' )
71+ const result = await client . getKey ( 'storage-encryption ' , 'secp256k1' )
7272 expect ( result . key ) . toBeInstanceOf ( Uint8Array )
7373 expect ( result . key . length ) . toBe ( 32 )
7474 // SEC1 compressed, so the chain's first link commits to these exact bytes.
@@ -83,29 +83,29 @@ describe('DstackClientV1', () => {
8383
8484 it ( 'should derive an ed25519 key with a 32-byte public key' , async ( ) => {
8585 const client = new DstackClientV1 ( )
86- const result = await client . getKey ( 'wallet ' , 'ed25519' )
86+ const result = await client . getKey ( 'storage-encryption ' , 'ed25519' )
8787 expect ( result . key . length ) . toBe ( 32 )
8888 expect ( result . public_key . length ) . toBe ( 32 )
8989 expect ( result . signature_chain . length ) . toBe ( 2 )
9090 } )
9191
9292 it ( 'should be deterministic for the same domain and algorithm' , async ( ) => {
9393 const client = new DstackClientV1 ( )
94- const first = await client . getKey ( 'wallet ' , 'secp256k1' )
95- const second = await client . getKey ( 'wallet ' , 'secp256k1' )
94+ const first = await client . getKey ( 'storage-encryption ' , 'secp256k1' )
95+ const second = await client . getKey ( 'storage-encryption ' , 'secp256k1' )
9696 expect ( first . key ) . toEqual ( second . key )
9797 } )
9898
9999 it ( 'should separate the two curves, which v0 did not' , async ( ) => {
100100 const client = new DstackClientV1 ( )
101- const secp = await client . getKey ( 'wallet ' , 'secp256k1' )
102- const ed = await client . getKey ( 'wallet ' , 'ed25519' )
101+ const secp = await client . getKey ( 'storage-encryption ' , 'secp256k1' )
102+ const ed = await client . getKey ( 'storage-encryption ' , 'ed25519' )
103103 expect ( secp . key ) . not . toEqual ( ed . key )
104104 } )
105105
106106 it ( 'should derive different material than v0 for the same name' , async ( ) => {
107- const v0 = await new DstackClientV0 ( ) . getKey ( 'wallet ' , '' , 'secp256k1' )
108- const v1 = await new DstackClientV1 ( ) . getKey ( 'wallet ' , 'secp256k1' )
107+ const v0 = await new DstackClientV0 ( ) . getKey ( 'storage-encryption ' , '' , 'secp256k1' )
108+ const v1 = await new DstackClientV1 ( ) . getKey ( 'storage-encryption ' , 'secp256k1' )
109109 expect ( v1 . key ) . not . toEqual ( v0 . key )
110110 } )
111111
@@ -124,17 +124,17 @@ describe('DstackClientV1', () => {
124124
125125 it ( 'should reject an empty algorithm without a round trip' , async ( ) => {
126126 const client = new DstackClientV1 ( )
127- await expect ( ( ) => client . getKey ( 'wallet ' , '' ) ) . rejects . toThrow ( 'algorithm is required' )
127+ await expect ( ( ) => client . getKey ( 'storage-encryption ' , '' ) ) . rejects . toThrow ( 'algorithm is required' )
128128 } )
129129
130130 it ( 'should reject the v0 k256 alias' , async ( ) => {
131131 const client = new DstackClientV1 ( )
132- await expect ( ( ) => client . getKey ( 'wallet ' , 'k256' ) ) . rejects . toThrow ( )
132+ await expect ( ( ) => client . getKey ( 'storage-encryption ' , 'k256' ) ) . rejects . toThrow ( )
133133 } )
134134
135135 it ( 'should reject secp256k1_prehashed, which named a signing mode' , async ( ) => {
136136 const client = new DstackClientV1 ( )
137- await expect ( ( ) => client . getKey ( 'wallet ' , 'secp256k1_prehashed' ) ) . rejects . toThrow ( )
137+ await expect ( ( ) => client . getKey ( 'storage-encryption ' , 'secp256k1_prehashed' ) ) . rejects . toThrow ( )
138138 } )
139139 } )
140140
0 commit comments