@openfort/openfort-node 0.7.7 → 0.8.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/biome.json +2 -1
  3. package/dist/index.d.mts +4835 -437
  4. package/dist/index.d.ts +4835 -437
  5. package/dist/index.js +929 -124
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +813 -118
  8. package/dist/index.mjs.map +1 -1
  9. package/examples/README.md +28 -11
  10. package/examples/{policies → fee-sponsorship}/createPolicy.ts +2 -2
  11. package/examples/{policies → fee-sponsorship}/createPolicyRule.ts +3 -3
  12. package/examples/{policies → fee-sponsorship}/disableEnablePolicy.ts +4 -4
  13. package/examples/fee-sponsorship/getPolicy.ts +30 -0
  14. package/examples/fee-sponsorship/listPolicies.ts +17 -0
  15. package/examples/{policies → fee-sponsorship}/listPolicyRules.ts +4 -4
  16. package/examples/fee-sponsorship/updatePolicy.ts +29 -0
  17. package/examples/policies/createAccountPolicy.ts +73 -0
  18. package/examples/policies/createEvmPolicy.ts +149 -0
  19. package/examples/policies/createSolanaPolicy.ts +176 -0
  20. package/examples/policies/createTypedDataPolicy.ts +159 -0
  21. package/examples/policies/deletePolicy.ts +34 -0
  22. package/examples/policies/getPolicy.ts +24 -13
  23. package/examples/policies/listPolicies.ts +19 -2
  24. package/examples/policies/multiRulePolicy.ts +133 -0
  25. package/examples/policies/updatePolicy.ts +64 -16
  26. package/examples/policies/validatePolicy.ts +176 -0
  27. package/examples/transactions/createTransactionIntent.ts +2 -2
  28. package/examples/transactions/estimateGas.ts +2 -2
  29. package/examples/transactions/getTransactionIntent.ts +2 -2
  30. package/openapi.json +2352 -1142
  31. package/package.json +4 -3
  32. package/pnpm-workspace.yaml +1 -0
package/dist/index.mjs CHANGED
@@ -374,7 +374,7 @@ function requiresWalletAuth(requestMethod, requestPath) {
374
374
  }
375
375
 
376
376
  // src/version.ts
377
- var VERSION = "0.7.7";
377
+ var VERSION = "0.8.1";
378
378
  var PACKAGE = "@openfort/openfort-node";
379
379
 
380
380
  // src/openapi-client/openfortApiClient.ts
@@ -443,6 +443,10 @@ var configure = (options) => {
443
443
  retryDelay: exponentialDelay,
444
444
  retries: 3,
445
445
  retryCondition: (error) => {
446
+ const hasWalletAuth = error.config?.headers?.["X-Wallet-Auth"] !== void 0;
447
+ if (hasWalletAuth) {
448
+ return false;
449
+ }
446
450
  return axiosRetry.isNetworkOrIdempotentRequestError(error) || error.response?.status !== void 0 && error.response.status >= 500;
447
451
  }
448
452
  });
