@privy-io/api-types 0.9.0 → 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 +46 -0
- package/client.d.mts +40 -43
- package/client.d.mts.map +1 -1
- package/client.d.ts +40 -43
- package/client.d.ts.map +1 -1
- package/client.js +28 -20
- package/client.js.map +1 -1
- package/client.mjs +29 -21
- 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 +931 -947
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +931 -947
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/embedded-wallets.d.mts +122 -122
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +122 -122
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/fiat.d.mts +110 -0
- package/resources/fiat.d.mts.map +1 -0
- package/resources/fiat.d.ts +110 -0
- package/resources/fiat.d.ts.map +1 -0
- package/resources/fiat.js +9 -0
- package/resources/fiat.js.map +1 -0
- package/resources/fiat.mjs +5 -0
- package/resources/fiat.mjs.map +1 -0
- package/resources/funding.d.mts +86 -86
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +86 -86
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +20 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +20 -18
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -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 +15 -146
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +15 -146
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +0 -92
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +0 -92
- package/resources/key-quorums.mjs.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 +261 -553
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +261 -553
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +0 -229
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +0 -229
- package/resources/policies.mjs.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 +80 -96
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +80 -96
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +0 -17
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +0 -17
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +480 -815
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +480 -815
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +0 -272
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +0 -272
- package/resources/users.mjs.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 +1592 -1580
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1592 -1580
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +45 -103
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +45 -103
- 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 +650 -618
- 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 +1271 -1315
- package/src/resources/embedded-wallets.ts +160 -160
- package/src/resources/fiat.ts +177 -0
- package/src/resources/funding.ts +130 -130
- package/src/resources/index.ts +551 -542
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +16 -218
- package/src/resources/kraken-embed.ts +14 -22
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +383 -848
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +5 -10
- package/src/resources/transactions.ts +116 -136
- package/src/resources/users.ts +693 -1160
- package/src/resources/wallet-actions.ts +392 -185
- package/src/resources/wallets/index.ts +160 -156
- package/src/resources/wallets/transactions.ts +18 -3
- package/src/resources/wallets/wallets.ts +2123 -2113
- 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
|
@@ -2,182 +2,71 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import * as PoliciesAPI from "./policies.js";
|
|
3
3
|
import * as SharedAPI from "./shared.js";
|
|
4
4
|
import * as WalletsAPI from "./wallets/wallets.js";
|
|
5
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
6
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
7
|
-
/**
|
|
8
|
-
* Operations related to policies
|
|
9
|
-
*/
|
|
10
5
|
export declare class Policies extends APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Create a new policy.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const policy = await client.policies.create({
|
|
17
|
-
* chain_type: 'ethereum',
|
|
18
|
-
* name: 'x',
|
|
19
|
-
* rules: [
|
|
20
|
-
* {
|
|
21
|
-
* action: 'ALLOW',
|
|
22
|
-
* conditions: [
|
|
23
|
-
* {
|
|
24
|
-
* field: 'to',
|
|
25
|
-
* field_source: 'ethereum_transaction',
|
|
26
|
-
* operator: 'eq',
|
|
27
|
-
* value: 'string',
|
|
28
|
-
* },
|
|
29
|
-
* ],
|
|
30
|
-
* method: 'eth_sendTransaction',
|
|
31
|
-
* name: 'x',
|
|
32
|
-
* },
|
|
33
|
-
* ],
|
|
34
|
-
* version: '1.0',
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
create(params: PolicyCreateParams, options?: RequestOptions): APIPromise<Policy>;
|
|
39
|
-
/**
|
|
40
|
-
* Create a new rule for a policy.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const policyRuleResponse =
|
|
45
|
-
* await client.policies._createRule(
|
|
46
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
47
|
-
* {
|
|
48
|
-
* action: 'ALLOW',
|
|
49
|
-
* conditions: [
|
|
50
|
-
* {
|
|
51
|
-
* field: 'to',
|
|
52
|
-
* field_source: 'ethereum_transaction',
|
|
53
|
-
* operator: 'eq',
|
|
54
|
-
* value: 'string',
|
|
55
|
-
* },
|
|
56
|
-
* ],
|
|
57
|
-
* method: 'eth_sendTransaction',
|
|
58
|
-
* name: 'x',
|
|
59
|
-
* },
|
|
60
|
-
* );
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
_createRule(policyID: string, params: PolicyCreateRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
64
|
-
/**
|
|
65
|
-
* Delete a policy by policy ID.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* const successResponse = await client.policies._delete(
|
|
70
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
71
|
-
* );
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
_delete(policyID: string, params?: PolicyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Delete a rule by policy ID and rule ID.
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* const successResponse = await client.policies._deleteRule(
|
|
81
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
82
|
-
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
83
|
-
* );
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
_deleteRule(ruleID: string, params: PolicyDeleteRuleParams, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
|
|
87
|
-
/**
|
|
88
|
-
* Update a policy by policy ID.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```ts
|
|
92
|
-
* const policy = await client.policies._update(
|
|
93
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
94
|
-
* );
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
_update(policyID: string, params: PolicyUpdateParams, options?: RequestOptions): APIPromise<Policy>;
|
|
98
|
-
/**
|
|
99
|
-
* Update a rule by policy ID and rule ID.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```ts
|
|
103
|
-
* const policyRuleResponse =
|
|
104
|
-
* await client.policies._updateRule(
|
|
105
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
106
|
-
* {
|
|
107
|
-
* policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
108
|
-
* action: 'ALLOW',
|
|
109
|
-
* conditions: [
|
|
110
|
-
* {
|
|
111
|
-
* field: 'to',
|
|
112
|
-
* field_source: 'ethereum_transaction',
|
|
113
|
-
* operator: 'eq',
|
|
114
|
-
* value: 'string',
|
|
115
|
-
* },
|
|
116
|
-
* ],
|
|
117
|
-
* method: 'eth_sendTransaction',
|
|
118
|
-
* name: 'x',
|
|
119
|
-
* },
|
|
120
|
-
* );
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
_updateRule(ruleID: string, params: PolicyUpdateRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
124
|
-
/**
|
|
125
|
-
* Get a policy by policy ID.
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```ts
|
|
129
|
-
* const policy = await client.policies.get(
|
|
130
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
131
|
-
* );
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
get(policyID: string, options?: RequestOptions): APIPromise<Policy>;
|
|
135
|
-
/**
|
|
136
|
-
* Get a rule by policy ID and rule ID.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```ts
|
|
140
|
-
* const policyRuleResponse = await client.policies.getRule(
|
|
141
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
142
|
-
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
143
|
-
* );
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
147
6
|
}
|
|
148
7
|
/**
|
|
149
|
-
*
|
|
8
|
+
* A parameter in a Solidity ABI function or event definition.
|
|
150
9
|
*/
|
|
151
|
-
export interface
|
|
152
|
-
|
|
10
|
+
export interface AbiParameter {
|
|
11
|
+
type: string;
|
|
12
|
+
components?: Array<{
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
indexed?: boolean;
|
|
16
|
+
internalType?: string;
|
|
17
|
+
name?: string;
|
|
153
18
|
}
|
|
154
19
|
/**
|
|
155
|
-
*
|
|
156
|
-
* set to take actions on.
|
|
20
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
157
21
|
*/
|
|
158
|
-
export
|
|
159
|
-
|
|
160
|
-
|
|
22
|
+
export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
|
|
23
|
+
export declare namespace AbiSchema {
|
|
24
|
+
interface AbiSchemaItem {
|
|
25
|
+
type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
|
|
26
|
+
anonymous?: boolean;
|
|
27
|
+
inputs?: Array<PoliciesAPI.AbiParameter>;
|
|
28
|
+
name?: string;
|
|
29
|
+
outputs?: Array<PoliciesAPI.AbiParameter>;
|
|
30
|
+
stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
|
|
31
|
+
}
|
|
161
32
|
}
|
|
162
33
|
/**
|
|
163
|
-
*
|
|
34
|
+
* Condition on the original wallet action API request body fields.
|
|
164
35
|
*/
|
|
165
|
-
export interface
|
|
36
|
+
export interface ActionRequestBodyCondition {
|
|
37
|
+
field: string;
|
|
38
|
+
field_source: 'action_request_body';
|
|
166
39
|
/**
|
|
167
|
-
*
|
|
40
|
+
* Operator to use for policy conditions.
|
|
168
41
|
*/
|
|
169
|
-
|
|
42
|
+
operator: ConditionOperator;
|
|
170
43
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
44
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
45
|
+
* array of strings.
|
|
173
46
|
*/
|
|
174
|
-
|
|
47
|
+
value: ConditionValue;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Condition referencing an aggregation value. The field must start with
|
|
51
|
+
* "aggregation." followed by the aggregation ID.
|
|
52
|
+
*/
|
|
53
|
+
export interface AggregationCondition {
|
|
54
|
+
field: string;
|
|
55
|
+
field_source: 'reference';
|
|
175
56
|
/**
|
|
176
|
-
*
|
|
177
|
-
* not specify an owner.
|
|
57
|
+
* Operator to use for policy conditions.
|
|
178
58
|
*/
|
|
179
|
-
|
|
59
|
+
operator: ConditionOperator;
|
|
60
|
+
/**
|
|
61
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
62
|
+
* array of strings.
|
|
63
|
+
*/
|
|
64
|
+
value: ConditionValue;
|
|
180
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Operator to use for policy conditions.
|
|
68
|
+
*/
|
|
69
|
+
export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
181
70
|
/**
|
|
182
71
|
* A condition set for grouping related condition values.
|
|
183
72
|
*/
|
|
@@ -201,34 +90,24 @@ export interface ConditionSet {
|
|
|
201
90
|
owner_id: SharedAPI.KeyQuorumID;
|
|
202
91
|
}
|
|
203
92
|
/**
|
|
204
|
-
*
|
|
93
|
+
* Headers required to authorize modifications to condition sets.
|
|
205
94
|
*/
|
|
206
|
-
export interface
|
|
95
|
+
export interface ConditionSetAuthorizationHeaders {
|
|
207
96
|
/**
|
|
208
|
-
*
|
|
97
|
+
* ID of your Privy app.
|
|
209
98
|
*/
|
|
210
|
-
|
|
99
|
+
'privy-app-id': string;
|
|
211
100
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
101
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
102
|
+
* should be comma separated.
|
|
214
103
|
*/
|
|
215
|
-
|
|
104
|
+
'privy-authorization-signature'?: string;
|
|
216
105
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
106
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
107
|
+
* deadline by which the request must be processed.
|
|
219
108
|
*/
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* A single value to add to a condition set.
|
|
224
|
-
*/
|
|
225
|
-
export interface ConditionSetItemValueInput {
|
|
226
|
-
value: string;
|
|
109
|
+
'privy-request-expiry'?: string;
|
|
227
110
|
}
|
|
228
|
-
/**
|
|
229
|
-
* Array of values to add to the condition set. Maximum 100 items per request.
|
|
230
|
-
*/
|
|
231
|
-
export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
|
|
232
111
|
/**
|
|
233
112
|
* A single item in a condition set.
|
|
234
113
|
*/
|
|
@@ -250,10 +129,28 @@ export interface ConditionSetItem {
|
|
|
250
129
|
*/
|
|
251
130
|
value: string;
|
|
252
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Unique IDs of the condition set and the condition set item within the condition
|
|
134
|
+
* set to take actions on.
|
|
135
|
+
*/
|
|
136
|
+
export interface ConditionSetItemRequestParams {
|
|
137
|
+
condition_set_id: string;
|
|
138
|
+
condition_set_item_id: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* A single value to add to a condition set.
|
|
142
|
+
*/
|
|
143
|
+
export interface ConditionSetItemValueInput {
|
|
144
|
+
value: string;
|
|
145
|
+
}
|
|
253
146
|
/**
|
|
254
147
|
* Array of condition set items.
|
|
255
148
|
*/
|
|
256
149
|
export type ConditionSetItems = Array<ConditionSetItem>;
|
|
150
|
+
/**
|
|
151
|
+
* Array of values to add to the condition set. Maximum 100 items per request.
|
|
152
|
+
*/
|
|
153
|
+
export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
|
|
257
154
|
/**
|
|
258
155
|
* Paginated list of condition set items.
|
|
259
156
|
*/
|
|
@@ -268,59 +165,41 @@ export interface ConditionSetItemsResponse {
|
|
|
268
165
|
next_cursor: string | null;
|
|
269
166
|
}
|
|
270
167
|
/**
|
|
271
|
-
*
|
|
272
|
-
*/
|
|
273
|
-
export type PolicyAction = 'ALLOW' | 'DENY';
|
|
274
|
-
/**
|
|
275
|
-
* A parameter in a Solidity ABI function or event definition.
|
|
168
|
+
* Request body for creating a condition set.
|
|
276
169
|
*/
|
|
277
|
-
export interface
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
170
|
+
export interface ConditionSetRequestBody {
|
|
171
|
+
/**
|
|
172
|
+
* Name to assign to condition set.
|
|
173
|
+
*/
|
|
174
|
+
name: string;
|
|
175
|
+
/**
|
|
176
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
177
|
+
* null to remove the current owner.
|
|
178
|
+
*/
|
|
179
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
180
|
+
/**
|
|
181
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
182
|
+
* not specify an owner.
|
|
183
|
+
*/
|
|
184
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
283
185
|
}
|
|
284
186
|
/**
|
|
285
|
-
*
|
|
187
|
+
* Unique ID of the condition set to take actions on.
|
|
286
188
|
*/
|
|
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
|
-
}
|
|
189
|
+
export interface ConditionSetRequestParams {
|
|
190
|
+
condition_set_id: string;
|
|
297
191
|
}
|
|
298
|
-
/**
|
|
299
|
-
* Operator to use for policy conditions.
|
|
300
|
-
*/
|
|
301
|
-
export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
302
192
|
/**
|
|
303
193
|
* Value to compare against in a policy condition. Can be a single string or an
|
|
304
194
|
* array of strings.
|
|
305
195
|
*/
|
|
306
196
|
export type ConditionValue = string | Array<string>;
|
|
307
197
|
/**
|
|
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.
|
|
198
|
+
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
320
199
|
*/
|
|
321
|
-
export interface
|
|
322
|
-
field: '
|
|
323
|
-
field_source: '
|
|
200
|
+
export interface Ethereum7702AuthorizationCondition {
|
|
201
|
+
field: 'contract';
|
|
202
|
+
field_source: 'ethereum_7702_authorization';
|
|
324
203
|
/**
|
|
325
204
|
* Operator to use for policy conditions.
|
|
326
205
|
*/
|
|
@@ -333,8 +212,8 @@ export interface EthereumTransactionCondition {
|
|
|
333
212
|
}
|
|
334
213
|
/**
|
|
335
214
|
* The decoded calldata in a smart contract interaction as the smart contract
|
|
336
|
-
* method's parameters. Note that
|
|
337
|
-
*
|
|
215
|
+
* method's parameters. Note that 'ethereum_calldata' conditions must contain an
|
|
216
|
+
* abi parameter with the JSON ABI of the smart contract.
|
|
338
217
|
*/
|
|
339
218
|
export interface EthereumCalldataCondition {
|
|
340
219
|
/**
|
|
@@ -353,6 +232,23 @@ export interface EthereumCalldataCondition {
|
|
|
353
232
|
*/
|
|
354
233
|
value: ConditionValue;
|
|
355
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
237
|
+
* eth_sendTransaction request.
|
|
238
|
+
*/
|
|
239
|
+
export interface EthereumTransactionCondition {
|
|
240
|
+
field: 'to' | 'value' | 'chain_id';
|
|
241
|
+
field_source: 'ethereum_transaction';
|
|
242
|
+
/**
|
|
243
|
+
* Operator to use for policy conditions.
|
|
244
|
+
*/
|
|
245
|
+
operator: ConditionOperator;
|
|
246
|
+
/**
|
|
247
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
248
|
+
* array of strings.
|
|
249
|
+
*/
|
|
250
|
+
value: ConditionValue;
|
|
251
|
+
}
|
|
356
252
|
/**
|
|
357
253
|
* Attributes from the signing domain that will verify the signature.
|
|
358
254
|
*/
|
|
@@ -397,77 +293,118 @@ export declare namespace EthereumTypedDataMessageCondition {
|
|
|
397
293
|
}
|
|
398
294
|
}
|
|
399
295
|
/**
|
|
400
|
-
*
|
|
296
|
+
* A policy for controlling wallet operations.
|
|
401
297
|
*/
|
|
402
|
-
export interface
|
|
403
|
-
field: 'contract';
|
|
404
|
-
field_source: 'ethereum_7702_authorization';
|
|
298
|
+
export interface Policy {
|
|
405
299
|
/**
|
|
406
|
-
*
|
|
300
|
+
* Unique ID of the created policy. This will be the primary identifier when using
|
|
301
|
+
* the policy in the future.
|
|
407
302
|
*/
|
|
408
|
-
|
|
303
|
+
id: string;
|
|
409
304
|
/**
|
|
410
|
-
*
|
|
411
|
-
* array of strings.
|
|
305
|
+
* The wallet chain types.
|
|
412
306
|
*/
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
417
|
-
*/
|
|
418
|
-
export interface SolanaProgramInstructionCondition {
|
|
419
|
-
field: 'programId';
|
|
420
|
-
field_source: 'solana_program_instruction';
|
|
307
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
421
308
|
/**
|
|
422
|
-
*
|
|
309
|
+
* Unix timestamp of when the policy was created in milliseconds.
|
|
423
310
|
*/
|
|
424
|
-
|
|
311
|
+
created_at: number;
|
|
425
312
|
/**
|
|
426
|
-
*
|
|
427
|
-
* array of strings.
|
|
313
|
+
* Name to assign to policy.
|
|
428
314
|
*/
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
433
|
-
* fields.
|
|
434
|
-
*/
|
|
435
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
436
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
437
|
-
field_source: 'solana_system_program_instruction';
|
|
315
|
+
name: string;
|
|
438
316
|
/**
|
|
439
|
-
*
|
|
317
|
+
* The key quorum ID of the owner of the policy.
|
|
440
318
|
*/
|
|
441
|
-
|
|
319
|
+
owner_id: string | null;
|
|
320
|
+
rules: Array<PolicyRuleResponse>;
|
|
442
321
|
/**
|
|
443
|
-
*
|
|
444
|
-
* array of strings.
|
|
322
|
+
* Version of the policy. Currently, 1.0 is the only version.
|
|
445
323
|
*/
|
|
446
|
-
|
|
324
|
+
version: '1.0';
|
|
447
325
|
}
|
|
448
326
|
/**
|
|
449
|
-
*
|
|
450
|
-
* instruction fields.
|
|
327
|
+
* The action to take when a policy rule matches.
|
|
451
328
|
*/
|
|
452
|
-
export
|
|
453
|
-
|
|
454
|
-
|
|
329
|
+
export type PolicyAction = 'ALLOW' | 'DENY';
|
|
330
|
+
/**
|
|
331
|
+
* Headers required to authorize modifications to policies.
|
|
332
|
+
*/
|
|
333
|
+
export interface PolicyAuthorizationHeaders {
|
|
455
334
|
/**
|
|
456
|
-
*
|
|
335
|
+
* ID of your Privy app.
|
|
457
336
|
*/
|
|
458
|
-
|
|
337
|
+
'privy-app-id': string;
|
|
459
338
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
339
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
340
|
+
* should be comma separated.
|
|
462
341
|
*/
|
|
463
|
-
|
|
342
|
+
'privy-authorization-signature'?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
345
|
+
* deadline by which the request must be processed.
|
|
346
|
+
*/
|
|
347
|
+
'privy-request-expiry'?: string;
|
|
464
348
|
}
|
|
465
349
|
/**
|
|
466
|
-
*
|
|
350
|
+
* A condition that must be true for the rule action to be applied.
|
|
467
351
|
*/
|
|
468
|
-
export
|
|
469
|
-
|
|
470
|
-
|
|
352
|
+
export type PolicyCondition = EthereumTransactionCondition | EthereumCalldataCondition | EthereumTypedDataDomainCondition | EthereumTypedDataMessageCondition | Ethereum7702AuthorizationCondition | SolanaProgramInstructionCondition | SolanaSystemProgramInstructionCondition | SolanaTokenProgramInstructionCondition | SystemCondition | TronTransactionCondition | TronCalldataCondition | SuiTransactionCommandCondition | SuiTransferObjectsCommandCondition | ActionRequestBodyCondition | AggregationCondition;
|
|
353
|
+
/**
|
|
354
|
+
* Method the rule applies to.
|
|
355
|
+
*/
|
|
356
|
+
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' | '*';
|
|
357
|
+
/**
|
|
358
|
+
* Unique ID of the policy to take actions on.
|
|
359
|
+
*/
|
|
360
|
+
export interface PolicyRequestBody {
|
|
361
|
+
policy_id: string;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* The rules that apply to each method the policy covers.
|
|
365
|
+
*/
|
|
366
|
+
export interface PolicyRuleRequestBody {
|
|
367
|
+
/**
|
|
368
|
+
* The action to take when a policy rule matches.
|
|
369
|
+
*/
|
|
370
|
+
action: PolicyAction;
|
|
371
|
+
conditions: Array<PolicyCondition>;
|
|
372
|
+
/**
|
|
373
|
+
* Method the rule applies to.
|
|
374
|
+
*/
|
|
375
|
+
method: PolicyMethod;
|
|
376
|
+
name: string;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Unique IDs of the policy and the rule within the policy to take actions on.
|
|
380
|
+
*/
|
|
381
|
+
export interface PolicyRuleRequestParams {
|
|
382
|
+
policy_id: string;
|
|
383
|
+
rule_id: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* A rule that defines the conditions and action to take if the conditions are
|
|
387
|
+
* true.
|
|
388
|
+
*/
|
|
389
|
+
export interface PolicyRuleResponse {
|
|
390
|
+
id: string;
|
|
391
|
+
/**
|
|
392
|
+
* The action to take when a policy rule matches.
|
|
393
|
+
*/
|
|
394
|
+
action: PolicyAction;
|
|
395
|
+
conditions: Array<PolicyCondition>;
|
|
396
|
+
/**
|
|
397
|
+
* Method the rule applies to.
|
|
398
|
+
*/
|
|
399
|
+
method: PolicyMethod;
|
|
400
|
+
name: string;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
404
|
+
*/
|
|
405
|
+
export interface SolanaProgramInstructionCondition {
|
|
406
|
+
field: 'programId';
|
|
407
|
+
field_source: 'solana_program_instruction';
|
|
471
408
|
/**
|
|
472
409
|
* Operator to use for policy conditions.
|
|
473
410
|
*/
|
|
@@ -479,15 +416,12 @@ export interface SystemCondition {
|
|
|
479
416
|
value: ConditionValue;
|
|
480
417
|
}
|
|
481
418
|
/**
|
|
482
|
-
*
|
|
483
|
-
*
|
|
419
|
+
* Solana System Program attributes, including more granular Transfer instruction
|
|
420
|
+
* fields.
|
|
484
421
|
*/
|
|
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';
|
|
422
|
+
export interface SolanaSystemProgramInstructionCondition {
|
|
423
|
+
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
424
|
+
field_source: 'solana_system_program_instruction';
|
|
491
425
|
/**
|
|
492
426
|
* Operator to use for policy conditions.
|
|
493
427
|
*/
|
|
@@ -499,15 +433,12 @@ export interface TronTransactionCondition {
|
|
|
499
433
|
value: ConditionValue;
|
|
500
434
|
}
|
|
501
435
|
/**
|
|
502
|
-
*
|
|
436
|
+
* Solana Token Program attributes, including more granular TransferChecked
|
|
437
|
+
* instruction fields.
|
|
503
438
|
*/
|
|
504
|
-
export interface
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
*/
|
|
508
|
-
abi: AbiSchema;
|
|
509
|
-
field: string;
|
|
510
|
-
field_source: 'tron_trigger_smart_contract_data';
|
|
439
|
+
export interface SolanaTokenProgramInstructionCondition {
|
|
440
|
+
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';
|
|
441
|
+
field_source: 'solana_token_program_instruction';
|
|
511
442
|
/**
|
|
512
443
|
* Operator to use for policy conditions.
|
|
513
444
|
*/
|
|
@@ -537,6 +468,11 @@ export interface SuiTransactionCommandCondition {
|
|
|
537
468
|
*/
|
|
538
469
|
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
539
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
473
|
+
* supported for command names.
|
|
474
|
+
*/
|
|
475
|
+
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
540
476
|
/**
|
|
541
477
|
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
542
478
|
*/
|
|
@@ -558,12 +494,16 @@ export interface SuiTransferObjectsCommandCondition {
|
|
|
558
494
|
value: ConditionValue;
|
|
559
495
|
}
|
|
560
496
|
/**
|
|
561
|
-
*
|
|
562
|
-
*
|
|
497
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
498
|
+
* and 'amount' are supported.
|
|
563
499
|
*/
|
|
564
|
-
export
|
|
565
|
-
|
|
566
|
-
|
|
500
|
+
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
501
|
+
/**
|
|
502
|
+
* System attributes, including current unix timestamp (in seconds).
|
|
503
|
+
*/
|
|
504
|
+
export interface SystemCondition {
|
|
505
|
+
field: 'current_unix_timestamp';
|
|
506
|
+
field_source: 'system';
|
|
567
507
|
/**
|
|
568
508
|
* Operator to use for policy conditions.
|
|
569
509
|
*/
|
|
@@ -575,297 +515,65 @@ export interface AggregationCondition {
|
|
|
575
515
|
value: ConditionValue;
|
|
576
516
|
}
|
|
577
517
|
/**
|
|
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.
|
|
518
|
+
* Decoded calldata from a TRON TriggerSmartContract interaction.
|
|
619
519
|
*/
|
|
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;
|
|
520
|
+
export interface TronCalldataCondition {
|
|
634
521
|
/**
|
|
635
|
-
*
|
|
522
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
636
523
|
*/
|
|
637
|
-
|
|
524
|
+
abi: AbiSchema;
|
|
525
|
+
field: string;
|
|
526
|
+
field_source: 'tron_trigger_smart_contract_data';
|
|
638
527
|
/**
|
|
639
|
-
*
|
|
528
|
+
* Operator to use for policy conditions.
|
|
640
529
|
*/
|
|
641
|
-
|
|
642
|
-
rules: Array<PolicyRuleResponse>;
|
|
530
|
+
operator: ConditionOperator;
|
|
643
531
|
/**
|
|
644
|
-
*
|
|
532
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
533
|
+
* array of strings.
|
|
645
534
|
*/
|
|
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;
|
|
535
|
+
value: ConditionValue;
|
|
660
536
|
}
|
|
661
537
|
/**
|
|
662
|
-
*
|
|
538
|
+
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
539
|
+
* transaction types.
|
|
663
540
|
*/
|
|
664
|
-
export interface
|
|
541
|
+
export interface TronTransactionCondition {
|
|
665
542
|
/**
|
|
666
|
-
*
|
|
543
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
667
544
|
*/
|
|
668
|
-
'
|
|
545
|
+
field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
|
|
546
|
+
field_source: 'tron_transaction';
|
|
669
547
|
/**
|
|
670
|
-
*
|
|
671
|
-
* should be comma separated.
|
|
548
|
+
* Operator to use for policy conditions.
|
|
672
549
|
*/
|
|
673
|
-
|
|
550
|
+
operator: ConditionOperator;
|
|
674
551
|
/**
|
|
675
|
-
*
|
|
676
|
-
*
|
|
552
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
553
|
+
* array of strings.
|
|
677
554
|
*/
|
|
678
|
-
|
|
555
|
+
value: ConditionValue;
|
|
679
556
|
}
|
|
680
557
|
/**
|
|
681
|
-
*
|
|
558
|
+
* Request body for updating a condition set.
|
|
682
559
|
*/
|
|
683
|
-
export interface
|
|
684
|
-
/**
|
|
685
|
-
* ID of your Privy app.
|
|
686
|
-
*/
|
|
687
|
-
'privy-app-id': string;
|
|
688
|
-
/**
|
|
689
|
-
* Request authorization signature. If multiple signatures are required, they
|
|
690
|
-
* should be comma separated.
|
|
691
|
-
*/
|
|
692
|
-
'privy-authorization-signature'?: string;
|
|
693
|
-
/**
|
|
694
|
-
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
695
|
-
* deadline by which the request must be processed.
|
|
696
|
-
*/
|
|
697
|
-
'privy-request-expiry'?: string;
|
|
698
|
-
}
|
|
699
|
-
export interface PolicyCreateParams {
|
|
700
|
-
/**
|
|
701
|
-
* Body param: The wallet chain types.
|
|
702
|
-
*/
|
|
703
|
-
chain_type: WalletsAPI.WalletChainType;
|
|
704
|
-
/**
|
|
705
|
-
* Body param: Name to assign to policy.
|
|
706
|
-
*/
|
|
707
|
-
name: string;
|
|
708
|
-
/**
|
|
709
|
-
* Body param
|
|
710
|
-
*/
|
|
711
|
-
rules: Array<PolicyCreateParams.Rule>;
|
|
712
|
-
/**
|
|
713
|
-
* Body param: Version of the policy. Currently, 1.0 is the only version.
|
|
714
|
-
*/
|
|
715
|
-
version: '1.0';
|
|
716
|
-
/**
|
|
717
|
-
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
718
|
-
* public key, or null to remove the current owner.
|
|
719
|
-
*/
|
|
720
|
-
owner?: SharedAPI.OwnerInput | null;
|
|
721
|
-
/**
|
|
722
|
-
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
723
|
-
* provide this, do not specify an owner.
|
|
724
|
-
*/
|
|
725
|
-
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
726
|
-
/**
|
|
727
|
-
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
728
|
-
* a 24-hour window.
|
|
729
|
-
*/
|
|
730
|
-
'privy-idempotency-key'?: string;
|
|
731
|
-
}
|
|
732
|
-
export declare namespace PolicyCreateParams {
|
|
733
|
-
interface Rule {
|
|
734
|
-
/**
|
|
735
|
-
* The action to take when a policy rule matches.
|
|
736
|
-
*/
|
|
737
|
-
action: PoliciesAPI.PolicyAction;
|
|
738
|
-
conditions: Array<PoliciesAPI.PolicyCondition>;
|
|
739
|
-
/**
|
|
740
|
-
* Method the rule applies to.
|
|
741
|
-
*/
|
|
742
|
-
method: PoliciesAPI.PolicyMethod;
|
|
743
|
-
name: string;
|
|
744
|
-
id?: string;
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
export interface PolicyCreateRuleParams {
|
|
748
|
-
/**
|
|
749
|
-
* Body param: The action to take when a policy rule matches.
|
|
750
|
-
*/
|
|
751
|
-
action: PolicyAction;
|
|
752
|
-
/**
|
|
753
|
-
* Body param
|
|
754
|
-
*/
|
|
755
|
-
conditions: Array<PolicyCondition>;
|
|
756
|
-
/**
|
|
757
|
-
* Body param: Method the rule applies to.
|
|
758
|
-
*/
|
|
759
|
-
method: PolicyMethod;
|
|
760
|
-
/**
|
|
761
|
-
* Body param
|
|
762
|
-
*/
|
|
763
|
-
name: string;
|
|
764
|
-
/**
|
|
765
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
766
|
-
* required, they should be comma separated.
|
|
767
|
-
*/
|
|
768
|
-
'privy-authorization-signature'?: string;
|
|
769
|
-
/**
|
|
770
|
-
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
771
|
-
* representing the deadline by which the request must be processed.
|
|
772
|
-
*/
|
|
773
|
-
'privy-request-expiry'?: string;
|
|
774
|
-
}
|
|
775
|
-
export interface PolicyDeleteParams {
|
|
776
|
-
/**
|
|
777
|
-
* Request authorization signature. If multiple signatures are required, they
|
|
778
|
-
* should be comma separated.
|
|
779
|
-
*/
|
|
780
|
-
'privy-authorization-signature'?: string;
|
|
781
|
-
/**
|
|
782
|
-
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
783
|
-
* deadline by which the request must be processed.
|
|
784
|
-
*/
|
|
785
|
-
'privy-request-expiry'?: string;
|
|
786
|
-
}
|
|
787
|
-
export interface PolicyDeleteRuleParams {
|
|
788
|
-
/**
|
|
789
|
-
* Path param
|
|
790
|
-
*/
|
|
791
|
-
policy_id: string;
|
|
792
|
-
/**
|
|
793
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
794
|
-
* required, they should be comma separated.
|
|
795
|
-
*/
|
|
796
|
-
'privy-authorization-signature'?: string;
|
|
797
|
-
/**
|
|
798
|
-
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
799
|
-
* representing the deadline by which the request must be processed.
|
|
800
|
-
*/
|
|
801
|
-
'privy-request-expiry'?: string;
|
|
802
|
-
}
|
|
803
|
-
export interface PolicyUpdateParams {
|
|
560
|
+
export interface UpdateConditionSetRequestBody {
|
|
804
561
|
/**
|
|
805
|
-
*
|
|
562
|
+
* Name to assign to condition set.
|
|
806
563
|
*/
|
|
807
564
|
name?: string;
|
|
808
565
|
/**
|
|
809
|
-
*
|
|
810
|
-
*
|
|
566
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
567
|
+
* null to remove the current owner.
|
|
811
568
|
*/
|
|
812
569
|
owner?: SharedAPI.OwnerInput | null;
|
|
813
570
|
/**
|
|
814
|
-
*
|
|
815
|
-
*
|
|
571
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
572
|
+
* not specify an owner.
|
|
816
573
|
*/
|
|
817
574
|
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
818
|
-
/**
|
|
819
|
-
* Body param
|
|
820
|
-
*/
|
|
821
|
-
rules?: Array<PolicyRuleRequestBody>;
|
|
822
|
-
/**
|
|
823
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
824
|
-
* required, they should be comma separated.
|
|
825
|
-
*/
|
|
826
|
-
'privy-authorization-signature'?: string;
|
|
827
|
-
/**
|
|
828
|
-
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
829
|
-
* representing the deadline by which the request must be processed.
|
|
830
|
-
*/
|
|
831
|
-
'privy-request-expiry'?: string;
|
|
832
|
-
}
|
|
833
|
-
export interface PolicyUpdateRuleParams {
|
|
834
|
-
/**
|
|
835
|
-
* Path param
|
|
836
|
-
*/
|
|
837
|
-
policy_id: string;
|
|
838
|
-
/**
|
|
839
|
-
* Body param: The action to take when a policy rule matches.
|
|
840
|
-
*/
|
|
841
|
-
action: PolicyAction;
|
|
842
|
-
/**
|
|
843
|
-
* Body param
|
|
844
|
-
*/
|
|
845
|
-
conditions: Array<PolicyCondition>;
|
|
846
|
-
/**
|
|
847
|
-
* Body param: Method the rule applies to.
|
|
848
|
-
*/
|
|
849
|
-
method: PolicyMethod;
|
|
850
|
-
/**
|
|
851
|
-
* Body param
|
|
852
|
-
*/
|
|
853
|
-
name: string;
|
|
854
|
-
/**
|
|
855
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
856
|
-
* required, they should be comma separated.
|
|
857
|
-
*/
|
|
858
|
-
'privy-authorization-signature'?: string;
|
|
859
|
-
/**
|
|
860
|
-
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
861
|
-
* representing the deadline by which the request must be processed.
|
|
862
|
-
*/
|
|
863
|
-
'privy-request-expiry'?: string;
|
|
864
|
-
}
|
|
865
|
-
export interface PolicyGetRuleParams {
|
|
866
|
-
policy_id: string;
|
|
867
575
|
}
|
|
868
576
|
export declare namespace Policies {
|
|
869
|
-
export { type
|
|
577
|
+
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, };
|
|
870
578
|
}
|
|
871
579
|
//# sourceMappingURL=policies.d.ts.map
|