anchor-sdk 0.1.42-beta.1 → 0.1.42-beta.2

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.
Files changed (36) hide show
  1. package/dist/AnchorApiClientV2.d.ts +8 -4
  2. package/dist/AnchorApiClientV2.js +316 -0
  3. package/dist/AnchorERC1155Client.d.ts +0 -1
  4. package/dist/AnchorERC1155Client.js +301 -0
  5. package/dist/AnchorPayClient.d.ts +0 -1
  6. package/dist/AnchorPayClient.js +908 -0
  7. package/dist/abi/AnchorERC1155.d.ts +0 -1
  8. package/dist/abi/AnchorERC1155.js +1122 -0
  9. package/dist/abi/AnchorPay.json +578 -0
  10. package/dist/constants.d.ts +1 -2
  11. package/dist/constants.js +367 -0
  12. package/dist/generated/Api.d.ts +692 -606
  13. package/dist/generated/Api.js +794 -0
  14. package/dist/index.d.ts +7 -7
  15. package/dist/index.js +1379 -3
  16. package/dist/react/AnchorReactSDK.d.ts +59 -0
  17. package/dist/react/AnchorReactSDK.js +192 -0
  18. package/dist/react/index.d.ts +1 -0
  19. package/dist/react/index.js +8 -0
  20. package/dist/typechain/AnchorERC1155.d.ts +2 -3
  21. package/dist/typechain/AnchorERC1155.js +2 -0
  22. package/dist/typechain/AnchorPay.d.ts +2 -3
  23. package/dist/typechain/AnchorPay.js +2 -0
  24. package/dist/typechain/common.d.ts +1 -2
  25. package/dist/typechain/common.js +2 -0
  26. package/dist/typechain/factories/AnchorERC1155__factory.d.ts +0 -1
  27. package/dist/typechain/factories/AnchorERC1155__factory.js +1766 -0
  28. package/dist/typechain/factories/AnchorPay__factory.d.ts +0 -1
  29. package/dist/typechain/factories/AnchorPay__factory.js +469 -0
  30. package/dist/typechain/factories/index.d.ts +0 -1
  31. package/dist/typechain/factories/index.js +10 -0
  32. package/dist/typechain/index.d.ts +0 -1
  33. package/dist/typechain/index.js +41 -0
  34. package/dist/types.d.ts +0 -1
  35. package/dist/types.js +2 -0
  36. package/package.json +1 -1
@@ -356,4 +356,3 @@ export declare class AnchorPay__factory {
356
356
  static createInterface(): AnchorPayInterface;
357
357
  static connect(address: string, runner?: ContractRunner | null): AnchorPay;
358
358
  }
