@openfort/openfort-node 0.7.6 → 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.
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 +971 -188
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +861 -183
  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 +2 -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.6";
377
+ var VERSION = "0.8.0";
378
378
  var PACKAGE = "@openfort/openfort-node";
379
379
 
380
380
  // src/openapi-client/openfortApiClient.ts
@@ -759,81 +759,6 @@ var disableAccount = (id, options) => {
759
759
  options
760
760
  );
761
761
  };
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
762
 
838
763
  // src/openapi-client/generated/accs-v2/accs-v2.ts
839
764
  var getAccountsV2 = (params, options) => {
@@ -2268,7 +2193,11 @@ var APITopic = {
2268
2193
  balanceproject: "balance.project",
2269
2194
  balancecontract: "balance.contract",
2270
2195
  balancedev_account: "balance.dev_account",
2271
- test: "test"
2196
+ test: "test",
2197
+ usercreated: "user.created",
2198
+ userupdated: "user.updated",
2199
+ userdeleted: "user.deleted",
2200
+ accountcreated: "account.created"
2272
2201
  };
2273
2202
  var APITriggerType = {
2274
2203
  webhook: "webhook",
@@ -2429,6 +2358,285 @@ var PregenerateUserRequestV2ChainType = {
2429
2358
  EVM: "EVM",
2430
2359
  SVM: "SVM"
2431
2360
  };
2361
+ var PolicyV2Scope = {
2362
+ project: "project",
2363
+ account: "account"
2364
+ };
2365
+ var PolicyV2Action = {
2366
+ accept: "accept",
2367
+ reject: "reject"
2368
+ };
2369
+ var EvmCriteriaTypeEVMADDRESS = {
2370
+ evmAddress: "evmAddress"
2371
+ };
2372
+ var CriteriaOperatorIN = {
2373
+ in: "in"
2374
+ };
2375
+ var CriteriaOperatorNOTIN = {
2376
+ not_in: "not in"
2377
+ };
2378
+ var EvmCriteriaType = {
2379
+ evmAddress: "evmAddress",
2380
+ ethValue: "ethValue",
2381
+ evmNetwork: "evmNetwork",
2382
+ evmMessage: "evmMessage",
2383
+ evmData: "evmData",
2384
+ evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract",
2385
+ evmTypedDataField: "evmTypedDataField",
2386
+ netUSDChange: "netUSDChange"
2387
+ };
2388
+ var SolanaCriteriaType = {
2389
+ solAddress: "solAddress",
2390
+ solValue: "solValue",
2391
+ splAddress: "splAddress",
2392
+ splValue: "splValue",
2393
+ mintAddress: "mintAddress",
2394
+ solData: "solData",
2395
+ programId: "programId",
2396
+ solNetwork: "solNetwork",
2397
+ solMessage: "solMessage"
2398
+ };
2399
+ var CriteriaType = { ...EvmCriteriaType, ...SolanaCriteriaType };
2400
+ var CriteriaOperator = {
2401
+ in: "in",
2402
+ not_in: "not in",
2403
+ "<": "<",
2404
+ "<=": "<=",
2405
+ ">": ">",
2406
+ ">=": ">=",
2407
+ "==": "==",
2408
+ match: "match"
2409
+ };
2410
+ var EvmAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2411
+ var EvmCriteriaTypeETHVALUE = {
2412
+ ethValue: "ethValue"
2413
+ };
2414
+ var CriteriaOperatorLESSTHANOREQUAL = {
2415
+ "<=": "<="
2416
+ };
2417
+ var CriteriaOperatorGREATERTHANOREQUAL = {
2418
+ ">=": ">="
2419
+ };
2420
+ var CriteriaOperatorLESSTHAN = {
2421
+ "<": "<"
2422
+ };
2423
+ var CriteriaOperatorGREATERTHAN = {
2424
+ ">": ">"
2425
+ };
2426
+ var EthValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL, ...CriteriaOperatorLESSTHAN, ...CriteriaOperatorGREATERTHAN };
2427
+ var EvmCriteriaTypeEVMNETWORK = {
2428
+ evmNetwork: "evmNetwork"
2429
+ };
2430
+ var EvmNetworkCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2431
+ var EvmCriteriaTypeEVMMESSAGE = {
2432
+ evmMessage: "evmMessage"
2433
+ };
2434
+ var CriteriaOperatorMATCH = {
2435
+ match: "match"
2436
+ };
2437
+ var EvmCriteriaTypeEVMDATA = {
2438
+ evmData: "evmData"
2439
+ };
2440
+ var EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT = {
2441
+ evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract"
2442
+ };
2443
+ var EvmTypedDataVerifyingContractCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2444
+ var EvmCriteriaTypeEVMTYPEDDATAFIELD = {
2445
+ evmTypedDataField: "evmTypedDataField"
2446
+ };
2447
+ var EvmTypedDataFieldCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorMATCH };
2448
+ var EvmCriteriaTypeNETUSDCHANGE = {
2449
+ netUSDChange: "netUSDChange"
2450
+ };
2451
+ var NetUSDChangeCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
2452
+ var SolanaCriteriaTypeSOLADDRESS = {
2453
+ solAddress: "solAddress"
2454
+ };
2455
+ var SolAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2456
+ var SolanaCriteriaTypeSOLVALUE = {
2457
+ solValue: "solValue"
2458
+ };
2459
+ var SolValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
2460
+ var SolanaCriteriaTypeSPLADDRESS = {
2461
+ splAddress: "splAddress"
2462
+ };
2463
+ var SplAddressCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2464
+ var SolanaCriteriaTypeSPLVALUE = {
2465
+ splValue: "splValue"
2466
+ };
2467
+ var SplValueCriterionOperator = { ...CriteriaOperatorLESSTHANOREQUAL, ...CriteriaOperatorGREATERTHANOREQUAL };
2468
+ var SolanaCriteriaTypeMINTADDRESS = {
2469
+ mintAddress: "mintAddress"
2470
+ };
2471
+ var CriteriaOperatorEQUAL = {
2472
+ "==": "=="
2473
+ };
2474
+ var MintAddressCriterionOperator = { ...CriteriaOperatorEQUAL, ...CriteriaOperatorIN };
2475
+ var SolanaCriteriaTypeSOLDATA = {
2476
+ solData: "solData"
2477
+ };
2478
+ var SolanaCriteriaTypePROGRAMID = {
2479
+ programId: "programId"
2480
+ };
2481
+ var ProgramIdCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2482
+ var SolanaCriteriaTypeSOLNETWORK = {
2483
+ solNetwork: "solNetwork"
2484
+ };
2485
+ var SolNetworkCriterionOperator = { ...CriteriaOperatorIN, ...CriteriaOperatorNOTIN };
2486
+ var SolanaCriteriaTypeSOLMESSAGE = {
2487
+ solMessage: "solMessage"
2488
+ };
2489
+ var EntityTypePOLICYV2RULE = {
2490
+ policyV2Rule: "policyV2Rule"
2491
+ };
2492
+ var EntityTypePOLICYV2 = {
2493
+ policyV2: "policyV2"
2494
+ };
2495
+ var PolicyV2ListQueriesScope = {
2496
+ project: "project",
2497
+ account: "account"
2498
+ };
2499
+ var EvmAddressCriterionRequestType = {
2500
+ evmAddress: "evmAddress"
2501
+ };
2502
+ var EvmAddressCriterionRequestOperator = {
2503
+ in: "in",
2504
+ not_in: "not in"
2505
+ };
2506
+ var EthValueCriterionRequestType = {
2507
+ ethValue: "ethValue"
2508
+ };
2509
+ var EthValueCriterionRequestOperator = {
2510
+ "<=": "<=",
2511
+ ">=": ">=",
2512
+ "<": "<",
2513
+ ">": ">"
2514
+ };
2515
+ var EvmNetworkCriterionRequestType = {
2516
+ evmNetwork: "evmNetwork"
2517
+ };
2518
+ var EvmNetworkCriterionRequestOperator = {
2519
+ in: "in",
2520
+ not_in: "not in"
2521
+ };
2522
+ var EvmMessageCriterionRequestType = {
2523
+ evmMessage: "evmMessage"
2524
+ };
2525
+ var EvmMessageCriterionRequestOperator = {
2526
+ match: "match"
2527
+ };
2528
+ var EvmDataCriterionRequestType = {
2529
+ evmData: "evmData"
2530
+ };
2531
+ var EvmDataCriterionRequestOperator = {
2532
+ in: "in",
2533
+ not_in: "not in",
2534
+ "<": "<",
2535
+ "<=": "<=",
2536
+ ">": ">",
2537
+ ">=": ">=",
2538
+ "==": "==",
2539
+ match: "match"
2540
+ };
2541
+ var EvmTypedDataVerifyingContractCriterionRequestType = {
2542
+ evmTypedDataVerifyingContract: "evmTypedDataVerifyingContract"
2543
+ };
2544
+ var EvmTypedDataVerifyingContractCriterionRequestOperator = {
2545
+ in: "in",
2546
+ not_in: "not in"
2547
+ };
2548
+ var EvmTypedDataFieldCriterionRequestType = {
2549
+ evmTypedDataField: "evmTypedDataField"
2550
+ };
2551
+ var EvmTypedDataFieldCriterionRequestOperator = {
2552
+ in: "in",
2553
+ "<=": "<=",
2554
+ match: "match"
2555
+ };
2556
+ var NetUSDChangeCriterionRequestType = {
2557
+ netUSDChange: "netUSDChange"
2558
+ };
2559
+ var NetUSDChangeCriterionRequestOperator = {
2560
+ "<=": "<=",
2561
+ ">=": ">="
2562
+ };
2563
+ var SolAddressCriterionRequestType = {
2564
+ solAddress: "solAddress"
2565
+ };
2566
+ var SolAddressCriterionRequestOperator = {
2567
+ in: "in",
2568
+ not_in: "not in"
2569
+ };
2570
+ var SolValueCriterionRequestType = {
2571
+ solValue: "solValue"
2572
+ };
2573
+ var SolValueCriterionRequestOperator = {
2574
+ "<=": "<=",
2575
+ ">=": ">="
2576
+ };
2577
+ var SplAddressCriterionRequestType = {
2578
+ splAddress: "splAddress"
2579
+ };
2580
+ var SplAddressCriterionRequestOperator = {
2581
+ in: "in",
2582
+ not_in: "not in"
2583
+ };
2584
+ var SplValueCriterionRequestType = {
2585
+ splValue: "splValue"
2586
+ };
2587
+ var SplValueCriterionRequestOperator = {
2588
+ "<=": "<=",
2589
+ ">=": ">="
2590
+ };
2591
+ var MintAddressCriterionRequestType = {
2592
+ mintAddress: "mintAddress"
2593
+ };
2594
+ var MintAddressCriterionRequestOperator = {
2595
+ "==": "==",
2596
+ in: "in"
2597
+ };
2598
+ var SolDataCriterionRequestType = {
2599
+ solData: "solData"
2600
+ };
2601
+ var SolDataCriterionRequestOperator = {
2602
+ in: "in",
2603
+ not_in: "not in",
2604
+ "<=": "<=",
2605
+ ">=": ">=",
2606
+ "==": "==",
2607
+ match: "match"
2608
+ };
2609
+ var ProgramIdCriterionRequestType = {
2610
+ programId: "programId"
2611
+ };
2612
+ var ProgramIdCriterionRequestOperator = {
2613
+ in: "in",
2614
+ not_in: "not in"
2615
+ };
2616
+ var SolNetworkCriterionRequestType = {
2617
+ solNetwork: "solNetwork"
2618
+ };
2619
+ var SolNetworkCriterionRequestOperator = {
2620
+ in: "in",
2621
+ not_in: "not in"
2622
+ };
2623
+ var SolMessageCriterionRequestType = {
2624
+ solMessage: "solMessage"
2625
+ };
2626
+ var SolMessageCriterionRequestOperator = {
2627
+ match: "match"
2628
+ };
2629
+ var CreatePolicyV2RuleRequestAction = {
2630
+ accept: "accept",
2631
+ reject: "reject"
2632
+ };
2633
+ var CreatePolicyV2RequestScope = {
2634
+ project: "project",
2635
+ account: "account"
2636
+ };
2637
+ var EvaluatePolicyV2ResponseObject = {
2638
+ policy_evaluation: "policy_evaluation"
2639
+ };
2432
2640
  var CreateEmbeddedRequestAccountType = {
2433
2641
  Externally_Owned_Account: "Externally Owned Account",
2434
2642
  Smart_Account: "Smart Account",
@@ -2710,6 +2918,10 @@ var AuthenticationType = {
2710
2918
  var GetPolicyRulesExpandItem = {
2711
2919
  contract: "contract"
2712
2920
  };
2921
+ var ListPoliciesScope = {
2922
+ project: "project",
2923
+ account: "account"
2924
+ };
2713
2925
  var ListBackendWalletsChainType = {
2714
2926
  EVM: "EVM",
2715
2927
  SVM: "SVM"
@@ -2965,6 +3177,67 @@ var createPolicyWithdrawal = (id, withdrawalPolicyRequest, options) => {
2965
3177
  options
2966
3178
  );
2967
3179
  };
3180
+ var listPolicies = (params, options) => {
3181
+ return openfortApiClient(
3182
+ {
3183
+ url: `/v2/policies`,
3184
+ method: "GET",
3185
+ params
3186
+ },
3187
+ options
3188
+ );
3189
+ };
3190
+ var createPolicyV2 = (createPolicyV2Request, options) => {
3191
+ return openfortApiClient(
3192
+ {
3193
+ url: `/v2/policies`,
3194
+ method: "POST",
3195
+ headers: { "Content-Type": "application/json" },
3196
+ data: createPolicyV2Request
3197
+ },
3198
+ options
3199
+ );
3200
+ };
3201
+ var getPolicyV2 = (policyId, options) => {
3202
+ return openfortApiClient(
3203
+ {
3204
+ url: `/v2/policies/${policyId}`,
3205
+ method: "GET"
3206
+ },
3207
+ options
3208
+ );
3209
+ };
3210
+ var updatePolicyV2 = (policyId, updatePolicyV2Request, options) => {
3211
+ return openfortApiClient(
3212
+ {
3213
+ url: `/v2/policies/${policyId}`,
3214
+ method: "POST",
3215
+ headers: { "Content-Type": "application/json" },
3216
+ data: updatePolicyV2Request
3217
+ },
3218
+ options
3219
+ );
3220
+ };
3221
+ var deletePolicyV2 = (policyId, options) => {
3222
+ return openfortApiClient(
3223
+ {
3224
+ url: `/v2/policies/${policyId}`,
3225
+ method: "DELETE"
3226
+ },
3227
+ options
3228
+ );
3229
+ };
3230
+ var evaluatePolicyV2 = (evaluatePolicyV2Request, options) => {
3231
+ return openfortApiClient(
3232
+ {
3233
+ url: `/v2/policies/evaluate`,
3234
+ method: "POST",
3235
+ headers: { "Content-Type": "application/json" },
3236
+ data: evaluatePolicyV2Request
3237
+ },
3238
+ options
3239
+ );
3240
+ };
2968
3241
 
2969
3242
  // src/openapi-client/generated/policy-rules/policy-rules.ts
2970
3243
  var getPolicyRules = (params, options) => {
@@ -3475,60 +3748,18 @@ var decryptExportedPrivateKey = (encryptedPrivateKeyBase64, privateKeyPem) => {
3475
3748
  return decrypted.toString("hex");
3476
3749
  };
3477
3750
 
3478
- // src/wallets/evm/actions/signHash.ts
3479
- async function signHash(options) {
3480
- const { accountId, hash } = options;
3481
- const response = await sign(accountId, { data: hash });
3482
- return {
3483
- signature: response.signature
3484
- };
3485
- }
3486
-
3487
- // src/wallets/evm/actions/signMessage.ts
3488
- import { hashMessage, toHex } from "viem";
3489
- async function signMessage(options) {
3490
- const { accountId, message } = options;
3491
- let messageStr;
3492
- if (typeof message === "string") {
3493
- messageStr = message;
3494
- } else if (message instanceof Uint8Array) {
3495
- messageStr = toHex(message);
3496
- } else if ("raw" in message) {
3497
- messageStr = typeof message.raw === "string" ? message.raw : toHex(message.raw);
3498
- } else {
3499
- throw new UserInputValidationError("Invalid message format");
3500
- }
3501
- const messageHash = hashMessage(messageStr);
3502
- const response = await sign(accountId, { data: messageHash });
3503
- return {
3504
- signature: response.signature
3505
- };
3506
- }
3507
-
3508
- // src/wallets/evm/actions/signTransaction.ts
3751
+ // src/wallets/evm/accounts/evmAccount.ts
3509
3752
  import {
3510
- keccak256,
3753
+ getTypesForEIP712Domain,
3754
+ hashMessage,
3755
+ hashTypedData,
3511
3756
  parseSignature,
3512
3757
  serializeTransaction
3513
3758
  } from "viem";
3514
- async function signTransaction(options) {
3515
- const { accountId, transaction } = options;
3516
- const serialized = serializeTransaction(transaction);
3517
- const response = await sign(accountId, { data: serialized });
3518
- const signature2 = parseSignature(response.signature);
3519
- const signedTransaction = serializeTransaction(transaction, signature2);
3520
- const transactionHash = keccak256(signedTransaction);
3521
- return {
3522
- signedTransaction,
3523
- transactionHash
3524
- };
3525
- }
3526
3759
 
3527
- // src/wallets/evm/actions/signTypedData.ts
3528
- import { hashTypedData } from "viem";
3529
- async function signTypedData(options) {
3530
- const { accountId, typedData } = options;
3531
- const hash = hashTypedData(typedData);
3760
+ // src/wallets/evm/actions/signHash.ts
3761
+ async function signHash(options) {
3762
+ const { accountId, hash } = options;
3532
3763
  const response = await sign(accountId, { data: hash });
3533
3764
  return {
3534
3765
  signature: response.signature
@@ -3550,27 +3781,44 @@ function toEvmAccount(data) {
3550
3781
  return result.signature;
3551
3782
  },
3552
3783
  async signMessage(parameters) {
3553
- const result = await signMessage({
3554
- address,
3555
- accountId: id,
3556
- message: parameters.message
3557
- });
3784
+ const { message } = parameters;
3785
+ if (typeof message === "string") {
3786
+ const hash2 = hashMessage(message);
3787
+ const result2 = await sign(id, { data: hash2 });
3788
+ return result2.signature;
3789
+ }
3790
+ const hash = hashMessage(message);
3791
+ const result = await sign(id, { data: hash });
3558
3792
  return result.signature;
3559
3793
  },
3560
3794
  async signTransaction(transaction) {
3561
- const result = await signTransaction({
3562
- address,
3563
- accountId: id,
3564
- transaction
3565
- });
3566
- return result.signedTransaction;
3795
+ const serialized = serializeTransaction(transaction);
3796
+ const response = await sign(id, { data: serialized });
3797
+ const signature2 = parseSignature(response.signature);
3798
+ const signedTransaction = serializeTransaction(
3799
+ transaction,
3800
+ signature2
3801
+ );
3802
+ return signedTransaction;
3567
3803
  },
3568
3804
  async signTypedData(parameters) {
3569
- const result = await signTypedData({
3570
- address,
3571
- accountId: id,
3572
- typedData: parameters
3573
- });
3805
+ const {
3806
+ domain = {},
3807
+ message,
3808
+ primaryType
3809
+ } = parameters;
3810
+ const types = {
3811
+ EIP712Domain: getTypesForEIP712Domain({ domain }),
3812
+ ...parameters.types
3813
+ };
3814
+ const openApiMessage = {
3815
+ domain,
3816
+ types,
3817
+ primaryType,
3818
+ message
3819
+ };
3820
+ const hash = hashTypedData(openApiMessage);
3821
+ const result = await sign(id, { data: hash });
3574
3822
  return result.signature;
3575
3823
  }
3576
3824
  };
@@ -3794,7 +4042,7 @@ EvmClient.type = "evmWallet";
3794
4042
  import bs58 from "bs58";
3795
4043
 
3796
4044
  // src/wallets/solana/actions/signMessage.ts
3797
- async function signMessage2(options) {
4045
+ async function signMessage(options) {
3798
4046
  const { accountId, message } = options;
3799
4047
  const messageBytes = Buffer.from(message, "utf-8");
3800
4048
  const messageHex = `0x${messageBytes.toString("hex")}`;
@@ -3805,7 +4053,7 @@ async function signMessage2(options) {
3805
4053
  }
3806
4054
 
3807
4055
  // src/wallets/solana/actions/signTransaction.ts
3808
- async function signTransaction2(options) {
4056
+ async function signTransaction(options) {
3809
4057
  const { accountId, transaction } = options;
3810
4058
  const txBytes = Buffer.from(transaction, "base64");
3811
4059
  const txHex = `0x${txBytes.toString("hex")}`;
@@ -3823,14 +4071,14 @@ function toSolanaAccount(data) {
3823
4071
  address,
3824
4072
  custody: "Developer",
3825
4073
  async signMessage(parameters) {
3826
- const result = await signMessage2({
4074
+ const result = await signMessage({
3827
4075
  accountId: id,
3828
4076
  message: parameters.message
3829
4077
  });
3830
4078
  return result.signature;
3831
4079
  },
3832
4080
  async signTransaction(parameters) {
3833
- const result = await signTransaction2({
4081
+ const result = await signTransaction({
3834
4082
  accountId: id,
3835
4083
  transaction: parameters.transaction
3836
4084
  });
@@ -4068,6 +4316,294 @@ SolanaClient.type = "solanaWallet";
4068
4316
 
4069
4317
  // src/index.ts
4070
4318
  import { ShieldAuthProvider as ShieldAuthProvider2 } from "@openfort/shield-js";
4319
+
4320
+ // src/policies/evmSchema.ts
4321
+ import { z } from "zod";
4322
+ var EthValueOperatorEnum = z.enum(["<=", ">=", "<", ">"]);
4323
+ var EvmAddressOperatorEnum = z.enum(["in", "not in"]);
4324
+ var EvmNetworkOperatorEnum = z.enum(["in", "not in"]);
4325
+ var EvmDataOperatorEnum = z.enum([
4326
+ "in",
4327
+ "not in",
4328
+ "<",
4329
+ "<=",
4330
+ ">",
4331
+ ">=",
4332
+ "==",
4333
+ "match"
4334
+ ]);
4335
+ var EvmTypedDataVerifyingContractOperatorEnum = z.enum([
4336
+ "in",
4337
+ "not in"
4338
+ ]);
4339
+ var EvmTypedDataFieldOperatorEnum = z.enum(["in", "<=", "match"]);
4340
+ var ActionEnum = z.enum(["reject", "accept"]);
4341
+ var EthValueCriterionSchema = z.object({
4342
+ type: z.literal("ethValue"),
4343
+ operator: EthValueOperatorEnum,
4344
+ /** Value in wei as a string. */
4345
+ ethValue: z.string().regex(/^[0-9]+$/)
4346
+ });
4347
+ var EvmAddressCriterionSchema = z.object({
4348
+ type: z.literal("evmAddress"),
4349
+ operator: EvmAddressOperatorEnum,
4350
+ /** List of EVM addresses (hex format with 0x prefix). */
4351
+ addresses: z.array(z.string().regex(/^0x[0-9a-fA-F]{40}$/))
4352
+ });
4353
+ var EvmNetworkCriterionSchema = z.object({
4354
+ type: z.literal("evmNetwork"),
4355
+ operator: EvmNetworkOperatorEnum,
4356
+ /** List of chain IDs. */
4357
+ chainIds: z.array(z.number().int().positive())
4358
+ });
4359
+ var EvmMessageCriterionSchema = z.object({
4360
+ type: z.literal("evmMessage"),
4361
+ operator: z.literal("match"),
4362
+ /** RE2 regex pattern to match against the message. */
4363
+ pattern: z.string().min(1)
4364
+ });
4365
+ var EvmDataCriterionSchema = z.object({
4366
+ type: z.literal("evmData"),
4367
+ operator: EvmDataOperatorEnum,
4368
+ /** Contract ABI as JSON string. */
4369
+ abi: z.string().min(1),
4370
+ /** Function name to match. */
4371
+ functionName: z.string().min(1),
4372
+ /** Argument constraints. */
4373
+ args: z.record(z.unknown()).optional()
4374
+ });
4375
+ var EvmTypedDataVerifyingContractCriterionSchema = z.object({
4376
+ type: z.literal("evmTypedDataVerifyingContract"),
4377
+ operator: EvmTypedDataVerifyingContractOperatorEnum,
4378
+ /** List of verifying contract addresses. */
4379
+ addresses: z.array(z.string().regex(/^0x[0-9a-fA-F]{40}$/))
4380
+ });
4381
+ var EvmTypedDataFieldCriterionSchema = z.object({
4382
+ type: z.literal("evmTypedDataField"),
4383
+ operator: EvmTypedDataFieldOperatorEnum,
4384
+ /** Dot-notation path to the field (e.g. "order.buyer"). */
4385
+ fieldPath: z.string().min(1),
4386
+ /** Values for "in" operator. */
4387
+ values: z.array(z.string()).optional(),
4388
+ /** Value for "<=" or "match" operators. */
4389
+ value: z.string().optional()
4390
+ });
4391
+ var SignEvmTransactionCriteriaSchema = z.array(
4392
+ z.discriminatedUnion("type", [
4393
+ EthValueCriterionSchema,
4394
+ EvmAddressCriterionSchema,
4395
+ EvmDataCriterionSchema
4396
+ ])
4397
+ ).max(10);
4398
+ var SendEvmTransactionCriteriaSchema = z.array(
4399
+ z.discriminatedUnion("type", [
4400
+ EthValueCriterionSchema,
4401
+ EvmAddressCriterionSchema,
4402
+ EvmNetworkCriterionSchema,
4403
+ EvmDataCriterionSchema
4404
+ ])
4405
+ ).max(10);
4406
+ var SignEvmMessageCriteriaSchema = z.array(z.discriminatedUnion("type", [EvmMessageCriterionSchema])).max(10);
4407
+ var SignEvmTypedDataCriteriaSchema = z.array(
4408
+ z.discriminatedUnion("type", [
4409
+ EvmTypedDataFieldCriterionSchema,
4410
+ EvmTypedDataVerifyingContractCriterionSchema
4411
+ ])
4412
+ ).max(10);
4413
+ var SignEvmTransactionRuleSchema = z.object({
4414
+ action: ActionEnum,
4415
+ operation: z.literal("signEvmTransaction"),
4416
+ criteria: SignEvmTransactionCriteriaSchema
4417
+ });
4418
+ var SendEvmTransactionRuleSchema = z.object({
4419
+ action: ActionEnum,
4420
+ operation: z.literal("sendEvmTransaction"),
4421
+ criteria: SendEvmTransactionCriteriaSchema
4422
+ });
4423
+ var SignEvmMessageRuleSchema = z.object({
4424
+ action: ActionEnum,
4425
+ operation: z.literal("signEvmMessage"),
4426
+ criteria: SignEvmMessageCriteriaSchema
4427
+ });
4428
+ var SignEvmTypedDataRuleSchema = z.object({
4429
+ action: ActionEnum,
4430
+ operation: z.literal("signEvmTypedData"),
4431
+ criteria: SignEvmTypedDataCriteriaSchema
4432
+ });
4433
+ var SignEvmHashRuleSchema = z.object({
4434
+ action: ActionEnum,
4435
+ operation: z.literal("signEvmHash")
4436
+ });
4437
+
4438
+ // src/policies/solanaSchema.ts
4439
+ import { z as z2 } from "zod";
4440
+ var SolAddressOperatorEnum = z2.enum(["in", "not in"]);
4441
+ var SolValueOperatorEnum = z2.enum(["<=", ">="]);
4442
+ var SplAddressOperatorEnum = z2.enum(["in", "not in"]);
4443
+ var SplValueOperatorEnum = z2.enum(["<=", ">="]);
4444
+ var MintAddressOperatorEnum = z2.enum(["==", "in"]);
4445
+ var SolDataOperatorEnum = z2.enum([
4446
+ "in",
4447
+ "not in",
4448
+ "<=",
4449
+ ">=",
4450
+ "==",
4451
+ "match"
4452
+ ]);
4453
+ var ProgramIdOperatorEnum = z2.enum(["in", "not in"]);
4454
+ var SolNetworkOperatorEnum = z2.enum(["in", "not in"]);
4455
+ var SolNetworkEnum = z2.enum(["mainnet-beta", "devnet", "testnet"]);
4456
+ var base58Address = z2.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/);
4457
+ var SolAddressCriterionSchema = z2.object({
4458
+ type: z2.literal("solAddress"),
4459
+ operator: SolAddressOperatorEnum,
4460
+ /** List of Solana addresses (Base58). */
4461
+ addresses: z2.array(base58Address)
4462
+ });
4463
+ var SolValueCriterionSchema = z2.object({
4464
+ type: z2.literal("solValue"),
4465
+ operator: SolValueOperatorEnum,
4466
+ /** Value in lamports as string. */
4467
+ value: z2.string().regex(/^[0-9]+$/)
4468
+ });
4469
+ var SplAddressCriterionSchema = z2.object({
4470
+ type: z2.literal("splAddress"),
4471
+ operator: SplAddressOperatorEnum,
4472
+ /** List of recipient addresses (Base58). */
4473
+ addresses: z2.array(base58Address)
4474
+ });
4475
+ var SplValueCriterionSchema = z2.object({
4476
+ type: z2.literal("splValue"),
4477
+ operator: SplValueOperatorEnum,
4478
+ /** Token amount as string. */
4479
+ value: z2.string().regex(/^[0-9]+$/)
4480
+ });
4481
+ var MintAddressCriterionSchema = z2.object({
4482
+ type: z2.literal("mintAddress"),
4483
+ operator: MintAddressOperatorEnum,
4484
+ /** List of mint addresses (Base58). */
4485
+ addresses: z2.array(base58Address)
4486
+ });
4487
+ var SolDataCriterionSchema = z2.object({
4488
+ type: z2.literal("solData"),
4489
+ operator: SolDataOperatorEnum,
4490
+ /** Anchor IDL JSON (v0.30+). */
4491
+ idl: z2.string().min(1),
4492
+ /** Instruction name. */
4493
+ instructionName: z2.string().min(1),
4494
+ /** Argument constraints. */
4495
+ args: z2.record(z2.unknown()).optional()
4496
+ });
4497
+ var ProgramIdCriterionSchema = z2.object({
4498
+ type: z2.literal("programId"),
4499
+ operator: ProgramIdOperatorEnum,
4500
+ /** List of program IDs (Base58). */
4501
+ programIds: z2.array(base58Address)
4502
+ });
4503
+ var SolNetworkCriterionSchema = z2.object({
4504
+ type: z2.literal("solNetwork"),
4505
+ operator: SolNetworkOperatorEnum,
4506
+ /** List of networks: "mainnet-beta", "devnet", "testnet". */
4507
+ networks: z2.array(SolNetworkEnum)
4508
+ });
4509
+ var SolMessageCriterionSchema = z2.object({
4510
+ type: z2.literal("solMessage"),
4511
+ operator: z2.literal("match"),
4512
+ /** RE2 regex pattern. */
4513
+ pattern: z2.string().min(1)
4514
+ });
4515
+ var SignSolTransactionCriteriaSchema = z2.array(
4516
+ z2.discriminatedUnion("type", [
4517
+ SolAddressCriterionSchema,
4518
+ SolValueCriterionSchema,
4519
+ SplAddressCriterionSchema,
4520
+ SplValueCriterionSchema,
4521
+ MintAddressCriterionSchema,
4522
+ SolDataCriterionSchema,
4523
+ ProgramIdCriterionSchema
4524
+ ])
4525
+ ).max(10);
4526
+ var SendSolTransactionCriteriaSchema = z2.array(
4527
+ z2.discriminatedUnion("type", [
4528
+ SolAddressCriterionSchema,
4529
+ SolValueCriterionSchema,
4530
+ SplAddressCriterionSchema,
4531
+ SplValueCriterionSchema,
4532
+ MintAddressCriterionSchema,
4533
+ SolDataCriterionSchema,
4534
+ ProgramIdCriterionSchema,
4535
+ SolNetworkCriterionSchema
4536
+ ])
4537
+ ).max(10);
4538
+ var SignSolMessageCriteriaSchema = z2.array(SolMessageCriterionSchema).max(10);
4539
+ var SignSolTransactionRuleSchema = z2.object({
4540
+ action: ActionEnum,
4541
+ operation: z2.literal("signSolTransaction"),
4542
+ criteria: SignSolTransactionCriteriaSchema
4543
+ });
4544
+ var SendSolTransactionRuleSchema = z2.object({
4545
+ action: ActionEnum,
4546
+ operation: z2.literal("sendSolTransaction"),
4547
+ criteria: SendSolTransactionCriteriaSchema
4548
+ });
4549
+ var SignSolMessageRuleSchema = z2.object({
4550
+ action: ActionEnum,
4551
+ operation: z2.literal("signSolMessage"),
4552
+ criteria: SignSolMessageCriteriaSchema
4553
+ });
4554
+
4555
+ // src/policies/types.ts
4556
+ import { z as z3 } from "zod";
4557
+ var PolicyScopeEnum = z3.enum(["project", "account"]);
4558
+ var RuleSchema = z3.discriminatedUnion("operation", [
4559
+ SignEvmTransactionRuleSchema,
4560
+ SendEvmTransactionRuleSchema,
4561
+ SignEvmMessageRuleSchema,
4562
+ SignEvmTypedDataRuleSchema,
4563
+ SignEvmHashRuleSchema,
4564
+ SignSolTransactionRuleSchema,
4565
+ SendSolTransactionRuleSchema,
4566
+ SignSolMessageRuleSchema
4567
+ ]);
4568
+ var CreatePolicyBodySchema = z3.object({
4569
+ /** The scope of the policy. 'project' applies to all accounts, 'account' applies to a specific account. */
4570
+ scope: PolicyScopeEnum,
4571
+ /** A description of what this policy does. */
4572
+ description: z3.string().optional(),
4573
+ /** The account ID for account-scoped policies (starts with acc_). Required when scope is 'account'. */
4574
+ accountId: z3.string().optional(),
4575
+ /** Whether the policy is enabled. */
4576
+ enabled: z3.boolean().optional(),
4577
+ /** Priority of the policy. Higher priority policies are evaluated first. */
4578
+ priority: z3.number().int().optional(),
4579
+ /** The rules that make up this policy. Maximum 10 rules per policy. */
4580
+ rules: z3.array(RuleSchema).min(1).max(10)
4581
+ });
4582
+ var UpdatePolicyBodySchema = z3.object({
4583
+ /** A description of what this policy does. */
4584
+ description: z3.string().optional(),
4585
+ /** Whether the policy is enabled. */
4586
+ enabled: z3.boolean().optional(),
4587
+ /** Priority of the policy. Higher priority policies are evaluated first. */
4588
+ priority: z3.number().int().optional(),
4589
+ /** The rules that make up this policy. If provided, replaces all existing rules. Maximum 10 rules. */
4590
+ rules: z3.array(RuleSchema).min(1).max(10).optional()
4591
+ });
4592
+
4593
+ // src/wallets/evm/actions/signMessage.ts
4594
+ import { hashMessage as hashMessage2, toHex } from "viem";
4595
+
4596
+ // src/wallets/evm/actions/signTransaction.ts
4597
+ import {
4598
+ keccak256,
4599
+ parseSignature as parseSignature2,
4600
+ serializeTransaction as serializeTransaction2
4601
+ } from "viem";
4602
+
4603
+ // src/wallets/evm/actions/signTypedData.ts
4604
+ import { hashTypedData as hashTypedData2 } from "viem";
4605
+
4606
+ // src/index.ts
4071
4607
  function isValidSecretKey(key) {
4072
4608
  return key.startsWith("sk_test_") || key.startsWith("sk_live_");
4073
4609
  }
@@ -4203,14 +4739,7 @@ var Openfort = class {
4203
4739
  v1: {
4204
4740
  list: getAccounts,
4205
4741
  create: createAccount,
4206
- get: getAccount,
4207
- requestTransferOwnership,
4208
- cancelTransferOwnership,
4209
- signPayload,
4210
- sync: syncAccount,
4211
- deploy: deployAccount,
4212
- startRecovery,
4213
- completeRecovery
4742
+ get: getAccount
4214
4743
  }
4215
4744
  };
4216
4745
  }
@@ -4219,6 +4748,7 @@ var Openfort = class {
4219
4748
  // ============================================
4220
4749
  /**
4221
4750
  * Player management endpoints
4751
+ * @deprecated
4222
4752
  */
4223
4753
  get players() {
4224
4754
  return {
@@ -4258,41 +4788,77 @@ var Openfort = class {
4258
4788
  // Policies API
4259
4789
  // ============================================
4260
4790
  /**
4261
- * Policy management endpoints
4791
+ * Policy management endpoints for controlling account operations.
4792
+ *
4793
+ * Policies define rules that govern what operations accounts can perform,
4794
+ * including transaction signing, message signing, and more.
4795
+ *
4796
+ * @example
4797
+ * ```typescript
4798
+ * // List all policies
4799
+ * const all = await openfort.policies.list();
4800
+ *
4801
+ * // Create a policy
4802
+ * const policy = await openfort.policies.create({
4803
+ * scope: 'project',
4804
+ * rules: [{ action: 'reject', operation: 'signEvmHash' }],
4805
+ * });
4806
+ *
4807
+ * // Evaluate whether an operation would be allowed
4808
+ * const result = await openfort.policies.evaluate({ operation: 'signEvmTransaction', accountId: 'acc_...' });
4809
+ * ```
4262
4810
  */
4263
4811
  get policies() {
4264
4812
  return {
4265
4813
  /** List policies */
4266
- list: getPolicies,
4814
+ list: listPolicies,
4267
4815
  /** Create a policy */
4268
- create: createPolicy,
4816
+ create: createPolicyV2,
4269
4817
  /** Get a policy by ID */
4270
- get: getPolicy,
4818
+ get: getPolicyV2,
4271
4819
  /** Update a policy */
4272
- update: updatePolicy,
4820
+ update: updatePolicyV2,
4273
4821
  /** Delete a policy */
4274
- delete: deletePolicy,
4275
- /** Disable a policy */
4276
- disable: disablePolicy,
4277
- /** Enable a policy */
4278
- enable: enablePolicy,
4279
- /** Get policy total gas usage */
4280
- getTotalGasUsage: getPolicyTotalGasUsage
4822
+ delete: deletePolicyV2,
4823
+ /** Evaluate an operation against policies */
4824
+ evaluate: evaluatePolicyV2
4281
4825
  };
4282
4826
  }
4827
+ // ============================================
4828
+ // Fee Sponsorship API
4829
+ // ============================================
4283
4830
  /**
4284
- * Policy rules management endpoints
4831
+ * Fee sponsorship (gas policy) management endpoints
4285
4832
  */
4286
- get policyRules() {
4833
+ get feeSponsorship() {
4287
4834
  return {
4288
- /** List policy rules */
4289
- list: getPolicyRules,
4290
- /** Create a policy rule */
4291
- create: createPolicyRule,
4292
- /** Update a policy rule */
4293
- update: updatePolicyRule,
4294
- /** Delete a policy rule */
4295
- delete: deletePolicyRule
4835
+ /** List fee sponsorship policies */
4836
+ list: getPolicies,
4837
+ /** Create a fee sponsorship policy */
4838
+ create: createPolicy,
4839
+ /** Get a fee sponsorship policy by ID */
4840
+ get: getPolicy,
4841
+ /** Update a fee sponsorship policy */
4842
+ update: updatePolicy,
4843
+ /** Delete a fee sponsorship policy */
4844
+ delete: deletePolicy,
4845
+ /** Disable a fee sponsorship policy */
4846
+ disable: disablePolicy,
4847
+ /** Enable a fee sponsorship policy */
4848
+ enable: enablePolicy,
4849
+ /** Get fee sponsorship policy total gas usage */
4850
+ getTotalGasUsage: getPolicyTotalGasUsage,
4851
+ /** Fee sponsorship policy rules */
4852
+ rules: {
4853
+ /** List policy rules */
4854
+ list: getPolicyRules,
4855
+ /** Create a policy rule */
4856
+ create: createPolicyRule,
4857
+ /** Update a policy rule */
4858
+ update: updatePolicyRule,
4859
+ /** Delete a policy rule */
4860
+ delete: deletePolicyRule
4861
+ }
4296
4862
  };
4297
4863
  }
4298
4864
  // ============================================
@@ -4340,6 +4906,7 @@ var Openfort = class {
4340
4906
  // ============================================
4341
4907
  /**
4342
4908
  * Settings / Developer account management endpoints
4909
+ * @deprecated
4343
4910
  */
4344
4911
  get settings() {
4345
4912
  return {
@@ -4681,6 +5248,19 @@ export {
4681
5248
  CreateBackendWalletResponseObject,
4682
5249
  CreateEmbeddedRequestAccountType,
4683
5250
  CreateEmbeddedRequestChainType,
5251
+ CreatePolicyBodySchema,
5252
+ CreatePolicyV2RequestScope,
5253
+ CreatePolicyV2RuleRequestAction,
5254
+ CriteriaOperator,
5255
+ CriteriaOperatorEQUAL,
5256
+ CriteriaOperatorGREATERTHAN,
5257
+ CriteriaOperatorGREATERTHANOREQUAL,
5258
+ CriteriaOperatorIN,
5259
+ CriteriaOperatorLESSTHAN,
5260
+ CriteriaOperatorLESSTHANOREQUAL,
5261
+ CriteriaOperatorMATCH,
5262
+ CriteriaOperatorNOTIN,
5263
+ CriteriaType,
4684
5264
  Currency,
4685
5265
  DeleteBackendWalletResponseObject,
4686
5266
  DeveloperAccountResponseExpandable,
@@ -4700,6 +5280,8 @@ export {
4700
5280
  EntityTypePLAYER,
4701
5281
  EntityTypePOLICY,
4702
5282
  EntityTypePOLICYRULE,
5283
+ EntityTypePOLICYV2,
5284
+ EntityTypePOLICYV2RULE,
4703
5285
  EntityTypePROJECT,
4704
5286
  EntityTypeREADCONTRACT,
4705
5287
  EntityTypeSESSION,
@@ -4711,7 +5293,43 @@ export {
4711
5293
  EntityTypeUSER,
4712
5294
  EntityTypeWALLET,
4713
5295
  ErrorTypeINVALIDREQUESTERROR,
5296
+ EthValueCriterionOperator,
5297
+ EthValueCriterionRequestOperator,
5298
+ EthValueCriterionRequestType,
5299
+ EthValueCriterionSchema,
5300
+ EvaluatePolicyV2ResponseObject,
5301
+ EvmAddressCriterionOperator,
5302
+ EvmAddressCriterionRequestOperator,
5303
+ EvmAddressCriterionRequestType,
5304
+ EvmAddressCriterionSchema,
4714
5305
  EvmClient,
5306
+ EvmCriteriaType,
5307
+ EvmCriteriaTypeETHVALUE,
5308
+ EvmCriteriaTypeEVMADDRESS,
5309
+ EvmCriteriaTypeEVMDATA,
5310
+ EvmCriteriaTypeEVMMESSAGE,
5311
+ EvmCriteriaTypeEVMNETWORK,
5312
+ EvmCriteriaTypeEVMTYPEDDATAFIELD,
5313
+ EvmCriteriaTypeEVMTYPEDDATAVERIFYINGCONTRACT,
5314
+ EvmCriteriaTypeNETUSDCHANGE,
5315
+ EvmDataCriterionRequestOperator,
5316
+ EvmDataCriterionRequestType,
5317
+ EvmDataCriterionSchema,
5318
+ EvmMessageCriterionRequestOperator,
5319
+ EvmMessageCriterionRequestType,
5320
+ EvmMessageCriterionSchema,
5321
+ EvmNetworkCriterionOperator,
5322
+ EvmNetworkCriterionRequestOperator,
5323
+ EvmNetworkCriterionRequestType,
5324
+ EvmNetworkCriterionSchema,
5325
+ EvmTypedDataFieldCriterionOperator,
5326
+ EvmTypedDataFieldCriterionRequestOperator,
5327
+ EvmTypedDataFieldCriterionRequestType,
5328
+ EvmTypedDataFieldCriterionSchema,
5329
+ EvmTypedDataVerifyingContractCriterionOperator,
5330
+ EvmTypedDataVerifyingContractCriterionRequestOperator,
5331
+ EvmTypedDataVerifyingContractCriterionRequestType,
5332
+ EvmTypedDataVerifyingContractCriterionSchema,
4715
5333
  ExportPrivateKeyResponseObject,
4716
5334
  GetAccountsV2AccountType,
4717
5335
  GetAccountsV2ChainType,
@@ -4728,9 +5346,17 @@ export {
4728
5346
  JsonRpcRequestJsonrpc,
4729
5347
  JsonRpcSuccessResponseAnyJsonrpc,
4730
5348
  ListBackendWalletsChainType,
5349
+ ListPoliciesScope,
5350
+ MintAddressCriterionOperator,
5351
+ MintAddressCriterionRequestOperator,
5352
+ MintAddressCriterionRequestType,
5353
+ MintAddressCriterionSchema,
4731
5354
  MissingAPIKeyError,
4732
5355
  MissingPublishableKeyError,
4733
5356
  MissingWalletSecretError,
5357
+ NetUSDChangeCriterionOperator,
5358
+ NetUSDChangeCriterionRequestOperator,
5359
+ NetUSDChangeCriterionRequestType,
4734
5360
  NetworkError,
4735
5361
  NextActionType,
4736
5362
  OAuthProvider,
@@ -4755,25 +5381,77 @@ export {
4755
5381
  PolicyRuleTypeACCOUNT,
4756
5382
  PolicyRuleTypeCONTRACT,
4757
5383
  PolicyRuleTypeRATELIMIT,
5384
+ PolicyV2Action,
5385
+ PolicyV2ListQueriesScope,
5386
+ PolicyV2Scope,
4758
5387
  PregenerateAccountResponseCustody,
4759
5388
  PregenerateUserRequestV2AccountType,
4760
5389
  PregenerateUserRequestV2ChainType,
4761
5390
  PrismaSortOrder,
4762
5391
  PrivateKeyPolicy,
5392
+ ProgramIdCriterionOperator,
5393
+ ProgramIdCriterionRequestOperator,
5394
+ ProgramIdCriterionRequestType,
5395
+ ProgramIdCriterionSchema,
4763
5396
  ProjectStatsRequestTimeFrame,
4764
5397
  RegisterWalletSecretResponseObject,
4765
5398
  ResponseTypeLIST,
4766
5399
  RevokeWalletSecretResponseObject,
4767
5400
  RotateWalletSecretResponseObject,
5401
+ RuleSchema,
5402
+ SendEvmTransactionRuleSchema,
5403
+ SendSolTransactionRuleSchema,
4768
5404
  SessionResponseExpandable,
4769
5405
  ShieldAuthProvider2 as ShieldAuthProvider,
5406
+ SignEvmHashRuleSchema,
5407
+ SignEvmMessageRuleSchema,
5408
+ SignEvmTransactionRuleSchema,
5409
+ SignEvmTypedDataRuleSchema,
4770
5410
  SignResponseObject,
5411
+ SignSolMessageRuleSchema,
5412
+ SignSolTransactionRuleSchema,
4771
5413
  SmsProviderMESSAGEBIRD,
4772
5414
  SmsProviderSMSAPI,
4773
5415
  SmsProviderTWILIO,
4774
5416
  SmsProviderTXTLOCAL,
4775
5417
  SmsProviderVONAGE,
5418
+ SolAddressCriterionOperator,
5419
+ SolAddressCriterionRequestOperator,
5420
+ SolAddressCriterionRequestType,
5421
+ SolAddressCriterionSchema,
5422
+ SolDataCriterionRequestOperator,
5423
+ SolDataCriterionRequestType,
5424
+ SolDataCriterionSchema,
5425
+ SolMessageCriterionRequestOperator,
5426
+ SolMessageCriterionRequestType,
5427
+ SolMessageCriterionSchema,
5428
+ SolNetworkCriterionOperator,
5429
+ SolNetworkCriterionRequestOperator,
5430
+ SolNetworkCriterionRequestType,
5431
+ SolNetworkCriterionSchema,
5432
+ SolValueCriterionOperator,
5433
+ SolValueCriterionRequestOperator,
5434
+ SolValueCriterionRequestType,
5435
+ SolValueCriterionSchema,
4776
5436
  SolanaClient,
5437
+ SolanaCriteriaType,
5438
+ SolanaCriteriaTypeMINTADDRESS,
5439
+ SolanaCriteriaTypePROGRAMID,
5440
+ SolanaCriteriaTypeSOLADDRESS,
5441
+ SolanaCriteriaTypeSOLDATA,
5442
+ SolanaCriteriaTypeSOLMESSAGE,
5443
+ SolanaCriteriaTypeSOLNETWORK,
5444
+ SolanaCriteriaTypeSOLVALUE,
5445
+ SolanaCriteriaTypeSPLADDRESS,
5446
+ SolanaCriteriaTypeSPLVALUE,
5447
+ SplAddressCriterionOperator,
5448
+ SplAddressCriterionRequestOperator,
5449
+ SplAddressCriterionRequestType,
5450
+ SplAddressCriterionSchema,
5451
+ SplValueCriterionOperator,
5452
+ SplValueCriterionRequestOperator,
5453
+ SplValueCriterionRequestType,
5454
+ SplValueCriterionSchema,
4777
5455
  SponsorSchema,
4778
5456
  SponsorSchemaCHARGECUSTOMTOKENS,
4779
5457
  SponsorSchemaFIXEDRATE,
@@ -4795,6 +5473,7 @@ export {
4795
5473
  TransactionIntentResponseExpandable,
4796
5474
  TransactionStatus,
4797
5475
  UnknownError,
5476
+ UpdatePolicyBodySchema,
4798
5477
  UserInputValidationError,
4799
5478
  UserProjectCreateRequestRole,
4800
5479
  UserProjectRole,
@@ -4808,8 +5487,6 @@ export {
4808
5487
  authorize,
4809
5488
  callbackOAuth,
4810
5489
  cancelTransferAccountOwnership,
4811
- cancelTransferOwnership,
4812
- completeRecovery,
4813
5490
  configure,
4814
5491
  create,
4815
5492
  createAccount,
@@ -4826,6 +5503,7 @@ export {
4826
5503
  createPlayer,
4827
5504
  createPolicy,
4828
5505
  createPolicyRule,
5506
+ createPolicyV2,
4829
5507
  createPolicyWithdrawal,
4830
5508
  createSession,
4831
5509
  createSubscription,
@@ -4844,16 +5522,17 @@ export {
4844
5522
  deletePlayer,
4845
5523
  deletePolicy,
4846
5524
  deletePolicyRule,
5525
+ deletePolicyV2,
4847
5526
  deleteSubscription,
4848
5527
  deleteTrigger,
4849
5528
  deleteUser,
4850
- deployAccount,
4851
5529
  deprecatedCallbackOAuth,
4852
5530
  disableAccount,
4853
5531
  disablePolicy,
4854
5532
  enablePolicy,
4855
5533
  encryptForImport,
4856
5534
  estimateTransactionIntentCost,
5535
+ evaluatePolicyV2,
4857
5536
  exportPrivateKey,
4858
5537
  generateRSAKeyPair,
4859
5538
  getAccount,
@@ -4886,6 +5565,7 @@ export {
4886
5565
  getPolicyReportTransactionIntents,
4887
5566
  getPolicyRules,
4888
5567
  getPolicyTotalGasUsage,
5568
+ getPolicyV2,
4889
5569
  getProjectLogs,
4890
5570
  getSession,
4891
5571
  getSignerIdByAddress,
@@ -4915,6 +5595,7 @@ export {
4915
5595
  listForwarderContracts,
4916
5596
  listOAuthConfig,
4917
5597
  listPaymasters,
5598
+ listPolicies,
4918
5599
  listSubscriptionLogs,
4919
5600
  loginEmailPassword,
4920
5601
  loginOIDC,
@@ -4933,20 +5614,16 @@ export {
4933
5614
  requestEmailVerification,
4934
5615
  requestResetPassword,
4935
5616
  requestTransferAccountOwnership,
4936
- requestTransferOwnership,
4937
5617
  resetPassword,
4938
5618
  revokeSession,
4939
5619
  revokeWalletSecret,
4940
5620
  rotateWalletSecret,
4941
5621
  sign,
4942
- signPayload,
4943
5622
  signPayloadDeveloperAccount,
4944
5623
  signature,
4945
5624
  signatureSession,
4946
5625
  signupEmailPassword,
4947
- startRecovery,
4948
5626
  switchChainV2,
4949
- syncAccount,
4950
5627
  testTrigger,
4951
5628
  thirdParty,
4952
5629
  thirdPartyV2,
@@ -4962,6 +5639,7 @@ export {
4962
5639
  updatePlayer,
4963
5640
  updatePolicy,
4964
5641
  updatePolicyRule,
5642
+ updatePolicyV2,
4965
5643
  verifyAuthToken,
4966
5644
  verifyEmail,
4967
5645
  verifyOAuthToken