@lit-protocol/vincent-ability-sdk 2.3.4 → 2.4.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.
- package/CHANGELOG.md +26 -0
- package/README.md +49 -1
- package/dist/CHANGELOG.md +6 -0
- package/dist/README.md +49 -1
- package/dist/package.json +7 -1
- package/dist/src/gatedSigner.d.ts +2 -0
- package/dist/src/gatedSigner.d.ts.map +1 -0
- package/dist/src/gatedSigner.js +5 -0
- package/dist/src/gatedSigner.js.map +1 -0
- package/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js +1 -1
- package/dist/src/lib/abilityHelpers/gasSponsorship/get-alchemy-chain-config.js.map +1 -1
- package/dist/src/lib/gatedSigner/helpers/eip712.d.ts +34 -0
- package/dist/src/lib/gatedSigner/helpers/eip712.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/eip712.js +30 -0
- package/dist/src/lib/gatedSigner/helpers/eip712.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/hex.d.ts +5 -0
- package/dist/src/lib/gatedSigner/helpers/hex.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/hex.js +16 -0
- package/dist/src/lib/gatedSigner/helpers/hex.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/lifecycleFunctions.d.ts +56 -0
- package/dist/src/lib/gatedSigner/helpers/lifecycleFunctions.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/lifecycleFunctions.js +91 -0
- package/dist/src/lib/gatedSigner/helpers/lifecycleFunctions.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/lowLevelCall.d.ts +13 -0
- package/dist/src/lib/gatedSigner/helpers/lowLevelCall.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/lowLevelCall.js +21 -0
- package/dist/src/lib/gatedSigner/helpers/lowLevelCall.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/schemas.d.ts +925 -0
- package/dist/src/lib/gatedSigner/helpers/schemas.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/schemas.js +64 -0
- package/dist/src/lib/gatedSigner/helpers/schemas.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/signTransaction.d.ts +9 -0
- package/dist/src/lib/gatedSigner/helpers/signTransaction.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/signTransaction.js +30 -0
- package/dist/src/lib/gatedSigner/helpers/signTransaction.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/signUserOperation.d.ts +15 -0
- package/dist/src/lib/gatedSigner/helpers/signUserOperation.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/signUserOperation.js +115 -0
- package/dist/src/lib/gatedSigner/helpers/signUserOperation.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/simulation.d.ts +204 -0
- package/dist/src/lib/gatedSigner/helpers/simulation.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/simulation.js +93 -0
- package/dist/src/lib/gatedSigner/helpers/simulation.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/kernel.d.ts +8 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/kernel.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/kernel.js +177 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/kernel.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/safe.d.ts +26 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/safe.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/safe.js +195 -0
- package/dist/src/lib/gatedSigner/helpers/smartAccounts/safe.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/toLitActionAccount.d.ts +20 -0
- package/dist/src/lib/gatedSigner/helpers/toLitActionAccount.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/toLitActionAccount.js +69 -0
- package/dist/src/lib/gatedSigner/helpers/toLitActionAccount.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/transaction.d.ts +148 -0
- package/dist/src/lib/gatedSigner/helpers/transaction.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/transaction.js +87 -0
- package/dist/src/lib/gatedSigner/helpers/transaction.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/userOperation.d.ts +200 -0
- package/dist/src/lib/gatedSigner/helpers/userOperation.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/userOperation.js +106 -0
- package/dist/src/lib/gatedSigner/helpers/userOperation.js.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/validation.d.ts +43 -0
- package/dist/src/lib/gatedSigner/helpers/validation.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/helpers/validation.js +81 -0
- package/dist/src/lib/gatedSigner/helpers/validation.js.map +1 -0
- package/dist/src/lib/gatedSigner/index.d.ts +12 -0
- package/dist/src/lib/gatedSigner/index.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/index.js +19 -0
- package/dist/src/lib/gatedSigner/index.js.map +1 -0
- package/dist/src/lib/gatedSigner/vincentGatedSignerAbility.d.ts +566 -0
- package/dist/src/lib/gatedSigner/vincentGatedSignerAbility.d.ts.map +1 -0
- package/dist/src/lib/gatedSigner/vincentGatedSignerAbility.js +48 -0
- package/dist/src/lib/gatedSigner/vincentGatedSignerAbility.js.map +1 -0
- package/dist/src/type-inference-verification/ability-definition-tests.d.ts +6 -6
- package/dist/src/type-inference-verification/allow-deny-test-cases-ability.d.ts +90 -90
- package/dist/src/type-inference-verification/allow-deny-test-cases.d.ts +8 -8
- package/dist/src/type-inference-verification/context-switching-tests.d.ts +3 -3
- package/dist/src/type-inference-verification/create-vincent-gated-signer-ability.d.ts +533 -0
- package/dist/src/type-inference-verification/create-vincent-gated-signer-ability.d.ts.map +1 -0
- package/dist/src/type-inference-verification/create-vincent-gated-signer-ability.js +19 -0
- package/dist/src/type-inference-verification/create-vincent-gated-signer-ability.js.map +1 -0
- package/dist/src/type-inference-verification/parameter-inference-tests-tool.d.ts +58 -58
- package/dist/src/type-inference-verification/parameter-inference-tests.d.ts +5 -5
- package/dist/src/type-inference-verification/playground.d.ts +8 -8
- package/dist/src/type-inference-verification/schema-test.d.ts +5 -5
- package/package.json +8 -2
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import type { VincentAbilityConfig } from '../abilityCore/abilityConfig/types';
|
|
2
|
+
import type { AbilityPolicyMap } from '../abilityCore/helpers/supportedPoliciesForAbility';
|
|
3
|
+
import type { LifecycleFunctionSteps } from './helpers/lifecycleFunctions';
|
|
4
|
+
import { abilityParamsSchema, executeFailSchema, executeSuccessSchema, precheckFailSchema, precheckSuccessSchema } from './helpers/schemas';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration interface for creating a Vincent Gated Signer Ability.
|
|
7
|
+
*
|
|
8
|
+
* A Gated Signer Ability is a specific type of ability that validates a transaction or user operation
|
|
9
|
+
* received with the lifecycle functions (decode, validate simulation, validate transaction) and if
|
|
10
|
+
* everything is valid, then uses the PKP to sign what it received.
|
|
11
|
+
*/
|
|
12
|
+
interface VincentGatedSignerAbilityConfig extends Omit<VincentAbilityConfig<typeof abilityParamsSchema, string, AbilityPolicyMap<any[], string>, // Not used by omitting supportedPolicies
|
|
13
|
+
any, // Not used by omitting precheck and execute functions
|
|
14
|
+
typeof precheckSuccessSchema, typeof precheckFailSchema, typeof executeSuccessSchema, typeof executeFailSchema>, 'abilityParamsSchema' | 'supportedPolicies' | 'precheckSuccessSchema' | 'precheckFailSchema' | 'executeSuccessSchema' | 'executeFailSchema' | 'precheck' | 'execute'>, LifecycleFunctionSteps {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates a Vincent Gated Signer Ability.
|
|
18
|
+
*
|
|
19
|
+
* @param AbilityConfig - The configuration for the ability.
|
|
20
|
+
* @returns A Vincent Ability instance configured as a gated signer.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* export const myAbility = createVincentGatedSignerAbility({
|
|
25
|
+
* packageName: '@my-org/my-ability',
|
|
26
|
+
* abilityDescription: 'My ability description',
|
|
27
|
+
* decodeTransaction,
|
|
28
|
+
* validateSimulation,
|
|
29
|
+
* validateTransaction,
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function createVincentGatedSignerAbility(AbilityConfig: VincentGatedSignerAbilityConfig): import("../types").VincentAbility<import("zod").ZodUnion<[import("zod").ZodObject<{} & {
|
|
34
|
+
userOp: import("zod").ZodObject<{
|
|
35
|
+
sender: import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>;
|
|
36
|
+
nonce: import("zod").ZodString;
|
|
37
|
+
callData: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
38
|
+
callGasLimit: import("zod").ZodString;
|
|
39
|
+
verificationGasLimit: import("zod").ZodString;
|
|
40
|
+
preVerificationGas: import("zod").ZodString;
|
|
41
|
+
maxFeePerGas: import("zod").ZodString;
|
|
42
|
+
maxPriorityFeePerGas: import("zod").ZodString;
|
|
43
|
+
signature: import("zod").ZodDefault<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
44
|
+
eip7702Auth: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
45
|
+
chain_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
+
address: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>>;
|
|
47
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
y_parity: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
r: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
|
+
s: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
52
|
+
nonce?: string | undefined;
|
|
53
|
+
chain_id?: string | undefined;
|
|
54
|
+
address?: `0x${string}` | undefined;
|
|
55
|
+
y_parity?: string | undefined;
|
|
56
|
+
r?: string | undefined;
|
|
57
|
+
s?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
nonce?: string | undefined;
|
|
60
|
+
chain_id?: string | undefined;
|
|
61
|
+
address?: string | undefined;
|
|
62
|
+
y_parity?: string | undefined;
|
|
63
|
+
r?: string | undefined;
|
|
64
|
+
s?: string | undefined;
|
|
65
|
+
}>>;
|
|
66
|
+
} & {
|
|
67
|
+
paymaster: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>>;
|
|
68
|
+
paymasterData: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
69
|
+
paymasterVerificationGasLimit: import("zod").ZodString;
|
|
70
|
+
factory: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>>;
|
|
71
|
+
factoryData: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
72
|
+
paymasterPostOpGasLimit: import("zod").ZodString;
|
|
73
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
74
|
+
sender: `0x${string}`;
|
|
75
|
+
nonce: string;
|
|
76
|
+
callData: `0x${string}`;
|
|
77
|
+
callGasLimit: string;
|
|
78
|
+
verificationGasLimit: string;
|
|
79
|
+
preVerificationGas: string;
|
|
80
|
+
maxFeePerGas: string;
|
|
81
|
+
maxPriorityFeePerGas: string;
|
|
82
|
+
signature: `0x${string}`;
|
|
83
|
+
paymasterVerificationGasLimit: string;
|
|
84
|
+
paymasterPostOpGasLimit: string;
|
|
85
|
+
eip7702Auth?: {
|
|
86
|
+
nonce?: string | undefined;
|
|
87
|
+
chain_id?: string | undefined;
|
|
88
|
+
address?: `0x${string}` | undefined;
|
|
89
|
+
y_parity?: string | undefined;
|
|
90
|
+
r?: string | undefined;
|
|
91
|
+
s?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
paymaster?: `0x${string}` | undefined;
|
|
94
|
+
paymasterData?: `0x${string}` | undefined;
|
|
95
|
+
factory?: `0x${string}` | undefined;
|
|
96
|
+
factoryData?: `0x${string}` | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
sender: string;
|
|
99
|
+
nonce: string;
|
|
100
|
+
callData: `0x${string}`;
|
|
101
|
+
callGasLimit: string;
|
|
102
|
+
verificationGasLimit: string;
|
|
103
|
+
preVerificationGas: string;
|
|
104
|
+
maxFeePerGas: string;
|
|
105
|
+
maxPriorityFeePerGas: string;
|
|
106
|
+
paymasterVerificationGasLimit: string;
|
|
107
|
+
paymasterPostOpGasLimit: string;
|
|
108
|
+
signature?: `0x${string}` | undefined;
|
|
109
|
+
eip7702Auth?: {
|
|
110
|
+
nonce?: string | undefined;
|
|
111
|
+
chain_id?: string | undefined;
|
|
112
|
+
address?: string | undefined;
|
|
113
|
+
y_parity?: string | undefined;
|
|
114
|
+
r?: string | undefined;
|
|
115
|
+
s?: string | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
paymaster?: string | undefined;
|
|
118
|
+
paymasterData?: `0x${string}` | undefined;
|
|
119
|
+
factory?: string | undefined;
|
|
120
|
+
factoryData?: `0x${string}` | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
entryPointAddress: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>>>;
|
|
123
|
+
alchemyRpcUrl: import("zod").ZodString;
|
|
124
|
+
validAfter: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
125
|
+
validUntil: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
126
|
+
safe4337ModuleAddress: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>>;
|
|
127
|
+
eip712Params: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
128
|
+
domain: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
129
|
+
types: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodObject<{
|
|
130
|
+
name: import("zod").ZodString;
|
|
131
|
+
type: import("zod").ZodString;
|
|
132
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
133
|
+
type: string;
|
|
134
|
+
name: string;
|
|
135
|
+
}, {
|
|
136
|
+
type: string;
|
|
137
|
+
name: string;
|
|
138
|
+
}>, "many">>;
|
|
139
|
+
primaryType: import("zod").ZodString;
|
|
140
|
+
message: import("zod").ZodEffects<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>]>>, Record<string, string | Record<string, any>>, Record<string, string | Record<string, any>>>;
|
|
141
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
142
|
+
message: Record<string, string | Record<string, any>>;
|
|
143
|
+
domain: Record<string, any>;
|
|
144
|
+
types: Record<string, {
|
|
145
|
+
type: string;
|
|
146
|
+
name: string;
|
|
147
|
+
}[]>;
|
|
148
|
+
primaryType: string;
|
|
149
|
+
}, {
|
|
150
|
+
message: Record<string, string | Record<string, any>>;
|
|
151
|
+
domain: Record<string, any>;
|
|
152
|
+
types: Record<string, {
|
|
153
|
+
type: string;
|
|
154
|
+
name: string;
|
|
155
|
+
}[]>;
|
|
156
|
+
primaryType: string;
|
|
157
|
+
}>>;
|
|
158
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
159
|
+
userOp: {
|
|
160
|
+
sender: `0x${string}`;
|
|
161
|
+
nonce: string;
|
|
162
|
+
callData: `0x${string}`;
|
|
163
|
+
callGasLimit: string;
|
|
164
|
+
verificationGasLimit: string;
|
|
165
|
+
preVerificationGas: string;
|
|
166
|
+
maxFeePerGas: string;
|
|
167
|
+
maxPriorityFeePerGas: string;
|
|
168
|
+
signature: `0x${string}`;
|
|
169
|
+
paymasterVerificationGasLimit: string;
|
|
170
|
+
paymasterPostOpGasLimit: string;
|
|
171
|
+
eip7702Auth?: {
|
|
172
|
+
nonce?: string | undefined;
|
|
173
|
+
chain_id?: string | undefined;
|
|
174
|
+
address?: `0x${string}` | undefined;
|
|
175
|
+
y_parity?: string | undefined;
|
|
176
|
+
r?: string | undefined;
|
|
177
|
+
s?: string | undefined;
|
|
178
|
+
} | undefined;
|
|
179
|
+
paymaster?: `0x${string}` | undefined;
|
|
180
|
+
paymasterData?: `0x${string}` | undefined;
|
|
181
|
+
factory?: `0x${string}` | undefined;
|
|
182
|
+
factoryData?: `0x${string}` | undefined;
|
|
183
|
+
};
|
|
184
|
+
validAfter: number;
|
|
185
|
+
validUntil: number;
|
|
186
|
+
entryPointAddress: `0x${string}`;
|
|
187
|
+
alchemyRpcUrl: string;
|
|
188
|
+
safe4337ModuleAddress: `0x${string}`;
|
|
189
|
+
eip712Params?: {
|
|
190
|
+
message: Record<string, string | Record<string, any>>;
|
|
191
|
+
domain: Record<string, any>;
|
|
192
|
+
types: Record<string, {
|
|
193
|
+
type: string;
|
|
194
|
+
name: string;
|
|
195
|
+
}[]>;
|
|
196
|
+
primaryType: string;
|
|
197
|
+
} | undefined;
|
|
198
|
+
}, {
|
|
199
|
+
userOp: {
|
|
200
|
+
sender: string;
|
|
201
|
+
nonce: string;
|
|
202
|
+
callData: `0x${string}`;
|
|
203
|
+
callGasLimit: string;
|
|
204
|
+
verificationGasLimit: string;
|
|
205
|
+
preVerificationGas: string;
|
|
206
|
+
maxFeePerGas: string;
|
|
207
|
+
maxPriorityFeePerGas: string;
|
|
208
|
+
paymasterVerificationGasLimit: string;
|
|
209
|
+
paymasterPostOpGasLimit: string;
|
|
210
|
+
signature?: `0x${string}` | undefined;
|
|
211
|
+
eip7702Auth?: {
|
|
212
|
+
nonce?: string | undefined;
|
|
213
|
+
chain_id?: string | undefined;
|
|
214
|
+
address?: string | undefined;
|
|
215
|
+
y_parity?: string | undefined;
|
|
216
|
+
r?: string | undefined;
|
|
217
|
+
s?: string | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
paymaster?: string | undefined;
|
|
220
|
+
paymasterData?: `0x${string}` | undefined;
|
|
221
|
+
factory?: string | undefined;
|
|
222
|
+
factoryData?: `0x${string}` | undefined;
|
|
223
|
+
};
|
|
224
|
+
alchemyRpcUrl: string;
|
|
225
|
+
validAfter?: number | undefined;
|
|
226
|
+
validUntil?: number | undefined;
|
|
227
|
+
entryPointAddress?: string | undefined;
|
|
228
|
+
safe4337ModuleAddress?: string | undefined;
|
|
229
|
+
eip712Params?: {
|
|
230
|
+
message: Record<string, string | Record<string, any>>;
|
|
231
|
+
domain: Record<string, any>;
|
|
232
|
+
types: Record<string, {
|
|
233
|
+
type: string;
|
|
234
|
+
name: string;
|
|
235
|
+
}[]>;
|
|
236
|
+
primaryType: string;
|
|
237
|
+
} | undefined;
|
|
238
|
+
}>, import("zod").ZodObject<{} & {
|
|
239
|
+
alchemyRpcUrl: import("zod").ZodString;
|
|
240
|
+
transaction: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodObject<{
|
|
241
|
+
data: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
242
|
+
from: import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>;
|
|
243
|
+
to: import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>;
|
|
244
|
+
value: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
245
|
+
nonce: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
246
|
+
gas: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
247
|
+
gasLimit: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
248
|
+
gasPrice: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
249
|
+
maxFeePerGas: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
250
|
+
maxPriorityFeePerGas: import("zod").ZodOptional<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>;
|
|
251
|
+
chainId: import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>]>;
|
|
252
|
+
type: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
253
|
+
accessList: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
254
|
+
address: import("zod").ZodEffects<import("zod").ZodString, `0x${string}`, string>;
|
|
255
|
+
storageKeys: import("zod").ZodArray<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>, "many">;
|
|
256
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
257
|
+
address: `0x${string}`;
|
|
258
|
+
storageKeys: `0x${string}`[];
|
|
259
|
+
}, {
|
|
260
|
+
address: string;
|
|
261
|
+
storageKeys: `0x${string}`[];
|
|
262
|
+
}>, "many">>;
|
|
263
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
264
|
+
value: `0x${string}`;
|
|
265
|
+
nonce: `0x${string}`;
|
|
266
|
+
to: `0x${string}`;
|
|
267
|
+
data: `0x${string}`;
|
|
268
|
+
chainId: number | `0x${string}`;
|
|
269
|
+
from: `0x${string}`;
|
|
270
|
+
type?: string | number | undefined;
|
|
271
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
272
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
273
|
+
gas?: `0x${string}` | undefined;
|
|
274
|
+
gasLimit?: `0x${string}` | undefined;
|
|
275
|
+
gasPrice?: `0x${string}` | undefined;
|
|
276
|
+
accessList?: {
|
|
277
|
+
address: `0x${string}`;
|
|
278
|
+
storageKeys: `0x${string}`[];
|
|
279
|
+
}[] | undefined;
|
|
280
|
+
}, {
|
|
281
|
+
value: `0x${string}`;
|
|
282
|
+
nonce: `0x${string}`;
|
|
283
|
+
to: string;
|
|
284
|
+
data: `0x${string}`;
|
|
285
|
+
chainId: number | `0x${string}`;
|
|
286
|
+
from: string;
|
|
287
|
+
type?: string | number | undefined;
|
|
288
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
289
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
290
|
+
gas?: `0x${string}` | undefined;
|
|
291
|
+
gasLimit?: `0x${string}` | undefined;
|
|
292
|
+
gasPrice?: `0x${string}` | undefined;
|
|
293
|
+
accessList?: {
|
|
294
|
+
address: string;
|
|
295
|
+
storageKeys: `0x${string}`[];
|
|
296
|
+
}[] | undefined;
|
|
297
|
+
}>, {
|
|
298
|
+
value: `0x${string}`;
|
|
299
|
+
nonce: `0x${string}`;
|
|
300
|
+
to: `0x${string}`;
|
|
301
|
+
data: `0x${string}`;
|
|
302
|
+
chainId: number | `0x${string}`;
|
|
303
|
+
from: `0x${string}`;
|
|
304
|
+
type?: string | number | undefined;
|
|
305
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
306
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
307
|
+
gas?: `0x${string}` | undefined;
|
|
308
|
+
gasLimit?: `0x${string}` | undefined;
|
|
309
|
+
gasPrice?: `0x${string}` | undefined;
|
|
310
|
+
accessList?: {
|
|
311
|
+
address: `0x${string}`;
|
|
312
|
+
storageKeys: `0x${string}`[];
|
|
313
|
+
}[] | undefined;
|
|
314
|
+
}, {
|
|
315
|
+
value: `0x${string}`;
|
|
316
|
+
nonce: `0x${string}`;
|
|
317
|
+
to: string;
|
|
318
|
+
data: `0x${string}`;
|
|
319
|
+
chainId: number | `0x${string}`;
|
|
320
|
+
from: string;
|
|
321
|
+
type?: string | number | undefined;
|
|
322
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
323
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
324
|
+
gas?: `0x${string}` | undefined;
|
|
325
|
+
gasLimit?: `0x${string}` | undefined;
|
|
326
|
+
gasPrice?: `0x${string}` | undefined;
|
|
327
|
+
accessList?: {
|
|
328
|
+
address: string;
|
|
329
|
+
storageKeys: `0x${string}`[];
|
|
330
|
+
}[] | undefined;
|
|
331
|
+
}>, {
|
|
332
|
+
value: `0x${string}`;
|
|
333
|
+
nonce: `0x${string}`;
|
|
334
|
+
to: `0x${string}`;
|
|
335
|
+
data: `0x${string}`;
|
|
336
|
+
chainId: number | `0x${string}`;
|
|
337
|
+
from: `0x${string}`;
|
|
338
|
+
type?: string | number | undefined;
|
|
339
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
340
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
341
|
+
gas?: `0x${string}` | undefined;
|
|
342
|
+
gasLimit?: `0x${string}` | undefined;
|
|
343
|
+
gasPrice?: `0x${string}` | undefined;
|
|
344
|
+
accessList?: {
|
|
345
|
+
address: `0x${string}`;
|
|
346
|
+
storageKeys: `0x${string}`[];
|
|
347
|
+
}[] | undefined;
|
|
348
|
+
}, {
|
|
349
|
+
value: `0x${string}`;
|
|
350
|
+
nonce: `0x${string}`;
|
|
351
|
+
to: string;
|
|
352
|
+
data: `0x${string}`;
|
|
353
|
+
chainId: number | `0x${string}`;
|
|
354
|
+
from: string;
|
|
355
|
+
type?: string | number | undefined;
|
|
356
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
357
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
358
|
+
gas?: `0x${string}` | undefined;
|
|
359
|
+
gasLimit?: `0x${string}` | undefined;
|
|
360
|
+
gasPrice?: `0x${string}` | undefined;
|
|
361
|
+
accessList?: {
|
|
362
|
+
address: string;
|
|
363
|
+
storageKeys: `0x${string}`[];
|
|
364
|
+
}[] | undefined;
|
|
365
|
+
}>;
|
|
366
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
367
|
+
transaction: {
|
|
368
|
+
value: `0x${string}`;
|
|
369
|
+
nonce: `0x${string}`;
|
|
370
|
+
to: `0x${string}`;
|
|
371
|
+
data: `0x${string}`;
|
|
372
|
+
chainId: number | `0x${string}`;
|
|
373
|
+
from: `0x${string}`;
|
|
374
|
+
type?: string | number | undefined;
|
|
375
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
376
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
377
|
+
gas?: `0x${string}` | undefined;
|
|
378
|
+
gasLimit?: `0x${string}` | undefined;
|
|
379
|
+
gasPrice?: `0x${string}` | undefined;
|
|
380
|
+
accessList?: {
|
|
381
|
+
address: `0x${string}`;
|
|
382
|
+
storageKeys: `0x${string}`[];
|
|
383
|
+
}[] | undefined;
|
|
384
|
+
};
|
|
385
|
+
alchemyRpcUrl: string;
|
|
386
|
+
}, {
|
|
387
|
+
transaction: {
|
|
388
|
+
value: `0x${string}`;
|
|
389
|
+
nonce: `0x${string}`;
|
|
390
|
+
to: string;
|
|
391
|
+
data: `0x${string}`;
|
|
392
|
+
chainId: number | `0x${string}`;
|
|
393
|
+
from: string;
|
|
394
|
+
type?: string | number | undefined;
|
|
395
|
+
maxFeePerGas?: `0x${string}` | undefined;
|
|
396
|
+
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
|
397
|
+
gas?: `0x${string}` | undefined;
|
|
398
|
+
gasLimit?: `0x${string}` | undefined;
|
|
399
|
+
gasPrice?: `0x${string}` | undefined;
|
|
400
|
+
accessList?: {
|
|
401
|
+
address: string;
|
|
402
|
+
storageKeys: `0x${string}`[];
|
|
403
|
+
}[] | undefined;
|
|
404
|
+
};
|
|
405
|
+
alchemyRpcUrl: string;
|
|
406
|
+
}>]>, string, AbilityPolicyMap<readonly [], never>, {}, import("zod").ZodObject<{
|
|
407
|
+
simulationChanges: import("zod").ZodArray<import("zod").ZodObject<{
|
|
408
|
+
assetType: import("zod").ZodNativeEnum<typeof import("./helpers/simulation").SimulateAssetType>;
|
|
409
|
+
changeType: import("zod").ZodNativeEnum<typeof import("./helpers/simulation").SimulateChangeType>;
|
|
410
|
+
from: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
411
|
+
to: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
412
|
+
rawAmount: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
413
|
+
amount: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
414
|
+
contractAddress: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>>;
|
|
415
|
+
tokenId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
416
|
+
decimals: import("zod").ZodNumber;
|
|
417
|
+
symbol: import("zod").ZodString;
|
|
418
|
+
name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
419
|
+
logo: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
420
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
421
|
+
symbol: string;
|
|
422
|
+
to: `0x${string}`;
|
|
423
|
+
from: `0x${string}`;
|
|
424
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
425
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
426
|
+
decimals: number;
|
|
427
|
+
tokenId?: string | null | undefined;
|
|
428
|
+
name?: string | null | undefined;
|
|
429
|
+
rawAmount?: string | null | undefined;
|
|
430
|
+
amount?: string | null | undefined;
|
|
431
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
432
|
+
logo?: string | null | undefined;
|
|
433
|
+
}, {
|
|
434
|
+
symbol: string;
|
|
435
|
+
to: `0x${string}`;
|
|
436
|
+
from: `0x${string}`;
|
|
437
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
438
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
439
|
+
decimals: number;
|
|
440
|
+
tokenId?: string | null | undefined;
|
|
441
|
+
name?: string | null | undefined;
|
|
442
|
+
rawAmount?: string | null | undefined;
|
|
443
|
+
amount?: string | null | undefined;
|
|
444
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
445
|
+
logo?: string | null | undefined;
|
|
446
|
+
}>, "many">;
|
|
447
|
+
} & {
|
|
448
|
+
signature: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
449
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
450
|
+
signature: `0x${string}`;
|
|
451
|
+
simulationChanges: {
|
|
452
|
+
symbol: string;
|
|
453
|
+
to: `0x${string}`;
|
|
454
|
+
from: `0x${string}`;
|
|
455
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
456
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
457
|
+
decimals: number;
|
|
458
|
+
tokenId?: string | null | undefined;
|
|
459
|
+
name?: string | null | undefined;
|
|
460
|
+
rawAmount?: string | null | undefined;
|
|
461
|
+
amount?: string | null | undefined;
|
|
462
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
463
|
+
logo?: string | null | undefined;
|
|
464
|
+
}[];
|
|
465
|
+
}, {
|
|
466
|
+
signature: `0x${string}`;
|
|
467
|
+
simulationChanges: {
|
|
468
|
+
symbol: string;
|
|
469
|
+
to: `0x${string}`;
|
|
470
|
+
from: `0x${string}`;
|
|
471
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
472
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
473
|
+
decimals: number;
|
|
474
|
+
tokenId?: string | null | undefined;
|
|
475
|
+
name?: string | null | undefined;
|
|
476
|
+
rawAmount?: string | null | undefined;
|
|
477
|
+
amount?: string | null | undefined;
|
|
478
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
479
|
+
logo?: string | null | undefined;
|
|
480
|
+
}[];
|
|
481
|
+
}>, import("zod").ZodObject<{
|
|
482
|
+
error: import("zod").ZodString;
|
|
483
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
484
|
+
error: string;
|
|
485
|
+
}, {
|
|
486
|
+
error: string;
|
|
487
|
+
}>, import("zod").ZodObject<{
|
|
488
|
+
simulationChanges: import("zod").ZodArray<import("zod").ZodObject<{
|
|
489
|
+
assetType: import("zod").ZodNativeEnum<typeof import("./helpers/simulation").SimulateAssetType>;
|
|
490
|
+
changeType: import("zod").ZodNativeEnum<typeof import("./helpers/simulation").SimulateChangeType>;
|
|
491
|
+
from: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
492
|
+
to: import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>;
|
|
493
|
+
rawAmount: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
494
|
+
amount: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
495
|
+
contractAddress: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodType<`0x${string}`, import("zod").ZodTypeDef, `0x${string}`>>>;
|
|
496
|
+
tokenId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
497
|
+
decimals: import("zod").ZodNumber;
|
|
498
|
+
symbol: import("zod").ZodString;
|
|
499
|
+
name: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
500
|
+
logo: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
501
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
502
|
+
symbol: string;
|
|
503
|
+
to: `0x${string}`;
|
|
504
|
+
from: `0x${string}`;
|
|
505
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
506
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
507
|
+
decimals: number;
|
|
508
|
+
tokenId?: string | null | undefined;
|
|
509
|
+
name?: string | null | undefined;
|
|
510
|
+
rawAmount?: string | null | undefined;
|
|
511
|
+
amount?: string | null | undefined;
|
|
512
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
513
|
+
logo?: string | null | undefined;
|
|
514
|
+
}, {
|
|
515
|
+
symbol: string;
|
|
516
|
+
to: `0x${string}`;
|
|
517
|
+
from: `0x${string}`;
|
|
518
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
519
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
520
|
+
decimals: number;
|
|
521
|
+
tokenId?: string | null | undefined;
|
|
522
|
+
name?: string | null | undefined;
|
|
523
|
+
rawAmount?: string | null | undefined;
|
|
524
|
+
amount?: string | null | undefined;
|
|
525
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
526
|
+
logo?: string | null | undefined;
|
|
527
|
+
}>, "many">;
|
|
528
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
529
|
+
simulationChanges: {
|
|
530
|
+
symbol: string;
|
|
531
|
+
to: `0x${string}`;
|
|
532
|
+
from: `0x${string}`;
|
|
533
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
534
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
535
|
+
decimals: number;
|
|
536
|
+
tokenId?: string | null | undefined;
|
|
537
|
+
name?: string | null | undefined;
|
|
538
|
+
rawAmount?: string | null | undefined;
|
|
539
|
+
amount?: string | null | undefined;
|
|
540
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
541
|
+
logo?: string | null | undefined;
|
|
542
|
+
}[];
|
|
543
|
+
}, {
|
|
544
|
+
simulationChanges: {
|
|
545
|
+
symbol: string;
|
|
546
|
+
to: `0x${string}`;
|
|
547
|
+
from: `0x${string}`;
|
|
548
|
+
assetType: import("./helpers/simulation").SimulateAssetType;
|
|
549
|
+
changeType: import("./helpers/simulation").SimulateChangeType;
|
|
550
|
+
decimals: number;
|
|
551
|
+
tokenId?: string | null | undefined;
|
|
552
|
+
name?: string | null | undefined;
|
|
553
|
+
rawAmount?: string | null | undefined;
|
|
554
|
+
amount?: string | null | undefined;
|
|
555
|
+
contractAddress?: `0x${string}` | null | undefined;
|
|
556
|
+
logo?: string | null | undefined;
|
|
557
|
+
}[];
|
|
558
|
+
}>, import("zod").ZodObject<{
|
|
559
|
+
error: import("zod").ZodString;
|
|
560
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
561
|
+
error: string;
|
|
562
|
+
}, {
|
|
563
|
+
error: string;
|
|
564
|
+
}>>;
|
|
565
|
+
export {};
|
|
566
|
+
//# sourceMappingURL=vincentGatedSignerAbility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vincentGatedSignerAbility.d.ts","sourceRoot":"","sources":["../../../../src/lib/gatedSigner/vincentGatedSignerAbility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAK3F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAK3E,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,UAAU,+BACR,SAAQ,IAAI,CACR,oBAAoB,CAClB,OAAO,mBAAmB,EAC1B,MAAM,EACN,gBAAgB,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,EAAE,yCAAyC;AAC1E,GAAG,EAAE,sDAAsD;AAC3D,OAAO,qBAAqB,EAC5B,OAAO,kBAAkB,EACzB,OAAO,oBAAoB,EAC3B,OAAO,iBAAiB,CACzB,EAEC,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,UAAU,GACV,SAAS,CACZ,EACD,sBAAsB;CAAG;AAG7B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyC7F"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createVincentGatedSignerAbility = createVincentGatedSignerAbility;
|
|
4
|
+
const helpers_1 = require("../abilityCore/helpers");
|
|
5
|
+
const vincentAbility_1 = require("../abilityCore/vincentAbility");
|
|
6
|
+
const lifecycleFunctions_1 = require("./helpers/lifecycleFunctions");
|
|
7
|
+
const schemas_1 = require("./helpers/schemas");
|
|
8
|
+
// https://www.notion.so/litprotocol/Vincent-2-0-abilities-development-proposal-2b16f449b04180f4a01fe5088fd0a2b1
|
|
9
|
+
/**
|
|
10
|
+
* Creates a Vincent Gated Signer Ability.
|
|
11
|
+
*
|
|
12
|
+
* @param AbilityConfig - The configuration for the ability.
|
|
13
|
+
* @returns A Vincent Ability instance configured as a gated signer.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* export const myAbility = createVincentGatedSignerAbility({
|
|
18
|
+
* packageName: '@my-org/my-ability',
|
|
19
|
+
* abilityDescription: 'My ability description',
|
|
20
|
+
* decodeTransaction,
|
|
21
|
+
* validateSimulation,
|
|
22
|
+
* validateTransaction,
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
function createVincentGatedSignerAbility(AbilityConfig) {
|
|
27
|
+
// TODO No policies for this type of abilities yet
|
|
28
|
+
const supportedPolicies = (0, helpers_1.supportedPoliciesForAbility)([]);
|
|
29
|
+
const { abilityDescription, decodeTransaction, packageName, validateSimulation, validateTransaction, } = AbilityConfig;
|
|
30
|
+
const { precheck, execute } = (0, lifecycleFunctions_1.buildLifecycleFunctions)({
|
|
31
|
+
decodeTransaction,
|
|
32
|
+
validateSimulation,
|
|
33
|
+
validateTransaction,
|
|
34
|
+
});
|
|
35
|
+
return (0, vincentAbility_1.createVincentAbility)({
|
|
36
|
+
packageName,
|
|
37
|
+
abilityDescription,
|
|
38
|
+
abilityParamsSchema: schemas_1.abilityParamsSchema,
|
|
39
|
+
executeSuccessSchema: schemas_1.executeSuccessSchema,
|
|
40
|
+
executeFailSchema: schemas_1.executeFailSchema,
|
|
41
|
+
precheckSuccessSchema: schemas_1.precheckSuccessSchema,
|
|
42
|
+
precheckFailSchema: schemas_1.precheckFailSchema,
|
|
43
|
+
supportedPolicies,
|
|
44
|
+
precheck,
|
|
45
|
+
execute,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=vincentGatedSignerAbility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vincentGatedSignerAbility.js","sourceRoot":"","sources":["../../../../src/lib/gatedSigner/vincentGatedSignerAbility.ts"],"names":[],"mappings":";;AAoEA,0EAyCC;AArGD,oDAAqE;AACrE,kEAAqE;AACrE,qEAAuE;AACvE,+CAM2B;AAiC3B,gHAAgH;AAChH;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,+BAA+B,CAAC,aAA8C;IAC5F,kDAAkD;IAClD,MAAM,iBAAiB,GAAG,IAAA,qCAA2B,EAAC,EAAE,CAAC,CAAC;IAE1D,MAAM,EACJ,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,GACpB,GAAG,aAAa,CAAC;IAElB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,4CAAuB,EAQnD;QACA,iBAAiB;QACjB,kBAAkB;QAClB,mBAAmB;KACpB,CAAC,CAAC;IAEH,OAAO,IAAA,qCAAoB,EAAC;QAC1B,WAAW;QACX,kBAAkB;QAElB,mBAAmB,EAAnB,6BAAmB;QACnB,oBAAoB,EAApB,8BAAoB;QACpB,iBAAiB,EAAjB,2BAAiB;QACjB,qBAAqB,EAArB,+BAAqB;QACrB,kBAAkB,EAAlB,4BAAkB;QAElB,iBAAiB;QAEjB,QAAQ;QACR,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|