@openfort/openfort-node 0.8.4 → 0.9.1

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/dist/index.js CHANGED
@@ -94,6 +94,7 @@ __export(index_exports, {
94
94
  EntityTypeDEVICE: () => EntityTypeDEVICE,
95
95
  EntityTypeEMAILSAMPLE: () => EntityTypeEMAILSAMPLE,
96
96
  EntityTypeEVENT: () => EntityTypeEVENT,
97
+ EntityTypeFEESPONSORSHIP: () => EntityTypeFEESPONSORSHIP,
97
98
  EntityTypeFORWARDERCONTRACT: () => EntityTypeFORWARDERCONTRACT,
98
99
  EntityTypeLOG: () => EntityTypeLOG,
99
100
  EntityTypePAYMASTER: () => EntityTypePAYMASTER,
@@ -154,7 +155,7 @@ __export(index_exports, {
154
155
  GetAccountsV2AccountType: () => GetAccountsV2AccountType,
155
156
  GetAccountsV2ChainType: () => GetAccountsV2ChainType,
156
157
  GetAccountsV2Custody: () => GetAccountsV2Custody,
157
- GetPolicyRulesExpandItem: () => GetPolicyRulesExpandItem,
158
+ GetGasPolicyRulesLegacyExpandItem: () => GetGasPolicyRulesLegacyExpandItem,
158
159
  IMPORT_ENCRYPTION_PUBLIC_KEY: () => IMPORT_ENCRYPTION_PUBLIC_KEY,
159
160
  ImportPrivateKeyRequestChainType: () => ImportPrivateKeyRequestChainType,
160
161
  ImportPrivateKeyResponseChainType: () => ImportPrivateKeyResponseChainType,
@@ -166,7 +167,7 @@ __export(index_exports, {
166
167
  JsonRpcRequestJsonrpc: () => JsonRpcRequestJsonrpc,
167
168
  JsonRpcSuccessResponseAnyJsonrpc: () => JsonRpcSuccessResponseAnyJsonrpc,
168
169
  ListBackendWalletsChainType: () => ListBackendWalletsChainType,
169
- ListPoliciesScope: () => ListPoliciesScope,
170
+ ListPoliciesScopeItem: () => ListPoliciesScopeItem,
170
171
  MintAddressCriterionOperator: () => MintAddressCriterionOperator,
171
172
  MintAddressCriterionRequestOperator: () => MintAddressCriterionRequestOperator,
172
173
  MintAddressCriterionRequestType: () => MintAddressCriterionRequestType,
@@ -202,7 +203,7 @@ __export(index_exports, {
202
203
  PolicyRuleTypeCONTRACT: () => PolicyRuleTypeCONTRACT,
203
204
  PolicyRuleTypeRATELIMIT: () => PolicyRuleTypeRATELIMIT,
204
205
  PolicyV2Action: () => PolicyV2Action,
205
- PolicyV2ListQueriesScope: () => PolicyV2ListQueriesScope,
206
+ PolicyV2ListQueriesScopeItem: () => PolicyV2ListQueriesScopeItem,
206
207
  PolicyV2Scope: () => PolicyV2Scope,
207
208
  PregenerateAccountResponseCustody: () => PregenerateAccountResponseCustody,
208
209
  PregenerateUserRequestV2AccountType: () => PregenerateUserRequestV2AccountType,
@@ -272,10 +273,12 @@ __export(index_exports, {
272
273
  SplValueCriterionRequestOperator: () => SplValueCriterionRequestOperator,
273
274
  SplValueCriterionRequestType: () => SplValueCriterionRequestType,
274
275
  SplValueCriterionSchema: () => SplValueCriterionSchema,
276
+ SponsorEvmTransactionRuleSchema: () => SponsorEvmTransactionRuleSchema,
275
277
  SponsorSchema: () => SponsorSchema,
276
278
  SponsorSchemaCHARGECUSTOMTOKENS: () => SponsorSchemaCHARGECUSTOMTOKENS,
277
279
  SponsorSchemaFIXEDRATE: () => SponsorSchemaFIXEDRATE,
278
280
  SponsorSchemaPAYFORUSER: () => SponsorSchemaPAYFORUSER,
281
+ SponsorSolTransactionRuleSchema: () => SponsorSolTransactionRuleSchema,
279
282
  Status: () => Status,
280
283
  ThirdPartyOAuthProvider: () => ThirdPartyOAuthProvider,
281
284
  ThirdPartyOAuthProviderACCELBYTE: () => ThirdPartyOAuthProviderACCELBYTE,
@@ -293,7 +296,14 @@ __export(index_exports, {
293
296
  TransactionIntentResponseExpandable: () => TransactionIntentResponseExpandable,
294
297
  TransactionStatus: () => TransactionStatus,
295
298
  UnknownError: () => UnknownError,
299
+ UpdateBackendWalletRequestAccountType: () => UpdateBackendWalletRequestAccountType,
300
+ UpdateBackendWalletRequestChainType: () => UpdateBackendWalletRequestChainType,
301
+ UpdateBackendWalletResponseChainType: () => UpdateBackendWalletResponseChainType,
302
+ UpdateBackendWalletResponseCustody: () => UpdateBackendWalletResponseCustody,
303
+ UpdateBackendWalletResponseDelegatedAccountChainChainType: () => UpdateBackendWalletResponseDelegatedAccountChainChainType,
304
+ UpdateBackendWalletResponseObject: () => UpdateBackendWalletResponseObject,
296
305
  UpdatePolicyBodySchema: () => UpdatePolicyBodySchema,
306
+ UsageAlertType: () => UsageAlertType,
297
307
  UserInputValidationError: () => UserInputValidationError,
298
308
  UserProjectCreateRequestRole: () => UserProjectCreateRequestRole,
299
309
  UserProjectRole: () => UserProjectRole,
@@ -316,15 +326,16 @@ __export(index_exports, {
316
326
  createContract: () => createContract,
317
327
  createDeveloperAccount: () => createDeveloperAccount,
318
328
  createEvent: () => createEvent,
329
+ createFeeSponsorship: () => createFeeSponsorship,
319
330
  createForwarderContract: () => createForwarderContract,
331
+ createGasPolicyLegacy: () => createGasPolicyLegacy,
332
+ createGasPolicyRuleLegacy: () => createGasPolicyRuleLegacy,
333
+ createGasPolicyWithdrawalLegacy: () => createGasPolicyWithdrawalLegacy,
320
334
  createOAuthConfig: () => createOAuthConfig,
321
335
  createOnrampSession: () => createOnrampSession,
322
336
  createPaymaster: () => createPaymaster,
323
337
  createPlayer: () => createPlayer,
324
- createPolicy: () => createPolicy,
325
- createPolicyRule: () => createPolicyRule,
326
338
  createPolicyV2: () => createPolicyV2,
327
- createPolicyWithdrawal: () => createPolicyWithdrawal,
328
339
  createSession: () => createSession,
329
340
  createSubscription: () => createSubscription,
330
341
  createTransactionIntent: () => createTransactionIntent,
@@ -336,20 +347,23 @@ __export(index_exports, {
336
347
  deleteContract: () => deleteContract,
337
348
  deleteDeveloperAccount: () => deleteDeveloperAccount,
338
349
  deleteEvent: () => deleteEvent,
350
+ deleteFeeSponsorship: () => deleteFeeSponsorship,
339
351
  deleteForwarderContract: () => deleteForwarderContract,
352
+ deleteGasPolicyLegacy: () => deleteGasPolicyLegacy,
353
+ deleteGasPolicyRuleLegacy: () => deleteGasPolicyRuleLegacy,
340
354
  deleteOAuthConfig: () => deleteOAuthConfig,
341
355
  deletePaymaster: () => deletePaymaster,
342
356
  deletePlayer: () => deletePlayer,
343
- deletePolicy: () => deletePolicy,
344
- deletePolicyRule: () => deletePolicyRule,
345
357
  deletePolicyV2: () => deletePolicyV2,
346
358
  deleteSubscription: () => deleteSubscription,
347
359
  deleteTrigger: () => deleteTrigger,
348
360
  deleteUser: () => deleteUser,
349
361
  deprecatedCallbackOAuth: () => deprecatedCallbackOAuth,
350
362
  disableAccount: () => disableAccount,
351
- disablePolicy: () => disablePolicy,
352
- enablePolicy: () => enablePolicy,
363
+ disableFeeSponsorship: () => disableFeeSponsorship,
364
+ disableGasPolicyLegacy: () => disableGasPolicyLegacy,
365
+ enableFeeSponsorship: () => enableFeeSponsorship,
366
+ enableGasPolicyLegacy: () => enableGasPolicyLegacy,
353
367
  encryptForImport: () => encryptForImport,
354
368
  estimateTransactionIntentCost: () => estimateTransactionIntentCost,
355
369
  evaluatePolicyV2: () => evaluatePolicyV2,
@@ -371,7 +385,14 @@ __export(index_exports, {
371
385
  getDeveloperAccounts: () => getDeveloperAccounts,
372
386
  getEvent: () => getEvent,
373
387
  getEvents: () => getEvents,
388
+ getFeeSponsorship: () => getFeeSponsorship,
374
389
  getForwarderContract: () => getForwarderContract,
390
+ getGasPoliciesLegacy: () => getGasPoliciesLegacy,
391
+ getGasPolicyBalanceLegacy: () => getGasPolicyBalanceLegacy,
392
+ getGasPolicyLegacy: () => getGasPolicyLegacy,
393
+ getGasPolicyReportTransactionIntentsLegacy: () => getGasPolicyReportTransactionIntentsLegacy,
394
+ getGasPolicyRulesLegacy: () => getGasPolicyRulesLegacy,
395
+ getGasPolicyTotalGasUsageLegacy: () => getGasPolicyTotalGasUsageLegacy,
375
396
  getJwks: () => getJwks,
376
397
  getOAuthConfig: () => getOAuthConfig,
377
398
  getOnrampQuote: () => getOnrampQuote,
@@ -379,12 +400,6 @@ __export(index_exports, {
379
400
  getPlayer: () => getPlayer,
380
401
  getPlayerSessions: () => getPlayerSessions,
381
402
  getPlayers: () => getPlayers,
382
- getPolicies: () => getPolicies,
383
- getPolicy: () => getPolicy,
384
- getPolicyBalance: () => getPolicyBalance,
385
- getPolicyReportTransactionIntents: () => getPolicyReportTransactionIntents,
386
- getPolicyRules: () => getPolicyRules,
387
- getPolicyTotalGasUsage: () => getPolicyTotalGasUsage,
388
403
  getPolicyV2: () => getPolicyV2,
389
404
  getProjectLogs: () => getProjectLogs,
390
405
  getSession: () => getSession,
@@ -412,6 +427,7 @@ __export(index_exports, {
412
427
  linkThirdParty: () => linkThirdParty,
413
428
  list: () => list,
414
429
  listBackendWallets: () => listBackendWallets,
430
+ listFeeSponsorships: () => listFeeSponsorships,
415
431
  listForwarderContracts: () => listForwarderContracts,
416
432
  listOAuthConfig: () => listOAuthConfig,
417
433
  listPaymasters: () => listPaymasters,
@@ -452,19 +468,22 @@ __export(index_exports, {
452
468
  unlinkEmail: () => unlinkEmail,
453
469
  unlinkOAuth: () => unlinkOAuth,
454
470
  unlinkSIWE: () => unlinkSIWE,
471
+ updateBackendWallet: () => updateBackendWallet,
455
472
  updateContract: () => updateContract,
456
473
  updateDeveloperAccount: () => updateDeveloperAccount,
474
+ updateFeeSponsorship: () => updateFeeSponsorship,
457
475
  updateForwarderContract: () => updateForwarderContract,
476
+ updateGasPolicyLegacy: () => updateGasPolicyLegacy,
477
+ updateGasPolicyRuleLegacy: () => updateGasPolicyRuleLegacy,
458
478
  updatePaymaster: () => updatePaymaster,
459
479
  updatePlayer: () => updatePlayer,
460
- updatePolicy: () => updatePolicy,
461
- updatePolicyRule: () => updatePolicyRule,
462
480
  updatePolicyV2: () => updatePolicyV2,
463
481
  verifyAuthToken: () => verifyAuthToken,
464
482
  verifyEmail: () => verifyEmail,
465
483
  verifyOAuthToken: () => verifyOAuthToken
466
484
  });
467
485
  module.exports = __toCommonJS(index_exports);
486
+ var import_node_crypto4 = require("crypto");
468
487
  var import_shield_js = require("@openfort/shield-js");
469
488
  var import_node_fetch = __toESM(require("node-fetch"));
470
489
 
@@ -830,7 +849,7 @@ function requiresWalletAuth(requestMethod, requestPath) {
830
849
  }
831
850
 
832
851
  // src/version.ts
833
- var VERSION = "0.8.4";
852
+ var VERSION = "0.9.1";
834
853
  var PACKAGE = "@openfort/openfort-node";
835
854
 
836
855
  // src/openapi-client/openfortApiClient.ts
@@ -2278,6 +2297,17 @@ var getBackendWallet = (id, options) => {
2278
2297
  options
2279
2298
  );
2280
2299
  };
2300
+ var updateBackendWallet = (id, updateBackendWalletRequest, options) => {
2301
+ return openfortApiClient(
2302
+ {
2303
+ url: `/v2/accounts/backend/${id}`,
2304
+ method: "PUT",
2305
+ headers: { "Content-Type": "application/json" },
2306
+ data: updateBackendWalletRequest
2307
+ },
2308
+ options
2309
+ );
2310
+ };
2281
2311
  var deleteBackendWallet = (id, options) => {
2282
2312
  return openfortApiClient(
2283
2313
  {
@@ -2457,6 +2487,76 @@ var deleteEvent = (id, options) => {
2457
2487
  );
2458
2488
  };
2459
2489
 
2490
+ // src/openapi-client/generated/fee-sponsorship/fee-sponsorship.ts
2491
+ var listFeeSponsorships = (params, options) => {
2492
+ return openfortApiClient(
2493
+ {
2494
+ url: `/v2/fee-sponsorship`,
2495
+ method: "GET",
2496
+ params
2497
+ },
2498
+ options
2499
+ );
2500
+ };
2501
+ var createFeeSponsorship = (createFeeSponsorshipRequest, options) => {
2502
+ return openfortApiClient(
2503
+ {
2504
+ url: `/v2/fee-sponsorship`,
2505
+ method: "POST",
2506
+ headers: { "Content-Type": "application/json" },
2507
+ data: createFeeSponsorshipRequest
2508
+ },
2509
+ options
2510
+ );
2511
+ };
2512
+ var getFeeSponsorship = (feeSponsorshipId, options) => {
2513
+ return openfortApiClient(
2514
+ {
2515
+ url: `/v2/fee-sponsorship/${feeSponsorshipId}`,
2516
+ method: "GET"
2517
+ },
2518
+ options
2519
+ );
2520
+ };
2521
+ var updateFeeSponsorship = (feeSponsorshipId, updateFeeSponsorshipRequest, options) => {
2522
+ return openfortApiClient(
2523
+ {
2524
+ url: `/v2/fee-sponsorship/${feeSponsorshipId}`,
2525
+ method: "PUT",
2526
+ headers: { "Content-Type": "application/json" },
2527
+ data: updateFeeSponsorshipRequest
2528
+ },
2529
+ options
2530
+ );
2531
+ };
2532
+ var deleteFeeSponsorship = (feeSponsorshipId, options) => {
2533
+ return openfortApiClient(
2534
+ {
2535
+ url: `/v2/fee-sponsorship/${feeSponsorshipId}`,
2536
+ method: "DELETE"
2537
+ },
2538
+ options
2539
+ );
2540
+ };
2541
+ var enableFeeSponsorship = (feeSponsorshipId, options) => {
2542
+ return openfortApiClient(
2543
+ {
2544
+ url: `/v2/fee-sponsorship/${feeSponsorshipId}/enable`,
2545
+ method: "PUT"
2546
+ },
2547
+ options
2548
+ );
2549
+ };
2550
+ var disableFeeSponsorship = (feeSponsorshipId, options) => {
2551
+ return openfortApiClient(
2552
+ {
2553
+ url: `/v2/fee-sponsorship/${feeSponsorshipId}/disable`,
2554
+ method: "PUT"
2555
+ },
2556
+ options
2557
+ );
2558
+ };
2559
+
2460
2560
  // src/openapi-client/generated/forwarder-contract/forwarder-contract.ts
2461
2561
  var createForwarderContract = (createForwarderContractRequest, options) => {
2462
2562
  return openfortApiClient(
@@ -2509,6 +2609,160 @@ var deleteForwarderContract = (id, options) => {
2509
2609
  );
2510
2610
  };
2511
2611
 
2612
+ // src/openapi-client/generated/gas-policies-legacy/gas-policies-legacy.ts
2613
+ var getGasPoliciesLegacy = (params, options) => {
2614
+ return openfortApiClient(
2615
+ {
2616
+ url: `/v1/policies`,
2617
+ method: "GET",
2618
+ params
2619
+ },
2620
+ options
2621
+ );
2622
+ };
2623
+ var createGasPolicyLegacy = (createPolicyRequest, options) => {
2624
+ return openfortApiClient(
2625
+ {
2626
+ url: `/v1/policies`,
2627
+ method: "POST",
2628
+ headers: { "Content-Type": "application/json" },
2629
+ data: createPolicyRequest
2630
+ },
2631
+ options
2632
+ );
2633
+ };
2634
+ var getGasPolicyLegacy = (id, params, options) => {
2635
+ return openfortApiClient(
2636
+ {
2637
+ url: `/v1/policies/${id}`,
2638
+ method: "GET",
2639
+ params
2640
+ },
2641
+ options
2642
+ );
2643
+ };
2644
+ var updateGasPolicyLegacy = (id, updatePolicyRequest, options) => {
2645
+ return openfortApiClient(
2646
+ {
2647
+ url: `/v1/policies/${id}`,
2648
+ method: "POST",
2649
+ headers: { "Content-Type": "application/json" },
2650
+ data: updatePolicyRequest
2651
+ },
2652
+ options
2653
+ );
2654
+ };
2655
+ var deleteGasPolicyLegacy = (id, options) => {
2656
+ return openfortApiClient(
2657
+ {
2658
+ url: `/v1/policies/${id}`,
2659
+ method: "DELETE"
2660
+ },
2661
+ options
2662
+ );
2663
+ };
2664
+ var disableGasPolicyLegacy = (id, options) => {
2665
+ return openfortApiClient(
2666
+ {
2667
+ url: `/v1/policies/${id}/disable`,
2668
+ method: "PUT"
2669
+ },
2670
+ options
2671
+ );
2672
+ };
2673
+ var enableGasPolicyLegacy = (id, options) => {
2674
+ return openfortApiClient(
2675
+ {
2676
+ url: `/v1/policies/${id}/enable`,
2677
+ method: "PUT"
2678
+ },
2679
+ options
2680
+ );
2681
+ };
2682
+ var getGasPolicyTotalGasUsageLegacy = (id, params, options) => {
2683
+ return openfortApiClient(
2684
+ {
2685
+ url: `/v1/policies/${id}/reports`,
2686
+ method: "GET",
2687
+ params
2688
+ },
2689
+ options
2690
+ );
2691
+ };
2692
+ var getGasPolicyReportTransactionIntentsLegacy = (id, params, options) => {
2693
+ return openfortApiClient(
2694
+ {
2695
+ url: `/v1/policies/${id}/reports/transaction_intents`,
2696
+ method: "GET",
2697
+ params
2698
+ },
2699
+ options
2700
+ );
2701
+ };
2702
+ var getGasPolicyBalanceLegacy = (id, options) => {
2703
+ return openfortApiClient(
2704
+ {
2705
+ url: `/v1/policies/${id}/withdraw`,
2706
+ method: "GET"
2707
+ },
2708
+ options
2709
+ );
2710
+ };
2711
+ var createGasPolicyWithdrawalLegacy = (id, withdrawalPolicyRequest, options) => {
2712
+ return openfortApiClient(
2713
+ {
2714
+ url: `/v1/policies/${id}/withdraw`,
2715
+ method: "POST",
2716
+ headers: { "Content-Type": "application/json" },
2717
+ data: withdrawalPolicyRequest
2718
+ },
2719
+ options
2720
+ );
2721
+ };
2722
+
2723
+ // src/openapi-client/generated/gas-policy-rules-legacy/gas-policy-rules-legacy.ts
2724
+ var getGasPolicyRulesLegacy = (params, options) => {
2725
+ return openfortApiClient(
2726
+ {
2727
+ url: `/v1/policy_rules`,
2728
+ method: "GET",
2729
+ params
2730
+ },
2731
+ options
2732
+ );
2733
+ };
2734
+ var createGasPolicyRuleLegacy = (createPolicyRuleRequest, options) => {
2735
+ return openfortApiClient(
2736
+ {
2737
+ url: `/v1/policy_rules`,
2738
+ method: "POST",
2739
+ headers: { "Content-Type": "application/json" },
2740
+ data: createPolicyRuleRequest
2741
+ },
2742
+ options
2743
+ );
2744
+ };
2745
+ var updateGasPolicyRuleLegacy = (id, updatePolicyRuleRequest, options) => {
2746
+ return openfortApiClient(
2747
+ {
2748
+ url: `/v1/policy_rules/${id}`,
2749
+ method: "POST",
2750
+ headers: { "Content-Type": "application/json" },
2751
+ data: updatePolicyRuleRequest
2752
+ },
2753
+ options
2754
+ );
2755
+ };
2756
+ var deleteGasPolicyRuleLegacy = (id, options) => {
2757
+ return openfortApiClient(
2758
+ {
2759
+ url: `/v1/policy_rules/${id}`,
2760
+ method: "DELETE"
2761
+ },
2762
+ options
2763
+ );
2764
+ };
2765
+
2512
2766
  // src/openapi-client/generated/graph-q-l/graph-q-l.ts
2513
2767
  var query = (queryBody, options) => {
2514
2768
  return openfortApiClient(
@@ -2821,7 +3075,8 @@ var PregenerateUserRequestV2ChainType = {
2821
3075
  };
2822
3076
  var PolicyV2Scope = {
2823
3077
  project: "project",
2824
- account: "account"
3078
+ account: "account",
3079
+ transaction: "transaction"
2825
3080
  };
2826
3081
  var PolicyV2Action = {
2827
3082
  accept: "accept",
@@ -2953,9 +3208,10 @@ var EntityTypePOLICYV2RULE = {
2953
3208
  var EntityTypePOLICYV2 = {
2954
3209
  policyV2: "policyV2"
2955
3210
  };
2956
- var PolicyV2ListQueriesScope = {
3211
+ var PolicyV2ListQueriesScopeItem = {
2957
3212
  project: "project",
2958
- account: "account"
3213
+ account: "account",
3214
+ transaction: "transaction"
2959
3215
  };
2960
3216
  var EvmAddressCriterionRequestType = {
2961
3217
  evmAddress: "evmAddress"
@@ -3093,11 +3349,15 @@ var CreatePolicyV2RuleRequestAction = {
3093
3349
  };
3094
3350
  var CreatePolicyV2RequestScope = {
3095
3351
  project: "project",
3096
- account: "account"
3352
+ account: "account",
3353
+ transaction: "transaction"
3097
3354
  };
3098
3355
  var EvaluatePolicyV2ResponseObject = {
3099
3356
  policy_evaluation: "policy_evaluation"
3100
3357
  };
3358
+ var EntityTypeFEESPONSORSHIP = {
3359
+ feeSponsorship: "feeSponsorship"
3360
+ };
3101
3361
  var CreateEmbeddedRequestAccountType = {
3102
3362
  Externally_Owned_Account: "Externally Owned Account",
3103
3363
  Smart_Account: "Smart Account",
@@ -3135,6 +3395,27 @@ var CreateBackendWalletRequestChainType = {
3135
3395
  EVM: "EVM",
3136
3396
  SVM: "SVM"
3137
3397
  };
3398
+ var UpdateBackendWalletResponseObject = {
3399
+ backendWallet: "backendWallet"
3400
+ };
3401
+ var UpdateBackendWalletResponseChainType = {
3402
+ EVM: "EVM",
3403
+ SVM: "SVM"
3404
+ };
3405
+ var UpdateBackendWalletResponseCustody = {
3406
+ Developer: "Developer"
3407
+ };
3408
+ var UpdateBackendWalletResponseDelegatedAccountChainChainType = {
3409
+ EVM: "EVM",
3410
+ SVM: "SVM"
3411
+ };
3412
+ var UpdateBackendWalletRequestAccountType = {
3413
+ Delegated_Account: "Delegated Account"
3414
+ };
3415
+ var UpdateBackendWalletRequestChainType = {
3416
+ EVM: "EVM",
3417
+ SVM: "SVM"
3418
+ };
3138
3419
  var DeleteBackendWalletResponseObject = {
3139
3420
  backendWallet: "backendWallet"
3140
3421
  };
@@ -3206,6 +3487,11 @@ var UserProjectRoleMEMBER = {
3206
3487
  };
3207
3488
  var UserProjectCreateRequestRole = { ...UserProjectRoleADMIN, ...UserProjectRoleMEMBER };
3208
3489
  var UserProjectUpdateRequestRole = { ...UserProjectRoleMEMBER, ...UserProjectRoleADMIN };
3490
+ var UsageAlertType = {
3491
+ warning: "warning",
3492
+ critical: "critical",
3493
+ info: "info"
3494
+ };
3209
3495
  var EntityTypePROJECT = {
3210
3496
  project: "project"
3211
3497
  };
@@ -3376,12 +3662,13 @@ var AuthenticationType = {
3376
3662
  basic: "basic",
3377
3663
  third_party: "third_party"
3378
3664
  };
3379
- var GetPolicyRulesExpandItem = {
3665
+ var GetGasPolicyRulesLegacyExpandItem = {
3380
3666
  contract: "contract"
3381
3667
  };
3382
- var ListPoliciesScope = {
3668
+ var ListPoliciesScopeItem = {
3383
3669
  project: "project",
3384
- account: "account"
3670
+ account: "account",
3671
+ transaction: "transaction"
3385
3672
  };
3386
3673
  var ListBackendWalletsChainType = {
3387
3674
  EVM: "EVM",
@@ -3529,115 +3816,6 @@ var cancelTransferAccountOwnership = (id, playerCancelTransferOwnershipRequest,
3529
3816
  };
3530
3817
 
3531
3818
  // src/openapi-client/generated/policies/policies.ts
3532
- var getPolicies = (params, options) => {
3533
- return openfortApiClient(
3534
- {
3535
- url: `/v1/policies`,
3536
- method: "GET",
3537
- params
3538
- },
3539
- options
3540
- );
3541
- };
3542
- var createPolicy = (createPolicyRequest, options) => {
3543
- return openfortApiClient(
3544
- {
3545
- url: `/v1/policies`,
3546
- method: "POST",
3547
- headers: { "Content-Type": "application/json" },
3548
- data: createPolicyRequest
3549
- },
3550
- options
3551
- );
3552
- };
3553
- var getPolicy = (id, params, options) => {
3554
- return openfortApiClient(
3555
- {
3556
- url: `/v1/policies/${id}`,
3557
- method: "GET",
3558
- params
3559
- },
3560
- options
3561
- );
3562
- };
3563
- var updatePolicy = (id, updatePolicyRequest, options) => {
3564
- return openfortApiClient(
3565
- {
3566
- url: `/v1/policies/${id}`,
3567
- method: "POST",
3568
- headers: { "Content-Type": "application/json" },
3569
- data: updatePolicyRequest
3570
- },
3571
- options
3572
- );
3573
- };
3574
- var deletePolicy = (id, options) => {
3575
- return openfortApiClient(
3576
- {
3577
- url: `/v1/policies/${id}`,
3578
- method: "DELETE"
3579
- },
3580
- options
3581
- );
3582
- };
3583
- var disablePolicy = (id, options) => {
3584
- return openfortApiClient(
3585
- {
3586
- url: `/v1/policies/${id}/disable`,
3587
- method: "PUT"
3588
- },
3589
- options
3590
- );
3591
- };
3592
- var enablePolicy = (id, options) => {
3593
- return openfortApiClient(
3594
- {
3595
- url: `/v1/policies/${id}/enable`,
3596
- method: "PUT"
3597
- },
3598
- options
3599
- );
3600
- };
3601
- var getPolicyTotalGasUsage = (id, params, options) => {
3602
- return openfortApiClient(
3603
- {
3604
- url: `/v1/policies/${id}/reports`,
3605
- method: "GET",
3606
- params
3607
- },
3608
- options
3609
- );
3610
- };
3611
- var getPolicyReportTransactionIntents = (id, params, options) => {
3612
- return openfortApiClient(
3613
- {
3614
- url: `/v1/policies/${id}/reports/transaction_intents`,
3615
- method: "GET",
3616
- params
3617
- },
3618
- options
3619
- );
3620
- };
3621
- var getPolicyBalance = (id, options) => {
3622
- return openfortApiClient(
3623
- {
3624
- url: `/v1/policies/${id}/withdraw`,
3625
- method: "GET"
3626
- },
3627
- options
3628
- );
3629
- };
3630
- var createPolicyWithdrawal = (id, withdrawalPolicyRequest, options) => {
3631
- return openfortApiClient(
3632
- {
3633
- url: `/v1/policies/${id}/withdraw`,
3634
- method: "POST",
3635
- headers: { "Content-Type": "application/json" },
3636
- data: withdrawalPolicyRequest
3637
- },
3638
- options
3639
- );
3640
- };
3641
3819
  var listPolicies = (params, options) => {
3642
3820
  return openfortApiClient(
3643
3821
  {
@@ -3700,49 +3878,6 @@ var evaluatePolicyV2 = (evaluatePolicyV2Request, options) => {
3700
3878
  );
3701
3879
  };
3702
3880
 
3703
- // src/openapi-client/generated/policy-rules/policy-rules.ts
3704
- var getPolicyRules = (params, options) => {
3705
- return openfortApiClient(
3706
- {
3707
- url: `/v1/policy_rules`,
3708
- method: "GET",
3709
- params
3710
- },
3711
- options
3712
- );
3713
- };
3714
- var createPolicyRule = (createPolicyRuleRequest, options) => {
3715
- return openfortApiClient(
3716
- {
3717
- url: `/v1/policy_rules`,
3718
- method: "POST",
3719
- headers: { "Content-Type": "application/json" },
3720
- data: createPolicyRuleRequest
3721
- },
3722
- options
3723
- );
3724
- };
3725
- var updatePolicyRule = (id, updatePolicyRuleRequest, options) => {
3726
- return openfortApiClient(
3727
- {
3728
- url: `/v1/policy_rules/${id}`,
3729
- method: "POST",
3730
- headers: { "Content-Type": "application/json" },
3731
- data: updatePolicyRuleRequest
3732
- },
3733
- options
3734
- );
3735
- };
3736
- var deletePolicyRule = (id, options) => {
3737
- return openfortApiClient(
3738
- {
3739
- url: `/v1/policy_rules/${id}`,
3740
- method: "DELETE"
3741
- },
3742
- options
3743
- );
3744
- };
3745
-
3746
3881
  // src/openapi-client/generated/rpc/rpc.ts
3747
3882
  var handleRpcRequest = (jsonRpcRequest, options) => {
3748
3883
  return openfortApiClient(
@@ -4207,12 +4342,22 @@ var decryptExportedPrivateKey = (encryptedPrivateKeyBase64, privateKeyPem) => {
4207
4342
  // src/wallets/evm/accounts/evmAccount.ts
4208
4343
  var import_viem = require("viem");
4209
4344
 
4345
+ // src/wallets/evm/actions/normalizeSignature.ts
4346
+ function normalizeSignature(sig) {
4347
+ const v = parseInt(sig.slice(-2), 16);
4348
+ if (v < 27) {
4349
+ return sig.slice(0, -2) + (v + 27).toString(16);
4350
+ }
4351
+ return sig;
4352
+ }
4353
+
4210
4354
  // src/wallets/evm/actions/signHash.ts
4211
4355
  async function signHash(options) {
4212
4356
  const { accountId, hash } = options;
4213
4357
  const response = await sign(accountId, { data: hash });
4358
+ const signature2 = normalizeSignature(response.signature);
4214
4359
  return {
4215
- signature: response.signature
4360
+ signature: signature2
4216
4361
  };
4217
4362
  }
4218
4363
 
@@ -4479,6 +4624,28 @@ var EvmClient = class {
4479
4624
  });
4480
4625
  return response.signature;
4481
4626
  }
4627
+ /**
4628
+ * Updates an EVM backend wallet.
4629
+ *
4630
+ * Currently supports upgrading an EVM EOA to a Delegated Account (EIP-7702).
4631
+ *
4632
+ * @param options - Update options including account ID and delegation parameters
4633
+ * @returns The updated backend wallet response
4634
+ *
4635
+ * @example
4636
+ * ```typescript
4637
+ * const updated = await openfort.accounts.evm.backend.update({
4638
+ * id: 'acc_...',
4639
+ * accountType: 'Delegated Account',
4640
+ * chain: { chainType: 'EVM', chainId: 8453 },
4641
+ * implementationType: 'Calibur',
4642
+ * });
4643
+ * ```
4644
+ */
4645
+ async update(options) {
4646
+ const { id, ...req } = options;
4647
+ return updateBackendWallet(id, req);
4648
+ }
4482
4649
  };
4483
4650
  EvmClient.type = "evmWallet";
4484
4651
 
@@ -4877,6 +5044,19 @@ var SignEvmHashRuleSchema = import_zod.z.object({
4877
5044
  action: ActionEnum,
4878
5045
  operation: import_zod.z.literal("signEvmHash")
4879
5046
  });
5047
+ var SponsorEvmTransactionCriteriaSchema = import_zod.z.array(
5048
+ import_zod.z.discriminatedUnion("type", [
5049
+ EthValueCriterionSchema,
5050
+ EvmAddressCriterionSchema,
5051
+ EvmNetworkCriterionSchema,
5052
+ EvmDataCriterionSchema
5053
+ ])
5054
+ ).max(10);
5055
+ var SponsorEvmTransactionRuleSchema = import_zod.z.object({
5056
+ action: ActionEnum,
5057
+ operation: import_zod.z.literal("sponsorEvmTransaction"),
5058
+ criteria: SponsorEvmTransactionCriteriaSchema
5059
+ });
4880
5060
 
4881
5061
  // src/policies/solanaSchema.ts
4882
5062
  var import_zod2 = require("zod");
@@ -4994,6 +5174,23 @@ var SignSolMessageRuleSchema = import_zod2.z.object({
4994
5174
  operation: import_zod2.z.literal("signSolMessage"),
4995
5175
  criteria: SignSolMessageCriteriaSchema
4996
5176
  });
5177
+ var SponsorSolTransactionCriteriaSchema = import_zod2.z.array(
5178
+ import_zod2.z.discriminatedUnion("type", [
5179
+ SolAddressCriterionSchema,
5180
+ SolValueCriterionSchema,
5181
+ SplAddressCriterionSchema,
5182
+ SplValueCriterionSchema,
5183
+ MintAddressCriterionSchema,
5184
+ SolDataCriterionSchema,
5185
+ ProgramIdCriterionSchema,
5186
+ SolNetworkCriterionSchema
5187
+ ])
5188
+ ).max(10);
5189
+ var SponsorSolTransactionRuleSchema = import_zod2.z.object({
5190
+ action: ActionEnum,
5191
+ operation: import_zod2.z.literal("sponsorSolTransaction"),
5192
+ criteria: SponsorSolTransactionCriteriaSchema
5193
+ });
4997
5194
 
4998
5195
  // src/policies/types.ts
4999
5196
  var import_zod3 = require("zod");
@@ -5004,9 +5201,11 @@ var RuleSchema = import_zod3.z.discriminatedUnion("operation", [
5004
5201
  SignEvmMessageRuleSchema,
5005
5202
  SignEvmTypedDataRuleSchema,
5006
5203
  SignEvmHashRuleSchema,
5204
+ SponsorEvmTransactionRuleSchema,
5007
5205
  SignSolTransactionRuleSchema,
5008
5206
  SendSolTransactionRuleSchema,
5009
- SignSolMessageRuleSchema
5207
+ SignSolMessageRuleSchema,
5208
+ SponsorSolTransactionRuleSchema
5010
5209
  ]);
5011
5210
  var CreatePolicyBodySchema = import_zod3.z.object({
5012
5211
  /** The scope of the policy. 'project' applies to all accounts, 'account' applies to a specific account. */
@@ -5135,7 +5334,9 @@ var Openfort = class {
5135
5334
  /** Import private key (with E2E encryption) */
5136
5335
  import: evmClient.importAccount.bind(evmClient),
5137
5336
  /** Export private key (with E2E encryption) */
5138
- export: evmClient.exportAccount.bind(evmClient)
5337
+ export: evmClient.exportAccount.bind(evmClient),
5338
+ /** Update EOA to delegated account */
5339
+ update: evmClient.update.bind(evmClient)
5139
5340
  },
5140
5341
  /** Embedded wallet operations (User custody) */
5141
5342
  embedded: {
@@ -5186,8 +5387,8 @@ var Openfort = class {
5186
5387
  // Players API
5187
5388
  // ============================================
5188
5389
  /**
5189
- * Player management endpoints
5190
- * @deprecated
5390
+ * Player management endpoints.
5391
+ * @deprecated Use `openfort.iam.users` for V2 user management.
5191
5392
  */
5192
5393
  get players() {
5193
5394
  return {
@@ -5227,39 +5428,60 @@ var Openfort = class {
5227
5428
  // Policies API
5228
5429
  // ============================================
5229
5430
  /**
5230
- * Policy management endpoints for controlling account operations.
5431
+ * Policy management endpoints for criteria-based access control.
5231
5432
  *
5232
5433
  * Policies define rules that govern what operations accounts can perform,
5233
- * including transaction signing, message signing, and more.
5434
+ * including transaction signing, message signing, and gas sponsorship.
5435
+ * Each policy has a scope (project, account, or transaction), a priority,
5436
+ * and an ordered list of rules. Each rule specifies an action (accept/reject),
5437
+ * an operation, and criteria that must all match (AND logic).
5438
+ *
5439
+ * **Supported operations:**
5440
+ * - EVM: `signEvmTransaction`, `sendEvmTransaction`, `signEvmTypedData`, `signEvmMessage`, `signEvmHash`, `sponsorEvmTransaction`
5441
+ * - Solana: `signSolTransaction`, `sendSolTransaction`, `signSolMessage`, `sponsorSolTransaction`
5442
+ *
5443
+ * **Supported criteria types:**
5444
+ * - EVM: `evmAddress`, `ethValue`, `evmNetwork`, `evmData`, `evmMessage`, `evmTypedDataVerifyingContract`, `evmTypedDataField`
5445
+ * - Solana: `solAddress`, `solValue`, `splAddress`, `splValue`, `mintAddress`, `programId`, `solNetwork`, `solMessage`, `solData`
5446
+ *
5447
+ * Policies are evaluated in priority order (highest first). The first matching rule determines the outcome.
5448
+ * If policies exist but no rule matches, the operation is rejected (fail-closed).
5234
5449
  *
5235
5450
  * @example
5236
5451
  * ```typescript
5237
- * // List all policies
5238
- * const all = await openfort.policies.list();
5239
- *
5240
- * // Create a policy
5452
+ * // Create a policy that only allows transactions to specific addresses on certain chains
5241
5453
  * const policy = await openfort.policies.create({
5242
5454
  * scope: 'project',
5243
- * rules: [{ action: 'reject', operation: 'signEvmHash' }],
5455
+ * rules: [{
5456
+ * action: 'accept',
5457
+ * operation: 'sponsorEvmTransaction',
5458
+ * criteria: [
5459
+ * { type: 'evmNetwork', operator: 'in', chainIds: [1, 137] },
5460
+ * { type: 'evmAddress', operator: 'in', addresses: ['0x...'] },
5461
+ * ],
5462
+ * }],
5244
5463
  * });
5245
5464
  *
5246
5465
  * // Evaluate whether an operation would be allowed
5247
- * const result = await openfort.policies.evaluate({ operation: 'signEvmTransaction', accountId: 'acc_...' });
5466
+ * const result = await openfort.policies.evaluate({
5467
+ * operation: 'signEvmTransaction',
5468
+ * accountId: 'acc_...',
5469
+ * });
5248
5470
  * ```
5249
5471
  */
5250
5472
  get policies() {
5251
5473
  return {
5252
- /** List policies */
5474
+ /** List policies, optionally filtered by scope, enabled status, or account */
5253
5475
  list: listPolicies,
5254
- /** Create a policy */
5476
+ /** Create a policy with scope, priority, and criteria-based rules */
5255
5477
  create: createPolicyV2,
5256
- /** Get a policy by ID */
5478
+ /** Get a policy by ID (ply_...) */
5257
5479
  get: getPolicyV2,
5258
- /** Update a policy */
5480
+ /** Update a policy's description, priority, enabled status, or rules */
5259
5481
  update: updatePolicyV2,
5260
- /** Delete a policy */
5482
+ /** Soft-delete a policy */
5261
5483
  delete: deletePolicyV2,
5262
- /** Evaluate an operation against policies */
5484
+ /** Pre-flight check: evaluate whether an operation would be allowed without executing it */
5263
5485
  evaluate: evaluatePolicyV2
5264
5486
  };
5265
5487
  }
@@ -5267,56 +5489,83 @@ var Openfort = class {
5267
5489
  // Fee Sponsorship API
5268
5490
  // ============================================
5269
5491
  /**
5270
- * Fee sponsorship (gas policy) management endpoints
5492
+ * Fee sponsorship endpoints for sponsoring gas costs on behalf of users.
5493
+ *
5494
+ * A fee sponsorship links a strategy (how gas is paid) to a policy (which
5495
+ * transactions qualify). Create a policy first via `openfort.policies.create()`,
5496
+ * then create a fee sponsorship referencing it.
5497
+ *
5498
+ * **Strategies (`sponsorSchema`):**
5499
+ * - `pay_for_user` — Developer fully sponsors gas costs
5500
+ * - `charge_custom_tokens` — User pays in ERC-20 tokens (fixed or dynamic exchange rate)
5501
+ * - `fixed_rate` — User pays a fixed token amount per transaction
5502
+ *
5503
+ * **Workflow:**
5504
+ * 1. Create a policy via `openfort.policies.create()` with criteria rules
5505
+ * 2. Create a fee sponsorship via `openfort.feeSponsorship.create()` linking to that policy
5506
+ *
5507
+ * When a transaction is submitted without an explicit policy, project-scoped fee
5508
+ * sponsorships are auto-discovered and the first matching one is applied.
5509
+ *
5510
+ * @example
5511
+ * ```typescript
5512
+ * // 1. Create a policy to sponsor transactions on Polygon
5513
+ * const policy = await openfort.policies.create({
5514
+ * scope: 'project',
5515
+ * rules: [{
5516
+ * action: 'accept',
5517
+ * operation: 'sponsorEvmTransaction',
5518
+ * criteria: [{ type: 'evmNetwork', operator: 'in', chainIds: [137] }],
5519
+ * }],
5520
+ * });
5521
+ *
5522
+ * // 2. Create a fee sponsorship with pay_for_user strategy
5523
+ * const sponsorship = await openfort.feeSponsorship.create({
5524
+ * name: 'Polygon Gas Sponsorship',
5525
+ * strategy: { sponsorSchema: 'pay_for_user' },
5526
+ * policyId: policy.id,
5527
+ * });
5528
+ * ```
5271
5529
  */
5272
5530
  get feeSponsorship() {
5273
5531
  return {
5274
- /** List fee sponsorship policies */
5275
- list: getPolicies,
5276
- /** Create a fee sponsorship policy */
5277
- create: createPolicy,
5278
- /** Get a fee sponsorship policy by ID */
5279
- get: getPolicy,
5280
- /** Update a fee sponsorship policy */
5281
- update: updatePolicy,
5282
- /** Delete a fee sponsorship policy */
5283
- delete: deletePolicy,
5284
- /** Disable a fee sponsorship policy */
5285
- disable: disablePolicy,
5286
- /** Enable a fee sponsorship policy */
5287
- enable: enablePolicy,
5288
- /** Get fee sponsorship policy total gas usage */
5289
- getTotalGasUsage: getPolicyTotalGasUsage,
5290
- /** Fee sponsorship policy rules */
5291
- rules: {
5292
- /** List policy rules */
5293
- list: getPolicyRules,
5294
- /** Create a policy rule */
5295
- create: createPolicyRule,
5296
- /** Update a policy rule */
5297
- update: updatePolicyRule,
5298
- /** Delete a policy rule */
5299
- delete: deletePolicyRule
5300
- }
5532
+ /** List fee sponsorships, optionally filtered by name, chainId, or enabled status */
5533
+ list: listFeeSponsorships,
5534
+ /** Create a fee sponsorship linked to a policy (policyId required) */
5535
+ create: createFeeSponsorship,
5536
+ /** Get a fee sponsorship by ID (pol_...) */
5537
+ get: getFeeSponsorship,
5538
+ /** Update a fee sponsorship's name, strategy, or linked policy */
5539
+ update: updateFeeSponsorship,
5540
+ /** Soft-delete a fee sponsorship */
5541
+ delete: deleteFeeSponsorship,
5542
+ /** Disable a fee sponsorship (stops it from being applied to transactions) */
5543
+ disable: disableFeeSponsorship,
5544
+ /** Enable a previously disabled fee sponsorship */
5545
+ enable: enableFeeSponsorship
5301
5546
  };
5302
5547
  }
5303
5548
  // ============================================
5304
5549
  // Transaction Intents API
5305
5550
  // ============================================
5306
5551
  /**
5307
- * Transaction intent management endpoints
5552
+ * Transaction intent endpoints for creating and managing on-chain transactions.
5553
+ *
5554
+ * Transaction intents represent a desired on-chain action (contract calls, transfers).
5555
+ * When a fee sponsorship policy is provided (or auto-discovered from project-scoped policies),
5556
+ * gas costs are sponsored according to the policy's strategy.
5308
5557
  */
5309
5558
  get transactionIntents() {
5310
5559
  return {
5311
5560
  /** List transaction intents */
5312
5561
  list: getTransactionIntents,
5313
- /** Create a transaction intent */
5562
+ /** Create a transaction intent with contract interactions */
5314
5563
  create: createTransactionIntent,
5315
5564
  /** Get a transaction intent by ID */
5316
5565
  get: getTransactionIntent,
5317
5566
  /** Sign a transaction intent */
5318
5567
  signature,
5319
- /** Estimate cost */
5568
+ /** Estimate gas cost for a transaction before creating it */
5320
5569
  estimateCost: estimateTransactionIntentCost
5321
5570
  };
5322
5571
  }
@@ -5341,27 +5590,6 @@ var Openfort = class {
5341
5590
  };
5342
5591
  }
5343
5592
  // ============================================
5344
- // Settings API
5345
- // ============================================
5346
- /**
5347
- * Settings / Developer account management endpoints
5348
- * @deprecated
5349
- */
5350
- get settings() {
5351
- return {
5352
- /** List developer accounts */
5353
- getDeveloperAccounts,
5354
- /** Create a developer account */
5355
- createDeveloperAccount,
5356
- /** Get a developer account by ID */
5357
- getDeveloperAccount,
5358
- /** Delete a developer account */
5359
- deleteDeveloperAccount,
5360
- /** Get verification payload */
5361
- getVerificationPayload
5362
- };
5363
- }
5364
- // ============================================
5365
5593
  // Subscriptions API
5366
5594
  // ============================================
5367
5595
  /**
@@ -5510,7 +5738,10 @@ var Openfort = class {
5510
5738
  const { recoveryShare: _, ...accountResponse } = response;
5511
5739
  return accountResponse;
5512
5740
  } catch (error) {
5513
- await deleteUser(response.user);
5741
+ try {
5742
+ await deleteUser(response.user);
5743
+ } catch {
5744
+ }
5514
5745
  throw error;
5515
5746
  }
5516
5747
  }
@@ -5541,6 +5772,11 @@ var Openfort = class {
5541
5772
  * @internal
5542
5773
  */
5543
5774
  async preRegisterWithShield(recoveryShare, openfortUserId, thirdPartyUserId, config) {
5775
+ if (!config.shieldApiKey || !config.shieldApiSecret || !config.encryptionShare) {
5776
+ throw new Error(
5777
+ "Shield configuration requires shieldApiKey, shieldApiSecret, and encryptionShare"
5778
+ );
5779
+ }
5544
5780
  let externalUserId;
5545
5781
  if (config.shieldAuthProvider === import_shield_js.ShieldAuthProvider.OPENFORT) {
5546
5782
  externalUserId = openfortUserId;
@@ -5575,13 +5811,16 @@ var Openfort = class {
5575
5811
  // Paymasters API
5576
5812
  // ============================================
5577
5813
  /**
5578
- * Paymaster endpoints
5814
+ * Paymaster endpoints for managing ERC-4337 paymasters.
5815
+ *
5816
+ * Paymasters handle gas payment on-chain for account abstraction (ERC-4337).
5817
+ * Fee sponsorships reference a paymaster to determine how user operations are sponsored.
5579
5818
  */
5580
5819
  get paymasters() {
5581
5820
  return {
5582
5821
  /** Create a paymaster */
5583
5822
  create: createPaymaster,
5584
- /** Get a paymaster by ID */
5823
+ /** Get a paymaster by ID (pay_...) */
5585
5824
  get: getPaymaster,
5586
5825
  /** Update a paymaster */
5587
5826
  update: updatePaymaster,
@@ -5600,10 +5839,16 @@ var Openfort = class {
5600
5839
  */
5601
5840
  async constructWebhookEvent(body, signature2) {
5602
5841
  const signedPayload = await sign2(this._apiKey, body);
5603
- if (signedPayload !== signature2) {
5604
- throw Error("Invalid signature");
5842
+ const expectedBuffer = Buffer.from(signedPayload, "hex");
5843
+ const receivedBuffer = Buffer.from(signature2, "hex");
5844
+ if (expectedBuffer.length !== receivedBuffer.length || !(0, import_node_crypto4.timingSafeEqual)(expectedBuffer, receivedBuffer)) {
5845
+ throw new Error("Invalid signature");
5846
+ }
5847
+ try {
5848
+ return JSON.parse(body);
5849
+ } catch {
5850
+ throw new Error("Failed to parse webhook payload");
5605
5851
  }
5606
- return JSON.parse(body);
5607
5852
  }
5608
5853
  /**
5609
5854
  * Creates an encryption session with Shield.
@@ -5714,6 +5959,7 @@ var index_default = Openfort;
5714
5959
  EntityTypeDEVICE,
5715
5960
  EntityTypeEMAILSAMPLE,
5716
5961
  EntityTypeEVENT,
5962
+ EntityTypeFEESPONSORSHIP,
5717
5963
  EntityTypeFORWARDERCONTRACT,
5718
5964
  EntityTypeLOG,
5719
5965
  EntityTypePAYMASTER,
@@ -5774,7 +6020,7 @@ var index_default = Openfort;
5774
6020
  GetAccountsV2AccountType,
5775
6021
  GetAccountsV2ChainType,
5776
6022
  GetAccountsV2Custody,
5777
- GetPolicyRulesExpandItem,
6023
+ GetGasPolicyRulesLegacyExpandItem,
5778
6024
  IMPORT_ENCRYPTION_PUBLIC_KEY,
5779
6025
  ImportPrivateKeyRequestChainType,
5780
6026
  ImportPrivateKeyResponseChainType,
@@ -5786,7 +6032,7 @@ var index_default = Openfort;
5786
6032
  JsonRpcRequestJsonrpc,
5787
6033
  JsonRpcSuccessResponseAnyJsonrpc,
5788
6034
  ListBackendWalletsChainType,
5789
- ListPoliciesScope,
6035
+ ListPoliciesScopeItem,
5790
6036
  MintAddressCriterionOperator,
5791
6037
  MintAddressCriterionRequestOperator,
5792
6038
  MintAddressCriterionRequestType,
@@ -5822,7 +6068,7 @@ var index_default = Openfort;
5822
6068
  PolicyRuleTypeCONTRACT,
5823
6069
  PolicyRuleTypeRATELIMIT,
5824
6070
  PolicyV2Action,
5825
- PolicyV2ListQueriesScope,
6071
+ PolicyV2ListQueriesScopeItem,
5826
6072
  PolicyV2Scope,
5827
6073
  PregenerateAccountResponseCustody,
5828
6074
  PregenerateUserRequestV2AccountType,
@@ -5892,10 +6138,12 @@ var index_default = Openfort;
5892
6138
  SplValueCriterionRequestOperator,
5893
6139
  SplValueCriterionRequestType,
5894
6140
  SplValueCriterionSchema,
6141
+ SponsorEvmTransactionRuleSchema,
5895
6142
  SponsorSchema,
5896
6143
  SponsorSchemaCHARGECUSTOMTOKENS,
5897
6144
  SponsorSchemaFIXEDRATE,
5898
6145
  SponsorSchemaPAYFORUSER,
6146
+ SponsorSolTransactionRuleSchema,
5899
6147
  Status,
5900
6148
  ThirdPartyOAuthProvider,
5901
6149
  ThirdPartyOAuthProviderACCELBYTE,
@@ -5913,7 +6161,14 @@ var index_default = Openfort;
5913
6161
  TransactionIntentResponseExpandable,
5914
6162
  TransactionStatus,
5915
6163
  UnknownError,
6164
+ UpdateBackendWalletRequestAccountType,
6165
+ UpdateBackendWalletRequestChainType,
6166
+ UpdateBackendWalletResponseChainType,
6167
+ UpdateBackendWalletResponseCustody,
6168
+ UpdateBackendWalletResponseDelegatedAccountChainChainType,
6169
+ UpdateBackendWalletResponseObject,
5916
6170
  UpdatePolicyBodySchema,
6171
+ UsageAlertType,
5917
6172
  UserInputValidationError,
5918
6173
  UserProjectCreateRequestRole,
5919
6174
  UserProjectRole,
@@ -5936,15 +6191,16 @@ var index_default = Openfort;
5936
6191
  createContract,
5937
6192
  createDeveloperAccount,
5938
6193
  createEvent,
6194
+ createFeeSponsorship,
5939
6195
  createForwarderContract,
6196
+ createGasPolicyLegacy,
6197
+ createGasPolicyRuleLegacy,
6198
+ createGasPolicyWithdrawalLegacy,
5940
6199
  createOAuthConfig,
5941
6200
  createOnrampSession,
5942
6201
  createPaymaster,
5943
6202
  createPlayer,
5944
- createPolicy,
5945
- createPolicyRule,
5946
6203
  createPolicyV2,
5947
- createPolicyWithdrawal,
5948
6204
  createSession,
5949
6205
  createSubscription,
5950
6206
  createTransactionIntent,
@@ -5955,20 +6211,23 @@ var index_default = Openfort;
5955
6211
  deleteContract,
5956
6212
  deleteDeveloperAccount,
5957
6213
  deleteEvent,
6214
+ deleteFeeSponsorship,
5958
6215
  deleteForwarderContract,
6216
+ deleteGasPolicyLegacy,
6217
+ deleteGasPolicyRuleLegacy,
5959
6218
  deleteOAuthConfig,
5960
6219
  deletePaymaster,
5961
6220
  deletePlayer,
5962
- deletePolicy,
5963
- deletePolicyRule,
5964
6221
  deletePolicyV2,
5965
6222
  deleteSubscription,
5966
6223
  deleteTrigger,
5967
6224
  deleteUser,
5968
6225
  deprecatedCallbackOAuth,
5969
6226
  disableAccount,
5970
- disablePolicy,
5971
- enablePolicy,
6227
+ disableFeeSponsorship,
6228
+ disableGasPolicyLegacy,
6229
+ enableFeeSponsorship,
6230
+ enableGasPolicyLegacy,
5972
6231
  encryptForImport,
5973
6232
  estimateTransactionIntentCost,
5974
6233
  evaluatePolicyV2,
@@ -5990,7 +6249,14 @@ var index_default = Openfort;
5990
6249
  getDeveloperAccounts,
5991
6250
  getEvent,
5992
6251
  getEvents,
6252
+ getFeeSponsorship,
5993
6253
  getForwarderContract,
6254
+ getGasPoliciesLegacy,
6255
+ getGasPolicyBalanceLegacy,
6256
+ getGasPolicyLegacy,
6257
+ getGasPolicyReportTransactionIntentsLegacy,
6258
+ getGasPolicyRulesLegacy,
6259
+ getGasPolicyTotalGasUsageLegacy,
5994
6260
  getJwks,
5995
6261
  getOAuthConfig,
5996
6262
  getOnrampQuote,
@@ -5998,12 +6264,6 @@ var index_default = Openfort;
5998
6264
  getPlayer,
5999
6265
  getPlayerSessions,
6000
6266
  getPlayers,
6001
- getPolicies,
6002
- getPolicy,
6003
- getPolicyBalance,
6004
- getPolicyReportTransactionIntents,
6005
- getPolicyRules,
6006
- getPolicyTotalGasUsage,
6007
6267
  getPolicyV2,
6008
6268
  getProjectLogs,
6009
6269
  getSession,
@@ -6031,6 +6291,7 @@ var index_default = Openfort;
6031
6291
  linkThirdParty,
6032
6292
  list,
6033
6293
  listBackendWallets,
6294
+ listFeeSponsorships,
6034
6295
  listForwarderContracts,
6035
6296
  listOAuthConfig,
6036
6297
  listPaymasters,
@@ -6071,13 +6332,15 @@ var index_default = Openfort;
6071
6332
  unlinkEmail,
6072
6333
  unlinkOAuth,
6073
6334
  unlinkSIWE,
6335
+ updateBackendWallet,
6074
6336
  updateContract,
6075
6337
  updateDeveloperAccount,
6338
+ updateFeeSponsorship,
6076
6339
  updateForwarderContract,
6340
+ updateGasPolicyLegacy,
6341
+ updateGasPolicyRuleLegacy,
6077
6342
  updatePaymaster,
6078
6343
  updatePlayer,
6079
- updatePolicy,
6080
- updatePolicyRule,
6081
6344
  updatePolicyV2,
6082
6345
  verifyAuthToken,
6083
6346
  verifyEmail,