@lit-protocol/vincent-ability-sdk 2.3.0 → 2.3.4
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/README.md +3 -3
- package/dist/CHANGELOG.md +16 -0
- package/dist/README.md +3 -3
- package/dist/package.json +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/abilityHelpers/bigint-replace.d.ts +8 -0
- package/dist/src/lib/abilityHelpers/bigint-replace.d.ts.map +1 -0
- package/dist/src/lib/abilityHelpers/bigint-replace.js +14 -0
- package/dist/src/lib/abilityHelpers/bigint-replace.js.map +1 -0
- package/dist/src/lib/abilityHelpers/erc20-abi.d.ts +2 -0
- package/dist/src/lib/abilityHelpers/erc20-abi.d.ts.map +1 -0
- package/dist/src/lib/abilityHelpers/erc20-abi.js +122 -0
- package/dist/src/lib/abilityHelpers/erc20-abi.js.map +1 -0
- package/dist/src/lib/abilityHelpers/index.d.ts +2 -0
- package/dist/src/lib/abilityHelpers/index.d.ts.map +1 -1
- package/dist/src/lib/abilityHelpers/index.js +5 -1
- package/dist/src/lib/abilityHelpers/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Run `nx build ability-sdk` to build the library.
|
|
|
12
12
|
|
|
13
13
|
This library provides a type-safe lifecycle system for defining and composing **policies** and **abilities**, with strong TypeScript inference support throughout.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Core Concepts
|
|
16
16
|
|
|
17
17
|
- **Policies** encapsulate decision logic (precheck, evaluate, commit) and define their input/output schemas.
|
|
18
18
|
- **Abilities** orchestrate multiple policies and expose `precheck` and `execute` lifecycle methods.
|
|
@@ -21,7 +21,7 @@ This library provides a type-safe lifecycle system for defining and composing **
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
###
|
|
24
|
+
### Calling `commit()` on a Policy from within a Ability
|
|
25
25
|
|
|
26
26
|
Policies can define a `commit()` lifecycle method to finalize changes once an ability executes successfully. These `commit()` functions are injected automatically into the `allowedPolicies` object of the `AbilityContext`.
|
|
27
27
|
|
|
@@ -208,6 +208,6 @@ export const myTokenSwapAbility = createVincentAbility({
|
|
|
208
208
|
});
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
##
|
|
211
|
+
## Tip
|
|
212
212
|
|
|
213
213
|
Ability and policy authors should export the result of `createVincentPolicy()` / `createVincentAbility()`
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 2.3.1 (2025-10-08)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated contracts-sdk to 2.0.0
|
|
6
|
+
|
|
7
|
+
## 2.3.0 (2025-10-06)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- Export new methods: sponsoredGasContractCall and sponsoredGasRawTransaction to allow for Alchemy gas sponsorship of broadcast transaction from a Vincent Ability ([39b5e217](https://github.com/LIT-Protocol/Vincent/commit/39b5e217))
|
|
12
|
+
|
|
13
|
+
### ❤️ Thank You
|
|
14
|
+
|
|
15
|
+
- Wyatt Barnes @spacesailor24
|
|
16
|
+
|
|
1
17
|
## 2.2.0 (2025-09-25)
|
|
2
18
|
|
|
3
19
|
### 🚀 Features
|
package/dist/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Run `nx build ability-sdk` to build the library.
|
|
|
12
12
|
|
|
13
13
|
This library provides a type-safe lifecycle system for defining and composing **policies** and **abilities**, with strong TypeScript inference support throughout.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Core Concepts
|
|
16
16
|
|
|
17
17
|
- **Policies** encapsulate decision logic (precheck, evaluate, commit) and define their input/output schemas.
|
|
18
18
|
- **Abilities** orchestrate multiple policies and expose `precheck` and `execute` lifecycle methods.
|
|
@@ -21,7 +21,7 @@ This library provides a type-safe lifecycle system for defining and composing **
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
###
|
|
24
|
+
### Calling `commit()` on a Policy from within a Ability
|
|
25
25
|
|
|
26
26
|
Policies can define a `commit()` lifecycle method to finalize changes once an ability executes successfully. These `commit()` functions are injected automatically into the `allowedPolicies` object of the `AbilityContext`.
|
|
27
27
|
|
|
@@ -208,6 +208,6 @@ export const myTokenSwapAbility = createVincentAbility({
|
|
|
208
208
|
});
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
##
|
|
211
|
+
## Tip
|
|
212
212
|
|
|
213
213
|
Ability and policy authors should export the result of `createVincentPolicy()` / `createVincentAbility()`
|
package/dist/package.json
CHANGED
package/dist/src/index.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export type { PolicyConfigLifecycleFunction, PolicyConfigCommitFunction, } from
|
|
|
12
12
|
export type { PolicyContext } from './lib/policyCore/policyConfig/context/types';
|
|
13
13
|
export type { VincentAbilityPolicy, BaseContext, PolicyEvaluationResultContext, VincentAbility, AbilityConsumerContext, PolicyConsumerContext, SchemaValidationError, } from './lib/types';
|
|
14
14
|
export type { BaseAbilityContext } from './lib/abilityCore/abilityConfig/context/types';
|
|
15
|
-
export { populateTransaction, sponsoredGasRawTransaction, sponsoredGasContractCall, } from './lib/abilityHelpers';
|
|
15
|
+
export { populateTransaction, sponsoredGasRawTransaction, sponsoredGasContractCall, ERC20_ABI, bigIntReplacer, } from './lib/abilityHelpers';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjG,OA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AAiD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AAEpG,YAAY,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,YAAY,EACV,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAEjF,YAAY,EACV,oBAAoB,EACpB,WAAW,EACX,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,SAAS,EACT,cAAc,GACf,MAAM,sBAAsB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sponsoredGasContractCall = exports.sponsoredGasRawTransaction = exports.populateTransaction = exports.supportedPoliciesForAbility = exports.asBundledVincentPolicy = exports.asBundledVincentAbility = exports.vincentAbilityHandler = exports.vincentPolicyHandler = exports.VINCENT_TOOL_API_VERSION = exports.createVincentAbility = exports.createVincentAbilityPolicy = exports.createVincentPolicy = void 0;
|
|
3
|
+
exports.bigIntReplacer = exports.ERC20_ABI = exports.sponsoredGasContractCall = exports.sponsoredGasRawTransaction = exports.populateTransaction = exports.supportedPoliciesForAbility = exports.asBundledVincentPolicy = exports.asBundledVincentAbility = exports.vincentAbilityHandler = exports.vincentPolicyHandler = exports.VINCENT_TOOL_API_VERSION = exports.createVincentAbility = exports.createVincentAbilityPolicy = exports.createVincentPolicy = void 0;
|
|
4
4
|
var vincentPolicy_1 = require("./lib/policyCore/vincentPolicy");
|
|
5
5
|
Object.defineProperty(exports, "createVincentPolicy", { enumerable: true, get: function () { return vincentPolicy_1.createVincentPolicy; } });
|
|
6
6
|
Object.defineProperty(exports, "createVincentAbilityPolicy", { enumerable: true, get: function () { return vincentPolicy_1.createVincentAbilityPolicy; } });
|
|
@@ -22,4 +22,6 @@ var abilityHelpers_1 = require("./lib/abilityHelpers");
|
|
|
22
22
|
Object.defineProperty(exports, "populateTransaction", { enumerable: true, get: function () { return abilityHelpers_1.populateTransaction; } });
|
|
23
23
|
Object.defineProperty(exports, "sponsoredGasRawTransaction", { enumerable: true, get: function () { return abilityHelpers_1.sponsoredGasRawTransaction; } });
|
|
24
24
|
Object.defineProperty(exports, "sponsoredGasContractCall", { enumerable: true, get: function () { return abilityHelpers_1.sponsoredGasContractCall; } });
|
|
25
|
+
Object.defineProperty(exports, "ERC20_ABI", { enumerable: true, get: function () { return abilityHelpers_1.ERC20_ABI; } });
|
|
26
|
+
Object.defineProperty(exports, "bigIntReplacer", { enumerable: true, get: function () { return abilityHelpers_1.bigIntReplacer; } });
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,gEAAiG;AAAxF,oHAAA,mBAAmB,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AACxD,mEAAwE;AAA/D,sHAAA,oBAAoB,OAAA;AAC7B,6CAA2D;AAAlD,qHAAA,wBAAwB,OAAA;AAEjC,4EAA2E;AAAlE,4HAAA,oBAAoB,OAAA;AAC7B,8EAA6E;AAApE,8HAAA,qBAAqB,OAAA;AAE9B,kFAA0F;AAAjF,yHAAA,uBAAuB,OAAA;AAChC,8EAAsF;AAA7E,uHAAA,sBAAsB,OAAA;AAC/B,qGAAoG;AAA3F,0IAAA,2BAA2B,OAAA;AAsBpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,gEAAiG;AAAxF,oHAAA,mBAAmB,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AACxD,mEAAwE;AAA/D,sHAAA,oBAAoB,OAAA;AAC7B,6CAA2D;AAAlD,qHAAA,wBAAwB,OAAA;AAEjC,4EAA2E;AAAlE,4HAAA,oBAAoB,OAAA;AAC7B,8EAA6E;AAApE,8HAAA,qBAAqB,OAAA;AAE9B,kFAA0F;AAAjF,yHAAA,uBAAuB,OAAA;AAChC,8EAAsF;AAA7E,uHAAA,sBAAsB,OAAA;AAC/B,qGAAoG;AAA3F,0IAAA,2BAA2B,OAAA;AAsBpC,uDAM8B;AAL5B,qHAAA,mBAAmB,OAAA;AACnB,4HAAA,0BAA0B,OAAA;AAC1B,0HAAA,wBAAwB,OAAA;AACxB,2GAAA,SAAS,OAAA;AACT,gHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replace bigint values with strings in JSON.stringify
|
|
3
|
+
* @param key - The key of the value
|
|
4
|
+
* @param value - The value to replace
|
|
5
|
+
* @returns The replaced value
|
|
6
|
+
*/
|
|
7
|
+
export declare const bigIntReplacer: (key: string, value: unknown) => unknown;
|
|
8
|
+
//# sourceMappingURL=bigint-replace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigint-replace.d.ts","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/bigint-replace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,EAAE,OAAO,OAAO,KAAG,OAE5D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigIntReplacer = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Replace bigint values with strings in JSON.stringify
|
|
6
|
+
* @param key - The key of the value
|
|
7
|
+
* @param value - The value to replace
|
|
8
|
+
* @returns The replaced value
|
|
9
|
+
*/
|
|
10
|
+
const bigIntReplacer = (key, value) => {
|
|
11
|
+
return typeof value === 'bigint' ? value.toString() : value;
|
|
12
|
+
};
|
|
13
|
+
exports.bigIntReplacer = bigIntReplacer;
|
|
14
|
+
//# sourceMappingURL=bigint-replace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigint-replace.js","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/bigint-replace.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,KAAc,EAAW,EAAE;IACrE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC9D,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc20-abi.d.ts","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/erc20-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,EAAE,GAAG,EAqH1B,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ERC20_ABI = void 0;
|
|
4
|
+
exports.ERC20_ABI = [
|
|
5
|
+
{
|
|
6
|
+
inputs: [],
|
|
7
|
+
name: 'name',
|
|
8
|
+
outputs: [{ internalType: 'string', name: '', type: 'string' }],
|
|
9
|
+
stateMutability: 'view',
|
|
10
|
+
type: 'function',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
inputs: [],
|
|
14
|
+
name: 'symbol',
|
|
15
|
+
outputs: [{ internalType: 'string', name: '', type: 'string' }],
|
|
16
|
+
stateMutability: 'view',
|
|
17
|
+
type: 'function',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
inputs: [],
|
|
21
|
+
name: 'decimals',
|
|
22
|
+
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
|
|
23
|
+
stateMutability: 'view',
|
|
24
|
+
type: 'function',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
inputs: [],
|
|
28
|
+
name: 'totalSupply',
|
|
29
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
30
|
+
stateMutability: 'view',
|
|
31
|
+
type: 'function',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
|
|
35
|
+
name: 'balanceOf',
|
|
36
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
37
|
+
stateMutability: 'view',
|
|
38
|
+
type: 'function',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
inputs: [
|
|
42
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
43
|
+
{ internalType: 'uint256', name: 'value', type: 'uint256' },
|
|
44
|
+
],
|
|
45
|
+
name: 'transfer',
|
|
46
|
+
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
47
|
+
stateMutability: 'nonpayable',
|
|
48
|
+
type: 'function',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
inputs: [
|
|
52
|
+
{ internalType: 'address', name: 'owner', type: 'address' },
|
|
53
|
+
{ internalType: 'address', name: 'spender', type: 'address' },
|
|
54
|
+
],
|
|
55
|
+
name: 'allowance',
|
|
56
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
57
|
+
stateMutability: 'view',
|
|
58
|
+
type: 'function',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
inputs: [
|
|
62
|
+
{ internalType: 'address', name: 'spender', type: 'address' },
|
|
63
|
+
{ internalType: 'uint256', name: 'value', type: 'uint256' },
|
|
64
|
+
],
|
|
65
|
+
name: 'approve',
|
|
66
|
+
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
67
|
+
stateMutability: 'nonpayable',
|
|
68
|
+
type: 'function',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
inputs: [
|
|
72
|
+
{ internalType: 'address', name: 'from', type: 'address' },
|
|
73
|
+
{ internalType: 'address', name: 'to', type: 'address' },
|
|
74
|
+
{ internalType: 'uint256', name: 'value', type: 'uint256' },
|
|
75
|
+
],
|
|
76
|
+
name: 'transferFrom',
|
|
77
|
+
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
78
|
+
stateMutability: 'nonpayable',
|
|
79
|
+
type: 'function',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
inputs: [
|
|
83
|
+
{ internalType: 'address', name: 'spender', type: 'address' },
|
|
84
|
+
{ internalType: 'uint256', name: 'addedValue', type: 'uint256' },
|
|
85
|
+
],
|
|
86
|
+
name: 'increaseAllowance',
|
|
87
|
+
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
88
|
+
stateMutability: 'nonpayable',
|
|
89
|
+
type: 'function',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
inputs: [
|
|
93
|
+
{ internalType: 'address', name: 'spender', type: 'address' },
|
|
94
|
+
{ internalType: 'uint256', name: 'subtractedValue', type: 'uint256' },
|
|
95
|
+
],
|
|
96
|
+
name: 'decreaseAllowance',
|
|
97
|
+
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
98
|
+
stateMutability: 'nonpayable',
|
|
99
|
+
type: 'function',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
anonymous: false,
|
|
103
|
+
inputs: [
|
|
104
|
+
{ indexed: true, internalType: 'address', name: 'from', type: 'address' },
|
|
105
|
+
{ indexed: true, internalType: 'address', name: 'to', type: 'address' },
|
|
106
|
+
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
|
|
107
|
+
],
|
|
108
|
+
name: 'Transfer',
|
|
109
|
+
type: 'event',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
anonymous: false,
|
|
113
|
+
inputs: [
|
|
114
|
+
{ indexed: true, internalType: 'address', name: 'owner', type: 'address' },
|
|
115
|
+
{ indexed: true, internalType: 'address', name: 'spender', type: 'address' },
|
|
116
|
+
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
|
|
117
|
+
],
|
|
118
|
+
name: 'Approval',
|
|
119
|
+
type: 'event',
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
//# sourceMappingURL=erc20-abi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"erc20-abi.js","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/erc20-abi.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAU;IAC9B;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC/D,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC/D,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC7D,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACj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SAAS,EAAE;SAC5E;QACD,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;KACd;CACF,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { populateTransaction } from './populateTransaction';
|
|
2
2
|
export { sponsoredGasRawTransaction, sponsoredGasContractCall } from './gasSponsorship';
|
|
3
|
+
export { ERC20_ABI } from './erc20-abi';
|
|
4
|
+
export { bigIntReplacer } from './bigint-replace';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sponsoredGasContractCall = exports.sponsoredGasRawTransaction = exports.populateTransaction = void 0;
|
|
3
|
+
exports.bigIntReplacer = exports.ERC20_ABI = exports.sponsoredGasContractCall = exports.sponsoredGasRawTransaction = exports.populateTransaction = void 0;
|
|
4
4
|
var populateTransaction_1 = require("./populateTransaction");
|
|
5
5
|
Object.defineProperty(exports, "populateTransaction", { enumerable: true, get: function () { return populateTransaction_1.populateTransaction; } });
|
|
6
6
|
var gasSponsorship_1 = require("./gasSponsorship");
|
|
7
7
|
Object.defineProperty(exports, "sponsoredGasRawTransaction", { enumerable: true, get: function () { return gasSponsorship_1.sponsoredGasRawTransaction; } });
|
|
8
8
|
Object.defineProperty(exports, "sponsoredGasContractCall", { enumerable: true, get: function () { return gasSponsorship_1.sponsoredGasContractCall; } });
|
|
9
|
+
var erc20_abi_1 = require("./erc20-abi");
|
|
10
|
+
Object.defineProperty(exports, "ERC20_ABI", { enumerable: true, get: function () { return erc20_abi_1.ERC20_ABI; } });
|
|
11
|
+
var bigint_replace_1 = require("./bigint-replace");
|
|
12
|
+
Object.defineProperty(exports, "bigIntReplacer", { enumerable: true, get: function () { return bigint_replace_1.bigIntReplacer; } });
|
|
9
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/index.ts"],"names":[],"mappings":";;;AAAA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,mDAAwF;AAA/E,4HAAA,0BAA0B,OAAA;AAAE,0HAAA,wBAAwB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/abilityHelpers/index.ts"],"names":[],"mappings":";;;AAAA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,mDAAwF;AAA/E,4HAAA,0BAA0B,OAAA;AAAE,0HAAA,wBAAwB,OAAA;AAC7D,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-ability-sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"semver": "^7.7.2",
|
|
13
13
|
"tslib": "^2.8.1",
|
|
14
14
|
"zod": "^3.25.64",
|
|
15
|
-
"@lit-protocol/vincent-contracts-sdk": "
|
|
15
|
+
"@lit-protocol/vincent-contracts-sdk": "5.0.0"
|
|
16
16
|
},
|
|
17
17
|
"main": "./dist/src/index.js",
|
|
18
18
|
"types": "./dist/src/index.d.ts",
|