@privy-io/api-types 0.9.0 → 0.10.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 +38 -0
- package/client.d.mts +33 -30
- package/client.d.mts.map +1 -1
- package/client.d.ts +33 -30
- package/client.d.ts.map +1 -1
- package/client.js +22 -8
- package/client.js.map +1 -1
- package/client.mjs +23 -9
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +128 -86
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +128 -86
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +43 -43
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +43 -43
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +169 -135
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +169 -135
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +646 -644
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +646 -644
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +114 -114
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +114 -114
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/funding.d.mts +42 -42
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +42 -42
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +19 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +19 -18
- 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 +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +269 -265
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +269 -265
- package/resources/intents.d.ts.map +1 -1
- package/resources/key-quorums.d.mts +20 -20
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +20 -20
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/kraken-embed.d.mts +12 -20
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +12 -20
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/organizations.d.mts +65 -0
- package/resources/organizations.d.mts.map +1 -0
- package/resources/organizations.d.ts +65 -0
- package/resources/organizations.d.ts.map +1 -0
- package/resources/organizations.js +9 -0
- package/resources/organizations.js.map +1 -0
- package/resources/organizations.mjs +5 -0
- package/resources/organizations.mjs.map +1 -0
- package/resources/policies.d.mts +258 -240
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +258 -240
- package/resources/policies.d.ts.map +1 -1
- package/resources/shared.d.mts +28 -28
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +28 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +6 -9
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +6 -9
- package/resources/swaps.d.ts.map +1 -1
- package/resources/swaps.js.map +1 -1
- package/resources/swaps.mjs.map +1 -1
- package/resources/transactions.d.mts +53 -53
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +53 -53
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +468 -459
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +468 -459
- package/resources/users.d.ts.map +1 -1
- package/resources/wallet-actions.d.mts +302 -145
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +302 -145
- package/resources/wallet-actions.d.ts.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 +7 -2
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +7 -2
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/wallets.d.mts +1424 -1227
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1424 -1227
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +4 -1
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +4 -1
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +935 -877
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +935 -877
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/yield.d.mts +157 -157
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +157 -157
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +594 -516
- package/src/internal/types.ts +6 -8
- package/src/resources/accounts.ts +157 -103
- package/src/resources/aggregations.ts +55 -55
- package/src/resources/apps.ts +221 -178
- package/src/resources/client-auth.ts +887 -887
- package/src/resources/embedded-wallets.ts +150 -150
- package/src/resources/funding.ts +66 -66
- package/src/resources/index.ts +504 -475
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +23 -23
- package/src/resources/kraken-embed.ts +14 -22
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +379 -352
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +5 -10
- package/src/resources/transactions.ts +86 -86
- package/src/resources/users.ts +707 -696
- package/src/resources/wallet-actions.ts +392 -185
- package/src/resources/wallets/index.ts +157 -148
- package/src/resources/wallets/transactions.ts +18 -3
- package/src/resources/wallets/wallets.ts +1937 -1686
- package/src/resources/webhooks.ts +1172 -1100
- package/src/resources/yield.ts +188 -188
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/policies.d.ts
CHANGED
|
@@ -146,38 +146,68 @@ export declare class Policies extends APIResource {
|
|
|
146
146
|
getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* A parameter in a Solidity ABI function or event definition.
|
|
150
150
|
*/
|
|
151
|
-
export interface
|
|
152
|
-
|
|
151
|
+
export interface AbiParameter {
|
|
152
|
+
type: string;
|
|
153
|
+
components?: Array<{
|
|
154
|
+
[key: string]: unknown;
|
|
155
|
+
}>;
|
|
156
|
+
indexed?: boolean;
|
|
157
|
+
internalType?: string;
|
|
158
|
+
name?: string;
|
|
153
159
|
}
|
|
154
160
|
/**
|
|
155
|
-
*
|
|
156
|
-
* set to take actions on.
|
|
161
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
157
162
|
*/
|
|
158
|
-
export
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
|
|
164
|
+
export declare namespace AbiSchema {
|
|
165
|
+
interface AbiSchemaItem {
|
|
166
|
+
type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
|
|
167
|
+
anonymous?: boolean;
|
|
168
|
+
inputs?: Array<PoliciesAPI.AbiParameter>;
|
|
169
|
+
name?: string;
|
|
170
|
+
outputs?: Array<PoliciesAPI.AbiParameter>;
|
|
171
|
+
stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
|
|
172
|
+
}
|
|
161
173
|
}
|
|
162
174
|
/**
|
|
163
|
-
*
|
|
175
|
+
* Condition on the original wallet action API request body fields.
|
|
164
176
|
*/
|
|
165
|
-
export interface
|
|
177
|
+
export interface ActionRequestBodyCondition {
|
|
178
|
+
field: string;
|
|
179
|
+
field_source: 'action_request_body';
|
|
166
180
|
/**
|
|
167
|
-
*
|
|
181
|
+
* Operator to use for policy conditions.
|
|
168
182
|
*/
|
|
169
|
-
|
|
183
|
+
operator: ConditionOperator;
|
|
170
184
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
185
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
186
|
+
* array of strings.
|
|
173
187
|
*/
|
|
174
|
-
|
|
188
|
+
value: ConditionValue;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Condition referencing an aggregation value. The field must start with
|
|
192
|
+
* "aggregation." followed by the aggregation ID.
|
|
193
|
+
*/
|
|
194
|
+
export interface AggregationCondition {
|
|
195
|
+
field: string;
|
|
196
|
+
field_source: 'reference';
|
|
175
197
|
/**
|
|
176
|
-
*
|
|
177
|
-
* not specify an owner.
|
|
198
|
+
* Operator to use for policy conditions.
|
|
178
199
|
*/
|
|
179
|
-
|
|
200
|
+
operator: ConditionOperator;
|
|
201
|
+
/**
|
|
202
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
203
|
+
* array of strings.
|
|
204
|
+
*/
|
|
205
|
+
value: ConditionValue;
|
|
180
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Operator to use for policy conditions.
|
|
209
|
+
*/
|
|
210
|
+
export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
181
211
|
/**
|
|
182
212
|
* A condition set for grouping related condition values.
|
|
183
213
|
*/
|
|
@@ -201,34 +231,24 @@ export interface ConditionSet {
|
|
|
201
231
|
owner_id: SharedAPI.KeyQuorumID;
|
|
202
232
|
}
|
|
203
233
|
/**
|
|
204
|
-
*
|
|
234
|
+
* Headers required to authorize modifications to condition sets.
|
|
205
235
|
*/
|
|
206
|
-
export interface
|
|
236
|
+
export interface ConditionSetAuthorizationHeaders {
|
|
207
237
|
/**
|
|
208
|
-
*
|
|
238
|
+
* ID of your Privy app.
|
|
209
239
|
*/
|
|
210
|
-
|
|
240
|
+
'privy-app-id': string;
|
|
211
241
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
242
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
243
|
+
* should be comma separated.
|
|
214
244
|
*/
|
|
215
|
-
|
|
245
|
+
'privy-authorization-signature'?: string;
|
|
216
246
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
247
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
248
|
+
* deadline by which the request must be processed.
|
|
219
249
|
*/
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* A single value to add to a condition set.
|
|
224
|
-
*/
|
|
225
|
-
export interface ConditionSetItemValueInput {
|
|
226
|
-
value: string;
|
|
250
|
+
'privy-request-expiry'?: string;
|
|
227
251
|
}
|
|
228
|
-
/**
|
|
229
|
-
* Array of values to add to the condition set. Maximum 100 items per request.
|
|
230
|
-
*/
|
|
231
|
-
export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
|
|
232
252
|
/**
|
|
233
253
|
* A single item in a condition set.
|
|
234
254
|
*/
|
|
@@ -250,10 +270,28 @@ export interface ConditionSetItem {
|
|
|
250
270
|
*/
|
|
251
271
|
value: string;
|
|
252
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* Unique IDs of the condition set and the condition set item within the condition
|
|
275
|
+
* set to take actions on.
|
|
276
|
+
*/
|
|
277
|
+
export interface ConditionSetItemRequestParams {
|
|
278
|
+
condition_set_id: string;
|
|
279
|
+
condition_set_item_id: string;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* A single value to add to a condition set.
|
|
283
|
+
*/
|
|
284
|
+
export interface ConditionSetItemValueInput {
|
|
285
|
+
value: string;
|
|
286
|
+
}
|
|
253
287
|
/**
|
|
254
288
|
* Array of condition set items.
|
|
255
289
|
*/
|
|
256
290
|
export type ConditionSetItems = Array<ConditionSetItem>;
|
|
291
|
+
/**
|
|
292
|
+
* Array of values to add to the condition set. Maximum 100 items per request.
|
|
293
|
+
*/
|
|
294
|
+
export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
|
|
257
295
|
/**
|
|
258
296
|
* Paginated list of condition set items.
|
|
259
297
|
*/
|
|
@@ -268,59 +306,41 @@ export interface ConditionSetItemsResponse {
|
|
|
268
306
|
next_cursor: string | null;
|
|
269
307
|
}
|
|
270
308
|
/**
|
|
271
|
-
*
|
|
272
|
-
*/
|
|
273
|
-
export type PolicyAction = 'ALLOW' | 'DENY';
|
|
274
|
-
/**
|
|
275
|
-
* A parameter in a Solidity ABI function or event definition.
|
|
309
|
+
* Request body for creating a condition set.
|
|
276
310
|
*/
|
|
277
|
-
export interface
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
311
|
+
export interface ConditionSetRequestBody {
|
|
312
|
+
/**
|
|
313
|
+
* Name to assign to condition set.
|
|
314
|
+
*/
|
|
315
|
+
name: string;
|
|
316
|
+
/**
|
|
317
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
318
|
+
* null to remove the current owner.
|
|
319
|
+
*/
|
|
320
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
321
|
+
/**
|
|
322
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
323
|
+
* not specify an owner.
|
|
324
|
+
*/
|
|
325
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
283
326
|
}
|
|
284
327
|
/**
|
|
285
|
-
*
|
|
328
|
+
* Unique ID of the condition set to take actions on.
|
|
286
329
|
*/
|
|
287
|
-
export
|
|
288
|
-
|
|
289
|
-
interface AbiSchemaItem {
|
|
290
|
-
type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
|
|
291
|
-
anonymous?: boolean;
|
|
292
|
-
inputs?: Array<PoliciesAPI.AbiParameter>;
|
|
293
|
-
name?: string;
|
|
294
|
-
outputs?: Array<PoliciesAPI.AbiParameter>;
|
|
295
|
-
stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
|
|
296
|
-
}
|
|
330
|
+
export interface ConditionSetRequestParams {
|
|
331
|
+
condition_set_id: string;
|
|
297
332
|
}
|
|
298
|
-
/**
|
|
299
|
-
* Operator to use for policy conditions.
|
|
300
|
-
*/
|
|
301
|
-
export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
302
333
|
/**
|
|
303
334
|
* Value to compare against in a policy condition. Can be a single string or an
|
|
304
335
|
* array of strings.
|
|
305
336
|
*/
|
|
306
337
|
export type ConditionValue = string | Array<string>;
|
|
307
338
|
/**
|
|
308
|
-
*
|
|
309
|
-
* supported for command names.
|
|
310
|
-
*/
|
|
311
|
-
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
312
|
-
/**
|
|
313
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
314
|
-
* and 'amount' are supported.
|
|
315
|
-
*/
|
|
316
|
-
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
317
|
-
/**
|
|
318
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
319
|
-
* eth_sendTransaction request.
|
|
339
|
+
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
320
340
|
*/
|
|
321
|
-
export interface
|
|
322
|
-
field: '
|
|
323
|
-
field_source: '
|
|
341
|
+
export interface Ethereum7702AuthorizationCondition {
|
|
342
|
+
field: 'contract';
|
|
343
|
+
field_source: 'ethereum_7702_authorization';
|
|
324
344
|
/**
|
|
325
345
|
* Operator to use for policy conditions.
|
|
326
346
|
*/
|
|
@@ -333,8 +353,8 @@ export interface EthereumTransactionCondition {
|
|
|
333
353
|
}
|
|
334
354
|
/**
|
|
335
355
|
* The decoded calldata in a smart contract interaction as the smart contract
|
|
336
|
-
* method's parameters. Note that
|
|
337
|
-
*
|
|
356
|
+
* method's parameters. Note that 'ethereum_calldata' conditions must contain an
|
|
357
|
+
* abi parameter with the JSON ABI of the smart contract.
|
|
338
358
|
*/
|
|
339
359
|
export interface EthereumCalldataCondition {
|
|
340
360
|
/**
|
|
@@ -353,6 +373,23 @@ export interface EthereumCalldataCondition {
|
|
|
353
373
|
*/
|
|
354
374
|
value: ConditionValue;
|
|
355
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
378
|
+
* eth_sendTransaction request.
|
|
379
|
+
*/
|
|
380
|
+
export interface EthereumTransactionCondition {
|
|
381
|
+
field: 'to' | 'value' | 'chain_id';
|
|
382
|
+
field_source: 'ethereum_transaction';
|
|
383
|
+
/**
|
|
384
|
+
* Operator to use for policy conditions.
|
|
385
|
+
*/
|
|
386
|
+
operator: ConditionOperator;
|
|
387
|
+
/**
|
|
388
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
389
|
+
* array of strings.
|
|
390
|
+
*/
|
|
391
|
+
value: ConditionValue;
|
|
392
|
+
}
|
|
356
393
|
/**
|
|
357
394
|
* Attributes from the signing domain that will verify the signature.
|
|
358
395
|
*/
|
|
@@ -397,77 +434,118 @@ export declare namespace EthereumTypedDataMessageCondition {
|
|
|
397
434
|
}
|
|
398
435
|
}
|
|
399
436
|
/**
|
|
400
|
-
*
|
|
437
|
+
* A policy for controlling wallet operations.
|
|
401
438
|
*/
|
|
402
|
-
export interface
|
|
403
|
-
field: 'contract';
|
|
404
|
-
field_source: 'ethereum_7702_authorization';
|
|
439
|
+
export interface Policy {
|
|
405
440
|
/**
|
|
406
|
-
*
|
|
441
|
+
* Unique ID of the created policy. This will be the primary identifier when using
|
|
442
|
+
* the policy in the future.
|
|
407
443
|
*/
|
|
408
|
-
|
|
444
|
+
id: string;
|
|
409
445
|
/**
|
|
410
|
-
*
|
|
411
|
-
* array of strings.
|
|
446
|
+
* The wallet chain types.
|
|
412
447
|
*/
|
|
413
|
-
|
|
448
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
449
|
+
/**
|
|
450
|
+
* Unix timestamp of when the policy was created in milliseconds.
|
|
451
|
+
*/
|
|
452
|
+
created_at: number;
|
|
453
|
+
/**
|
|
454
|
+
* Name to assign to policy.
|
|
455
|
+
*/
|
|
456
|
+
name: string;
|
|
457
|
+
/**
|
|
458
|
+
* The key quorum ID of the owner of the policy.
|
|
459
|
+
*/
|
|
460
|
+
owner_id: string | null;
|
|
461
|
+
rules: Array<PolicyRuleResponse>;
|
|
462
|
+
/**
|
|
463
|
+
* Version of the policy. Currently, 1.0 is the only version.
|
|
464
|
+
*/
|
|
465
|
+
version: '1.0';
|
|
414
466
|
}
|
|
415
467
|
/**
|
|
416
|
-
*
|
|
468
|
+
* The action to take when a policy rule matches.
|
|
417
469
|
*/
|
|
418
|
-
export
|
|
419
|
-
|
|
420
|
-
|
|
470
|
+
export type PolicyAction = 'ALLOW' | 'DENY';
|
|
471
|
+
/**
|
|
472
|
+
* Headers required to authorize modifications to policies.
|
|
473
|
+
*/
|
|
474
|
+
export interface PolicyAuthorizationHeaders {
|
|
421
475
|
/**
|
|
422
|
-
*
|
|
476
|
+
* ID of your Privy app.
|
|
423
477
|
*/
|
|
424
|
-
|
|
478
|
+
'privy-app-id': string;
|
|
425
479
|
/**
|
|
426
|
-
*
|
|
427
|
-
*
|
|
480
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
481
|
+
* should be comma separated.
|
|
428
482
|
*/
|
|
429
|
-
|
|
483
|
+
'privy-authorization-signature'?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
486
|
+
* deadline by which the request must be processed.
|
|
487
|
+
*/
|
|
488
|
+
'privy-request-expiry'?: string;
|
|
430
489
|
}
|
|
431
490
|
/**
|
|
432
|
-
*
|
|
433
|
-
* fields.
|
|
491
|
+
* A condition that must be true for the rule action to be applied.
|
|
434
492
|
*/
|
|
435
|
-
export
|
|
436
|
-
|
|
437
|
-
|
|
493
|
+
export type PolicyCondition = EthereumTransactionCondition | EthereumCalldataCondition | EthereumTypedDataDomainCondition | EthereumTypedDataMessageCondition | Ethereum7702AuthorizationCondition | SolanaProgramInstructionCondition | SolanaSystemProgramInstructionCondition | SolanaTokenProgramInstructionCondition | SystemCondition | TronTransactionCondition | TronCalldataCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition | ActionRequestBodyCondition | AggregationCondition;
|
|
494
|
+
/**
|
|
495
|
+
* Method the rule applies to.
|
|
496
|
+
*/
|
|
497
|
+
export type PolicyMethod = 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'personal_sign' | 'wallet_sendCalls' | 'signTransaction' | 'signAndSendTransaction' | 'signMessage' | 'exportPrivateKey' | 'exportSeedPhrase' | 'signTransactionBytes' | 'earn_deposit' | 'earn_withdraw' | 'transfer' | '*';
|
|
498
|
+
/**
|
|
499
|
+
* Unique ID of the policy to take actions on.
|
|
500
|
+
*/
|
|
501
|
+
export interface PolicyRequestBody {
|
|
502
|
+
policy_id: string;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* The rules that apply to each method the policy covers.
|
|
506
|
+
*/
|
|
507
|
+
export interface PolicyRuleRequestBody {
|
|
438
508
|
/**
|
|
439
|
-
*
|
|
509
|
+
* The action to take when a policy rule matches.
|
|
440
510
|
*/
|
|
441
|
-
|
|
511
|
+
action: PolicyAction;
|
|
512
|
+
conditions: Array<PolicyCondition>;
|
|
442
513
|
/**
|
|
443
|
-
*
|
|
444
|
-
* array of strings.
|
|
514
|
+
* Method the rule applies to.
|
|
445
515
|
*/
|
|
446
|
-
|
|
516
|
+
method: PolicyMethod;
|
|
517
|
+
name: string;
|
|
447
518
|
}
|
|
448
519
|
/**
|
|
449
|
-
*
|
|
450
|
-
* instruction fields.
|
|
520
|
+
* Unique IDs of the policy and the rule within the policy to take actions on.
|
|
451
521
|
*/
|
|
452
|
-
export interface
|
|
453
|
-
|
|
454
|
-
|
|
522
|
+
export interface PolicyRuleRequestParams {
|
|
523
|
+
policy_id: string;
|
|
524
|
+
rule_id: string;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* A rule that defines the conditions and action to take if the conditions are
|
|
528
|
+
* true.
|
|
529
|
+
*/
|
|
530
|
+
export interface PolicyRuleResponse {
|
|
531
|
+
id: string;
|
|
455
532
|
/**
|
|
456
|
-
*
|
|
533
|
+
* The action to take when a policy rule matches.
|
|
457
534
|
*/
|
|
458
|
-
|
|
535
|
+
action: PolicyAction;
|
|
536
|
+
conditions: Array<PolicyCondition>;
|
|
459
537
|
/**
|
|
460
|
-
*
|
|
461
|
-
* array of strings.
|
|
538
|
+
* Method the rule applies to.
|
|
462
539
|
*/
|
|
463
|
-
|
|
540
|
+
method: PolicyMethod;
|
|
541
|
+
name: string;
|
|
464
542
|
}
|
|
465
543
|
/**
|
|
466
|
-
*
|
|
544
|
+
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
467
545
|
*/
|
|
468
|
-
export interface
|
|
469
|
-
field: '
|
|
470
|
-
field_source: '
|
|
546
|
+
export interface SolanaProgramInstructionCondition {
|
|
547
|
+
field: 'programId';
|
|
548
|
+
field_source: 'solana_program_instruction';
|
|
471
549
|
/**
|
|
472
550
|
* Operator to use for policy conditions.
|
|
473
551
|
*/
|
|
@@ -479,15 +557,12 @@ export interface SystemCondition {
|
|
|
479
557
|
value: ConditionValue;
|
|
480
558
|
}
|
|
481
559
|
/**
|
|
482
|
-
*
|
|
483
|
-
*
|
|
560
|
+
* Solana System Program attributes, including more granular Transfer instruction
|
|
561
|
+
* fields.
|
|
484
562
|
*/
|
|
485
|
-
export interface
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
*/
|
|
489
|
-
field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
|
|
490
|
-
field_source: 'tron_transaction';
|
|
563
|
+
export interface SolanaSystemProgramInstructionCondition {
|
|
564
|
+
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
565
|
+
field_source: 'solana_system_program_instruction';
|
|
491
566
|
/**
|
|
492
567
|
* Operator to use for policy conditions.
|
|
493
568
|
*/
|
|
@@ -499,15 +574,12 @@ export interface TronTransactionCondition {
|
|
|
499
574
|
value: ConditionValue;
|
|
500
575
|
}
|
|
501
576
|
/**
|
|
502
|
-
*
|
|
577
|
+
* Solana Token Program attributes, including more granular TransferChecked
|
|
578
|
+
* instruction fields.
|
|
503
579
|
*/
|
|
504
|
-
export interface
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
*/
|
|
508
|
-
abi: AbiSchema;
|
|
509
|
-
field: string;
|
|
510
|
-
field_source: 'tron_trigger_smart_contract_data';
|
|
580
|
+
export interface SolanaTokenProgramInstructionCondition {
|
|
581
|
+
field: 'instructionName' | 'Transfer.source' | 'Transfer.destination' | 'Transfer.authority' | 'Transfer.amount' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint' | 'Burn.account' | 'Burn.mint' | 'Burn.authority' | 'Burn.amount' | 'MintTo.mint' | 'MintTo.account' | 'MintTo.authority' | 'MintTo.amount' | 'CloseAccount.account' | 'CloseAccount.destination' | 'CloseAccount.authority' | 'InitializeAccount3.account' | 'InitializeAccount3.mint' | 'InitializeAccount3.owner';
|
|
582
|
+
field_source: 'solana_token_program_instruction';
|
|
511
583
|
/**
|
|
512
584
|
* Operator to use for policy conditions.
|
|
513
585
|
*/
|
|
@@ -537,6 +609,11 @@ export interface SuiTransactionCommandCondition {
|
|
|
537
609
|
*/
|
|
538
610
|
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
539
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
614
|
+
* supported for command names.
|
|
615
|
+
*/
|
|
616
|
+
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
540
617
|
/**
|
|
541
618
|
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
542
619
|
*/
|
|
@@ -558,12 +635,16 @@ export interface SuiTransferObjectsCommandCondition {
|
|
|
558
635
|
value: ConditionValue;
|
|
559
636
|
}
|
|
560
637
|
/**
|
|
561
|
-
*
|
|
562
|
-
*
|
|
638
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
639
|
+
* and 'amount' are supported.
|
|
563
640
|
*/
|
|
564
|
-
export
|
|
565
|
-
|
|
566
|
-
|
|
641
|
+
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
642
|
+
/**
|
|
643
|
+
* System attributes, including current unix timestamp (in seconds).
|
|
644
|
+
*/
|
|
645
|
+
export interface SystemCondition {
|
|
646
|
+
field: 'current_unix_timestamp';
|
|
647
|
+
field_source: 'system';
|
|
567
648
|
/**
|
|
568
649
|
* Operator to use for policy conditions.
|
|
569
650
|
*/
|
|
@@ -575,126 +656,63 @@ export interface AggregationCondition {
|
|
|
575
656
|
value: ConditionValue;
|
|
576
657
|
}
|
|
577
658
|
/**
|
|
578
|
-
*
|
|
579
|
-
*/
|
|
580
|
-
export type PolicyCondition = EthereumTransactionCondition | EthereumCalldataCondition | EthereumTypedDataDomainCondition | EthereumTypedDataMessageCondition | Ethereum7702AuthorizationCondition | SolanaProgramInstructionCondition | SolanaSystemProgramInstructionCondition | SolanaTokenProgramInstructionCondition | SystemCondition | TronTransactionCondition | TronCalldataCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition | AggregationCondition;
|
|
581
|
-
/**
|
|
582
|
-
* Method the rule applies to.
|
|
583
|
-
*/
|
|
584
|
-
export type PolicyMethod = 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'wallet_sendCalls' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'exportSeedPhrase' | 'signTransactionBytes' | '*';
|
|
585
|
-
/**
|
|
586
|
-
* The rules that apply to each method the policy covers.
|
|
587
|
-
*/
|
|
588
|
-
export interface PolicyRuleRequestBody {
|
|
589
|
-
/**
|
|
590
|
-
* The action to take when a policy rule matches.
|
|
591
|
-
*/
|
|
592
|
-
action: PolicyAction;
|
|
593
|
-
conditions: Array<PolicyCondition>;
|
|
594
|
-
/**
|
|
595
|
-
* Method the rule applies to.
|
|
596
|
-
*/
|
|
597
|
-
method: PolicyMethod;
|
|
598
|
-
name: string;
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* A rule that defines the conditions and action to take if the conditions are
|
|
602
|
-
* true.
|
|
603
|
-
*/
|
|
604
|
-
export interface PolicyRuleResponse {
|
|
605
|
-
id: string;
|
|
606
|
-
/**
|
|
607
|
-
* The action to take when a policy rule matches.
|
|
608
|
-
*/
|
|
609
|
-
action: PolicyAction;
|
|
610
|
-
conditions: Array<PolicyCondition>;
|
|
611
|
-
/**
|
|
612
|
-
* Method the rule applies to.
|
|
613
|
-
*/
|
|
614
|
-
method: PolicyMethod;
|
|
615
|
-
name: string;
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* A policy for controlling wallet operations.
|
|
659
|
+
* Decoded calldata from a TRON TriggerSmartContract interaction.
|
|
619
660
|
*/
|
|
620
|
-
export interface
|
|
621
|
-
/**
|
|
622
|
-
* Unique ID of the created policy. This will be the primary identifier when using
|
|
623
|
-
* the policy in the future.
|
|
624
|
-
*/
|
|
625
|
-
id: string;
|
|
626
|
-
/**
|
|
627
|
-
* The wallet chain types.
|
|
628
|
-
*/
|
|
629
|
-
chain_type: WalletsAPI.WalletChainType;
|
|
630
|
-
/**
|
|
631
|
-
* Unix timestamp of when the policy was created in milliseconds.
|
|
632
|
-
*/
|
|
633
|
-
created_at: number;
|
|
661
|
+
export interface TronCalldataCondition {
|
|
634
662
|
/**
|
|
635
|
-
*
|
|
663
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
636
664
|
*/
|
|
637
|
-
|
|
665
|
+
abi: AbiSchema;
|
|
666
|
+
field: string;
|
|
667
|
+
field_source: 'tron_trigger_smart_contract_data';
|
|
638
668
|
/**
|
|
639
|
-
*
|
|
669
|
+
* Operator to use for policy conditions.
|
|
640
670
|
*/
|
|
641
|
-
|
|
642
|
-
rules: Array<PolicyRuleResponse>;
|
|
671
|
+
operator: ConditionOperator;
|
|
643
672
|
/**
|
|
644
|
-
*
|
|
673
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
674
|
+
* array of strings.
|
|
645
675
|
*/
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
/**
|
|
649
|
-
* Unique ID of the policy to take actions on.
|
|
650
|
-
*/
|
|
651
|
-
export interface PolicyRequestBody {
|
|
652
|
-
policy_id: string;
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Unique IDs of the policy and the rule within the policy to take actions on.
|
|
656
|
-
*/
|
|
657
|
-
export interface PolicyRuleRequestParams {
|
|
658
|
-
policy_id: string;
|
|
659
|
-
rule_id: string;
|
|
676
|
+
value: ConditionValue;
|
|
660
677
|
}
|
|
661
678
|
/**
|
|
662
|
-
*
|
|
679
|
+
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
680
|
+
* transaction types.
|
|
663
681
|
*/
|
|
664
|
-
export interface
|
|
682
|
+
export interface TronTransactionCondition {
|
|
665
683
|
/**
|
|
666
|
-
*
|
|
684
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
667
685
|
*/
|
|
668
|
-
'
|
|
686
|
+
field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
|
|
687
|
+
field_source: 'tron_transaction';
|
|
669
688
|
/**
|
|
670
|
-
*
|
|
671
|
-
* should be comma separated.
|
|
689
|
+
* Operator to use for policy conditions.
|
|
672
690
|
*/
|
|
673
|
-
|
|
691
|
+
operator: ConditionOperator;
|
|
674
692
|
/**
|
|
675
|
-
*
|
|
676
|
-
*
|
|
693
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
694
|
+
* array of strings.
|
|
677
695
|
*/
|
|
678
|
-
|
|
696
|
+
value: ConditionValue;
|
|
679
697
|
}
|
|
680
698
|
/**
|
|
681
|
-
*
|
|
699
|
+
* Request body for updating a condition set.
|
|
682
700
|
*/
|
|
683
|
-
export interface
|
|
701
|
+
export interface UpdateConditionSetRequestBody {
|
|
684
702
|
/**
|
|
685
|
-
*
|
|
703
|
+
* Name to assign to condition set.
|
|
686
704
|
*/
|
|
687
|
-
|
|
705
|
+
name?: string;
|
|
688
706
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
707
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
708
|
+
* null to remove the current owner.
|
|
691
709
|
*/
|
|
692
|
-
|
|
710
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
693
711
|
/**
|
|
694
|
-
*
|
|
695
|
-
*
|
|
712
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
713
|
+
* not specify an owner.
|
|
696
714
|
*/
|
|
697
|
-
|
|
715
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
698
716
|
}
|
|
699
717
|
export interface PolicyCreateParams {
|
|
700
718
|
/**
|
|
@@ -866,6 +884,6 @@ export interface PolicyGetRuleParams {
|
|
|
866
884
|
policy_id: string;
|
|
867
885
|
}
|
|
868
886
|
export declare namespace Policies {
|
|
869
|
-
export { type
|
|
887
|
+
export { type AbiParameter as AbiParameter, type AbiSchema as AbiSchema, type ActionRequestBodyCondition as ActionRequestBodyCondition, type AggregationCondition as AggregationCondition, type ConditionOperator as ConditionOperator, type ConditionSet as ConditionSet, type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders, type ConditionSetItem as ConditionSetItem, type ConditionSetItemRequestParams as ConditionSetItemRequestParams, type ConditionSetItemValueInput as ConditionSetItemValueInput, type ConditionSetItems as ConditionSetItems, type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody, type ConditionSetItemsResponse as ConditionSetItemsResponse, type ConditionSetRequestBody as ConditionSetRequestBody, type ConditionSetRequestParams as ConditionSetRequestParams, type ConditionValue as ConditionValue, type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition, type EthereumCalldataCondition as EthereumCalldataCondition, type EthereumTransactionCondition as EthereumTransactionCondition, type EthereumTypedDataDomainCondition as EthereumTypedDataDomainCondition, type EthereumTypedDataMessageCondition as EthereumTypedDataMessageCondition, type Policy as Policy, type PolicyAction as PolicyAction, type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders, type PolicyCondition as PolicyCondition, type PolicyMethod as PolicyMethod, type PolicyRequestBody as PolicyRequestBody, type PolicyRuleRequestBody as PolicyRuleRequestBody, type PolicyRuleRequestParams as PolicyRuleRequestParams, type PolicyRuleResponse as PolicyRuleResponse, type SolanaProgramInstructionCondition as SolanaProgramInstructionCondition, type SolanaSystemProgramInstructionCondition as SolanaSystemProgramInstructionCondition, type SolanaTokenProgramInstructionCondition as SolanaTokenProgramInstructionCondition, type SuiTransactionCommandCondition as SuiTransactionCommandCondition, type SuiTransactionCommandOperator as SuiTransactionCommandOperator, type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition, type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField, type SystemCondition as SystemCondition, type TronCalldataCondition as TronCalldataCondition, type TronTransactionCondition as TronTransactionCondition, type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody, type PolicyCreateParams as PolicyCreateParams, type PolicyCreateRuleParams as PolicyCreateRuleParams, type PolicyDeleteParams as PolicyDeleteParams, type PolicyDeleteRuleParams as PolicyDeleteRuleParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyUpdateRuleParams as PolicyUpdateRuleParams, type PolicyGetRuleParams as PolicyGetRuleParams, };
|
|
870
888
|
}
|
|
871
889
|
//# sourceMappingURL=policies.d.ts.map
|