@privy-io/api-types 0.6.1 → 0.8.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 +72 -0
- package/client.d.mts +53 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -29
- package/client.d.ts.map +1 -1
- package/client.js +32 -7
- package/client.js.map +1 -1
- package/client.mjs +34 -9
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/accounts.d.mts +146 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +146 -4
- 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 +197 -70
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +197 -70
- 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 +975 -463
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +975 -463
- 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 +165 -81
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +165 -81
- 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 -14
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +446 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +446 -31
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +108 -17
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +108 -17
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +26 -9
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +26 -9
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +62 -0
- package/resources/kraken-embed.d.mts.map +1 -0
- package/resources/kraken-embed.d.ts +62 -0
- package/resources/kraken-embed.d.ts.map +1 -0
- package/resources/kraken-embed.js +9 -0
- package/resources/kraken-embed.js.map +1 -0
- package/resources/kraken-embed.mjs +5 -0
- package/resources/kraken-embed.mjs.map +1 -0
- package/resources/policies.d.mts +342 -926
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +342 -926
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +51 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +51 -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 +158 -93
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +158 -93
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +3 -0
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +3 -0
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +64 -94
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +64 -94
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +187 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +187 -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 +7 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +7 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +3 -0
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +3 -0
- package/resources/wallets/balance.mjs.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +10 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +10 -6
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +3 -0
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs +3 -0
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2399 -936
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2399 -936
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +28 -10
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +28 -10
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +780 -339
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +780 -339
- 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 +50 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +50 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +884 -99
- package/src/resources/accounts.ts +179 -3
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +250 -85
- package/src/resources/client-auth.ts +1453 -786
- 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 +444 -61
- package/src/resources/intents.ts +575 -37
- package/src/resources/key-quorums.ts +137 -21
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +582 -1550
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +188 -91
- package/src/resources/users.ts +82 -132
- package/src/resources/wallet-actions.ts +251 -0
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +146 -16
- package/src/resources/wallets/transactions.ts +12 -4
- package/src/resources/wallets/wallets.ts +2922 -974
- package/src/resources/webhooks.ts +970 -454
- package/src/resources/yield.ts +68 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as PoliciesAPI from './policies';
|
|
5
|
+
import * as SharedAPI from './shared';
|
|
5
6
|
import * as WalletsAPI from './wallets/wallets';
|
|
6
7
|
import { APIPromise } from '../core/api-promise';
|
|
7
8
|
import { buildHeaders } from '../internal/headers';
|
|
8
9
|
import { RequestOptions } from '../internal/request-options';
|
|
9
10
|
import { path } from '../internal/utils/path';
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Operations related to policies
|
|
14
|
+
*/
|
|
11
15
|
export class Policies extends APIResource {
|
|
12
16
|
/**
|
|
13
17
|
* Create a new policy.
|
|
@@ -53,30 +57,35 @@ export class Policies extends APIResource {
|
|
|
53
57
|
*
|
|
54
58
|
* @example
|
|
55
59
|
* ```ts
|
|
56
|
-
* const
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
60
|
+
* const policyRuleResponse =
|
|
61
|
+
* await client.policies._createRule(
|
|
62
|
+
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
63
|
+
* {
|
|
64
|
+
* action: 'ALLOW',
|
|
65
|
+
* conditions: [
|
|
66
|
+
* {
|
|
67
|
+
* field: 'to',
|
|
68
|
+
* field_source: 'ethereum_transaction',
|
|
69
|
+
* operator: 'eq',
|
|
70
|
+
* value: 'string',
|
|
71
|
+
* },
|
|
72
|
+
* ],
|
|
73
|
+
* method: 'eth_sendTransaction',
|
|
74
|
+
* name: 'x',
|
|
75
|
+
* },
|
|
76
|
+
* );
|
|
72
77
|
* ```
|
|
73
78
|
*/
|
|
74
79
|
_createRule(
|
|
75
80
|
policyID: string,
|
|
76
81
|
params: PolicyCreateRuleParams,
|
|
77
82
|
options?: RequestOptions,
|
|
78
|
-
): APIPromise<
|
|
79
|
-
const {
|
|
83
|
+
): APIPromise<PolicyRuleResponse> {
|
|
84
|
+
const {
|
|
85
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
86
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
87
|
+
...body
|
|
88
|
+
} = params;
|
|
80
89
|
return this._client.post(path`/v1/policies/${policyID}/rules`, {
|
|
81
90
|
body,
|
|
82
91
|
...options,
|
|
@@ -85,6 +94,7 @@ export class Policies extends APIResource {
|
|
|
85
94
|
...(privyAuthorizationSignature != null ?
|
|
86
95
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
87
96
|
: undefined),
|
|
97
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
88
98
|
},
|
|
89
99
|
options?.headers,
|
|
90
100
|
]),
|
|
@@ -96,7 +106,7 @@ export class Policies extends APIResource {
|
|
|
96
106
|
*
|
|
97
107
|
* @example
|
|
98
108
|
* ```ts
|
|
99
|
-
* const
|
|
109
|
+
* const successResponse = await client.policies._delete(
|
|
100
110
|
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
101
111
|
* );
|
|
102
112
|
* ```
|
|
@@ -105,8 +115,11 @@ export class Policies extends APIResource {
|
|
|
105
115
|
policyID: string,
|
|
106
116
|
params: PolicyDeleteParams | null | undefined = {},
|
|
107
117
|
options?: RequestOptions,
|
|
108
|
-
): APIPromise<
|
|
109
|
-
const {
|
|
118
|
+
): APIPromise<SharedAPI.SuccessResponse> {
|
|
119
|
+
const {
|
|
120
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
121
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
122
|
+
} = params ?? {};
|
|
110
123
|
return this._client.delete(path`/v1/policies/${policyID}`, {
|
|
111
124
|
...options,
|
|
112
125
|
headers: buildHeaders([
|
|
@@ -114,6 +127,7 @@ export class Policies extends APIResource {
|
|
|
114
127
|
...(privyAuthorizationSignature != null ?
|
|
115
128
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
116
129
|
: undefined),
|
|
130
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
117
131
|
},
|
|
118
132
|
options?.headers,
|
|
119
133
|
]),
|
|
@@ -125,7 +139,7 @@ export class Policies extends APIResource {
|
|
|
125
139
|
*
|
|
126
140
|
* @example
|
|
127
141
|
* ```ts
|
|
128
|
-
* const
|
|
142
|
+
* const successResponse = await client.policies._deleteRule(
|
|
129
143
|
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
130
144
|
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
131
145
|
* );
|
|
@@ -135,8 +149,12 @@ export class Policies extends APIResource {
|
|
|
135
149
|
ruleID: string,
|
|
136
150
|
params: PolicyDeleteRuleParams,
|
|
137
151
|
options?: RequestOptions,
|
|
138
|
-
): APIPromise<
|
|
139
|
-
const {
|
|
152
|
+
): APIPromise<SharedAPI.SuccessResponse> {
|
|
153
|
+
const {
|
|
154
|
+
policy_id,
|
|
155
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
156
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
157
|
+
} = params;
|
|
140
158
|
return this._client.delete(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
|
|
141
159
|
...options,
|
|
142
160
|
headers: buildHeaders([
|
|
@@ -144,6 +162,7 @@ export class Policies extends APIResource {
|
|
|
144
162
|
...(privyAuthorizationSignature != null ?
|
|
145
163
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
146
164
|
: undefined),
|
|
165
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
147
166
|
},
|
|
148
167
|
options?.headers,
|
|
149
168
|
]),
|
|
@@ -161,7 +180,11 @@ export class Policies extends APIResource {
|
|
|
161
180
|
* ```
|
|
162
181
|
*/
|
|
163
182
|
_update(policyID: string, params: PolicyUpdateParams, options?: RequestOptions): APIPromise<Policy> {
|
|
164
|
-
const {
|
|
183
|
+
const {
|
|
184
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
185
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
186
|
+
...body
|
|
187
|
+
} = params;
|
|
165
188
|
return this._client.patch(path`/v1/policies/${policyID}`, {
|
|
166
189
|
body,
|
|
167
190
|
...options,
|
|
@@ -170,6 +193,7 @@ export class Policies extends APIResource {
|
|
|
170
193
|
...(privyAuthorizationSignature != null ?
|
|
171
194
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
172
195
|
: undefined),
|
|
196
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
173
197
|
},
|
|
174
198
|
options?.headers,
|
|
175
199
|
]),
|
|
@@ -181,31 +205,37 @@ export class Policies extends APIResource {
|
|
|
181
205
|
*
|
|
182
206
|
* @example
|
|
183
207
|
* ```ts
|
|
184
|
-
* const
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
208
|
+
* const policyRuleResponse =
|
|
209
|
+
* await client.policies._updateRule(
|
|
210
|
+
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
211
|
+
* {
|
|
212
|
+
* policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
213
|
+
* action: 'ALLOW',
|
|
214
|
+
* conditions: [
|
|
215
|
+
* {
|
|
216
|
+
* field: 'to',
|
|
217
|
+
* field_source: 'ethereum_transaction',
|
|
218
|
+
* operator: 'eq',
|
|
219
|
+
* value: 'string',
|
|
220
|
+
* },
|
|
221
|
+
* ],
|
|
222
|
+
* method: 'eth_sendTransaction',
|
|
223
|
+
* name: 'x',
|
|
224
|
+
* },
|
|
225
|
+
* );
|
|
201
226
|
* ```
|
|
202
227
|
*/
|
|
203
228
|
_updateRule(
|
|
204
229
|
ruleID: string,
|
|
205
230
|
params: PolicyUpdateRuleParams,
|
|
206
231
|
options?: RequestOptions,
|
|
207
|
-
): APIPromise<
|
|
208
|
-
const {
|
|
232
|
+
): APIPromise<PolicyRuleResponse> {
|
|
233
|
+
const {
|
|
234
|
+
policy_id,
|
|
235
|
+
'privy-authorization-signature': privyAuthorizationSignature,
|
|
236
|
+
'privy-request-expiry': privyRequestExpiry,
|
|
237
|
+
...body
|
|
238
|
+
} = params;
|
|
209
239
|
return this._client.patch(path`/v1/policies/${policy_id}/rules/${ruleID}`, {
|
|
210
240
|
body,
|
|
211
241
|
...options,
|
|
@@ -214,6 +244,7 @@ export class Policies extends APIResource {
|
|
|
214
244
|
...(privyAuthorizationSignature != null ?
|
|
215
245
|
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
216
246
|
: undefined),
|
|
247
|
+
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
217
248
|
},
|
|
218
249
|
options?.headers,
|
|
219
250
|
]),
|
|
@@ -239,7 +270,7 @@ export class Policies extends APIResource {
|
|
|
239
270
|
*
|
|
240
271
|
* @example
|
|
241
272
|
* ```ts
|
|
242
|
-
* const
|
|
273
|
+
* const policyRuleResponse = await client.policies.getRule(
|
|
243
274
|
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
244
275
|
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
245
276
|
* );
|
|
@@ -249,12 +280,197 @@ export class Policies extends APIResource {
|
|
|
249
280
|
ruleID: string,
|
|
250
281
|
params: PolicyGetRuleParams,
|
|
251
282
|
options?: RequestOptions,
|
|
252
|
-
): APIPromise<
|
|
283
|
+
): APIPromise<PolicyRuleResponse> {
|
|
253
284
|
const { policy_id } = params;
|
|
254
285
|
return this._client.get(path`/v1/policies/${policy_id}/rules/${ruleID}`, options);
|
|
255
286
|
}
|
|
256
287
|
}
|
|
257
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Unique ID of the condition set to take actions on.
|
|
291
|
+
*/
|
|
292
|
+
export interface ConditionSetRequestParams {
|
|
293
|
+
condition_set_id: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Unique IDs of the condition set and the condition set item within the condition
|
|
298
|
+
* set to take actions on.
|
|
299
|
+
*/
|
|
300
|
+
export interface ConditionSetItemRequestParams {
|
|
301
|
+
condition_set_id: string;
|
|
302
|
+
|
|
303
|
+
condition_set_item_id: string;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Request body for creating a condition set.
|
|
308
|
+
*/
|
|
309
|
+
export interface ConditionSetRequestBody {
|
|
310
|
+
/**
|
|
311
|
+
* Name to assign to condition set.
|
|
312
|
+
*/
|
|
313
|
+
name: string;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
317
|
+
* null to remove the current owner.
|
|
318
|
+
*/
|
|
319
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
323
|
+
* not specify an owner.
|
|
324
|
+
*/
|
|
325
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* A condition set for grouping related condition values.
|
|
330
|
+
*/
|
|
331
|
+
export interface ConditionSet {
|
|
332
|
+
/**
|
|
333
|
+
* Unique ID of the created condition set. This will be the primary identifier when
|
|
334
|
+
* using the condition set in the future.
|
|
335
|
+
*/
|
|
336
|
+
id: string;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Unix timestamp of when the condition set was created in milliseconds.
|
|
340
|
+
*/
|
|
341
|
+
created_at: number;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Name of the condition set.
|
|
345
|
+
*/
|
|
346
|
+
name: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* A unique identifier for a key quorum.
|
|
350
|
+
*/
|
|
351
|
+
owner_id: SharedAPI.KeyQuorumID;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Request body for updating a condition set.
|
|
356
|
+
*/
|
|
357
|
+
export interface UpdateConditionSetRequestBody {
|
|
358
|
+
/**
|
|
359
|
+
* Name to assign to condition set.
|
|
360
|
+
*/
|
|
361
|
+
name?: string;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
365
|
+
* null to remove the current owner.
|
|
366
|
+
*/
|
|
367
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
371
|
+
* not specify an owner.
|
|
372
|
+
*/
|
|
373
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* A single value to add to a condition set.
|
|
378
|
+
*/
|
|
379
|
+
export interface ConditionSetItemValueInput {
|
|
380
|
+
value: string;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Array of values to add to the condition set. Maximum 100 items per request.
|
|
385
|
+
*/
|
|
386
|
+
export type ConditionSetItemsRequestBody = Array<ConditionSetItemValueInput>;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* A single item in a condition set.
|
|
390
|
+
*/
|
|
391
|
+
export interface ConditionSetItem {
|
|
392
|
+
/**
|
|
393
|
+
* Unique ID of the created condition set item.
|
|
394
|
+
*/
|
|
395
|
+
id: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Unique ID of the condition set this item belongs to.
|
|
399
|
+
*/
|
|
400
|
+
condition_set_id: string;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Unix timestamp of when the condition set item was created in milliseconds.
|
|
404
|
+
*/
|
|
405
|
+
created_at: number;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The value stored in this condition set item.
|
|
409
|
+
*/
|
|
410
|
+
value: string;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Array of condition set items.
|
|
415
|
+
*/
|
|
416
|
+
export type ConditionSetItems = Array<ConditionSetItem>;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Paginated list of condition set items.
|
|
420
|
+
*/
|
|
421
|
+
export interface ConditionSetItemsResponse {
|
|
422
|
+
/**
|
|
423
|
+
* List of condition set items.
|
|
424
|
+
*/
|
|
425
|
+
items: Array<ConditionSetItem>;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Cursor for pagination. Null if there are no more items.
|
|
429
|
+
*/
|
|
430
|
+
next_cursor: string | null;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The action to take when a policy rule matches.
|
|
435
|
+
*/
|
|
436
|
+
export type PolicyAction = 'ALLOW' | 'DENY';
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* A parameter in a Solidity ABI function or event definition.
|
|
440
|
+
*/
|
|
441
|
+
export interface AbiParameter {
|
|
442
|
+
type: string;
|
|
443
|
+
|
|
444
|
+
components?: Array<unknown>;
|
|
445
|
+
|
|
446
|
+
indexed?: boolean;
|
|
447
|
+
|
|
448
|
+
internalType?: string;
|
|
449
|
+
|
|
450
|
+
name?: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
455
|
+
*/
|
|
456
|
+
export type AbiSchema = Array<AbiSchema.AbiSchemaItem>;
|
|
457
|
+
|
|
458
|
+
export namespace AbiSchema {
|
|
459
|
+
export interface AbiSchemaItem {
|
|
460
|
+
type: 'function' | 'constructor' | 'event' | 'fallback' | 'receive';
|
|
461
|
+
|
|
462
|
+
anonymous?: boolean;
|
|
463
|
+
|
|
464
|
+
inputs?: Array<PoliciesAPI.AbiParameter>;
|
|
465
|
+
|
|
466
|
+
name?: string;
|
|
467
|
+
|
|
468
|
+
outputs?: Array<PoliciesAPI.AbiParameter>;
|
|
469
|
+
|
|
470
|
+
stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
258
474
|
/**
|
|
259
475
|
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
260
476
|
* supported for command names.
|
|
@@ -290,6 +506,24 @@ export interface TronTransactionCondition {
|
|
|
290
506
|
value: string | Array<string>;
|
|
291
507
|
}
|
|
292
508
|
|
|
509
|
+
/**
|
|
510
|
+
* Decoded calldata from a TRON TriggerSmartContract interaction.
|
|
511
|
+
*/
|
|
512
|
+
export interface TronCalldataCondition {
|
|
513
|
+
/**
|
|
514
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
515
|
+
*/
|
|
516
|
+
abi: AbiSchema;
|
|
517
|
+
|
|
518
|
+
field: string;
|
|
519
|
+
|
|
520
|
+
field_source: 'tron_trigger_smart_contract_data';
|
|
521
|
+
|
|
522
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
523
|
+
|
|
524
|
+
value: string | Array<string>;
|
|
525
|
+
}
|
|
526
|
+
|
|
293
527
|
/**
|
|
294
528
|
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
295
529
|
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
@@ -331,372 +565,122 @@ export interface SuiTransferObjectsCommandCondition {
|
|
|
331
565
|
}
|
|
332
566
|
|
|
333
567
|
/**
|
|
334
|
-
*
|
|
568
|
+
* Condition referencing an aggregation value. The field must start with
|
|
569
|
+
* "aggregation." followed by the aggregation ID.
|
|
335
570
|
*/
|
|
336
|
-
export interface
|
|
337
|
-
|
|
338
|
-
* Unique ID of the created policy. This will be the primary identifier when using
|
|
339
|
-
* the policy in the future.
|
|
340
|
-
*/
|
|
341
|
-
id: string;
|
|
342
|
-
|
|
343
|
-
/**
|
|
344
|
-
* The chain type the policy applies to.
|
|
345
|
-
*/
|
|
346
|
-
chain_type: 'ethereum' | 'solana' | 'tron' | 'sui';
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Unix timestamp of when the policy was created in milliseconds.
|
|
350
|
-
*/
|
|
351
|
-
created_at: number;
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Name to assign to policy.
|
|
355
|
-
*/
|
|
356
|
-
name: string;
|
|
571
|
+
export interface AggregationCondition {
|
|
572
|
+
field: string;
|
|
357
573
|
|
|
358
|
-
|
|
359
|
-
* The key quorum ID of the owner of the policy.
|
|
360
|
-
*/
|
|
361
|
-
owner_id: string | null;
|
|
574
|
+
field_source: 'reference';
|
|
362
575
|
|
|
363
|
-
|
|
576
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
364
577
|
|
|
365
|
-
|
|
366
|
-
* Version of the policy. Currently, 1.0 is the only version.
|
|
367
|
-
*/
|
|
368
|
-
version: '1.0';
|
|
578
|
+
value: string | Array<string>;
|
|
369
579
|
}
|
|
370
580
|
|
|
371
|
-
|
|
581
|
+
/**
|
|
582
|
+
* A condition that must be true for the rule action to be applied.
|
|
583
|
+
*/
|
|
584
|
+
export type PolicyCondition =
|
|
585
|
+
| PolicyCondition.EthereumTransactionCondition
|
|
586
|
+
| PolicyCondition.EthereumCalldataCondition
|
|
587
|
+
| PolicyCondition.EthereumTypedDataDomainCondition
|
|
588
|
+
| PolicyCondition.EthereumTypedDataMessageCondition
|
|
589
|
+
| PolicyCondition.Ethereum7702AuthorizationCondition
|
|
590
|
+
| PolicyCondition.SolanaProgramInstructionCondition
|
|
591
|
+
| PolicyCondition.SolanaSystemProgramInstructionCondition
|
|
592
|
+
| PolicyCondition.SolanaTokenProgramInstructionCondition
|
|
593
|
+
| PolicyCondition.SystemCondition
|
|
594
|
+
| TronTransactionCondition
|
|
595
|
+
| TronCalldataCondition
|
|
596
|
+
| SuiTransactionCommandCondition
|
|
597
|
+
| SuiTransferObjectsCommandCondition
|
|
598
|
+
| AggregationCondition;
|
|
599
|
+
|
|
600
|
+
export namespace PolicyCondition {
|
|
372
601
|
/**
|
|
373
|
-
*
|
|
374
|
-
*
|
|
602
|
+
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
603
|
+
* eth_sendTransaction request.
|
|
375
604
|
*/
|
|
376
|
-
export interface
|
|
377
|
-
|
|
605
|
+
export interface EthereumTransactionCondition {
|
|
606
|
+
field: 'to' | 'value' | 'chain_id';
|
|
378
607
|
|
|
379
|
-
|
|
380
|
-
* Action to take if the conditions are true.
|
|
381
|
-
*/
|
|
382
|
-
action: 'ALLOW' | 'DENY';
|
|
383
|
-
|
|
384
|
-
conditions: Array<
|
|
385
|
-
| Rule.EthereumTransactionCondition
|
|
386
|
-
| Rule.EthereumCalldataCondition
|
|
387
|
-
| Rule.EthereumTypedDataDomainCondition
|
|
388
|
-
| Rule.EthereumTypedDataMessageCondition
|
|
389
|
-
| Rule.Ethereum7702AuthorizationCondition
|
|
390
|
-
| Rule.SolanaProgramInstructionCondition
|
|
391
|
-
| Rule.SolanaSystemProgramInstructionCondition
|
|
392
|
-
| Rule.SolanaTokenProgramInstructionCondition
|
|
393
|
-
| Rule.SystemCondition
|
|
394
|
-
| PoliciesAPI.TronTransactionCondition
|
|
395
|
-
| PoliciesAPI.SuiTransactionCommandCondition
|
|
396
|
-
| PoliciesAPI.SuiTransferObjectsCommandCondition
|
|
397
|
-
>;
|
|
608
|
+
field_source: 'ethereum_transaction';
|
|
398
609
|
|
|
399
|
-
|
|
400
|
-
* Method the rule applies to.
|
|
401
|
-
*/
|
|
402
|
-
method:
|
|
403
|
-
| 'eth_sendTransaction'
|
|
404
|
-
| 'eth_signTransaction'
|
|
405
|
-
| 'eth_signUserOperation'
|
|
406
|
-
| 'eth_signTypedData_v4'
|
|
407
|
-
| 'eth_sign7702Authorization'
|
|
408
|
-
| 'signTransaction'
|
|
409
|
-
| 'signAndSendTransaction'
|
|
410
|
-
| 'exportPrivateKey'
|
|
411
|
-
| 'signTransactionBytes'
|
|
412
|
-
| '*';
|
|
610
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
413
611
|
|
|
414
|
-
|
|
612
|
+
value: string | Array<string>;
|
|
415
613
|
}
|
|
416
614
|
|
|
417
|
-
|
|
615
|
+
/**
|
|
616
|
+
* The decoded calldata in a smart contract interaction as the smart contract
|
|
617
|
+
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
618
|
+
* an abi parameter with the JSON ABI of the smart contract.
|
|
619
|
+
*/
|
|
620
|
+
export interface EthereumCalldataCondition {
|
|
418
621
|
/**
|
|
419
|
-
*
|
|
420
|
-
* eth_sendTransaction request.
|
|
622
|
+
* A Solidity ABI definition for decoding smart contract calldata.
|
|
421
623
|
*/
|
|
422
|
-
|
|
423
|
-
field: 'to' | 'value' | 'chain_id';
|
|
624
|
+
abi: PoliciesAPI.AbiSchema;
|
|
424
625
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
428
|
-
|
|
429
|
-
value: string | Array<string>;
|
|
430
|
-
}
|
|
626
|
+
field: string;
|
|
431
627
|
|
|
432
|
-
|
|
433
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
434
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
435
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
436
|
-
*/
|
|
437
|
-
export interface EthereumCalldataCondition {
|
|
438
|
-
abi: unknown;
|
|
628
|
+
field_source: 'ethereum_calldata';
|
|
439
629
|
|
|
440
|
-
|
|
630
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
441
631
|
|
|
442
|
-
|
|
632
|
+
value: string | Array<string>;
|
|
633
|
+
}
|
|
443
634
|
|
|
444
|
-
|
|
635
|
+
/**
|
|
636
|
+
* Attributes from the signing domain that will verify the signature.
|
|
637
|
+
*/
|
|
638
|
+
export interface EthereumTypedDataDomainCondition {
|
|
639
|
+
field: 'chainId' | 'verifyingContract' | 'chain_id' | 'verifying_contract';
|
|
445
640
|
|
|
446
|
-
|
|
447
|
-
}
|
|
641
|
+
field_source: 'ethereum_typed_data_domain';
|
|
448
642
|
|
|
449
|
-
|
|
450
|
-
* Attributes from the signing domain that will verify the signature.
|
|
451
|
-
*/
|
|
452
|
-
export interface EthereumTypedDataDomainCondition {
|
|
453
|
-
field: 'chainId' | 'verifyingContract';
|
|
643
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
454
644
|
|
|
455
|
-
|
|
645
|
+
value: string | Array<string>;
|
|
646
|
+
}
|
|
456
647
|
|
|
457
|
-
|
|
648
|
+
/**
|
|
649
|
+
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
650
|
+
* EIP-712.
|
|
651
|
+
*/
|
|
652
|
+
export interface EthereumTypedDataMessageCondition {
|
|
653
|
+
field: string;
|
|
458
654
|
|
|
459
|
-
|
|
460
|
-
}
|
|
655
|
+
field_source: 'ethereum_typed_data_message';
|
|
461
656
|
|
|
462
|
-
|
|
463
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
464
|
-
* EIP-712.
|
|
465
|
-
*/
|
|
466
|
-
export interface EthereumTypedDataMessageCondition {
|
|
467
|
-
field: string;
|
|
657
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
468
658
|
|
|
469
|
-
|
|
659
|
+
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
470
660
|
|
|
471
|
-
|
|
661
|
+
value: string | Array<string>;
|
|
662
|
+
}
|
|
472
663
|
|
|
473
|
-
|
|
664
|
+
export namespace EthereumTypedDataMessageCondition {
|
|
665
|
+
export interface TypedData {
|
|
666
|
+
primary_type: string;
|
|
474
667
|
|
|
475
|
-
|
|
668
|
+
/**
|
|
669
|
+
* The type definitions for EIP-712 typed data signing.
|
|
670
|
+
*/
|
|
671
|
+
types: WalletsAPI.TypedDataTypesInputParams;
|
|
476
672
|
}
|
|
673
|
+
}
|
|
477
674
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
}
|
|
675
|
+
/**
|
|
676
|
+
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
677
|
+
*/
|
|
678
|
+
export interface Ethereum7702AuthorizationCondition {
|
|
679
|
+
field: 'contract';
|
|
484
680
|
|
|
485
|
-
|
|
486
|
-
export interface Type {
|
|
487
|
-
name: string;
|
|
681
|
+
field_source: 'ethereum_7702_authorization';
|
|
488
682
|
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
496
|
-
*/
|
|
497
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
498
|
-
field: 'contract';
|
|
499
|
-
|
|
500
|
-
field_source: 'ethereum_7702_authorization';
|
|
501
|
-
|
|
502
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
503
|
-
|
|
504
|
-
value: string | Array<string>;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
509
|
-
*/
|
|
510
|
-
export interface SolanaProgramInstructionCondition {
|
|
511
|
-
field: 'programId';
|
|
512
|
-
|
|
513
|
-
field_source: 'solana_program_instruction';
|
|
514
|
-
|
|
515
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
516
|
-
|
|
517
|
-
value: string | Array<string>;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
522
|
-
* fields.
|
|
523
|
-
*/
|
|
524
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
525
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
526
|
-
|
|
527
|
-
field_source: 'solana_system_program_instruction';
|
|
528
|
-
|
|
529
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
530
|
-
|
|
531
|
-
value: string | Array<string>;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
536
|
-
* instruction fields.
|
|
537
|
-
*/
|
|
538
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
539
|
-
field:
|
|
540
|
-
| 'instructionName'
|
|
541
|
-
| 'TransferChecked.source'
|
|
542
|
-
| 'TransferChecked.destination'
|
|
543
|
-
| 'TransferChecked.authority'
|
|
544
|
-
| 'TransferChecked.amount'
|
|
545
|
-
| 'TransferChecked.mint';
|
|
546
|
-
|
|
547
|
-
field_source: 'solana_token_program_instruction';
|
|
548
|
-
|
|
549
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
550
|
-
|
|
551
|
-
value: string | Array<string>;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
556
|
-
*/
|
|
557
|
-
export interface SystemCondition {
|
|
558
|
-
field: 'current_unix_timestamp';
|
|
559
|
-
|
|
560
|
-
field_source: 'system';
|
|
561
|
-
|
|
562
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
563
|
-
|
|
564
|
-
value: string | Array<string>;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* A rule that defines the conditions and action to take if the conditions are
|
|
571
|
-
* true.
|
|
572
|
-
*/
|
|
573
|
-
export interface PolicyCreateRuleResponse {
|
|
574
|
-
id: string;
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* Action to take if the conditions are true.
|
|
578
|
-
*/
|
|
579
|
-
action: 'ALLOW' | 'DENY';
|
|
580
|
-
|
|
581
|
-
conditions: Array<
|
|
582
|
-
| PolicyCreateRuleResponse.EthereumTransactionCondition
|
|
583
|
-
| PolicyCreateRuleResponse.EthereumCalldataCondition
|
|
584
|
-
| PolicyCreateRuleResponse.EthereumTypedDataDomainCondition
|
|
585
|
-
| PolicyCreateRuleResponse.EthereumTypedDataMessageCondition
|
|
586
|
-
| PolicyCreateRuleResponse.Ethereum7702AuthorizationCondition
|
|
587
|
-
| PolicyCreateRuleResponse.SolanaProgramInstructionCondition
|
|
588
|
-
| PolicyCreateRuleResponse.SolanaSystemProgramInstructionCondition
|
|
589
|
-
| PolicyCreateRuleResponse.SolanaTokenProgramInstructionCondition
|
|
590
|
-
| PolicyCreateRuleResponse.SystemCondition
|
|
591
|
-
| TronTransactionCondition
|
|
592
|
-
| SuiTransactionCommandCondition
|
|
593
|
-
| SuiTransferObjectsCommandCondition
|
|
594
|
-
>;
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Method the rule applies to.
|
|
598
|
-
*/
|
|
599
|
-
method:
|
|
600
|
-
| 'eth_sendTransaction'
|
|
601
|
-
| 'eth_signTransaction'
|
|
602
|
-
| 'eth_signUserOperation'
|
|
603
|
-
| 'eth_signTypedData_v4'
|
|
604
|
-
| 'eth_sign7702Authorization'
|
|
605
|
-
| 'signTransaction'
|
|
606
|
-
| 'signAndSendTransaction'
|
|
607
|
-
| 'exportPrivateKey'
|
|
608
|
-
| 'signTransactionBytes'
|
|
609
|
-
| '*';
|
|
610
|
-
|
|
611
|
-
name: string;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
export namespace PolicyCreateRuleResponse {
|
|
615
|
-
/**
|
|
616
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
617
|
-
* eth_sendTransaction request.
|
|
618
|
-
*/
|
|
619
|
-
export interface EthereumTransactionCondition {
|
|
620
|
-
field: 'to' | 'value' | 'chain_id';
|
|
621
|
-
|
|
622
|
-
field_source: 'ethereum_transaction';
|
|
623
|
-
|
|
624
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
625
|
-
|
|
626
|
-
value: string | Array<string>;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
631
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
632
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
633
|
-
*/
|
|
634
|
-
export interface EthereumCalldataCondition {
|
|
635
|
-
abi: unknown;
|
|
636
|
-
|
|
637
|
-
field: string;
|
|
638
|
-
|
|
639
|
-
field_source: 'ethereum_calldata';
|
|
640
|
-
|
|
641
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
642
|
-
|
|
643
|
-
value: string | Array<string>;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Attributes from the signing domain that will verify the signature.
|
|
648
|
-
*/
|
|
649
|
-
export interface EthereumTypedDataDomainCondition {
|
|
650
|
-
field: 'chainId' | 'verifyingContract';
|
|
651
|
-
|
|
652
|
-
field_source: 'ethereum_typed_data_domain';
|
|
653
|
-
|
|
654
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
655
|
-
|
|
656
|
-
value: string | Array<string>;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
661
|
-
* EIP-712.
|
|
662
|
-
*/
|
|
663
|
-
export interface EthereumTypedDataMessageCondition {
|
|
664
|
-
field: string;
|
|
665
|
-
|
|
666
|
-
field_source: 'ethereum_typed_data_message';
|
|
667
|
-
|
|
668
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
669
|
-
|
|
670
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
671
|
-
|
|
672
|
-
value: string | Array<string>;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
export namespace EthereumTypedDataMessageCondition {
|
|
676
|
-
export interface TypedData {
|
|
677
|
-
primary_type: string;
|
|
678
|
-
|
|
679
|
-
types: { [key: string]: Array<TypedData.Type> };
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
export namespace TypedData {
|
|
683
|
-
export interface Type {
|
|
684
|
-
name: string;
|
|
685
|
-
|
|
686
|
-
type: string;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
693
|
-
*/
|
|
694
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
695
|
-
field: 'contract';
|
|
696
|
-
|
|
697
|
-
field_source: 'ethereum_7702_authorization';
|
|
698
|
-
|
|
699
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
683
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
700
684
|
|
|
701
685
|
value: string | Array<string>;
|
|
702
686
|
}
|
|
@@ -735,11 +719,29 @@ export namespace PolicyCreateRuleResponse {
|
|
|
735
719
|
export interface SolanaTokenProgramInstructionCondition {
|
|
736
720
|
field:
|
|
737
721
|
| 'instructionName'
|
|
722
|
+
| 'Transfer.source'
|
|
723
|
+
| 'Transfer.destination'
|
|
724
|
+
| 'Transfer.authority'
|
|
725
|
+
| 'Transfer.amount'
|
|
738
726
|
| 'TransferChecked.source'
|
|
739
727
|
| 'TransferChecked.destination'
|
|
740
728
|
| 'TransferChecked.authority'
|
|
741
729
|
| 'TransferChecked.amount'
|
|
742
|
-
| 'TransferChecked.mint'
|
|
730
|
+
| 'TransferChecked.mint'
|
|
731
|
+
| 'Burn.account'
|
|
732
|
+
| 'Burn.mint'
|
|
733
|
+
| 'Burn.authority'
|
|
734
|
+
| 'Burn.amount'
|
|
735
|
+
| 'MintTo.mint'
|
|
736
|
+
| 'MintTo.account'
|
|
737
|
+
| 'MintTo.authority'
|
|
738
|
+
| 'MintTo.amount'
|
|
739
|
+
| 'CloseAccount.account'
|
|
740
|
+
| 'CloseAccount.destination'
|
|
741
|
+
| 'CloseAccount.authority'
|
|
742
|
+
| 'InitializeAccount3.account'
|
|
743
|
+
| 'InitializeAccount3.mint'
|
|
744
|
+
| 'InitializeAccount3.owner';
|
|
743
745
|
|
|
744
746
|
field_source: 'solana_token_program_instruction';
|
|
745
747
|
|
|
@@ -762,440 +764,178 @@ export namespace PolicyCreateRuleResponse {
|
|
|
762
764
|
}
|
|
763
765
|
}
|
|
764
766
|
|
|
765
|
-
|
|
767
|
+
/**
|
|
768
|
+
* Method the rule applies to.
|
|
769
|
+
*/
|
|
770
|
+
export type PolicyMethod =
|
|
771
|
+
| 'eth_sendTransaction'
|
|
772
|
+
| 'eth_signTransaction'
|
|
773
|
+
| 'eth_signUserOperation'
|
|
774
|
+
| 'eth_signTypedData_v4'
|
|
775
|
+
| 'eth_sign7702Authorization'
|
|
776
|
+
| 'wallet_sendCalls'
|
|
777
|
+
| 'signTransaction'
|
|
778
|
+
| 'signAndSendTransaction'
|
|
779
|
+
| 'exportPrivateKey'
|
|
780
|
+
| 'exportSeedPhrase'
|
|
781
|
+
| 'signTransactionBytes'
|
|
782
|
+
| '*';
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* The rules that apply to each method the policy covers.
|
|
786
|
+
*/
|
|
787
|
+
export interface PolicyRuleRequestBody {
|
|
766
788
|
/**
|
|
767
|
-
*
|
|
789
|
+
* The action to take when a policy rule matches.
|
|
768
790
|
*/
|
|
769
|
-
|
|
770
|
-
|
|
791
|
+
action: PolicyAction;
|
|
792
|
+
|
|
793
|
+
conditions: Array<PolicyCondition>;
|
|
771
794
|
|
|
772
|
-
export interface PolicyDeleteRuleResponse {
|
|
773
795
|
/**
|
|
774
|
-
*
|
|
796
|
+
* Method the rule applies to.
|
|
775
797
|
*/
|
|
776
|
-
|
|
798
|
+
method: PolicyMethod;
|
|
799
|
+
|
|
800
|
+
name: string;
|
|
777
801
|
}
|
|
778
802
|
|
|
779
|
-
|
|
803
|
+
/**
|
|
804
|
+
* A rule that defines the conditions and action to take if the conditions are
|
|
805
|
+
* true.
|
|
806
|
+
*/
|
|
807
|
+
export interface PolicyRuleResponse {
|
|
780
808
|
id: string;
|
|
781
809
|
|
|
782
810
|
/**
|
|
783
|
-
*
|
|
811
|
+
* The action to take when a policy rule matches.
|
|
784
812
|
*/
|
|
785
|
-
action:
|
|
813
|
+
action: PolicyAction;
|
|
786
814
|
|
|
787
|
-
conditions: Array<
|
|
788
|
-
| PolicyUpdateRuleResponse.EthereumTransactionCondition
|
|
789
|
-
| PolicyUpdateRuleResponse.EthereumCalldataCondition
|
|
790
|
-
| PolicyUpdateRuleResponse.EthereumTypedDataDomainCondition
|
|
791
|
-
| PolicyUpdateRuleResponse.EthereumTypedDataMessageCondition
|
|
792
|
-
| PolicyUpdateRuleResponse.Ethereum7702AuthorizationCondition
|
|
793
|
-
| PolicyUpdateRuleResponse.SolanaProgramInstructionCondition
|
|
794
|
-
| PolicyUpdateRuleResponse.SolanaSystemProgramInstructionCondition
|
|
795
|
-
| PolicyUpdateRuleResponse.SolanaTokenProgramInstructionCondition
|
|
796
|
-
| PolicyUpdateRuleResponse.SystemCondition
|
|
797
|
-
| TronTransactionCondition
|
|
798
|
-
| SuiTransactionCommandCondition
|
|
799
|
-
| SuiTransferObjectsCommandCondition
|
|
800
|
-
>;
|
|
815
|
+
conditions: Array<PolicyCondition>;
|
|
801
816
|
|
|
802
817
|
/**
|
|
803
818
|
* Method the rule applies to.
|
|
804
819
|
*/
|
|
805
|
-
method:
|
|
806
|
-
| 'eth_sendTransaction'
|
|
807
|
-
| 'eth_signTransaction'
|
|
808
|
-
| 'eth_signUserOperation'
|
|
809
|
-
| 'eth_signTypedData_v4'
|
|
810
|
-
| 'eth_sign7702Authorization'
|
|
811
|
-
| 'signTransaction'
|
|
812
|
-
| 'signAndSendTransaction'
|
|
813
|
-
| 'exportPrivateKey'
|
|
814
|
-
| 'signTransactionBytes'
|
|
815
|
-
| '*';
|
|
820
|
+
method: PolicyMethod;
|
|
816
821
|
|
|
817
822
|
name: string;
|
|
818
823
|
}
|
|
819
824
|
|
|
820
|
-
|
|
825
|
+
/**
|
|
826
|
+
* A policy for controlling wallet operations.
|
|
827
|
+
*/
|
|
828
|
+
export interface Policy {
|
|
821
829
|
/**
|
|
822
|
-
*
|
|
823
|
-
*
|
|
830
|
+
* Unique ID of the created policy. This will be the primary identifier when using
|
|
831
|
+
* the policy in the future.
|
|
824
832
|
*/
|
|
825
|
-
|
|
826
|
-
field: 'to' | 'value' | 'chain_id';
|
|
827
|
-
|
|
828
|
-
field_source: 'ethereum_transaction';
|
|
829
|
-
|
|
830
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
831
|
-
|
|
832
|
-
value: string | Array<string>;
|
|
833
|
-
}
|
|
833
|
+
id: string;
|
|
834
834
|
|
|
835
835
|
/**
|
|
836
|
-
* The
|
|
837
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
838
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
836
|
+
* The wallet chain types.
|
|
839
837
|
*/
|
|
840
|
-
|
|
841
|
-
abi: unknown;
|
|
838
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
842
839
|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
848
|
-
|
|
849
|
-
value: string | Array<string>;
|
|
850
|
-
}
|
|
840
|
+
/**
|
|
841
|
+
* Unix timestamp of when the policy was created in milliseconds.
|
|
842
|
+
*/
|
|
843
|
+
created_at: number;
|
|
851
844
|
|
|
852
845
|
/**
|
|
853
|
-
*
|
|
846
|
+
* Name to assign to policy.
|
|
854
847
|
*/
|
|
855
|
-
|
|
856
|
-
field: 'chainId' | 'verifyingContract';
|
|
848
|
+
name: string;
|
|
857
849
|
|
|
858
|
-
|
|
850
|
+
/**
|
|
851
|
+
* The key quorum ID of the owner of the policy.
|
|
852
|
+
*/
|
|
853
|
+
owner_id: string | null;
|
|
859
854
|
|
|
860
|
-
|
|
855
|
+
rules: Array<PolicyRuleResponse>;
|
|
861
856
|
|
|
862
|
-
|
|
863
|
-
|
|
857
|
+
/**
|
|
858
|
+
* Version of the policy. Currently, 1.0 is the only version.
|
|
859
|
+
*/
|
|
860
|
+
version: '1.0';
|
|
861
|
+
}
|
|
864
862
|
|
|
863
|
+
/**
|
|
864
|
+
* Headers required to authorize modifications to policies.
|
|
865
|
+
*/
|
|
866
|
+
export interface PolicyAuthorizationHeaders {
|
|
865
867
|
/**
|
|
866
|
-
*
|
|
867
|
-
* EIP-712.
|
|
868
|
+
* ID of your Privy app.
|
|
868
869
|
*/
|
|
869
|
-
|
|
870
|
-
field: string;
|
|
870
|
+
'privy-app-id': string;
|
|
871
871
|
|
|
872
|
-
|
|
872
|
+
/**
|
|
873
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
874
|
+
* should be comma separated.
|
|
875
|
+
*/
|
|
876
|
+
'privy-authorization-signature'?: string;
|
|
873
877
|
|
|
874
|
-
|
|
878
|
+
/**
|
|
879
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
880
|
+
* deadline by which the request must be processed.
|
|
881
|
+
*/
|
|
882
|
+
'privy-request-expiry'?: string;
|
|
883
|
+
}
|
|
875
884
|
|
|
876
|
-
|
|
885
|
+
/**
|
|
886
|
+
* Headers required to authorize modifications to condition sets.
|
|
887
|
+
*/
|
|
888
|
+
export interface ConditionSetAuthorizationHeaders {
|
|
889
|
+
/**
|
|
890
|
+
* ID of your Privy app.
|
|
891
|
+
*/
|
|
892
|
+
'privy-app-id': string;
|
|
877
893
|
|
|
878
|
-
|
|
879
|
-
|
|
894
|
+
/**
|
|
895
|
+
* Request authorization signature. If multiple signatures are required, they
|
|
896
|
+
* should be comma separated.
|
|
897
|
+
*/
|
|
898
|
+
'privy-authorization-signature'?: string;
|
|
880
899
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
900
|
+
/**
|
|
901
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
902
|
+
* deadline by which the request must be processed.
|
|
903
|
+
*/
|
|
904
|
+
'privy-request-expiry'?: string;
|
|
905
|
+
}
|
|
884
906
|
|
|
885
|
-
|
|
886
|
-
|
|
907
|
+
export interface PolicyCreateParams {
|
|
908
|
+
/**
|
|
909
|
+
* Body param: The wallet chain types.
|
|
910
|
+
*/
|
|
911
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
887
912
|
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
913
|
+
/**
|
|
914
|
+
* Body param: Name to assign to policy.
|
|
915
|
+
*/
|
|
916
|
+
name: string;
|
|
891
917
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
918
|
+
/**
|
|
919
|
+
* Body param
|
|
920
|
+
*/
|
|
921
|
+
rules: Array<PolicyCreateParams.Rule>;
|
|
896
922
|
|
|
897
923
|
/**
|
|
898
|
-
*
|
|
924
|
+
* Body param: Version of the policy. Currently, 1.0 is the only version.
|
|
899
925
|
*/
|
|
900
|
-
|
|
901
|
-
field: 'contract';
|
|
926
|
+
version: '1.0';
|
|
902
927
|
|
|
903
|
-
|
|
928
|
+
/**
|
|
929
|
+
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
930
|
+
* public key, or null to remove the current owner.
|
|
931
|
+
*/
|
|
932
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
904
933
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
/**
|
|
911
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
912
|
-
*/
|
|
913
|
-
export interface SolanaProgramInstructionCondition {
|
|
914
|
-
field: 'programId';
|
|
915
|
-
|
|
916
|
-
field_source: 'solana_program_instruction';
|
|
917
|
-
|
|
918
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
919
|
-
|
|
920
|
-
value: string | Array<string>;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
925
|
-
* fields.
|
|
926
|
-
*/
|
|
927
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
928
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
929
|
-
|
|
930
|
-
field_source: 'solana_system_program_instruction';
|
|
931
|
-
|
|
932
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
933
|
-
|
|
934
|
-
value: string | Array<string>;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
939
|
-
* instruction fields.
|
|
940
|
-
*/
|
|
941
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
942
|
-
field:
|
|
943
|
-
| 'instructionName'
|
|
944
|
-
| 'TransferChecked.source'
|
|
945
|
-
| 'TransferChecked.destination'
|
|
946
|
-
| 'TransferChecked.authority'
|
|
947
|
-
| 'TransferChecked.amount'
|
|
948
|
-
| 'TransferChecked.mint';
|
|
949
|
-
|
|
950
|
-
field_source: 'solana_token_program_instruction';
|
|
951
|
-
|
|
952
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
953
|
-
|
|
954
|
-
value: string | Array<string>;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
/**
|
|
958
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
959
|
-
*/
|
|
960
|
-
export interface SystemCondition {
|
|
961
|
-
field: 'current_unix_timestamp';
|
|
962
|
-
|
|
963
|
-
field_source: 'system';
|
|
964
|
-
|
|
965
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
966
|
-
|
|
967
|
-
value: string | Array<string>;
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
/**
|
|
972
|
-
* A rule that defines the conditions and action to take if the conditions are
|
|
973
|
-
* true.
|
|
974
|
-
*/
|
|
975
|
-
export interface PolicyGetRuleResponse {
|
|
976
|
-
id: string;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Action to take if the conditions are true.
|
|
980
|
-
*/
|
|
981
|
-
action: 'ALLOW' | 'DENY';
|
|
982
|
-
|
|
983
|
-
conditions: Array<
|
|
984
|
-
| PolicyGetRuleResponse.EthereumTransactionCondition
|
|
985
|
-
| PolicyGetRuleResponse.EthereumCalldataCondition
|
|
986
|
-
| PolicyGetRuleResponse.EthereumTypedDataDomainCondition
|
|
987
|
-
| PolicyGetRuleResponse.EthereumTypedDataMessageCondition
|
|
988
|
-
| PolicyGetRuleResponse.Ethereum7702AuthorizationCondition
|
|
989
|
-
| PolicyGetRuleResponse.SolanaProgramInstructionCondition
|
|
990
|
-
| PolicyGetRuleResponse.SolanaSystemProgramInstructionCondition
|
|
991
|
-
| PolicyGetRuleResponse.SolanaTokenProgramInstructionCondition
|
|
992
|
-
| PolicyGetRuleResponse.SystemCondition
|
|
993
|
-
| TronTransactionCondition
|
|
994
|
-
| SuiTransactionCommandCondition
|
|
995
|
-
| SuiTransferObjectsCommandCondition
|
|
996
|
-
>;
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* Method the rule applies to.
|
|
1000
|
-
*/
|
|
1001
|
-
method:
|
|
1002
|
-
| 'eth_sendTransaction'
|
|
1003
|
-
| 'eth_signTransaction'
|
|
1004
|
-
| 'eth_signUserOperation'
|
|
1005
|
-
| 'eth_signTypedData_v4'
|
|
1006
|
-
| 'eth_sign7702Authorization'
|
|
1007
|
-
| 'signTransaction'
|
|
1008
|
-
| 'signAndSendTransaction'
|
|
1009
|
-
| 'exportPrivateKey'
|
|
1010
|
-
| 'signTransactionBytes'
|
|
1011
|
-
| '*';
|
|
1012
|
-
|
|
1013
|
-
name: string;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
export namespace PolicyGetRuleResponse {
|
|
1017
|
-
/**
|
|
1018
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1019
|
-
* eth_sendTransaction request.
|
|
1020
|
-
*/
|
|
1021
|
-
export interface EthereumTransactionCondition {
|
|
1022
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1023
|
-
|
|
1024
|
-
field_source: 'ethereum_transaction';
|
|
1025
|
-
|
|
1026
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1027
|
-
|
|
1028
|
-
value: string | Array<string>;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1033
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1034
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1035
|
-
*/
|
|
1036
|
-
export interface EthereumCalldataCondition {
|
|
1037
|
-
abi: unknown;
|
|
1038
|
-
|
|
1039
|
-
field: string;
|
|
1040
|
-
|
|
1041
|
-
field_source: 'ethereum_calldata';
|
|
1042
|
-
|
|
1043
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1044
|
-
|
|
1045
|
-
value: string | Array<string>;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1050
|
-
*/
|
|
1051
|
-
export interface EthereumTypedDataDomainCondition {
|
|
1052
|
-
field: 'chainId' | 'verifyingContract';
|
|
1053
|
-
|
|
1054
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1055
|
-
|
|
1056
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1057
|
-
|
|
1058
|
-
value: string | Array<string>;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1063
|
-
* EIP-712.
|
|
1064
|
-
*/
|
|
1065
|
-
export interface EthereumTypedDataMessageCondition {
|
|
1066
|
-
field: string;
|
|
1067
|
-
|
|
1068
|
-
field_source: 'ethereum_typed_data_message';
|
|
1069
|
-
|
|
1070
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1071
|
-
|
|
1072
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1073
|
-
|
|
1074
|
-
value: string | Array<string>;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
export namespace EthereumTypedDataMessageCondition {
|
|
1078
|
-
export interface TypedData {
|
|
1079
|
-
primary_type: string;
|
|
1080
|
-
|
|
1081
|
-
types: { [key: string]: Array<TypedData.Type> };
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
export namespace TypedData {
|
|
1085
|
-
export interface Type {
|
|
1086
|
-
name: string;
|
|
1087
|
-
|
|
1088
|
-
type: string;
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
1095
|
-
*/
|
|
1096
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
1097
|
-
field: 'contract';
|
|
1098
|
-
|
|
1099
|
-
field_source: 'ethereum_7702_authorization';
|
|
1100
|
-
|
|
1101
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1102
|
-
|
|
1103
|
-
value: string | Array<string>;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
/**
|
|
1107
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
1108
|
-
*/
|
|
1109
|
-
export interface SolanaProgramInstructionCondition {
|
|
1110
|
-
field: 'programId';
|
|
1111
|
-
|
|
1112
|
-
field_source: 'solana_program_instruction';
|
|
1113
|
-
|
|
1114
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1115
|
-
|
|
1116
|
-
value: string | Array<string>;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
1121
|
-
* fields.
|
|
1122
|
-
*/
|
|
1123
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
1124
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1125
|
-
|
|
1126
|
-
field_source: 'solana_system_program_instruction';
|
|
1127
|
-
|
|
1128
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1129
|
-
|
|
1130
|
-
value: string | Array<string>;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1135
|
-
* instruction fields.
|
|
1136
|
-
*/
|
|
1137
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
1138
|
-
field:
|
|
1139
|
-
| 'instructionName'
|
|
1140
|
-
| 'TransferChecked.source'
|
|
1141
|
-
| 'TransferChecked.destination'
|
|
1142
|
-
| 'TransferChecked.authority'
|
|
1143
|
-
| 'TransferChecked.amount'
|
|
1144
|
-
| 'TransferChecked.mint';
|
|
1145
|
-
|
|
1146
|
-
field_source: 'solana_token_program_instruction';
|
|
1147
|
-
|
|
1148
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1149
|
-
|
|
1150
|
-
value: string | Array<string>;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
1155
|
-
*/
|
|
1156
|
-
export interface SystemCondition {
|
|
1157
|
-
field: 'current_unix_timestamp';
|
|
1158
|
-
|
|
1159
|
-
field_source: 'system';
|
|
1160
|
-
|
|
1161
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1162
|
-
|
|
1163
|
-
value: string | Array<string>;
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
export interface PolicyCreateParams {
|
|
1168
|
-
/**
|
|
1169
|
-
* Body param: The chain type the policy applies to.
|
|
1170
|
-
*/
|
|
1171
|
-
chain_type: 'ethereum' | 'solana' | 'tron' | 'sui';
|
|
1172
|
-
|
|
1173
|
-
/**
|
|
1174
|
-
* Body param: Name to assign to policy.
|
|
1175
|
-
*/
|
|
1176
|
-
name: string;
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* Body param
|
|
1180
|
-
*/
|
|
1181
|
-
rules: Array<PolicyCreateParams.Rule>;
|
|
1182
|
-
|
|
1183
|
-
/**
|
|
1184
|
-
* Body param: Version of the policy. Currently, 1.0 is the only version.
|
|
1185
|
-
*/
|
|
1186
|
-
version: '1.0';
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
* Body param: The owner of the resource. If you provide this, do not specify an
|
|
1190
|
-
* owner_id as it will be generated automatically. When updating a wallet, you can
|
|
1191
|
-
* set the owner to null to remove the owner.
|
|
1192
|
-
*/
|
|
1193
|
-
owner?: PolicyCreateParams.PublicKeyOwner | PolicyCreateParams.UserOwner | null;
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* Body param
|
|
1197
|
-
*/
|
|
1198
|
-
owner_id?: string | null;
|
|
934
|
+
/**
|
|
935
|
+
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
936
|
+
* provide this, do not specify an owner.
|
|
937
|
+
*/
|
|
938
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
1199
939
|
|
|
1200
940
|
/**
|
|
1201
941
|
* Header param: Idempotency keys ensure API requests are executed only once within
|
|
@@ -1205,418 +945,57 @@ export interface PolicyCreateParams {
|
|
|
1205
945
|
}
|
|
1206
946
|
|
|
1207
947
|
export namespace PolicyCreateParams {
|
|
1208
|
-
/**
|
|
1209
|
-
* The rules that apply to each method the policy covers.
|
|
1210
|
-
*/
|
|
1211
948
|
export interface Rule {
|
|
1212
949
|
/**
|
|
1213
|
-
*
|
|
950
|
+
* The action to take when a policy rule matches.
|
|
1214
951
|
*/
|
|
1215
|
-
action:
|
|
1216
|
-
|
|
1217
|
-
conditions: Array<
|
|
1218
|
-
| Rule.EthereumTransactionCondition
|
|
1219
|
-
| Rule.EthereumCalldataCondition
|
|
1220
|
-
| Rule.EthereumTypedDataDomainCondition
|
|
1221
|
-
| Rule.EthereumTypedDataMessageCondition
|
|
1222
|
-
| Rule.Ethereum7702AuthorizationCondition
|
|
1223
|
-
| Rule.SolanaProgramInstructionCondition
|
|
1224
|
-
| Rule.SolanaSystemProgramInstructionCondition
|
|
1225
|
-
| Rule.SolanaTokenProgramInstructionCondition
|
|
1226
|
-
| Rule.SystemCondition
|
|
1227
|
-
| PoliciesAPI.TronTransactionCondition
|
|
1228
|
-
| PoliciesAPI.SuiTransactionCommandCondition
|
|
1229
|
-
| PoliciesAPI.SuiTransferObjectsCommandCondition
|
|
1230
|
-
>;
|
|
952
|
+
action: PoliciesAPI.PolicyAction;
|
|
953
|
+
|
|
954
|
+
conditions: Array<PoliciesAPI.PolicyCondition>;
|
|
1231
955
|
|
|
1232
956
|
/**
|
|
1233
957
|
* Method the rule applies to.
|
|
1234
958
|
*/
|
|
1235
|
-
method:
|
|
1236
|
-
| 'eth_sendTransaction'
|
|
1237
|
-
| 'eth_signTransaction'
|
|
1238
|
-
| 'eth_signUserOperation'
|
|
1239
|
-
| 'eth_signTypedData_v4'
|
|
1240
|
-
| 'eth_sign7702Authorization'
|
|
1241
|
-
| 'signTransaction'
|
|
1242
|
-
| 'signAndSendTransaction'
|
|
1243
|
-
| 'exportPrivateKey'
|
|
1244
|
-
| 'signTransactionBytes'
|
|
1245
|
-
| '*';
|
|
959
|
+
method: PoliciesAPI.PolicyMethod;
|
|
1246
960
|
|
|
1247
961
|
name: string;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
export namespace Rule {
|
|
1251
|
-
/**
|
|
1252
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1253
|
-
* eth_sendTransaction request.
|
|
1254
|
-
*/
|
|
1255
|
-
export interface EthereumTransactionCondition {
|
|
1256
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1257
|
-
|
|
1258
|
-
field_source: 'ethereum_transaction';
|
|
1259
|
-
|
|
1260
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1261
|
-
|
|
1262
|
-
value: string | Array<string>;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1267
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1268
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1269
|
-
*/
|
|
1270
|
-
export interface EthereumCalldataCondition {
|
|
1271
|
-
abi: unknown;
|
|
1272
|
-
|
|
1273
|
-
field: string;
|
|
1274
|
-
|
|
1275
|
-
field_source: 'ethereum_calldata';
|
|
1276
|
-
|
|
1277
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1278
|
-
|
|
1279
|
-
value: string | Array<string>;
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1284
|
-
*/
|
|
1285
|
-
export interface EthereumTypedDataDomainCondition {
|
|
1286
|
-
field: 'chainId' | 'verifyingContract';
|
|
1287
|
-
|
|
1288
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1289
|
-
|
|
1290
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1291
|
-
|
|
1292
|
-
value: string | Array<string>;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
/**
|
|
1296
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1297
|
-
* EIP-712.
|
|
1298
|
-
*/
|
|
1299
|
-
export interface EthereumTypedDataMessageCondition {
|
|
1300
|
-
field: string;
|
|
1301
|
-
|
|
1302
|
-
field_source: 'ethereum_typed_data_message';
|
|
1303
|
-
|
|
1304
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1305
|
-
|
|
1306
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1307
|
-
|
|
1308
|
-
value: string | Array<string>;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
export namespace EthereumTypedDataMessageCondition {
|
|
1312
|
-
export interface TypedData {
|
|
1313
|
-
primary_type: string;
|
|
1314
|
-
|
|
1315
|
-
types: { [key: string]: Array<TypedData.Type> };
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
export namespace TypedData {
|
|
1319
|
-
export interface Type {
|
|
1320
|
-
name: string;
|
|
1321
|
-
|
|
1322
|
-
type: string;
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
1329
|
-
*/
|
|
1330
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
1331
|
-
field: 'contract';
|
|
1332
|
-
|
|
1333
|
-
field_source: 'ethereum_7702_authorization';
|
|
1334
|
-
|
|
1335
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1336
|
-
|
|
1337
|
-
value: string | Array<string>;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
1342
|
-
*/
|
|
1343
|
-
export interface SolanaProgramInstructionCondition {
|
|
1344
|
-
field: 'programId';
|
|
1345
962
|
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1349
|
-
|
|
1350
|
-
value: string | Array<string>;
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
/**
|
|
1354
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
1355
|
-
* fields.
|
|
1356
|
-
*/
|
|
1357
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
1358
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1359
|
-
|
|
1360
|
-
field_source: 'solana_system_program_instruction';
|
|
1361
|
-
|
|
1362
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1363
|
-
|
|
1364
|
-
value: string | Array<string>;
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
/**
|
|
1368
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1369
|
-
* instruction fields.
|
|
1370
|
-
*/
|
|
1371
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
1372
|
-
field:
|
|
1373
|
-
| 'instructionName'
|
|
1374
|
-
| 'TransferChecked.source'
|
|
1375
|
-
| 'TransferChecked.destination'
|
|
1376
|
-
| 'TransferChecked.authority'
|
|
1377
|
-
| 'TransferChecked.amount'
|
|
1378
|
-
| 'TransferChecked.mint';
|
|
1379
|
-
|
|
1380
|
-
field_source: 'solana_token_program_instruction';
|
|
1381
|
-
|
|
1382
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1383
|
-
|
|
1384
|
-
value: string | Array<string>;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
/**
|
|
1388
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
1389
|
-
*/
|
|
1390
|
-
export interface SystemCondition {
|
|
1391
|
-
field: 'current_unix_timestamp';
|
|
1392
|
-
|
|
1393
|
-
field_source: 'system';
|
|
1394
|
-
|
|
1395
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1396
|
-
|
|
1397
|
-
value: string | Array<string>;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
1403
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
1404
|
-
* automatically.
|
|
1405
|
-
*/
|
|
1406
|
-
export interface PublicKeyOwner {
|
|
1407
|
-
public_key: string;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
/**
|
|
1411
|
-
* The user ID of the owner of the resource. The user must already exist, and this
|
|
1412
|
-
* value must start with "did:privy:". If you provide this, do not specify an
|
|
1413
|
-
* owner_id as it will be generated automatically.
|
|
1414
|
-
*/
|
|
1415
|
-
export interface UserOwner {
|
|
1416
|
-
user_id: string;
|
|
963
|
+
id?: string;
|
|
1417
964
|
}
|
|
1418
965
|
}
|
|
1419
966
|
|
|
1420
967
|
export interface PolicyCreateRuleParams {
|
|
1421
968
|
/**
|
|
1422
|
-
* Body param:
|
|
1423
|
-
*/
|
|
1424
|
-
action: 'ALLOW' | 'DENY';
|
|
1425
|
-
|
|
1426
|
-
/**
|
|
1427
|
-
* Body param
|
|
1428
|
-
*/
|
|
1429
|
-
conditions: Array<
|
|
1430
|
-
| PolicyCreateRuleParams.EthereumTransactionCondition
|
|
1431
|
-
| PolicyCreateRuleParams.EthereumCalldataCondition
|
|
1432
|
-
| PolicyCreateRuleParams.EthereumTypedDataDomainCondition
|
|
1433
|
-
| PolicyCreateRuleParams.EthereumTypedDataMessageCondition
|
|
1434
|
-
| PolicyCreateRuleParams.Ethereum7702AuthorizationCondition
|
|
1435
|
-
| PolicyCreateRuleParams.SolanaProgramInstructionCondition
|
|
1436
|
-
| PolicyCreateRuleParams.SolanaSystemProgramInstructionCondition
|
|
1437
|
-
| PolicyCreateRuleParams.SolanaTokenProgramInstructionCondition
|
|
1438
|
-
| PolicyCreateRuleParams.SystemCondition
|
|
1439
|
-
| TronTransactionCondition
|
|
1440
|
-
| SuiTransactionCommandCondition
|
|
1441
|
-
| SuiTransferObjectsCommandCondition
|
|
1442
|
-
>;
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* Body param: Method the rule applies to.
|
|
1446
|
-
*/
|
|
1447
|
-
method:
|
|
1448
|
-
| 'eth_sendTransaction'
|
|
1449
|
-
| 'eth_signTransaction'
|
|
1450
|
-
| 'eth_signUserOperation'
|
|
1451
|
-
| 'eth_signTypedData_v4'
|
|
1452
|
-
| 'eth_sign7702Authorization'
|
|
1453
|
-
| 'signTransaction'
|
|
1454
|
-
| 'signAndSendTransaction'
|
|
1455
|
-
| 'exportPrivateKey'
|
|
1456
|
-
| 'signTransactionBytes'
|
|
1457
|
-
| '*';
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* Body param
|
|
1461
|
-
*/
|
|
1462
|
-
name: string;
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* Header param: Request authorization signature. If multiple signatures are
|
|
1466
|
-
* required, they should be comma separated.
|
|
1467
|
-
*/
|
|
1468
|
-
'privy-authorization-signature'?: string;
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
export namespace PolicyCreateRuleParams {
|
|
1472
|
-
/**
|
|
1473
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1474
|
-
* eth_sendTransaction request.
|
|
1475
|
-
*/
|
|
1476
|
-
export interface EthereumTransactionCondition {
|
|
1477
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1478
|
-
|
|
1479
|
-
field_source: 'ethereum_transaction';
|
|
1480
|
-
|
|
1481
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1482
|
-
|
|
1483
|
-
value: string | Array<string>;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
/**
|
|
1487
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1488
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1489
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1490
|
-
*/
|
|
1491
|
-
export interface EthereumCalldataCondition {
|
|
1492
|
-
abi: unknown;
|
|
1493
|
-
|
|
1494
|
-
field: string;
|
|
1495
|
-
|
|
1496
|
-
field_source: 'ethereum_calldata';
|
|
1497
|
-
|
|
1498
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1499
|
-
|
|
1500
|
-
value: string | Array<string>;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1505
|
-
*/
|
|
1506
|
-
export interface EthereumTypedDataDomainCondition {
|
|
1507
|
-
field: 'chainId' | 'verifyingContract';
|
|
1508
|
-
|
|
1509
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1510
|
-
|
|
1511
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1512
|
-
|
|
1513
|
-
value: string | Array<string>;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1518
|
-
* EIP-712.
|
|
1519
|
-
*/
|
|
1520
|
-
export interface EthereumTypedDataMessageCondition {
|
|
1521
|
-
field: string;
|
|
1522
|
-
|
|
1523
|
-
field_source: 'ethereum_typed_data_message';
|
|
1524
|
-
|
|
1525
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1526
|
-
|
|
1527
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1528
|
-
|
|
1529
|
-
value: string | Array<string>;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
export namespace EthereumTypedDataMessageCondition {
|
|
1533
|
-
export interface TypedData {
|
|
1534
|
-
primary_type: string;
|
|
1535
|
-
|
|
1536
|
-
types: { [key: string]: Array<TypedData.Type> };
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
export namespace TypedData {
|
|
1540
|
-
export interface Type {
|
|
1541
|
-
name: string;
|
|
1542
|
-
|
|
1543
|
-
type: string;
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
1550
|
-
*/
|
|
1551
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
1552
|
-
field: 'contract';
|
|
1553
|
-
|
|
1554
|
-
field_source: 'ethereum_7702_authorization';
|
|
1555
|
-
|
|
1556
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1557
|
-
|
|
1558
|
-
value: string | Array<string>;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
/**
|
|
1562
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
969
|
+
* Body param: The action to take when a policy rule matches.
|
|
1563
970
|
*/
|
|
1564
|
-
|
|
1565
|
-
field: 'programId';
|
|
1566
|
-
|
|
1567
|
-
field_source: 'solana_program_instruction';
|
|
1568
|
-
|
|
1569
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1570
|
-
|
|
1571
|
-
value: string | Array<string>;
|
|
1572
|
-
}
|
|
971
|
+
action: PolicyAction;
|
|
1573
972
|
|
|
1574
973
|
/**
|
|
1575
|
-
*
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
1579
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1580
|
-
|
|
1581
|
-
field_source: 'solana_system_program_instruction';
|
|
1582
|
-
|
|
1583
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1584
|
-
|
|
1585
|
-
value: string | Array<string>;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
/**
|
|
1589
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1590
|
-
* instruction fields.
|
|
1591
|
-
*/
|
|
1592
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
1593
|
-
field:
|
|
1594
|
-
| 'instructionName'
|
|
1595
|
-
| 'TransferChecked.source'
|
|
1596
|
-
| 'TransferChecked.destination'
|
|
1597
|
-
| 'TransferChecked.authority'
|
|
1598
|
-
| 'TransferChecked.amount'
|
|
1599
|
-
| 'TransferChecked.mint';
|
|
1600
|
-
|
|
1601
|
-
field_source: 'solana_token_program_instruction';
|
|
1602
|
-
|
|
1603
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1604
|
-
|
|
1605
|
-
value: string | Array<string>;
|
|
1606
|
-
}
|
|
974
|
+
* Body param
|
|
975
|
+
*/
|
|
976
|
+
conditions: Array<PolicyCondition>;
|
|
1607
977
|
|
|
1608
978
|
/**
|
|
1609
|
-
*
|
|
979
|
+
* Body param: Method the rule applies to.
|
|
1610
980
|
*/
|
|
1611
|
-
|
|
1612
|
-
field: 'current_unix_timestamp';
|
|
981
|
+
method: PolicyMethod;
|
|
1613
982
|
|
|
1614
|
-
|
|
983
|
+
/**
|
|
984
|
+
* Body param
|
|
985
|
+
*/
|
|
986
|
+
name: string;
|
|
1615
987
|
|
|
1616
|
-
|
|
988
|
+
/**
|
|
989
|
+
* Header param: Request authorization signature. If multiple signatures are
|
|
990
|
+
* required, they should be comma separated.
|
|
991
|
+
*/
|
|
992
|
+
'privy-authorization-signature'?: string;
|
|
1617
993
|
|
|
1618
|
-
|
|
1619
|
-
|
|
994
|
+
/**
|
|
995
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
996
|
+
* representing the deadline by which the request must be processed.
|
|
997
|
+
*/
|
|
998
|
+
'privy-request-expiry'?: string;
|
|
1620
999
|
}
|
|
1621
1000
|
|
|
1622
1001
|
export interface PolicyDeleteParams {
|
|
@@ -1625,6 +1004,12 @@ export interface PolicyDeleteParams {
|
|
|
1625
1004
|
* should be comma separated.
|
|
1626
1005
|
*/
|
|
1627
1006
|
'privy-authorization-signature'?: string;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* Request expiry. Value is a Unix timestamp in milliseconds representing the
|
|
1010
|
+
* deadline by which the request must be processed.
|
|
1011
|
+
*/
|
|
1012
|
+
'privy-request-expiry'?: string;
|
|
1628
1013
|
}
|
|
1629
1014
|
|
|
1630
1015
|
export interface PolicyDeleteRuleParams {
|
|
@@ -1638,6 +1023,12 @@ export interface PolicyDeleteRuleParams {
|
|
|
1638
1023
|
* required, they should be comma separated.
|
|
1639
1024
|
*/
|
|
1640
1025
|
'privy-authorization-signature'?: string;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
1029
|
+
* representing the deadline by which the request must be processed.
|
|
1030
|
+
*/
|
|
1031
|
+
'privy-request-expiry'?: string;
|
|
1641
1032
|
}
|
|
1642
1033
|
|
|
1643
1034
|
export interface PolicyUpdateParams {
|
|
@@ -1647,240 +1038,33 @@ export interface PolicyUpdateParams {
|
|
|
1647
1038
|
name?: string;
|
|
1648
1039
|
|
|
1649
1040
|
/**
|
|
1650
|
-
* Body param: The owner of the resource
|
|
1651
|
-
*
|
|
1652
|
-
* set the owner to null to remove the owner.
|
|
1041
|
+
* Body param: The owner of the resource, specified as a Privy user ID, a P-256
|
|
1042
|
+
* public key, or null to remove the current owner.
|
|
1653
1043
|
*/
|
|
1654
|
-
owner?:
|
|
1044
|
+
owner?: SharedAPI.OwnerInput | null;
|
|
1655
1045
|
|
|
1656
1046
|
/**
|
|
1657
|
-
* Body param
|
|
1047
|
+
* Body param: The key quorum ID to set as the owner of the resource. If you
|
|
1048
|
+
* provide this, do not specify an owner.
|
|
1658
1049
|
*/
|
|
1659
|
-
owner_id?:
|
|
1050
|
+
owner_id?: SharedAPI.OwnerIDInput | null;
|
|
1660
1051
|
|
|
1661
1052
|
/**
|
|
1662
1053
|
* Body param
|
|
1663
1054
|
*/
|
|
1664
|
-
rules?: Array<
|
|
1055
|
+
rules?: Array<PolicyRuleRequestBody>;
|
|
1665
1056
|
|
|
1666
1057
|
/**
|
|
1667
1058
|
* Header param: Request authorization signature. If multiple signatures are
|
|
1668
1059
|
* required, they should be comma separated.
|
|
1669
1060
|
*/
|
|
1670
1061
|
'privy-authorization-signature'?: string;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
export namespace PolicyUpdateParams {
|
|
1674
|
-
/**
|
|
1675
|
-
* The P-256 public key of the owner of the resource, in base64-encoded DER format.
|
|
1676
|
-
* If you provide this, do not specify an owner_id as it will be generated
|
|
1677
|
-
* automatically.
|
|
1678
|
-
*/
|
|
1679
|
-
export interface PublicKeyOwner {
|
|
1680
|
-
public_key: string;
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
/**
|
|
1684
|
-
* The user ID of the owner of the resource. The user must already exist, and this
|
|
1685
|
-
* value must start with "did:privy:". If you provide this, do not specify an
|
|
1686
|
-
* owner_id as it will be generated automatically.
|
|
1687
|
-
*/
|
|
1688
|
-
export interface UserOwner {
|
|
1689
|
-
user_id: string;
|
|
1690
|
-
}
|
|
1691
1062
|
|
|
1692
1063
|
/**
|
|
1693
|
-
*
|
|
1064
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
1065
|
+
* representing the deadline by which the request must be processed.
|
|
1694
1066
|
*/
|
|
1695
|
-
|
|
1696
|
-
/**
|
|
1697
|
-
* Action to take if the conditions are true.
|
|
1698
|
-
*/
|
|
1699
|
-
action: 'ALLOW' | 'DENY';
|
|
1700
|
-
|
|
1701
|
-
conditions: Array<
|
|
1702
|
-
| Rule.EthereumTransactionCondition
|
|
1703
|
-
| Rule.EthereumCalldataCondition
|
|
1704
|
-
| Rule.EthereumTypedDataDomainCondition
|
|
1705
|
-
| Rule.EthereumTypedDataMessageCondition
|
|
1706
|
-
| Rule.Ethereum7702AuthorizationCondition
|
|
1707
|
-
| Rule.SolanaProgramInstructionCondition
|
|
1708
|
-
| Rule.SolanaSystemProgramInstructionCondition
|
|
1709
|
-
| Rule.SolanaTokenProgramInstructionCondition
|
|
1710
|
-
| Rule.SystemCondition
|
|
1711
|
-
| PoliciesAPI.TronTransactionCondition
|
|
1712
|
-
| PoliciesAPI.SuiTransactionCommandCondition
|
|
1713
|
-
| PoliciesAPI.SuiTransferObjectsCommandCondition
|
|
1714
|
-
>;
|
|
1715
|
-
|
|
1716
|
-
/**
|
|
1717
|
-
* Method the rule applies to.
|
|
1718
|
-
*/
|
|
1719
|
-
method:
|
|
1720
|
-
| 'eth_sendTransaction'
|
|
1721
|
-
| 'eth_signTransaction'
|
|
1722
|
-
| 'eth_signUserOperation'
|
|
1723
|
-
| 'eth_signTypedData_v4'
|
|
1724
|
-
| 'eth_sign7702Authorization'
|
|
1725
|
-
| 'signTransaction'
|
|
1726
|
-
| 'signAndSendTransaction'
|
|
1727
|
-
| 'exportPrivateKey'
|
|
1728
|
-
| 'signTransactionBytes'
|
|
1729
|
-
| '*';
|
|
1730
|
-
|
|
1731
|
-
name: string;
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
export namespace Rule {
|
|
1735
|
-
/**
|
|
1736
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1737
|
-
* eth_sendTransaction request.
|
|
1738
|
-
*/
|
|
1739
|
-
export interface EthereumTransactionCondition {
|
|
1740
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1741
|
-
|
|
1742
|
-
field_source: 'ethereum_transaction';
|
|
1743
|
-
|
|
1744
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1745
|
-
|
|
1746
|
-
value: string | Array<string>;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1751
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1752
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1753
|
-
*/
|
|
1754
|
-
export interface EthereumCalldataCondition {
|
|
1755
|
-
abi: unknown;
|
|
1756
|
-
|
|
1757
|
-
field: string;
|
|
1758
|
-
|
|
1759
|
-
field_source: 'ethereum_calldata';
|
|
1760
|
-
|
|
1761
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1762
|
-
|
|
1763
|
-
value: string | Array<string>;
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
/**
|
|
1767
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1768
|
-
*/
|
|
1769
|
-
export interface EthereumTypedDataDomainCondition {
|
|
1770
|
-
field: 'chainId' | 'verifyingContract';
|
|
1771
|
-
|
|
1772
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1773
|
-
|
|
1774
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1775
|
-
|
|
1776
|
-
value: string | Array<string>;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
/**
|
|
1780
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1781
|
-
* EIP-712.
|
|
1782
|
-
*/
|
|
1783
|
-
export interface EthereumTypedDataMessageCondition {
|
|
1784
|
-
field: string;
|
|
1785
|
-
|
|
1786
|
-
field_source: 'ethereum_typed_data_message';
|
|
1787
|
-
|
|
1788
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1789
|
-
|
|
1790
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1791
|
-
|
|
1792
|
-
value: string | Array<string>;
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
export namespace EthereumTypedDataMessageCondition {
|
|
1796
|
-
export interface TypedData {
|
|
1797
|
-
primary_type: string;
|
|
1798
|
-
|
|
1799
|
-
types: { [key: string]: Array<TypedData.Type> };
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
export namespace TypedData {
|
|
1803
|
-
export interface Type {
|
|
1804
|
-
name: string;
|
|
1805
|
-
|
|
1806
|
-
type: string;
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
1813
|
-
*/
|
|
1814
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
1815
|
-
field: 'contract';
|
|
1816
|
-
|
|
1817
|
-
field_source: 'ethereum_7702_authorization';
|
|
1818
|
-
|
|
1819
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1820
|
-
|
|
1821
|
-
value: string | Array<string>;
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
/**
|
|
1825
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
1826
|
-
*/
|
|
1827
|
-
export interface SolanaProgramInstructionCondition {
|
|
1828
|
-
field: 'programId';
|
|
1829
|
-
|
|
1830
|
-
field_source: 'solana_program_instruction';
|
|
1831
|
-
|
|
1832
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1833
|
-
|
|
1834
|
-
value: string | Array<string>;
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
/**
|
|
1838
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
1839
|
-
* fields.
|
|
1840
|
-
*/
|
|
1841
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
1842
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
1843
|
-
|
|
1844
|
-
field_source: 'solana_system_program_instruction';
|
|
1845
|
-
|
|
1846
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1847
|
-
|
|
1848
|
-
value: string | Array<string>;
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
1853
|
-
* instruction fields.
|
|
1854
|
-
*/
|
|
1855
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
1856
|
-
field:
|
|
1857
|
-
| 'instructionName'
|
|
1858
|
-
| 'TransferChecked.source'
|
|
1859
|
-
| 'TransferChecked.destination'
|
|
1860
|
-
| 'TransferChecked.authority'
|
|
1861
|
-
| 'TransferChecked.amount'
|
|
1862
|
-
| 'TransferChecked.mint';
|
|
1863
|
-
|
|
1864
|
-
field_source: 'solana_token_program_instruction';
|
|
1865
|
-
|
|
1866
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1867
|
-
|
|
1868
|
-
value: string | Array<string>;
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
/**
|
|
1872
|
-
* System attributes, including current unix timestamp (in seconds).
|
|
1873
|
-
*/
|
|
1874
|
-
export interface SystemCondition {
|
|
1875
|
-
field: 'current_unix_timestamp';
|
|
1876
|
-
|
|
1877
|
-
field_source: 'system';
|
|
1878
|
-
|
|
1879
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1880
|
-
|
|
1881
|
-
value: string | Array<string>;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1067
|
+
'privy-request-expiry'?: string;
|
|
1884
1068
|
}
|
|
1885
1069
|
|
|
1886
1070
|
export interface PolicyUpdateRuleParams {
|
|
@@ -1890,42 +1074,19 @@ export interface PolicyUpdateRuleParams {
|
|
|
1890
1074
|
policy_id: string;
|
|
1891
1075
|
|
|
1892
1076
|
/**
|
|
1893
|
-
* Body param:
|
|
1077
|
+
* Body param: The action to take when a policy rule matches.
|
|
1894
1078
|
*/
|
|
1895
|
-
action:
|
|
1079
|
+
action: PolicyAction;
|
|
1896
1080
|
|
|
1897
1081
|
/**
|
|
1898
1082
|
* Body param
|
|
1899
1083
|
*/
|
|
1900
|
-
conditions: Array<
|
|
1901
|
-
| PolicyUpdateRuleParams.EthereumTransactionCondition
|
|
1902
|
-
| PolicyUpdateRuleParams.EthereumCalldataCondition
|
|
1903
|
-
| PolicyUpdateRuleParams.EthereumTypedDataDomainCondition
|
|
1904
|
-
| PolicyUpdateRuleParams.EthereumTypedDataMessageCondition
|
|
1905
|
-
| PolicyUpdateRuleParams.Ethereum7702AuthorizationCondition
|
|
1906
|
-
| PolicyUpdateRuleParams.SolanaProgramInstructionCondition
|
|
1907
|
-
| PolicyUpdateRuleParams.SolanaSystemProgramInstructionCondition
|
|
1908
|
-
| PolicyUpdateRuleParams.SolanaTokenProgramInstructionCondition
|
|
1909
|
-
| PolicyUpdateRuleParams.SystemCondition
|
|
1910
|
-
| TronTransactionCondition
|
|
1911
|
-
| SuiTransactionCommandCondition
|
|
1912
|
-
| SuiTransferObjectsCommandCondition
|
|
1913
|
-
>;
|
|
1084
|
+
conditions: Array<PolicyCondition>;
|
|
1914
1085
|
|
|
1915
1086
|
/**
|
|
1916
1087
|
* Body param: Method the rule applies to.
|
|
1917
1088
|
*/
|
|
1918
|
-
method:
|
|
1919
|
-
| 'eth_sendTransaction'
|
|
1920
|
-
| 'eth_signTransaction'
|
|
1921
|
-
| 'eth_signUserOperation'
|
|
1922
|
-
| 'eth_signTypedData_v4'
|
|
1923
|
-
| 'eth_sign7702Authorization'
|
|
1924
|
-
| 'signTransaction'
|
|
1925
|
-
| 'signAndSendTransaction'
|
|
1926
|
-
| 'exportPrivateKey'
|
|
1927
|
-
| 'signTransactionBytes'
|
|
1928
|
-
| '*';
|
|
1089
|
+
method: PolicyMethod;
|
|
1929
1090
|
|
|
1930
1091
|
/**
|
|
1931
1092
|
* Body param
|
|
@@ -1937,157 +1098,12 @@ export interface PolicyUpdateRuleParams {
|
|
|
1937
1098
|
* required, they should be comma separated.
|
|
1938
1099
|
*/
|
|
1939
1100
|
'privy-authorization-signature'?: string;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
export namespace PolicyUpdateRuleParams {
|
|
1943
|
-
/**
|
|
1944
|
-
* The verbatim Ethereum transaction object in an eth_signTransaction or
|
|
1945
|
-
* eth_sendTransaction request.
|
|
1946
|
-
*/
|
|
1947
|
-
export interface EthereumTransactionCondition {
|
|
1948
|
-
field: 'to' | 'value' | 'chain_id';
|
|
1949
|
-
|
|
1950
|
-
field_source: 'ethereum_transaction';
|
|
1951
|
-
|
|
1952
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1953
|
-
|
|
1954
|
-
value: string | Array<string>;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
/**
|
|
1958
|
-
* The decoded calldata in a smart contract interaction as the smart contract
|
|
1959
|
-
* method's parameters. Note that that 'ethereum_calldata' conditions must contain
|
|
1960
|
-
* an abi parameter with the JSON ABI of the smart contract.
|
|
1961
|
-
*/
|
|
1962
|
-
export interface EthereumCalldataCondition {
|
|
1963
|
-
abi: unknown;
|
|
1964
|
-
|
|
1965
|
-
field: string;
|
|
1966
|
-
|
|
1967
|
-
field_source: 'ethereum_calldata';
|
|
1968
|
-
|
|
1969
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1970
|
-
|
|
1971
|
-
value: string | Array<string>;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
/**
|
|
1975
|
-
* Attributes from the signing domain that will verify the signature.
|
|
1976
|
-
*/
|
|
1977
|
-
export interface EthereumTypedDataDomainCondition {
|
|
1978
|
-
field: 'chainId' | 'verifyingContract';
|
|
1979
|
-
|
|
1980
|
-
field_source: 'ethereum_typed_data_domain';
|
|
1981
|
-
|
|
1982
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1983
|
-
|
|
1984
|
-
value: string | Array<string>;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
/**
|
|
1988
|
-
* 'types' and 'primary_type' attributes of the TypedData JSON object defined in
|
|
1989
|
-
* EIP-712.
|
|
1990
|
-
*/
|
|
1991
|
-
export interface EthereumTypedDataMessageCondition {
|
|
1992
|
-
field: string;
|
|
1993
|
-
|
|
1994
|
-
field_source: 'ethereum_typed_data_message';
|
|
1995
|
-
|
|
1996
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
1997
|
-
|
|
1998
|
-
typed_data: EthereumTypedDataMessageCondition.TypedData;
|
|
1999
|
-
|
|
2000
|
-
value: string | Array<string>;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
export namespace EthereumTypedDataMessageCondition {
|
|
2004
|
-
export interface TypedData {
|
|
2005
|
-
primary_type: string;
|
|
2006
|
-
|
|
2007
|
-
types: { [key: string]: Array<TypedData.Type> };
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
export namespace TypedData {
|
|
2011
|
-
export interface Type {
|
|
2012
|
-
name: string;
|
|
2013
|
-
|
|
2014
|
-
type: string;
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* Allowed contract addresses for eth_sign7702Authorization requests.
|
|
2021
|
-
*/
|
|
2022
|
-
export interface Ethereum7702AuthorizationCondition {
|
|
2023
|
-
field: 'contract';
|
|
2024
|
-
|
|
2025
|
-
field_source: 'ethereum_7702_authorization';
|
|
2026
|
-
|
|
2027
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
2028
|
-
|
|
2029
|
-
value: string | Array<string>;
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
/**
|
|
2033
|
-
* Solana Program attributes, enables allowlisting Solana Programs.
|
|
2034
|
-
*/
|
|
2035
|
-
export interface SolanaProgramInstructionCondition {
|
|
2036
|
-
field: 'programId';
|
|
2037
|
-
|
|
2038
|
-
field_source: 'solana_program_instruction';
|
|
2039
|
-
|
|
2040
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
2041
|
-
|
|
2042
|
-
value: string | Array<string>;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
/**
|
|
2046
|
-
* Solana System Program attributes, including more granular Transfer instruction
|
|
2047
|
-
* fields.
|
|
2048
|
-
*/
|
|
2049
|
-
export interface SolanaSystemProgramInstructionCondition {
|
|
2050
|
-
field: 'instructionName' | 'Transfer.from' | 'Transfer.to' | 'Transfer.lamports';
|
|
2051
|
-
|
|
2052
|
-
field_source: 'solana_system_program_instruction';
|
|
2053
|
-
|
|
2054
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
2055
|
-
|
|
2056
|
-
value: string | Array<string>;
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* Solana Token Program attributes, including more granular TransferChecked
|
|
2061
|
-
* instruction fields.
|
|
2062
|
-
*/
|
|
2063
|
-
export interface SolanaTokenProgramInstructionCondition {
|
|
2064
|
-
field:
|
|
2065
|
-
| 'instructionName'
|
|
2066
|
-
| 'TransferChecked.source'
|
|
2067
|
-
| 'TransferChecked.destination'
|
|
2068
|
-
| 'TransferChecked.authority'
|
|
2069
|
-
| 'TransferChecked.amount'
|
|
2070
|
-
| 'TransferChecked.mint';
|
|
2071
|
-
|
|
2072
|
-
field_source: 'solana_token_program_instruction';
|
|
2073
|
-
|
|
2074
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
2075
|
-
|
|
2076
|
-
value: string | Array<string>;
|
|
2077
|
-
}
|
|
2078
1101
|
|
|
2079
1102
|
/**
|
|
2080
|
-
*
|
|
1103
|
+
* Header param: Request expiry. Value is a Unix timestamp in milliseconds
|
|
1104
|
+
* representing the deadline by which the request must be processed.
|
|
2081
1105
|
*/
|
|
2082
|
-
|
|
2083
|
-
field: 'current_unix_timestamp';
|
|
2084
|
-
|
|
2085
|
-
field_source: 'system';
|
|
2086
|
-
|
|
2087
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
2088
|
-
|
|
2089
|
-
value: string | Array<string>;
|
|
2090
|
-
}
|
|
1106
|
+
'privy-request-expiry'?: string;
|
|
2091
1107
|
}
|
|
2092
1108
|
|
|
2093
1109
|
export interface PolicyGetRuleParams {
|
|
@@ -2096,17 +1112,33 @@ export interface PolicyGetRuleParams {
|
|
|
2096
1112
|
|
|
2097
1113
|
export declare namespace Policies {
|
|
2098
1114
|
export {
|
|
1115
|
+
type ConditionSetRequestParams as ConditionSetRequestParams,
|
|
1116
|
+
type ConditionSetItemRequestParams as ConditionSetItemRequestParams,
|
|
1117
|
+
type ConditionSetRequestBody as ConditionSetRequestBody,
|
|
1118
|
+
type ConditionSet as ConditionSet,
|
|
1119
|
+
type UpdateConditionSetRequestBody as UpdateConditionSetRequestBody,
|
|
1120
|
+
type ConditionSetItemValueInput as ConditionSetItemValueInput,
|
|
1121
|
+
type ConditionSetItemsRequestBody as ConditionSetItemsRequestBody,
|
|
1122
|
+
type ConditionSetItem as ConditionSetItem,
|
|
1123
|
+
type ConditionSetItems as ConditionSetItems,
|
|
1124
|
+
type ConditionSetItemsResponse as ConditionSetItemsResponse,
|
|
1125
|
+
type PolicyAction as PolicyAction,
|
|
1126
|
+
type AbiParameter as AbiParameter,
|
|
1127
|
+
type AbiSchema as AbiSchema,
|
|
2099
1128
|
type SuiTransactionCommandOperator as SuiTransactionCommandOperator,
|
|
2100
1129
|
type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField,
|
|
2101
1130
|
type TronTransactionCondition as TronTransactionCondition,
|
|
1131
|
+
type TronCalldataCondition as TronCalldataCondition,
|
|
2102
1132
|
type SuiTransactionCommandCondition as SuiTransactionCommandCondition,
|
|
2103
1133
|
type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition,
|
|
1134
|
+
type AggregationCondition as AggregationCondition,
|
|
1135
|
+
type PolicyCondition as PolicyCondition,
|
|
1136
|
+
type PolicyMethod as PolicyMethod,
|
|
1137
|
+
type PolicyRuleRequestBody as PolicyRuleRequestBody,
|
|
1138
|
+
type PolicyRuleResponse as PolicyRuleResponse,
|
|
2104
1139
|
type Policy as Policy,
|
|
2105
|
-
type
|
|
2106
|
-
type
|
|
2107
|
-
type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse,
|
|
2108
|
-
type PolicyUpdateRuleResponse as PolicyUpdateRuleResponse,
|
|
2109
|
-
type PolicyGetRuleResponse as PolicyGetRuleResponse,
|
|
1140
|
+
type PolicyAuthorizationHeaders as PolicyAuthorizationHeaders,
|
|
1141
|
+
type ConditionSetAuthorizationHeaders as ConditionSetAuthorizationHeaders,
|
|
2110
1142
|
type PolicyCreateParams as PolicyCreateParams,
|
|
2111
1143
|
type PolicyCreateRuleParams as PolicyCreateRuleParams,
|
|
2112
1144
|
type PolicyDeleteParams as PolicyDeleteParams,
|