359
- //# sourceMappingURL=AnchorPay__factory.d.ts.map
@@ -0,0 +1,469 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AnchorPay__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ type: "constructor",
11
+ inputs: [],
12
+ stateMutability: "nonpayable",
13
+ },
14
+ {
15
+ type: "function",
16
+ name: "UPGRADE_INTERFACE_VERSION",
17
+ inputs: [],
18
+ outputs: [
19
+ {
20
+ name: "",
21
+ type: "string",
22
+ internalType: "string",
23
+ },
24
+ ],
25
+ stateMutability: "view",
26
+ },
27
+ {
28
+ type: "function",
29
+ name: "acceptOwnership",
30
+ inputs: [],
31
+ outputs: [],
32
+ stateMutability: "nonpayable",
33
+ },
34
+ {
35
+ type: "function",
36
+ name: "getInterfaceImplementer",
37
+ inputs: [
38
+ {
39
+ name: "account",
40
+ type: "address",
41
+ internalType: "address",
42
+ },
43
+ {
44
+ name: "_interfaceHash",
45
+ type: "bytes32",
46
+ internalType: "bytes32",
47
+ },
48
+ ],
49
+ outputs: [
50
+ {
51
+ name: "",
52
+ type: "address",
53
+ internalType: "address",
54
+ },
55
+ ],
56
+ stateMutability: "view",
57
+ },
58
+ {
59
+ type: "function",
60
+ name: "initialize",
61
+ inputs: [
62
+ {
63
+ name: "_defaultAdmin",
64
+ type: "address",
65
+ internalType: "address",
66
+ },
67
+ ],
68
+ outputs: [],
69
+ stateMutability: "nonpayable",
70
+ },
71
+ {
72
+ type: "function",
73
+ name: "owner",
74
+ inputs: [],
75
+ outputs: [
76
+ {
77
+ name: "",
78
+ type: "address",
79
+ internalType: "address",
80
+ },
81
+ ],
82
+ stateMutability: "view",
83
+ },
84
+ {
85
+ type: "function",
86
+ name: "pause",
87
+ inputs: [],
88
+ outputs: [],
89
+ stateMutability: "nonpayable",
90
+ },
91
+ {
92
+ type: "function",
93
+ name: "pendingOwner",
94
+ inputs: [],
95
+ outputs: [
96
+ {
97
+ name: "",
98
+ type: "address",
99
+ internalType: "address",
100
+ },
101
+ ],
102
+ stateMutability: "view",
103
+ },
104
+ {
105
+ type: "function",
106
+ name: "proxiableUUID",
107
+ inputs: [],
108
+ outputs: [
109
+ {
110
+ name: "",
111
+ type: "bytes32",
112
+ internalType: "bytes32",
113
+ },
114
+ ],
115
+ stateMutability: "view",
116
+ },
117
+ {
118
+ type: "function",
119
+ name: "renounceOwnership",
120
+ inputs: [],
121
+ outputs: [],
122
+ stateMutability: "nonpayable",
123
+ },
124
+ {
125
+ type: "function",
126
+ name: "send",
127
+ inputs: [
128
+ {
129
+ name: "recipient",
130
+ type: "address",
131
+ internalType: "address",
132
+ },
133
+ {
134
+ name: "token",
135
+ type: "address",
136
+ internalType: "address",
137
+ },
138
+ {
139
+ name: "amount",
140
+ type: "uint256",
141
+ internalType: "uint256",
142
+ },
143
+ {
144
+ name: "data",
145
+ type: "bytes",
146
+ internalType: "bytes",
147
+ },
148
+ ],
149
+ outputs: [],
150
+ stateMutability: "payable",
151
+ },
152
+ {
153
+ type: "function",
154
+ name: "setInterfaceImplementer",
155
+ inputs: [
156
+ {
157
+ name: "account",
158
+ type: "address",
159
+ internalType: "address",
160
+ },
161
+ {
162
+ name: "_interfaceHash",
163
+ type: "bytes32",
164
+ internalType: "bytes32",
165
+ },
166
+ {
167
+ name: "implementer",
168
+ type: "address",
169
+ internalType: "address",
170
+ },
171
+ ],
172
+ outputs: [],
173
+ stateMutability: "nonpayable",
174
+ },
175
+ {
176
+ type: "function",
177
+ name: "transferOwnership",
178
+ inputs: [
179
+ {
180
+ name: "newOwner",
181
+ type: "address",
182
+ internalType: "address",
183
+ },
184
+ ],
185
+ outputs: [],
186
+ stateMutability: "nonpayable",
187
+ },
188
+ {
189
+ type: "function",
190
+ name: "unpause",
191
+ inputs: [],
192
+ outputs: [],
193
+ stateMutability: "nonpayable",
194
+ },
195
+ {
196
+ type: "function",
197
+ name: "upgradeToAndCall",
198
+ inputs: [
199
+ {
200
+ name: "newImplementation",
201
+ type: "address",
202
+ internalType: "address",
203
+ },
204
+ {
205
+ name: "data",
206
+ type: "bytes",
207
+ internalType: "bytes",
208
+ },
209
+ ],
210
+ outputs: [],
211
+ stateMutability: "payable",
212
+ },
213
+ {
214
+ type: "event",
215
+ name: "Initialized",
216
+ inputs: [
217
+ {
218
+ name: "version",
219
+ type: "uint64",
220
+ indexed: false,
221
+ internalType: "uint64",
222
+ },
223
+ ],
224
+ anonymous: false,
225
+ },
226
+ {
227
+ type: "event",
228
+ name: "InterfaceImplementerSet",
229
+ inputs: [
230
+ {
231
+ name: "account",
232
+ type: "address",
233
+ indexed: true,
234
+ internalType: "address",
235
+ },
236
+ {
237
+ name: "interfaceHash",
238
+ type: "bytes32",
239
+ indexed: true,
240
+ internalType: "bytes32",
241
+ },
242
+ {
243
+ name: "implementer",
244
+ type: "address",
245
+ indexed: true,
246
+ internalType: "address",
247
+ },
248
+ ],
249
+ anonymous: false,
250
+ },
251
+ {
252
+ type: "event",
253
+ name: "OwnershipTransferStarted",
254
+ inputs: [
255
+ {
256
+ name: "previousOwner",
257
+ type: "address",
258
+ indexed: true,
259
+ internalType: "address",
260
+ },
261
+ {
262
+ name: "newOwner",
263
+ type: "address",
264
+ indexed: true,
265
+ internalType: "address",
266
+ },
267
+ ],
268
+ anonymous: false,
269
+ },
270
+ {
271
+ type: "event",
272
+ name: "OwnershipTransferred",
273
+ inputs: [
274
+ {
275
+ name: "previousOwner",
276
+ type: "address",
277
+ indexed: true,
278
+ internalType: "address",
279
+ },
280
+ {
281
+ name: "newOwner",
282
+ type: "address",
283
+ indexed: true,
284
+ internalType: "address",
285
+ },
286
+ ],
287
+ anonymous: false,
288
+ },
289
+ {
290
+ type: "event",
291
+ name: "Paid",
292
+ inputs: [
293
+ {
294
+ name: "from",
295
+ type: "address",
296
+ indexed: true,
297
+ internalType: "address",
298
+ },
299
+ {
300
+ name: "to",
301
+ type: "address",
302
+ indexed: true,
303
+ internalType: "address",
304
+ },
305
+ {
306
+ name: "amount",
307
+ type: "uint256",
308
+ indexed: false,
309
+ internalType: "uint256",
310
+ },
311
+ {
312
+ name: "data",
313
+ type: "bytes",
314
+ indexed: false,
315
+ internalType: "bytes",
316
+ },
317
+ ],
318
+ anonymous: false,
319
+ },
320
+ {
321
+ type: "event",
322
+ name: "Upgraded",
323
+ inputs: [
324
+ {
325
+ name: "implementation",
326
+ type: "address",
327
+ indexed: true,
328
+ internalType: "address",
329
+ },
330
+ ],
331
+ anonymous: false,
332
+ },
333
+ {
334
+ type: "error",
335
+ name: "AddressEmptyCode",
336
+ inputs: [
337
+ {
338
+ name: "target",
339
+ type: "address",
340
+ internalType: "address",
341
+ },
342
+ ],
343
+ },
344
+ {
345
+ type: "error",
346
+ name: "AddressNotSet",
347
+ inputs: [],
348
+ },
349
+ {
350
+ type: "error",
351
+ name: "ERC1967InvalidImplementation",
352
+ inputs: [
353
+ {
354
+ name: "implementation",
355
+ type: "address",
356
+ internalType: "address",
357
+ },
358
+ ],
359
+ },
360
+ {
361
+ type: "error",
362
+ name: "ERC1967NonPayable",
363
+ inputs: [],
364
+ },
365
+ {
366
+ type: "error",
367
+ name: "FailedCall",
368
+ inputs: [],
369
+ },
370
+ {
371
+ type: "error",
372
+ name: "InsufficientPayment",
373
+ inputs: [],
374
+ },
375
+ {
376
+ type: "error",
377
+ name: "InvalidAddress",
378
+ inputs: [],
379
+ },
380
+ {
381
+ type: "error",
382
+ name: "InvalidAmount",
383
+ inputs: [],
384
+ },
385
+ {
386
+ type: "error",
387
+ name: "InvalidInitialization",
388
+ inputs: [],
389
+ },
390
+ {
391
+ type: "error",
392
+ name: "InvalidMsgValue",
393
+ inputs: [],
394
+ },
395
+ {
396
+ type: "error",
397
+ name: "InvalidState",
398
+ inputs: [],
399
+ },
400
+ {
401
+ type: "error",
402
+ name: "NotInitializing",
403
+ inputs: [],
404
+ },
405
+ {
406
+ type: "error",
407
+ name: "OwnableInvalidOwner",
408
+ inputs: [
409
+ {
410
+ name: "owner",
411
+ type: "address",
412
+ internalType: "address",
413
+ },
414
+ ],
415
+ },
416
+ {
417
+ type: "error",
418
+ name: "OwnableUnauthorizedAccount",
419
+ inputs: [
420
+ {
421
+ name: "account",
422
+ type: "address",
423
+ internalType: "address",
424
+ },
425
+ ],
426
+ },
427
+ {
428
+ type: "error",
429
+ name: "PaymentTransferFailed",
430
+ inputs: [],
431
+ },
432
+ {
433
+ type: "error",
434
+ name: "SafeERC20FailedOperation",
435
+ inputs: [
436
+ {
437
+ name: "token",
438
+ type: "address",
439
+ internalType: "address",
440
+ },
441
+ ],
442
+ },
443
+ {
444
+ type: "error",
445
+ name: "UUPSUnauthorizedCallContext",
446
+ inputs: [],
447
+ },
448
+ {
449
+ type: "error",
450
+ name: "UUPSUnsupportedProxiableUUID",
451
+ inputs: [
452
+ {
453
+ name: "slot",
454
+ type: "bytes32",
455
+ internalType: "bytes32",
456
+ },
457
+ ],
458
+ },
459
+ ];
460
+ class AnchorPay__factory {
461
+ static createInterface() {
462
+ return new ethers_1.Interface(_abi);
463
+ }
464
+ static connect(address, runner) {
465
+ return new ethers_1.Contract(address, _abi, runner);
466
+ }
467
+ }
468
+ exports.AnchorPay__factory = AnchorPay__factory;
469
+ AnchorPay__factory.abi = _abi;
@@ -1,3 +1,2 @@
1
1
  export { AnchorERC1155__factory } from "./AnchorERC1155__factory";
