@privy-io/api-types 0.7.0 → 0.9.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 +62 -0
- package/client.d.mts +39 -30
- package/client.d.mts.map +1 -1
- package/client.d.ts +39 -30
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +79 -106
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +79 -106
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs.map +1 -1
- package/resources/aggregations.d.mts +18 -392
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +18 -392
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/aggregations.js.map +1 -1
- package/resources/aggregations.mjs.map +1 -1
- package/resources/apps.d.mts +154 -71
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +154 -71
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +796 -427
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +796 -427
- 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/cross-app.d.mts +14 -13
- package/resources/cross-app.d.mts.map +1 -1
- package/resources/cross-app.d.ts +14 -13
- package/resources/cross-app.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +167 -83
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +167 -83
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/embedded-wallets.js.map +1 -1
- package/resources/embedded-wallets.mjs.map +1 -1
- package/resources/funding.d.mts +150 -64
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +150 -64
- package/resources/funding.d.ts.map +1 -1
- package/resources/funding.js.map +1 -1
- package/resources/funding.mjs.map +1 -1
- package/resources/index.d.mts +18 -15
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +224 -1757
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +224 -1757
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +74 -26
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +74 -26
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +8 -8
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +8 -8
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +52 -1
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +52 -1
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/policies.d.mts +512 -992
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +512 -992
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +48 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +48 -41
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +59 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +59 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/swaps.d.mts +108 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +108 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +9 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +5 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transactions.d.mts +150 -98
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +150 -98
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +207 -240
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +207 -240
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +439 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +439 -0
- package/resources/wallet-actions.d.ts.map +1 -0
- package/resources/wallet-actions.js +9 -0
- package/resources/wallet-actions.js.map +1 -0
- package/resources/wallet-actions.mjs +5 -0
- package/resources/wallet-actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +2 -1
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +2 -1
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js.map +1 -1
- 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 +11 -30
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +11 -30
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2435 -923
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2435 -923
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +24 -11
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +24 -11
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +1296 -186
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1296 -186
- 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 +25 -1
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +25 -1
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +869 -92
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/accounts.ts +93 -120
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +211 -111
- package/src/resources/client-auth.ts +1361 -896
- package/src/resources/cross-app.ts +19 -15
- package/src/resources/embedded-wallets.ts +219 -123
- package/src/resources/funding.ts +263 -173
- package/src/resources/index.ts +447 -65
- package/src/resources/intents.ts +370 -3100
- package/src/resources/key-quorums.ts +100 -32
- package/src/resources/kraken-embed.ts +105 -0
- package/src/resources/policies.ts +648 -1494
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +169 -102
- package/src/resources/users.ts +676 -729
- package/src/resources/wallet-actions.ts +573 -0
- package/src/resources/wallets/balance.ts +2 -1
- package/src/resources/wallets/index.ts +156 -17
- package/src/resources/wallets/transactions.ts +12 -88
- package/src/resources/wallets/wallets.ts +3162 -1109
- package/src/resources/webhooks.ts +1609 -229
- package/src/resources/yield.ts +29 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/policies.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import * as PoliciesAPI from "./policies.js";
|
|
3
|
+
import * as SharedAPI from "./shared.js";
|
|
3
4
|
import * as WalletsAPI from "./wallets/wallets.js";
|
|
4
5
|
import { APIPromise } from "../core/api-promise.js";
|
|
5
6
|
import { RequestOptions } from "../internal/request-options.js";
|
|
@@ -40,48 +41,49 @@ export declare class Policies extends APIResource {
|
|
|
40
41
|
*
|
|
41
42
|
* @example
|
|
42
43
|
* ```ts
|
|
43
|
-
* const
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
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
|
+
* );
|
|
59
61
|
* ```
|
|
60
62
|
*/
|
|
61
|
-
_createRule(policyID: string, params: PolicyCreateRuleParams, options?: RequestOptions): APIPromise<
|
|
63
|
+
_createRule(policyID: string, params: PolicyCreateRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
62
64
|
/**
|
|
63
65
|
* Delete a policy by policy ID.
|
|
64
66
|
*
|
|
65
67
|
* @example
|
|
66
68
|
* ```ts
|
|
67
|
-
* const
|
|
69
|
+
* const successResponse = await client.policies._delete(
|
|
68
70
|
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
69
71
|
* );
|
|
70
72
|
* ```
|
|
71
73
|
*/
|
|
72
|
-
_delete(policyID: string, params?: PolicyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
74
|
+
_delete(policyID: string, params?: PolicyDeleteParams | null | undefined, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
|
|
73
75
|
/**
|
|
74
76
|
* Delete a rule by policy ID and rule ID.
|
|
75
77
|
*
|
|
76
78
|
* @example
|
|
77
79
|
* ```ts
|
|
78
|
-
* const
|
|
80
|
+
* const successResponse = await client.policies._deleteRule(
|
|
79
81
|
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
80
82
|
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
81
83
|
* );
|
|
82
84
|
* ```
|
|
83
85
|
*/
|
|
84
|
-
_deleteRule(ruleID: string, params: PolicyDeleteRuleParams, options?: RequestOptions): APIPromise<
|
|
86
|
+
_deleteRule(ruleID: string, params: PolicyDeleteRuleParams, options?: RequestOptions): APIPromise<SharedAPI.SuccessResponse>;
|
|
85
87
|
/**
|
|
86
88
|
* Update a policy by policy ID.
|
|
87
89
|
*
|
|
@@ -98,26 +100,27 @@ export declare class Policies extends APIResource {
|
|
|
98
100
|
*
|
|
99
101
|
* @example
|
|
100
102
|
* ```ts
|
|
101
|
-
* const
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
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
|
+
* );
|
|
118
121
|
* ```
|
|
119
122
|
*/
|
|
120
|
-
_updateRule(ruleID: string, params: PolicyUpdateRuleParams, options?: RequestOptions): APIPromise<
|
|
123
|
+
_updateRule(ruleID: string, params: PolicyUpdateRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
121
124
|
/**
|
|
122
125
|
* Get a policy by policy ID.
|
|
123
126
|
*
|
|
@@ -134,607 +137,570 @@ export declare class Policies extends APIResource {
|
|
|
134
137
|
*
|
|
135
138
|
* @example
|
|
136
139
|
* ```ts
|
|
137
|
-
* const
|
|
140
|
+
* const policyRuleResponse = await client.policies.getRule(
|
|
138
141
|
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
139
142
|
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
140
143
|
* );
|
|
141
144
|
* ```
|
|
142
145
|
*/
|
|
143
|
-
getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<
|
|
146
|
+
getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyRuleResponse>;
|
|
144
147
|
}
|
|
145
148
|
/**
|
|
146
|
-
*
|
|
147
|
-
* supported for command names.
|
|
149
|
+
* Unique ID of the condition set to take actions on.
|
|
148
150
|
*/
|
|
149
|
-
export
|
|
151
|
+
export interface ConditionSetRequestParams {
|
|
152
|
+
condition_set_id: string;
|
|
153
|
+
}
|
|
150
154
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
155
|
+
* Unique IDs of the condition set and the condition set item within the condition
|
|
156
|
+
* set to take actions on.
|
|
153
157
|
*/
|
|
154
|
-
export
|
|
158
|
+
export interface ConditionSetItemRequestParams {
|
|
159
|
+
condition_set_id: string;
|
|
160
|
+
condition_set_item_id: string;
|
|
161
|
+
}
|
|
155
162
|
/**
|
|
156
|
-
*
|
|
157
|
-
* transaction types.
|
|
163
|
+
* Request body for creating a condition set.
|
|
158
164
|
*/
|
|
159
|
-
export interface
|
|
165
|
+
export interface ConditionSetRequestBody {
|
|
160
166
|
/**
|
|
161
|
-
*
|
|
167
|
+
* Name to assign to condition set.
|
|
162
168
|
*/
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
name: string;
|
|
170
|
+
/**
|
|
171
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
172
|
+
* null to remove the current owner.
|
|
173
|
+
*/
|
|
174
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
175
|
+
/**
|
|
176
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
177
|
+
* not specify an owner.
|
|
178
|
+
*/
|
|
179
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
167
180
|
}
|
|
168
181
|
/**
|
|
169
|
-
*
|
|
170
|
-
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
171
|
-
* 'in' operators are supported.
|
|
182
|
+
* A condition set for grouping related condition values.
|
|
172
183
|
*/
|
|
173
|
-
export interface
|
|
174
|
-
field: 'commandName';
|
|
175
|
-
field_source: 'sui_transaction_command';
|
|
184
|
+
export interface ConditionSet {
|
|
176
185
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
186
|
+
* Unique ID of the created condition set. This will be the primary identifier when
|
|
187
|
+
* using the condition set in the future.
|
|
179
188
|
*/
|
|
180
|
-
|
|
189
|
+
id: string;
|
|
181
190
|
/**
|
|
182
|
-
*
|
|
183
|
-
* 'MergeCoins'
|
|
191
|
+
* Unix timestamp of when the condition set was created in milliseconds.
|
|
184
192
|
*/
|
|
185
|
-
|
|
193
|
+
created_at: number;
|
|
194
|
+
/**
|
|
195
|
+
* Name of the condition set.
|
|
196
|
+
*/
|
|
197
|
+
name: string;
|
|
198
|
+
/**
|
|
199
|
+
* A unique identifier for a key quorum.
|
|
200
|
+
*/
|
|
201
|
+
owner_id: SharedAPI.KeyQuorumID;
|
|
186
202
|
}
|
|
187
203
|
/**
|
|
188
|
-
*
|
|
204
|
+
* Request body for updating a condition set.
|
|
189
205
|
*/
|
|
190
|
-
export interface
|
|
206
|
+
export interface UpdateConditionSetRequestBody {
|
|
191
207
|
/**
|
|
192
|
-
*
|
|
193
|
-
* and 'amount' are supported.
|
|
208
|
+
* Name to assign to condition set.
|
|
194
209
|
*/
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
210
|
+
name?: string;
|
|
211
|
+
/**
|
|
212
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
213
|
+
* null to remove the current owner.
|
|
214
|
+
*/
|
|
215
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
216
|
+
/**
|
|
217
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
218
|
+
* not specify an owner.
|
|
219
|
+
*/
|
|
220
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
199
221
|
}
|
|
200
222
|
/**
|
|
201
|
-
* A
|
|
223
|
+
* A single value to add to a condition set.
|
|
202
224
|
*/
|
|
203
|
-
export interface
|
|
225
|
+
export interface ConditionSetItemValueInput {
|
|
226
|
+
value: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Array of values to add to the condition set. Maximum 100 items per request.
|
|
230
|
+
*/
|
|
231
|
+
export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
|
|
232
|
+
/**
|
|
233
|
+
* A single item in a condition set.
|
|
234
|
+
*/
|
|
235
|
+
export interface ConditionSetItem {
|
|
204
236
|
/**
|
|
205
|
-
* Unique ID of the created
|
|
206
|
-
* the policy in the future.
|
|
237
|
+
* Unique ID of the created condition set item.
|
|
207
238
|
*/
|
|
208
239
|
id: string;
|
|
209
240
|
/**
|
|
210
|
-
*
|
|
241
|
+
* Unique ID of the condition set this item belongs to.
|
|
211
242
|
*/
|
|
212
|
-
|
|
243
|
+
condition_set_id: string;
|
|
213
244
|
/**
|
|
214
|
-
* Unix timestamp of when the
|
|
245
|
+
* Unix timestamp of when the condition set item was created in milliseconds.
|
|
215
246
|
*/
|
|
216
247
|
created_at: number;
|
|
217
248
|
/**
|
|
218
|
-
*
|
|
249
|
+
* The value stored in this condition set item.
|
|
219
250
|
*/
|
|
220
|
-
|
|
251
|
+
value: string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Array of condition set items.
|
|
255
|
+
*/
|
|
256
|
+
export type ConditionSetItems = Array<ConditionSetItem>;
|
|
257
|
+
/**
|
|
258
|
+
* Paginated list of condition set items.
|
|
259
|
+
*/
|
|
260
|
+
export interface ConditionSetItemsResponse {
|
|
221
261
|
/**
|
|
222
|
-
*
|
|
262
|
+
* List of condition set items.
|
|
223
263
|
*/
|
|
224
|
-
|
|
225
|
-
rules: Array<Policy.Rule>;
|
|
264
|
+
items: Array<ConditionSetItem>;
|
|
226
265
|
/**
|
|
227
|
-
*
|
|
266
|
+
* Cursor for pagination. Null if there are no more items.
|
|
228
267
|
*/
|
|
229
|
-
|
|
268
|
+
next_cursor: string | null;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* The action to take when a policy rule matches.
|
|
272
|
+
*/
|
|
273
|
+
export type PolicyAction = 'ALLOW' | 'DENY';
|
|
274
|
+
/**
|
|
275
|
+
* A parameter in a Solidity ABI function or event definition.
|
|
276
|
+
*/
|
|
277
|
+
export interface AbiParameter {
|
|
278
|
+
type: string;
|
|
279
|
+
components?: Array<unknown>;
|
|
280
|
+
indexed?: boolean;
|
|
281
|
+
internalType?: string;
|
|
282
|
+
name?: string;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
286
|
+
*/
|
|
287
|
+
export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
|
|
288
|
+
export declare namespace AbiSchema {
|
|
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
|
+
}
|
|
230
297
|
}
|
|
231
|
-
|
|
298
|
+
/**
|
|
299
|
+
* Operator to use for policy conditions.
|
|
300
|
+
*/
|
|
301
|
+
export type ConditionOperator = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
302
|
+
/**
|
|
303
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
304
|
+
* array of strings.
|
|
305
|
+
*/
|
|
306
|
+
export type ConditionValue = string | Array<string>;
|
|
307
|
+
/**
|
|
308
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
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.
|
|
320
|
+
*/
|
|
321
|
+
export interface EthereumTransactionCondition {
|
|
322
|
+
field: 'to' | 'value' | 'chain_id';
|
|
323
|
+
field_source: 'ethereum_transaction';
|
|
232
324
|
/**
|
|
233
|
-
*
|
|
234
|
-
* true.
|
|
325
|
+
* Operator to use for policy conditions.
|
|
235
326
|
*/
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition | PoliciesAPI.TronTransactionCondition | PoliciesAPI.SuiTransactionCommandCondition | PoliciesAPI.SuiTransferObjectsCommandCondition>;
|
|
243
|
-
/**
|
|
244
|
-
* Method the rule applies to.
|
|
245
|
-
*/
|
|
246
|
-
method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
|
|
247
|
-
name: string;
|
|
248
|
-
}
|
|
249
|
-
namespace Rule {
|
|
250
|
-
/**
|
|
251
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
252
|
-
* eth_sendTransaction request.
|
|
253
|
-
*/
|
|
254
|
-
interface EthereumTransactionCondition {
|
|
255
|
-
field: 'to' | 'value' | 'chain_id';
|
|
256
|
-
field_source: 'ethereum_transaction';
|
|
257
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
258
|
-
value: string | Array<string>;
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
262
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
263
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
264
|
-
*/
|
|
265
|
-
interface EthereumCalldataCondition {
|
|
266
|
-
abi: unknown;
|
|
267
|
-
field: string;
|
|
268
|
-
field_source: 'ethereum_calldata';
|
|
269
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
270
|
-
value: string | Array<string>;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Attributes from the signing domain that will verify the signature.
|
|
274
|
-
*/
|
|
275
|
-
interface EthereumTypedDataDomainCondition {
|
|
276
|
-
field: 'chainId' | 'verifyingContract';
|
|
277
|
-
field_source: 'ethereum_typed_data_domain';
|
|
278
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
279
|
-
value: string | Array<string>;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
283
|
-
* EIP-712.
|
|
284
|
-
*/
|
|
285
|
-
interface EthereumTypedDataMessageCondition {
|
|
286
|
-
field: string;
|
|
287
|
-
field_source: 'ethereum_typed_data_message';
|
|
288
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
289
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
290
|
-
value: string | Array<string>;
|
|
291
|
-
}
|
|
292
|
-
namespace EthereumTypedDataMessageCondition {
|
|
293
|
-
interface TypedData {
|
|
294
|
-
primary_type: string;
|
|
295
|
-
types: {
|
|
296
|
-
[key: string]: Array<TypedData.Type>;
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
namespace TypedData {
|
|
300
|
-
interface Type {
|
|
301
|
-
name: string;
|
|
302
|
-
type: string;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
308
|
-
*/
|
|
309
|
-
interface Ethereum7702AuthorizationCondition {
|
|
310
|
-
field: 'contract';
|
|
311
|
-
field_source: 'ethereum_7702_authorization';
|
|
312
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
313
|
-
value: string | Array<string>;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
317
|
-
*/
|
|
318
|
-
interface SolanaProgramInstructionCondition {
|
|
319
|
-
field: 'programId';
|
|
320
|
-
field_source: 'solana_program_instruction';
|
|
321
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
322
|
-
value: string | Array<string>;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
326
|
-
* fields.
|
|
327
|
-
*/
|
|
328
|
-
interface SolanaSystemProgramInstructionCondition {
|
|
329
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
330
|
-
field_source: 'solana_system_program_instruction';
|
|
331
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
332
|
-
value: string | Array<string>;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
336
|
-
* instruction fields.
|
|
337
|
-
*/
|
|
338
|
-
interface SolanaTokenProgramInstructionCondition {
|
|
339
|
-
field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
|
|
340
|
-
field_source: 'solana_token_program_instruction';
|
|
341
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
342
|
-
value: string | Array<string>;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
346
|
-
*/
|
|
347
|
-
interface SystemCondition {
|
|
348
|
-
field: 'current_unix_timestamp';
|
|
349
|
-
field_source: 'system';
|
|
350
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
351
|
-
value: string | Array<string>;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
327
|
+
operator: ConditionOperator;
|
|
328
|
+
/**
|
|
329
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
330
|
+
* array of strings.
|
|
331
|
+
*/
|
|
332
|
+
value: ConditionValue;
|
|
354
333
|
}
|
|
355
334
|
/**
|
|
356
|
-
*
|
|
357
|
-
*
|
|
335
|
+
* The decoded calldata in a smart contract interaction as the smart contract
|
|
336
|
+
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
337
|
+
* an abi parameter with the JSON ABI of the smart contract.
|
|
358
338
|
*/
|
|
359
|
-
export interface
|
|
360
|
-
id: string;
|
|
339
|
+
export interface EthereumCalldataCondition {
|
|
361
340
|
/**
|
|
362
|
-
*
|
|
341
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
363
342
|
*/
|
|
364
|
-
|
|
365
|
-
|
|
343
|
+
abi: AbiSchema;
|
|
344
|
+
field: string;
|
|
345
|
+
field_source: 'ethereum_calldata';
|
|
366
346
|
/**
|
|
367
|
-
*
|
|
347
|
+
* Operator to use for policy conditions.
|
|
368
348
|
*/
|
|
369
|
-
|
|
370
|
-
|
|
349
|
+
operator: ConditionOperator;
|
|
350
|
+
/**
|
|
351
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
352
|
+
* array of strings.
|
|
353
|
+
*/
|
|
354
|
+
value: ConditionValue;
|
|
371
355
|
}
|
|
372
|
-
|
|
356
|
+
/**
|
|
357
|
+
* Attributes from the signing domain that will verify the signature.
|
|
358
|
+
*/
|
|
359
|
+
export interface EthereumTypedDataDomainCondition {
|
|
360
|
+
field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
|
|
361
|
+
field_source: 'ethereum_typed_data_domain';
|
|
373
362
|
/**
|
|
374
|
-
*
|
|
375
|
-
* eth_sendTransaction request.
|
|
363
|
+
* Operator to use for policy conditions.
|
|
376
364
|
*/
|
|
377
|
-
|
|
378
|
-
field: 'to' | 'value' | 'chain_id';
|
|
379
|
-
field_source: 'ethereum_transaction';
|
|
380
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
381
|
-
value: string | Array<string>;
|
|
382
|
-
}
|
|
365
|
+
operator: ConditionOperator;
|
|
383
366
|
/**
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
367
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
368
|
+
* array of strings.
|
|
387
369
|
*/
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
370
|
+
value: ConditionValue;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
374
|
+
* EIP-712.
|
|
375
|
+
*/
|
|
376
|
+
export interface EthereumTypedDataMessageCondition {
|
|
377
|
+
field: string;
|
|
378
|
+
field_source: 'ethereum_typed_data_message';
|
|
395
379
|
/**
|
|
396
|
-
*
|
|
380
|
+
* Operator to use for policy conditions.
|
|
397
381
|
*/
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
field_source: 'ethereum_typed_data_domain';
|
|
401
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
402
|
-
value: string | Array<string>;
|
|
403
|
-
}
|
|
382
|
+
operator: ConditionOperator;
|
|
383
|
+
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
404
384
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
385
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
386
|
+
* array of strings.
|
|
407
387
|
*/
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
primary_type: string;
|
|
418
|
-
types: {
|
|
419
|
-
[key: string]: Array<TypedData.Type>;
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
namespace TypedData {
|
|
423
|
-
interface Type {
|
|
424
|
-
name: string;
|
|
425
|
-
type: string;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
388
|
+
value: ConditionValue;
|
|
389
|
+
}
|
|
390
|
+
export declare namespace EthereumTypedDataMessageCondition {
|
|
391
|
+
interface TypedData {
|
|
392
|
+
primary_type: string;
|
|
393
|
+
/**
|
|
394
|
+
* The type definitions for EIP-712 typed data signing.
|
|
395
|
+
*/
|
|
396
|
+
types: WalletsAPI.TypedDataTypesInputParams;
|
|
428
397
|
}
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
401
|
+
*/
|
|
402
|
+
export interface Ethereum7702AuthorizationCondition {
|
|
403
|
+
field: 'contract';
|
|
404
|
+
field_source: 'ethereum_7702_authorization';
|
|
429
405
|
/**
|
|
430
|
-
*
|
|
406
|
+
* Operator to use for policy conditions.
|
|
431
407
|
*/
|
|
432
|
-
|
|
433
|
-
field: 'contract';
|
|
434
|
-
field_source: 'ethereum_7702_authorization';
|
|
435
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
436
|
-
value: string | Array<string>;
|
|
437
|
-
}
|
|
408
|
+
operator: ConditionOperator;
|
|
438
409
|
/**
|
|
439
|
-
*
|
|
410
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
411
|
+
* array of strings.
|
|
440
412
|
*/
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
413
|
+
value: ConditionValue;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
417
|
+
*/
|
|
418
|
+
export interface SolanaProgramInstructionCondition {
|
|
419
|
+
field: 'programId';
|
|
420
|
+
field_source: 'solana_program_instruction';
|
|
447
421
|
/**
|
|
448
|
-
*
|
|
449
|
-
* fields.
|
|
422
|
+
* Operator to use for policy conditions.
|
|
450
423
|
*/
|
|
451
|
-
|
|
452
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
453
|
-
field_source: 'solana_system_program_instruction';
|
|
454
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
455
|
-
value: string | Array<string>;
|
|
456
|
-
}
|
|
424
|
+
operator: ConditionOperator;
|
|
457
425
|
/**
|
|
458
|
-
*
|
|
459
|
-
*
|
|
426
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
427
|
+
* array of strings.
|
|
460
428
|
*/
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
429
|
+
value: ConditionValue;
|
|
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';
|
|
467
438
|
/**
|
|
468
|
-
*
|
|
439
|
+
* Operator to use for policy conditions.
|
|
469
440
|
*/
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
441
|
+
operator: ConditionOperator;
|
|
442
|
+
/**
|
|
443
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
444
|
+
* array of strings.
|
|
445
|
+
*/
|
|
446
|
+
value: ConditionValue;
|
|
476
447
|
}
|
|
477
|
-
|
|
448
|
+
/**
|
|
449
|
+
* Solana Token Program attributes, including more granular TransferChecked
|
|
450
|
+
* instruction fields.
|
|
451
|
+
*/
|
|
452
|
+
export interface SolanaTokenProgramInstructionCondition {
|
|
453
|
+
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';
|
|
454
|
+
field_source: 'solana_token_program_instruction';
|
|
478
455
|
/**
|
|
479
|
-
*
|
|
456
|
+
* Operator to use for policy conditions.
|
|
480
457
|
*/
|
|
481
|
-
|
|
458
|
+
operator: ConditionOperator;
|
|
459
|
+
/**
|
|
460
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
461
|
+
* array of strings.
|
|
462
|
+
*/
|
|
463
|
+
value: ConditionValue;
|
|
482
464
|
}
|
|
483
|
-
|
|
465
|
+
/**
|
|
466
|
+
* System attributes, including current unix timestamp (in seconds).
|
|
467
|
+
*/
|
|
468
|
+
export interface SystemCondition {
|
|
469
|
+
field: 'current_unix_timestamp';
|
|
470
|
+
field_source: 'system';
|
|
484
471
|
/**
|
|
485
|
-
*
|
|
472
|
+
* Operator to use for policy conditions.
|
|
486
473
|
*/
|
|
487
|
-
|
|
474
|
+
operator: ConditionOperator;
|
|
475
|
+
/**
|
|
476
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
477
|
+
* array of strings.
|
|
478
|
+
*/
|
|
479
|
+
value: ConditionValue;
|
|
488
480
|
}
|
|
489
481
|
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
482
|
+
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
483
|
+
* transaction types.
|
|
492
484
|
*/
|
|
493
|
-
export interface
|
|
494
|
-
id: string;
|
|
485
|
+
export interface TronTransactionCondition {
|
|
495
486
|
/**
|
|
496
|
-
*
|
|
487
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
497
488
|
*/
|
|
498
|
-
|
|
499
|
-
|
|
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';
|
|
500
491
|
/**
|
|
501
|
-
*
|
|
492
|
+
* Operator to use for policy conditions.
|
|
502
493
|
*/
|
|
503
|
-
|
|
504
|
-
|
|
494
|
+
operator: ConditionOperator;
|
|
495
|
+
/**
|
|
496
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
497
|
+
* array of strings.
|
|
498
|
+
*/
|
|
499
|
+
value: ConditionValue;
|
|
505
500
|
}
|
|
506
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Decoded calldata from a TRON TriggerSmartContract interaction.
|
|
503
|
+
*/
|
|
504
|
+
export interface TronCalldataCondition {
|
|
507
505
|
/**
|
|
508
|
-
*
|
|
509
|
-
* eth_sendTransaction request.
|
|
506
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
510
507
|
*/
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
515
|
-
value: string | Array<string>;
|
|
516
|
-
}
|
|
508
|
+
abi: AbiSchema;
|
|
509
|
+
field: string;
|
|
510
|
+
field_source: 'tron_trigger_smart_contract_data';
|
|
517
511
|
/**
|
|
518
|
-
*
|
|
519
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
520
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
512
|
+
* Operator to use for policy conditions.
|
|
521
513
|
*/
|
|
522
|
-
|
|
523
|
-
abi: unknown;
|
|
524
|
-
field: string;
|
|
525
|
-
field_source: 'ethereum_calldata';
|
|
526
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
527
|
-
value: string | Array<string>;
|
|
528
|
-
}
|
|
514
|
+
operator: ConditionOperator;
|
|
529
515
|
/**
|
|
530
|
-
*
|
|
516
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
517
|
+
* array of strings.
|
|
531
518
|
*/
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
519
|
+
value: ConditionValue;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
523
|
+
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
524
|
+
* 'in' operators are supported.
|
|
525
|
+
*/
|
|
526
|
+
export interface SuiTransactionCommandCondition {
|
|
527
|
+
field: 'commandName';
|
|
528
|
+
field_source: 'sui_transaction_command';
|
|
538
529
|
/**
|
|
539
|
-
*
|
|
540
|
-
*
|
|
530
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
531
|
+
* supported for command names.
|
|
541
532
|
*/
|
|
542
|
-
|
|
543
|
-
field: string;
|
|
544
|
-
field_source: 'ethereum_typed_data_message';
|
|
545
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
546
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
547
|
-
value: string | Array<string>;
|
|
548
|
-
}
|
|
549
|
-
namespace EthereumTypedDataMessageCondition {
|
|
550
|
-
interface TypedData {
|
|
551
|
-
primary_type: string;
|
|
552
|
-
types: {
|
|
553
|
-
[key: string]: Array<TypedData.Type>;
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
namespace TypedData {
|
|
557
|
-
interface Type {
|
|
558
|
-
name: string;
|
|
559
|
-
type: string;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
533
|
+
operator: SuiTransactionCommandOperator;
|
|
563
534
|
/**
|
|
564
|
-
*
|
|
535
|
+
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
536
|
+
* 'MergeCoins'
|
|
565
537
|
*/
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
538
|
+
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
542
|
+
*/
|
|
543
|
+
export interface SuiTransferObjectsCommandCondition {
|
|
572
544
|
/**
|
|
573
|
-
*
|
|
545
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
546
|
+
* and 'amount' are supported.
|
|
574
547
|
*/
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
field_source: 'solana_program_instruction';
|
|
578
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
579
|
-
value: string | Array<string>;
|
|
580
|
-
}
|
|
548
|
+
field: SuiTransferObjectsCommandField;
|
|
549
|
+
field_source: 'sui_transfer_objects_command';
|
|
581
550
|
/**
|
|
582
|
-
*
|
|
583
|
-
* fields.
|
|
551
|
+
* Operator to use for policy conditions.
|
|
584
552
|
*/
|
|
585
|
-
|
|
586
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
587
|
-
field_source: 'solana_system_program_instruction';
|
|
588
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
589
|
-
value: string | Array<string>;
|
|
590
|
-
}
|
|
553
|
+
operator: ConditionOperator;
|
|
591
554
|
/**
|
|
592
|
-
*
|
|
593
|
-
*
|
|
555
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
556
|
+
* array of strings.
|
|
594
557
|
*/
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
558
|
+
value: ConditionValue;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Condition referencing an aggregation value. The field must start with
|
|
562
|
+
* "aggregation." followed by the aggregation ID.
|
|
563
|
+
*/
|
|
564
|
+
export interface AggregationCondition {
|
|
565
|
+
field: string;
|
|
566
|
+
field_source: 'reference';
|
|
601
567
|
/**
|
|
602
|
-
*
|
|
568
|
+
* Operator to use for policy conditions.
|
|
603
569
|
*/
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
570
|
+
operator: ConditionOperator;
|
|
571
|
+
/**
|
|
572
|
+
* Value to compare against in a policy condition. Can be a single string or an
|
|
573
|
+
* array of strings.
|
|
574
|
+
*/
|
|
575
|
+
value: ConditionValue;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* A condition that must be true for the rule action to be applied.
|
|
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;
|
|
610
599
|
}
|
|
611
600
|
/**
|
|
612
601
|
* A rule that defines the conditions and action to take if the conditions are
|
|
613
602
|
* true.
|
|
614
603
|
*/
|
|
615
|
-
export interface
|
|
604
|
+
export interface PolicyRuleResponse {
|
|
616
605
|
id: string;
|
|
617
606
|
/**
|
|
618
|
-
*
|
|
607
|
+
* The action to take when a policy rule matches.
|
|
619
608
|
*/
|
|
620
|
-
action:
|
|
621
|
-
conditions: Array<
|
|
609
|
+
action: PolicyAction;
|
|
610
|
+
conditions: Array<PolicyCondition>;
|
|
622
611
|
/**
|
|
623
612
|
* Method the rule applies to.
|
|
624
613
|
*/
|
|
625
|
-
method:
|
|
614
|
+
method: PolicyMethod;
|
|
626
615
|
name: string;
|
|
627
616
|
}
|
|
628
|
-
|
|
617
|
+
/**
|
|
618
|
+
* A policy for controlling wallet operations.
|
|
619
|
+
*/
|
|
620
|
+
export interface Policy {
|
|
629
621
|
/**
|
|
630
|
-
*
|
|
631
|
-
*
|
|
622
|
+
* Unique ID of the created policy. This will be the primary identifier when using
|
|
623
|
+
* the policy in the future.
|
|
632
624
|
*/
|
|
633
|
-
|
|
634
|
-
field: 'to' | 'value' | 'chain_id';
|
|
635
|
-
field_source: 'ethereum_transaction';
|
|
636
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
637
|
-
value: string | Array<string>;
|
|
638
|
-
}
|
|
625
|
+
id: string;
|
|
639
626
|
/**
|
|
640
|
-
* The
|
|
641
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
642
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
627
|
+
* The wallet chain types.
|
|
643
628
|
*/
|
|
644
|
-
|
|
645
|
-
abi: unknown;
|
|
646
|
-
field: string;
|
|
647
|
-
field_source: 'ethereum_calldata';
|
|
648
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
649
|
-
value: string | Array<string>;
|
|
650
|
-
}
|
|
629
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
651
630
|
/**
|
|
652
|
-
*
|
|
631
|
+
* Unix timestamp of when the policy was created in milliseconds.
|
|
653
632
|
*/
|
|
654
|
-
|
|
655
|
-
field: 'chainId' | 'verifyingContract';
|
|
656
|
-
field_source: 'ethereum_typed_data_domain';
|
|
657
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
658
|
-
value: string | Array<string>;
|
|
659
|
-
}
|
|
633
|
+
created_at: number;
|
|
660
634
|
/**
|
|
661
|
-
*
|
|
662
|
-
* EIP-712.
|
|
635
|
+
* Name to assign to policy.
|
|
663
636
|
*/
|
|
664
|
-
|
|
665
|
-
field: string;
|
|
666
|
-
field_source: 'ethereum_typed_data_message';
|
|
667
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
668
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
669
|
-
value: string | Array<string>;
|
|
670
|
-
}
|
|
671
|
-
namespace EthereumTypedDataMessageCondition {
|
|
672
|
-
interface TypedData {
|
|
673
|
-
primary_type: string;
|
|
674
|
-
types: {
|
|
675
|
-
[key: string]: Array<TypedData.Type>;
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
namespace TypedData {
|
|
679
|
-
interface Type {
|
|
680
|
-
name: string;
|
|
681
|
-
type: string;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
}
|
|
637
|
+
name: string;
|
|
685
638
|
/**
|
|
686
|
-
*
|
|
639
|
+
* The key quorum ID of the owner of the policy.
|
|
687
640
|
*/
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
field_source: 'ethereum_7702_authorization';
|
|
691
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
692
|
-
value: string | Array<string>;
|
|
693
|
-
}
|
|
641
|
+
owner_id: string | null;
|
|
642
|
+
rules: Array<PolicyRuleResponse>;
|
|
694
643
|
/**
|
|
695
|
-
*
|
|
644
|
+
* Version of the policy. Currently, 1.0 is the only version.
|
|
696
645
|
*/
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
646
|
+
version: '1.0';
|
|
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;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Headers required to authorize modifications to policies.
|
|
663
|
+
*/
|
|
664
|
+
export interface PolicyAuthorizationHeaders {
|
|
703
665
|
/**
|
|
704
|
-
*
|
|
705
|
-
* fields.
|
|
666
|
+
* ID of your Privy app.
|
|
706
667
|
*/
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
668
|
+
'privy-app-id': string;
|
|
669
|
+
/**
|
|
670
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
671
|
+
* should be comma separated.
|
|
672
|
+
*/
|
|
673
|
+
'privy-authorization-signature'?: string;
|
|
713
674
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
675
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
676
|
+
* deadline by which the request must be processed.
|
|
716
677
|
*/
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
678
|
+
'privy-request-expiry'?: string;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Headers required to authorize modifications to condition sets.
|
|
682
|
+
*/
|
|
683
|
+
export interface ConditionSetAuthorizationHeaders {
|
|
723
684
|
/**
|
|
724
|
-
*
|
|
685
|
+
* ID of your Privy app.
|
|
725
686
|
*/
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
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;
|
|
732
698
|
}
|
|
733
699
|
export interface PolicyCreateParams {
|
|
734
700
|
/**
|
|
735
|
-
* Body param: The chain
|
|
701
|
+
* Body param: The wallet chain types.
|
|
736
702
|
*/
|
|
737
|
-
chain_type:
|
|
703
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
738
704
|
/**
|
|
739
705
|
* Body param: Name to assign to policy.
|
|
740
706
|
*/
|
|
@@ -748,15 +714,15 @@ export interface PolicyCreateParams {
|
|
|
748
714
|
*/
|
|
749
715
|
version: '1.0';
|
|
750
716
|
/**
|
|
751
|
-
* Body param: The owner of the resource
|
|
752
|
-
*
|
|
753
|
-
* set the owner to null to remove the owner.
|
|
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.
|
|
754
719
|
*/
|
|
755
|
-
owner?:
|
|
720
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
756
721
|
/**
|
|
757
|
-
* Body param
|
|
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.
|
|
758
724
|
*/
|
|
759
|
-
owner_id?:
|
|
725
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
760
726
|
/**
|
|
761
727
|
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
762
728
|
* a 24-hour window.
|
|
@@ -764,156 +730,33 @@ export interface PolicyCreateParams {
|
|
|
764
730
|
'privy-idempotency-key'?: string;
|
|
765
731
|
}
|
|
766
732
|
export declare namespace PolicyCreateParams {
|
|
767
|
-
/**
|
|
768
|
-
* The rules that apply to each method the policy covers.
|
|
769
|
-
*/
|
|
770
733
|
interface Rule {
|
|
771
734
|
/**
|
|
772
|
-
*
|
|
735
|
+
* The action to take when a policy rule matches.
|
|
773
736
|
*/
|
|
774
|
-
action:
|
|
775
|
-
conditions: Array<
|
|
737
|
+
action: PoliciesAPI.PolicyAction;
|
|
738
|
+
conditions: Array<PoliciesAPI.PolicyCondition>;
|
|
776
739
|
/**
|
|
777
740
|
* Method the rule applies to.
|
|
778
741
|
*/
|
|
779
|
-
method:
|
|
742
|
+
method: PoliciesAPI.PolicyMethod;
|
|
780
743
|
name: string;
|
|
781
|
-
|
|
782
|
-
namespace Rule {
|
|
783
|
-
/**
|
|
784
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
785
|
-
* eth_sendTransaction request.
|
|
786
|
-
*/
|
|
787
|
-
interface EthereumTransactionCondition {
|
|
788
|
-
field: 'to' | 'value' | 'chain_id';
|
|
789
|
-
field_source: 'ethereum_transaction';
|
|
790
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
791
|
-
value: string | Array<string>;
|
|
792
|
-
}
|
|
793
|
-
/**
|
|
794
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
795
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
796
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
797
|
-
*/
|
|
798
|
-
interface EthereumCalldataCondition {
|
|
799
|
-
abi: unknown;
|
|
800
|
-
field: string;
|
|
801
|
-
field_source: 'ethereum_calldata';
|
|
802
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
803
|
-
value: string | Array<string>;
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
* Attributes from the signing domain that will verify the signature.
|
|
807
|
-
*/
|
|
808
|
-
interface EthereumTypedDataDomainCondition {
|
|
809
|
-
field: 'chainId' | 'verifyingContract';
|
|
810
|
-
field_source: 'ethereum_typed_data_domain';
|
|
811
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
812
|
-
value: string | Array<string>;
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
816
|
-
* EIP-712.
|
|
817
|
-
*/
|
|
818
|
-
interface EthereumTypedDataMessageCondition {
|
|
819
|
-
field: string;
|
|
820
|
-
field_source: 'ethereum_typed_data_message';
|
|
821
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
822
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
823
|
-
value: string | Array<string>;
|
|
824
|
-
}
|
|
825
|
-
namespace EthereumTypedDataMessageCondition {
|
|
826
|
-
interface TypedData {
|
|
827
|
-
primary_type: string;
|
|
828
|
-
types: {
|
|
829
|
-
[key: string]: Array<TypedData.Type>;
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
namespace TypedData {
|
|
833
|
-
interface Type {
|
|
834
|
-
name: string;
|
|
835
|
-
type: string;
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
/**
|
|
840
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
841
|
-
*/
|
|
842
|
-
interface Ethereum7702AuthorizationCondition {
|
|
843
|
-
field: 'contract';
|
|
844
|
-
field_source: 'ethereum_7702_authorization';
|
|
845
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
846
|
-
value: string | Array<string>;
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
850
|
-
*/
|
|
851
|
-
interface SolanaProgramInstructionCondition {
|
|
852
|
-
field: 'programId';
|
|
853
|
-
field_source: 'solana_program_instruction';
|
|
854
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
855
|
-
value: string | Array<string>;
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
859
|
-
* fields.
|
|
860
|
-
*/
|
|
861
|
-
interface SolanaSystemProgramInstructionCondition {
|
|
862
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
863
|
-
field_source: 'solana_system_program_instruction';
|
|
864
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
865
|
-
value: string | Array<string>;
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
869
|
-
* instruction fields.
|
|
870
|
-
*/
|
|
871
|
-
interface SolanaTokenProgramInstructionCondition {
|
|
872
|
-
field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
|
|
873
|
-
field_source: 'solana_token_program_instruction';
|
|
874
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
875
|
-
value: string | Array<string>;
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
879
|
-
*/
|
|
880
|
-
interface SystemCondition {
|
|
881
|
-
field: 'current_unix_timestamp';
|
|
882
|
-
field_source: 'system';
|
|
883
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
884
|
-
value: string | Array<string>;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
/**
|
|
888
|
-
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
889
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
890
|
-
* automatically.
|
|
891
|
-
*/
|
|
892
|
-
interface PublicKeyOwner {
|
|
893
|
-
public_key: string;
|
|
894
|
-
}
|
|
895
|
-
/**
|
|
896
|
-
* The user ID of the owner of the resource. The user must already exist, and this
|
|
897
|
-
* value must start with "did:privy:". If you provide this, do not specify an
|
|
898
|
-
* owner_id as it will be generated automatically.
|
|
899
|
-
*/
|
|
900
|
-
interface UserOwner {
|
|
901
|
-
user_id: string;
|
|
744
|
+
id?: string;
|
|
902
745
|
}
|
|
903
746
|
}
|
|
904
747
|
export interface PolicyCreateRuleParams {
|
|
905
748
|
/**
|
|
906
|
-
* Body param:
|
|
749
|
+
* Body param: The action to take when a policy rule matches.
|
|
907
750
|
*/
|
|
908
|
-
action:
|
|
751
|
+
action: PolicyAction;
|
|
909
752
|
/**
|
|
910
753
|
* Body param
|
|
911
754
|
*/
|
|
912
|
-
conditions: Array<
|
|
755
|
+
conditions: Array<PolicyCondition>;
|
|
913
756
|
/**
|
|
914
757
|
* Body param: Method the rule applies to.
|
|
915
758
|
*/
|
|
916
|
-
method:
|
|
759
|
+
method: PolicyMethod;
|
|
917
760
|
/**
|
|
918
761
|
* Body param
|
|
919
762
|
*/
|
|
@@ -923,111 +766,11 @@ export interface PolicyCreateRuleParams {
|
|
|
923
766
|
* required, they should be comma separated.
|
|
924
767
|
*/
|
|
925
768
|
'privy-authorization-signature'?: string;
|
|
926
|
-
}
|
|
927
|
-
export declare namespace PolicyCreateRuleParams {
|
|
928
|
-
/**
|
|
929
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
930
|
-
* eth_sendTransaction request.
|
|
931
|
-
*/
|
|
932
|
-
interface EthereumTransactionCondition {
|
|
933
|
-
field: 'to' | 'value' | 'chain_id';
|
|
934
|
-
field_source: 'ethereum_transaction';
|
|
935
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
936
|
-
value: string | Array<string>;
|
|
937
|
-
}
|
|
938
|
-
/**
|
|
939
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
940
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
941
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
942
|
-
*/
|
|
943
|
-
interface EthereumCalldataCondition {
|
|
944
|
-
abi: unknown;
|
|
945
|
-
field: string;
|
|
946
|
-
field_source: 'ethereum_calldata';
|
|
947
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
948
|
-
value: string | Array<string>;
|
|
949
|
-
}
|
|
950
769
|
/**
|
|
951
|
-
*
|
|
770
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
771
|
+
* representing the deadline by which the request must be processed.
|
|
952
772
|
*/
|
|
953
|
-
|
|
954
|
-
field: 'chainId' | 'verifyingContract';
|
|
955
|
-
field_source: 'ethereum_typed_data_domain';
|
|
956
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
957
|
-
value: string | Array<string>;
|
|
958
|
-
}
|
|
959
|
-
/**
|
|
960
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
961
|
-
* EIP-712.
|
|
962
|
-
*/
|
|
963
|
-
interface EthereumTypedDataMessageCondition {
|
|
964
|
-
field: string;
|
|
965
|
-
field_source: 'ethereum_typed_data_message';
|
|
966
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
967
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
968
|
-
value: string | Array<string>;
|
|
969
|
-
}
|
|
970
|
-
namespace EthereumTypedDataMessageCondition {
|
|
971
|
-
interface TypedData {
|
|
972
|
-
primary_type: string;
|
|
973
|
-
types: {
|
|
974
|
-
[key: string]: Array<TypedData.Type>;
|
|
975
|
-
};
|
|
976
|
-
}
|
|
977
|
-
namespace TypedData {
|
|
978
|
-
interface Type {
|
|
979
|
-
name: string;
|
|
980
|
-
type: string;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
/**
|
|
985
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
986
|
-
*/
|
|
987
|
-
interface Ethereum7702AuthorizationCondition {
|
|
988
|
-
field: 'contract';
|
|
989
|
-
field_source: 'ethereum_7702_authorization';
|
|
990
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
991
|
-
value: string | Array<string>;
|
|
992
|
-
}
|
|
993
|
-
/**
|
|
994
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
995
|
-
*/
|
|
996
|
-
interface SolanaProgramInstructionCondition {
|
|
997
|
-
field: 'programId';
|
|
998
|
-
field_source: 'solana_program_instruction';
|
|
999
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1000
|
-
value: string | Array<string>;
|
|
1001
|
-
}
|
|
1002
|
-
/**
|
|
1003
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
1004
|
-
* fields.
|
|
1005
|
-
*/
|
|
1006
|
-
interface SolanaSystemProgramInstructionCondition {
|
|
1007
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1008
|
-
field_source: 'solana_system_program_instruction';
|
|
1009
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1010
|
-
value: string | Array<string>;
|
|
1011
|
-
}
|
|
1012
|
-
/**
|
|
1013
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1014
|
-
* instruction fields.
|
|
1015
|
-
*/
|
|
1016
|
-
interface SolanaTokenProgramInstructionCondition {
|
|
1017
|
-
field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
|
|
1018
|
-
field_source: 'solana_token_program_instruction';
|
|
1019
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1020
|
-
value: string | Array<string>;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
1024
|
-
*/
|
|
1025
|
-
interface SystemCondition {
|
|
1026
|
-
field: 'current_unix_timestamp';
|
|
1027
|
-
field_source: 'system';
|
|
1028
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1029
|
-
value: string | Array<string>;
|
|
1030
|
-
}
|
|
773
|
+
'privy-request-expiry'?: string;
|
|
1031
774
|
}
|
|
1032
775
|
export interface PolicyDeleteParams {
|
|
1033
776
|
/**
|
|
@@ -1035,6 +778,11 @@ export interface PolicyDeleteParams {
|
|
|
1035
778
|
* should be comma separated.
|
|
1036
779
|
*/
|
|
1037
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;
|
|
1038
786
|
}
|
|
1039
787
|
export interface PolicyDeleteRuleParams {
|
|
1040
788
|
/**
|
|
@@ -1046,6 +794,11 @@ export interface PolicyDeleteRuleParams {
|
|
|
1046
794
|
* required, they should be comma separated.
|
|
1047
795
|
*/
|
|
1048
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;
|
|
1049
802
|
}
|
|
1050
803
|
export interface PolicyUpdateParams {
|
|
1051
804
|
/**
|
|
@@ -1053,162 +806,29 @@ export interface PolicyUpdateParams {
|
|
|
1053
806
|
*/
|
|
1054
807
|
name?: string;
|
|
1055
808
|
/**
|
|
1056
|
-
* Body param: The owner of the resource
|
|
1057
|
-
*
|
|
1058
|
-
* set the owner to null to remove the owner.
|
|
809
|
+
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
810
|
+
* public key, or null to remove the current owner.
|
|
1059
811
|
*/
|
|
1060
|
-
owner?:
|
|
812
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
1061
813
|
/**
|
|
1062
|
-
* Body param
|
|
814
|
+
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
815
|
+
* provide this, do not specify an owner.
|
|
1063
816
|
*/
|
|
1064
|
-
owner_id?:
|
|
817
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
1065
818
|
/**
|
|
1066
819
|
* Body param
|
|
1067
820
|
*/
|
|
1068
|
-
rules?: Array<
|
|
821
|
+
rules?: Array<PolicyRuleRequestBody>;
|
|
1069
822
|
/**
|
|
1070
823
|
* Header param: Request authorization signature. If multiple signatures are
|
|
1071
824
|
* required, they should be comma separated.
|
|
1072
825
|
*/
|
|
1073
826
|
'privy-authorization-signature'?: string;
|
|
1074
|
-
}
|
|
1075
|
-
export declare namespace PolicyUpdateParams {
|
|
1076
|
-
/**
|
|
1077
|
-
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
1078
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
1079
|
-
* automatically.
|
|
1080
|
-
*/
|
|
1081
|
-
interface PublicKeyOwner {
|
|
1082
|
-
public_key: string;
|
|
1083
|
-
}
|
|
1084
|
-
/**
|
|
1085
|
-
* The user ID of the owner of the resource. The user must already exist, and this
|
|
1086
|
-
* value must start with "did:privy:". If you provide this, do not specify an
|
|
1087
|
-
* owner_id as it will be generated automatically.
|
|
1088
|
-
*/
|
|
1089
|
-
interface UserOwner {
|
|
1090
|
-
user_id: string;
|
|
1091
|
-
}
|
|
1092
827
|
/**
|
|
1093
|
-
*
|
|
828
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
829
|
+
* representing the deadline by which the request must be processed.
|
|
1094
830
|
*/
|
|
1095
|
-
|
|
1096
|
-
/**
|
|
1097
|
-
* Action to take if the conditions are true.
|
|
1098
|
-
*/
|
|
1099
|
-
action: 'ALLOW' | 'DENY';
|
|
1100
|
-
conditions: Array<Rule.EthereumTransactionCondition | Rule.EthereumCalldataCondition | Rule.EthereumTypedDataDomainCondition | Rule.EthereumTypedDataMessageCondition | Rule.Ethereum7702AuthorizationCondition | Rule.SolanaProgramInstructionCondition | Rule.SolanaSystemProgramInstructionCondition | Rule.SolanaTokenProgramInstructionCondition | Rule.SystemCondition | PoliciesAPI.TronTransactionCondition | PoliciesAPI.SuiTransactionCommandCondition | PoliciesAPI.SuiTransferObjectsCommandCondition>;
|
|
1101
|
-
/**
|
|
1102
|
-
* Method the rule applies to.
|
|
1103
|
-
*/
|
|
1104
|
-
method: 'eth_sendTransaction' | 'eth_signTransaction' | 'eth_signUserOperation' | 'eth_signTypedData_v4' | 'eth_sign7702Authorization' | 'signTransaction' | 'signAndSendTransaction' | 'exportPrivateKey' | 'signTransactionBytes' | '*';
|
|
1105
|
-
name: string;
|
|
1106
|
-
}
|
|
1107
|
-
namespace Rule {
|
|
1108
|
-
/**
|
|
1109
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1110
|
-
* eth_sendTransaction request.
|
|
1111
|
-
*/
|
|
1112
|
-
interface EthereumTransactionCondition {
|
|
1113
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1114
|
-
field_source: 'ethereum_transaction';
|
|
1115
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1116
|
-
value: string | Array<string>;
|
|
1117
|
-
}
|
|
1118
|
-
/**
|
|
1119
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1120
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1121
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1122
|
-
*/
|
|
1123
|
-
interface EthereumCalldataCondition {
|
|
1124
|
-
abi: unknown;
|
|
1125
|
-
field: string;
|
|
1126
|
-
field_source: 'ethereum_calldata';
|
|
1127
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1128
|
-
value: string | Array<string>;
|
|
1129
|
-
}
|
|
1130
|
-
/**
|
|
1131
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1132
|
-
*/
|
|
1133
|
-
interface EthereumTypedDataDomainCondition {
|
|
1134
|
-
field: 'chainId' | 'verifyingContract';
|
|
1135
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1136
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1137
|
-
value: string | Array<string>;
|
|
1138
|
-
}
|
|
1139
|
-
/**
|
|
1140
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1141
|
-
* EIP-712.
|
|
1142
|
-
*/
|
|
1143
|
-
interface EthereumTypedDataMessageCondition {
|
|
1144
|
-
field: string;
|
|
1145
|
-
field_source: 'ethereum_typed_data_message';
|
|
1146
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1147
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1148
|
-
value: string | Array<string>;
|
|
1149
|
-
}
|
|
1150
|
-
namespace EthereumTypedDataMessageCondition {
|
|
1151
|
-
interface TypedData {
|
|
1152
|
-
primary_type: string;
|
|
1153
|
-
types: {
|
|
1154
|
-
[key: string]: Array<TypedData.Type>;
|
|
1155
|
-
};
|
|
1156
|
-
}
|
|
1157
|
-
namespace TypedData {
|
|
1158
|
-
interface Type {
|
|
1159
|
-
name: string;
|
|
1160
|
-
type: string;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
/**
|
|
1165
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
1166
|
-
*/
|
|
1167
|
-
interface Ethereum7702AuthorizationCondition {
|
|
1168
|
-
field: 'contract';
|
|
1169
|
-
field_source: 'ethereum_7702_authorization';
|
|
1170
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1171
|
-
value: string | Array<string>;
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
1175
|
-
*/
|
|
1176
|
-
interface SolanaProgramInstructionCondition {
|
|
1177
|
-
field: 'programId';
|
|
1178
|
-
field_source: 'solana_program_instruction';
|
|
1179
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1180
|
-
value: string | Array<string>;
|
|
1181
|
-
}
|
|
1182
|
-
/**
|
|
1183
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
1184
|
-
* fields.
|
|
1185
|
-
*/
|
|
1186
|
-
interface SolanaSystemProgramInstructionCondition {
|
|
1187
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1188
|
-
field_source: 'solana_system_program_instruction';
|
|
1189
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1190
|
-
value: string | Array<string>;
|
|
1191
|
-
}
|
|
1192
|
-
/**
|
|
1193
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1194
|
-
* instruction fields.
|
|
1195
|
-
*/
|
|
1196
|
-
interface SolanaTokenProgramInstructionCondition {
|
|
1197
|
-
field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
|
|
1198
|
-
field_source: 'solana_token_program_instruction';
|
|
1199
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1200
|
-
value: string | Array<string>;
|
|
1201
|
-
}
|
|
1202
|
-
/**
|
|
1203
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
1204
|
-
*/
|
|
1205
|
-
interface SystemCondition {
|
|
1206
|
-
field: 'current_unix_timestamp';
|
|
1207
|
-
field_source: 'system';
|
|
1208
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1209
|
-
value: string | Array<string>;
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
831
|
+
'privy-request-expiry'?: string;
|
|
1212
832
|
}
|
|
1213
833
|
export interface PolicyUpdateRuleParams {
|
|
1214
834
|
/**
|
|
@@ -1216,17 +836,17 @@ export interface PolicyUpdateRuleParams {
|
|
|
1216
836
|
*/
|
|
1217
837
|
policy_id: string;
|
|
1218
838
|
/**
|
|
1219
|
-
* Body param:
|
|
839
|
+
* Body param: The action to take when a policy rule matches.
|
|
1220
840
|
*/
|
|
1221
|
-
action:
|
|
841
|
+
action: PolicyAction;
|
|
1222
842
|
/**
|
|
1223
843
|
* Body param
|
|
1224
844
|
*/
|
|
1225
|
-
conditions: Array<
|
|
845
|
+
conditions: Array<PolicyCondition>;
|
|
1226
846
|
/**
|
|
1227
847
|
* Body param: Method the rule applies to.
|
|
1228
848
|
*/
|
|
1229
|
-
method:
|
|
849
|
+
method: PolicyMethod;
|
|
1230
850
|
/**
|
|
1231
851
|
* Body param
|
|
1232
852
|
*/
|
|
@@ -1236,116 +856,16 @@ export interface PolicyUpdateRuleParams {
|
|
|
1236
856
|
* required, they should be comma separated.
|
|
1237
857
|
*/
|
|
1238
858
|
'privy-authorization-signature'?: string;
|
|
1239
|
-
}
|
|
1240
|
-
export declare namespace PolicyUpdateRuleParams {
|
|
1241
|
-
/**
|
|
1242
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1243
|
-
* eth_sendTransaction request.
|
|
1244
|
-
*/
|
|
1245
|
-
interface EthereumTransactionCondition {
|
|
1246
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1247
|
-
field_source: 'ethereum_transaction';
|
|
1248
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1249
|
-
value: string | Array<string>;
|
|
1250
|
-
}
|
|
1251
|
-
/**
|
|
1252
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1253
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1254
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1255
|
-
*/
|
|
1256
|
-
interface EthereumCalldataCondition {
|
|
1257
|
-
abi: unknown;
|
|
1258
|
-
field: string;
|
|
1259
|
-
field_source: 'ethereum_calldata';
|
|
1260
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1261
|
-
value: string | Array<string>;
|
|
1262
|
-
}
|
|
1263
|
-
/**
|
|
1264
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1265
|
-
*/
|
|
1266
|
-
interface EthereumTypedDataDomainCondition {
|
|
1267
|
-
field: 'chainId' | 'verifyingContract';
|
|
1268
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1269
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1270
|
-
value: string | Array<string>;
|
|
1271
|
-
}
|
|
1272
|
-
/**
|
|
1273
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1274
|
-
* EIP-712.
|
|
1275
|
-
*/
|
|
1276
|
-
interface EthereumTypedDataMessageCondition {
|
|
1277
|
-
field: string;
|
|
1278
|
-
field_source: 'ethereum_typed_data_message';
|
|
1279
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1280
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1281
|
-
value: string | Array<string>;
|
|
1282
|
-
}
|
|
1283
|
-
namespace EthereumTypedDataMessageCondition {
|
|
1284
|
-
interface TypedData {
|
|
1285
|
-
primary_type: string;
|
|
1286
|
-
types: {
|
|
1287
|
-
[key: string]: Array<TypedData.Type>;
|
|
1288
|
-
};
|
|
1289
|
-
}
|
|
1290
|
-
namespace TypedData {
|
|
1291
|
-
interface Type {
|
|
1292
|
-
name: string;
|
|
1293
|
-
type: string;
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
859
|
/**
|
|
1298
|
-
*
|
|
860
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
861
|
+
* representing the deadline by which the request must be processed.
|
|
1299
862
|
*/
|
|
1300
|
-
|
|
1301
|
-
field: 'contract';
|
|
1302
|
-
field_source: 'ethereum_7702_authorization';
|
|
1303
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1304
|
-
value: string | Array<string>;
|
|
1305
|
-
}
|
|
1306
|
-
/**
|
|
1307
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
1308
|
-
*/
|
|
1309
|
-
interface SolanaProgramInstructionCondition {
|
|
1310
|
-
field: 'programId';
|
|
1311
|
-
field_source: 'solana_program_instruction';
|
|
1312
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1313
|
-
value: string | Array<string>;
|
|
1314
|
-
}
|
|
1315
|
-
/**
|
|
1316
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
1317
|
-
* fields.
|
|
1318
|
-
*/
|
|
1319
|
-
interface SolanaSystemProgramInstructionCondition {
|
|
1320
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1321
|
-
field_source: 'solana_system_program_instruction';
|
|
1322
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1323
|
-
value: string | Array<string>;
|
|
1324
|
-
}
|
|
1325
|
-
/**
|
|
1326
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1327
|
-
* instruction fields.
|
|
1328
|
-
*/
|
|
1329
|
-
interface SolanaTokenProgramInstructionCondition {
|
|
1330
|
-
field: 'instructionName' | 'TransferChecked.source' | 'TransferChecked.destination' | 'TransferChecked.authority' | 'TransferChecked.amount' | 'TransferChecked.mint';
|
|
1331
|
-
field_source: 'solana_token_program_instruction';
|
|
1332
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1333
|
-
value: string | Array<string>;
|
|
1334
|
-
}
|
|
1335
|
-
/**
|
|
1336
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
1337
|
-
*/
|
|
1338
|
-
interface SystemCondition {
|
|
1339
|
-
field: 'current_unix_timestamp';
|
|
1340
|
-
field_source: 'system';
|
|
1341
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1342
|
-
value: string | Array<string>;
|
|
1343
|
-
}
|
|
863
|
+
'privy-request-expiry'?: string;
|
|
1344
864
|
}
|
|
1345
865
|
export interface PolicyGetRuleParams {
|
|
1346
866
|
policy_id: string;
|
|
1347
867
|
}
|
|
1348
868
|
export declare namespace Policies {
|
|
1349
|
-
export { type SuiTransactionCommandOperator as SuiTransactionCommandOperator, type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField, type TronTransactionCondition as TronTransactionCondition, type SuiTransactionCommandCondition as SuiTransactionCommandCondition, type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition, type
|
|
869
|
+
export { type ConditionSetRequestParams as ConditionSetRequestParams, type ConditionSetItemRequestParams as ConditionSetItemRequestParams, type ConditionSetRequestBody as ConditionSetRequestBody, type ConditionSet as ConditionSet, type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody, type ConditionSetItemValueInput as ConditionSetItemValueInput, type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody, type ConditionSetItem as ConditionSetItem, type ConditionSetItems as ConditionSetItems, type ConditionSetItemsResponse as ConditionSetItemsResponse, type PolicyAction as PolicyAction, type AbiParameter as AbiParameter, type AbiSchema as AbiSchema, type ConditionOperator as ConditionOperator, type ConditionValue as ConditionValue, type SuiTransactionCommandOperator as SuiTransactionCommandOperator, type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField, type EthereumTransactionCondition as EthereumTransactionCondition, type EthereumCalldataCondition as EthereumCalldataCondition, type EthereumTypedDataDomainCondition as EthereumTypedDataDomainCondition, type EthereumTypedDataMessageCondition as EthereumTypedDataMessageCondition, type Ethereum7702AuthorizationCondition as Ethereum7702AuthorizationCondition, type SolanaProgramInstructionCondition as SolanaProgramInstructionCondition, type SolanaSystemProgramInstructionCondition as SolanaSystemProgramInstructionCondition, type SolanaTokenProgramInstructionCondition as SolanaTokenProgramInstructionCondition, type SystemCondition as SystemCondition, type TronTransactionCondition as TronTransactionCondition, type TronCalldataCondition as TronCalldataCondition, type SuiTransactionCommandCondition as SuiTransactionCommandCondition, type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition, type AggregationCondition as AggregationCondition, type PolicyCondition as PolicyCondition, type PolicyMethod as PolicyMethod, type PolicyRuleRequestBody as PolicyRuleRequestBody, type PolicyRuleResponse as PolicyRuleResponse, type Policy as Policy, type PolicyRequestBody as PolicyRequestBody, type PolicyRuleRequestParams as PolicyRuleRequestParams, type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders, type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders, 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, };
|
|
1350
870
|
}
|
|
1351
871
|
//# sourceMappingURL=policies.d.ts.map
|