@privy-io/node 0.10.1 → 0.11.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 +50 -0
- package/client.d.mts +37 -19
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -19
- package/client.d.ts.map +1 -1
- package/client.js +29 -10
- package/client.js.map +1 -1
- package/client.mjs +30 -11
- package/client.mjs.map +1 -1
- package/index.d.mts +2 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +12 -1
- package/public-api/PrivyClient.d.mts +3 -0
- package/public-api/PrivyClient.d.mts.map +1 -1
- package/public-api/PrivyClient.d.ts +3 -0
- package/public-api/PrivyClient.d.ts.map +1 -1
- package/public-api/PrivyClient.js +5 -0
- package/public-api/PrivyClient.js.map +1 -1
- package/public-api/PrivyClient.mjs +5 -0
- package/public-api/PrivyClient.mjs.map +1 -1
- package/public-api/services/apps.d.mts +25 -0
- package/public-api/services/apps.d.mts.map +1 -0
- package/public-api/services/apps.d.ts +25 -0
- package/public-api/services/apps.d.ts.map +1 -0
- package/public-api/services/apps.js +56 -0
- package/public-api/services/apps.js.map +1 -0
- package/public-api/services/apps.mjs +52 -0
- package/public-api/services/apps.mjs.map +1 -0
- package/public-api/services/policies.d.mts +6 -2
- package/public-api/services/policies.d.mts.map +1 -1
- package/public-api/services/policies.d.ts +6 -2
- package/public-api/services/policies.d.ts.map +1 -1
- package/public-api/services/policies.js +6 -0
- package/public-api/services/policies.js.map +1 -1
- package/public-api/services/policies.mjs +6 -0
- package/public-api/services/policies.mjs.map +1 -1
- package/public-api/services/wallets.d.mts +5 -1
- package/public-api/services/wallets.d.mts.map +1 -1
- package/public-api/services/wallets.d.ts +5 -1
- package/public-api/services/wallets.d.ts.map +1 -1
- package/public-api/services/wallets.js +6 -0
- package/public-api/services/wallets.js.map +1 -1
- package/public-api/services/wallets.mjs +6 -0
- package/public-api/services/wallets.mjs.map +1 -1
- package/resources/accounts.d.mts +182 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +182 -4
- package/resources/accounts.d.ts.map +1 -1
- package/resources/apps/allowlist.d.mts +81 -0
- package/resources/apps/allowlist.d.mts.map +1 -0
- package/resources/apps/allowlist.d.ts +81 -0
- package/resources/apps/allowlist.d.ts.map +1 -0
- package/resources/apps/allowlist.js +56 -0
- package/resources/apps/allowlist.js.map +1 -0
- package/resources/apps/allowlist.mjs +52 -0
- package/resources/apps/allowlist.mjs.map +1 -0
- package/resources/apps/apps.d.mts +238 -0
- package/resources/apps/apps.d.mts.map +1 -0
- package/resources/apps/apps.d.ts +238 -0
- package/resources/apps/apps.d.ts.map +1 -0
- package/resources/apps/apps.js +44 -0
- package/resources/apps/apps.js.map +1 -0
- package/resources/apps/apps.mjs +39 -0
- package/resources/apps/apps.mjs.map +1 -0
- package/resources/apps/index.d.mts +3 -0
- package/resources/apps/index.d.mts.map +1 -0
- package/resources/apps/index.d.ts +3 -0
- package/resources/apps/index.d.ts.map +1 -0
- package/resources/apps/index.js +9 -0
- package/resources/apps/index.js.map +1 -0
- package/resources/apps/index.mjs +4 -0
- package/resources/apps/index.mjs.map +1 -0
- package/resources/apps.d.mts +1 -151
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +1 -151
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +2 -5
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +1 -3
- package/resources/apps.mjs.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 +11 -10
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -10
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- 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 +2815 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +2815 -31
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js +156 -0
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs +156 -0
- 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 +63 -56
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +63 -56
- 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 +50 -47
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +50 -47
- 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 +126 -69
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +126 -69
- 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 +196 -37
- package/src/index.ts +10 -0
- package/src/public-api/PrivyClient.ts +7 -0
- package/src/public-api/services/apps.ts +85 -0
- package/src/public-api/services/policies.ts +15 -1
- package/src/public-api/services/wallets.ts +14 -0
- package/src/resources/accounts.ts +217 -3
- package/src/resources/apps/allowlist.ts +126 -0
- package/src/resources/apps/apps.ts +391 -0
- package/src/resources/apps/index.ts +20 -0
- package/src/resources/apps.ts +1 -257
- package/src/resources/client-auth.ts +202 -0
- package/src/resources/index.ts +93 -21
- package/src/resources/intents.ts +4579 -40
- package/src/resources/key-quorums.ts +50 -2
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +83 -76
- package/src/resources/transactions.ts +3 -0
- package/src/resources/users.ts +66 -63
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +4 -2
- package/src/resources/wallets/transactions.ts +10 -4
- package/src/resources/wallets/wallets.ts +171 -93
- 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.
|
|
@@ -255,6 +258,81 @@ export class Policies extends APIResource {
|
|
|
255
258
|
}
|
|
256
259
|
}
|
|
257
260
|
|
|
261
|
+
/**
|
|
262
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
263
|
+
* supported for command names.
|
|
264
|
+
*/
|
|
265
|
+
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
269
|
+
* and 'amount' are supported.
|
|
270
|
+
*/
|
|
271
|
+
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
275
|
+
* transaction types.
|
|
276
|
+
*/
|
|
277
|
+
export interface TronTransactionCondition {
|
|
278
|
+
/**
|
|
279
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
280
|
+
*/
|
|
281
|
+
field:
|
|
282
|
+
| 'TransferContract.to_address'
|
|
283
|
+
| 'TransferContract.amount'
|
|
284
|
+
| 'TriggerSmartContract.contract_address'
|
|
285
|
+
| 'TriggerSmartContract.call_value'
|
|
286
|
+
| 'TriggerSmartContract.token_id'
|
|
287
|
+
| 'TriggerSmartContract.call_token_value';
|
|
288
|
+
|
|
289
|
+
field_source: 'tron_transaction';
|
|
290
|
+
|
|
291
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
292
|
+
|
|
293
|
+
value: string | Array<string>;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
298
|
+
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
299
|
+
* 'in' operators are supported.
|
|
300
|
+
*/
|
|
301
|
+
export interface SuiTransactionCommandCondition {
|
|
302
|
+
field: 'commandName';
|
|
303
|
+
|
|
304
|
+
field_source: 'sui_transaction_command';
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
308
|
+
* supported for command names.
|
|
309
|
+
*/
|
|
310
|
+
operator: SuiTransactionCommandOperator;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
314
|
+
* 'MergeCoins'
|
|
315
|
+
*/
|
|
316
|
+
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
321
|
+
*/
|
|
322
|
+
export interface SuiTransferObjectsCommandCondition {
|
|
323
|
+
/**
|
|
324
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
325
|
+
* and 'amount' are supported.
|
|
326
|
+
*/
|
|
327
|
+
field: SuiTransferObjectsCommandField;
|
|
328
|
+
|
|
329
|
+
field_source: 'sui_transfer_objects_command';
|
|
330
|
+
|
|
331
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
332
|
+
|
|
333
|
+
value: string | Array<string>;
|
|
334
|
+
}
|
|
335
|
+
|
|
258
336
|
/**
|
|
259
337
|
* A policy for controlling wallet operations.
|
|
260
338
|
*/
|
|
@@ -491,81 +569,6 @@ export namespace Policy {
|
|
|
491
569
|
}
|
|
492
570
|
}
|
|
493
571
|
|
|
494
|
-
/**
|
|
495
|
-
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
496
|
-
* supported for command names.
|
|
497
|
-
*/
|
|
498
|
-
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
499
|
-
|
|
500
|
-
/**
|
|
501
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
502
|
-
* and 'amount' are supported.
|
|
503
|
-
*/
|
|
504
|
-
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
508
|
-
* transaction types.
|
|
509
|
-
*/
|
|
510
|
-
export interface TronTransactionCondition {
|
|
511
|
-
/**
|
|
512
|
-
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
513
|
-
*/
|
|
514
|
-
field:
|
|
515
|
-
| 'TransferContract.to_address'
|
|
516
|
-
| 'TransferContract.amount'
|
|
517
|
-
| 'TriggerSmartContract.contract_address'
|
|
518
|
-
| 'TriggerSmartContract.call_value'
|
|
519
|
-
| 'TriggerSmartContract.token_id'
|
|
520
|
-
| 'TriggerSmartContract.call_token_value';
|
|
521
|
-
|
|
522
|
-
field_source: 'tron_transaction';
|
|
523
|
-
|
|
524
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
525
|
-
|
|
526
|
-
value: string | Array<string>;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
531
|
-
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
532
|
-
* 'in' operators are supported.
|
|
533
|
-
*/
|
|
534
|
-
export interface SuiTransactionCommandCondition {
|
|
535
|
-
field: 'commandName';
|
|
536
|
-
|
|
537
|
-
field_source: 'sui_transaction_command';
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
541
|
-
* supported for command names.
|
|
542
|
-
*/
|
|
543
|
-
operator: SuiTransactionCommandOperator;
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
547
|
-
* 'MergeCoins'
|
|
548
|
-
*/
|
|
549
|
-
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
554
|
-
*/
|
|
555
|
-
export interface SuiTransferObjectsCommandCondition {
|
|
556
|
-
/**
|
|
557
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
558
|
-
* and 'amount' are supported.
|
|
559
|
-
*/
|
|
560
|
-
field: SuiTransferObjectsCommandField;
|
|
561
|
-
|
|
562
|
-
field_source: 'sui_transfer_objects_command';
|
|
563
|
-
|
|
564
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
565
|
-
|
|
566
|
-
value: string | Array<string>;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
572
|
/**
|
|
570
573
|
* A rule that defines the conditions and action to take if the conditions are
|
|
571
574
|
* true.
|
|
@@ -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
|
|
|
@@ -2096,12 +2103,12 @@ export interface PolicyGetRuleParams {
|
|
|
2096
2103
|
|
|
2097
2104
|
export declare namespace Policies {
|
|
2098
2105
|
export {
|
|
2099
|
-
type Policy as Policy,
|
|
2100
2106
|
type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
|
|
2101
2107
|
type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
|
|
2102
2108
|
type TronTransactionCondition as TronTransactionCondition,
|
|
2103
2109
|
type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
|
|
2104
2110
|
type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
|
|
2111
|
+
type Policy as Policy,
|
|
2105
2112
|
type PolicyCreateRuleResponse as PolicyCreateRuleResponse,
|
|
2106
2113
|
type PolicyDeleteResponse as PolicyDeleteResponse,
|
|
2107
2114
|
type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse,
|
|
@@ -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
|
|
@@ -318,67 +321,6 @@ export class Users extends APIResource {
|
|
|
318
321
|
|
|
319
322
|
export type UsersCursor = Cursor<User>;
|
|
320
323
|
|
|
321
|
-
/**
|
|
322
|
-
* The authenticated user.
|
|
323
|
-
*/
|
|
324
|
-
export interface AuthenticatedUser {
|
|
325
|
-
token: string | null;
|
|
326
|
-
|
|
327
|
-
privy_access_token: string | null;
|
|
328
|
-
|
|
329
|
-
refresh_token: string | null;
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Instructs the client on how to handle tokens received
|
|
333
|
-
*/
|
|
334
|
-
session_update_action: 'set' | 'ignore' | 'clear';
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* A Privy user object.
|
|
338
|
-
*/
|
|
339
|
-
user: User;
|
|
340
|
-
|
|
341
|
-
identity_token?: string;
|
|
342
|
-
|
|
343
|
-
is_new_user?: boolean;
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* OAuth tokens associated with the user.
|
|
347
|
-
*/
|
|
348
|
-
oauth_tokens?: OAuthTokens;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* A Privy user object.
|
|
353
|
-
*/
|
|
354
|
-
export interface User {
|
|
355
|
-
id: string;
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Unix timestamp of when the user was created in milliseconds.
|
|
359
|
-
*/
|
|
360
|
-
created_at: number;
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Indicates if the user has accepted the terms of service.
|
|
364
|
-
*/
|
|
365
|
-
has_accepted_terms: boolean;
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Indicates if the user is a guest account user.
|
|
369
|
-
*/
|
|
370
|
-
is_guest: boolean;
|
|
371
|
-
|
|
372
|
-
linked_accounts: Array<LinkedAccount>;
|
|
373
|
-
|
|
374
|
-
mfa_methods: Array<LinkedMfaMethod>;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Custom metadata associated with the user.
|
|
378
|
-
*/
|
|
379
|
-
custom_metadata?: CustomMetadata;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
324
|
/**
|
|
383
325
|
* An email account linked to the user.
|
|
384
326
|
*/
|
|
@@ -1579,6 +1521,37 @@ export interface PasskeyMfaMethod {
|
|
|
1579
1521
|
*/
|
|
1580
1522
|
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
1581
1523
|
|
|
1524
|
+
/**
|
|
1525
|
+
* A Privy user object.
|
|
1526
|
+
*/
|
|
1527
|
+
export interface User {
|
|
1528
|
+
id: string;
|
|
1529
|
+
|
|
1530
|
+
/**
|
|
1531
|
+
* Unix timestamp of when the user was created in milliseconds.
|
|
1532
|
+
*/
|
|
1533
|
+
created_at: number;
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Indicates if the user has accepted the terms of service.
|
|
1537
|
+
*/
|
|
1538
|
+
has_accepted_terms: boolean;
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Indicates if the user is a guest account user.
|
|
1542
|
+
*/
|
|
1543
|
+
is_guest: boolean;
|
|
1544
|
+
|
|
1545
|
+
linked_accounts: Array<LinkedAccount>;
|
|
1546
|
+
|
|
1547
|
+
mfa_methods: Array<LinkedMfaMethod>;
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* Custom metadata associated with the user.
|
|
1551
|
+
*/
|
|
1552
|
+
custom_metadata?: CustomMetadata;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1582
1555
|
/**
|
|
1583
1556
|
* OAuth tokens associated with the user.
|
|
1584
1557
|
*/
|
|
@@ -1608,6 +1581,36 @@ export interface UserWithIdentityToken {
|
|
|
1608
1581
|
user: User;
|
|
1609
1582
|
}
|
|
1610
1583
|
|
|
1584
|
+
/**
|
|
1585
|
+
* The authenticated user.
|
|
1586
|
+
*/
|
|
1587
|
+
export interface AuthenticatedUser {
|
|
1588
|
+
token: string | null;
|
|
1589
|
+
|
|
1590
|
+
privy_access_token: string | null;
|
|
1591
|
+
|
|
1592
|
+
refresh_token: string | null;
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Instructs the client on how to handle tokens received
|
|
1596
|
+
*/
|
|
1597
|
+
session_update_action: 'set' | 'ignore' | 'clear';
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* A Privy user object.
|
|
1601
|
+
*/
|
|
1602
|
+
user: User;
|
|
1603
|
+
|
|
1604
|
+
identity_token?: string;
|
|
1605
|
+
|
|
1606
|
+
is_new_user?: boolean;
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* OAuth tokens associated with the user.
|
|
1610
|
+
*/
|
|
1611
|
+
oauth_tokens?: OAuthTokens;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1611
1614
|
export interface UserCreateParams {
|
|
1612
1615
|
linked_accounts: Array<LinkedAccountInput>;
|
|
1613
1616
|
|
|
@@ -1777,8 +1780,6 @@ export interface UserUnlinkLinkedAccountParams {
|
|
|
1777
1780
|
|
|
1778
1781
|
export declare namespace Users {
|
|
1779
1782
|
export {
|
|
1780
|
-
type AuthenticatedUser as AuthenticatedUser,
|
|
1781
|
-
type User as User,
|
|
1782
1783
|
type LinkedAccountEmail as LinkedAccountEmail,
|
|
1783
1784
|
type LinkedAccountPhone as LinkedAccountPhone,
|
|
1784
1785
|
type LinkedAccountBaseWallet as LinkedAccountBaseWallet,
|
|
@@ -1841,8 +1842,10 @@ export declare namespace Users {
|
|
|
1841
1842
|
type TotpMfaMethod as TotpMfaMethod,
|
|
1842
1843
|
type PasskeyMfaMethod as PasskeyMfaMethod,
|
|
1843
1844
|
type LinkedMfaMethod as LinkedMfaMethod,
|
|
1845
|
+
type User as User,
|
|
1844
1846
|
type OAuthTokens as OAuthTokens,
|
|
1845
1847
|
type UserWithIdentityToken as UserWithIdentityToken,
|
|
1848
|
+
type AuthenticatedUser as AuthenticatedUser,
|
|
1846
1849
|
type UsersCursor as UsersCursor,
|
|
1847
1850
|
type UserCreateParams as UserCreateParams,
|
|
1848
1851
|
type UserListParams as UserListParams,
|
|
@@ -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'
|
|
@@ -4,7 +4,6 @@ export { Balance, type BalanceGetResponse, type BalanceGetParams } from './balan
|
|
|
4
4
|
export { Transactions, type TransactionGetResponse, type TransactionGetParams } from './transactions';
|
|
5
5
|
export {
|
|
6
6
|
Wallets,
|
|
7
|
-
type Wallet,
|
|
8
7
|
type CurveSigningChainType,
|
|
9
8
|
type ExtendedChainType,
|
|
10
9
|
type FirstClassChainType,
|
|
@@ -16,6 +15,8 @@ export {
|
|
|
16
15
|
type CustodialWallet,
|
|
17
16
|
type HpkeImportConfig,
|
|
18
17
|
type SuiCommandName,
|
|
18
|
+
type Wallet,
|
|
19
|
+
type WalletUpdateRequestBody,
|
|
19
20
|
type WalletBatchItemInput,
|
|
20
21
|
type WalletBatchCreateInput,
|
|
21
22
|
type WalletBatchCreateResult,
|
|
@@ -40,10 +41,11 @@ export {
|
|
|
40
41
|
type SolanaSignTransactionRpcResponse,
|
|
41
42
|
type SolanaSignAndSendTransactionRpcResponse,
|
|
42
43
|
type SolanaSignMessageRpcResponse,
|
|
44
|
+
type WalletRpcRequestBody,
|
|
45
|
+
type WalletRpcResponse,
|
|
43
46
|
type WalletExportResponse,
|
|
44
47
|
type WalletInitImportResponse,
|
|
45
48
|
type WalletRawSignResponse,
|
|
46
|
-
type WalletRpcResponse,
|
|
47
49
|
type WalletAuthenticateWithJwtResponse,
|
|
48
50
|
type WalletCreateWalletsWithRecoveryResponse,
|
|
49
51
|
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
|
|