@turnkey/sdk-types 0.4.0 → 0.5.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,17 @@
1
1
  # @turnkey/sdk-types
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#977](https://github.com/tkhq/sdk/pull/977) [`4567059`](https://github.com/tkhq/sdk/commit/45670598f102223925b87a5295edca15a6ce8241) Author [@besler613](https://github.com/besler613) - OAuth2Authenticate now supports returning the encrypted bearer token via the optional `bearerTokenTargetPublicKey` request parameter (mono release v2025.9.5)
8
+
9
+ ## 0.4.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#958](https://github.com/tkhq/sdk/pull/958) [`5a96fe8`](https://github.com/tkhq/sdk/commit/5a96fe80db4c4c45e09ad8c613695ee4c2b8e51f) Author [@amircheikh](https://github.com/amircheikh) - - Synced api with mono
14
+
3
15
  ## 0.4.0
4
16
 
5
17
  ## 0.4.0-beta.6
@@ -148,6 +148,8 @@ export type v1Activity = {
148
148
  result: v1Result;
149
149
  /** A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata. */
150
150
  votes: v1Vote[];
151
+ /** A list of app proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations. */
152
+ appProofs?: v1AppProof[];
151
153
  /** An artifact verifying a User's action. */
152
154
  fingerprint: string;
153
155
  canApprove: boolean;
@@ -197,6 +199,16 @@ export type v1ApiOnlyUserParams = {
197
199
  /** A list of API Key parameters. This field, if not needed, should be an empty array in your request body. */
198
200
  apiKeys: apiApiKeyParams[];
199
201
  };
202
+ export type v1AppProof = {
203
+ /** Scheme of signing key. */
204
+ scheme: v1SignatureScheme;
205
+ /** Ephemeral public key. */
206
+ publicKey: string;
207
+ /** JSON serialized AppProofPayload. */
208
+ proofPayload: string;
209
+ /** Signature over hashed proof_payload. */
210
+ signature: string;
211
+ };
200
212
  export type v1ApproveActivityIntent = {
201
213
  /** An artifact verifying a User's action. */
202
214
  fingerprint: string;
@@ -1270,6 +1282,15 @@ export type v1GetApiKeysResponse = {
1270
1282
  /** A list of API keys. */
1271
1283
  apiKeys: v1ApiKey[];
1272
1284
  };
1285
+ export type v1GetAppProofsRequest = {
1286
+ /** Unique identifier for a given Organization. */
1287
+ organizationId: string;
1288
+ /** Unique identifier for a given activity. */
1289
+ activityId: string;
1290
+ };
1291
+ export type v1GetAppProofsResponse = {
1292
+ appProofs: v1AppProof[];
1293
+ };
1273
1294
  export type v1GetAttestationDocumentRequest = {
1274
1295
  /** Unique identifier for a given organization. */
1275
1296
  organizationId: string;
@@ -1925,6 +1946,8 @@ export type v1Oauth2AuthenticateIntent = {
1925
1946
  codeVerifier: string;
1926
1947
  /** An optional nonce used by the client to prevent replay/substitution of an ID token */
1927
1948
  nonce?: string;
1949
+ /** An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token */
1950
+ bearerTokenTargetPublicKey?: string;
1928
1951
  };
1929
1952
  export type v1Oauth2AuthenticateRequest = {
1930
1953
  type: string;
@@ -2076,6 +2099,8 @@ export type v1OtpLoginIntent = {
2076
2099
  expirationSeconds?: string;
2077
2100
  /** Invalidate all other previously generated Login API keys */
2078
2101
  invalidateExisting?: boolean;
2102
+ /** Optional signature associated with the public key passed into the verification step. This must be a hex-encoded ECDSA signature over the verification token. Only required if a public key was provided during the verification step. */
2103
+ clientSignature?: string;
2079
2104
  };
2080
2105
  export type v1OtpLoginRequest = {
2081
2106
  type: string;
@@ -2450,6 +2475,7 @@ export type v1SignTransactionRequest = {
2450
2475
  export type v1SignTransactionResult = {
2451
2476
  signedTransaction: string;
2452
2477
  };
2478
+ export type v1SignatureScheme = "SIGNATURE_SCHEME_EPHEMERAL_KEY_P256";
2453
2479
  export type v1SimpleClientExtensionResults = {
2454
2480
  appid?: boolean;
2455
2481
  appidExclude?: boolean;
@@ -2847,6 +2873,8 @@ export type v1VerifyOtpIntent = {
2847
2873
  otpCode: string;
2848
2874
  /** Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours) */
2849
2875
  expirationSeconds?: string;
2876
+ /** Client-side public key generated by the user, which will be added to the JWT response and verified in subsequent requests via a client proof signature */
2877
+ publicKey?: string;
2850
2878
  };
2851
2879
  export type v1VerifyOtpRequest = {
2852
2880
  type: string;
@@ -3197,6 +3225,17 @@ export type TGetActivitiesBody = {
3197
3225
  export type TGetActivitiesInput = {
3198
3226
  body: TGetActivitiesBody;
3199
3227
  };
3228
+ export type TGetAppProofsResponse = {
3229
+ appProofs: v1AppProof[];
3230
+ };
3231
+ export type TGetAppProofsBody = {
3232
+ organizationId?: string;
3233
+ /** Unique identifier for a given activity. */
3234
+ activityId: string;
3235
+ };
3236
+ export type TGetAppProofsInput = {
3237
+ body: TGetAppProofsBody;
3238
+ };
3200
3239
  export type TListOauth2CredentialsResponse = {
3201
3240
  oauth2Credentials: v1Oauth2Credential[];
3202
3241
  };
@@ -4213,6 +4252,8 @@ export type TOauth2AuthenticateBody = {
4213
4252
  codeVerifier: string;
4214
4253
  /** An optional nonce used by the client to prevent replay/substitution of an ID token */
4215
4254
  nonce?: string;
4255
+ /** An optional P256 public key to which, if provided, the bearer token will be encrypted and returned via the `encrypted_bearer_token` claim of the OIDC Token */
4256
+ bearerTokenTargetPublicKey?: string;
4216
4257
  };
4217
4258
  export type TOauth2AuthenticateInput = {
4218
4259
  body: TOauth2AuthenticateBody;
@@ -4281,6 +4322,8 @@ export type TOtpLoginBody = {
4281
4322
  expirationSeconds?: string;
4282
4323
  /** Invalidate all other previously generated Login API keys */
4283
4324
  invalidateExisting?: boolean;
4325
+ /** Optional signature associated with the public key passed into the verification step. This must be a hex-encoded ECDSA signature over the verification token. Only required if a public key was provided during the verification step. */
4326
+ clientSignature?: string;
4284
4327
  };
4285
4328
  export type TOtpLoginInput = {
4286
4329
  body: TOtpLoginBody;
@@ -4622,6 +4665,8 @@ export type TVerifyOtpBody = {
4622
4665
  otpCode: string;
4623
4666
  /** Expiration window (in seconds) indicating how long the verification token is valid for. If not provided, a default of 1 hour will be used. Maximum value is 86400 seconds (24 hours) */
4624
4667
  expirationSeconds?: string;
4668
+ /** Client-side public key generated by the user, which will be added to the JWT response and verified in subsequent requests via a client proof signature */
4669
+ publicKey?: string;
4625
4670
  };
4626
4671
  export type TVerifyOtpInput = {
4627
4672
  body: TVerifyOtpBody;
@@ -4684,6 +4729,8 @@ export type ProxyTOAuthLoginBody = {
4684
4729
  publicKey: string;
4685
4730
  /** Invalidate all other previously generated Login API keys */
4686
4731
  invalidateExisting?: boolean;
4732
+ /** Unique identifier for a given Organization. If provided, this organization id will be used directly. If omitted, uses the OIDC token to look up the associated organization id. */
4733
+ organizationId?: string;
4687
4734
  };
4688
4735
  export type ProxyTOAuthLoginInput = {
4689
4736
  body: ProxyTOAuthLoginBody;
@@ -4712,6 +4759,10 @@ export type ProxyTOtpLoginBody = {
4712
4759
  publicKey: string;
4713
4760
  /** Invalidate all other previously generated Login API keys */
4714
4761
  invalidateExisting?: boolean;
4762
+ /** Unique identifier for a given Organization. If provided, this organization id will be used directly. If omitted, uses the verification token to look up the verified sub-organization based on the contact and verification type. */
4763
+ organizationId?: string;
4764
+ /** Optional signature associated with the public key passed into the verification step. This must be a hex-encoded ECDSA signature over the verification token. Only required if a public key was provided during the verification step. */
4765
+ clientSignature?: string;
4715
4766
  };
4716
4767
  export type ProxyTOtpLoginInput = {
4717
4768
  body: ProxyTOtpLoginBody;
@@ -4725,12 +4776,18 @@ export type ProxyTVerifyOtpBody = {
4725
4776
  otpId: string;
4726
4777
  /** OTP sent out to a user's contact (email or SMS) */
4727
4778
  otpCode: string;
4779
+ /** Client-side public key generated by the user, which will be added to the JWT response and verified in subsequent requests via a client proof signature */
4780
+ publicKey?: string;
4728
4781
  };
4729
4782
  export type ProxyTVerifyOtpInput = {
4730
4783
  body: ProxyTVerifyOtpBody;
4731
4784
  };
4732
4785
  export type ProxyTSignupResponse = {
4733
4786
  organizationId: string;
4787
+ /** Wallet created for the sub-organization, if provided in the request */
4788
+ wallet?: v1WalletResult;
4789
+ /** Root user ID created for this sub-organization */
4790
+ userId: string;
4734
4791
  };
4735
4792
  export type ProxyTSignupBody = {
4736
4793
  userEmail?: string;
@@ -4762,6 +4819,8 @@ export type ProxyTGetWalletKitConfigResponse = {
4762
4819
  oauthClientIds?: Record<string, any>;
4763
4820
  /** OAuth redirect URL to be used for social login flows. */
4764
4821
  oauthRedirectUrl?: string;
4822
+ otpAlphanumeric?: boolean;
4823
+ otpLength?: string;
4765
4824
  };
4766
4825
  export type ProxyTGetWalletKitConfigBody = {};
4767
4826
  export type ProxyTGetWalletKitConfigInput = {