@turnkey/sdk-types 0.14.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,300 @@
1
1
  # @turnkey/sdk-types
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1324](https://github.com/tkhq/sdk/pull/1324) [`f505818`](https://github.com/tkhq/sdk/commit/f505818e121c137d290156a32918a884ba80e5f5) Author [@janjakubnanista](https://github.com/janjakubnanista) - ### Breaking/Behavioral Changes
8
+
9
+ #### `nonce` parameter in `oauth2Authenticate` is now required
10
+
11
+ ```ts
12
+ # Before
13
+ apiClient.oauth2Authenticate({
14
+ oauth2CredentialId: ...,
15
+ authCode: ...,
16
+ redirectUri: ...,
17
+ codeVerifier: ...,
18
+ bearerTokenTargetPublicKey: ...,
19
+ // nonce can be undefined
20
+ nonce: undefined
21
+ })
22
+
23
+ # After
24
+ apiClient.oauth2Authenticate({
25
+ oauth2CredentialId: ...,
26
+ authCode: ...,
27
+ redirectUri: ...,
28
+ codeVerifier: ...,
29
+ bearerTokenTargetPublicKey: ...,
30
+ // nonce is required
31
+ nonce: ""
32
+ })
33
+ ```
34
+
35
+ #### Solana transactions in Transaction Management are now limited to the following `caip2` values:
36
+ - `solana:mainnet`
37
+ - `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`
38
+ - `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`
39
+ - `solana:devnet`
40
+ - `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`
41
+ - `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG`
42
+
43
+ ### New SDK methods
44
+
45
+ #### TVC
46
+
47
+ These methods will only work if you are part of the [TVC beta](https://www.turnkey.com/turnkey-verifiable-cloud#waitlist)
48
+ - `getTvcApp`
49
+ - `getTvcDeployment`
50
+ - `getTvcAppDeployments`
51
+ - `getTvcApps`
52
+ - `validateTvcImage`
53
+ - `createTvcApp`
54
+ - `createTvcDeployment`
55
+ - `createTvcManifestApprovals`
56
+ - `deleteTvcAppAndDeployments`
57
+ - `deleteTvcDeployment`
58
+ - `restoreTvcDeployment`
59
+ - `updateTvcAppLiveDeployment`
60
+
61
+ #### Spark protocol support
62
+ - `sparkClaimTransfer`
63
+ - `sparkPrepareLightningReceive`
64
+ - `sparkPrepareTransfer`
65
+ - `sparkSignFrost`
66
+
67
+ ### Patch Changes
68
+
69
+ - [#1299](https://github.com/tkhq/sdk/pull/1299) [`bf2c28f`](https://github.com/tkhq/sdk/commit/bf2c28fec690ec31254125405bf15a482139109b) Author [@ethankonk](https://github.com/ethankonk) - Patched the core sdk's client to allow passing in the `generateAppProofs` param to all activity requests
70
+
71
+ ## 1.0.0
72
+
73
+ ### Major Changes
74
+
75
+ - [#1250](https://github.com/tkhq/sdk/pull/1250) [`6128132`](https://github.com/tkhq/sdk/commit/6128132d910f658cdf83ecc1dec6598eb20c008a) Author [@moeodeh3](https://github.com/moeodeh3) - ### `INIT_OTP`
76
+
77
+ `ACTIVITY_TYPE_INIT_OTP_V2` → `ACTIVITY_TYPE_INIT_OTP_V3`
78
+
79
+ **What changed:** Added required `otpEncryptionTargetBundle` to the result.
80
+
81
+ ```ts
82
+ // before — v1InitOtpResult
83
+ {
84
+ otpId: string;
85
+ }
86
+
87
+ // after — v1InitOtpResultV2
88
+ {
89
+ otpId: string;
90
+ otpEncryptionTargetBundle: string; // new
91
+ }
92
+ ```
93
+
94
+ ***
95
+
96
+ ### `VERIFY_OTP`
97
+
98
+ `ACTIVITY_TYPE_VERIFY_OTP` → `ACTIVITY_TYPE_VERIFY_OTP_V2`
99
+
100
+ **What changed:** Replaced plaintext `otpCode` + `publicKey` with a single `encryptedOtpBundle`.
101
+
102
+ Instead of sending the OTP code in plaintext, you now HPKE-encrypt it (along with your public key) to Turnkey's enclave using the `otpEncryptionTargetBundle` returned by `initOtp`. This ensures the OTP code never leaves the client in plaintext.
103
+
104
+ Use `encryptOtpCodeToBundle` from `@turnkey/crypto` to build the bundle:
105
+
106
+ ```ts
107
+ import { encryptOtpCodeToBundle } from "@turnkey/crypto";
108
+
109
+ const { otpId, otpEncryptionTargetBundle } = await client.initOtp({ ... });
110
+
111
+ // After the user enters their OTP code:
112
+ const encryptedOtpBundle = await encryptOtpCodeToBundle(
113
+ otpCode, // the code the user entered
114
+ otpEncryptionTargetBundle, // from the initOtp response
115
+ publicKey, // your target public key
116
+ );
117
+
118
+ await client.verifyOtp({
119
+ otpId,
120
+ encryptedOtpBundle,
121
+ });
122
+ ```
123
+
124
+ ```ts
125
+ // before — v1VerifyOtpIntent
126
+ {
127
+ otpId: string;
128
+ otpCode: string; // removed
129
+ expirationSeconds?: string;
130
+ publicKey?: string; // removed
131
+ }
132
+
133
+ // after — v1VerifyOtpIntentV2
134
+ {
135
+ otpId: string;
136
+ encryptedOtpBundle: string; // new — replaces otpCode + publicKey
137
+ expirationSeconds?: string;
138
+ }
139
+ ```
140
+
141
+ ***
142
+
143
+ ### `OTP_LOGIN`
144
+
145
+ `ACTIVITY_TYPE_OTP_LOGIN` → `ACTIVITY_TYPE_OTP_LOGIN_V2`
146
+
147
+ **What changed:** `clientSignature` promoted from optional to required.
148
+
149
+ ```ts
150
+ // before — v1OtpLoginIntent
151
+ {
152
+ verificationToken: string;
153
+ publicKey: string;
154
+ expirationSeconds?: string;
155
+ invalidateExisting?: boolean;
156
+ clientSignature?: v1ClientSignature; // optional
157
+ }
158
+
159
+ // after — v1OtpLoginIntentV2
160
+ {
161
+ verificationToken: string;
162
+ publicKey: string;
163
+ expirationSeconds?: string;
164
+ invalidateExisting?: boolean;
165
+ clientSignature: v1ClientSignature; // now required
166
+ }
167
+ ```
168
+
169
+ ***
170
+
171
+ ### `CREATE_OAUTH_PROVIDERS`
172
+
173
+ `ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS` → `ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS_V2`
174
+
175
+ **What changed:** Added `oidcClaims` as a new option alongside `oidcToken`; you must provide exactly one. This updated type feeds into the `CREATE_SUB_ORGANIZATION` and `CREATE_USERS` changes below.
176
+
177
+ ```ts
178
+ // before — v1OauthProviderParams
179
+ {
180
+ providerName: string;
181
+ oidcToken: string;
182
+ }
183
+
184
+ // after — v1OauthProviderParamsV2
185
+ {
186
+ providerName: string;
187
+ } & (
188
+ | { oidcToken: string }
189
+ | { oidcClaims: { iss: string; sub: string; aud: string } }
190
+ )
191
+ ```
192
+
193
+ ***
194
+
195
+ ### `CREATE_SUB_ORGANIZATION`
196
+
197
+ `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7` → `ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V8`
198
+
199
+ **What changed:** `rootUsers` items updated from `v1RootUserParamsV4` → `v1RootUserParamsV5`, which updates `oauthProviders` from `v1OauthProviderParams` → `v1OauthProviderParamsV2`.
200
+
201
+ ```ts
202
+ // before — v1RootUserParamsV4
203
+ {
204
+ userName: string;
205
+ userEmail?: string;
206
+ userPhoneNumber?: string;
207
+ apiKeys: v1ApiKeyParamsV2[];
208
+ authenticators: v1AuthenticatorParamsV2[];
209
+ oauthProviders: { // v1OauthProviderParams
210
+ providerName: string;
211
+ oidcToken: string; // was required
212
+ }[];
213
+ }
214
+
215
+ // after — v1RootUserParamsV5
216
+ {
217
+ userName: string;
218
+ userEmail?: string;
219
+ userPhoneNumber?: string;
220
+ apiKeys: v1ApiKeyParamsV2[];
221
+ authenticators: v1AuthenticatorParamsV2[];
222
+ oauthProviders: ({ // v1OauthProviderParamsV2
223
+ providerName: string;
224
+ } & (
225
+ | { oidcToken: string }
226
+ | { oidcClaims: { iss: string; sub: string; aud: string } }
227
+ ))[];
228
+ }
229
+ ```
230
+
231
+ ***
232
+
233
+ ### `CREATE_USERS`
234
+
235
+ `ACTIVITY_TYPE_CREATE_USERS_V3` → `ACTIVITY_TYPE_CREATE_USERS_V4`
236
+
237
+ **What changed:** `users` items updated from `v1UserParamsV3` → `v1UserParamsV4`, which updates `oauthProviders` from `v1OauthProviderParams` → `v1OauthProviderParamsV2`.
238
+
239
+ ```ts
240
+ // before — v1UserParamsV3
241
+ {
242
+ userName: string;
243
+ userEmail?: string;
244
+ userPhoneNumber?: string;
245
+ apiKeys: v1ApiKeyParamsV2[];
246
+ authenticators: v1AuthenticatorParamsV2[];
247
+ oauthProviders: { // v1OauthProviderParams
248
+ providerName: string;
249
+ oidcToken: string; // was required
250
+ }[];
251
+ userTags: string[];
252
+ }
253
+
254
+ // after — v1UserParamsV4
255
+ {
256
+ userName: string;
257
+ userEmail?: string;
258
+ userPhoneNumber?: string;
259
+ apiKeys: v1ApiKeyParamsV2[];
260
+ authenticators: v1AuthenticatorParamsV2[];
261
+ oauthProviders: ({ // v1OauthProviderParamsV2
262
+ providerName: string;
263
+ } & (
264
+ | { oidcToken: string }
265
+ | { oidcClaims: { iss: string; sub: string; aud: string } }
266
+ ))[];
267
+ userTags: string[];
268
+ }
269
+ ```
270
+
271
+ ### Minor Changes
272
+
273
+ - [#1250](https://github.com/tkhq/sdk/pull/1250) [`34522d4`](https://github.com/tkhq/sdk/commit/34522d447592138a82d34cd690091315f9748edb) Author [@moeodeh3](https://github.com/moeodeh3) - Add `SignatureFormat` enum with `Der` and `Raw` options
274
+
275
+ - [#1286](https://github.com/tkhq/sdk/pull/1286) [`7a36539`](https://github.com/tkhq/sdk/commit/7a36539196856a8bd4ca4c54115fa9874ccc83fa) Author [@moeodeh3](https://github.com/moeodeh3) - Add `DELETE_API_KEY_PAIR_ERROR` to `TurnkeyErrorCodes`
276
+ Add `INITIALIZE_API_KEY_STAMPER_ERROR` to `TurnkeyErrorCodes`
277
+ Add `INITIALIZE_PASSKEY_STAMPER_ERROR` to `TurnkeyErrorCodes`
278
+ Add `INITIALIZE_WALLET_MANAGER_ERROR` to `TurnkeyErrorCodes`
279
+
280
+ - [#1225](https://github.com/tkhq/sdk/pull/1225) [`5624d54`](https://github.com/tkhq/sdk/commit/5624d5417d2cc30032ca4ce71da0a5c7ab9a462d) Author [@ethankonk](https://github.com/ethankonk) - Fixed nested enums in types, now generates the enum values rather than generating them as strings
281
+
282
+ - [#1280](https://github.com/tkhq/sdk/pull/1280) [`7b80b1e`](https://github.com/tkhq/sdk/commit/7b80b1e9755b83988b5e49c34dff13dd92d9932f) Author [@hadrelandon](https://github.com/hadrelandon) - Added a new error code `INVALID_OAUTH_STATE` in `TurnkeyErrorCodes`.
283
+
284
+ ### Patch Changes
285
+
286
+ - [#1225](https://github.com/tkhq/sdk/pull/1225) [`47c0ca4`](https://github.com/tkhq/sdk/commit/47c0ca4696c8a518f95550c35cfe4cb4985a2633) Author [@ethankonk](https://github.com/ethankonk) - Added `Stamp`, `Activity` response + status, `TurnkeyRequestError`, and `GrpcStatus` types
287
+
3
288
  ## 0.14.0
4
289
 
5
290
  ### Minor Changes
6
291
 
7
292
  - [#1258](https://github.com/tkhq/sdk/pull/1258) [`8209887`](https://github.com/tkhq/sdk/commit/8209887d48bae7ea617645603a156aeb1cfbd2e7) Author [@moeodeh3](https://github.com/moeodeh3) - Added a new error code `NO_PKCE_VERIFIER_FOUND` in `TurnkeyErrorCodes`
8
293
 
294
+ ### Patch Changes
295
+
296
+ - [#1269](https://github.com/tkhq/sdk/pull/1269) [`ef66673`](https://github.com/tkhq/sdk/commit/ef6667325d210c8aa0ea4c1d11d834ff28ddb66c) Author [@ethankonk](https://github.com/ethankonk) - Sync with v2026.4.5 of mono
297
+
9
298
  ## 0.13.0
10
299
 
11
300
  ### Minor Changes