@turnkey/sdk-types 0.4.0-beta.6 → 0.4.1

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,13 @@
1
1
  # @turnkey/sdk-types
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+
9
+ ## 0.4.0
10
+
3
11
  ## 0.4.0-beta.6
4
12
 
5
13
  ### Minor Changes
@@ -71,7 +71,7 @@ export type externalactivityv1PolicyEvaluation = {
71
71
  /** Unique identifier for the Vote associated with this policy evaluation. */
72
72
  voteId: string;
73
73
  /** Detailed evaluation result for each Policy that was run. */
74
- policyEvaluations: privateumpv1PolicyEvaluation[];
74
+ policyEvaluations: immutablecommonv1PolicyEvaluation[];
75
75
  createdAt: externaldatav1Timestamp;
76
76
  };
77
77
  export type externaldatav1Address = {
@@ -89,24 +89,6 @@ export type externaldatav1Quorum = {
89
89
  /** Unique identifiers of quorum set members. */
90
90
  userIds: string[];
91
91
  };
92
- export type externaldatav1SmartContractInterface = {
93
- /** The Organization the Smart Contract Interface belongs to. */
94
- organizationId: string;
95
- /** Unique identifier for a given Smart Contract Interface (ABI or IDL). */
96
- smartContractInterfaceId: string;
97
- /** The address corresponding to the Smart Contract or Program. */
98
- smartContractAddress: string;
99
- /** The JSON corresponding to the Smart Contract Interface (ABI or IDL). */
100
- smartContractInterface: string;
101
- /** The type corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA). */
102
- type: string;
103
- /** The label corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA). */
104
- label: string;
105
- /** The notes corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA). */
106
- notes: string;
107
- createdAt: externaldatav1Timestamp;
108
- updatedAt: externaldatav1Timestamp;
109
- };
110
92
  export type externaldatav1Timestamp = {
111
93
  seconds: string;
112
94
  nanos: string;
@@ -115,7 +97,7 @@ export type immutableactivityv1Address = {
115
97
  format?: v1AddressFormat;
116
98
  address?: string;
117
99
  };
118
- export type privateumpv1PolicyEvaluation = {
100
+ export type immutablecommonv1PolicyEvaluation = {
119
101
  policyId?: string;
120
102
  outcome?: v1Outcome;
121
103
  };
@@ -166,6 +148,8 @@ export type v1Activity = {
166
148
  result: v1Result;
167
149
  /** A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata. */
168
150
  votes: v1Vote[];
151
+ /** A list of app proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations. */
152
+ appProofs?: v1AppProof[];
169
153
  /** An artifact verifying a User's action. */
170
154
  fingerprint: string;
171
155
  canApprove: boolean;
@@ -215,6 +199,16 @@ export type v1ApiOnlyUserParams = {
215
199
  /** A list of API Key parameters. This field, if not needed, should be an empty array in your request body. */
216
200
  apiKeys: apiApiKeyParams[];
217
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
+ };
218
212
  export type v1ApproveActivityIntent = {
219
213
  /** An artifact verifying a User's action. */
220
214
  fingerprint: string;
@@ -280,6 +274,26 @@ export type v1AuthenticatorParamsV2 = {
280
274
  attestation: v1Attestation;
281
275
  };
282
276
  export type v1AuthenticatorTransport = "AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID";
277
+ export type v1BootProof = {
278
+ /** The hex encoded Ephemeral Public Key. */
279
+ ephemeralPublicKeyHex: string;
280
+ /** The DER encoded COSE Sign1 struct Attestation doc. */
281
+ awsAttestationDocB64: string;
282
+ /** The borsch serialized base64 encoded Manifest. */
283
+ qosManifestB64: string;
284
+ /** The borsch serialized base64 encoded Manifest Envelope. */
285
+ qosManifestEnvelopeB64: string;
286
+ /** The label under which the enclave app was deployed. */
287
+ deploymentLabel: string;
288
+ /** Name of the enclave app */
289
+ enclaveApp: string;
290
+ /** Owner of the app i.e. 'tkhq' */
291
+ owner: string;
292
+ createdAt: externaldatav1Timestamp;
293
+ };
294
+ export type v1BootProofResponse = {
295
+ bootProof: v1BootProof;
296
+ };
283
297
  export type v1Config = {
284
298
  features?: v1Feature[];
285
299
  quorum?: externaldatav1Quorum;
@@ -1268,6 +1282,15 @@ export type v1GetApiKeysResponse = {
1268
1282
  /** A list of API keys. */
1269
1283
  apiKeys: v1ApiKey[];
1270
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
+ };
1271
1294
  export type v1GetAttestationDocumentRequest = {
1272
1295
  /** Unique identifier for a given organization. */
1273
1296
  organizationId: string;
@@ -1298,6 +1321,18 @@ export type v1GetAuthenticatorsResponse = {
1298
1321
  /** A list of authenticators. */
1299
1322
  authenticators: v1Authenticator[];
1300
1323
  };
1324
+ export type v1GetBootProofRequest = {
1325
+ /** Unique identifier for a given Organization. */
1326
+ organizationId: string;
1327
+ /** Hex encoded ephemeral public key. */
1328
+ ephemeralKey: string;
1329
+ };
1330
+ export type v1GetLatestBootProofRequest = {
1331
+ /** Unique identifier for a given Organization. */
1332
+ organizationId: string;
1333
+ /** Name of enclave app. */
1334
+ appName: string;
1335
+ };
1301
1336
  export type v1GetOauth2CredentialRequest = {
1302
1337
  /** Unique identifier for a given Organization. */
1303
1338
  organizationId: string;
@@ -1386,7 +1421,7 @@ export type v1GetSmartContractInterfaceRequest = {
1386
1421
  };
1387
1422
  export type v1GetSmartContractInterfaceResponse = {
1388
1423
  /** Object to be used in conjunction with policies to guard transaction signing. */
1389
- smartContractInterface: externaldatav1SmartContractInterface;
1424
+ smartContractInterface: v1SmartContractInterface;
1390
1425
  };
1391
1426
  export type v1GetSmartContractInterfacesRequest = {
1392
1427
  /** Unique identifier for a given organization. */
@@ -1394,7 +1429,7 @@ export type v1GetSmartContractInterfacesRequest = {
1394
1429
  };
1395
1430
  export type v1GetSmartContractInterfacesResponse = {
1396
1431
  /** A list of smart contract interfaces. */
1397
- smartContractInterfaces: externaldatav1SmartContractInterface[];
1432
+ smartContractInterfaces: v1SmartContractInterface[];
1398
1433
  };
1399
1434
  export type v1GetSubOrgIdsRequest = {
1400
1435
  /** Unique identifier for the parent organization. This is used to find sub-organizations within it. */
@@ -1574,6 +1609,8 @@ export type v1InitFiatOnRampIntent = {
1574
1609
  countrySubdivisionCode?: string;
1575
1610
  /** Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false. */
1576
1611
  sandboxMode?: boolean;
1612
+ /** Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled. */
1613
+ urlForSignature?: string;
1577
1614
  };
1578
1615
  export type v1InitFiatOnRampRequest = {
1579
1616
  type: string;
@@ -1588,6 +1625,8 @@ export type v1InitFiatOnRampResult = {
1588
1625
  onRampUrl: string;
1589
1626
  /** Unique identifier used to retrieve transaction statuses for a given fiat on-ramp flow. */
1590
1627
  onRampTransactionId: string;
1628
+ /** Optional signature of the MoonPay Widget URL. The signature is generated if the Init Fiat On Ramp intent includes the urlForSignature field. The signature can be used to initialize the MoonPay SDKs when URL signing is enabled for your project. */
1629
+ onRampUrlSignature?: string;
1591
1630
  };
1592
1631
  export type v1InitImportPrivateKeyIntent = {
1593
1632
  /** The ID of the User importing a Private Key. */
@@ -2058,6 +2097,8 @@ export type v1OtpLoginIntent = {
2058
2097
  expirationSeconds?: string;
2059
2098
  /** Invalidate all other previously generated Login API keys */
2060
2099
  invalidateExisting?: boolean;
2100
+ /** 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. */
2101
+ clientSignature?: string;
2061
2102
  };
2062
2103
  export type v1OtpLoginRequest = {
2063
2104
  type: string;
@@ -2432,11 +2473,30 @@ export type v1SignTransactionRequest = {
2432
2473
  export type v1SignTransactionResult = {
2433
2474
  signedTransaction: string;
2434
2475
  };
2476
+ export type v1SignatureScheme = "SIGNATURE_SCHEME_EPHEMERAL_KEY_P256";
2435
2477
  export type v1SimpleClientExtensionResults = {
2436
2478
  appid?: boolean;
2437
2479
  appidExclude?: boolean;
2438
2480
  credProps?: v1CredPropsAuthenticationExtensionsClientOutputs;
2439
2481
  };
2482
+ export type v1SmartContractInterface = {
2483
+ /** The Organization the Smart Contract Interface belongs to. */
2484
+ organizationId: string;
2485
+ /** Unique identifier for a given Smart Contract Interface (ABI or IDL). */
2486
+ smartContractInterfaceId: string;
2487
+ /** The address corresponding to the Smart Contract or Program. */
2488
+ smartContractAddress: string;
2489
+ /** The JSON corresponding to the Smart Contract Interface (ABI or IDL). */
2490
+ smartContractInterface: string;
2491
+ /** The type corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA). */
2492
+ type: string;
2493
+ /** The label corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA). */
2494
+ label: string;
2495
+ /** The notes corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA). */
2496
+ notes: string;
2497
+ createdAt: externaldatav1Timestamp;
2498
+ updatedAt: externaldatav1Timestamp;
2499
+ };
2440
2500
  export type v1SmartContractInterfaceReference = {
2441
2501
  smartContractInterfaceId?: string;
2442
2502
  smartContractAddress?: string;
@@ -2512,8 +2572,6 @@ export type v1UpdateAuthProxyConfigIntent = {
2512
2572
  otpAlphanumeric?: boolean;
2513
2573
  /** Desired OTP code length (6–9). */
2514
2574
  otpLength?: number;
2515
- /** A map of OAuth 2.0 provider and their respective credential ID to use for the OAuth 2.0 authentication flow. */
2516
- oauth2ProviderCredentialIds?: Record<string, any>;
2517
2575
  };
2518
2576
  export type v1UpdateAuthProxyConfigResult = {
2519
2577
  /** Unique identifier for a given User. (representing the turnkey signer user id) */
@@ -2813,6 +2871,8 @@ export type v1VerifyOtpIntent = {
2813
2871
  otpCode: string;
2814
2872
  /** 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) */
2815
2873
  expirationSeconds?: string;
2874
+ /** 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 */
2875
+ publicKey?: string;
2816
2876
  };
2817
2877
  export type v1VerifyOtpRequest = {
2818
2878
  type: string;
@@ -2895,6 +2955,10 @@ export type v1WalletAccountParams = {
2895
2955
  export type v1WalletKitSettingsParams = {
2896
2956
  /** List of enabled social login providers (e.g., 'apple', 'google', 'facebook') */
2897
2957
  enabledSocialProviders?: string[];
2958
+ /** Mapping of social login providers to their Oauth client IDs. */
2959
+ oauthClientIds?: Record<string, any>;
2960
+ /** Oauth redirect URL to be used for social login flows. */
2961
+ oauthRedirectUrl?: string;
2898
2962
  };
2899
2963
  export type v1WalletParams = {
2900
2964
  /** Human-readable name for a Wallet. */
@@ -2991,6 +3055,28 @@ export type TGetAuthenticatorsBody = {
2991
3055
  export type TGetAuthenticatorsInput = {
2992
3056
  body: TGetAuthenticatorsBody;
2993
3057
  };
3058
+ export type TGetBootProofResponse = {
3059
+ bootProof: v1BootProof;
3060
+ };
3061
+ export type TGetBootProofBody = {
3062
+ organizationId?: string;
3063
+ /** Hex encoded ephemeral public key. */
3064
+ ephemeralKey: string;
3065
+ };
3066
+ export type TGetBootProofInput = {
3067
+ body: TGetBootProofBody;
3068
+ };
3069
+ export type TGetLatestBootProofResponse = {
3070
+ bootProof: v1BootProof;
3071
+ };
3072
+ export type TGetLatestBootProofBody = {
3073
+ organizationId?: string;
3074
+ /** Name of enclave app. */
3075
+ appName: string;
3076
+ };
3077
+ export type TGetLatestBootProofInput = {
3078
+ body: TGetLatestBootProofBody;
3079
+ };
2994
3080
  export type TGetOauth2CredentialResponse = {
2995
3081
  oauth2Credential: v1Oauth2Credential;
2996
3082
  };
@@ -3071,7 +3157,7 @@ export type TGetPrivateKeyInput = {
3071
3157
  };
3072
3158
  export type TGetSmartContractInterfaceResponse = {
3073
3159
  /** Object to be used in conjunction with policies to guard transaction signing. */
3074
- smartContractInterface: externaldatav1SmartContractInterface;
3160
+ smartContractInterface: v1SmartContractInterface;
3075
3161
  };
3076
3162
  export type TGetSmartContractInterfaceBody = {
3077
3163
  organizationId?: string;
@@ -3137,6 +3223,17 @@ export type TGetActivitiesBody = {
3137
3223
  export type TGetActivitiesInput = {
3138
3224
  body: TGetActivitiesBody;
3139
3225
  };
3226
+ export type TGetAppProofsResponse = {
3227
+ appProofs: v1AppProof[];
3228
+ };
3229
+ export type TGetAppProofsBody = {
3230
+ organizationId?: string;
3231
+ /** Unique identifier for a given activity. */
3232
+ activityId: string;
3233
+ };
3234
+ export type TGetAppProofsInput = {
3235
+ body: TGetAppProofsBody;
3236
+ };
3140
3237
  export type TListOauth2CredentialsResponse = {
3141
3238
  oauth2Credentials: v1Oauth2Credential[];
3142
3239
  };
@@ -3178,7 +3275,7 @@ export type TGetPrivateKeysInput = {
3178
3275
  };
3179
3276
  export type TGetSmartContractInterfacesResponse = {
3180
3277
  /** A list of smart contract interfaces. */
3181
- smartContractInterfaces: externaldatav1SmartContractInterface[];
3278
+ smartContractInterfaces: v1SmartContractInterface[];
3182
3279
  };
3183
3280
  export type TGetSmartContractInterfacesBody = {
3184
3281
  organizationId?: string;
@@ -3963,6 +4060,8 @@ export type TInitFiatOnRampResponse = {
3963
4060
  onRampUrl: string;
3964
4061
  /** Unique identifier used to retrieve transaction statuses for a given fiat on-ramp flow. */
3965
4062
  onRampTransactionId: string;
4063
+ /** Optional signature of the MoonPay Widget URL. The signature is generated if the Init Fiat On Ramp intent includes the urlForSignature field. The signature can be used to initialize the MoonPay SDKs when URL signing is enabled for your project. */
4064
+ onRampUrlSignature?: string;
3966
4065
  };
3967
4066
  export type TInitFiatOnRampBody = {
3968
4067
  timestampMs?: string;
@@ -3987,6 +4086,8 @@ export type TInitFiatOnRampBody = {
3987
4086
  countrySubdivisionCode?: string;
3988
4087
  /** Optional flag to indicate whether to use the sandbox mode to simulate transactions for the on-ramp provider. Default is false. */
3989
4088
  sandboxMode?: boolean;
4089
+ /** Optional MoonPay Widget URL to sign when using MoonPay client SDKs with URL Signing enabled. */
4090
+ urlForSignature?: string;
3990
4091
  };
3991
4092
  export type TInitFiatOnRampInput = {
3992
4093
  body: TInitFiatOnRampBody;
@@ -4217,6 +4318,8 @@ export type TOtpLoginBody = {
4217
4318
  expirationSeconds?: string;
4218
4319
  /** Invalidate all other previously generated Login API keys */
4219
4320
  invalidateExisting?: boolean;
4321
+ /** 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. */
4322
+ clientSignature?: string;
4220
4323
  };
4221
4324
  export type TOtpLoginInput = {
4222
4325
  body: TOtpLoginBody;
@@ -4558,6 +4661,8 @@ export type TVerifyOtpBody = {
4558
4661
  otpCode: string;
4559
4662
  /** 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) */
4560
4663
  expirationSeconds?: string;
4664
+ /** 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 */
4665
+ publicKey?: string;
4561
4666
  };
4562
4667
  export type TVerifyOtpInput = {
4563
4668
  body: TVerifyOtpBody;
@@ -4603,6 +4708,8 @@ export type ProxyTOAuth2AuthenticateBody = {
4603
4708
  codeVerifier: string;
4604
4709
  /** An optional nonce used by the client to prevent replay/substitution of an ID token */
4605
4710
  nonce?: string;
4711
+ /** The client ID registered with the OAuth 2.0 provider */
4712
+ clientId: string;
4606
4713
  };
4607
4714
  export type ProxyTOAuth2AuthenticateInput = {
4608
4715
  body: ProxyTOAuth2AuthenticateBody;
@@ -4646,6 +4753,8 @@ export type ProxyTOtpLoginBody = {
4646
4753
  publicKey: string;
4647
4754
  /** Invalidate all other previously generated Login API keys */
4648
4755
  invalidateExisting?: boolean;
4756
+ /** 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. */
4757
+ clientSignature?: string;
4649
4758
  };
4650
4759
  export type ProxyTOtpLoginInput = {
4651
4760
  body: ProxyTOtpLoginBody;
@@ -4659,12 +4768,18 @@ export type ProxyTVerifyOtpBody = {
4659
4768
  otpId: string;
4660
4769
  /** OTP sent out to a user's contact (email or SMS) */
4661
4770
  otpCode: string;
4771
+ /** 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 */
4772
+ publicKey?: string;
4662
4773
  };
4663
4774
  export type ProxyTVerifyOtpInput = {
4664
4775
  body: ProxyTVerifyOtpBody;
4665
4776
  };
4666
4777
  export type ProxyTSignupResponse = {
4667
4778
  organizationId: string;
4779
+ /** Wallet created for the sub-organization, if provided in the request */
4780
+ wallet?: v1WalletResult;
4781
+ /** Root user ID created for this sub-organization */
4782
+ userId: string;
4668
4783
  };
4669
4784
  export type ProxyTSignupBody = {
4670
4785
  userEmail?: string;
@@ -4692,6 +4807,12 @@ export type ProxyTGetWalletKitConfigResponse = {
4692
4807
  sessionExpirationSeconds: string;
4693
4808
  /** The organization ID this configuration applies to */
4694
4809
  organizationId: string;
4810
+ /** Mapping of social login providers to their OAuth client IDs. */
4811
+ oauthClientIds?: Record<string, any>;
4812
+ /** OAuth redirect URL to be used for social login flows. */
4813
+ oauthRedirectUrl?: string;
4814
+ otpAlphanumeric?: boolean;
4815
+ otpLength?: string;
4695
4816
  };
4696
4817
  export type ProxyTGetWalletKitConfigBody = {};
4697
4818
  export type ProxyTGetWalletKitConfigInput = {