@@ -578,7 +582,8 @@ function handleResponseError(statusCode, responseData, cause) {
578
582
  const correlationId = isOpenfortError(responseData) ? responseData.correlationId : void 0;
579
583
  let errorMessage;
580
584
  if (isOpenfortError(responseData)) {
581
- errorMessage = responseData.message || responseData.error || "Unknown error";
585
+ const nestedMessage = responseData.error && typeof responseData.error === "object" ? responseData.error.message : void 0;
586
+ errorMessage = responseData.message || nestedMessage || (typeof responseData.error === "string" ? responseData.error : void 0) || "Unknown error";
582
587
  } else if (typeof responseData === "string") {
583
588
  errorMessage = responseData;
584
589
  } else if (responseData) {
@@ -604,7 +609,7 @@ function handleResponseError(statusCode, responseData, cause) {
604
609
  throw new APIError(
605
610
  statusCode,
606
611
  "unauthorized",
607
- "Unauthorized. Check your API key.",
612
+ errorMessage || "Unauthorized. Check your API key.",
608
613
  correlationId,
609
614
  `${ERROR_DOCS_URL}#unauthorized`,
610
615
  cause
@@ -759,81 +764,6 @@ var disableAccount = (id, options) => {
759
764
  options
760
765
  );
761
766
  };
762
- var requestTransferOwnership = (id, transferOwnershipRequest, options) => {
763
- return openfortApiClient(
764
- {
765
- url: `/v1/accounts/${id}/request_transfer_ownership`,
766
- method: "POST",
767
- headers: { "Content-Type": "application/json" },
768
- data: transferOwnershipRequest
769
- },
770
- options
771
- );
772
- };
773
- var cancelTransferOwnership = (id, cancelTransferOwnershipRequest, options) => {
774
- return openfortApiClient(
775
- {
776
- url: `/v1/accounts/${id}/cancel_transfer_ownership`,
777
- method: "POST",
778
- headers: { "Content-Type": "application/json" },
779
- data: cancelTransferOwnershipRequest
780
- },
781
- options
782
- );
783
- };
784
- var signPayload = (id, signPayloadRequest, options) => {
785
- return openfortApiClient(
786
- {
787
- url: `/v1/accounts/${id}/sign_payload`,
788
- method: "POST",
789
- headers: { "Content-Type": "application/json" },
790
- data: signPayloadRequest
791
- },
792
- options
793
- );
794
- };
795
- var syncAccount = (id, options) => {
796
- return openfortApiClient(
797
- {
798
- url: `/v1/accounts/${id}/sync`,
799
- method: "POST"
800
- },
801
- options
802
- );
803
- };
804
- var deployAccount = (id, deployRequest, options) => {
805
- return openfortApiClient(
806
- {
807
- url: `/v1/accounts/${id}/deploy`,
808
- method: "POST",
809
- headers: { "Content-Type": "application/json" },
810
- data: deployRequest
811
- },
812
- options
813
- );
814
- };
815
- var startRecovery = (id, startRecoveryRequest, options) => {
816
- return openfortApiClient(
817
- {
818
- url: `/v1/accounts/${id}/start_recovery`,
819
- method: "POST",
820
- headers: { "Content-Type": "application/json" },
821
- data: startRecoveryRequest
822
- },
823
- options
824
- );
825
- };
826
- var completeRecovery = (id, completeRecoveryRequest, options) => {
827
- return openfortApiClient(
828
- {
829
- url: `/v1/accounts/${id}/complete_recovery`,
830
- method: "POST",
831
- headers: { "Content-Type": "application/json" },
832
- data: completeRecoveryRequest
833
- },
834
- options
835
- );
836
- };
837
767
 
838
768
  // src/openapi-client/generated/accs-v2/accs-v2.ts
839
769
  var getAccountsV2 = (params, options) => {
@@ -2268,7 +2198,11 @@ var APITopic = {
2268
2198
  balanceproject: "balance.project",
2269
2199
  balancecontract: "balance.contract",
2270
2200
  balancedev_account: "balance.dev_account",
2271
- test: "test"
2201
+ test: "test",
2202
+ usercreated: "user.created",
2203
+ userupdated: "user.updated",
2204
+ userdeleted: "user.deleted",
2205
+ accountcreated: "account.created"
2272
2206
  };
2273
2207
  var APITriggerType = {
2274
2208
  webhook: "webhook",
@@ -2429,6 +2363,285 @@ var PregenerateUserRequestV2ChainType = {
2429
2363
  EVM: "EVM",
2430
2364
  SVM: "SVM"
2431
2365
  };
2366
+ var PolicyV2Scope = {
2367
+ project: "project",
2368
+ account: "account"
2369
+ };
2370
+ var PolicyV2Action = {
2371
+ accept: "accept",
2372
+ reject: "reject"
2373
+ };
2374
+ var EvmCriteriaTypeEVMADDRESS = {
2375
+ evmAddress: "evmAddress"
2376
+ };
2377
+ var CriteriaOperatorIN = {
2378
+ in: "in"
2379
+ };
2380
+ var CriteriaOperatorNOTIN = {
2381
+ not_in: "not in"
2382
+ };
2383
+ var EvmCriteriaType = {
2384
+ evmAddress: "evmAddress",
2385
+ ethValue: "ethValue",
2386
+ evmNetwork: "evmNetwork",
2387
+ evmMessage: "evmMessage",
2388
+ evmData: "evmData",
2389
+ evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract",
2390
+ evmTypedDataField: "evmTypedDataField",
2391
+ netUSDChange: "netUSDChange"
2392
+ };
2393
+ var SolanaCriteriaType = {
2394
+ solAddress: "solAddress",
2395
+ solValue: "solValue",
2396
+ splAddress: "splAddress",
2397
+ splValue: "splValue",
2398
+ mintAddress: "mintAddress",
2399
+ solData: "solData",
2400
+ programId: "programId",
2401
+ solNetwork: "solNetwork",
2402
+ solMessage: "solMessage"
2403
+ };
2404
+ var CriteriaType = { ...EvmCriteriaType, ...SolanaCriteriaType };
2405
+ var CriteriaOperator = {
2406
+ in: "in",
2407
+ not_in: "not in",
2408
+ "<": "<",
2409
+ "<=": "<=",
2410
+ ">": ">",
2411
+ ">=": ">=",
2412
+ "==": "==",
2413
+ match: "match"
2414
+ };
2415
+ var EvmAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2416
+ var EvmCriteriaTypeETHVALUE = {
2417
+ ethValue: "ethValue"
2418
+ };
2419
+ var CriteriaOperatorLESSTHANOREQUAL = {
2420
+ "<=": "<="
2421
+ };
2422
+ var CriteriaOperatorGREATERTHANOREQUAL = {
2423
+ ">=": ">="
2424
+ };
2425
+ var CriteriaOperatorLESSTHAN = {
2426
+ "<": "<"
2427
+ };
2428
+ var CriteriaOperatorGREATERTHAN = {
2429
+ ">": ">"
2430
+ };
2431
+ var EthValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL, ...CriteriaOperatorLESSTHAN, ...CriteriaOperatorGREATERTHAN };
2432
+ var EvmCriteriaTypeEVMNETWORK = {
2433
+ evmNetwork: "evmNetwork"
2434
+ };
2435
+ var EvmNetworkCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2436
+ var EvmCriteriaTypeEVMMESSAGE = {
2437
+ evmMessage: "evmMessage"
2438
+ };
2439
+ var CriteriaOperatorMATCH = {
2440
+ match: "match"
2441
+ };
2442
+ var EvmCriteriaTypeEVMDATA = {
2443
+ evmData: "evmData"
2444
+ };
2445
+ var EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT = {
2446
+ evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract"
2447
+ };
2448
+ var EvmTypedDataVerifyingContractCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2449
+ var EvmCriteriaTypeEVMTYPEDDATAFIELD = {
2450
+ evmTypedDataField: "evmTypedDataField"
2451
+ };
2452
+ var EvmTypedDataFieldCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorMATCH };
2453
+ var EvmCriteriaTypeNETUSDCHANGE = {
2454
+ netUSDChange: "netUSDChange"
2455
+ };
2456
+ var NetUSDChangeCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
2457
+ var SolanaCriteriaTypeSOLADDRESS = {
2458
+ solAddress: "solAddress"
2459
+ };
2460
+ var SolAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2461
+ var SolanaCriteriaTypeSOLVALUE = {
2462
+ solValue: "solValue"
2463
+ };
2464
+ var SolValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
2465
+ var SolanaCriteriaTypeSPLADDRESS = {
2466
+ splAddress: "splAddress"
2467
+ };
2468
+ var SplAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2469
+ var SolanaCriteriaTypeSPLVALUE = {
2470
+ splValue: "splValue"
2471
+ };
2472
+ var SplValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
2473
+ var SolanaCriteriaTypeMINTADDRESS = {
2474
+ mintAddress: "mintAddress"
2475
+ };
2476
+ var CriteriaOperatorEQUAL = {
2477
+ "==": "=="
2478
+ };
2479
+ var MintAddressCriterionOperator = { ...CriteriaOperatorEQUAL, ...CriteriaOperatorIN };
2480
+ var SolanaCriteriaTypeSOLDATA = {
2481
+ solData: "solData"
2482
+ };
2483
+ var SolanaCriteriaTypePROGRAMID = {
2484
+ programId: "programId"
2485
+ };
2486
+ var ProgramIdCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2487
+ var SolanaCriteriaTypeSOLNETWORK = {
2488
+ solNetwork: "solNetwork"
2489
+ };
2490
+ var SolNetworkCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2491
+ var SolanaCriteriaTypeSOLMESSAGE = {
2492
+ solMessage: "solMessage"
2493
+ };
2494
+ var EntityTypePOLICYV2RULE = {
2495
+ policyV2Rule: "policyV2Rule"
2496
+ };
2497
+ var EntityTypePOLICYV2 = {
2498
+ policyV2: "policyV2"
2499
+ };
2500
+ var PolicyV2ListQueriesScope = {
2501
+ project: "project",
2502
+ account: "account"
2503
+ };
2504
+ var EvmAddressCriterionRequestType = {
2505
+ evmAddress: "evmAddress"
2506
+ };
2507
+ var EvmAddressCriterionRequestOperator = {
2508
+ in: "in",
2509
+ not_in: "not in"
2510
+ };
2511
+ var EthValueCriterionRequestType = {
2512
+ ethValue: "ethValue"
2513
+ };
2514
+ var EthValueCriterionRequestOperator = {
2515
+ "<=": "<=",
2516
+ ">=": ">=",
2517
+ "<": "<",
2518
+ ">": ">"
2519
+ };
2520
+ var EvmNetworkCriterionRequestType = {
2521
+ evmNetwork: "evmNetwork"
2522
+ };
2523
+ var EvmNetworkCriterionRequestOperator = {
2524
+ in: "in",
2525
+ not_in: "not in"
2526
+ };
2527
+ var EvmMessageCriterionRequestType = {
2528
+ evmMessage: "evmMessage"
2529
+ };
2530
+ var EvmMessageCriterionRequestOperator = {
2531
+ match: "match"
2532
+ };
2533
+ var EvmDataCriterionRequestType = {
2534
+ evmData: "evmData"
2535
+ };
2536
+ var EvmDataCriterionRequestOperator = {
2537
+ in: "in",
2538
+ not_in: "not in",
2539
+ "<": "<",
2540
+ "<=": "<=",
2541
+ ">": ">",
2542
+ ">=": ">=",
2543
+ "==": "==",
2544
+ match: "match"
2545
+ };
2546
+ var EvmTypedDataVerifyingContractCriterionRequestType = {
2547
+ evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract"
2548
+ };
2549
+ var EvmTypedDataVerifyingContractCriterionRequestOperator = {
2550
+ in: "in",
2551
+ not_in: "not in"
2552
+ };
2553
+ var EvmTypedDataFieldCriterionRequestType = {
2554
+ evmTypedDataField: "evmTypedDataField"
2555
+ };
2556
+ var EvmTypedDataFieldCriterionRequestOperator = {
2557
+ in: "in",
2558
+ "<=": "<=",
2559
+ match: "match"
2560
+ };
2561
+ var NetUSDChangeCriterionRequestType = {
2562
+ netUSDChange: "netUSDChange"
2563
+ };
2564
+ var NetUSDChangeCriterionRequestOperator = {
2565
+ "<=": "<=",
2566
+ ">=": ">="
2567
+ };
2568
+ var SolAddressCriterionRequestType = {
2569
+ solAddress: "solAddress"
2570
+ };
2571
+ var SolAddressCriterionRequestOperator = {
2572
+ in: "in",
2573
+ not_in: "not in"
2574
+ };
2575
+ var SolValueCriterionRequestType = {
2576
+ solValue: "solValue"
2577
+ };
2578
+ var SolValueCriterionRequestOperator = {
2579
+ "<=": "<=",
2580
+ ">=": ">="
2581
+ };
2582
+ var SplAddressCriterionRequestType = {
2583
+ splAddress: "splAddress"
2584
+ };
2585
+ var SplAddressCriterionRequestOperator = {
2586
+ in: "in",
2587
+ not_in: "not in"
2588
+ };
2589
+ var SplValueCriterionRequestType = {
2590
+ splValue: "splValue"
2591
+ };
2592
+ var SplValueCriterionRequestOperator = {
2593
+ "<=": "<=",
2594
+ ">=": ">="
2595
+ };
2596
+ var MintAddressCriterionRequestType = {
2597
+ mintAddress: "mintAddress"
2598
+ };
2599
+ var MintAddressCriterionRequestOperator = {
2600
+ "==": "==",
2601
+ in: "in"
2602
+ };
2603
+ var SolDataCriterionRequestType = {
2604
+ solData: "solData"
2605
+ };
2606
+ var SolDataCriterionRequestOperator = {
2607
+ in: "in",
2608
+ not_in: "not in",
2609
+ "<=": "<=",
2610
+ ">=": ">=",
2611
+ "==": "==",
2612
+ match: "match"
2613
+ };
2614
+ var ProgramIdCriterionRequestType = {
2615
+ programId: "programId"
2616
+ };
2617
+ var ProgramIdCriterionRequestOperator = {
2618
+ in: "in",
2619
+ not_in: "not in"
2620
+ };
2621
+ var SolNetworkCriterionRequestType = {
2622
+ solNetwork: "solNetwork"
2623
+ };
2624
+ var SolNetworkCriterionRequestOperator = {
2625
+ in: "in",
2626
+ not_in: "not in"
2627
+ };
2628
+ var SolMessageCriterionRequestType = {
2629
+ solMessage: "solMessage"
2630
+ };
2631
+ var SolMessageCriterionRequestOperator = {
2632
+ match: "match"
2633
+ };
2634
+ var CreatePolicyV2RuleRequestAction = {
2635
+ accept: "accept",
2636
+ reject: "reject"
2637
+ };
2638
+ var CreatePolicyV2RequestScope = {
2639
+ project: "project",
2640
+ account: "account"
2641
+ };
2642
+ var EvaluatePolicyV2ResponseObject = {
2643
+ policy_evaluation: "policy_evaluation"
2644
+ };
2432
2645
  var CreateEmbeddedRequestAccountType = {
2433
2646
  Externally_Owned_Account: "Externally Owned Account",
2434
2647
  Smart_Account: "Smart Account",
@@ -2710,6 +2923,10 @@ var AuthenticationType = {
2710
2923
  var GetPolicyRulesExpandItem = {
2711
2924
  contract: "contract"
2712
2925
  };
2926
+ var ListPoliciesScope = {
2927
+ project: "project",
2928
+ account: "account"
2929
+ };
2713
2930
  var ListBackendWalletsChainType = {
2714
2931
  EVM: "EVM",
2715
2932
  SVM: "SVM"
@@ -2965,6 +3182,67 @@ var createPolicyWithdrawal = (id, withdrawalPolicyRequest, options) => {
2965
3182
  options
2966
3183
  );
2967
3184
  };
3185
+ var listPolicies = (params, options) => {
3186
+ return openfortApiClient(
3187
+ {
3188
+ url: `/v2/policies`,
3189
+ method: "GET",
3190
+ params
3191
+ },
3192
+ options
3193
+ );
3194
+ };
3195
+ var createPolicyV2 = (createPolicyV2Request, options) => {
3196
+ return openfortApiClient(
3197
+ {
3198
+ url: `/v2/policies`,
3199
+ method: "POST",
3200
+ headers: { "Content-Type": "application/json" },
3201
+ data: createPolicyV2Request
3202
+ },
3203
+ options
3204
+ );
3205
+ };
3206
+ var getPolicyV2 = (policyId, options) => {
3207
+ return openfortApiClient(
3208
+ {
3209
+ url: `/v2/policies/${policyId}`,
3210
+ method: "GET"
3211
+ },
3212
+ options
3213
+ );
3214
+ };
3215
+ var updatePolicyV2 = (policyId, updatePolicyV2Request, options) => {
3216
+ return openfortApiClient(
3217
+ {
3218
+ url: `/v2/policies/${policyId}`,
3219
+ method: "POST",
3220
+ headers: { "Content-Type": "application/json" },
3221
+ data: updatePolicyV2Request
3222
+ },
3223
+ options
3224
+ );
3225
+ };
3226
+ var deletePolicyV2 = (policyId, options) => {
3227
+ return openfortApiClient(
3228
+ {
3229
+ url: `/v2/policies/${policyId}`,
3230
+ method: "DELETE"
3231
+ },
3232
+ options
3233
+ );
3234
+ };
3235
+ var evaluatePolicyV2 = (evaluatePolicyV2Request, options) => {
3236
+ return openfortApiClient(
3237
+ {
3238
+ url: `/v2/policies/evaluate`,
3239
+ method: "POST",
3240
+ headers: { "Content-Type": "application/json" },
3241
+ data: evaluatePolicyV2Request
3242
+ },
3243
+ options
3244
+ );
3245
+ };
2968
3246
 
2969
3247
  // src/openapi-client/generated/policy-rules/policy-rules.ts
2970
3248
  var getPolicyRules = (params, options) => {
@@ -3480,6 +3758,7 @@ import {
3480
3758
  getTypesForEIP712Domain,
3481
3759
  hashMessage,
3482
3760
  hashTypedData,
3761
+ keccak256,
3483
3762
  parseSignature,
3484
3763
  serializeTransaction
3485
3764
  } from "viem";
@@ -3520,7 +3799,8 @@ function toEvmAccount(data) {
3520
3799
  },
3521
3800
  async signTransaction(transaction) {
3522
3801
  const serialized = serializeTransaction(transaction);
3523
- const response = await sign(id, { data: serialized });
3802
+ const hash = keccak256(serialized);
3803
+ const response = await sign(id, { data: hash });
3524
3804
  const signature2 = parseSignature(response.signature);
3525
3805
  const signedTransaction = serializeTransaction(
3526
3806
  transaction,
@@ -4044,12 +4324,285 @@ SolanaClient.type = "solanaWallet";
4044
4324
  // src/index.ts
4045
4325
  import { ShieldAuthProvider as ShieldAuthProvider2 } from "@openfort/shield-js";
4046
4326
 
4327
+ // src/policies/evmSchema.ts
4328
+ import { z } from "zod";
4329
+ var EthValueOperatorEnum = z.enum(["<=", ">=", "<", ">"]);
4330
+ var EvmAddressOperatorEnum = z.enum(["in", "not in"]);
4331
+ var EvmNetworkOperatorEnum = z.enum(["in", "not in"]);
4332
+ var EvmDataOperatorEnum = z.enum([
4333
+ "in",
4334
+ "not in",
4335
+ "<",
4336
+ "<=",
4337
+ ">",
4338
+ ">=",
4339
+ "==",
4340
+ "match"
4341
+ ]);
4342
+ var EvmTypedDataVerifyingContractOperatorEnum = z.enum([
4343
+ "in",
4344
+ "not in"
4345
+ ]);
4346
+ var EvmTypedDataFieldOperatorEnum = z.enum(["in", "<=", "match"]);
4347
+ var ActionEnum = z.enum(["reject", "accept"]);
4348
+ var EthValueCriterionSchema = z.object({
4349
+ type: z.literal("ethValue"),
4350
+ operator: EthValueOperatorEnum,
4351
+ /** Value in wei as a string. */
4352
+ ethValue: z.string().regex(/^[0-9]+$/)
4353
+ });
4354
+ var EvmAddressCriterionSchema = z.object({
4355
+ type: z.literal("evmAddress"),
4356
+ operator: EvmAddressOperatorEnum,
4357
+ /** List of EVM addresses (hex format with 0x prefix). */
4358
+ addresses: z.array(z.string().regex(/^0x[0-9a-fA-F]{40}$/))
4359
+ });
4360
+ var EvmNetworkCriterionSchema = z.object({
4361
+ type: z.literal("evmNetwork"),
4362
+ operator: EvmNetworkOperatorEnum,
4363
+ /** List of chain IDs. */
4364
+ chainIds: z.array(z.number().int().positive())
4365
+ });
4366
+ var EvmMessageCriterionSchema = z.object({
4367
+ type: z.literal("evmMessage"),
4368
+ operator: z.literal("match"),
4369
+ /** RE2 regex pattern to match against the message. */
4370
+ pattern: z.string().min(1)
4371
+ });
4372
+ var EvmDataCriterionSchema = z.object({
4373
+ type: z.literal("evmData"),
4374
+ operator: EvmDataOperatorEnum,
4375
+ /** Contract ABI as JSON string. */
4376
+ abi: z.string().min(1),
4377
+ /** Function name to match. */
4378
+ functionName: z.string().min(1),
4379
+ /** Argument constraints. */
4380
+ args: z.record(z.unknown()).optional()
4381
+ });
4382
+ var EvmTypedDataVerifyingContractCriterionSchema = z.object({
4383
+ type: z.literal("evmTypedDataVerifyingContract"),
4384
+ operator: EvmTypedDataVerifyingContractOperatorEnum,
4385
+ /** List of verifying contract addresses. */
4386
+ addresses: z.array(z.string().regex(/^0x[0-9a-fA-F]{40}$/))
4387
+ });
4388
+ var EvmTypedDataFieldCriterionSchema = z.object({
4389
+ type: z.literal("evmTypedDataField"),
4390
+ operator: EvmTypedDataFieldOperatorEnum,
4391
+ /** Dot-notation path to the field (e.g. "order.buyer"). */
4392
+ fieldPath: z.string().min(1),
4393
+ /** Values for "in" operator. */
4394
+ values: z.array(z.string()).optional(),
4395
+ /** Value for "<=" or "match" operators. */
4396
+ value: z.string().optional()
4397
+ });
4398
+ var SignEvmTransactionCriteriaSchema = z.array(
4399
+ z.discriminatedUnion("type", [
4400
+ EthValueCriterionSchema,
4401
+ EvmAddressCriterionSchema,
4402
+ EvmDataCriterionSchema
4403
+ ])
4404
+ ).max(10);
4405
+ var SendEvmTransactionCriteriaSchema = z.array(
4406
+ z.discriminatedUnion("type", [
4407
+ EthValueCriterionSchema,
4408
+ EvmAddressCriterionSchema,
4409
+ EvmNetworkCriterionSchema,
4410
+ EvmDataCriterionSchema
4411
+ ])
4412
+ ).max(10);
4413
+ var SignEvmMessageCriteriaSchema = z.array(z.discriminatedUnion("type", [EvmMessageCriterionSchema])).max(10);
4414
+ var SignEvmTypedDataCriteriaSchema = z.array(
4415
+ z.discriminatedUnion("type", [
4416
+ EvmTypedDataFieldCriterionSchema,
4417
+ EvmTypedDataVerifyingContractCriterionSchema
4418
+ ])
4419
+ ).max(10);
4420
+ var SignEvmTransactionRuleSchema = z.object({
4421
+ action: ActionEnum,
4422
+ operation: z.literal("signEvmTransaction"),
4423
+ criteria: SignEvmTransactionCriteriaSchema
4424
+ });
4425
+ var SendEvmTransactionRuleSchema = z.object({
4426
+ action: ActionEnum,
4427
+ operation: z.literal("sendEvmTransaction"),
4428
+ criteria: SendEvmTransactionCriteriaSchema
4429
+ });
4430
+ var SignEvmMessageRuleSchema = z.object({
4431
+ action: ActionEnum,
4432
+ operation: z.literal("signEvmMessage"),
4433
+ criteria: SignEvmMessageCriteriaSchema
4434
+ });
4435
+ var SignEvmTypedDataRuleSchema = z.object({
4436
+ action: ActionEnum,
4437
+ operation: z.literal("signEvmTypedData"),
4438
+ criteria: SignEvmTypedDataCriteriaSchema
4439
+ });
4440
+ var SignEvmHashRuleSchema = z.object({
4441
+ action: ActionEnum,
4442
+ operation: z.literal("signEvmHash")
4443
+ });
4444
+
4445
+ // src/policies/solanaSchema.ts
4446
+ import { z as z2 } from "zod";
4447
+ var SolAddressOperatorEnum = z2.enum(["in", "not in"]);
4448
+ var SolValueOperatorEnum = z2.enum(["<=", ">="]);
4449
+ var SplAddressOperatorEnum = z2.enum(["in", "not in"]);
4450
+ var SplValueOperatorEnum = z2.enum(["<=", ">="]);
4451
+ var MintAddressOperatorEnum = z2.enum(["==", "in"]);
4452
+ var SolDataOperatorEnum = z2.enum([
4453
+ "in",
4454
+ "not in",
4455
+ "<=",
4456
+ ">=",
4457
+ "==",
4458
+ "match"
4459
+ ]);
4460
+ var ProgramIdOperatorEnum = z2.enum(["in", "not in"]);
4461
+ var SolNetworkOperatorEnum = z2.enum(["in", "not in"]);
4462
+ var SolNetworkEnum = z2.enum(["mainnet-beta", "devnet", "testnet"]);
4463
+ var base58Address = z2.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/);
4464
+ var SolAddressCriterionSchema = z2.object({
4465
+ type: z2.literal("solAddress"),
4466
+ operator: SolAddressOperatorEnum,
4467
+ /** List of Solana addresses (Base58). */
4468
+ addresses: z2.array(base58Address)
4469
+ });
4470
+ var SolValueCriterionSchema = z2.object({
4471
+ type: z2.literal("solValue"),
4472
+ operator: SolValueOperatorEnum,
4473
+ /** Value in lamports as string. */
4474
+ value: z2.string().regex(/^[0-9]+$/)
4475
+ });
4476
+ var SplAddressCriterionSchema = z2.object({
4477
+ type: z2.literal("splAddress"),
4478
+ operator: SplAddressOperatorEnum,
4479
+ /** List of recipient addresses (Base58). */
4480
+ addresses: z2.array(base58Address)
4481
+ });
4482
+ var SplValueCriterionSchema = z2.object({
4483
+ type: z2.literal("splValue"),
4484
+ operator: SplValueOperatorEnum,
4485
+ /** Token amount as string. */
4486
+ value: z2.string().regex(/^[0-9]+$/)
4487
+ });
4488
+ var MintAddressCriterionSchema = z2.object({
4489
+ type: z2.literal("mintAddress"),
4490
+ operator: MintAddressOperatorEnum,
4491
+ /** List of mint addresses (Base58). */
4492
+ addresses: z2.array(base58Address)
4493
+ });
4494
+ var SolDataCriterionSchema = z2.object({
4495
+ type: z2.literal("solData"),
4496
+ operator: SolDataOperatorEnum,
4497
+ /** Anchor IDL JSON (v0.30+). */
4498
+ idl: z2.string().min(1),
4499
+ /** Instruction name. */
4500
+ instructionName: z2.string().min(1),
4501
+ /** Argument constraints. */
4502
+ args: z2.record(z2.unknown()).optional()
4503
+ });
4504
+ var ProgramIdCriterionSchema = z2.object({
4505
+ type: z2.literal("programId"),
4506
+ operator: ProgramIdOperatorEnum,
4507
+ /** List of program IDs (Base58). */
4508
+ programIds: z2.array(base58Address)
4509
+ });
4510
+ var SolNetworkCriterionSchema = z2.object({
4511
+ type: z2.literal("solNetwork"),
4512
+ operator: SolNetworkOperatorEnum,
4513
+ /** List of networks: "mainnet-beta", "devnet", "testnet". */
4514
+ networks: z2.array(SolNetworkEnum)
4515
+ });
4516
+ var SolMessageCriterionSchema = z2.object({
4517
+ type: z2.literal("solMessage"),
4518
+ operator: z2.literal("match"),
4519
+ /** RE2 regex pattern. */
4520
+ pattern: z2.string().min(1)
4521
+ });
4522
+ var SignSolTransactionCriteriaSchema = z2.array(
4523
+ z2.discriminatedUnion("type", [
4524
+ SolAddressCriterionSchema,
4525
+ SolValueCriterionSchema,
4526
+ SplAddressCriterionSchema,
4527
+ SplValueCriterionSchema,
4528
+ MintAddressCriterionSchema,
4529
+ SolDataCriterionSchema,
4530
+ ProgramIdCriterionSchema
4531
+ ])
4532
+ ).max(10);
4533
+ var SendSolTransactionCriteriaSchema = z2.array(
4534
+ z2.discriminatedUnion("type", [
4535
+ SolAddressCriterionSchema,
4536
+ SolValueCriterionSchema,
4537
+ SplAddressCriterionSchema,
4538
+ SplValueCriterionSchema,
4539
+ MintAddressCriterionSchema,
4540
+ SolDataCriterionSchema,
4541
+ ProgramIdCriterionSchema,
4542
+ SolNetworkCriterionSchema
4543
+ ])
4544
+ ).max(10);
4545
+ var SignSolMessageCriteriaSchema = z2.array(SolMessageCriterionSchema).max(10);
4546
+ var SignSolTransactionRuleSchema = z2.object({
4547
+ action: ActionEnum,
4548
+ operation: z2.literal("signSolTransaction"),
4549
+ criteria: SignSolTransactionCriteriaSchema
4550
+ });
4551
+ var SendSolTransactionRuleSchema = z2.object({
4552
+ action: ActionEnum,
4553
+ operation: z2.literal("sendSolTransaction"),
4554
+ criteria: SendSolTransactionCriteriaSchema
4555
+ });
4556
+ var SignSolMessageRuleSchema = z2.object({
4557
+ action: ActionEnum,
4558
+ operation: z2.literal("signSolMessage"),
4559
+ criteria: SignSolMessageCriteriaSchema
4560
+ });
4561
+
4562
+ // src/policies/types.ts
4563
+ import { z as z3 } from "zod";
4564
+ var PolicyScopeEnum = z3.enum(["project", "account"]);
4565
+ var RuleSchema = z3.discriminatedUnion("operation", [
4566
+ SignEvmTransactionRuleSchema,
4567
+ SendEvmTransactionRuleSchema,
4568
+ SignEvmMessageRuleSchema,
4569
+ SignEvmTypedDataRuleSchema,
4570
+ SignEvmHashRuleSchema,
4571
+ SignSolTransactionRuleSchema,
4572
+ SendSolTransactionRuleSchema,
4573
+ SignSolMessageRuleSchema
4574
+ ]);
4575
+ var CreatePolicyBodySchema = z3.object({
4576
+ /** The scope of the policy. 'project' applies to all accounts, 'account' applies to a specific account. */
4577
+ scope: PolicyScopeEnum,
4578
+ /** A description of what this policy does. */
4579
+ description: z3.string().optional(),
4580
+ /** The account ID for account-scoped policies (starts with acc_). Required when scope is 'account'. */
4581
+ accountId: z3.string().optional(),
4582
+ /** Whether the policy is enabled. */
4583
+ enabled: z3.boolean().optional(),
4584
+ /** Priority of the policy. Higher priority policies are evaluated first. */
4585
+ priority: z3.number().int().optional(),
4586
+ /** The rules that make up this policy. Maximum 10 rules per policy. */
4587
+ rules: z3.array(RuleSchema).min(1).max(10)
4588
+ });
4589
+ var UpdatePolicyBodySchema = z3.object({
4590
+ /** A description of what this policy does. */
4591
+ description: z3.string().optional(),
4592
+ /** Whether the policy is enabled. */
4593
+ enabled: z3.boolean().optional(),
4594
+ /** Priority of the policy. Higher priority policies are evaluated first. */
4595
+ priority: z3.number().int().optional(),
4596
+ /** The rules that make up this policy. If provided, replaces all existing rules. Maximum 10 rules. */
4597
+ rules: z3.array(RuleSchema).min(1).max(10).optional()
4598
+ });
4599
+
4047
4600
  // src/wallets/evm/actions/signMessage.ts
4048
4601
  import { hashMessage as hashMessage2, toHex } from "viem";
4049
4602
 
4050
4603
  // src/wallets/evm/actions/signTransaction.ts
4051
4604
  import {
4052
- keccak256,
4605
+ keccak256 as keccak2562,
4053
4606
  parseSignature as parseSignature2,
4054
4607
  serializeTransaction as serializeTransaction2
4055
4608
  } from "viem";
@@ -4193,14 +4746,7 @@ var Openfort = class {
4193
4746
  v1: {
4194
4747
  list: getAccounts,
4195
4748
  create: createAccount,
4196
- get: getAccount,
4197
- requestTransferOwnership,
4198
- cancelTransferOwnership,
4199
- signPayload,
4200
- sync: syncAccount,
4201
- deploy: deployAccount,
4202
- startRecovery,
4203
- completeRecovery
4749
+ get: getAccount
4204
4750
  }
4205
4751
  };
4206
4752
  }
@@ -4209,6 +4755,7 @@ var Openfort = class {
4209
4755
  // ============================================
4210
4756
  /**
4211
4757
  * Player management endpoints
4758
+ * @deprecated
4212
4759
  */
4213
4760
  get players() {
4214
4761
  return {
@@ -4248,41 +4795,77 @@ var Openfort = class {
4248
4795
  // Policies API
4249
4796
  // ============================================
4250
4797
  /**
4251
- * Policy management endpoints
4798
+ * Policy management endpoints for controlling account operations.
4799
+ *
4800
+ * Policies define rules that govern what operations accounts can perform,
4801
+ * including transaction signing, message signing, and more.
4802
+ *
4803
+ * @example
4804
+ * ```typescript
4805
+ * // List all policies
4806
+ * const all = await openfort.policies.list();
4807
+ *
4808
+ * // Create a policy
4809
+ * const policy = await openfort.policies.create({
4810
+ * scope: 'project',
4811
+ * rules: [{ action: 'reject', operation: 'signEvmHash' }],
4812
+ * });
4813
+ *
4814
+ * // Evaluate whether an operation would be allowed
4815
+ * const result = await openfort.policies.evaluate({ operation: 'signEvmTransaction', accountId: 'acc_...' });
4816
+ * ```
4252
4817
  */
4253
4818
  get policies() {
4254
4819
  return {
4255
4820
  /** List policies */
4256
- list: getPolicies,
4821
+ list: listPolicies,
4257
4822
  /** Create a policy */
4258
- create: createPolicy,
4823
+ create: createPolicyV2,
4259
4824
  /** Get a policy by ID */
4260
- get: getPolicy,
4825
+ get: getPolicyV2,
4261
4826
  /** Update a policy */
4262
- update: updatePolicy,
4827
+ update: updatePolicyV2,
4263
4828
  /** Delete a policy */
4264
- delete: deletePolicy,
4265
- /** Disable a policy */
4266
- disable: disablePolicy,
4267
- /** Enable a policy */
4268
- enable: enablePolicy,
4269
- /** Get policy total gas usage */
4270
- getTotalGasUsage: getPolicyTotalGasUsage
4829
+ delete: deletePolicyV2,
4830
+ /** Evaluate an operation against policies */
4831
+ evaluate: evaluatePolicyV2
4271
4832
  };
4272
4833
  }
4834
+ // ============================================
4835
+ // Fee Sponsorship API
4836
+ // ============================================
4273
4837
  /**
4274
- * Policy rules management endpoints
4838
+ * Fee sponsorship (gas policy) management endpoints
4275
4839
  */
4276
- get policyRules() {
4840
+ get feeSponsorship() {
4277
4841
  return {
4278
- /** List policy rules */
4279
- list: getPolicyRules,
4280
- /** Create a policy rule */
4281
- create: createPolicyRule,
4282
- /** Update a policy rule */
4283
- update: updatePolicyRule,
4284
- /** Delete a policy rule */
4285
- delete: deletePolicyRule
4842
+ /** List fee sponsorship policies */
4843
+ list: getPolicies,
4844
+ /** Create a fee sponsorship policy */
4845
+ create: createPolicy,
4846
+ /** Get a fee sponsorship policy by ID */
4847
+ get: getPolicy,
4848
+ /** Update a fee sponsorship policy */
4849
+ update: updatePolicy,
4850
+ /** Delete a fee sponsorship policy */
4851
+ delete: deletePolicy,
4852
+ /** Disable a fee sponsorship policy */
4853
+ disable: disablePolicy,
4854
+ /** Enable a fee sponsorship policy */
4855
+ enable: enablePolicy,
4856
+ /** Get fee sponsorship policy total gas usage */
4857
+ getTotalGasUsage: getPolicyTotalGasUsage,
4858
+ /** Fee sponsorship policy rules */
4859
+ rules: {
4860
+ /** List policy rules */
4861
+ list: getPolicyRules,
4862
+ /** Create a policy rule */
4863
+ create: createPolicyRule,
4864
+ /** Update a policy rule */
4865
+ update: updatePolicyRule,
4866
+ /** Delete a policy rule */
4867
+ delete: deletePolicyRule
4868
+ }
4286
4869
  };
4287
4870
  }
4288
4871
  // ============================================
@@ -4330,6 +4913,7 @@ var Openfort = class {
4330
4913
  // ============================================
4331
4914
  /**
4332
4915
  * Settings / Developer account management endpoints
4916
+ * @deprecated
4333
4917
  */
4334
4918
  get settings() {
4335
4919
  return {
@@ -4671,6 +5255,19 @@ export {
4671
5255
  CreateBackendWalletResponseObject,
4672
5256
  CreateEmbeddedRequestAccountType,
4673
5257
  CreateEmbeddedRequestChainType,
5258
+ CreatePolicyBodySchema,
5259
+ CreatePolicyV2RequestScope,
5260
+ CreatePolicyV2RuleRequestAction,
5261
+ CriteriaOperator,
5262
+ CriteriaOperatorEQUAL,
5263
+ CriteriaOperatorGREATERTHAN,
5264
+ CriteriaOperatorGREATERTHANOREQUAL,
5265
+ CriteriaOperatorIN,
5266
+ CriteriaOperatorLESSTHAN,
5267
+ CriteriaOperatorLESSTHANOREQUAL,
5268
+ CriteriaOperatorMATCH,
5269
+ CriteriaOperatorNOTIN,
5270
+ CriteriaType,
4674
5271
  Currency,
4675
5272
  DeleteBackendWalletResponseObject,
4676
5273
  DeveloperAccountResponseExpandable,
@@ -4690,6 +5287,8 @@ export {
4690
5287
  EntityTypePLAYER,
4691
5288
  EntityTypePOLICY,
4692
5289
  EntityTypePOLICYRULE,
5290
+ EntityTypePOLICYV2,
5291
+ EntityTypePOLICYV2RULE,
4693
5292
  EntityTypePROJECT,
4694
5293
  EntityTypeREADCONTRACT,
4695
5294
  EntityTypeSESSION,
@@ -4701,7 +5300,43 @@ export {
4701
5300
  EntityTypeUSER,
4702
5301
  EntityTypeWALLET,
4703
5302
  ErrorTypeINVALIDREQUESTERROR,
5303
+ EthValueCriterionOperator,
5304
+ EthValueCriterionRequestOperator,
5305
+ EthValueCriterionRequestType,
5306
+ EthValueCriterionSchema,
5307
+ EvaluatePolicyV2ResponseObject,
5308
+ EvmAddressCriterionOperator,
5309
+ EvmAddressCriterionRequestOperator,
5310
+ EvmAddressCriterionRequestType,
5311
+ EvmAddressCriterionSchema,
4704
5312
  EvmClient,
5313
+ EvmCriteriaType,
5314
+ EvmCriteriaTypeETHVALUE,
5315
+ EvmCriteriaTypeEVMADDRESS,
5316
+ EvmCriteriaTypeEVMDATA,
5317
+ EvmCriteriaTypeEVMMESSAGE,
5318
+ EvmCriteriaTypeEVMNETWORK,
5319
+ EvmCriteriaTypeEVMTYPEDDATAFIELD,
5320
+ EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT,
5321
+ EvmCriteriaTypeNETUSDCHANGE,
5322
+ EvmDataCriterionRequestOperator,
5323
+ EvmDataCriterionRequestType,
5324
+ EvmDataCriterionSchema,
5325
+ EvmMessageCriterionRequestOperator,
5326
+ EvmMessageCriterionRequestType,
5327
+ EvmMessageCriterionSchema,
5328
+ EvmNetworkCriterionOperator,
5329
+ EvmNetworkCriterionRequestOperator,
5330
+ EvmNetworkCriterionRequestType,
5331
+ EvmNetworkCriterionSchema,
5332
+ EvmTypedDataFieldCriterionOperator,
5333
+ EvmTypedDataFieldCriterionRequestOperator,
5334
+ EvmTypedDataFieldCriterionRequestType,
5335
+ EvmTypedDataFieldCriterionSchema,
5336
+ EvmTypedDataVerifyingContractCriterionOperator,
5337
+ EvmTypedDataVerifyingContractCriterionRequestOperator,
5338
+ EvmTypedDataVerifyingContractCriterionRequestType,
5339
+ EvmTypedDataVerifyingContractCriterionSchema,
4705
5340
  ExportPrivateKeyResponseObject,
4706
5341
  GetAccountsV2AccountType,
4707
5342
  GetAccountsV2ChainType,
@@ -4718,9 +5353,17 @@ export {
4718
5353
  JsonRpcRequestJsonrpc,
4719
5354
  JsonRpcSuccessResponseAnyJsonrpc,
4720
5355
  ListBackendWalletsChainType,
5356
+ ListPoliciesScope,
5357
+ MintAddressCriterionOperator,
5358
+ MintAddressCriterionRequestOperator,
5359
+ MintAddressCriterionRequestType,
5360
+ MintAddressCriterionSchema,
4721
5361
  MissingAPIKeyError,
4722
5362
  MissingPublishableKeyError,
4723
5363
  MissingWalletSecretError,
5364
+ NetUSDChangeCriterionOperator,
5365
+ NetUSDChangeCriterionRequestOperator,
5366
+ NetUSDChangeCriterionRequestType,
4724
5367
  NetworkError,
4725
5368
  NextActionType,
4726
5369
  OAuthProvider,
@@ -4745,25 +5388,77 @@ export {
4745
5388
  PolicyRuleTypeACCOUNT,
4746
5389
  PolicyRuleTypeCONTRACT,
4747
5390
  PolicyRuleTypeRATELIMIT,
5391
+ PolicyV2Action,
5392
+ PolicyV2ListQueriesScope,
5393
+ PolicyV2Scope,
4748
5394
  PregenerateAccountResponseCustody,
4749
5395
  PregenerateUserRequestV2AccountType,
4750
5396
  PregenerateUserRequestV2ChainType,
4751
5397
  PrismaSortOrder,
4752
5398
  PrivateKeyPolicy,
5399
+ ProgramIdCriterionOperator,
5400
+ ProgramIdCriterionRequestOperator,
5401
+ ProgramIdCriterionRequestType,
5402
+ ProgramIdCriterionSchema,
4753
5403
  ProjectStatsRequestTimeFrame,
4754
5404
  RegisterWalletSecretResponseObject,
4755
5405
  ResponseTypeLIST,
4756
5406
  RevokeWalletSecretResponseObject,
4757
5407
  RotateWalletSecretResponseObject,
5408
+ RuleSchema,
5409
+ SendEvmTransactionRuleSchema,
5410
+ SendSolTransactionRuleSchema,
4758
5411
  SessionResponseExpandable,
4759
5412
  ShieldAuthProvider2 as ShieldAuthProvider,
5413
+ SignEvmHashRuleSchema,
5414
+ SignEvmMessageRuleSchema,
5415
+ SignEvmTransactionRuleSchema,
5416
+ SignEvmTypedDataRuleSchema,
4760
5417
  SignResponseObject,
5418
+ SignSolMessageRuleSchema,
5419
+ SignSolTransactionRuleSchema,
4761
5420
  SmsProviderMESSAGEBIRD,
4762
5421
  SmsProviderSMSAPI,
4763
5422
  SmsProviderTWILIO,
4764
5423
  SmsProviderTXTLOCAL,
4765
5424
  SmsProviderVONAGE,
5425
+ SolAddressCriterionOperator,
5426
+ SolAddressCriterionRequestOperator,
5427
+ SolAddressCriterionRequestType,
5428
+ SolAddressCriterionSchema,
5429
+ SolDataCriterionRequestOperator,
5430
+ SolDataCriterionRequestType,
5431
+ SolDataCriterionSchema,
5432
+ SolMessageCriterionRequestOperator,
5433
+ SolMessageCriterionRequestType,
5434
+ SolMessageCriterionSchema,
5435
+ SolNetworkCriterionOperator,
5436
+ SolNetworkCriterionRequestOperator,
5437
+ SolNetworkCriterionRequestType,
5438
+ SolNetworkCriterionSchema,
5439
+ SolValueCriterionOperator,
5440
+ SolValueCriterionRequestOperator,
5441
+ SolValueCriterionRequestType,
5442
+ SolValueCriterionSchema,
4766
5443
  SolanaClient,
5444
+ SolanaCriteriaType,
5445
+ SolanaCriteriaTypeMINTADDRESS,
5446
+ SolanaCriteriaTypePROGRAMID,
5447
+ SolanaCriteriaTypeSOLADDRESS,
5448
+ SolanaCriteriaTypeSOLDATA,
5449
+ SolanaCriteriaTypeSOLMESSAGE,
5450
+ SolanaCriteriaTypeSOLNETWORK,
5451
+ SolanaCriteriaTypeSOLVALUE,
5452
+ SolanaCriteriaTypeSPLADDRESS,
5453
+ SolanaCriteriaTypeSPLVALUE,
5454
+ SplAddressCriterionOperator,
5455
+ SplAddressCriterionRequestOperator,
5456
+ SplAddressCriterionRequestType,
5457
+ SplAddressCriterionSchema,
5458
+ SplValueCriterionOperator,
5459
+ SplValueCriterionRequestOperator,
5460
+ SplValueCriterionRequestType,
5461
+ SplValueCriterionSchema,
4767
5462
  SponsorSchema,
4768
5463
  SponsorSchemaCHARGECUSTOMTOKENS,
4769
5464
  SponsorSchemaFIXEDRATE,
@@ -4785,6 +5480,7 @@ export {
4785
5480
  TransactionIntentResponseExpandable,
4786
5481
  TransactionStatus,
4787
5482
  UnknownError,
5483
+ UpdatePolicyBodySchema,
4788
5484
  UserInputValidationError,
4789
5485
  UserProjectCreateRequestRole,
4790
5486
  UserProjectRole,
@@ -4798,8 +5494,6 @@ export {
4798
5494
  authorize,
4799
5495
  callbackOAuth,
4800
5496
  cancelTransferAccountOwnership,
4801
- cancelTransferOwnership,
4802
- completeRecovery,
4803
5497
  configure,
4804
5498
  create,
4805
5499
  createAccount,
@@ -4816,6 +5510,7 @@ export {
4816
5510
  createPlayer,
4817
5511
  createPolicy,
4818
5512
  createPolicyRule,
5513
+ createPolicyV2,
4819
5514
  createPolicyWithdrawal,
4820
5515
  createSession,
4821
5516
  createSubscription,
@@ -4834,16 +5529,17 @@ export {
4834
5529
  deletePlayer,
4835
5530
  deletePolicy,
4836
5531
  deletePolicyRule,
5532
+ deletePolicyV2,
4837
5533
  deleteSubscription,
4838
5534
  deleteTrigger,
4839
5535
  deleteUser,
4840
- deployAccount,
4841
5536
  deprecatedCallbackOAuth,
4842
5537
  disableAccount,
4843
5538
  disablePolicy,
4844
5539
  enablePolicy,
4845
5540
  encryptForImport,
4846
5541
  estimateTransactionIntentCost,
5542
+ evaluatePolicyV2,
4847
5543
  exportPrivateKey,
4848
5544
  generateRSAKeyPair,
4849
5545
  getAccount,
@@ -4876,6 +5572,7 @@ export {
4876
5572
  getPolicyReportTransactionIntents,
4877
5573
  getPolicyRules,
4878
5574
  getPolicyTotalGasUsage,
5575
+ getPolicyV2,
4879
5576
  getProjectLogs,
4880
5577
  getSession,
4881
5578
  getSignerIdByAddress,
@@ -4905,6 +5602,7 @@ export {
4905
5602
  listForwarderContracts,
4906
5603
  listOAuthConfig,
4907
5604
  listPaymasters,
5605
+ listPolicies,
4908
5606
  listSubscriptionLogs,
4909
5607
  loginEmailPassword,
4910
5608
  loginOIDC,
@@ -4923,20 +5621,16 @@ export {
4923
5621
  requestEmailVerification,
4924
5622
  requestResetPassword,
4925
5623
  requestTransferAccountOwnership,
4926
- requestTransferOwnership,
4927
5624
  resetPassword,
4928
5625
  revokeSession,
4929
5626
  revokeWalletSecret,
4930
5627
  rotateWalletSecret,
4931
5628
  sign,
4932
- signPayload,
4933
5629
  signPayloadDeveloperAccount,
4934
5630
  signature,
4935
5631
  signatureSession,
4936
5632
  signupEmailPassword,
4937
- startRecovery,
4938
5633
  switchChainV2,
4939
- syncAccount,
4940
5634
  testTrigger,
4941
5635
  thirdParty,
4942
5636
  thirdPartyV2,
@@ -4952,6 +5646,7 @@ export {
4952
5646
  updatePlayer,
4953
5647
  updatePolicy,
4954
5648
  updatePolicyRule,
5649
+ updatePolicyV2,
4955
5650
  verifyAuthToken,
4956
5651
  verifyEmail,
4957
5652
  verifyOAuthToken