@turnkey/sdk-types 1.12.0 → 1.14.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,5 +1,81 @@
1
1
  # @turnkey/sdk-types
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1664](https://github.com/tkhq/sdk/pull/1664) [`f51f973`](https://github.com/tkhq/sdk/commit/f51f973acbe765da1f9e272b8d95ed6a56a733b4) Author [@actype](https://github.com/actype) - OAuth 2.0 authentication for X and Discord now encrypts the authorization code, PKCE verifier, redirect URI, and nonce to Turnkey's TLS Fetcher enclave, so neither the auth proxy nor the API sees them in plaintext. The React and React Native wallet kits use the new flow automatically.
8
+ - `exchangeOauth2Code` on the `@turnkey/core` client and the wallet kit providers exchanges an authorization code for a Turnkey OIDC token.
9
+ - Its failures use the new `TurnkeyErrorCodes.OAUTH2_AUTHENTICATE_ERROR`.
10
+ - `encryptOauth2ToBundle` in `@turnkey/crypto` verifies an `init_oauth2_authenticate` target and encrypts the inputs to it.
11
+ - `initOauth2Authenticate` and the auth proxy's `proxyInitOAuth2AuthenticateV2` and `proxyOAuth2AuthenticateV2` are new.
12
+ - Also syncs the latest public API: notification domains, static egress IPs for TVC apps, and external signer public keys on send transaction intents.
13
+
14
+ **Breaking:** the generated `oauth2Authenticate` API method (on `@turnkey/http`, `@turnkey/sdk-browser`, `@turnkey/sdk-server`, and the core `httpClient`) now submits `ACTIVITY_TYPE_OAUTH2_AUTHENTICATE_V2`, which takes an encrypted message in place of the plaintext inputs. Initialize a target and encrypt with `encryptOauth2ToBundle` before submitting:
15
+
16
+ Before:
17
+
18
+ ```ts
19
+ const { oidcToken } = await turnkeyClient.apiClient().oauth2Authenticate({
20
+ oauth2CredentialId,
21
+ authCode,
22
+ redirectUri,
23
+ codeVerifier,
24
+ nonce,
25
+ });
26
+ ```
27
+
28
+ After:
29
+
30
+ ```ts
31
+ import { encryptOauth2ToBundle } from "@turnkey/crypto";
32
+
33
+ const client = turnkeyClient.apiClient();
34
+ const { enclaveTargetMessage } = await client.initOauth2Authenticate({
35
+ organizationId,
36
+ oauth2CredentialId,
37
+ encryptionSuite: "TRANSPORT_ENCRYPTION_SUITE_ENCLAVE_ENCRYPT_V2",
38
+ });
39
+ const { encryptedMessage, targetPublicKey } = await encryptOauth2ToBundle({
40
+ bundle: {
41
+ organizationId,
42
+ oauth2CredentialId,
43
+ provider: "OAUTH2_PROVIDER_X",
44
+ clientId,
45
+ authCode,
46
+ redirectUri,
47
+ codeVerifier,
48
+ nonce,
49
+ },
50
+ enclaveTargetMessage,
51
+ });
52
+ const { oidcToken } = await client.oauth2Authenticate({
53
+ organizationId,
54
+ oauth2CredentialId,
55
+ encryptedMessage,
56
+ targetPublicKey,
57
+ });
58
+ ```
59
+
60
+ The wallet kits no longer call the plaintext `proxyOAuth2Authenticate`. If you call it directly, replace `httpClient.proxyOAuth2Authenticate(...)` with `client.exchangeOauth2Code(...)`, which takes the same inputs and returns the OIDC token. The OAuth 2.0 credential for `clientId` must belong to the client's `organizationId`.
61
+
62
+ ## 1.13.0
63
+
64
+ ### Minor Changes
65
+
66
+ - [#1660](https://github.com/tkhq/sdk/pull/1660) [`7500289`](https://github.com/tkhq/sdk/commit/75002891b2fe50c758e6e57cde94f5fea9ded395) Author [@ericvelazquez](https://github.com/ericvelazquez) - Sync generated clients and types with mono `main` (2026-11-16).
67
+ - Earn: `listEarnVaults` and `listEarnEnabledVaults` entries carry `rewardsApyPct`, the protocol-reward portion of `apyPct`. `apyPct` is now documented as gross APY including rewards and `netApyPct` as net of fees on the non-reward portion only.
68
+ - Send-transaction status responses carry the landed transaction's `fee` (`EthTransactionFee` on EVM, `SolanaTransactionFee` on Solana) with the sponsored cost in USD.
69
+ - Swap quotes include `transactions`, the calls the swap executes in order.
70
+ - Usage controls: `UsageControlAggregation` is replaced by `UsageControlBudget` (`method`, `limit`, `window`), and the data source filters are removed.
71
+ - `deleteExternalSigner` accepts `deleteWithoutExport`; `TRANSPORT_ENCRYPTION_SUITE_ENCLAVE_ENCRYPT_V2` is added.
72
+
73
+ The `with-earn` example now runs on Solana as well as EVM: set `CHAIN_CAIP2` to `solana:mainnet` or `solana:devnet` to enable a Kamino vault, deposit, withdraw, and claim fees with the same scripts. It also calls the Earn queries by their current client names (`listEarnVaults`, `listEarnEnabledVaults`, `listEarnPositions`, `getEarn*Status`), which the example had fallen behind on.
74
+
75
+ ### Patch Changes
76
+
77
+ - [#1650](https://github.com/tkhq/sdk/pull/1650) [`a232e57`](https://github.com/tkhq/sdk/commit/a232e57e18a3ed517bbbacae97dcc44bd9b8557b) Author [@emostov](https://github.com/emostov) - `importSecret` now uses `TRANSPORT_ENCRYPTION_SUITE_ENCLAVE_ENCRYPT_V2`, which binds the ciphertext to the secret's name and static properties. `encryptSecretToBundle` now requires `name` and `staticProperties`. Adds `importSecretsPurposeBinding` and an optional `purposeBinding` to `hpkeEncrypt` and `hpkeDecrypt`.
78
+
3
79
  ## 1.12.0
4
80
 
5
81
  ### Minor Changes