@lit-protocol/vincent-policy-send-counter 0.1.0 → 0.1.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 +7 -0
- package/CONTRIBUTING.md +6 -6
- package/README.md +1 -1
- package/dist/CHANGELOG.md +7 -0
- package/dist/CONTRIBUTING.md +6 -6
- package/dist/README.md +1 -1
- package/dist/package.json +2 -2
- package/dist/src/generated/lit-action.js +2 -2
- package/dist/src/generated/vincent-bundled-policy.d.ts +183 -144
- package/dist/src/generated/vincent-bundled-policy.d.ts.map +1 -1
- package/dist/src/generated/vincent-policy-metadata.json +1 -1
- package/dist/src/lib/abi/counterSignatures.d.ts +82 -0
- package/dist/src/lib/abi/counterSignatures.d.ts.map +1 -0
- package/dist/src/lib/abi/counterSignatures.js +100 -0
- package/dist/src/lib/abi/counterSignatures.js.map +1 -0
- package/dist/src/lib/helpers/index.d.ts +26 -0
- package/dist/src/lib/helpers/index.d.ts.map +1 -0
- package/dist/src/lib/helpers/index.js +107 -0
- package/dist/src/lib/helpers/index.js.map +1 -0
- package/dist/src/lib/schemas.d.ts +115 -64
- package/dist/src/lib/schemas.d.ts.map +1 -1
- package/dist/src/lib/schemas.js +71 -36
- package/dist/src/lib/schemas.js.map +1 -1
- package/dist/src/lib/vincent-policy.d.ts +183 -144
- package/dist/src/lib/vincent-policy.d.ts.map +1 -1
- package/dist/src/lib/vincent-policy.js +145 -74
- package/dist/src/lib/vincent-policy.js.map +1 -1
- package/package.json +4 -4
- package/dist/src/lib/policy-helpers/calculate-usd-value.d.ts +0 -7
- package/dist/src/lib/policy-helpers/calculate-usd-value.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/calculate-usd-value.js +0 -22
- package/dist/src/lib/policy-helpers/calculate-usd-value.js.map +0 -1
- package/dist/src/lib/policy-helpers/check-spending-limit.d.ts +0 -16
- package/dist/src/lib/policy-helpers/check-spending-limit.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/check-spending-limit.js +0 -29
- package/dist/src/lib/policy-helpers/check-spending-limit.js.map +0 -1
- package/dist/src/lib/policy-helpers/get-eth-usd-price.d.ts +0 -6
- package/dist/src/lib/policy-helpers/get-eth-usd-price.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/get-eth-usd-price.js +0 -22
- package/dist/src/lib/policy-helpers/get-eth-usd-price.js.map +0 -1
- package/dist/src/lib/policy-helpers/get-token-amount-in-usd.d.ts +0 -10
- package/dist/src/lib/policy-helpers/get-token-amount-in-usd.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/get-token-amount-in-usd.js +0 -68
- package/dist/src/lib/policy-helpers/get-token-amount-in-usd.js.map +0 -1
- package/dist/src/lib/policy-helpers/get-uniswap-quote.d.ts +0 -15
- package/dist/src/lib/policy-helpers/get-uniswap-quote.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/get-uniswap-quote.js +0 -114
- package/dist/src/lib/policy-helpers/get-uniswap-quote.js.map +0 -1
- package/dist/src/lib/policy-helpers/index.d.ts +0 -7
- package/dist/src/lib/policy-helpers/index.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/index.js +0 -10
- package/dist/src/lib/policy-helpers/index.js.map +0 -1
- package/dist/src/lib/policy-helpers/send-spend-tx.d.ts +0 -9
- package/dist/src/lib/policy-helpers/send-spend-tx.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/send-spend-tx.js +0 -144
- package/dist/src/lib/policy-helpers/send-spend-tx.js.map +0 -1
- package/dist/src/lib/policy-helpers/sign-tx.d.ts +0 -3
- package/dist/src/lib/policy-helpers/sign-tx.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/sign-tx.js +0 -28
- package/dist/src/lib/policy-helpers/sign-tx.js.map +0 -1
- package/dist/src/lib/policy-helpers/spending-limit-contract.d.ts +0 -4
- package/dist/src/lib/policy-helpers/spending-limit-contract.d.ts.map +0 -1
- package/dist/src/lib/policy-helpers/spending-limit-contract.js +0 -22
- package/dist/src/lib/policy-helpers/spending-limit-contract.js.map +0 -1
|
@@ -1,212 +1,251 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD.
|
|
3
3
|
*/
|
|
4
|
-
export declare const bundledVincentPolicy: import("@lit-protocol/vincent-ability-sdk").BundledVincentPolicy<import("node_modules/@lit-protocol/vincent-ability-sdk/dist/src/lib/types").VincentPolicy<"@lit-protocol/vincent-policy-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
chainIdForUniswap: import("zod").ZodNumber;
|
|
8
|
-
tokenAddress: import("zod").ZodString;
|
|
9
|
-
tokenDecimals: import("zod").ZodNumber;
|
|
10
|
-
buyAmount: import("zod").ZodNumber;
|
|
4
|
+
export declare const bundledVincentPolicy: import("@lit-protocol/vincent-ability-sdk").BundledVincentPolicy<import("node_modules/@lit-protocol/vincent-ability-sdk/dist/src/lib/types").VincentPolicy<"@lit-protocol/vincent-policy-send-counter-limit", import("zod").ZodObject<{
|
|
5
|
+
to: import("zod").ZodString;
|
|
6
|
+
amount: import("zod").ZodString;
|
|
11
7
|
}, "strip", import("zod").ZodTypeAny, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
chainIdForUniswap: number;
|
|
15
|
-
tokenAddress: string;
|
|
16
|
-
tokenDecimals: number;
|
|
17
|
-
buyAmount: number;
|
|
8
|
+
to: string;
|
|
9
|
+
amount: string;
|
|
18
10
|
}, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
chainIdForUniswap: number;
|
|
22
|
-
tokenAddress: string;
|
|
23
|
-
tokenDecimals: number;
|
|
24
|
-
buyAmount: number;
|
|
11
|
+
to: string;
|
|
12
|
+
amount: string;
|
|
25
13
|
}>, import("zod").ZodObject<{
|
|
26
|
-
|
|
14
|
+
maxSends: import("zod").ZodNumber;
|
|
15
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
27
16
|
}, "strip", import("zod").ZodTypeAny, {
|
|
28
|
-
|
|
17
|
+
maxSends: number;
|
|
18
|
+
timeWindowSeconds: number;
|
|
29
19
|
}, {
|
|
30
|
-
|
|
20
|
+
maxSends: number;
|
|
21
|
+
timeWindowSeconds: number;
|
|
31
22
|
}>, import("zod").ZodObject<{
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
currentCount: import("zod").ZodNumber;
|
|
24
|
+
maxSends: import("zod").ZodNumber;
|
|
25
|
+
remainingSends: import("zod").ZodNumber;
|
|
26
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
34
27
|
}, "strip", import("zod").ZodTypeAny, {
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
currentCount: number;
|
|
29
|
+
remainingSends: number;
|
|
30
|
+
maxSends: number;
|
|
31
|
+
timeWindowSeconds: number;
|
|
37
32
|
}, {
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
currentCount: number;
|
|
34
|
+
remainingSends: number;
|
|
35
|
+
maxSends: number;
|
|
36
|
+
timeWindowSeconds: number;
|
|
40
37
|
}>, import("zod").ZodObject<{
|
|
41
|
-
reason: import("zod").
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
reason: import("zod").ZodString;
|
|
39
|
+
currentCount: import("zod").ZodNumber;
|
|
40
|
+
maxSends: import("zod").ZodNumber;
|
|
41
|
+
secondsUntilReset: import("zod").ZodNumber;
|
|
44
42
|
}, "strip", import("zod").ZodTypeAny, {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
currentCount: number;
|
|
44
|
+
secondsUntilReset: number;
|
|
45
|
+
maxSends: number;
|
|
46
|
+
reason: string;
|
|
48
47
|
}, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
currentCount: number;
|
|
49
|
+
secondsUntilReset: number;
|
|
50
|
+
maxSends: number;
|
|
51
|
+
reason: string;
|
|
52
52
|
}>, import("zod").ZodObject<{
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
currentCount: import("zod").ZodNumber;
|
|
54
|
+
maxSends: import("zod").ZodNumber;
|
|
55
|
+
remainingSends: import("zod").ZodNumber;
|
|
56
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
55
57
|
}, "strip", import("zod").ZodTypeAny, {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
currentCount: number;
|
|
59
|
+
remainingSends: number;
|
|
60
|
+
maxSends: number;
|
|
61
|
+
timeWindowSeconds: number;
|
|
58
62
|
}, {
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
currentCount: number;
|
|
64
|
+
remainingSends: number;
|
|
65
|
+
maxSends: number;
|
|
66
|
+
timeWindowSeconds: number;
|
|
61
67
|
}>, import("zod").ZodObject<{
|
|
62
68
|
reason: import("zod").ZodString;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
currentCount: import("zod").ZodNumber;
|
|
70
|
+
maxSends: import("zod").ZodNumber;
|
|
71
|
+
secondsUntilReset: import("zod").ZodNumber;
|
|
72
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
73
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
74
|
+
currentCount: number;
|
|
75
|
+
secondsUntilReset: number;
|
|
76
|
+
maxSends: number;
|
|
77
|
+
timeWindowSeconds: number;
|
|
66
78
|
reason: string;
|
|
67
|
-
maxSpendingLimitInUsd?: number | undefined;
|
|
68
|
-
buyAmountInUsd?: number | undefined;
|
|
69
79
|
}, {
|
|
80
|
+
currentCount: number;
|
|
81
|
+
secondsUntilReset: number;
|
|
82
|
+
maxSends: number;
|
|
83
|
+
timeWindowSeconds: number;
|
|
70
84
|
reason: string;
|
|
71
|
-
maxSpendingLimitInUsd?: number | undefined;
|
|
72
|
-
buyAmountInUsd?: number | undefined;
|
|
73
85
|
}>, import("zod").ZodObject<{
|
|
74
|
-
|
|
75
|
-
|
|
86
|
+
currentCount: import("zod").ZodNumber;
|
|
87
|
+
maxSends: import("zod").ZodNumber;
|
|
88
|
+
remainingSends: import("zod").ZodNumber;
|
|
89
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
76
90
|
}, "strip", import("zod").ZodTypeAny, {
|
|
77
|
-
|
|
78
|
-
|
|
91
|
+
currentCount: number;
|
|
92
|
+
remainingSends: number;
|
|
93
|
+
maxSends: number;
|
|
94
|
+
timeWindowSeconds: number;
|
|
79
95
|
}, {
|
|
80
|
-
|
|
81
|
-
|
|
96
|
+
currentCount: number;
|
|
97
|
+
remainingSends: number;
|
|
98
|
+
maxSends: number;
|
|
99
|
+
timeWindowSeconds: number;
|
|
82
100
|
}>, import("zod").ZodObject<{
|
|
83
|
-
|
|
101
|
+
recorded: import("zod").ZodBoolean;
|
|
102
|
+
newCount: import("zod").ZodNumber;
|
|
103
|
+
remainingSends: import("zod").ZodNumber;
|
|
84
104
|
}, "strip", import("zod").ZodTypeAny, {
|
|
85
|
-
|
|
105
|
+
remainingSends: number;
|
|
106
|
+
recorded: boolean;
|
|
107
|
+
newCount: number;
|
|
86
108
|
}, {
|
|
87
|
-
|
|
109
|
+
remainingSends: number;
|
|
110
|
+
recorded: boolean;
|
|
111
|
+
newCount: number;
|
|
88
112
|
}>, import("zod").ZodObject<{
|
|
89
|
-
|
|
113
|
+
reason: import("zod").ZodString;
|
|
90
114
|
}, "strip", import("zod").ZodTypeAny, {
|
|
91
|
-
|
|
115
|
+
reason: string;
|
|
92
116
|
}, {
|
|
93
|
-
|
|
117
|
+
reason: string;
|
|
94
118
|
}>, import("node_modules/@lit-protocol/vincent-ability-sdk/dist/src/lib/types").PolicyLifecycleFunction<import("zod").ZodObject<{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
chainIdForUniswap: import("zod").ZodNumber;
|
|
98
|
-
tokenAddress: import("zod").ZodString;
|
|
99
|
-
tokenDecimals: import("zod").ZodNumber;
|
|
100
|
-
buyAmount: import("zod").ZodNumber;
|
|
119
|
+
to: import("zod").ZodString;
|
|
120
|
+
amount: import("zod").ZodString;
|
|
101
121
|
}, "strip", import("zod").ZodTypeAny, {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
chainIdForUniswap: number;
|
|
105
|
-
tokenAddress: string;
|
|
106
|
-
tokenDecimals: number;
|
|
107
|
-
buyAmount: number;
|
|
122
|
+
to: string;
|
|
123
|
+
amount: string;
|
|
108
124
|
}, {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
chainIdForUniswap: number;
|
|
112
|
-
tokenAddress: string;
|
|
113
|
-
tokenDecimals: number;
|
|
114
|
-
buyAmount: number;
|
|
125
|
+
to: string;
|
|
126
|
+
amount: string;
|
|
115
127
|
}>, import("zod").ZodObject<{
|
|
116
|
-
|
|
128
|
+
maxSends: import("zod").ZodNumber;
|
|
129
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
117
130
|
}, "strip", import("zod").ZodTypeAny, {
|
|
118
|
-
|
|
131
|
+
maxSends: number;
|
|
132
|
+
timeWindowSeconds: number;
|
|
119
133
|
}, {
|
|
120
|
-
|
|
134
|
+
maxSends: number;
|
|
135
|
+
timeWindowSeconds: number;
|
|
121
136
|
}>, import("zod").ZodObject<{
|
|
122
|
-
|
|
123
|
-
|
|
137
|
+
currentCount: import("zod").ZodNumber;
|
|
138
|
+
maxSends: import("zod").ZodNumber;
|
|
139
|
+
remainingSends: import("zod").ZodNumber;
|
|
140
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
124
141
|
}, "strip", import("zod").ZodTypeAny, {
|
|
125
|
-
|
|
126
|
-
|
|
142
|
+
currentCount: number;
|
|
143
|
+
remainingSends: number;
|
|
144
|
+
maxSends: number;
|
|
145
|
+
timeWindowSeconds: number;
|
|
127
146
|
}, {
|
|
128
|
-
|
|
129
|
-
|
|
147
|
+
currentCount: number;
|
|
148
|
+
remainingSends: number;
|
|
149
|
+
maxSends: number;
|
|
150
|
+
timeWindowSeconds: number;
|
|
130
151
|
}>, import("zod").ZodObject<{
|
|
131
152
|
reason: import("zod").ZodString;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
153
|
+
currentCount: import("zod").ZodNumber;
|
|
154
|
+
maxSends: import("zod").ZodNumber;
|
|
155
|
+
secondsUntilReset: import("zod").ZodNumber;
|
|
156
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
157
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
158
|
+
currentCount: number;
|
|
159
|
+
secondsUntilReset: number;
|
|
160
|
+
maxSends: number;
|
|
161
|
+
timeWindowSeconds: number;
|
|
135
162
|
reason: string;
|
|
136
|
-
maxSpendingLimitInUsd?: number | undefined;
|
|
137
|
-
buyAmountInUsd?: number | undefined;
|
|
138
163
|
}, {
|
|
164
|
+
currentCount: number;
|
|
165
|
+
secondsUntilReset: number;
|
|
166
|
+
maxSends: number;
|
|
167
|
+
timeWindowSeconds: number;
|
|
139
168
|
reason: string;
|
|
140
|
-
maxSpendingLimitInUsd?: number | undefined;
|
|
141
|
-
buyAmountInUsd?: number | undefined;
|
|
142
169
|
}>>, import("node_modules/@lit-protocol/vincent-ability-sdk/dist/src/lib/types").PolicyLifecycleFunction<import("zod").ZodObject<{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
chainIdForUniswap: import("zod").ZodNumber;
|
|
146
|
-
tokenAddress: import("zod").ZodString;
|
|
147
|
-
tokenDecimals: import("zod").ZodNumber;
|
|
148
|
-
buyAmount: import("zod").ZodNumber;
|
|
170
|
+
to: import("zod").ZodString;
|
|
171
|
+
amount: import("zod").ZodString;
|
|
149
172
|
}, "strip", import("zod").ZodTypeAny, {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
chainIdForUniswap: number;
|
|
153
|
-
tokenAddress: string;
|
|
154
|
-
tokenDecimals: number;
|
|
155
|
-
buyAmount: number;
|
|
173
|
+
to: string;
|
|
174
|
+
amount: string;
|
|
156
175
|
}, {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
chainIdForUniswap: number;
|
|
160
|
-
tokenAddress: string;
|
|
161
|
-
tokenDecimals: number;
|
|
162
|
-
buyAmount: number;
|
|
176
|
+
to: string;
|
|
177
|
+
amount: string;
|
|
163
178
|
}>, import("zod").ZodObject<{
|
|
164
|
-
|
|
179
|
+
maxSends: import("zod").ZodNumber;
|
|
180
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
165
181
|
}, "strip", import("zod").ZodTypeAny, {
|
|
166
|
-
|
|
182
|
+
maxSends: number;
|
|
183
|
+
timeWindowSeconds: number;
|
|
167
184
|
}, {
|
|
168
|
-
|
|
185
|
+
maxSends: number;
|
|
186
|
+
timeWindowSeconds: number;
|
|
169
187
|
}>, import("zod").ZodObject<{
|
|
170
|
-
|
|
171
|
-
|
|
188
|
+
currentCount: import("zod").ZodNumber;
|
|
189
|
+
maxSends: import("zod").ZodNumber;
|
|
190
|
+
remainingSends: import("zod").ZodNumber;
|
|
191
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
172
192
|
}, "strip", import("zod").ZodTypeAny, {
|
|
173
|
-
|
|
174
|
-
|
|
193
|
+
currentCount: number;
|
|
194
|
+
remainingSends: number;
|
|
195
|
+
maxSends: number;
|
|
196
|
+
timeWindowSeconds: number;
|
|
175
197
|
}, {
|
|
176
|
-
|
|
177
|
-
|
|
198
|
+
currentCount: number;
|
|
199
|
+
remainingSends: number;
|
|
200
|
+
maxSends: number;
|
|
201
|
+
timeWindowSeconds: number;
|
|
178
202
|
}>, import("zod").ZodObject<{
|
|
179
|
-
reason: import("zod").
|
|
180
|
-
|
|
181
|
-
|
|
203
|
+
reason: import("zod").ZodString;
|
|
204
|
+
currentCount: import("zod").ZodNumber;
|
|
205
|
+
maxSends: import("zod").ZodNumber;
|
|
206
|
+
secondsUntilReset: import("zod").ZodNumber;
|
|
182
207
|
}, "strip", import("zod").ZodTypeAny, {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
208
|
+
currentCount: number;
|
|
209
|
+
secondsUntilReset: number;
|
|
210
|
+
maxSends: number;
|
|
211
|
+
reason: string;
|
|
186
212
|
}, {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
213
|
+
currentCount: number;
|
|
214
|
+
secondsUntilReset: number;
|
|
215
|
+
maxSends: number;
|
|
216
|
+
reason: string;
|
|
190
217
|
}>>, import("node_modules/@lit-protocol/vincent-ability-sdk/dist/src/lib/types").CommitLifecycleFunction<import("zod").ZodObject<{
|
|
191
|
-
|
|
192
|
-
|
|
218
|
+
currentCount: import("zod").ZodNumber;
|
|
219
|
+
maxSends: import("zod").ZodNumber;
|
|
220
|
+
remainingSends: import("zod").ZodNumber;
|
|
221
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
193
222
|
}, "strip", import("zod").ZodTypeAny, {
|
|
194
|
-
|
|
195
|
-
|
|
223
|
+
currentCount: number;
|
|
224
|
+
remainingSends: number;
|
|
225
|
+
maxSends: number;
|
|
226
|
+
timeWindowSeconds: number;
|
|
196
227
|
}, {
|
|
197
|
-
|
|
198
|
-
|
|
228
|
+
currentCount: number;
|
|
229
|
+
remainingSends: number;
|
|
230
|
+
maxSends: number;
|
|
231
|
+
timeWindowSeconds: number;
|
|
199
232
|
}>, import("zod").ZodObject<{
|
|
200
|
-
|
|
233
|
+
recorded: import("zod").ZodBoolean;
|
|
234
|
+
newCount: import("zod").ZodNumber;
|
|
235
|
+
remainingSends: import("zod").ZodNumber;
|
|
201
236
|
}, "strip", import("zod").ZodTypeAny, {
|
|
202
|
-
|
|
237
|
+
remainingSends: number;
|
|
238
|
+
recorded: boolean;
|
|
239
|
+
newCount: number;
|
|
203
240
|
}, {
|
|
204
|
-
|
|
241
|
+
remainingSends: number;
|
|
242
|
+
recorded: boolean;
|
|
243
|
+
newCount: number;
|
|
205
244
|
}>, import("zod").ZodObject<{
|
|
206
|
-
|
|
245
|
+
reason: import("zod").ZodString;
|
|
207
246
|
}, "strip", import("zod").ZodTypeAny, {
|
|
208
|
-
|
|
247
|
+
reason: string;
|
|
209
248
|
}, {
|
|
210
|
-
|
|
249
|
+
reason: string;
|
|
211
250
|
}>>>, string>;
|
|
212
251
|
//# sourceMappingURL=vincent-bundled-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vincent-bundled-policy.d.ts","sourceRoot":"","sources":["../../../src/generated/vincent-bundled-policy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"vincent-bundled-policy.d.ts","sourceRoot":"","sources":["../../../src/generated/vincent-bundled-policy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAA0D,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare const counterSignatures: {
|
|
2
|
+
readonly address: "0x91670f6ce98353815278b4b21f11222dec14fefe";
|
|
3
|
+
readonly methods: {
|
|
4
|
+
readonly counterByAddress: {
|
|
5
|
+
readonly type: "function";
|
|
6
|
+
readonly name: "counterByAddress";
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly name: "";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
readonly internalType: "address";
|
|
11
|
+
}];
|
|
12
|
+
readonly outputs: readonly [{
|
|
13
|
+
readonly name: "";
|
|
14
|
+
readonly type: "uint256";
|
|
15
|
+
readonly internalType: "uint256";
|
|
16
|
+
}];
|
|
17
|
+
readonly stateMutability: "view";
|
|
18
|
+
};
|
|
19
|
+
readonly getCounter: {
|
|
20
|
+
readonly type: "function";
|
|
21
|
+
readonly name: "getCounter";
|
|
22
|
+
readonly inputs: readonly [{
|
|
23
|
+
readonly name: "addr";
|
|
24
|
+
readonly type: "address";
|
|
25
|
+
readonly internalType: "address";
|
|
26
|
+
}];
|
|
27
|
+
readonly outputs: readonly [{
|
|
28
|
+
readonly name: "";
|
|
29
|
+
readonly type: "uint256";
|
|
30
|
+
readonly internalType: "uint256";
|
|
31
|
+
}];
|
|
32
|
+
readonly stateMutability: "view";
|
|
33
|
+
};
|
|
34
|
+
readonly getLastIncrementTime: {
|
|
35
|
+
readonly type: "function";
|
|
36
|
+
readonly name: "getLastIncrementTime";
|
|
37
|
+
readonly inputs: readonly [{
|
|
38
|
+
readonly name: "addr";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
readonly internalType: "address";
|
|
41
|
+
}];
|
|
42
|
+
readonly outputs: readonly [{
|
|
43
|
+
readonly name: "";
|
|
44
|
+
readonly type: "uint256";
|
|
45
|
+
readonly internalType: "uint256";
|
|
46
|
+
}];
|
|
47
|
+
readonly stateMutability: "view";
|
|
48
|
+
};
|
|
49
|
+
readonly increment: {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly name: "increment";
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly outputs: readonly [];
|
|
54
|
+
readonly stateMutability: "nonpayable";
|
|
55
|
+
};
|
|
56
|
+
readonly lastIncrementTime: {
|
|
57
|
+
readonly type: "function";
|
|
58
|
+
readonly name: "lastIncrementTime";
|
|
59
|
+
readonly inputs: readonly [{
|
|
60
|
+
readonly name: "";
|
|
61
|
+
readonly type: "address";
|
|
62
|
+
readonly internalType: "address";
|
|
63
|
+
}];
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly name: "";
|
|
66
|
+
readonly type: "uint256";
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
}];
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
};
|
|
71
|
+
readonly reset: {
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
readonly name: "reset";
|
|
74
|
+
readonly inputs: readonly [];
|
|
75
|
+
readonly outputs: readonly [];
|
|
76
|
+
readonly stateMutability: "nonpayable";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly events: readonly [];
|
|
80
|
+
};
|
|
81
|
+
export type CounterSignatures = typeof counterSignatures;
|
|
82
|
+
//# sourceMappingURL=counterSignatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counterSignatures.d.ts","sourceRoot":"","sources":["../../../../src/lib/abi/counterSignatures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.counterSignatures = void 0;
|
|
4
|
+
exports.counterSignatures = {
|
|
5
|
+
address: '0x91670f6ce98353815278b4b21f11222dec14fefe',
|
|
6
|
+
methods: {
|
|
7
|
+
counterByAddress: {
|
|
8
|
+
type: 'function',
|
|
9
|
+
name: 'counterByAddress',
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
name: '',
|
|
13
|
+
type: 'address',
|
|
14
|
+
internalType: 'address',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
outputs: [
|
|
18
|
+
{
|
|
19
|
+
name: '',
|
|
20
|
+
type: 'uint256',
|
|
21
|
+
internalType: 'uint256',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
stateMutability: 'view',
|
|
25
|
+
},
|
|
26
|
+
getCounter: {
|
|
27
|
+
type: 'function',
|
|
28
|
+
name: 'getCounter',
|
|
29
|
+
inputs: [
|
|
30
|
+
{
|
|
31
|
+
name: 'addr',
|
|
32
|
+
type: 'address',
|
|
33
|
+
internalType: 'address',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
outputs: [
|
|
37
|
+
{
|
|
38
|
+
name: '',
|
|
39
|
+
type: 'uint256',
|
|
40
|
+
internalType: 'uint256',
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
stateMutability: 'view',
|
|
44
|
+
},
|
|
45
|
+
getLastIncrementTime: {
|
|
46
|
+
type: 'function',
|
|
47
|
+
name: 'getLastIncrementTime',
|
|
48
|
+
inputs: [
|
|
49
|
+
{
|
|
50
|
+
name: 'addr',
|
|
51
|
+
type: 'address',
|
|
52
|
+
internalType: 'address',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
outputs: [
|
|
56
|
+
{
|
|
57
|
+
name: '',
|
|
58
|
+
type: 'uint256',
|
|
59
|
+
internalType: 'uint256',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
stateMutability: 'view',
|
|
63
|
+
},
|
|
64
|
+
increment: {
|
|
65
|
+
type: 'function',
|
|
66
|
+
name: 'increment',
|
|
67
|
+
inputs: [],
|
|
68
|
+
outputs: [],
|
|
69
|
+
stateMutability: 'nonpayable',
|
|
70
|
+
},
|
|
71
|
+
lastIncrementTime: {
|
|
72
|
+
type: 'function',
|
|
73
|
+
name: 'lastIncrementTime',
|
|
74
|
+
inputs: [
|
|
75
|
+
{
|
|
76
|
+
name: '',
|
|
77
|
+
type: 'address',
|
|
78
|
+
internalType: 'address',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
outputs: [
|
|
82
|
+
{
|
|
83
|
+
name: '',
|
|
84
|
+
type: 'uint256',
|
|
85
|
+
internalType: 'uint256',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
stateMutability: 'view',
|
|
89
|
+
},
|
|
90
|
+
reset: {
|
|
91
|
+
type: 'function',
|
|
92
|
+
name: 'reset',
|
|
93
|
+
inputs: [],
|
|
94
|
+
outputs: [],
|
|
95
|
+
stateMutability: 'nonpayable',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
events: [],
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=counterSignatures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"counterSignatures.js","sourceRoot":"","sources":["../../../../src/lib/abi/counterSignatures.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,OAAO,EAAE,4CAA4C;IACrD,OAAO,EAAE;QACP,gBAAgB,EAAE;YAChB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,eAAe,EAAE,MAAM;SACxB;QACD,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,eAAe,EAAE,MAAM;SACxB;QACD,oBAAoB,EAAE;YACpB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,sBAAsB;YAC5B,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,eAAe,EAAE,MAAM;SACxB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,YAAY;SAC9B;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,YAAY,EAAE,SAAS;iBACxB;aACF;YACD,eAAe,EAAE,MAAM;SACxB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,YAAY;SAC9B;KACF;IACD,MAAM,EAAE,EAAE;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper functions for the send-counter-limit policy
|
|
3
|
+
* Integrates with the Counter smart contract to track send limits
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Check how many sends a user has made and if they can send again
|
|
7
|
+
* @param userAddress - The user's address (PKP address)
|
|
8
|
+
* @param maxSends - Maximum number of sends allowed
|
|
9
|
+
* @param timeWindowSeconds - Time window in seconds before reset
|
|
10
|
+
* @returns Send limit status and timing information
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkSendLimit(userAddress: string, maxSends: number, timeWindowSeconds: number): Promise<{
|
|
13
|
+
allowed: boolean;
|
|
14
|
+
currentCount: number;
|
|
15
|
+
remainingSends: number;
|
|
16
|
+
shouldReset?: boolean;
|
|
17
|
+
secondsUntilReset?: number;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Reset the send counter for a user by calling reset on the
|
|
21
|
+
contract
|
|
22
|
+
* @param userAddress - The user's address (PKP address)
|
|
23
|
+
* @param pkpPublicKey - The PKP public key for signing
|
|
24
|
+
*/
|
|
25
|
+
export declare function resetSendCounter(userAddress: string, pkpPublicKey: string): Promise<string>;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/helpers/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC,CA2ED;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BjG"}
|