2
2
  export { AnchorPay__factory } from "./AnchorPay__factory";
3
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnchorPay__factory = exports.AnchorERC1155__factory = void 0;
4
+ /* Autogenerated file. Do not edit manually. */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ var AnchorERC1155__factory_1 = require("./AnchorERC1155__factory");
8
+ Object.defineProperty(exports, "AnchorERC1155__factory", { enumerable: true, get: function () { return AnchorERC1155__factory_1.AnchorERC1155__factory; } });
9
+ var AnchorPay__factory_1 = require("./AnchorPay__factory");
10
+ Object.defineProperty(exports, "AnchorPay__factory", { enumerable: true, get: function () { return AnchorPay__factory_1.AnchorPay__factory; } });
@@ -3,4 +3,3 @@ export type { AnchorPay } from "./AnchorPay";
3
3
  export * as factories from "./factories";
4
4
  export { AnchorERC1155__factory } from "./factories/AnchorERC1155__factory";
5
5
  export { AnchorPay__factory } from "./factories/AnchorPay__factory";
6
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.AnchorPay__factory = exports.AnchorERC1155__factory = exports.factories = void 0;
37
+ exports.factories = __importStar(require("./factories"));
38
+ var AnchorERC1155__factory_1 = require("./factories/AnchorERC1155__factory");
39
+ Object.defineProperty(exports, "AnchorERC1155__factory", { enumerable: true, get: function () { return AnchorERC1155__factory_1.AnchorERC1155__factory; } });
40
+ var AnchorPay__factory_1 = require("./factories/AnchorPay__factory");
41
+ Object.defineProperty(exports, "AnchorPay__factory", { enumerable: true, get: function () { return AnchorPay__factory_1.AnchorPay__factory; } });
package/dist/types.d.ts CHANGED
@@ -107,4 +107,3 @@ export interface PaymentOptions {
107
107
  /** 是否直接发送交易(true: 发送交易并返回交易哈希,false: 只返回交易数据不发送) */
108
108
  sendTransaction?: boolean;
109
109
  }
110
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anchor-sdk",
3
- "version": "0.1.42-beta.1",
3
+ "version": "0.1.42-beta.2",
4
4
  "description": "TypeScript SDK for interacting with Anchor ecosystem - badge minting, payment processing, and ERC1155 token management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",