@mysten/zksend 0.2.2 → 0.3.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 +15 -0
- package/dist/cjs/channel/events.d.ts +54 -54
- package/dist/cjs/channel/index.d.ts +4 -4
- package/dist/cjs/index.d.ts +4 -1
- package/dist/cjs/index.js +13 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/index.test.d.ts +9 -1
- package/dist/cjs/links/builder.d.ts +41 -0
- package/dist/cjs/links/builder.js +264 -0
- package/dist/cjs/links/builder.js.map +7 -0
- package/dist/cjs/links/claim.d.ts +77 -0
- package/dist/cjs/links/claim.js +520 -0
- package/dist/cjs/links/claim.js.map +7 -0
- package/dist/cjs/links/utils.d.ts +17 -0
- package/dist/cjs/links/utils.js +133 -0
- package/dist/cjs/links/utils.js.map +7 -0
- package/dist/cjs/links/zk-bag.d.ts +79 -0
- package/dist/cjs/links/zk-bag.js +129 -0
- package/dist/cjs/links/zk-bag.js.map +7 -0
- package/dist/esm/channel/events.d.ts +54 -54
- package/dist/esm/channel/index.d.ts +4 -4
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +11 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.test.d.ts +9 -1
- package/dist/esm/links/builder.d.ts +41 -0
- package/dist/esm/links/builder.js +244 -0
- package/dist/esm/links/builder.js.map +7 -0
- package/dist/esm/links/claim.d.ts +77 -0
- package/dist/esm/links/claim.js +508 -0
- package/dist/esm/links/claim.js.map +7 -0
- package/dist/esm/links/utils.d.ts +17 -0
- package/dist/esm/links/utils.js +113 -0
- package/dist/esm/links/utils.js.map +7 -0
- package/dist/esm/links/zk-bag.d.ts +79 -0
- package/dist/esm/links/zk-bag.js +109 -0
- package/dist/esm/links/zk-bag.js.map +7 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -5
- package/dist/cjs/links.d.ts +0 -80
- package/dist/cjs/links.js +0 -374
- package/dist/cjs/links.js.map +0 -7
- package/dist/esm/links.d.ts +0 -80
- package/dist/esm/links.js +0 -362
- package/dist/esm/links.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @mysten/zksend
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3b1da3967a: Add support for contract based links
|
|
8
|
+
|
|
9
|
+
## 0.2.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [0cafa94027]
|
|
14
|
+
- Updated dependencies [437f0ca2ef]
|
|
15
|
+
- @mysten/sui.js@0.51.0
|
|
16
|
+
- @mysten/wallet-standard@0.11.0
|
|
17
|
+
|
|
3
18
|
## 0.2.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -8,27 +8,27 @@ export declare const ZkSendRequestData: import("valibot").VariantSchema<"type",
|
|
|
8
8
|
data: import("valibot").StringSchema<string>;
|
|
9
9
|
address: import("valibot").StringSchema<string>;
|
|
10
10
|
}, undefined, {
|
|
11
|
-
type: "sign-transaction-block";
|
|
12
|
-
data: string;
|
|
13
11
|
address: string;
|
|
12
|
+
data: string;
|
|
13
|
+
type: "sign-transaction-block";
|
|
14
14
|
}>, import("valibot").ObjectSchema<{
|
|
15
15
|
type: import("valibot").LiteralSchema<"sign-personal-message", "sign-personal-message">;
|
|
16
16
|
bytes: import("valibot").StringSchema<string>;
|
|
17
17
|
address: import("valibot").StringSchema<string>;
|
|
18
18
|
}, undefined, {
|
|
19
|
-
type: "sign-personal-message";
|
|
20
19
|
address: string;
|
|
21
20
|
bytes: string;
|
|
21
|
+
type: "sign-personal-message";
|
|
22
22
|
}>], {
|
|
23
23
|
type: "connect";
|
|
24
24
|
} | {
|
|
25
|
-
type: "sign-transaction-block";
|
|
26
|
-
data: string;
|
|
27
25
|
address: string;
|
|
26
|
+
data: string;
|
|
27
|
+
type: "sign-transaction-block";
|
|
28
28
|
} | {
|
|
29
|
-
type: "sign-personal-message";
|
|
30
29
|
address: string;
|
|
31
30
|
bytes: string;
|
|
31
|
+
type: "sign-personal-message";
|
|
32
32
|
}>;
|
|
33
33
|
export type ZkSendRequestData = Output<typeof ZkSendRequestData>;
|
|
34
34
|
export declare const ZkSendRequest: import("valibot").ObjectSchema<{
|
|
@@ -44,41 +44,41 @@ export declare const ZkSendRequest: import("valibot").ObjectSchema<{
|
|
|
44
44
|
data: import("valibot").StringSchema<string>;
|
|
45
45
|
address: import("valibot").StringSchema<string>;
|
|
46
46
|
}, undefined, {
|
|
47
|
-
type: "sign-transaction-block";
|
|
48
|
-
data: string;
|
|
49
47
|
address: string;
|
|
48
|
+
data: string;
|
|
49
|
+
type: "sign-transaction-block";
|
|
50
50
|
}>, import("valibot").ObjectSchema<{
|
|
51
51
|
type: import("valibot").LiteralSchema<"sign-personal-message", "sign-personal-message">;
|
|
52
52
|
bytes: import("valibot").StringSchema<string>;
|
|
53
53
|
address: import("valibot").StringSchema<string>;
|
|
54
54
|
}, undefined, {
|
|
55
|
-
type: "sign-personal-message";
|
|
56
55
|
address: string;
|
|
57
56
|
bytes: string;
|
|
57
|
+
type: "sign-personal-message";
|
|
58
58
|
}>], {
|
|
59
59
|
type: "connect";
|
|
60
60
|
} | {
|
|
61
|
-
type: "sign-transaction-block";
|
|
62
|
-
data: string;
|
|
63
61
|
address: string;
|
|
62
|
+
data: string;
|
|
63
|
+
type: "sign-transaction-block";
|
|
64
64
|
} | {
|
|
65
|
-
type: "sign-personal-message";
|
|
66
65
|
address: string;
|
|
67
66
|
bytes: string;
|
|
67
|
+
type: "sign-personal-message";
|
|
68
68
|
}>;
|
|
69
69
|
}, undefined, {
|
|
70
|
-
origin: string;
|
|
71
70
|
id: string;
|
|
71
|
+
origin: string;
|
|
72
72
|
payload: {
|
|
73
73
|
type: "connect";
|
|
74
74
|
} | {
|
|
75
|
-
type: "sign-transaction-block";
|
|
76
|
-
data: string;
|
|
77
75
|
address: string;
|
|
76
|
+
data: string;
|
|
77
|
+
type: "sign-transaction-block";
|
|
78
78
|
} | {
|
|
79
|
-
type: "sign-personal-message";
|
|
80
79
|
address: string;
|
|
81
80
|
bytes: string;
|
|
81
|
+
type: "sign-personal-message";
|
|
82
82
|
};
|
|
83
83
|
name?: string | undefined;
|
|
84
84
|
}>;
|
|
@@ -87,35 +87,35 @@ export declare const ZkSendResponseData: import("valibot").VariantSchema<"type",
|
|
|
87
87
|
type: import("valibot").LiteralSchema<"connect", "connect">;
|
|
88
88
|
address: import("valibot").StringSchema<string>;
|
|
89
89
|
}, undefined, {
|
|
90
|
-
type: "connect";
|
|
91
90
|
address: string;
|
|
91
|
+
type: "connect";
|
|
92
92
|
}>, import("valibot").ObjectSchema<{
|
|
93
93
|
type: import("valibot").LiteralSchema<"sign-transaction-block", "sign-transaction-block">;
|
|
94
94
|
bytes: import("valibot").StringSchema<string>;
|
|
95
95
|
signature: import("valibot").StringSchema<string>;
|
|
96
96
|
}, undefined, {
|
|
97
97
|
signature: string;
|
|
98
|
-
type: "sign-transaction-block";
|
|
99
98
|
bytes: string;
|
|
99
|
+
type: "sign-transaction-block";
|
|
100
100
|
}>, import("valibot").ObjectSchema<{
|
|
101
101
|
type: import("valibot").LiteralSchema<"sign-personal-message", "sign-personal-message">;
|
|
102
102
|
bytes: import("valibot").StringSchema<string>;
|
|
103
103
|
signature: import("valibot").StringSchema<string>;
|
|
104
104
|
}, undefined, {
|
|
105
105
|
signature: string;
|
|
106
|
-
type: "sign-personal-message";
|
|
107
106
|
bytes: string;
|
|
107
|
+
type: "sign-personal-message";
|
|
108
108
|
}>], {
|
|
109
|
-
type: "connect";
|
|
110
109
|
address: string;
|
|
110
|
+
type: "connect";
|
|
111
111
|
} | {
|
|
112
112
|
signature: string;
|
|
113
|
-
type: "sign-transaction-block";
|
|
114
113
|
bytes: string;
|
|
114
|
+
type: "sign-transaction-block";
|
|
115
115
|
} | {
|
|
116
116
|
signature: string;
|
|
117
|
-
type: "sign-personal-message";
|
|
118
117
|
bytes: string;
|
|
118
|
+
type: "sign-personal-message";
|
|
119
119
|
}>;
|
|
120
120
|
export type ZkSendResponseData = Output<typeof ZkSendResponseData>;
|
|
121
121
|
export declare const ZkSendResponsePayload: import("valibot").VariantSchema<"type", [import("valibot").ObjectSchema<{
|
|
@@ -128,66 +128,66 @@ export declare const ZkSendResponsePayload: import("valibot").VariantSchema<"typ
|
|
|
128
128
|
type: import("valibot").LiteralSchema<"connect", "connect">;
|
|
129
129
|
address: import("valibot").StringSchema<string>;
|
|
130
130
|
}, undefined, {
|
|
131
|
-
type: "connect";
|
|
132
131
|
address: string;
|
|
132
|
+
type: "connect";
|
|
133
133
|
}>, import("valibot").ObjectSchema<{
|
|
134
134
|
type: import("valibot").LiteralSchema<"sign-transaction-block", "sign-transaction-block">;
|
|
135
135
|
bytes: import("valibot").StringSchema<string>;
|
|
136
136
|
signature: import("valibot").StringSchema<string>;
|
|
137
137
|
}, undefined, {
|
|
138
138
|
signature: string;
|
|
139
|
-
type: "sign-transaction-block";
|
|
140
139
|
bytes: string;
|
|
140
|
+
type: "sign-transaction-block";
|
|
141
141
|
}>, import("valibot").ObjectSchema<{
|
|
142
142
|
type: import("valibot").LiteralSchema<"sign-personal-message", "sign-personal-message">;
|
|
143
143
|
bytes: import("valibot").StringSchema<string>;
|
|
144
144
|
signature: import("valibot").StringSchema<string>;
|
|
145
145
|
}, undefined, {
|
|
146
146
|
signature: string;
|
|
147
|
-
type: "sign-personal-message";
|
|
148
147
|
bytes: string;
|
|
148
|
+
type: "sign-personal-message";
|
|
149
149
|
}>], {
|
|
150
|
-
type: "connect";
|
|
151
150
|
address: string;
|
|
151
|
+
type: "connect";
|
|
152
152
|
} | {
|
|
153
153
|
signature: string;
|
|
154
|
-
type: "sign-transaction-block";
|
|
155
154
|
bytes: string;
|
|
155
|
+
type: "sign-transaction-block";
|
|
156
156
|
} | {
|
|
157
157
|
signature: string;
|
|
158
|
-
type: "sign-personal-message";
|
|
159
158
|
bytes: string;
|
|
159
|
+
type: "sign-personal-message";
|
|
160
160
|
}>;
|
|
161
161
|
}, undefined, {
|
|
162
|
-
type: "resolve";
|
|
163
162
|
data: {
|
|
164
|
-
type: "connect";
|
|
165
163
|
address: string;
|
|
164
|
+
type: "connect";
|
|
166
165
|
} | {
|
|
167
166
|
signature: string;
|
|
168
|
-
type: "sign-transaction-block";
|
|
169
167
|
bytes: string;
|
|
168
|
+
type: "sign-transaction-block";
|
|
170
169
|
} | {
|
|
171
170
|
signature: string;
|
|
172
|
-
type: "sign-personal-message";
|
|
173
171
|
bytes: string;
|
|
172
|
+
type: "sign-personal-message";
|
|
174
173
|
};
|
|
174
|
+
type: "resolve";
|
|
175
175
|
}>], {
|
|
176
176
|
type: "reject";
|
|
177
177
|
} | {
|
|
178
|
-
type: "resolve";
|
|
179
178
|
data: {
|
|
180
|
-
type: "connect";
|
|
181
179
|
address: string;
|
|
180
|
+
type: "connect";
|
|
182
181
|
} | {
|
|
183
182
|
signature: string;
|
|
184
|
-
type: "sign-transaction-block";
|
|
185
183
|
bytes: string;
|
|
184
|
+
type: "sign-transaction-block";
|
|
186
185
|
} | {
|
|
187
186
|
signature: string;
|
|
188
|
-
type: "sign-personal-message";
|
|
189
187
|
bytes: string;
|
|
188
|
+
type: "sign-personal-message";
|
|
190
189
|
};
|
|
190
|
+
type: "resolve";
|
|
191
191
|
}>;
|
|
192
192
|
export type ZkSendResponsePayload = Output<typeof ZkSendResponsePayload>;
|
|
193
193
|
export declare const ZkSendResponse: import("valibot").ObjectSchema<{
|
|
@@ -203,85 +203,85 @@ export declare const ZkSendResponse: import("valibot").ObjectSchema<{
|
|
|
203
203
|
type: import("valibot").LiteralSchema<"connect", "connect">;
|
|
204
204
|
address: import("valibot").StringSchema<string>;
|
|
205
205
|
}, undefined, {
|
|
206
|
-
type: "connect";
|
|
207
206
|
address: string;
|
|
207
|
+
type: "connect";
|
|
208
208
|
}>, import("valibot").ObjectSchema<{
|
|
209
209
|
type: import("valibot").LiteralSchema<"sign-transaction-block", "sign-transaction-block">;
|
|
210
210
|
bytes: import("valibot").StringSchema<string>;
|
|
211
211
|
signature: import("valibot").StringSchema<string>;
|
|
212
212
|
}, undefined, {
|
|
213
213
|
signature: string;
|
|
214
|
-
type: "sign-transaction-block";
|
|
215
214
|
bytes: string;
|
|
215
|
+
type: "sign-transaction-block";
|
|
216
216
|
}>, import("valibot").ObjectSchema<{
|
|
217
217
|
type: import("valibot").LiteralSchema<"sign-personal-message", "sign-personal-message">;
|
|
218
218
|
bytes: import("valibot").StringSchema<string>;
|
|
219
219
|
signature: import("valibot").StringSchema<string>;
|
|
220
220
|
}, undefined, {
|
|
221
221
|
signature: string;
|
|
222
|
-
type: "sign-personal-message";
|
|
223
222
|
bytes: string;
|
|
223
|
+
type: "sign-personal-message";
|
|
224
224
|
}>], {
|
|
225
|
-
type: "connect";
|
|
226
225
|
address: string;
|
|
226
|
+
type: "connect";
|
|
227
227
|
} | {
|
|
228
228
|
signature: string;
|
|
229
|
-
type: "sign-transaction-block";
|
|
230
229
|
bytes: string;
|
|
230
|
+
type: "sign-transaction-block";
|
|
231
231
|
} | {
|
|
232
232
|
signature: string;
|
|
233
|
-
type: "sign-personal-message";
|
|
234
233
|
bytes: string;
|
|
234
|
+
type: "sign-personal-message";
|
|
235
235
|
}>;
|
|
236
236
|
}, undefined, {
|
|
237
|
-
type: "resolve";
|
|
238
237
|
data: {
|
|
239
|
-
type: "connect";
|
|
240
238
|
address: string;
|
|
239
|
+
type: "connect";
|
|
241
240
|
} | {
|
|
242
241
|
signature: string;
|
|
243
|
-
type: "sign-transaction-block";
|
|
244
242
|
bytes: string;
|
|
243
|
+
type: "sign-transaction-block";
|
|
245
244
|
} | {
|
|
246
245
|
signature: string;
|
|
247
|
-
type: "sign-personal-message";
|
|
248
246
|
bytes: string;
|
|
247
|
+
type: "sign-personal-message";
|
|
249
248
|
};
|
|
249
|
+
type: "resolve";
|
|
250
250
|
}>], {
|
|
251
251
|
type: "reject";
|
|
252
252
|
} | {
|
|
253
|
-
type: "resolve";
|
|
254
253
|
data: {
|
|
255
|
-
type: "connect";
|
|
256
254
|
address: string;
|
|
255
|
+
type: "connect";
|
|
257
256
|
} | {
|
|
258
257
|
signature: string;
|
|
259
|
-
type: "sign-transaction-block";
|
|
260
258
|
bytes: string;
|
|
259
|
+
type: "sign-transaction-block";
|
|
261
260
|
} | {
|
|
262
261
|
signature: string;
|
|
263
|
-
type: "sign-personal-message";
|
|
264
262
|
bytes: string;
|
|
263
|
+
type: "sign-personal-message";
|
|
265
264
|
};
|
|
265
|
+
type: "resolve";
|
|
266
266
|
}>;
|
|
267
267
|
}, undefined, {
|
|
268
268
|
id: string;
|
|
269
269
|
payload: {
|
|
270
270
|
type: "reject";
|
|
271
271
|
} | {
|
|
272
|
-
type: "resolve";
|
|
273
272
|
data: {
|
|
274
|
-
type: "connect";
|
|
275
273
|
address: string;
|
|
274
|
+
type: "connect";
|
|
276
275
|
} | {
|
|
277
276
|
signature: string;
|
|
278
|
-
type: "sign-transaction-block";
|
|
279
277
|
bytes: string;
|
|
278
|
+
type: "sign-transaction-block";
|
|
280
279
|
} | {
|
|
281
280
|
signature: string;
|
|
282
|
-
type: "sign-personal-message";
|
|
283
281
|
bytes: string;
|
|
282
|
+
type: "sign-personal-message";
|
|
284
283
|
};
|
|
284
|
+
type: "resolve";
|
|
285
285
|
};
|
|
286
286
|
source: "zksend-channel";
|
|
287
287
|
}>;
|
|
@@ -18,18 +18,18 @@ export declare class ZkSendHost {
|
|
|
18
18
|
constructor(request: Output<typeof ZkSendRequest>);
|
|
19
19
|
static fromUrl(url?: string): ZkSendHost;
|
|
20
20
|
getRequestData(): {
|
|
21
|
-
origin: string;
|
|
22
21
|
id: string;
|
|
22
|
+
origin: string;
|
|
23
23
|
payload: {
|
|
24
24
|
type: "connect";
|
|
25
25
|
} | {
|
|
26
|
-
type: "sign-transaction-block";
|
|
27
|
-
data: string;
|
|
28
26
|
address: string;
|
|
27
|
+
data: string;
|
|
28
|
+
type: "sign-transaction-block";
|
|
29
29
|
} | {
|
|
30
|
-
type: "sign-personal-message";
|
|
31
30
|
address: string;
|
|
32
31
|
bytes: string;
|
|
32
|
+
type: "sign-personal-message";
|
|
33
33
|
};
|
|
34
34
|
name?: string | undefined;
|
|
35
35
|
};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ZkSendLinkBuilder, type ZkSendLinkBuilderOptions, type CreateZkSendLinkOptions, } from './links/builder.js';
|
|
2
|
+
export { ZkSendLink, type ZkSendLinkOptions } from './links/claim.js';
|
|
3
|
+
export { type ZkBagContractOptions } from './links/zk-bag.js';
|
|
4
|
+
export { listCreatedLinks } from './links/utils.js';
|
|
2
5
|
export * from './wallet.js';
|
|
3
6
|
export * from './channel/index.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -14,8 +18,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
18
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
20
|
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
ZkSendLink: () => import_claim.ZkSendLink,
|
|
23
|
+
ZkSendLinkBuilder: () => import_builder.ZkSendLinkBuilder,
|
|
24
|
+
listCreatedLinks: () => import_utils.listCreatedLinks
|
|
25
|
+
});
|
|
17
26
|
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
|
|
27
|
+
var import_builder = require("./links/builder.js");
|
|
28
|
+
var import_claim = require("./links/claim.js");
|
|
29
|
+
var import_zk_bag = require("./links/zk-bag.js");
|
|
30
|
+
var import_utils = require("./links/utils.js");
|
|
19
31
|
__reExport(src_exports, require("./wallet.js"), module.exports);
|
|
20
32
|
__reExport(src_exports, require("./channel/index.js"), module.exports);
|
|
21
33
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nexport {\n\tZkSendLinkBuilder,\n\ttype ZkSendLinkBuilderOptions,\n\ttype CreateZkSendLinkOptions,\n} from './links/builder.js';\nexport { ZkSendLink, type ZkSendLinkOptions } from './links/claim.js';\nexport { type ZkBagContractOptions } from './links/zk-bag.js';\nexport { listCreatedLinks } from './links/utils.js';\nexport * from './wallet.js';\nexport * from './channel/index.js';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAIO;AACP,mBAAmD;AACnD,oBAA0C;AAC1C,mBAAiC;AACjC,wBAAc,wBAXd;AAYA,wBAAc,+BAZd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.test.d.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SuiClient } from '@mysten/sui.js/client';
|
|
2
|
+
import type { Keypair, Signer } from '@mysten/sui.js/cryptography';
|
|
3
|
+
import type { TransactionObjectInput } from '@mysten/sui.js/transactions';
|
|
4
|
+
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
5
|
+
import type { ZkBagContractOptions } from './zk-bag.js';
|
|
6
|
+
interface ZkSendLinkRedirect {
|
|
7
|
+
url: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ZkSendLinkBuilderOptions {
|
|
11
|
+
host?: string;
|
|
12
|
+
path?: string;
|
|
13
|
+
keypair?: Keypair;
|
|
14
|
+
network?: 'mainnet' | 'testnet';
|
|
15
|
+
client?: SuiClient;
|
|
16
|
+
sender: string;
|
|
17
|
+
redirect?: ZkSendLinkRedirect;
|
|
18
|
+
contract?: ZkBagContractOptions;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateZkSendLinkOptions {
|
|
21
|
+
transactionBlock?: TransactionBlock;
|
|
22
|
+
calculateGas?: (options: {
|
|
23
|
+
balances: Map<string, bigint>;
|
|
24
|
+
objects: TransactionObjectInput[];
|
|
25
|
+
gasEstimateFromDryRun: bigint;
|
|
26
|
+
}) => Promise<bigint> | bigint;
|
|
27
|
+
}
|
|
28
|
+
export declare class ZkSendLinkBuilder {
|
|
29
|
+
#private;
|
|
30
|
+
constructor({ host, path, keypair, network, client, sender, redirect, contract, }: ZkSendLinkBuilderOptions);
|
|
31
|
+
addClaimableMist(amount: bigint): void;
|
|
32
|
+
addClaimableBalance(coinType: string, amount: bigint): void;
|
|
33
|
+
addClaimableObject(id: string): void;
|
|
34
|
+
getLink(): string;
|
|
35
|
+
create({ signer, ...options }: CreateZkSendLinkOptions & {
|
|
36
|
+
signer: Signer;
|
|
37
|
+
waitForTransactionBlock?: boolean;
|
|
38
|
+
}): Promise<import("@mysten/sui.js/client").SuiTransactionBlockResponse>;
|
|
39
|
+
createSendTransaction({ transactionBlock: txb, calculateGas, }?: CreateZkSendLinkOptions): Promise<TransactionBlock>;
|
|
40
|
+
}
|
|
41
|
+
export {};
|