@privy-io/api-types 0.15.0 → 0.17.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 +141 -0
- package/client.d.mts +30 -33
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -33
- package/client.d.ts.map +1 -1
- package/client.js +9 -4
- package/client.js.map +1 -1
- package/client.mjs +9 -4
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +6 -2
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +6 -2
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +14 -4
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +14 -4
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +44 -23
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +44 -23
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +32 -8
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +32 -8
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +6 -0
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +6 -0
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/index.d.mts +15 -16
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +15 -16
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +65 -79
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +65 -79
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +9 -8
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +9 -8
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/kraken-embed.d.mts +208 -218
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +208 -218
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/kraken-embed.js.map +1 -1
- package/resources/kraken-embed.mjs.map +1 -1
- package/resources/onramps.d.mts +50 -48
- package/resources/onramps.d.mts.map +1 -1
- package/resources/onramps.d.ts +50 -48
- package/resources/onramps.d.ts.map +1 -1
- package/resources/policies.d.mts +93 -24
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +93 -24
- package/resources/policies.d.ts.map +1 -1
- package/resources/shared.d.mts +15 -3
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +15 -3
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +3 -2
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +3 -2
- package/resources/swaps.d.ts.map +1 -1
- package/resources/transactions.d.mts +9 -2
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +9 -2
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +33 -7
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +33 -7
- package/resources/users.d.ts.map +1 -1
- package/resources/{wallet-actions.d.ts → wallets/actions.d.mts} +383 -68
- package/resources/wallets/actions.d.mts.map +1 -0
- package/resources/{wallet-actions.d.mts → wallets/actions.d.ts} +383 -68
- package/resources/wallets/actions.d.ts.map +1 -0
- package/resources/wallets/actions.js +9 -0
- package/resources/wallets/actions.js.map +1 -0
- package/resources/wallets/actions.mjs +5 -0
- package/resources/wallets/actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +11 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +11 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/index.d.mts +2 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +2 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js +3 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs +1 -0
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +14 -3
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +14 -3
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +846 -97
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +846 -97
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +19 -2
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +19 -2
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +596 -108
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +596 -108
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/yield.d.mts +30 -30
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +30 -30
- package/resources/yield.d.ts.map +1 -1
- package/resources/yield.js.map +1 -1
- package/resources/yield.mjs.map +1 -1
- package/src/client.ts +223 -76
- package/src/resources/accounts.ts +7 -1
- package/src/resources/aggregations.ts +16 -3
- package/src/resources/apps.ts +60 -30
- package/src/resources/client-auth.ts +41 -7
- package/src/resources/embedded-wallets.ts +7 -0
- package/src/resources/index.ts +107 -36
- package/src/resources/intents.ts +73 -91
- package/src/resources/key-quorums.ts +11 -9
- package/src/resources/kraken-embed.ts +560 -1065
- package/src/resources/onramps.ts +69 -54
- package/src/resources/policies.ts +162 -52
- package/src/resources/shared.ts +18 -2
- package/src/resources/swaps.ts +3 -2
- package/src/resources/transactions.ts +18 -9
- package/src/resources/users.ts +38 -6
- package/src/resources/{wallet-actions.ts → wallets/actions.ts} +496 -78
- package/src/resources/wallets/balance.ts +26 -56
- package/src/resources/wallets/index.ts +93 -0
- package/src/resources/wallets/transactions.ts +17 -10
- package/src/resources/wallets/wallets.ts +1312 -177
- package/src/resources/webhooks.ts +729 -118
- package/src/resources/yield.ts +33 -41
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/wallet-actions.d.mts.map +0 -1
- package/resources/wallet-actions.d.ts.map +0 -1
- package/resources/wallet-actions.js +0 -9
- package/resources/wallet-actions.js.map +0 -1
- package/resources/wallet-actions.mjs +0 -5
- package/resources/wallet-actions.mjs.map +0 -1
package/src/resources/onramps.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as OnrampsAPI from './onramps';
|
|
5
4
|
import * as ClientAuthAPI from './client-auth';
|
|
6
5
|
import * as FiatAPI from './fiat';
|
|
6
|
+
import * as SharedAPI from './shared';
|
|
7
7
|
|
|
8
8
|
export class Onramps extends APIResource {}
|
|
9
9
|
|
|
@@ -61,6 +61,11 @@ export type Caip2ChainID = string;
|
|
|
61
61
|
*/
|
|
62
62
|
export interface CreateLinkAuthIntentInput {
|
|
63
63
|
email?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether to use the sandbox or production environment for fiat onramp.
|
|
67
|
+
*/
|
|
68
|
+
environment?: FiatOnrampEnvironment;
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
/**
|
|
@@ -115,21 +120,9 @@ export interface CreateStripeOnrampSessionResponse {
|
|
|
115
120
|
/**
|
|
116
121
|
* Transaction details returned from a Stripe onramp session.
|
|
117
122
|
*/
|
|
118
|
-
transaction_details?:
|
|
123
|
+
transaction_details?: OnrampSessionTransactionDetails | null;
|
|
119
124
|
}
|
|
120
125
|
|
|
121
|
-
export namespace CreateStripeOnrampSessionResponse {
|
|
122
|
-
/**
|
|
123
|
-
* Transaction details returned from a Stripe onramp session.
|
|
124
|
-
*/
|
|
125
|
-
export interface TransactionDetails extends OnrampsAPI.OnrampSessionTransactionDetails {}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Cryptocurrency symbol. Uppercase alphanumeric, 2-10 characters.
|
|
130
|
-
*/
|
|
131
|
-
export type CryptoCurrencyCode = string;
|
|
132
|
-
|
|
133
126
|
/**
|
|
134
127
|
* Input for exchanging a Link auth intent for OAuth tokens.
|
|
135
128
|
*/
|
|
@@ -137,6 +130,11 @@ export interface ExchangeStripeTokensInput {
|
|
|
137
130
|
auth_intent_id: string;
|
|
138
131
|
|
|
139
132
|
crypto_customer_id: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Whether to use the sandbox or production environment for fiat onramp.
|
|
136
|
+
*/
|
|
137
|
+
environment?: FiatOnrampEnvironment;
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
/**
|
|
@@ -168,9 +166,11 @@ export interface FiatOnrampDestination {
|
|
|
168
166
|
address: string;
|
|
169
167
|
|
|
170
168
|
/**
|
|
171
|
-
*
|
|
169
|
+
* Token identifier string. EVM-shaped 40-hex token addresses normalize to checksum
|
|
170
|
+
* case, 16-byte Hyperliquid token IDs normalize to lowercase, and all other
|
|
171
|
+
* identifiers pass through unchanged.
|
|
172
172
|
*/
|
|
173
|
-
asset:
|
|
173
|
+
asset: SharedAPI.TokenIdentifier;
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* A CAIP-2 chain identifier in namespace:reference format (e.g. "eip155:1" for
|
|
@@ -222,11 +222,15 @@ export interface FiatOnrampQuote {
|
|
|
222
222
|
|
|
223
223
|
destination_currency_code?: string | null;
|
|
224
224
|
|
|
225
|
+
payment_method_category?: string;
|
|
226
|
+
|
|
225
227
|
source_amount?: number | null;
|
|
226
228
|
|
|
227
229
|
source_currency_code?: string | null;
|
|
228
230
|
|
|
229
231
|
sub_provider?: string | null;
|
|
232
|
+
|
|
233
|
+
warning?: string | null;
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
/**
|
|
@@ -316,6 +320,12 @@ export interface GetFiatOnrampQuotesInput {
|
|
|
316
320
|
* The response containing fiat onramp quotes.
|
|
317
321
|
*/
|
|
318
322
|
export interface GetFiatOnrampQuotesResponse {
|
|
323
|
+
destination_currency_icon_url: string | null;
|
|
324
|
+
|
|
325
|
+
destination_currency_symbol: string;
|
|
326
|
+
|
|
327
|
+
destination_network_icon_url: string | null;
|
|
328
|
+
|
|
319
329
|
quotes: Array<FiatOnrampQuote>;
|
|
320
330
|
|
|
321
331
|
provider_errors?: Array<FiatOnrampProviderError>;
|
|
@@ -423,15 +433,6 @@ export interface ListStripePaymentTokensResponse {
|
|
|
423
433
|
data: Array<StripePaymentToken>;
|
|
424
434
|
}
|
|
425
435
|
|
|
426
|
-
/**
|
|
427
|
-
* Fee breakdown for a Stripe onramp transaction.
|
|
428
|
-
*/
|
|
429
|
-
export interface OnrampSessionFees {
|
|
430
|
-
network_fee_monetary: string | null;
|
|
431
|
-
|
|
432
|
-
transaction_fee_monetary: string | null;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
436
|
/**
|
|
436
437
|
* Parameters for creating a Stripe onramp session.
|
|
437
438
|
*/
|
|
@@ -439,9 +440,11 @@ export interface OnrampSessionParams {
|
|
|
439
440
|
crypto_customer_id: string;
|
|
440
441
|
|
|
441
442
|
/**
|
|
442
|
-
*
|
|
443
|
+
* Token identifier string. EVM-shaped 40-hex token addresses normalize to checksum
|
|
444
|
+
* case, 16-byte Hyperliquid token IDs normalize to lowercase, and all other
|
|
445
|
+
* identifiers pass through unchanged.
|
|
443
446
|
*/
|
|
444
|
-
destination_currency:
|
|
447
|
+
destination_currency: SharedAPI.TokenIdentifier;
|
|
445
448
|
|
|
446
449
|
destination_network: string;
|
|
447
450
|
|
|
@@ -467,31 +470,26 @@ export interface OnrampSessionTransactionDetails {
|
|
|
467
470
|
|
|
468
471
|
destination_network: string | null;
|
|
469
472
|
|
|
470
|
-
|
|
471
|
-
* Fee breakdown for a Stripe onramp transaction.
|
|
472
|
-
*/
|
|
473
|
-
fees: OnrampSessionTransactionDetails.Fees;
|
|
474
|
-
|
|
475
|
-
source_amount: string | null;
|
|
473
|
+
fee: string | null;
|
|
476
474
|
|
|
477
475
|
source_currency: string | null;
|
|
478
|
-
}
|
|
479
476
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
*/
|
|
484
|
-
export interface Fees extends OnrampsAPI.OnrampSessionFees {}
|
|
477
|
+
source_total_amount: string | null;
|
|
478
|
+
|
|
479
|
+
quote_expiration?: number | null;
|
|
485
480
|
}
|
|
486
481
|
|
|
487
482
|
/**
|
|
488
|
-
* Refreshed quote with
|
|
483
|
+
* Refreshed quote with amounts, fee, and expiry.
|
|
489
484
|
*/
|
|
490
485
|
export interface RefreshStripeQuoteResponse {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
486
|
+
destination_amount: string | null;
|
|
487
|
+
|
|
488
|
+
fee: string | null;
|
|
489
|
+
|
|
490
|
+
quote_expiration: number | null;
|
|
491
|
+
|
|
492
|
+
source_total_amount: string | null;
|
|
495
493
|
}
|
|
496
494
|
|
|
497
495
|
/**
|
|
@@ -511,6 +509,15 @@ export interface StripeConsumerWallet {
|
|
|
511
509
|
export interface StripeCryptoCustomerActive {
|
|
512
510
|
crypto_customer_id: string;
|
|
513
511
|
|
|
512
|
+
/**
|
|
513
|
+
* Region derived from a Stripe user's country of residence.
|
|
514
|
+
*/
|
|
515
|
+
kyc_region: StripeKYCRegion | null;
|
|
516
|
+
|
|
517
|
+
kyc_tiers: Array<StripeKYCTier>;
|
|
518
|
+
|
|
519
|
+
provided_fields: Array<string>;
|
|
520
|
+
|
|
514
521
|
status: 'active';
|
|
515
522
|
|
|
516
523
|
verifications: Array<StripeVerification>;
|
|
@@ -532,6 +539,22 @@ export interface StripeCryptoCustomerNone {
|
|
|
532
539
|
status: 'none';
|
|
533
540
|
}
|
|
534
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Region derived from a Stripe user's country of residence.
|
|
544
|
+
*/
|
|
545
|
+
export type StripeKYCRegion = 'us' | 'eu';
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* A KYC tier with its verification status.
|
|
549
|
+
*/
|
|
550
|
+
export interface StripeKYCTier {
|
|
551
|
+
tier: string;
|
|
552
|
+
|
|
553
|
+
verification_status: string;
|
|
554
|
+
|
|
555
|
+
verification_errors?: Array<string>;
|
|
556
|
+
}
|
|
557
|
+
|
|
535
558
|
/**
|
|
536
559
|
* Checkout confirmation with client secret.
|
|
537
560
|
*/
|
|
@@ -558,13 +581,6 @@ export interface StripePaymentToken {
|
|
|
558
581
|
type: string;
|
|
559
582
|
}
|
|
560
583
|
|
|
561
|
-
/**
|
|
562
|
-
* A refreshed quote.
|
|
563
|
-
*/
|
|
564
|
-
export interface StripeQuote {
|
|
565
|
-
expires_at: number;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
584
|
/**
|
|
569
585
|
* Transaction details from checkout.
|
|
570
586
|
*/
|
|
@@ -592,7 +608,6 @@ export declare namespace Onramps {
|
|
|
592
608
|
type CreateOrUpdateFiatCustomerRequestInput as CreateOrUpdateFiatCustomerRequestInput,
|
|
593
609
|
type CreateStripeOnrampSessionInput as CreateStripeOnrampSessionInput,
|
|
594
610
|
type CreateStripeOnrampSessionResponse as CreateStripeOnrampSessionResponse,
|
|
595
|
-
type CryptoCurrencyCode as CryptoCurrencyCode,
|
|
596
611
|
type ExchangeStripeTokensInput as ExchangeStripeTokensInput,
|
|
597
612
|
type ExchangeStripeTokensResponse as ExchangeStripeTokensResponse,
|
|
598
613
|
type FiatAmount as FiatAmount,
|
|
@@ -619,7 +634,6 @@ export declare namespace Onramps {
|
|
|
619
634
|
type LinkAuthIntentNoAccount as LinkAuthIntentNoAccount,
|
|
620
635
|
type ListStripeConsumerWalletsResponse as ListStripeConsumerWalletsResponse,
|
|
621
636
|
type ListStripePaymentTokensResponse as ListStripePaymentTokensResponse,
|
|
622
|
-
type OnrampSessionFees as OnrampSessionFees,
|
|
623
637
|
type OnrampSessionParams as OnrampSessionParams,
|
|
624
638
|
type OnrampSessionTransactionDetails as OnrampSessionTransactionDetails,
|
|
625
639
|
type RefreshStripeQuoteResponse as RefreshStripeQuoteResponse,
|
|
@@ -627,10 +641,11 @@ export declare namespace Onramps {
|
|
|
627
641
|
type StripeCryptoCustomerActive as StripeCryptoCustomerActive,
|
|
628
642
|
type StripeCryptoCustomerExpired as StripeCryptoCustomerExpired,
|
|
629
643
|
type StripeCryptoCustomerNone as StripeCryptoCustomerNone,
|
|
644
|
+
type StripeKYCRegion as StripeKYCRegion,
|
|
645
|
+
type StripeKYCTier as StripeKYCTier,
|
|
630
646
|
type StripeOnrampCheckoutResponse as StripeOnrampCheckoutResponse,
|
|
631
647
|
type StripeOnrampSessionStatus as StripeOnrampSessionStatus,
|
|
632
648
|
type StripePaymentToken as StripePaymentToken,
|
|
633
|
-
type StripeQuote as StripeQuote,
|
|
634
649
|
type StripeTransactionDetails as StripeTransactionDetails,
|
|
635
650
|
type StripeVerification as StripeVerification,
|
|
636
651
|
};
|
|
@@ -87,7 +87,17 @@ export interface AggregationCondition {
|
|
|
87
87
|
/**
|
|
88
88
|
* Operator to use for policy conditions.
|
|
89
89
|
*/
|
|
90
|
-
export type ConditionOperator =
|
|
90
|
+
export type ConditionOperator =
|
|
91
|
+
| 'eq'
|
|
92
|
+
| 'gt'
|
|
93
|
+
| 'gte'
|
|
94
|
+
| 'lt'
|
|
95
|
+
| 'lte'
|
|
96
|
+
| 'in'
|
|
97
|
+
| 'in_condition_set'
|
|
98
|
+
| 'contains'
|
|
99
|
+
| 'starts_with'
|
|
100
|
+
| 'ends_with';
|
|
91
101
|
|
|
92
102
|
/**
|
|
93
103
|
* A condition set for grouping related condition values.
|
|
@@ -112,7 +122,7 @@ export interface ConditionSet {
|
|
|
112
122
|
/**
|
|
113
123
|
* A unique identifier for a key quorum.
|
|
114
124
|
*/
|
|
115
|
-
owner_id: SharedAPI.KeyQuorumID;
|
|
125
|
+
owner_id: SharedAPI.KeyQuorumID | null;
|
|
116
126
|
}
|
|
117
127
|
|
|
118
128
|
/**
|
|
@@ -205,8 +215,8 @@ export interface ConditionSetItemsResponse {
|
|
|
205
215
|
}
|
|
206
216
|
|
|
207
217
|
/**
|
|
208
|
-
* Request body for creating a condition set.
|
|
209
|
-
*
|
|
218
|
+
* Request body for creating a condition set. Optionally provide `owner` or
|
|
219
|
+
* `owner_id` (but not both) to specify ownership.
|
|
210
220
|
*/
|
|
211
221
|
export interface ConditionSetRequestBody {
|
|
212
222
|
/**
|
|
@@ -292,7 +302,10 @@ export interface EthereumCalldataCondition {
|
|
|
292
302
|
* eth_sendTransaction request.
|
|
293
303
|
*/
|
|
294
304
|
export interface EthereumTransactionCondition {
|
|
295
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Ethereum transaction-level fields that can be referenced in a policy condition.
|
|
307
|
+
*/
|
|
308
|
+
field: EthereumTransactionConditionField;
|
|
296
309
|
|
|
297
310
|
field_source: 'ethereum_transaction';
|
|
298
311
|
|
|
@@ -308,11 +321,19 @@ export interface EthereumTransactionCondition {
|
|
|
308
321
|
value: ConditionValue;
|
|
309
322
|
}
|
|
310
323
|
|
|
324
|
+
/**
|
|
325
|
+
* Ethereum transaction-level fields that can be referenced in a policy condition.
|
|
326
|
+
*/
|
|
327
|
+
export type EthereumTransactionConditionField = 'to' | 'value' | 'chain_id';
|
|
328
|
+
|
|
311
329
|
/**
|
|
312
330
|
* Attributes from the signing domain that will verify the signature.
|
|
313
331
|
*/
|
|
314
332
|
export interface EthereumTypedDataDomainCondition {
|
|
315
|
-
|
|
333
|
+
/**
|
|
334
|
+
* Supported fields for Ethereum typed data domain conditions.
|
|
335
|
+
*/
|
|
336
|
+
field: EthereumTypedDataDomainConditionField;
|
|
316
337
|
|
|
317
338
|
field_source: 'ethereum_typed_data_domain';
|
|
318
339
|
|
|
@@ -328,6 +349,15 @@ export interface EthereumTypedDataDomainCondition {
|
|
|
328
349
|
value: ConditionValue;
|
|
329
350
|
}
|
|
330
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Supported fields for Ethereum typed data domain conditions.
|
|
354
|
+
*/
|
|
355
|
+
export type EthereumTypedDataDomainConditionField =
|
|
356
|
+
| 'chainId'
|
|
357
|
+
| 'verifyingContract'
|
|
358
|
+
| 'chain_id'
|
|
359
|
+
| 'verifying_contract';
|
|
360
|
+
|
|
331
361
|
/**
|
|
332
362
|
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
333
363
|
* EIP-712.
|
|
@@ -342,7 +372,11 @@ export interface EthereumTypedDataMessageCondition {
|
|
|
342
372
|
*/
|
|
343
373
|
operator: ConditionOperator;
|
|
344
374
|
|
|
345
|
-
|
|
375
|
+
/**
|
|
376
|
+
* The typed data structure containing EIP-712 types and the primary type for typed
|
|
377
|
+
* data message policy conditions.
|
|
378
|
+
*/
|
|
379
|
+
typed_data: TypedDataInput;
|
|
346
380
|
|
|
347
381
|
/**
|
|
348
382
|
* Value to compare against in a policy condition. Can be a single string or an
|
|
@@ -351,17 +385,34 @@ export interface EthereumTypedDataMessageCondition {
|
|
|
351
385
|
value: ConditionValue;
|
|
352
386
|
}
|
|
353
387
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
388
|
+
/**
|
|
389
|
+
* Condition on the message being signed (e.g. in personal_sign).
|
|
390
|
+
*/
|
|
391
|
+
export interface MessageSigningCondition {
|
|
392
|
+
/**
|
|
393
|
+
* Supported fields for message signing conditions.
|
|
394
|
+
*/
|
|
395
|
+
field: MessageSigningField;
|
|
357
396
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
397
|
+
field_source: 'message';
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Operator to use for policy conditions.
|
|
401
|
+
*/
|
|
402
|
+
operator: ConditionOperator;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
406
|
+
* array of strings.
|
|
407
|
+
*/
|
|
408
|
+
value: ConditionValue;
|
|
363
409
|
}
|
|
364
410
|
|
|
411
|
+
/**
|
|
412
|
+
* Supported fields for message signing conditions.
|
|
413
|
+
*/
|
|
414
|
+
export type MessageSigningField = 'content' | 'byte_length';
|
|
415
|
+
|
|
365
416
|
/**
|
|
366
417
|
* A policy for controlling wallet operations.
|
|
367
418
|
*/
|
|
@@ -388,9 +439,9 @@ export interface Policy {
|
|
|
388
439
|
name: string;
|
|
389
440
|
|
|
390
441
|
/**
|
|
391
|
-
*
|
|
442
|
+
* A unique identifier for a key quorum.
|
|
392
443
|
*/
|
|
393
|
-
owner_id:
|
|
444
|
+
owner_id: SharedAPI.KeyQuorumID | null;
|
|
394
445
|
|
|
395
446
|
rules: Array<PolicyRuleResponse>;
|
|
396
447
|
|
|
@@ -446,7 +497,8 @@ export type PolicyCondition =
|
|
|
446
497
|
| SuiTransactionCommandCondition
|
|
447
498
|
| SuiTransferObjectsCommandCondition
|
|
448
499
|
| ActionRequestBodyCondition
|
|
449
|
-
| AggregationCondition
|
|
500
|
+
| AggregationCondition
|
|
501
|
+
| MessageSigningCondition;
|
|
450
502
|
|
|
451
503
|
/**
|
|
452
504
|
* Method the rule applies to.
|
|
@@ -461,9 +513,13 @@ export type PolicyMethod =
|
|
|
461
513
|
| 'wallet_sendCalls'
|
|
462
514
|
| 'signTransaction'
|
|
463
515
|
| 'signAndSendTransaction'
|
|
516
|
+
| 'signMessage'
|
|
464
517
|
| 'exportPrivateKey'
|
|
465
518
|
| 'exportSeedPhrase'
|
|
466
519
|
| 'signTransactionBytes'
|
|
520
|
+
| 'signRawMessageBytes'
|
|
521
|
+
| 'tron_sendTransaction'
|
|
522
|
+
| 'tron_signTransaction'
|
|
467
523
|
| 'earn_deposit'
|
|
468
524
|
| 'earn_withdraw'
|
|
469
525
|
| 'transfer'
|
|
@@ -551,7 +607,11 @@ export interface SolanaProgramInstructionCondition {
|
|
|
551
607
|
* fields.
|
|
552
608
|
*/
|
|
553
609
|
export interface SolanaSystemProgramInstructionCondition {
|
|
554
|
-
|
|
610
|
+
/**
|
|
611
|
+
* Supported fields for Solana System Program conditions including Transfer
|
|
612
|
+
* instruction fields.
|
|
613
|
+
*/
|
|
614
|
+
field: SolanaSystemProgramInstructionConditionField;
|
|
555
615
|
|
|
556
616
|
field_source: 'solana_system_program_instruction';
|
|
557
617
|
|
|
@@ -567,36 +627,27 @@ export interface SolanaSystemProgramInstructionCondition {
|
|
|
567
627
|
value: ConditionValue;
|
|
568
628
|
}
|
|
569
629
|
|
|
630
|
+
/**
|
|
631
|
+
* Supported fields for Solana System Program conditions including Transfer
|
|
632
|
+
* instruction fields.
|
|
633
|
+
*/
|
|
634
|
+
export type SolanaSystemProgramInstructionConditionField =
|
|
635
|
+
| 'instructionName'
|
|
636
|
+
| 'Transfer.from'
|
|
637
|
+
| 'Transfer.to'
|
|
638
|
+
| 'Transfer.lamports';
|
|
639
|
+
|
|
570
640
|
/**
|
|
571
641
|
* Solana Token Program attributes, including more granular TransferChecked
|
|
572
642
|
* instruction fields.
|
|
573
643
|
*/
|
|
574
644
|
export interface SolanaTokenProgramInstructionCondition {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
| 'TransferChecked.source'
|
|
582
|
-
| 'TransferChecked.destination'
|
|
583
|
-
| 'TransferChecked.authority'
|
|
584
|
-
| 'TransferChecked.amount'
|
|
585
|
-
| 'TransferChecked.mint'
|
|
586
|
-
| 'Burn.account'
|
|
587
|
-
| 'Burn.mint'
|
|
588
|
-
| 'Burn.authority'
|
|
589
|
-
| 'Burn.amount'
|
|
590
|
-
| 'MintTo.mint'
|
|
591
|
-
| 'MintTo.account'
|
|
592
|
-
| 'MintTo.authority'
|
|
593
|
-
| 'MintTo.amount'
|
|
594
|
-
| 'CloseAccount.account'
|
|
595
|
-
| 'CloseAccount.destination'
|
|
596
|
-
| 'CloseAccount.authority'
|
|
597
|
-
| 'InitializeAccount3.account'
|
|
598
|
-
| 'InitializeAccount3.mint'
|
|
599
|
-
| 'InitializeAccount3.owner';
|
|
645
|
+
/**
|
|
646
|
+
* Supported fields for Solana Token Program conditions including Transfer,
|
|
647
|
+
* TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction
|
|
648
|
+
* fields.
|
|
649
|
+
*/
|
|
650
|
+
field: SolanaTokenProgramInstructionConditionField;
|
|
600
651
|
|
|
601
652
|
field_source: 'solana_token_program_instruction';
|
|
602
653
|
|
|
@@ -612,6 +663,37 @@ export interface SolanaTokenProgramInstructionCondition {
|
|
|
612
663
|
value: ConditionValue;
|
|
613
664
|
}
|
|
614
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Supported fields for Solana Token Program conditions including Transfer,
|
|
668
|
+
* TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction
|
|
669
|
+
* fields.
|
|
670
|
+
*/
|
|
671
|
+
export type SolanaTokenProgramInstructionConditionField =
|
|
672
|
+
| 'instructionName'
|
|
673
|
+
| 'Transfer.source'
|
|
674
|
+
| 'Transfer.destination'
|
|
675
|
+
| 'Transfer.authority'
|
|
676
|
+
| 'Transfer.amount'
|
|
677
|
+
| 'TransferChecked.source'
|
|
678
|
+
| 'TransferChecked.destination'
|
|
679
|
+
| 'TransferChecked.authority'
|
|
680
|
+
| 'TransferChecked.amount'
|
|
681
|
+
| 'TransferChecked.mint'
|
|
682
|
+
| 'Burn.account'
|
|
683
|
+
| 'Burn.mint'
|
|
684
|
+
| 'Burn.authority'
|
|
685
|
+
| 'Burn.amount'
|
|
686
|
+
| 'MintTo.mint'
|
|
687
|
+
| 'MintTo.account'
|
|
688
|
+
| 'MintTo.authority'
|
|
689
|
+
| 'MintTo.amount'
|
|
690
|
+
| 'CloseAccount.account'
|
|
691
|
+
| 'CloseAccount.destination'
|
|
692
|
+
| 'CloseAccount.authority'
|
|
693
|
+
| 'InitializeAccount3.account'
|
|
694
|
+
| 'InitializeAccount3.mint'
|
|
695
|
+
| 'InitializeAccount3.owner';
|
|
696
|
+
|
|
615
697
|
/**
|
|
616
698
|
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
617
699
|
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
@@ -758,15 +840,10 @@ export interface TronCalldataCondition {
|
|
|
758
840
|
*/
|
|
759
841
|
export interface TronTransactionCondition {
|
|
760
842
|
/**
|
|
761
|
-
* Supported TRON transaction fields
|
|
843
|
+
* Supported TRON transaction fields for TransferContract and TriggerSmartContract
|
|
844
|
+
* in format "TransactionType.field_name".
|
|
762
845
|
*/
|
|
763
|
-
field:
|
|
764
|
-
| 'TransferContract.to_address'
|
|
765
|
-
| 'TransferContract.amount'
|
|
766
|
-
| 'TriggerSmartContract.contract_address'
|
|
767
|
-
| 'TriggerSmartContract.call_value'
|
|
768
|
-
| 'TriggerSmartContract.token_id'
|
|
769
|
-
| 'TriggerSmartContract.call_token_value';
|
|
846
|
+
field: TronTransactionConditionField;
|
|
770
847
|
|
|
771
848
|
field_source: 'tron_transaction';
|
|
772
849
|
|
|
@@ -782,6 +859,31 @@ export interface TronTransactionCondition {
|
|
|
782
859
|
value: ConditionValue;
|
|
783
860
|
}
|
|
784
861
|
|
|
862
|
+
/**
|
|
863
|
+
* Supported TRON transaction fields for TransferContract and TriggerSmartContract
|
|
864
|
+
* in format "TransactionType.field_name".
|
|
865
|
+
*/
|
|
866
|
+
export type TronTransactionConditionField =
|
|
867
|
+
| 'TransferContract.to_address'
|
|
868
|
+
| 'TransferContract.amount'
|
|
869
|
+
| 'TriggerSmartContract.contract_address'
|
|
870
|
+
| 'TriggerSmartContract.call_value'
|
|
871
|
+
| 'TriggerSmartContract.token_id'
|
|
872
|
+
| 'TriggerSmartContract.call_token_value';
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* The typed data structure containing EIP-712 types and the primary type for typed
|
|
876
|
+
* data message policy conditions.
|
|
877
|
+
*/
|
|
878
|
+
export interface TypedDataInput {
|
|
879
|
+
primary_type: string;
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* The type definitions for EIP-712 typed data signing.
|
|
883
|
+
*/
|
|
884
|
+
types: WalletsAPI.TypedDataTypesInputParams;
|
|
885
|
+
}
|
|
886
|
+
|
|
785
887
|
/**
|
|
786
888
|
* Request body for updating a condition set. At least one field must be provided.
|
|
787
889
|
* `owner` and `owner_id` are mutually exclusive.
|
|
@@ -826,8 +928,12 @@ export declare namespace Policies {
|
|
|
826
928
|
type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition,
|
|
827
929
|
type EthereumCalldataCondition as EthereumCalldataCondition,
|
|
828
930
|
type EthereumTransactionCondition as EthereumTransactionCondition,
|
|
931
|
+
type EthereumTransactionConditionField as EthereumTransactionConditionField,
|
|
829
932
|
type EthereumTypedDataDomainCondition as EthereumTypedDataDomainCondition,
|
|
933
|
+
type EthereumTypedDataDomainConditionField as EthereumTypedDataDomainConditionField,
|
|
830
934
|
type EthereumTypedDataMessageCondition as EthereumTypedDataMessageCondition,
|
|
935
|
+
type MessageSigningCondition as MessageSigningCondition,
|
|
936
|
+
type MessageSigningField as MessageSigningField,
|
|
831
937
|
type Policy as Policy,
|
|
832
938
|
type PolicyAction as PolicyAction,
|
|
833
939
|
type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
|
|
@@ -839,7 +945,9 @@ export declare namespace Policies {
|
|
|
839
945
|
type PolicyRuleResponse as PolicyRuleResponse,
|
|
840
946
|
type SolanaProgramInstructionCondition as SolanaProgramInstructionCondition,
|
|
841
947
|
type SolanaSystemProgramInstructionCondition as SolanaSystemProgramInstructionCondition,
|
|
948
|
+
type SolanaSystemProgramInstructionConditionField as SolanaSystemProgramInstructionConditionField,
|
|
842
949
|
type SolanaTokenProgramInstructionCondition as SolanaTokenProgramInstructionCondition,
|
|
950
|
+
type SolanaTokenProgramInstructionConditionField as SolanaTokenProgramInstructionConditionField,
|
|
843
951
|
type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
|
|
844
952
|
type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
|
|
845
953
|
type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
|
|
@@ -849,6 +957,8 @@ export declare namespace Policies {
|
|
|
849
957
|
type TempoTransactionConditionField as TempoTransactionConditionField,
|
|
850
958
|
type TronCalldataCondition as TronCalldataCondition,
|
|
851
959
|
type TronTransactionCondition as TronTransactionCondition,
|
|
960
|
+
type TronTransactionConditionField as TronTransactionConditionField,
|
|
961
|
+
type TypedDataInput as TypedDataInput,
|
|
852
962
|
type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody,
|
|
853
963
|
};
|
|
854
964
|
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -35,8 +35,9 @@ export type EvmAddress = string;
|
|
|
35
35
|
export type EvmChecksumAddress = string;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* Hyperliquid L1
|
|
39
|
-
*
|
|
38
|
+
* Hyperliquid L1 token identifier: 0x followed by either 32 hex characters
|
|
39
|
+
* (16-byte spot/perps token IDs) or 40 hex characters (20-byte HIP-3 DEX token
|
|
40
|
+
* IDs), normalized to lowercase.
|
|
40
41
|
*/
|
|
41
42
|
export type HyperliquidTokenAddress = string;
|
|
42
43
|
|
|
@@ -91,11 +92,24 @@ export interface SuccessResponse {
|
|
|
91
92
|
success: boolean;
|
|
92
93
|
}
|
|
93
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Token identifier string. EVM-shaped 40-hex token addresses normalize to checksum
|
|
97
|
+
* case, 16-byte Hyperliquid token IDs normalize to lowercase, and all other
|
|
98
|
+
* identifiers pass through unchanged.
|
|
99
|
+
*/
|
|
100
|
+
export type TokenIdentifier = string;
|
|
101
|
+
|
|
94
102
|
/**
|
|
95
103
|
* Tron address: base58check-encoded, starting with T, 34 characters.
|
|
96
104
|
*/
|
|
97
105
|
export type TronAddress = string;
|
|
98
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
|
|
109
|
+
* prefix.
|
|
110
|
+
*/
|
|
111
|
+
export type TronHexAddress = string;
|
|
112
|
+
|
|
99
113
|
export declare namespace Shared {
|
|
100
114
|
export {
|
|
101
115
|
type BitcoinAddress as BitcoinAddress,
|
|
@@ -111,6 +125,8 @@ export declare namespace Shared {
|
|
|
111
125
|
type P256PublicKey as P256PublicKey,
|
|
112
126
|
type SolanaAddress as SolanaAddress,
|
|
113
127
|
type SuccessResponse as SuccessResponse,
|
|
128
|
+
type TokenIdentifier as TokenIdentifier,
|
|
114
129
|
type TronAddress as TronAddress,
|
|
130
|
+
type TronHexAddress as TronHexAddress,
|
|
115
131
|
};
|
|
116
132
|
}
|
package/src/resources/swaps.ts
CHANGED
|
@@ -128,7 +128,8 @@ export interface SwapQuoteResponse {
|
|
|
128
128
|
output_token: string;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
* Destination chain CAIP-2 identifier for cross-chain swaps.
|
|
131
|
+
* Destination chain CAIP-2 identifier for cross-chain swaps. Only present for
|
|
132
|
+
* cross-chain swaps.
|
|
132
133
|
*/
|
|
133
134
|
destination_caip2?: string;
|
|
134
135
|
|
|
@@ -144,7 +145,7 @@ export interface SwapQuoteResponse {
|
|
|
144
145
|
estimated_gas?: WalletsAPI.Gas;
|
|
145
146
|
|
|
146
147
|
/**
|
|
147
|
-
* Quote expiry as Unix timestamp (seconds).
|
|
148
|
+
* Quote expiry as Unix timestamp (seconds). Only present for cross-chain quotes.
|
|
148
149
|
*/
|
|
149
150
|
expires_at?: number;
|
|
150
151
|
}
|