@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
@@ -15,7 +15,7 @@ const account = await openfort.accounts.v1.create({
15
15
  });
16
16
 
17
17
  // Create a policy
18
- const policy = await openfort.policies.create({
18
+ const policy = await openfort.feeSponsorship.create({
19
19
  name: `TxPolicy-${Date.now()}`,
20
20
  chainId,
21
21
  strategy: {
@@ -32,7 +32,7 @@ const contract = await openfort.contracts.create({
32
32
  });
33
33
 
34
34
  // Create a policy rule to allow all account functions
35
- await openfort.policyRules.create({
35
+ await openfort.feeSponsorship.rules.create({
36
36
  type: "contract_functions",
37
37
  functionName: "All functions",
38
38
  wildcard: true,
@@ -15,7 +15,7 @@ const account = await openfort.accounts.v1.create({
15
15
  });
16
16
 
17
17
  // Create a policy
18
- const policy = await openfort.policies.create({
18
+ const policy = await openfort.feeSponsorship.create({
19
19
  name: `TxPolicy-${Date.now()}`,
20
20
  chainId,
21
21
  strategy: {
@@ -32,7 +32,7 @@ const contract = await openfort.contracts.create({
32
32
  });
33
33
 
34
34
  // Create a policy rule to allow all account functions
35
- await openfort.policyRules.create({
35
+ await openfort.feeSponsorship.rules.create({
36
36
  type: "contract_functions",
37
37
  functionName: "All functions",
38
38
  wildcard: true,