@openfort/openfort-node 0.7.7 → 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 +6 -0
- package/biome.json +2 -1
- package/dist/index.d.mts +4835 -437
- package/dist/index.d.ts +4835 -437
- package/dist/index.js +920 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +802 -114
- package/dist/index.mjs.map +1 -1
- package/examples/README.md +28 -11
- package/examples/{policies → fee-sponsorship}/createPolicy.ts +2 -2
- package/examples/{policies → fee-sponsorship}/createPolicyRule.ts +3 -3
- package/examples/{policies → fee-sponsorship}/disableEnablePolicy.ts +4 -4
- package/examples/fee-sponsorship/getPolicy.ts +30 -0
- package/examples/fee-sponsorship/listPolicies.ts +17 -0
- package/examples/{policies → fee-sponsorship}/listPolicyRules.ts +4 -4
- package/examples/fee-sponsorship/updatePolicy.ts +29 -0
- package/examples/policies/createAccountPolicy.ts +73 -0
- package/examples/policies/createEvmPolicy.ts +149 -0
- package/examples/policies/createSolanaPolicy.ts +176 -0
- package/examples/policies/createTypedDataPolicy.ts +159 -0
- package/examples/policies/deletePolicy.ts +34 -0
- package/examples/policies/getPolicy.ts +24 -13
- package/examples/policies/listPolicies.ts +19 -2
- package/examples/policies/multiRulePolicy.ts +133 -0
- package/examples/policies/updatePolicy.ts +64 -16
- package/examples/policies/validatePolicy.ts +176 -0
- package/examples/transactions/createTransactionIntent.ts +2 -2
- package/examples/transactions/estimateGas.ts +2 -2
- package/examples/transactions/getTransactionIntent.ts +2 -2
- package/openapi.json +2352 -1142
- package/package.json +4 -3
- package/pnpm-workspace.yaml +1 -0
package/dist/index.js
CHANGED
|
@@ -68,6 +68,19 @@ __export(index_exports, {
|
|
|
68
68
|
CreateBackendWalletResponseObject: () => CreateBackendWalletResponseObject,
|
|
69
69
|
CreateEmbeddedRequestAccountType: () => CreateEmbeddedRequestAccountType,
|
|
70
70
|
CreateEmbeddedRequestChainType: () => CreateEmbeddedRequestChainType,
|
|
71
|
+
CreatePolicyBodySchema: () => CreatePolicyBodySchema,
|
|
72
|
+
CreatePolicyV2RequestScope: () => CreatePolicyV2RequestScope,
|
|
73
|
+
CreatePolicyV2RuleRequestAction: () => CreatePolicyV2RuleRequestAction,
|
|
74
|
+
CriteriaOperator: () => CriteriaOperator,
|
|
75
|
+
CriteriaOperatorEQUAL: () => CriteriaOperatorEQUAL,
|
|
76
|
+
CriteriaOperatorGREATERTHAN: () => CriteriaOperatorGREATERTHAN,
|
|
77
|
+
CriteriaOperatorGREATERTHANOREQUAL: () => CriteriaOperatorGREATERTHANOREQUAL,
|
|
78
|
+
CriteriaOperatorIN: () => CriteriaOperatorIN,
|
|
79
|
+
CriteriaOperatorLESSTHAN: () => CriteriaOperatorLESSTHAN,
|
|
80
|
+
CriteriaOperatorLESSTHANOREQUAL: () => CriteriaOperatorLESSTHANOREQUAL,
|
|
81
|
+
CriteriaOperatorMATCH: () => CriteriaOperatorMATCH,
|
|
82
|
+
CriteriaOperatorNOTIN: () => CriteriaOperatorNOTIN,
|
|
83
|
+
CriteriaType: () => CriteriaType,
|
|
71
84
|
Currency: () => Currency,
|
|
72
85
|
DeleteBackendWalletResponseObject: () => DeleteBackendWalletResponseObject,
|
|
73
86
|
DeveloperAccountResponseExpandable: () => DeveloperAccountResponseExpandable,
|
|
@@ -87,6 +100,8 @@ __export(index_exports, {
|
|
|
87
100
|
EntityTypePLAYER: () => EntityTypePLAYER,
|
|
88
101
|
EntityTypePOLICY: () => EntityTypePOLICY,
|
|
89
102
|
EntityTypePOLICYRULE: () => EntityTypePOLICYRULE,
|
|
103
|
+
EntityTypePOLICYV2: () => EntityTypePOLICYV2,
|
|
104
|
+
EntityTypePOLICYV2RULE: () => EntityTypePOLICYV2RULE,
|
|
90
105
|
EntityTypePROJECT: () => EntityTypePROJECT,
|
|
91
106
|
EntityTypeREADCONTRACT: () => EntityTypeREADCONTRACT,
|
|
92
107
|
EntityTypeSESSION: () => EntityTypeSESSION,
|
|
@@ -98,7 +113,43 @@ __export(index_exports, {
|
|
|
98
113
|
EntityTypeUSER: () => EntityTypeUSER,
|
|
99
114
|
EntityTypeWALLET: () => EntityTypeWALLET,
|
|
100
115
|
ErrorTypeINVALIDREQUESTERROR: () => ErrorTypeINVALIDREQUESTERROR,
|
|
116
|
+
EthValueCriterionOperator: () => EthValueCriterionOperator,
|
|
117
|
+
EthValueCriterionRequestOperator: () => EthValueCriterionRequestOperator,
|
|
118
|
+
EthValueCriterionRequestType: () => EthValueCriterionRequestType,
|
|
119
|
+
EthValueCriterionSchema: () => EthValueCriterionSchema,
|
|
120
|
+
EvaluatePolicyV2ResponseObject: () => EvaluatePolicyV2ResponseObject,
|
|
121
|
+
EvmAddressCriterionOperator: () => EvmAddressCriterionOperator,
|
|
122
|
+
EvmAddressCriterionRequestOperator: () => EvmAddressCriterionRequestOperator,
|
|
123
|
+
EvmAddressCriterionRequestType: () => EvmAddressCriterionRequestType,
|
|
124
|
+
EvmAddressCriterionSchema: () => EvmAddressCriterionSchema,
|
|
101
125
|
EvmClient: () => EvmClient,
|
|
126
|
+
EvmCriteriaType: () => EvmCriteriaType,
|
|
127
|
+
EvmCriteriaTypeETHVALUE: () => EvmCriteriaTypeETHVALUE,
|
|
128
|
+
EvmCriteriaTypeEVMADDRESS: () => EvmCriteriaTypeEVMADDRESS,
|
|
129
|
+
EvmCriteriaTypeEVMDATA: () => EvmCriteriaTypeEVMDATA,
|
|
130
|
+
EvmCriteriaTypeEVMMESSAGE: () => EvmCriteriaTypeEVMMESSAGE,
|
|
131
|
+
EvmCriteriaTypeEVMNETWORK: () => EvmCriteriaTypeEVMNETWORK,
|
|
132
|
+
EvmCriteriaTypeEVMTYPEDDATAFIELD: () => EvmCriteriaTypeEVMTYPEDDATAFIELD,
|
|
133
|
+
EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT: () => EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT,
|
|
134
|
+
EvmCriteriaTypeNETUSDCHANGE: () => EvmCriteriaTypeNETUSDCHANGE,
|
|
135
|
+
EvmDataCriterionRequestOperator: () => EvmDataCriterionRequestOperator,
|
|
136
|
+
EvmDataCriterionRequestType: () => EvmDataCriterionRequestType,
|
|
137
|
+
EvmDataCriterionSchema: () => EvmDataCriterionSchema,
|
|
138
|
+
EvmMessageCriterionRequestOperator: () => EvmMessageCriterionRequestOperator,
|
|
139
|
+
EvmMessageCriterionRequestType: () => EvmMessageCriterionRequestType,
|
|
140
|
+
EvmMessageCriterionSchema: () => EvmMessageCriterionSchema,
|
|
141
|
+
EvmNetworkCriterionOperator: () => EvmNetworkCriterionOperator,
|
|
142
|
+
EvmNetworkCriterionRequestOperator: () => EvmNetworkCriterionRequestOperator,
|
|
143
|
+
EvmNetworkCriterionRequestType: () => EvmNetworkCriterionRequestType,
|
|
144
|
+
EvmNetworkCriterionSchema: () => EvmNetworkCriterionSchema,
|
|
145
|
+
EvmTypedDataFieldCriterionOperator: () => EvmTypedDataFieldCriterionOperator,
|
|
146
|
+
EvmTypedDataFieldCriterionRequestOperator: () => EvmTypedDataFieldCriterionRequestOperator,
|
|
147
|
+
EvmTypedDataFieldCriterionRequestType: () => EvmTypedDataFieldCriterionRequestType,
|
|
148
|
+
EvmTypedDataFieldCriterionSchema: () => EvmTypedDataFieldCriterionSchema,
|
|
149
|
+
EvmTypedDataVerifyingContractCriterionOperator: () => EvmTypedDataVerifyingContractCriterionOperator,
|
|
150
|
+
EvmTypedDataVerifyingContractCriterionRequestOperator: () => EvmTypedDataVerifyingContractCriterionRequestOperator,
|
|
151
|
+
EvmTypedDataVerifyingContractCriterionRequestType: () => EvmTypedDataVerifyingContractCriterionRequestType,
|
|
152
|
+
EvmTypedDataVerifyingContractCriterionSchema: () => EvmTypedDataVerifyingContractCriterionSchema,
|
|
102
153
|
ExportPrivateKeyResponseObject: () => ExportPrivateKeyResponseObject,
|
|
103
154
|
GetAccountsV2AccountType: () => GetAccountsV2AccountType,
|
|
104
155
|
GetAccountsV2ChainType: () => GetAccountsV2ChainType,
|
|
@@ -115,9 +166,17 @@ __export(index_exports, {
|
|
|
115
166
|
JsonRpcRequestJsonrpc: () => JsonRpcRequestJsonrpc,
|
|
116
167
|
JsonRpcSuccessResponseAnyJsonrpc: () => JsonRpcSuccessResponseAnyJsonrpc,
|
|
117
168
|
ListBackendWalletsChainType: () => ListBackendWalletsChainType,
|
|
169
|
+
ListPoliciesScope: () => ListPoliciesScope,
|
|
170
|
+
MintAddressCriterionOperator: () => MintAddressCriterionOperator,
|
|
171
|
+
MintAddressCriterionRequestOperator: () => MintAddressCriterionRequestOperator,
|
|
172
|
+
MintAddressCriterionRequestType: () => MintAddressCriterionRequestType,
|
|
173
|
+
MintAddressCriterionSchema: () => MintAddressCriterionSchema,
|
|
118
174
|
MissingAPIKeyError: () => MissingAPIKeyError,
|
|
119
175
|
MissingPublishableKeyError: () => MissingPublishableKeyError,
|
|
120
176
|
MissingWalletSecretError: () => MissingWalletSecretError,
|
|
177
|
+
NetUSDChangeCriterionOperator: () => NetUSDChangeCriterionOperator,
|
|
178
|
+
NetUSDChangeCriterionRequestOperator: () => NetUSDChangeCriterionRequestOperator,
|
|
179
|
+
NetUSDChangeCriterionRequestType: () => NetUSDChangeCriterionRequestType,
|
|
121
180
|
NetworkError: () => NetworkError,
|
|
122
181
|
NextActionType: () => NextActionType,
|
|
123
182
|
OAuthProvider: () => OAuthProvider,
|
|
@@ -142,25 +201,77 @@ __export(index_exports, {
|
|
|
142
201
|
PolicyRuleTypeACCOUNT: () => PolicyRuleTypeACCOUNT,
|
|
143
202
|
PolicyRuleTypeCONTRACT: () => PolicyRuleTypeCONTRACT,
|
|
144
203
|
PolicyRuleTypeRATELIMIT: () => PolicyRuleTypeRATELIMIT,
|
|
204
|
+
PolicyV2Action: () => PolicyV2Action,
|
|
205
|
+
PolicyV2ListQueriesScope: () => PolicyV2ListQueriesScope,
|
|
206
|
+
PolicyV2Scope: () => PolicyV2Scope,
|
|
145
207
|
PregenerateAccountResponseCustody: () => PregenerateAccountResponseCustody,
|
|
146
208
|
PregenerateUserRequestV2AccountType: () => PregenerateUserRequestV2AccountType,
|
|
147
209
|
PregenerateUserRequestV2ChainType: () => PregenerateUserRequestV2ChainType,
|
|
148
210
|
PrismaSortOrder: () => PrismaSortOrder,
|
|
149
211
|
PrivateKeyPolicy: () => PrivateKeyPolicy,
|
|
212
|
+
ProgramIdCriterionOperator: () => ProgramIdCriterionOperator,
|
|
213
|
+
ProgramIdCriterionRequestOperator: () => ProgramIdCriterionRequestOperator,
|
|
214
|
+
ProgramIdCriterionRequestType: () => ProgramIdCriterionRequestType,
|
|
215
|
+
ProgramIdCriterionSchema: () => ProgramIdCriterionSchema,
|
|
150
216
|
ProjectStatsRequestTimeFrame: () => ProjectStatsRequestTimeFrame,
|
|
151
217
|
RegisterWalletSecretResponseObject: () => RegisterWalletSecretResponseObject,
|
|
152
218
|
ResponseTypeLIST: () => ResponseTypeLIST,
|
|
153
219
|
RevokeWalletSecretResponseObject: () => RevokeWalletSecretResponseObject,
|
|
154
220
|
RotateWalletSecretResponseObject: () => RotateWalletSecretResponseObject,
|
|
221
|
+
RuleSchema: () => RuleSchema,
|
|
222
|
+
SendEvmTransactionRuleSchema: () => SendEvmTransactionRuleSchema,
|
|
223
|
+
SendSolTransactionRuleSchema: () => SendSolTransactionRuleSchema,
|
|
155
224
|
SessionResponseExpandable: () => SessionResponseExpandable,
|
|
156
225
|
ShieldAuthProvider: () => import_shield_js2.ShieldAuthProvider,
|
|
226
|
+
SignEvmHashRuleSchema: () => SignEvmHashRuleSchema,
|
|
227
|
+
SignEvmMessageRuleSchema: () => SignEvmMessageRuleSchema,
|
|
228
|
+
SignEvmTransactionRuleSchema: () => SignEvmTransactionRuleSchema,
|
|
229
|
+
SignEvmTypedDataRuleSchema: () => SignEvmTypedDataRuleSchema,
|
|
157
230
|
SignResponseObject: () => SignResponseObject,
|
|
231
|
+
SignSolMessageRuleSchema: () => SignSolMessageRuleSchema,
|
|
232
|
+
SignSolTransactionRuleSchema: () => SignSolTransactionRuleSchema,
|
|
158
233
|
SmsProviderMESSAGEBIRD: () => SmsProviderMESSAGEBIRD,
|
|
159
234
|
SmsProviderSMSAPI: () => SmsProviderSMSAPI,
|
|
160
235
|
SmsProviderTWILIO: () => SmsProviderTWILIO,
|
|
161
236
|
SmsProviderTXTLOCAL: () => SmsProviderTXTLOCAL,
|
|
162
237
|
SmsProviderVONAGE: () => SmsProviderVONAGE,
|
|
238
|
+
SolAddressCriterionOperator: () => SolAddressCriterionOperator,
|
|
239
|
+
SolAddressCriterionRequestOperator: () => SolAddressCriterionRequestOperator,
|
|
240
|
+
SolAddressCriterionRequestType: () => SolAddressCriterionRequestType,
|
|
241
|
+
SolAddressCriterionSchema: () => SolAddressCriterionSchema,
|
|
242
|
+
SolDataCriterionRequestOperator: () => SolDataCriterionRequestOperator,
|
|
243
|
+
SolDataCriterionRequestType: () => SolDataCriterionRequestType,
|
|
244
|
+
SolDataCriterionSchema: () => SolDataCriterionSchema,
|
|
245
|
+
SolMessageCriterionRequestOperator: () => SolMessageCriterionRequestOperator,
|
|
246
|
+
SolMessageCriterionRequestType: () => SolMessageCriterionRequestType,
|
|
247
|
+
SolMessageCriterionSchema: () => SolMessageCriterionSchema,
|
|
248
|
+
SolNetworkCriterionOperator: () => SolNetworkCriterionOperator,
|
|
249
|
+
SolNetworkCriterionRequestOperator: () => SolNetworkCriterionRequestOperator,
|
|
250
|
+
SolNetworkCriterionRequestType: () => SolNetworkCriterionRequestType,
|
|
251
|
+
SolNetworkCriterionSchema: () => SolNetworkCriterionSchema,
|
|
252
|
+
SolValueCriterionOperator: () => SolValueCriterionOperator,
|
|
253
|
+
SolValueCriterionRequestOperator: () => SolValueCriterionRequestOperator,
|
|
254
|
+
SolValueCriterionRequestType: () => SolValueCriterionRequestType,
|
|
255
|
+
SolValueCriterionSchema: () => SolValueCriterionSchema,
|
|
163
256
|
SolanaClient: () => SolanaClient,
|
|
257
|
+
SolanaCriteriaType: () => SolanaCriteriaType,
|
|
258
|
+
SolanaCriteriaTypeMINTADDRESS: () => SolanaCriteriaTypeMINTADDRESS,
|
|
259
|
+
SolanaCriteriaTypePROGRAMID: () => SolanaCriteriaTypePROGRAMID,
|
|
260
|
+
SolanaCriteriaTypeSOLADDRESS: () => SolanaCriteriaTypeSOLADDRESS,
|
|
261
|
+
SolanaCriteriaTypeSOLDATA: () => SolanaCriteriaTypeSOLDATA,
|
|
262
|
+
SolanaCriteriaTypeSOLMESSAGE: () => SolanaCriteriaTypeSOLMESSAGE,
|
|
263
|
+
SolanaCriteriaTypeSOLNETWORK: () => SolanaCriteriaTypeSOLNETWORK,
|
|
264
|
+
SolanaCriteriaTypeSOLVALUE: () => SolanaCriteriaTypeSOLVALUE,
|
|
265
|
+
SolanaCriteriaTypeSPLADDRESS: () => SolanaCriteriaTypeSPLADDRESS,
|
|
266
|
+
SolanaCriteriaTypeSPLVALUE: () => SolanaCriteriaTypeSPLVALUE,
|
|
267
|
+
SplAddressCriterionOperator: () => SplAddressCriterionOperator,
|
|
268
|
+
SplAddressCriterionRequestOperator: () => SplAddressCriterionRequestOperator,
|
|
269
|
+
SplAddressCriterionRequestType: () => SplAddressCriterionRequestType,
|
|
270
|
+
SplAddressCriterionSchema: () => SplAddressCriterionSchema,
|
|
271
|
+
SplValueCriterionOperator: () => SplValueCriterionOperator,
|
|
272
|
+
SplValueCriterionRequestOperator: () => SplValueCriterionRequestOperator,
|
|
273
|
+
SplValueCriterionRequestType: () => SplValueCriterionRequestType,
|
|
274
|
+
SplValueCriterionSchema: () => SplValueCriterionSchema,
|
|
164
275
|
SponsorSchema: () => SponsorSchema,
|
|
165
276
|
SponsorSchemaCHARGECUSTOMTOKENS: () => SponsorSchemaCHARGECUSTOMTOKENS,
|
|
166
277
|
SponsorSchemaFIXEDRATE: () => SponsorSchemaFIXEDRATE,
|
|
@@ -182,6 +293,7 @@ __export(index_exports, {
|
|
|
182
293
|
TransactionIntentResponseExpandable: () => TransactionIntentResponseExpandable,
|
|
183
294
|
TransactionStatus: () => TransactionStatus,
|
|
184
295
|
UnknownError: () => UnknownError,
|
|
296
|
+
UpdatePolicyBodySchema: () => UpdatePolicyBodySchema,
|
|
185
297
|
UserInputValidationError: () => UserInputValidationError,
|
|
186
298
|
UserProjectCreateRequestRole: () => UserProjectCreateRequestRole,
|
|
187
299
|
UserProjectRole: () => UserProjectRole,
|
|
@@ -195,8 +307,6 @@ __export(index_exports, {
|
|
|
195
307
|
authorize: () => authorize,
|
|
196
308
|
callbackOAuth: () => callbackOAuth,
|
|
197
309
|
cancelTransferAccountOwnership: () => cancelTransferAccountOwnership,
|
|
198
|
-
cancelTransferOwnership: () => cancelTransferOwnership,
|
|
199
|
-
completeRecovery: () => completeRecovery,
|
|
200
310
|
configure: () => configure,
|
|
201
311
|
create: () => create,
|
|
202
312
|
createAccount: () => createAccount,
|
|
@@ -213,6 +323,7 @@ __export(index_exports, {
|
|
|
213
323
|
createPlayer: () => createPlayer,
|
|
214
324
|
createPolicy: () => createPolicy,
|
|
215
325
|
createPolicyRule: () => createPolicyRule,
|
|
326
|
+
createPolicyV2: () => createPolicyV2,
|
|
216
327
|
createPolicyWithdrawal: () => createPolicyWithdrawal,
|
|
217
328
|
createSession: () => createSession,
|
|
218
329
|
createSubscription: () => createSubscription,
|
|
@@ -231,16 +342,17 @@ __export(index_exports, {
|
|
|
231
342
|
deletePlayer: () => deletePlayer,
|
|
232
343
|
deletePolicy: () => deletePolicy,
|
|
233
344
|
deletePolicyRule: () => deletePolicyRule,
|
|
345
|
+
deletePolicyV2: () => deletePolicyV2,
|
|
234
346
|
deleteSubscription: () => deleteSubscription,
|
|
235
347
|
deleteTrigger: () => deleteTrigger,
|
|
236
348
|
deleteUser: () => deleteUser,
|
|
237
|
-
deployAccount: () => deployAccount,
|
|
238
349
|
deprecatedCallbackOAuth: () => deprecatedCallbackOAuth,
|
|
239
350
|
disableAccount: () => disableAccount,
|
|
240
351
|
disablePolicy: () => disablePolicy,
|
|
241
352
|
enablePolicy: () => enablePolicy,
|
|
242
353
|
encryptForImport: () => encryptForImport,
|
|
243
354
|
estimateTransactionIntentCost: () => estimateTransactionIntentCost,
|
|
355
|
+
evaluatePolicyV2: () => evaluatePolicyV2,
|
|
244
356
|
exportPrivateKey: () => exportPrivateKey,
|
|
245
357
|
generateRSAKeyPair: () => generateRSAKeyPair,
|
|
246
358
|
getAccount: () => getAccount,
|
|
@@ -273,6 +385,7 @@ __export(index_exports, {
|
|
|
273
385
|
getPolicyReportTransactionIntents: () => getPolicyReportTransactionIntents,
|
|
274
386
|
getPolicyRules: () => getPolicyRules,
|
|
275
387
|
getPolicyTotalGasUsage: () => getPolicyTotalGasUsage,
|
|
388
|
+
getPolicyV2: () => getPolicyV2,
|
|
276
389
|
getProjectLogs: () => getProjectLogs,
|
|
277
390
|
getSession: () => getSession,
|
|
278
391
|
getSignerIdByAddress: () => getSignerIdByAddress,
|
|
@@ -302,6 +415,7 @@ __export(index_exports, {
|
|
|
302
415
|
listForwarderContracts: () => listForwarderContracts,
|
|
303
416
|
listOAuthConfig: () => listOAuthConfig,
|
|
304
417
|
listPaymasters: () => listPaymasters,
|
|
418
|
+
listPolicies: () => listPolicies,
|
|
305
419
|
listSubscriptionLogs: () => listSubscriptionLogs,
|
|
306
420
|
loginEmailPassword: () => loginEmailPassword,
|
|
307
421
|
loginOIDC: () => loginOIDC,
|
|
@@ -320,20 +434,16 @@ __export(index_exports, {
|
|
|
320
434
|
requestEmailVerification: () => requestEmailVerification,
|
|
321
435
|
requestResetPassword: () => requestResetPassword,
|
|
322
436
|
requestTransferAccountOwnership: () => requestTransferAccountOwnership,
|
|
323
|
-
requestTransferOwnership: () => requestTransferOwnership,
|
|
324
437
|
resetPassword: () => resetPassword,
|
|
325
438
|
revokeSession: () => revokeSession,
|
|
326
439
|
revokeWalletSecret: () => revokeWalletSecret,
|
|
327
440
|
rotateWalletSecret: () => rotateWalletSecret,
|
|
328
441
|
sign: () => sign,
|
|
329
|
-
signPayload: () => signPayload,
|
|
330
442
|
signPayloadDeveloperAccount: () => signPayloadDeveloperAccount,
|
|
331
443
|
signature: () => signature,
|
|
332
444
|
signatureSession: () => signatureSession,
|
|
333
445
|
signupEmailPassword: () => signupEmailPassword,
|
|
334
|
-
startRecovery: () => startRecovery,
|
|
335
446
|
switchChainV2: () => switchChainV2,
|
|
336
|
-
syncAccount: () => syncAccount,
|
|
337
447
|
testTrigger: () => testTrigger,
|
|
338
448
|
thirdParty: () => thirdParty,
|
|
339
449
|
thirdPartyV2: () => thirdPartyV2,
|
|
@@ -349,6 +459,7 @@ __export(index_exports, {
|
|
|
349
459
|
updatePlayer: () => updatePlayer,
|
|
350
460
|
updatePolicy: () => updatePolicy,
|
|
351
461
|
updatePolicyRule: () => updatePolicyRule,
|
|
462
|
+
updatePolicyV2: () => updatePolicyV2,
|
|
352
463
|
verifyAuthToken: () => verifyAuthToken,
|
|
353
464
|
verifyEmail: () => verifyEmail,
|
|
354
465
|
verifyOAuthToken: () => verifyOAuthToken
|
|
@@ -719,7 +830,7 @@ function requiresWalletAuth(requestMethod, requestPath) {
|
|
|
719
830
|
}
|
|
720
831
|
|
|
721
832
|
// src/version.ts
|
|
722
|
-
var VERSION = "0.
|
|
833
|
+
var VERSION = "0.8.0";
|
|
723
834
|
var PACKAGE = "@openfort/openfort-node";
|
|
724
835
|
|
|
725
836
|
// src/openapi-client/openfortApiClient.ts
|
|
@@ -1104,81 +1215,6 @@ var disableAccount = (id, options) => {
|
|
|
1104
1215
|
options
|
|
1105
1216
|
);
|
|
1106
1217
|
};
|
|
1107
|
-
var requestTransferOwnership = (id, transferOwnershipRequest, options) => {
|
|
1108
|
-
return openfortApiClient(
|
|
1109
|
-
{
|
|
1110
|
-
url: `/v1/accounts/${id}/request_transfer_ownership`,
|
|
1111
|
-
method: "POST",
|
|
1112
|
-
headers: { "Content-Type": "application/json" },
|
|
1113
|
-
data: transferOwnershipRequest
|
|
1114
|
-
},
|
|
1115
|
-
options
|
|
1116
|
-
);
|
|
1117
|
-
};
|
|
1118
|
-
var cancelTransferOwnership = (id, cancelTransferOwnershipRequest, options) => {
|
|
1119
|
-
return openfortApiClient(
|
|
1120
|
-
{
|
|
1121
|
-
url: `/v1/accounts/${id}/cancel_transfer_ownership`,
|
|
1122
|
-
method: "POST",
|
|
1123
|
-
headers: { "Content-Type": "application/json" },
|
|
1124
|
-
data: cancelTransferOwnershipRequest
|
|
1125
|
-
},
|
|
1126
|
-
options
|
|
1127
|
-
);
|
|
1128
|
-
};
|
|
1129
|
-
var signPayload = (id, signPayloadRequest, options) => {
|
|
1130
|
-
return openfortApiClient(
|
|
1131
|
-
{
|
|
1132
|
-
url: `/v1/accounts/${id}/sign_payload`,
|
|
1133
|
-
method: "POST",
|
|
1134
|
-
headers: { "Content-Type": "application/json" },
|
|
1135
|
-
data: signPayloadRequest
|
|
1136
|
-
},
|
|
1137
|
-
options
|
|
1138
|
-
);
|
|
1139
|
-
};
|
|
1140
|
-
var syncAccount = (id, options) => {
|
|
1141
|
-
return openfortApiClient(
|
|
1142
|
-
{
|
|
1143
|
-
url: `/v1/accounts/${id}/sync`,
|
|
1144
|
-
method: "POST"
|
|
1145
|
-
},
|
|
1146
|
-
options
|
|
1147
|
-
);
|
|
1148
|
-
};
|
|
1149
|
-
var deployAccount = (id, deployRequest, options) => {
|
|
1150
|
-
return openfortApiClient(
|
|
1151
|
-
{
|
|
1152
|
-
url: `/v1/accounts/${id}/deploy`,
|
|
1153
|
-
method: "POST",
|
|
1154
|
-
headers: { "Content-Type": "application/json" },
|
|
1155
|
-
data: deployRequest
|
|
1156
|
-
},
|
|
1157
|
-
options
|
|
1158
|
-
);
|
|
1159
|
-
};
|
|
1160
|
-
var startRecovery = (id, startRecoveryRequest, options) => {
|
|
1161
|
-
return openfortApiClient(
|
|
1162
|
-
{
|
|
1163
|
-
url: `/v1/accounts/${id}/start_recovery`,
|
|
1164
|
-
method: "POST",
|
|
1165
|
-
headers: { "Content-Type": "application/json" },
|
|
1166
|
-
data: startRecoveryRequest
|
|
1167
|
-
},
|
|
1168
|
-
options
|
|
1169
|
-
);
|
|
1170
|
-
};
|
|
1171
|
-
var completeRecovery = (id, completeRecoveryRequest, options) => {
|
|
1172
|
-
return openfortApiClient(
|
|
1173
|
-
{
|
|
1174
|
-
url: `/v1/accounts/${id}/complete_recovery`,
|
|
1175
|
-
method: "POST",
|
|
1176
|
-
headers: { "Content-Type": "application/json" },
|
|
1177
|
-
data: completeRecoveryRequest
|
|
1178
|
-
},
|
|
1179
|
-
options
|
|
1180
|
-
);
|
|
1181
|
-
};
|
|
1182
1218
|
|
|
1183
1219
|
// src/openapi-client/generated/accs-v2/accs-v2.ts
|
|
1184
1220
|
var getAccountsV2 = (params, options) => {
|
|
@@ -2613,7 +2649,11 @@ var APITopic = {
|
|
|
2613
2649
|
balanceproject: "balance.project",
|
|
2614
2650
|
balancecontract: "balance.contract",
|
|
2615
2651
|
balancedev_account: "balance.dev_account",
|
|
2616
|
-
test: "test"
|
|
2652
|
+
test: "test",
|
|
2653
|
+
usercreated: "user.created",
|
|
2654
|
+
userupdated: "user.updated",
|
|
2655
|
+
userdeleted: "user.deleted",
|
|
2656
|
+
accountcreated: "account.created"
|
|
2617
2657
|
};
|
|
2618
2658
|
var APITriggerType = {
|
|
2619
2659
|
webhook: "webhook",
|
|
@@ -2774,6 +2814,285 @@ var PregenerateUserRequestV2ChainType = {
|
|
|
2774
2814
|
EVM: "EVM",
|
|
2775
2815
|
SVM: "SVM"
|
|
2776
2816
|
};
|
|
2817
|
+
var PolicyV2Scope = {
|
|
2818
|
+
project: "project",
|
|
2819
|
+
account: "account"
|
|
2820
|
+
};
|
|
2821
|
+
var PolicyV2Action = {
|
|
2822
|
+
accept: "accept",
|
|
2823
|
+
reject: "reject"
|
|
2824
|
+
};
|
|
2825
|
+
var EvmCriteriaTypeEVMADDRESS = {
|
|
2826
|
+
evmAddress: "evmAddress"
|
|
2827
|
+
};
|
|
2828
|
+
var CriteriaOperatorIN = {
|
|
2829
|
+
in: "in"
|
|
2830
|
+
};
|
|
2831
|
+
var CriteriaOperatorNOTIN = {
|
|
2832
|
+
not_in: "not in"
|
|
2833
|
+
};
|
|
2834
|
+
var EvmCriteriaType = {
|
|
2835
|
+
evmAddress: "evmAddress",
|
|
2836
|
+
ethValue: "ethValue",
|
|
2837
|
+
evmNetwork: "evmNetwork",
|
|
2838
|
+
evmMessage: "evmMessage",
|
|
2839
|
+
evmData: "evmData",
|
|
2840
|
+
evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract",
|
|
2841
|
+
evmTypedDataField: "evmTypedDataField",
|
|
2842
|
+
netUSDChange: "netUSDChange"
|
|
2843
|
+
};
|
|
2844
|
+
var SolanaCriteriaType = {
|
|
2845
|
+
solAddress: "solAddress",
|
|
2846
|
+
solValue: "solValue",
|
|
2847
|
+
splAddress: "splAddress",
|
|
2848
|
+
splValue: "splValue",
|
|
2849
|
+
mintAddress: "mintAddress",
|
|
2850
|
+
solData: "solData",
|
|
2851
|
+
programId: "programId",
|
|
2852
|
+
solNetwork: "solNetwork",
|
|
2853
|
+
solMessage: "solMessage"
|
|
2854
|
+
};
|
|
2855
|
+
var CriteriaType = { ...EvmCriteriaType, ...SolanaCriteriaType };
|
|
2856
|
+
var CriteriaOperator = {
|
|
2857
|
+
in: "in",
|
|
2858
|
+
not_in: "not in",
|
|
2859
|
+
"<": "<",
|
|
2860
|
+
"<=": "<=",
|
|
2861
|
+
">": ">",
|
|
2862
|
+
">=": ">=",
|
|
2863
|
+
"==": "==",
|
|
2864
|
+
match: "match"
|
|
2865
|
+
};
|
|
2866
|
+
var EvmAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2867
|
+
var EvmCriteriaTypeETHVALUE = {
|
|
2868
|
+
ethValue: "ethValue"
|
|
2869
|
+
};
|
|
2870
|
+
var CriteriaOperatorLESSTHANOREQUAL = {
|
|
2871
|
+
"<=": "<="
|
|
2872
|
+
};
|
|
2873
|
+
var CriteriaOperatorGREATERTHANOREQUAL = {
|
|
2874
|
+
">=": ">="
|
|
2875
|
+
};
|
|
2876
|
+
var CriteriaOperatorLESSTHAN = {
|
|
2877
|
+
"<": "<"
|
|
2878
|
+
};
|
|
2879
|
+
var CriteriaOperatorGREATERTHAN = {
|
|
2880
|
+
">": ">"
|
|
2881
|
+
};
|
|
2882
|
+
var EthValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL, ...CriteriaOperatorLESSTHAN, ...CriteriaOperatorGREATERTHAN };
|
|
2883
|
+
var EvmCriteriaTypeEVMNETWORK = {
|
|
2884
|
+
evmNetwork: "evmNetwork"
|
|
2885
|
+
};
|
|
2886
|
+
var EvmNetworkCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2887
|
+
var EvmCriteriaTypeEVMMESSAGE = {
|
|
2888
|
+
evmMessage: "evmMessage"
|
|
2889
|
+
};
|
|
2890
|
+
var CriteriaOperatorMATCH = {
|
|
2891
|
+
match: "match"
|
|
2892
|
+
};
|
|
2893
|
+
var EvmCriteriaTypeEVMDATA = {
|
|
2894
|
+
evmData: "evmData"
|
|
2895
|
+
};
|
|
2896
|
+
var EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT = {
|
|
2897
|
+
evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract"
|
|
2898
|
+
};
|
|
2899
|
+
var EvmTypedDataVerifyingContractCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2900
|
+
var EvmCriteriaTypeEVMTYPEDDATAFIELD = {
|
|
2901
|
+
evmTypedDataField: "evmTypedDataField"
|
|
2902
|
+
};
|
|
2903
|
+
var EvmTypedDataFieldCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorMATCH };
|
|
2904
|
+
var EvmCriteriaTypeNETUSDCHANGE = {
|
|
2905
|
+
netUSDChange: "netUSDChange"
|
|
2906
|
+
};
|
|
2907
|
+
var NetUSDChangeCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
|
|
2908
|
+
var SolanaCriteriaTypeSOLADDRESS = {
|
|
2909
|
+
solAddress: "solAddress"
|
|
2910
|
+
};
|
|
2911
|
+
var SolAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2912
|
+
var SolanaCriteriaTypeSOLVALUE = {
|
|
2913
|
+
solValue: "solValue"
|
|
2914
|
+
};
|
|
2915
|
+
var SolValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
|
|
2916
|
+
var SolanaCriteriaTypeSPLADDRESS = {
|
|
2917
|
+
splAddress: "splAddress"
|
|
2918
|
+
};
|
|
2919
|
+
var SplAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2920
|
+
var SolanaCriteriaTypeSPLVALUE = {
|
|
2921
|
+
splValue: "splValue"
|
|
2922
|
+
};
|
|
2923
|
+
var SplValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
|
|
2924
|
+
var SolanaCriteriaTypeMINTADDRESS = {
|
|
2925
|
+
mintAddress: "mintAddress"
|
|
2926
|
+
};
|
|
2927
|
+
var CriteriaOperatorEQUAL = {
|
|
2928
|
+
"==": "=="
|
|
2929
|
+
};
|
|
2930
|
+
var MintAddressCriterionOperator = { ...CriteriaOperatorEQUAL, ...CriteriaOperatorIN };
|
|
2931
|
+
var SolanaCriteriaTypeSOLDATA = {
|
|
2932
|
+
solData: "solData"
|
|
2933
|
+
};
|
|
2934
|
+
var SolanaCriteriaTypePROGRAMID = {
|
|
2935
|
+
programId: "programId"
|
|
2936
|
+
};
|
|
2937
|
+
var ProgramIdCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2938
|
+
var SolanaCriteriaTypeSOLNETWORK = {
|
|
2939
|
+
solNetwork: "solNetwork"
|
|
2940
|
+
};
|
|
2941
|
+
var SolNetworkCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
|
|
2942
|
+
var SolanaCriteriaTypeSOLMESSAGE = {
|
|
2943
|
+
solMessage: "solMessage"
|
|
2944
|
+
};
|
|
2945
|
+
var EntityTypePOLICYV2RULE = {
|
|
2946
|
+
policyV2Rule: "policyV2Rule"
|
|
2947
|
+
};
|
|
2948
|
+
var EntityTypePOLICYV2 = {
|
|
2949
|
+
policyV2: "policyV2"
|
|
2950
|
+
};
|
|
2951
|
+
var PolicyV2ListQueriesScope = {
|
|
2952
|
+
project: "project",
|
|
2953
|
+
account: "account"
|
|
2954
|
+
};
|
|
2955
|
+
var EvmAddressCriterionRequestType = {
|
|
2956
|
+
evmAddress: "evmAddress"
|
|
2957
|
+
};
|
|
2958
|
+
var EvmAddressCriterionRequestOperator = {
|
|
2959
|
+
in: "in",
|
|
2960
|
+
not_in: "not in"
|
|
2961
|
+
};
|
|
2962
|
+
var EthValueCriterionRequestType = {
|
|
2963
|
+
ethValue: "ethValue"
|
|
2964
|
+
};
|
|
2965
|
+
var EthValueCriterionRequestOperator = {
|
|
2966
|
+
"<=": "<=",
|
|
2967
|
+
">=": ">=",
|
|
2968
|
+
"<": "<",
|
|
2969
|
+
">": ">"
|
|
2970
|
+
};
|
|
2971
|
+
var EvmNetworkCriterionRequestType = {
|
|
2972
|
+
evmNetwork: "evmNetwork"
|
|
2973
|
+
};
|
|
2974
|
+
var EvmNetworkCriterionRequestOperator = {
|
|
2975
|
+
in: "in",
|
|
2976
|
+
not_in: "not in"
|
|
2977
|
+
};
|
|
2978
|
+
var EvmMessageCriterionRequestType = {
|
|
2979
|
+
evmMessage: "evmMessage"
|
|
2980
|
+
};
|
|
2981
|
+
var EvmMessageCriterionRequestOperator = {
|
|
2982
|
+
match: "match"
|
|
2983
|
+
};
|
|
2984
|
+
var EvmDataCriterionRequestType = {
|
|
2985
|
+
evmData: "evmData"
|
|
2986
|
+
};
|
|
2987
|
+
var EvmDataCriterionRequestOperator = {
|
|
2988
|
+
in: "in",
|
|
2989
|
+
not_in: "not in",
|
|
2990
|
+
"<": "<",
|
|
2991
|
+
"<=": "<=",
|
|
2992
|
+
">": ">",
|
|
2993
|
+
">=": ">=",
|
|
2994
|
+
"==": "==",
|
|
2995
|
+
match: "match"
|
|
2996
|
+
};
|
|
2997
|
+
var EvmTypedDataVerifyingContractCriterionRequestType = {
|
|
2998
|
+
evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract"
|
|
2999
|
+
};
|
|
3000
|
+
var EvmTypedDataVerifyingContractCriterionRequestOperator = {
|
|
3001
|
+
in: "in",
|
|
3002
|
+
not_in: "not in"
|
|
3003
|
+
};
|
|
3004
|
+
var EvmTypedDataFieldCriterionRequestType = {
|
|
3005
|
+
evmTypedDataField: "evmTypedDataField"
|
|
3006
|
+
};
|
|
3007
|
+
var EvmTypedDataFieldCriterionRequestOperator = {
|
|
3008
|
+
in: "in",
|
|
3009
|
+
"<=": "<=",
|
|
3010
|
+
match: "match"
|
|
3011
|
+
};
|
|
3012
|
+
var NetUSDChangeCriterionRequestType = {
|
|
3013
|
+
netUSDChange: "netUSDChange"
|
|
3014
|
+
};
|
|
3015
|
+
var NetUSDChangeCriterionRequestOperator = {
|
|
3016
|
+
"<=": "<=",
|
|
3017
|
+
">=": ">="
|
|
3018
|
+
};
|
|
3019
|
+
var SolAddressCriterionRequestType = {
|
|
3020
|
+
solAddress: "solAddress"
|
|
3021
|
+
};
|
|
3022
|
+
var SolAddressCriterionRequestOperator = {
|
|
3023
|
+
in: "in",
|
|
3024
|
+
not_in: "not in"
|
|
3025
|
+
};
|
|
3026
|
+
var SolValueCriterionRequestType = {
|
|
3027
|
+
solValue: "solValue"
|
|
3028
|
+
};
|
|
3029
|
+
var SolValueCriterionRequestOperator = {
|
|
3030
|
+
"<=": "<=",
|
|
3031
|
+
">=": ">="
|
|
3032
|
+
};
|
|
3033
|
+
var SplAddressCriterionRequestType = {
|
|
3034
|
+
splAddress: "splAddress"
|
|
3035
|
+
};
|
|
3036
|
+
var SplAddressCriterionRequestOperator = {
|
|
3037
|
+
in: "in",
|
|
3038
|
+
not_in: "not in"
|
|
3039
|
+
};
|
|
3040
|
+
var SplValueCriterionRequestType = {
|
|
3041
|
+
splValue: "splValue"
|
|
3042
|
+
};
|
|
3043
|
+
var SplValueCriterionRequestOperator = {
|
|
3044
|
+
"<=": "<=",
|
|
3045
|
+
">=": ">="
|
|
3046
|
+
};
|
|
3047
|
+
var MintAddressCriterionRequestType = {
|
|
3048
|
+
mintAddress: "mintAddress"
|
|
3049
|
+
};
|
|
3050
|
+
var MintAddressCriterionRequestOperator = {
|
|
3051
|
+
"==": "==",
|
|
3052
|
+
in: "in"
|
|
3053
|
+
};
|
|
3054
|
+
var SolDataCriterionRequestType = {
|
|
3055
|
+
solData: "solData"
|
|
3056
|
+
};
|
|
3057
|
+
var SolDataCriterionRequestOperator = {
|
|
3058
|
+
in: "in",
|
|
3059
|
+
not_in: "not in",
|
|
3060
|
+
"<=": "<=",
|
|
3061
|
+
">=": ">=",
|
|
3062
|
+
"==": "==",
|
|
3063
|
+
match: "match"
|
|
3064
|
+
};
|
|
3065
|
+
var ProgramIdCriterionRequestType = {
|
|
3066
|
+
programId: "programId"
|
|
3067
|
+
};
|
|
3068
|
+
var ProgramIdCriterionRequestOperator = {
|
|
3069
|
+
in: "in",
|
|
3070
|
+
not_in: "not in"
|
|
3071
|
+
};
|
|
3072
|
+
var SolNetworkCriterionRequestType = {
|
|
3073
|
+
solNetwork: "solNetwork"
|
|
3074
|
+
};
|
|
3075
|
+
var SolNetworkCriterionRequestOperator = {
|
|
3076
|
+
in: "in",
|
|
3077
|
+
not_in: "not in"
|
|
3078
|
+
};
|
|
3079
|
+
var SolMessageCriterionRequestType = {
|
|
3080
|
+
solMessage: "solMessage"
|
|
3081
|
+
};
|
|
3082
|
+
var SolMessageCriterionRequestOperator = {
|
|
3083
|
+
match: "match"
|
|
3084
|
+
};
|
|
3085
|
+
var CreatePolicyV2RuleRequestAction = {
|
|
3086
|
+
accept: "accept",
|
|
3087
|
+
reject: "reject"
|
|
3088
|
+
};
|
|
3089
|
+
var CreatePolicyV2RequestScope = {
|
|
3090
|
+
project: "project",
|
|
3091
|
+
account: "account"
|
|
3092
|
+
};
|
|
3093
|
+
var EvaluatePolicyV2ResponseObject = {
|
|
3094
|
+
policy_evaluation: "policy_evaluation"
|
|
3095
|
+
};
|
|
2777
3096
|
var CreateEmbeddedRequestAccountType = {
|
|
2778
3097
|
Externally_Owned_Account: "Externally Owned Account",
|
|
2779
3098
|
Smart_Account: "Smart Account",
|
|
@@ -3055,6 +3374,10 @@ var AuthenticationType = {
|
|
|
3055
3374
|
var GetPolicyRulesExpandItem = {
|
|
3056
3375
|
contract: "contract"
|
|
3057
3376
|
};
|
|
3377
|
+
var ListPoliciesScope = {
|
|
3378
|
+
project: "project",
|
|
3379
|
+
account: "account"
|
|
3380
|
+
};
|
|
3058
3381
|
var ListBackendWalletsChainType = {
|
|
3059
3382
|
EVM: "EVM",
|
|
3060
3383
|
SVM: "SVM"
|
|
@@ -3310,6 +3633,67 @@ var createPolicyWithdrawal = (id, withdrawalPolicyRequest, options) => {
|
|
|
3310
3633
|
options
|
|
3311
3634
|
);
|
|
3312
3635
|
};
|
|
3636
|
+
var listPolicies = (params, options) => {
|
|
3637
|
+
return openfortApiClient(
|
|
3638
|
+
{
|
|
3639
|
+
url: `/v2/policies`,
|
|
3640
|
+
method: "GET",
|
|
3641
|
+
params
|
|
3642
|
+
},
|
|
3643
|
+
options
|
|
3644
|
+
);
|
|
3645
|
+
};
|
|
3646
|
+
var createPolicyV2 = (createPolicyV2Request, options) => {
|
|
3647
|
+
return openfortApiClient(
|
|
3648
|
+
{
|
|
3649
|
+
url: `/v2/policies`,
|
|
3650
|
+
method: "POST",
|
|
3651
|
+
headers: { "Content-Type": "application/json" },
|
|
3652
|
+
data: createPolicyV2Request
|
|
3653
|
+
},
|
|
3654
|
+
options
|
|
3655
|
+
);
|
|
3656
|
+
};
|
|
3657
|
+
var getPolicyV2 = (policyId, options) => {
|
|
3658
|
+
return openfortApiClient(
|
|
3659
|
+
{
|
|
3660
|
+
url: `/v2/policies/${policyId}`,
|
|
3661
|
+
method: "GET"
|
|
3662
|
+
},
|
|
3663
|
+
options
|
|
3664
|
+
);
|
|
3665
|
+
};
|
|
3666
|
+
var updatePolicyV2 = (policyId, updatePolicyV2Request, options) => {
|
|
3667
|
+
return openfortApiClient(
|
|
3668
|
+
{
|
|
3669
|
+
url: `/v2/policies/${policyId}`,
|
|
3670
|
+
method: "POST",
|
|
3671
|
+
headers: { "Content-Type": "application/json" },
|
|
3672
|
+
data: updatePolicyV2Request
|
|
3673
|
+
},
|
|
3674
|
+
options
|
|
3675
|
+
);
|
|
3676
|
+
};
|
|
3677
|
+
var deletePolicyV2 = (policyId, options) => {
|
|
3678
|
+
return openfortApiClient(
|
|
3679
|
+
{
|
|
3680
|
+
url: `/v2/policies/${policyId}`,
|
|
3681
|
+
method: "DELETE"
|
|
3682
|
+
},
|
|
3683
|
+
options
|
|
3684
|
+
);
|
|
3685
|
+
};
|
|
3686
|
+
var evaluatePolicyV2 = (evaluatePolicyV2Request, options) => {
|
|
3687
|
+
return openfortApiClient(
|
|
3688
|
+
{
|
|
3689
|
+
url: `/v2/policies/evaluate`,
|
|
3690
|
+
method: "POST",
|
|
3691
|
+
headers: { "Content-Type": "application/json" },
|
|
3692
|
+
data: evaluatePolicyV2Request
|
|
3693
|
+
},
|
|
3694
|
+
options
|
|
3695
|
+
);
|
|
3696
|
+
};
|
|
3313
3697
|
|
|
3314
3698
|
// src/openapi-client/generated/policy-rules/policy-rules.ts
|
|
3315
3699
|
var getPolicyRules = (params, options) => {
|
|
@@ -4378,6 +4762,279 @@ SolanaClient.type = "solanaWallet";
|
|
|
4378
4762
|
// src/index.ts
|
|
4379
4763
|
var import_shield_js2 = require("@openfort/shield-js");
|
|
4380
4764
|
|
|
4765
|
+
// src/policies/evmSchema.ts
|
|
4766
|
+
var import_zod = require("zod");
|
|
4767
|
+
var EthValueOperatorEnum = import_zod.z.enum(["<=", ">=", "<", ">"]);
|
|
4768
|
+
var EvmAddressOperatorEnum = import_zod.z.enum(["in", "not in"]);
|
|
4769
|
+
var EvmNetworkOperatorEnum = import_zod.z.enum(["in", "not in"]);
|
|
4770
|
+
var EvmDataOperatorEnum = import_zod.z.enum([
|
|
4771
|
+
"in",
|
|
4772
|
+
"not in",
|
|
4773
|
+
"<",
|
|
4774
|
+
"<=",
|
|
4775
|
+
">",
|
|
4776
|
+
">=",
|
|
4777
|
+
"==",
|
|
4778
|
+
"match"
|
|
4779
|
+
]);
|
|
4780
|
+
var EvmTypedDataVerifyingContractOperatorEnum = import_zod.z.enum([
|
|
4781
|
+
"in",
|
|
4782
|
+
"not in"
|
|
4783
|
+
]);
|
|
4784
|
+
var EvmTypedDataFieldOperatorEnum = import_zod.z.enum(["in", "<=", "match"]);
|
|
4785
|
+
var ActionEnum = import_zod.z.enum(["reject", "accept"]);
|
|
4786
|
+
var EthValueCriterionSchema = import_zod.z.object({
|
|
4787
|
+
type: import_zod.z.literal("ethValue"),
|
|
4788
|
+
operator: EthValueOperatorEnum,
|
|
4789
|
+
/** Value in wei as a string. */
|
|
4790
|
+
ethValue: import_zod.z.string().regex(/^[0-9]+$/)
|
|
4791
|
+
});
|
|
4792
|
+
var EvmAddressCriterionSchema = import_zod.z.object({
|
|
4793
|
+
type: import_zod.z.literal("evmAddress"),
|
|
4794
|
+
operator: EvmAddressOperatorEnum,
|
|
4795
|
+
/** List of EVM addresses (hex format with 0x prefix). */
|
|
4796
|
+
addresses: import_zod.z.array(import_zod.z.string().regex(/^0x[0-9a-fA-F]{40}$/))
|
|
4797
|
+
});
|
|
4798
|
+
var EvmNetworkCriterionSchema = import_zod.z.object({
|
|
4799
|
+
type: import_zod.z.literal("evmNetwork"),
|
|
4800
|
+
operator: EvmNetworkOperatorEnum,
|
|
4801
|
+
/** List of chain IDs. */
|
|
4802
|
+
chainIds: import_zod.z.array(import_zod.z.number().int().positive())
|
|
4803
|
+
});
|
|
4804
|
+
var EvmMessageCriterionSchema = import_zod.z.object({
|
|
4805
|
+
type: import_zod.z.literal("evmMessage"),
|
|
4806
|
+
operator: import_zod.z.literal("match"),
|
|
4807
|
+
/** RE2 regex pattern to match against the message. */
|
|
4808
|
+
pattern: import_zod.z.string().min(1)
|
|
4809
|
+
});
|
|
4810
|
+
var EvmDataCriterionSchema = import_zod.z.object({
|
|
4811
|
+
type: import_zod.z.literal("evmData"),
|
|
4812
|
+
operator: EvmDataOperatorEnum,
|
|
4813
|
+
/** Contract ABI as JSON string. */
|
|
4814
|
+
abi: import_zod.z.string().min(1),
|
|
4815
|
+
/** Function name to match. */
|
|
4816
|
+
functionName: import_zod.z.string().min(1),
|
|
4817
|
+
/** Argument constraints. */
|
|
4818
|
+
args: import_zod.z.record(import_zod.z.unknown()).optional()
|
|
4819
|
+
});
|
|
4820
|
+
var EvmTypedDataVerifyingContractCriterionSchema = import_zod.z.object({
|
|
4821
|
+
type: import_zod.z.literal("evmTypedDataVerifyingContract"),
|
|
4822
|
+
operator: EvmTypedDataVerifyingContractOperatorEnum,
|
|
4823
|
+
/** List of verifying contract addresses. */
|
|
4824
|
+
addresses: import_zod.z.array(import_zod.z.string().regex(/^0x[0-9a-fA-F]{40}$/))
|
|
4825
|
+
});
|
|
4826
|
+
var EvmTypedDataFieldCriterionSchema = import_zod.z.object({
|
|
4827
|
+
type: import_zod.z.literal("evmTypedDataField"),
|
|
4828
|
+
operator: EvmTypedDataFieldOperatorEnum,
|
|
4829
|
+
/** Dot-notation path to the field (e.g. "order.buyer"). */
|
|
4830
|
+
fieldPath: import_zod.z.string().min(1),
|
|
4831
|
+
/** Values for "in" operator. */
|
|
4832
|
+
values: import_zod.z.array(import_zod.z.string()).optional(),
|
|
4833
|
+
/** Value for "<=" or "match" operators. */
|
|
4834
|
+
value: import_zod.z.string().optional()
|
|
4835
|
+
});
|
|
4836
|
+
var SignEvmTransactionCriteriaSchema = import_zod.z.array(
|
|
4837
|
+
import_zod.z.discriminatedUnion("type", [
|
|
4838
|
+
EthValueCriterionSchema,
|
|
4839
|
+
EvmAddressCriterionSchema,
|
|
4840
|
+
EvmDataCriterionSchema
|
|
4841
|
+
])
|
|
4842
|
+
).max(10);
|
|
4843
|
+
var SendEvmTransactionCriteriaSchema = import_zod.z.array(
|
|
4844
|
+
import_zod.z.discriminatedUnion("type", [
|
|
4845
|
+
EthValueCriterionSchema,
|
|
4846
|
+
EvmAddressCriterionSchema,
|
|
4847
|
+
EvmNetworkCriterionSchema,
|
|
4848
|
+
EvmDataCriterionSchema
|
|
4849
|
+
])
|
|
4850
|
+
).max(10);
|
|
4851
|
+
var SignEvmMessageCriteriaSchema = import_zod.z.array(import_zod.z.discriminatedUnion("type", [EvmMessageCriterionSchema])).max(10);
|
|
4852
|
+
var SignEvmTypedDataCriteriaSchema = import_zod.z.array(
|
|
4853
|
+
import_zod.z.discriminatedUnion("type", [
|
|
4854
|
+
EvmTypedDataFieldCriterionSchema,
|
|
4855
|
+
EvmTypedDataVerifyingContractCriterionSchema
|
|
4856
|
+
])
|
|
4857
|
+
).max(10);
|
|
4858
|
+
var SignEvmTransactionRuleSchema = import_zod.z.object({
|
|
4859
|
+
action: ActionEnum,
|
|
4860
|
+
operation: import_zod.z.literal("signEvmTransaction"),
|
|
4861
|
+
criteria: SignEvmTransactionCriteriaSchema
|
|
4862
|
+
});
|
|
4863
|
+
var SendEvmTransactionRuleSchema = import_zod.z.object({
|
|
4864
|
+
action: ActionEnum,
|
|
4865
|
+
operation: import_zod.z.literal("sendEvmTransaction"),
|
|
4866
|
+
criteria: SendEvmTransactionCriteriaSchema
|
|
4867
|
+
});
|
|
4868
|
+
var SignEvmMessageRuleSchema = import_zod.z.object({
|
|
4869
|
+
action: ActionEnum,
|
|
4870
|
+
operation: import_zod.z.literal("signEvmMessage"),
|
|
4871
|
+
criteria: SignEvmMessageCriteriaSchema
|
|
4872
|
+
});
|
|
4873
|
+
var SignEvmTypedDataRuleSchema = import_zod.z.object({
|
|
4874
|
+
action: ActionEnum,
|
|
4875
|
+
operation: import_zod.z.literal("signEvmTypedData"),
|
|
4876
|
+
criteria: SignEvmTypedDataCriteriaSchema
|
|
4877
|
+
});
|
|
4878
|
+
var SignEvmHashRuleSchema = import_zod.z.object({
|
|
4879
|
+
action: ActionEnum,
|
|
4880
|
+
operation: import_zod.z.literal("signEvmHash")
|
|
4881
|
+
});
|
|
4882
|
+
|
|
4883
|
+
// src/policies/solanaSchema.ts
|
|
4884
|
+
var import_zod2 = require("zod");
|
|
4885
|
+
var SolAddressOperatorEnum = import_zod2.z.enum(["in", "not in"]);
|
|
4886
|
+
var SolValueOperatorEnum = import_zod2.z.enum(["<=", ">="]);
|
|
4887
|
+
var SplAddressOperatorEnum = import_zod2.z.enum(["in", "not in"]);
|
|
4888
|
+
var SplValueOperatorEnum = import_zod2.z.enum(["<=", ">="]);
|
|
4889
|
+
var MintAddressOperatorEnum = import_zod2.z.enum(["==", "in"]);
|
|
4890
|
+
var SolDataOperatorEnum = import_zod2.z.enum([
|
|
4891
|
+
"in",
|
|
4892
|
+
"not in",
|
|
4893
|
+
"<=",
|
|
4894
|
+
">=",
|
|
4895
|
+
"==",
|
|
4896
|
+
"match"
|
|
4897
|
+
]);
|
|
4898
|
+
var ProgramIdOperatorEnum = import_zod2.z.enum(["in", "not in"]);
|
|
4899
|
+
var SolNetworkOperatorEnum = import_zod2.z.enum(["in", "not in"]);
|
|
4900
|
+
var SolNetworkEnum = import_zod2.z.enum(["mainnet-beta", "devnet", "testnet"]);
|
|
4901
|
+
var base58Address = import_zod2.z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/);
|
|
4902
|
+
var SolAddressCriterionSchema = import_zod2.z.object({
|
|
4903
|
+
type: import_zod2.z.literal("solAddress"),
|
|
4904
|
+
operator: SolAddressOperatorEnum,
|
|
4905
|
+
/** List of Solana addresses (Base58). */
|
|
4906
|
+
addresses: import_zod2.z.array(base58Address)
|
|
4907
|
+
});
|
|
4908
|
+
var SolValueCriterionSchema = import_zod2.z.object({
|
|
4909
|
+
type: import_zod2.z.literal("solValue"),
|
|
4910
|
+
operator: SolValueOperatorEnum,
|
|
4911
|
+
/** Value in lamports as string. */
|
|
4912
|
+
value: import_zod2.z.string().regex(/^[0-9]+$/)
|
|
4913
|
+
});
|
|
4914
|
+
var SplAddressCriterionSchema = import_zod2.z.object({
|
|
4915
|
+
type: import_zod2.z.literal("splAddress"),
|
|
4916
|
+
operator: SplAddressOperatorEnum,
|
|
4917
|
+
/** List of recipient addresses (Base58). */
|
|
4918
|
+
addresses: import_zod2.z.array(base58Address)
|
|
4919
|
+
});
|
|
4920
|
+
var SplValueCriterionSchema = import_zod2.z.object({
|
|
4921
|
+
type: import_zod2.z.literal("splValue"),
|
|
4922
|
+
operator: SplValueOperatorEnum,
|
|
4923
|
+
/** Token amount as string. */
|
|
4924
|
+
value: import_zod2.z.string().regex(/^[0-9]+$/)
|
|
4925
|
+
});
|
|
4926
|
+
var MintAddressCriterionSchema = import_zod2.z.object({
|
|
4927
|
+
type: import_zod2.z.literal("mintAddress"),
|
|
4928
|
+
operator: MintAddressOperatorEnum,
|
|
4929
|
+
/** List of mint addresses (Base58). */
|
|
4930
|
+
addresses: import_zod2.z.array(base58Address)
|
|
4931
|
+
});
|
|
4932
|
+
var SolDataCriterionSchema = import_zod2.z.object({
|
|
4933
|
+
type: import_zod2.z.literal("solData"),
|
|
4934
|
+
operator: SolDataOperatorEnum,
|
|
4935
|
+
/** Anchor IDL JSON (v0.30+). */
|
|
4936
|
+
idl: import_zod2.z.string().min(1),
|
|
4937
|
+
/** Instruction name. */
|
|
4938
|
+
instructionName: import_zod2.z.string().min(1),
|
|
4939
|
+
/** Argument constraints. */
|
|
4940
|
+
args: import_zod2.z.record(import_zod2.z.unknown()).optional()
|
|
4941
|
+
});
|
|
4942
|
+
var ProgramIdCriterionSchema = import_zod2.z.object({
|
|
4943
|
+
type: import_zod2.z.literal("programId"),
|
|
4944
|
+
operator: ProgramIdOperatorEnum,
|
|
4945
|
+
/** List of program IDs (Base58). */
|
|
4946
|
+
programIds: import_zod2.z.array(base58Address)
|
|
4947
|
+
});
|
|
4948
|
+
var SolNetworkCriterionSchema = import_zod2.z.object({
|
|
4949
|
+
type: import_zod2.z.literal("solNetwork"),
|
|
4950
|
+
operator: SolNetworkOperatorEnum,
|
|
4951
|
+
/** List of networks: "mainnet-beta", "devnet", "testnet". */
|
|
4952
|
+
networks: import_zod2.z.array(SolNetworkEnum)
|
|
4953
|
+
});
|
|
4954
|
+
var SolMessageCriterionSchema = import_zod2.z.object({
|
|
4955
|
+
type: import_zod2.z.literal("solMessage"),
|
|
4956
|
+
operator: import_zod2.z.literal("match"),
|
|
4957
|
+
/** RE2 regex pattern. */
|
|
4958
|
+
pattern: import_zod2.z.string().min(1)
|
|
4959
|
+
});
|
|
4960
|
+
var SignSolTransactionCriteriaSchema = import_zod2.z.array(
|
|
4961
|
+
import_zod2.z.discriminatedUnion("type", [
|
|
4962
|
+
SolAddressCriterionSchema,
|
|
4963
|
+
SolValueCriterionSchema,
|
|
4964
|
+
SplAddressCriterionSchema,
|
|
4965
|
+
SplValueCriterionSchema,
|
|
4966
|
+
MintAddressCriterionSchema,
|
|
4967
|
+
SolDataCriterionSchema,
|
|
4968
|
+
ProgramIdCriterionSchema
|
|
4969
|
+
])
|
|
4970
|
+
).max(10);
|
|
4971
|
+
var SendSolTransactionCriteriaSchema = import_zod2.z.array(
|
|
4972
|
+
import_zod2.z.discriminatedUnion("type", [
|
|
4973
|
+
SolAddressCriterionSchema,
|
|
4974
|
+
SolValueCriterionSchema,
|
|
4975
|
+
SplAddressCriterionSchema,
|
|
4976
|
+
SplValueCriterionSchema,
|
|
4977
|
+
MintAddressCriterionSchema,
|
|
4978
|
+
SolDataCriterionSchema,
|
|
4979
|
+
ProgramIdCriterionSchema,
|
|
4980
|
+
SolNetworkCriterionSchema
|
|
4981
|
+
])
|
|
4982
|
+
).max(10);
|
|
4983
|
+
var SignSolMessageCriteriaSchema = import_zod2.z.array(SolMessageCriterionSchema).max(10);
|
|
4984
|
+
var SignSolTransactionRuleSchema = import_zod2.z.object({
|
|
4985
|
+
action: ActionEnum,
|
|
4986
|
+
operation: import_zod2.z.literal("signSolTransaction"),
|
|
4987
|
+
criteria: SignSolTransactionCriteriaSchema
|
|
4988
|
+
});
|
|
4989
|
+
var SendSolTransactionRuleSchema = import_zod2.z.object({
|
|
4990
|
+
action: ActionEnum,
|
|
4991
|
+
operation: import_zod2.z.literal("sendSolTransaction"),
|
|
4992
|
+
criteria: SendSolTransactionCriteriaSchema
|
|
4993
|
+
});
|
|
4994
|
+
var SignSolMessageRuleSchema = import_zod2.z.object({
|
|
4995
|
+
action: ActionEnum,
|
|
4996
|
+
operation: import_zod2.z.literal("signSolMessage"),
|
|
4997
|
+
criteria: SignSolMessageCriteriaSchema
|
|
4998
|
+
});
|
|
4999
|
+
|
|
5000
|
+
// src/policies/types.ts
|
|
5001
|
+
var import_zod3 = require("zod");
|
|
5002
|
+
var PolicyScopeEnum = import_zod3.z.enum(["project", "account"]);
|
|
5003
|
+
var RuleSchema = import_zod3.z.discriminatedUnion("operation", [
|
|
5004
|
+
SignEvmTransactionRuleSchema,
|
|
5005
|
+
SendEvmTransactionRuleSchema,
|
|
5006
|
+
SignEvmMessageRuleSchema,
|
|
5007
|
+
SignEvmTypedDataRuleSchema,
|
|
5008
|
+
SignEvmHashRuleSchema,
|
|
5009
|
+
SignSolTransactionRuleSchema,
|
|
5010
|
+
SendSolTransactionRuleSchema,
|
|
5011
|
+
SignSolMessageRuleSchema
|
|
5012
|
+
]);
|
|
5013
|
+
var CreatePolicyBodySchema = import_zod3.z.object({
|
|
5014
|
+
/** The scope of the policy. 'project' applies to all accounts, 'account' applies to a specific account. */
|
|
5015
|
+
scope: PolicyScopeEnum,
|
|
5016
|
+
/** A description of what this policy does. */
|
|
5017
|
+
description: import_zod3.z.string().optional(),
|
|
5018
|
+
/** The account ID for account-scoped policies (starts with acc_). Required when scope is 'account'. */
|
|
5019
|
+
accountId: import_zod3.z.string().optional(),
|
|
5020
|
+
/** Whether the policy is enabled. */
|
|
5021
|
+
enabled: import_zod3.z.boolean().optional(),
|
|
5022
|
+
/** Priority of the policy. Higher priority policies are evaluated first. */
|
|
5023
|
+
priority: import_zod3.z.number().int().optional(),
|
|
5024
|
+
/** The rules that make up this policy. Maximum 10 rules per policy. */
|
|
5025
|
+
rules: import_zod3.z.array(RuleSchema).min(1).max(10)
|
|
5026
|
+
});
|
|
5027
|
+
var UpdatePolicyBodySchema = import_zod3.z.object({
|
|
5028
|
+
/** A description of what this policy does. */
|
|
5029
|
+
description: import_zod3.z.string().optional(),
|
|
5030
|
+
/** Whether the policy is enabled. */
|
|
5031
|
+
enabled: import_zod3.z.boolean().optional(),
|
|
5032
|
+
/** Priority of the policy. Higher priority policies are evaluated first. */
|
|
5033
|
+
priority: import_zod3.z.number().int().optional(),
|
|
5034
|
+
/** The rules that make up this policy. If provided, replaces all existing rules. Maximum 10 rules. */
|
|
5035
|
+
rules: import_zod3.z.array(RuleSchema).min(1).max(10).optional()
|
|
5036
|
+
});
|
|
5037
|
+
|
|
4381
5038
|
// src/wallets/evm/actions/signMessage.ts
|
|
4382
5039
|
var import_viem2 = require("viem");
|
|
4383
5040
|
|
|
@@ -4523,14 +5180,7 @@ var Openfort = class {
|
|
|
4523
5180
|
v1: {
|
|
4524
5181
|
list: getAccounts,
|
|
4525
5182
|
create: createAccount,
|
|
4526
|
-
get: getAccount
|
|
4527
|
-
requestTransferOwnership,
|
|
4528
|
-
cancelTransferOwnership,
|
|
4529
|
-
signPayload,
|
|
4530
|
-
sync: syncAccount,
|
|
4531
|
-
deploy: deployAccount,
|
|
4532
|
-
startRecovery,
|
|
4533
|
-
completeRecovery
|
|
5183
|
+
get: getAccount
|
|
4534
5184
|
}
|
|
4535
5185
|
};
|
|
4536
5186
|
}
|
|
@@ -4539,6 +5189,7 @@ var Openfort = class {
|
|
|
4539
5189
|
// ============================================
|
|
4540
5190
|
/**
|
|
4541
5191
|
* Player management endpoints
|
|
5192
|
+
* @deprecated
|
|
4542
5193
|
*/
|
|
4543
5194
|
get players() {
|
|
4544
5195
|
return {
|
|
@@ -4578,41 +5229,77 @@ var Openfort = class {
|
|
|
4578
5229
|
// Policies API
|
|
4579
5230
|
// ============================================
|
|
4580
5231
|
/**
|
|
4581
|
-
* Policy management endpoints
|
|
5232
|
+
* Policy management endpoints for controlling account operations.
|
|
5233
|
+
*
|
|
5234
|
+
* Policies define rules that govern what operations accounts can perform,
|
|
5235
|
+
* including transaction signing, message signing, and more.
|
|
5236
|
+
*
|
|
5237
|
+
* @example
|
|
5238
|
+
* ```typescript
|
|
5239
|
+
* // List all policies
|
|
5240
|
+
* const all = await openfort.policies.list();
|
|
5241
|
+
*
|
|
5242
|
+
* // Create a policy
|
|
5243
|
+
* const policy = await openfort.policies.create({
|
|
5244
|
+
* scope: 'project',
|
|
5245
|
+
* rules: [{ action: 'reject', operation: 'signEvmHash' }],
|
|
5246
|
+
* });
|
|
5247
|
+
*
|
|
5248
|
+
* // Evaluate whether an operation would be allowed
|
|
5249
|
+
* const result = await openfort.policies.evaluate({ operation: 'signEvmTransaction', accountId: 'acc_...' });
|
|
5250
|
+
* ```
|
|
4582
5251
|
*/
|
|
4583
5252
|
get policies() {
|
|
4584
5253
|
return {
|
|
4585
5254
|
/** List policies */
|
|
4586
|
-
list:
|
|
5255
|
+
list: listPolicies,
|
|
4587
5256
|
/** Create a policy */
|
|
4588
|
-
create:
|
|
5257
|
+
create: createPolicyV2,
|
|
4589
5258
|
/** Get a policy by ID */
|
|
4590
|
-
get:
|
|
5259
|
+
get: getPolicyV2,
|
|
4591
5260
|
/** Update a policy */
|
|
4592
|
-
update:
|
|
5261
|
+
update: updatePolicyV2,
|
|
4593
5262
|
/** Delete a policy */
|
|
4594
|
-
delete:
|
|
4595
|
-
/**
|
|
4596
|
-
|
|
4597
|
-
/** Enable a policy */
|
|
4598
|
-
enable: enablePolicy,
|
|
4599
|
-
/** Get policy total gas usage */
|
|
4600
|
-
getTotalGasUsage: getPolicyTotalGasUsage
|
|
5263
|
+
delete: deletePolicyV2,
|
|
5264
|
+
/** Evaluate an operation against policies */
|
|
5265
|
+
evaluate: evaluatePolicyV2
|
|
4601
5266
|
};
|
|
4602
5267
|
}
|
|
5268
|
+
// ============================================
|
|
5269
|
+
// Fee Sponsorship API
|
|
5270
|
+
// ============================================
|
|
4603
5271
|
/**
|
|
4604
|
-
*
|
|
5272
|
+
* Fee sponsorship (gas policy) management endpoints
|
|
4605
5273
|
*/
|
|
4606
|
-
get
|
|
5274
|
+
get feeSponsorship() {
|
|
4607
5275
|
return {
|
|
4608
|
-
/** List
|
|
4609
|
-
list:
|
|
4610
|
-
/** Create a policy
|
|
4611
|
-
create:
|
|
4612
|
-
/**
|
|
4613
|
-
|
|
4614
|
-
/**
|
|
4615
|
-
|
|
5276
|
+
/** List fee sponsorship policies */
|
|
5277
|
+
list: getPolicies,
|
|
5278
|
+
/** Create a fee sponsorship policy */
|
|
5279
|
+
create: createPolicy,
|
|
5280
|
+
/** Get a fee sponsorship policy by ID */
|
|
5281
|
+
get: getPolicy,
|
|
5282
|
+
/** Update a fee sponsorship policy */
|
|
5283
|
+
update: updatePolicy,
|
|
5284
|
+
/** Delete a fee sponsorship policy */
|
|
5285
|
+
delete: deletePolicy,
|
|
5286
|
+
/** Disable a fee sponsorship policy */
|
|
5287
|
+
disable: disablePolicy,
|
|
5288
|
+
/** Enable a fee sponsorship policy */
|
|
5289
|
+
enable: enablePolicy,
|
|
5290
|
+
/** Get fee sponsorship policy total gas usage */
|
|
5291
|
+
getTotalGasUsage: getPolicyTotalGasUsage,
|
|
5292
|
+
/** Fee sponsorship policy rules */
|
|
5293
|
+
rules: {
|
|
5294
|
+
/** List policy rules */
|
|
5295
|
+
list: getPolicyRules,
|
|
5296
|
+
/** Create a policy rule */
|
|
5297
|
+
create: createPolicyRule,
|
|
5298
|
+
/** Update a policy rule */
|
|
5299
|
+
update: updatePolicyRule,
|
|
5300
|
+
/** Delete a policy rule */
|
|
5301
|
+
delete: deletePolicyRule
|
|
5302
|
+
}
|
|
4616
5303
|
};
|
|
4617
5304
|
}
|
|
4618
5305
|
// ============================================
|
|
@@ -4660,6 +5347,7 @@ var Openfort = class {
|
|
|
4660
5347
|
// ============================================
|
|
4661
5348
|
/**
|
|
4662
5349
|
* Settings / Developer account management endpoints
|
|
5350
|
+
* @deprecated
|
|
4663
5351
|
*/
|
|
4664
5352
|
get settings() {
|
|
4665
5353
|
return {
|
|
@@ -5002,6 +5690,19 @@ var index_default = Openfort;
|
|
|
5002
5690
|
CreateBackendWalletResponseObject,
|
|
5003
5691
|
CreateEmbeddedRequestAccountType,
|
|
5004
5692
|
CreateEmbeddedRequestChainType,
|
|
5693
|
+
CreatePolicyBodySchema,
|
|
5694
|
+
CreatePolicyV2RequestScope,
|
|
5695
|
+
CreatePolicyV2RuleRequestAction,
|
|
5696
|
+
CriteriaOperator,
|
|
5697
|
+
CriteriaOperatorEQUAL,
|
|
5698
|
+
CriteriaOperatorGREATERTHAN,
|
|
5699
|
+
CriteriaOperatorGREATERTHANOREQUAL,
|
|
5700
|
+
CriteriaOperatorIN,
|
|
5701
|
+
CriteriaOperatorLESSTHAN,
|
|
5702
|
+
CriteriaOperatorLESSTHANOREQUAL,
|
|
5703
|
+
CriteriaOperatorMATCH,
|
|
5704
|
+
CriteriaOperatorNOTIN,
|
|
5705
|
+
CriteriaType,
|
|
5005
5706
|
Currency,
|
|
5006
5707
|
DeleteBackendWalletResponseObject,
|
|
5007
5708
|
DeveloperAccountResponseExpandable,
|
|
@@ -5021,6 +5722,8 @@ var index_default = Openfort;
|
|
|
5021
5722
|
EntityTypePLAYER,
|
|
5022
5723
|
EntityTypePOLICY,
|
|
5023
5724
|
EntityTypePOLICYRULE,
|
|
5725
|
+
EntityTypePOLICYV2,
|
|
5726
|
+
EntityTypePOLICYV2RULE,
|
|
5024
5727
|
EntityTypePROJECT,
|
|
5025
5728
|
EntityTypeREADCONTRACT,
|
|
5026
5729
|
EntityTypeSESSION,
|
|
@@ -5032,7 +5735,43 @@ var index_default = Openfort;
|
|
|
5032
5735
|
EntityTypeUSER,
|
|
5033
5736
|
EntityTypeWALLET,
|
|
5034
5737
|
ErrorTypeINVALIDREQUESTERROR,
|
|
5738
|
+
EthValueCriterionOperator,
|
|
5739
|
+
EthValueCriterionRequestOperator,
|
|
5740
|
+
EthValueCriterionRequestType,
|
|
5741
|
+
EthValueCriterionSchema,
|
|
5742
|
+
EvaluatePolicyV2ResponseObject,
|
|
5743
|
+
EvmAddressCriterionOperator,
|
|
5744
|
+
EvmAddressCriterionRequestOperator,
|
|
5745
|
+
EvmAddressCriterionRequestType,
|
|
5746
|
+
EvmAddressCriterionSchema,
|
|
5035
5747
|
EvmClient,
|
|
5748
|
+
EvmCriteriaType,
|
|
5749
|
+
EvmCriteriaTypeETHVALUE,
|
|
5750
|
+
EvmCriteriaTypeEVMADDRESS,
|
|
5751
|
+
EvmCriteriaTypeEVMDATA,
|
|
5752
|
+
EvmCriteriaTypeEVMMESSAGE,
|
|
5753
|
+
EvmCriteriaTypeEVMNETWORK,
|
|
5754
|
+
EvmCriteriaTypeEVMTYPEDDATAFIELD,
|
|
5755
|
+
EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT,
|
|
5756
|
+
EvmCriteriaTypeNETUSDCHANGE,
|
|
5757
|
+
EvmDataCriterionRequestOperator,
|
|
5758
|
+
EvmDataCriterionRequestType,
|
|
5759
|
+
EvmDataCriterionSchema,
|
|
5760
|
+
EvmMessageCriterionRequestOperator,
|
|
5761
|
+
EvmMessageCriterionRequestType,
|
|
5762
|
+
EvmMessageCriterionSchema,
|
|
5763
|
+
EvmNetworkCriterionOperator,
|
|
5764
|
+
EvmNetworkCriterionRequestOperator,
|
|
5765
|
+
EvmNetworkCriterionRequestType,
|
|
5766
|
+
EvmNetworkCriterionSchema,
|
|
5767
|
+
EvmTypedDataFieldCriterionOperator,
|
|
5768
|
+
EvmTypedDataFieldCriterionRequestOperator,
|
|
5769
|
+
EvmTypedDataFieldCriterionRequestType,
|
|
5770
|
+
EvmTypedDataFieldCriterionSchema,
|
|
5771
|
+
EvmTypedDataVerifyingContractCriterionOperator,
|
|
5772
|
+
EvmTypedDataVerifyingContractCriterionRequestOperator,
|
|
5773
|
+
EvmTypedDataVerifyingContractCriterionRequestType,
|
|
5774
|
+
EvmTypedDataVerifyingContractCriterionSchema,
|
|
5036
5775
|
ExportPrivateKeyResponseObject,
|
|
5037
5776
|
GetAccountsV2AccountType,
|
|
5038
5777
|
GetAccountsV2ChainType,
|
|
@@ -5049,9 +5788,17 @@ var index_default = Openfort;
|
|
|
5049
5788
|
JsonRpcRequestJsonrpc,
|
|
5050
5789
|
JsonRpcSuccessResponseAnyJsonrpc,
|
|
5051
5790
|
ListBackendWalletsChainType,
|
|
5791
|
+
ListPoliciesScope,
|
|
5792
|
+
MintAddressCriterionOperator,
|
|
5793
|
+
MintAddressCriterionRequestOperator,
|
|
5794
|
+
MintAddressCriterionRequestType,
|
|
5795
|
+
MintAddressCriterionSchema,
|
|
5052
5796
|
MissingAPIKeyError,
|
|
5053
5797
|
MissingPublishableKeyError,
|
|
5054
5798
|
MissingWalletSecretError,
|
|
5799
|
+
NetUSDChangeCriterionOperator,
|
|
5800
|
+
NetUSDChangeCriterionRequestOperator,
|
|
5801
|
+
NetUSDChangeCriterionRequestType,
|
|
5055
5802
|
NetworkError,
|
|
5056
5803
|
NextActionType,
|
|
5057
5804
|
OAuthProvider,
|
|
@@ -5076,25 +5823,77 @@ var index_default = Openfort;
|
|
|
5076
5823
|
PolicyRuleTypeACCOUNT,
|
|
5077
5824
|
PolicyRuleTypeCONTRACT,
|
|
5078
5825
|
PolicyRuleTypeRATELIMIT,
|
|
5826
|
+
PolicyV2Action,
|
|
5827
|
+
PolicyV2ListQueriesScope,
|
|
5828
|
+
PolicyV2Scope,
|
|
5079
5829
|
PregenerateAccountResponseCustody,
|
|
5080
5830
|
PregenerateUserRequestV2AccountType,
|
|
5081
5831
|
PregenerateUserRequestV2ChainType,
|
|
5082
5832
|
PrismaSortOrder,
|
|
5083
5833
|
PrivateKeyPolicy,
|
|
5834
|
+
ProgramIdCriterionOperator,
|
|
5835
|
+
ProgramIdCriterionRequestOperator,
|
|
5836
|
+
ProgramIdCriterionRequestType,
|
|
5837
|
+
ProgramIdCriterionSchema,
|
|
5084
5838
|
ProjectStatsRequestTimeFrame,
|
|
5085
5839
|
RegisterWalletSecretResponseObject,
|
|
5086
5840
|
ResponseTypeLIST,
|
|
5087
5841
|
RevokeWalletSecretResponseObject,
|
|
5088
5842
|
RotateWalletSecretResponseObject,
|
|
5843
|
+
RuleSchema,
|
|
5844
|
+
SendEvmTransactionRuleSchema,
|
|
5845
|
+
SendSolTransactionRuleSchema,
|
|
5089
5846
|
SessionResponseExpandable,
|
|
5090
5847
|
ShieldAuthProvider,
|
|
5848
|
+
SignEvmHashRuleSchema,
|
|
5849
|
+
SignEvmMessageRuleSchema,
|
|
5850
|
+
SignEvmTransactionRuleSchema,
|
|
5851
|
+
SignEvmTypedDataRuleSchema,
|
|
5091
5852
|
SignResponseObject,
|
|
5853
|
+
SignSolMessageRuleSchema,
|
|
5854
|
+
SignSolTransactionRuleSchema,
|
|
5092
5855
|
SmsProviderMESSAGEBIRD,
|
|
5093
5856
|
SmsProviderSMSAPI,
|
|
5094
5857
|
SmsProviderTWILIO,
|
|
5095
5858
|
SmsProviderTXTLOCAL,
|
|
5096
5859
|
SmsProviderVONAGE,
|
|
5860
|
+
SolAddressCriterionOperator,
|
|
5861
|
+
SolAddressCriterionRequestOperator,
|
|
5862
|
+
SolAddressCriterionRequestType,
|
|
5863
|
+
SolAddressCriterionSchema,
|
|
5864
|
+
SolDataCriterionRequestOperator,
|
|
5865
|
+
SolDataCriterionRequestType,
|
|
5866
|
+
SolDataCriterionSchema,
|
|
5867
|
+
SolMessageCriterionRequestOperator,
|
|
5868
|
+
SolMessageCriterionRequestType,
|
|
5869
|
+
SolMessageCriterionSchema,
|
|
5870
|
+
SolNetworkCriterionOperator,
|
|
5871
|
+
SolNetworkCriterionRequestOperator,
|
|
5872
|
+
SolNetworkCriterionRequestType,
|
|
5873
|
+
SolNetworkCriterionSchema,
|
|
5874
|
+
SolValueCriterionOperator,
|
|
5875
|
+
SolValueCriterionRequestOperator,
|
|
5876
|
+
SolValueCriterionRequestType,
|
|
5877
|
+
SolValueCriterionSchema,
|
|
5097
5878
|
SolanaClient,
|
|
5879
|
+
SolanaCriteriaType,
|
|
5880
|
+
SolanaCriteriaTypeMINTADDRESS,
|
|
5881
|
+
SolanaCriteriaTypePROGRAMID,
|
|
5882
|
+
SolanaCriteriaTypeSOLADDRESS,
|
|
5883
|
+
SolanaCriteriaTypeSOLDATA,
|
|
5884
|
+
SolanaCriteriaTypeSOLMESSAGE,
|
|
5885
|
+
SolanaCriteriaTypeSOLNETWORK,
|
|
5886
|
+
SolanaCriteriaTypeSOLVALUE,
|
|
5887
|
+
SolanaCriteriaTypeSPLADDRESS,
|
|
5888
|
+
SolanaCriteriaTypeSPLVALUE,
|
|
5889
|
+
SplAddressCriterionOperator,
|
|
5890
|
+
SplAddressCriterionRequestOperator,
|
|
5891
|
+
SplAddressCriterionRequestType,
|
|
5892
|
+
SplAddressCriterionSchema,
|
|
5893
|
+
SplValueCriterionOperator,
|
|
5894
|
+
SplValueCriterionRequestOperator,
|
|
5895
|
+
SplValueCriterionRequestType,
|
|
5896
|
+
SplValueCriterionSchema,
|
|
5098
5897
|
SponsorSchema,
|
|
5099
5898
|
SponsorSchemaCHARGECUSTOMTOKENS,
|
|
5100
5899
|
SponsorSchemaFIXEDRATE,
|
|
@@ -5116,6 +5915,7 @@ var index_default = Openfort;
|
|
|
5116
5915
|
TransactionIntentResponseExpandable,
|
|
5117
5916
|
TransactionStatus,
|
|
5118
5917
|
UnknownError,
|
|
5918
|
+
UpdatePolicyBodySchema,
|
|
5119
5919
|
UserInputValidationError,
|
|
5120
5920
|
UserProjectCreateRequestRole,
|
|
5121
5921
|
UserProjectRole,
|
|
@@ -5129,8 +5929,6 @@ var index_default = Openfort;
|
|
|
5129
5929
|
authorize,
|
|
5130
5930
|
callbackOAuth,
|
|
5131
5931
|
cancelTransferAccountOwnership,
|
|
5132
|
-
cancelTransferOwnership,
|
|
5133
|
-
completeRecovery,
|
|
5134
5932
|
configure,
|
|
5135
5933
|
create,
|
|
5136
5934
|
createAccount,
|
|
@@ -5147,6 +5945,7 @@ var index_default = Openfort;
|
|
|
5147
5945
|
createPlayer,
|
|
5148
5946
|
createPolicy,
|
|
5149
5947
|
createPolicyRule,
|
|
5948
|
+
createPolicyV2,
|
|
5150
5949
|
createPolicyWithdrawal,
|
|
5151
5950
|
createSession,
|
|
5152
5951
|
createSubscription,
|
|
@@ -5164,16 +5963,17 @@ var index_default = Openfort;
|
|
|
5164
5963
|
deletePlayer,
|
|
5165
5964
|
deletePolicy,
|
|
5166
5965
|
deletePolicyRule,
|
|
5966
|
+
deletePolicyV2,
|
|
5167
5967
|
deleteSubscription,
|
|
5168
5968
|
deleteTrigger,
|
|
5169
5969
|
deleteUser,
|
|
5170
|
-
deployAccount,
|
|
5171
5970
|
deprecatedCallbackOAuth,
|
|
5172
5971
|
disableAccount,
|
|
5173
5972
|
disablePolicy,
|
|
5174
5973
|
enablePolicy,
|
|
5175
5974
|
encryptForImport,
|
|
5176
5975
|
estimateTransactionIntentCost,
|
|
5976
|
+
evaluatePolicyV2,
|
|
5177
5977
|
exportPrivateKey,
|
|
5178
5978
|
generateRSAKeyPair,
|
|
5179
5979
|
getAccount,
|
|
@@ -5206,6 +6006,7 @@ var index_default = Openfort;
|
|
|
5206
6006
|
getPolicyReportTransactionIntents,
|
|
5207
6007
|
getPolicyRules,
|
|
5208
6008
|
getPolicyTotalGasUsage,
|
|
6009
|
+
getPolicyV2,
|
|
5209
6010
|
getProjectLogs,
|
|
5210
6011
|
getSession,
|
|
5211
6012
|
getSignerIdByAddress,
|
|
@@ -5235,6 +6036,7 @@ var index_default = Openfort;
|
|
|
5235
6036
|
listForwarderContracts,
|
|
5236
6037
|
listOAuthConfig,
|
|
5237
6038
|
listPaymasters,
|
|
6039
|
+
listPolicies,
|
|
5238
6040
|
listSubscriptionLogs,
|
|
5239
6041
|
loginEmailPassword,
|
|
5240
6042
|
loginOIDC,
|
|
@@ -5253,20 +6055,16 @@ var index_default = Openfort;
|
|
|
5253
6055
|
requestEmailVerification,
|
|
5254
6056
|
requestResetPassword,
|
|
5255
6057
|
requestTransferAccountOwnership,
|
|
5256
|
-
requestTransferOwnership,
|
|
5257
6058
|
resetPassword,
|
|
5258
6059
|
revokeSession,
|
|
5259
6060
|
revokeWalletSecret,
|
|
5260
6061
|
rotateWalletSecret,
|
|
5261
6062
|
sign,
|
|
5262
|
-
signPayload,
|
|
5263
6063
|
signPayloadDeveloperAccount,
|
|
5264
6064
|
signature,
|
|
5265
6065
|
signatureSession,
|
|
5266
6066
|
signupEmailPassword,
|
|
5267
|
-
startRecovery,
|
|
5268
6067
|
switchChainV2,
|
|
5269
|
-
syncAccount,
|
|
5270
6068
|
testTrigger,
|
|
5271
6069
|
thirdParty,
|
|
5272
6070
|
thirdPartyV2,
|
|
@@ -5282,6 +6080,7 @@ var index_default = Openfort;
|
|
|
5282
6080
|
updatePlayer,
|
|
5283
6081
|
updatePolicy,
|
|
5284
6082
|
updatePolicyRule,
|
|
6083
|
+
updatePolicyV2,
|
|
5285
6084
|
verifyAuthToken,
|
|
5286
6085
|
verifyEmail,
|
|
5287
6086
|
verifyOAuthToken
|