@privy-io/api-types 0.6.1 → 0.7.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 +29 -0
- package/client.d.mts +31 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +31 -16
- package/client.d.ts.map +1 -1
- package/client.js +23 -7
- package/client.js.map +1 -1
- package/client.mjs +25 -9
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/accounts.d.mts +173 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +173 -4
- package/resources/accounts.d.ts.map +1 -1
- package/resources/apps.d.mts +59 -1
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +59 -1
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +144 -1
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +144 -1
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/index.d.mts +9 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +1979 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +1979 -31
- 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 +45 -2
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +45 -2
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +18 -1
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +18 -1
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +62 -0
- package/resources/kraken-embed.d.mts.map +1 -0
- package/resources/kraken-embed.d.ts +62 -0
- package/resources/kraken-embed.d.ts.map +1 -0
- package/resources/kraken-embed.js +9 -0
- package/resources/kraken-embed.js.map +1 -0
- package/resources/kraken-embed.mjs +5 -0
- package/resources/kraken-embed.mjs.map +1 -0
- package/resources/policies.d.mts +7 -0
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +7 -0
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +3 -0
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +3 -0
- package/resources/policies.mjs.map +1 -1
- package/resources/transactions.d.mts +3 -0
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +3 -0
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +3 -0
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +3 -0
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +3 -0
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +3 -0
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/wallets/balance.d.mts +7 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +7 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +3 -0
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +3 -0
- package/resources/wallets/balance.mjs.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +9 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +9 -6
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +3 -0
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs +3 -0
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +67 -10
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +67 -10
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +11 -5
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +11 -5
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +319 -283
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +319 -283
- 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 +26 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +26 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +166 -30
- package/src/resources/accounts.ts +206 -3
- package/src/resources/apps.ts +89 -1
- package/src/resources/client-auth.ts +202 -0
- package/src/resources/index.ts +79 -17
- package/src/resources/intents.ts +3305 -37
- package/src/resources/key-quorums.ts +50 -2
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +7 -0
- package/src/resources/transactions.ts +3 -0
- package/src/resources/users.ts +3 -0
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +3 -1
- package/src/resources/wallets/transactions.ts +10 -4
- package/src/resources/wallets/wallets.ts +99 -21
- package/src/resources/webhooks.ts +454 -438
- package/src/resources/yield.ts +39 -10
- 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
|
@@ -6,13 +6,23 @@ import { buildHeaders } from '../internal/headers';
|
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Operations related to key quorums
|
|
11
|
+
*/
|
|
9
12
|
export class KeyQuorums extends APIResource {
|
|
10
13
|
/**
|
|
11
14
|
* Create a new key quorum.
|
|
12
15
|
*
|
|
13
16
|
* @example
|
|
14
17
|
* ```ts
|
|
15
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
18
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
19
|
+
* authorization_threshold: 1,
|
|
20
|
+
* display_name: 'Prod key quorum',
|
|
21
|
+
* public_keys: [
|
|
22
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
23
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
24
|
+
* ],
|
|
25
|
+
* });
|
|
16
26
|
* ```
|
|
17
27
|
*/
|
|
18
28
|
create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum> {
|
|
@@ -55,6 +65,13 @@ export class KeyQuorums extends APIResource {
|
|
|
55
65
|
* ```ts
|
|
56
66
|
* const keyQuorum = await client.keyQuorums._update(
|
|
57
67
|
* 'key_quorum_id',
|
|
68
|
+
* {
|
|
69
|
+
* authorization_threshold: 1,
|
|
70
|
+
* display_name: 'Prod key quorum',
|
|
71
|
+
* public_keys: [
|
|
72
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
73
|
+
* ],
|
|
74
|
+
* },
|
|
58
75
|
* );
|
|
59
76
|
* ```
|
|
60
77
|
*/
|
|
@@ -93,6 +110,37 @@ export class KeyQuorums extends APIResource {
|
|
|
93
110
|
}
|
|
94
111
|
}
|
|
95
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Request input for creating or updating a key quorum.
|
|
115
|
+
*/
|
|
116
|
+
export interface KeyQuorumCreateParams {
|
|
117
|
+
/**
|
|
118
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
119
|
+
* or equal to total number of key quorum members.
|
|
120
|
+
*/
|
|
121
|
+
authorization_threshold?: number;
|
|
122
|
+
|
|
123
|
+
display_name?: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
127
|
+
* can only be nested 1 level deep.
|
|
128
|
+
*/
|
|
129
|
+
key_quorum_ids?: Array<string>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
133
|
+
* key quorum, in base64-encoded DER format.
|
|
134
|
+
*/
|
|
135
|
+
public_keys?: Array<string>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
139
|
+
* quorum.
|
|
140
|
+
*/
|
|
141
|
+
user_ids?: Array<string>;
|
|
142
|
+
}
|
|
143
|
+
|
|
96
144
|
/**
|
|
97
145
|
* A key quorum for authorizing wallet operations.
|
|
98
146
|
*/
|
|
@@ -203,9 +251,9 @@ export interface KeyQuorumUpdateParams {
|
|
|
203
251
|
|
|
204
252
|
export declare namespace KeyQuorums {
|
|
205
253
|
export {
|
|
254
|
+
type KeyQuorumCreateParams as KeyQuorumCreateParams,
|
|
206
255
|
type KeyQuorum as KeyQuorum,
|
|
207
256
|
type KeyQuorumDeleteResponse as KeyQuorumDeleteResponse,
|
|
208
|
-
type KeyQuorumCreateParams as KeyQuorumCreateParams,
|
|
209
257
|
type KeyQuorumDeleteParams as KeyQuorumDeleteParams,
|
|
210
258
|
type KeyQuorumUpdateParams as KeyQuorumUpdateParams,
|
|
211
259
|
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as KrakenEmbedAPI from './kraken-embed';
|
|
5
|
+
|
|
6
|
+
export class KrakenEmbed extends APIResource {}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Query parameters for getting a portfolio summary.
|
|
10
|
+
*/
|
|
11
|
+
export interface KrakenEmbedGetPortfolioSummaryQueryParams {
|
|
12
|
+
'include[current_day_pnl]'?: 'true' | 'false';
|
|
13
|
+
|
|
14
|
+
quote?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
19
|
+
* available balance.
|
|
20
|
+
*/
|
|
21
|
+
export interface KrakenEmbedCurrentDayPnl {
|
|
22
|
+
pnl: string;
|
|
23
|
+
|
|
24
|
+
since: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* High-level summary of a user's portfolio including total value, available
|
|
29
|
+
* balance, and unrealized P&L.
|
|
30
|
+
*/
|
|
31
|
+
export interface KrakenEmbedGetPortfolioSummaryResponse {
|
|
32
|
+
data: KrakenEmbedGetPortfolioSummaryResponse.Data;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export namespace KrakenEmbedGetPortfolioSummaryResponse {
|
|
36
|
+
export interface Data {
|
|
37
|
+
result: Data.Result | null;
|
|
38
|
+
|
|
39
|
+
error?: Array<unknown>;
|
|
40
|
+
|
|
41
|
+
errors?: Array<unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace Data {
|
|
45
|
+
export interface Result {
|
|
46
|
+
available_balance: string;
|
|
47
|
+
|
|
48
|
+
currency: string;
|
|
49
|
+
|
|
50
|
+
open_orders: string;
|
|
51
|
+
|
|
52
|
+
portfolio_value: string;
|
|
53
|
+
|
|
54
|
+
timestamp: string;
|
|
55
|
+
|
|
56
|
+
withheld_value: string;
|
|
57
|
+
|
|
58
|
+
cost_basis?: string | null;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
62
|
+
* available balance.
|
|
63
|
+
*/
|
|
64
|
+
current_day_pnl?: Result.CurrentDayPnl;
|
|
65
|
+
|
|
66
|
+
lots_upnl?: string | null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export namespace Result {
|
|
70
|
+
/**
|
|
71
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
72
|
+
* available balance.
|
|
73
|
+
*/
|
|
74
|
+
export interface CurrentDayPnl extends KrakenEmbedAPI.KrakenEmbedCurrentDayPnl {}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export declare namespace KrakenEmbed {
|
|
80
|
+
export {
|
|
81
|
+
type KrakenEmbedGetPortfolioSummaryQueryParams as KrakenEmbedGetPortfolioSummaryQueryParams,
|
|
82
|
+
type KrakenEmbedCurrentDayPnl as KrakenEmbedCurrentDayPnl,
|
|
83
|
+
type KrakenEmbedGetPortfolioSummaryResponse as KrakenEmbedGetPortfolioSummaryResponse,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -8,6 +8,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
9
|
import { path } from '../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Operations related to policies
|
|
13
|
+
*/
|
|
11
14
|
export class Policies extends APIResource {
|
|
12
15
|
/**
|
|
13
16
|
* Create a new policy.
|
|
@@ -776,6 +779,10 @@ export interface PolicyDeleteRuleResponse {
|
|
|
776
779
|
success: boolean;
|
|
777
780
|
}
|
|
778
781
|
|
|
782
|
+
/**
|
|
783
|
+
* A rule that defines the conditions and action to take if the conditions are
|
|
784
|
+
* true.
|
|
785
|
+
*/
|
|
779
786
|
export interface PolicyUpdateRuleResponse {
|
|
780
787
|
id: string;
|
|
781
788
|
|
|
@@ -5,6 +5,9 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
import { path } from '../internal/utils/path';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Operations related to transactions
|
|
10
|
+
*/
|
|
8
11
|
export class Transactions extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Get a transaction by transaction ID.
|
package/src/resources/users.ts
CHANGED
|
@@ -10,6 +10,9 @@ import { buildHeaders } from '../internal/headers';
|
|
|
10
10
|
import { RequestOptions } from '../internal/request-options';
|
|
11
11
|
import { path } from '../internal/utils/path';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Operations related to users
|
|
15
|
+
*/
|
|
13
16
|
export class Users extends APIResource {
|
|
14
17
|
/**
|
|
15
18
|
* Create a new user with linked accounts. Optionally pre-generate embedded wallets
|
|
@@ -5,6 +5,9 @@ import { APIPromise } from '../../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
6
|
import { path } from '../../internal/utils/path';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Operations related to wallets
|
|
10
|
+
*/
|
|
8
11
|
export class Balance extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Get the balance of a wallet by wallet ID.
|
|
@@ -31,12 +34,13 @@ export interface BalanceGetResponse {
|
|
|
31
34
|
|
|
32
35
|
export namespace BalanceGetResponse {
|
|
33
36
|
export interface Balance {
|
|
34
|
-
asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
|
|
37
|
+
asset: 'usdc' | 'usdc.e' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
|
|
35
38
|
|
|
36
39
|
chain:
|
|
37
40
|
| 'ethereum'
|
|
38
41
|
| 'arbitrum'
|
|
39
42
|
| 'base'
|
|
43
|
+
| 'tempo'
|
|
40
44
|
| 'linea'
|
|
41
45
|
| 'optimism'
|
|
42
46
|
| 'polygon'
|
|
@@ -69,18 +73,20 @@ export interface BalanceGetParams {
|
|
|
69
73
|
|
|
70
74
|
asset?:
|
|
71
75
|
| 'usdc'
|
|
76
|
+
| 'usdc.e'
|
|
72
77
|
| 'eth'
|
|
73
78
|
| 'pol'
|
|
74
79
|
| 'usdt'
|
|
75
80
|
| 'eurc'
|
|
76
81
|
| 'usdb'
|
|
77
82
|
| 'sol'
|
|
78
|
-
| Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
|
|
83
|
+
| Array<'usdc' | 'usdc.e' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
|
|
79
84
|
|
|
80
85
|
chain?:
|
|
81
86
|
| 'ethereum'
|
|
82
87
|
| 'arbitrum'
|
|
83
88
|
| 'base'
|
|
89
|
+
| 'tempo'
|
|
84
90
|
| 'linea'
|
|
85
91
|
| 'optimism'
|
|
86
92
|
| 'polygon'
|
|
@@ -98,6 +104,7 @@ export interface BalanceGetParams {
|
|
|
98
104
|
| 'ethereum'
|
|
99
105
|
| 'arbitrum'
|
|
100
106
|
| 'base'
|
|
107
|
+
| 'tempo'
|
|
101
108
|
| 'linea'
|
|
102
109
|
| 'optimism'
|
|
103
110
|
| 'polygon'
|
|
@@ -17,6 +17,7 @@ export {
|
|
|
17
17
|
type HpkeImportConfig,
|
|
18
18
|
type SuiCommandName,
|
|
19
19
|
type Wallet,
|
|
20
|
+
type WalletUpdateRequestBody,
|
|
20
21
|
type WalletBatchItemInput,
|
|
21
22
|
type WalletBatchCreateInput,
|
|
22
23
|
type WalletBatchCreateResult,
|
|
@@ -41,10 +42,11 @@ export {
|
|
|
41
42
|
type SolanaSignTransactionRpcResponse,
|
|
42
43
|
type SolanaSignAndSendTransactionRpcResponse,
|
|
43
44
|
type SolanaSignMessageRpcResponse,
|
|
45
|
+
type WalletRpcRequestBody,
|
|
46
|
+
type WalletRpcResponse,
|
|
44
47
|
type WalletExportResponse,
|
|
45
48
|
type WalletInitImportResponse,
|
|
46
49
|
type WalletRawSignResponse,
|
|
47
|
-
type WalletRpcResponse,
|
|
48
50
|
type WalletAuthenticateWithJwtResponse,
|
|
49
51
|
type WalletCreateWalletsWithRecoveryResponse,
|
|
50
52
|
type WalletCreateParams,
|
|
@@ -5,6 +5,9 @@ import { APIPromise } from '../../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
6
|
import { path } from '../../internal/utils/path';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Operations related to wallets
|
|
10
|
+
*/
|
|
8
11
|
export class Transactions extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Get incoming and outgoing transactions of a wallet by wallet ID.
|
|
@@ -61,12 +64,13 @@ export namespace TransactionGetResponse {
|
|
|
61
64
|
|
|
62
65
|
export namespace Transaction {
|
|
63
66
|
export interface UnionMember0 {
|
|
64
|
-
asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
|
|
67
|
+
asset: 'usdc' | 'usdc.e' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
|
|
65
68
|
|
|
66
69
|
chain:
|
|
67
70
|
| 'ethereum'
|
|
68
71
|
| 'arbitrum'
|
|
69
72
|
| 'base'
|
|
73
|
+
| 'tempo'
|
|
70
74
|
| 'linea'
|
|
71
75
|
| 'optimism'
|
|
72
76
|
| 'polygon'
|
|
@@ -99,12 +103,13 @@ export namespace TransactionGetResponse {
|
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
export interface UnionMember1 {
|
|
102
|
-
asset: 'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
|
|
106
|
+
asset: 'usdc' | 'usdc.e' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol' | (string & {});
|
|
103
107
|
|
|
104
108
|
chain:
|
|
105
109
|
| 'ethereum'
|
|
106
110
|
| 'arbitrum'
|
|
107
111
|
| 'base'
|
|
112
|
+
| 'tempo'
|
|
108
113
|
| 'linea'
|
|
109
114
|
| 'optimism'
|
|
110
115
|
| 'polygon'
|
|
@@ -141,15 +146,16 @@ export namespace TransactionGetResponse {
|
|
|
141
146
|
export interface TransactionGetParams {
|
|
142
147
|
asset:
|
|
143
148
|
| 'usdc'
|
|
149
|
+
| 'usdc.e'
|
|
144
150
|
| 'eth'
|
|
145
151
|
| 'pol'
|
|
146
152
|
| 'usdt'
|
|
147
153
|
| 'eurc'
|
|
148
154
|
| 'usdb'
|
|
149
155
|
| 'sol'
|
|
150
|
-
| Array<'usdc' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
|
|
156
|
+
| Array<'usdc' | 'usdc.e' | 'eth' | 'pol' | 'usdt' | 'eurc' | 'usdb' | 'sol'>;
|
|
151
157
|
|
|
152
|
-
chain: 'ethereum' | 'arbitrum' | 'base' | 'linea' | 'optimism' | 'polygon' | 'solana' | 'sepolia';
|
|
158
|
+
chain: 'ethereum' | 'arbitrum' | 'base' | 'tempo' | 'linea' | 'optimism' | 'polygon' | 'solana' | 'sepolia';
|
|
153
159
|
|
|
154
160
|
cursor?: string;
|
|
155
161
|
|
|
@@ -151,10 +151,14 @@ export class Wallets extends APIResource {
|
|
|
151
151
|
*
|
|
152
152
|
* @example
|
|
153
153
|
* ```ts
|
|
154
|
-
* const
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
154
|
+
* const walletRpcResponse = await client.wallets._rpc(
|
|
155
|
+
* 'wallet_id',
|
|
156
|
+
* {
|
|
157
|
+
* method: 'eth_sendTransaction',
|
|
158
|
+
* params: {},
|
|
159
|
+
* chain_type: 'ethereum',
|
|
160
|
+
* },
|
|
161
|
+
* );
|
|
158
162
|
* ```
|
|
159
163
|
*/
|
|
160
164
|
_rpc(walletID: string, params: WalletRpcParams, options?: RequestOptions): APIPromise<WalletRpcResponse> {
|
|
@@ -206,7 +210,9 @@ export class Wallets extends APIResource {
|
|
|
206
210
|
*
|
|
207
211
|
* @example
|
|
208
212
|
* ```ts
|
|
209
|
-
* const wallet = await client.wallets._update('wallet_id'
|
|
213
|
+
* const wallet = await client.wallets._update('wallet_id', {
|
|
214
|
+
* policy_ids: ['tb54eps4z44ed0jepousxi4n'],
|
|
215
|
+
* });
|
|
210
216
|
* ```
|
|
211
217
|
*/
|
|
212
218
|
_update(walletID: string, params: WalletUpdateParams, options?: RequestOptions): APIPromise<Wallet> {
|
|
@@ -533,6 +539,61 @@ export namespace Wallet {
|
|
|
533
539
|
}
|
|
534
540
|
}
|
|
535
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Request body for updating a wallet.
|
|
544
|
+
*/
|
|
545
|
+
export interface WalletUpdateRequestBody {
|
|
546
|
+
/**
|
|
547
|
+
* Additional signers for the wallet.
|
|
548
|
+
*/
|
|
549
|
+
additional_signers?: Array<WalletUpdateRequestBody.AdditionalSigner>;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* The owner of the resource. If you provide this, do not specify an owner_id as it
|
|
553
|
+
* will be generated automatically. When updating a wallet, you can set the owner
|
|
554
|
+
* to null to remove the owner.
|
|
555
|
+
*/
|
|
556
|
+
owner?: WalletUpdateRequestBody.PublicKeyOwner | WalletUpdateRequestBody.UserOwner | null;
|
|
557
|
+
|
|
558
|
+
owner_id?: string | null;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* New policy IDs to enforce on the wallet. Currently, only one policy is supported
|
|
562
|
+
* per wallet.
|
|
563
|
+
*/
|
|
564
|
+
policy_ids?: Array<string>;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export namespace WalletUpdateRequestBody {
|
|
568
|
+
export interface AdditionalSigner {
|
|
569
|
+
signer_id: string;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
573
|
+
* this will override the base policy IDs set on the wallet.
|
|
574
|
+
*/
|
|
575
|
+
override_policy_ids?: Array<string>;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
580
|
+
* If you provide this, do not specify an owner_id as it will be generated
|
|
581
|
+
* automatically.
|
|
582
|
+
*/
|
|
583
|
+
export interface PublicKeyOwner {
|
|
584
|
+
public_key: string;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The user ID of the owner of the resource. The user must already exist, and this
|
|
589
|
+
* value must start with "did:privy:". If you provide this, do not specify an
|
|
590
|
+
* owner_id as it will be generated automatically.
|
|
591
|
+
*/
|
|
592
|
+
export interface UserOwner {
|
|
593
|
+
user_id: string;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
536
597
|
/**
|
|
537
598
|
* Input for a single wallet in a batch creation request.
|
|
538
599
|
*/
|
|
@@ -1254,6 +1315,36 @@ export namespace SolanaSignMessageRpcResponse {
|
|
|
1254
1315
|
}
|
|
1255
1316
|
}
|
|
1256
1317
|
|
|
1318
|
+
/**
|
|
1319
|
+
* Request body for wallet RPC operations, discriminated by method.
|
|
1320
|
+
*/
|
|
1321
|
+
export type WalletRpcRequestBody =
|
|
1322
|
+
| EthereumPersonalSignRpcInput
|
|
1323
|
+
| EthereumSignTypedDataRpcInput
|
|
1324
|
+
| EthereumSignTransactionRpcInput
|
|
1325
|
+
| EthereumSignUserOperationRpcInput
|
|
1326
|
+
| EthereumSendTransactionRpcInput
|
|
1327
|
+
| EthereumSign7702AuthorizationRpcInput
|
|
1328
|
+
| EthereumSecp256k1SignRpcInput
|
|
1329
|
+
| SolanaSignMessageRpcInput
|
|
1330
|
+
| SolanaSignTransactionRpcInput
|
|
1331
|
+
| SolanaSignAndSendTransactionRpcInput;
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Response body for wallet RPC operations, discriminated by method.
|
|
1335
|
+
*/
|
|
1336
|
+
export type WalletRpcResponse =
|
|
1337
|
+
| EthereumPersonalSignRpcResponse
|
|
1338
|
+
| EthereumSignTypedDataRpcResponse
|
|
1339
|
+
| EthereumSignTransactionRpcResponse
|
|
1340
|
+
| EthereumSendTransactionRpcResponse
|
|
1341
|
+
| EthereumSignUserOperationRpcResponse
|
|
1342
|
+
| EthereumSign7702AuthorizationRpcResponse
|
|
1343
|
+
| EthereumSecp256k1SignRpcResponse
|
|
1344
|
+
| SolanaSignMessageRpcResponse
|
|
1345
|
+
| SolanaSignTransactionRpcResponse
|
|
1346
|
+
| SolanaSignAndSendTransactionRpcResponse;
|
|
1347
|
+
|
|
1257
1348
|
export interface WalletExportResponse {
|
|
1258
1349
|
/**
|
|
1259
1350
|
* The encrypted private key.
|
|
@@ -1298,21 +1389,6 @@ export namespace WalletRawSignResponse {
|
|
|
1298
1389
|
}
|
|
1299
1390
|
}
|
|
1300
1391
|
|
|
1301
|
-
/**
|
|
1302
|
-
* Response to the EVM `personal_sign` RPC.
|
|
1303
|
-
*/
|
|
1304
|
-
export type WalletRpcResponse =
|
|
1305
|
-
| EthereumPersonalSignRpcResponse
|
|
1306
|
-
| EthereumSignTypedDataRpcResponse
|
|
1307
|
-
| EthereumSignTransactionRpcResponse
|
|
1308
|
-
| EthereumSendTransactionRpcResponse
|
|
1309
|
-
| EthereumSignUserOperationRpcResponse
|
|
1310
|
-
| EthereumSign7702AuthorizationRpcResponse
|
|
1311
|
-
| EthereumSecp256k1SignRpcResponse
|
|
1312
|
-
| SolanaSignMessageRpcResponse
|
|
1313
|
-
| SolanaSignTransactionRpcResponse
|
|
1314
|
-
| SolanaSignAndSendTransactionRpcResponse;
|
|
1315
|
-
|
|
1316
1392
|
export type WalletAuthenticateWithJwtResponse =
|
|
1317
1393
|
| WalletAuthenticateWithJwtResponse.WithEncryption
|
|
1318
1394
|
| WalletAuthenticateWithJwtResponse.WithoutEncryption;
|
|
@@ -2444,6 +2520,7 @@ export declare namespace Wallets {
|
|
|
2444
2520
|
type HpkeImportConfig as HpkeImportConfig,
|
|
2445
2521
|
type SuiCommandName as SuiCommandName,
|
|
2446
2522
|
type Wallet as Wallet,
|
|
2523
|
+
type WalletUpdateRequestBody as WalletUpdateRequestBody,
|
|
2447
2524
|
type WalletBatchItemInput as WalletBatchItemInput,
|
|
2448
2525
|
type WalletBatchCreateInput as WalletBatchCreateInput,
|
|
2449
2526
|
type WalletBatchCreateResult as WalletBatchCreateResult,
|
|
@@ -2468,10 +2545,11 @@ export declare namespace Wallets {
|
|
|
2468
2545
|
type SolanaSignTransactionRpcResponse as SolanaSignTransactionRpcResponse,
|
|
2469
2546
|
type SolanaSignAndSendTransactionRpcResponse as SolanaSignAndSendTransactionRpcResponse,
|
|
2470
2547
|
type SolanaSignMessageRpcResponse as SolanaSignMessageRpcResponse,
|
|
2548
|
+
type WalletRpcRequestBody as WalletRpcRequestBody,
|
|
2549
|
+
type WalletRpcResponse as WalletRpcResponse,
|
|
2471
2550
|
type WalletExportResponse as WalletExportResponse,
|
|
2472
2551
|
type WalletInitImportResponse as WalletInitImportResponse,
|
|
2473
2552
|
type WalletRawSignResponse as WalletRawSignResponse,
|
|
2474
|
-
type WalletRpcResponse as WalletRpcResponse,
|
|
2475
2553
|
type WalletAuthenticateWithJwtResponse as WalletAuthenticateWithJwtResponse,
|
|
2476
2554
|
type WalletCreateWalletsWithRecoveryResponse as WalletCreateWalletsWithRecoveryResponse,
|
|
2477
2555
|
type WalletsCursor as WalletsCursor,
|