@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.
- package/CHANGELOG.md +12 -0
- package/biome.json +2 -1
- package/dist/index.d.mts +4835 -437
- package/dist/index.d.ts +4835 -437
- package/dist/index.js +929 -124
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +813 -118
- package/dist/index.mjs.map +1 -1
- package/examples/README.md +28 -11
- package/examples/{policies → fee-sponsorship}/createPolicy.ts +2 -2
- package/examples/{policies → fee-sponsorship}/createPolicyRule.ts +3 -3
- package/examples/{policies → fee-sponsorship}/disableEnablePolicy.ts +4 -4
- package/examples/fee-sponsorship/getPolicy.ts +30 -0
- package/examples/fee-sponsorship/listPolicies.ts +17 -0
- package/examples/{policies → fee-sponsorship}/listPolicyRules.ts +4 -4
- package/examples/fee-sponsorship/updatePolicy.ts +29 -0
- package/examples/policies/createAccountPolicy.ts +73 -0
- package/examples/policies/createEvmPolicy.ts +149 -0
- package/examples/policies/createSolanaPolicy.ts +176 -0
- package/examples/policies/createTypedDataPolicy.ts +159 -0
- package/examples/policies/deletePolicy.ts +34 -0
- package/examples/policies/getPolicy.ts +24 -13
- package/examples/policies/listPolicies.ts +19 -2
- package/examples/policies/multiRulePolicy.ts +133 -0
- package/examples/policies/updatePolicy.ts +64 -16
- package/examples/policies/validatePolicy.ts +176 -0
- package/examples/transactions/createTransactionIntent.ts +2 -2
- package/examples/transactions/estimateGas.ts +2 -2
- package/examples/transactions/getTransactionIntent.ts +2 -2
- package/openapi.json +2352 -1142
- package/package.json +4 -3
- package/pnpm-workspace.yaml +1 -0
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
35
|
+
await openfort.feeSponsorship.rules.create({
|
|
36
36
|
type: "contract_functions",
|
|
37
37
|
functionName: "All functions",
|
|
38
38
|
wildcard: true,
|