@opensea/seaport-js 1.0.1-beta.0 → 1.0.3

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 (81) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +141 -5
  3. package/lib/abi/ERC1155.d.ts +29 -29
  4. package/lib/abi/ERC1155.js +319 -0
  5. package/lib/abi/ERC1155.js.map +1 -0
  6. package/lib/abi/ERC20.d.ts +29 -29
  7. package/lib/abi/ERC20.js +317 -0
  8. package/lib/abi/ERC20.js.map +1 -0
  9. package/lib/abi/ERC721.d.ts +29 -29
  10. package/lib/abi/ERC721.js +337 -0
  11. package/lib/abi/ERC721.js.map +1 -0
  12. package/lib/abi/Seaport.d.ts +112 -112
  13. package/lib/abi/Seaport.js +2585 -0
  14. package/lib/abi/Seaport.js.map +1 -0
  15. package/lib/constants.d.ts +53 -49
  16. package/lib/constants.js +78 -0
  17. package/lib/constants.js.map +1 -0
  18. package/lib/index.d.ts +2 -2
  19. package/lib/index.js +6 -2
  20. package/lib/index.js.map +1 -1
  21. package/lib/seaport.d.ts +184 -181
  22. package/lib/seaport.js +732 -0
  23. package/lib/seaport.js.map +1 -0
  24. package/lib/typechain/ERC1155.d.ts +189 -0
  25. package/lib/typechain/ERC1155.js +3 -0
  26. package/lib/typechain/ERC1155.js.map +1 -0
  27. package/lib/typechain/ERC20.d.ts +209 -0
  28. package/lib/typechain/ERC20.js +3 -0
  29. package/lib/typechain/ERC20.js.map +1 -0
  30. package/lib/typechain/ERC721.d.ts +220 -0
  31. package/lib/typechain/ERC721.js +3 -0
  32. package/lib/typechain/ERC721.js.map +1 -0
  33. package/lib/typechain/Seaport.d.ts +686 -0
  34. package/lib/typechain/Seaport.js +3 -0
  35. package/lib/typechain/Seaport.js.map +1 -0
  36. package/lib/typechain/common.d.ts +21 -0
  37. package/lib/typechain/common.js +3 -0
  38. package/lib/typechain/common.js.map +1 -0
  39. package/lib/types.d.ts +221 -207
  40. package/lib/types.js +3 -0
  41. package/lib/types.js.map +1 -0
  42. package/lib/utils/approval.d.ts +9 -9
  43. package/lib/utils/approval.js +108 -0
  44. package/lib/utils/approval.js.map +1 -0
  45. package/lib/utils/balance.d.ts +4 -4
  46. package/lib/utils/balance.js +86 -0
  47. package/lib/utils/balance.js.map +1 -0
  48. package/lib/utils/balanceAndApprovalCheck.d.ts +108 -108
  49. package/lib/utils/balanceAndApprovalCheck.js +322 -0
  50. package/lib/utils/balanceAndApprovalCheck.js.map +1 -0
  51. package/lib/utils/criteria.d.ts +14 -13
  52. package/lib/utils/criteria.js +91 -0
  53. package/lib/utils/criteria.js.map +1 -0
  54. package/lib/utils/fulfill.d.ts +84 -84
  55. package/lib/utils/fulfill.js +573 -0
  56. package/lib/utils/fulfill.js.map +1 -0
  57. package/lib/utils/gcd.d.ts +3 -3
  58. package/lib/utils/gcd.js +25 -0
  59. package/lib/utils/gcd.js.map +1 -0
  60. package/lib/utils/item.d.ts +29 -30
  61. package/lib/utils/item.js +136 -0
  62. package/lib/utils/item.js.map +1 -0
  63. package/lib/utils/match.d.ts +49 -49
  64. package/lib/utils/match.js +56 -0
  65. package/lib/utils/match.js.map +1 -0
  66. package/lib/utils/merkletree.d.ts +11 -11
  67. package/lib/utils/merkletree.js +32 -0
  68. package/lib/utils/merkletree.js.map +1 -0
  69. package/lib/utils/order.d.ts +37 -37
  70. package/lib/utils/order.js +224 -0
  71. package/lib/utils/order.js.map +1 -0
  72. package/lib/utils/usecase.d.ts +4 -4
  73. package/lib/utils/usecase.js +158 -0
  74. package/lib/utils/usecase.js.map +1 -0
  75. package/package.json +43 -43
  76. package/lib/index.esm.mjs +0 -2
  77. package/lib/index.esm.mjs.map +0 -1
  78. package/lib/index.modern.mjs +0 -2
  79. package/lib/index.modern.mjs.map +0 -1
  80. package/lib/index.umd.js +0 -2
  81. package/lib/index.umd.js.map +0 -1
@@ -0,0 +1,317 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ERC20ABI = void 0;
4
+ var ERC20ABI = [
5
+ {
6
+ anonymous: false,
7
+ inputs: [
8
+ {
9
+ indexed: true,
10
+ internalType: "address",
11
+ name: "owner",
12
+ type: "address",
13
+ },
14
+ {
15
+ indexed: true,
16
+ internalType: "address",
17
+ name: "spender",
18
+ type: "address",
19
+ },
20
+ {
21
+ indexed: false,
22
+ internalType: "uint256",
23
+ name: "amount",
24
+ type: "uint256",
25
+ },
26
+ ],
27
+ name: "Approval",
28
+ type: "event",
29
+ },
30
+ {
31
+ anonymous: false,
32
+ inputs: [
33
+ {
34
+ indexed: true,
35
+ internalType: "address",
36
+ name: "from",
37
+ type: "address",
38
+ },
39
+ {
40
+ indexed: true,
41
+ internalType: "address",
42
+ name: "to",
43
+ type: "address",
44
+ },
45
+ {
46
+ indexed: false,
47
+ internalType: "uint256",
48
+ name: "amount",
49
+ type: "uint256",
50
+ },
51
+ ],
52
+ name: "Transfer",
53
+ type: "event",
54
+ },
55
+ {
56
+ inputs: [],
57
+ name: "DOMAIN_SEPARATOR",
58
+ outputs: [
59
+ {
60
+ internalType: "bytes32",
61
+ name: "",
62
+ type: "bytes32",
63
+ },
64
+ ],
65
+ stateMutability: "view",
66
+ type: "function",
67
+ },
68
+ {
69
+ inputs: [],
70
+ name: "PERMIT_TYPEHASH",
71
+ outputs: [
72
+ {
73
+ internalType: "bytes32",
74
+ name: "",
75
+ type: "bytes32",
76
+ },
77
+ ],
78
+ stateMutability: "view",
79
+ type: "function",
80
+ },
81
+ {
82
+ inputs: [
83
+ {
84
+ internalType: "address",
85
+ name: "",
86
+ type: "address",
87
+ },
88
+ {
89
+ internalType: "address",
90
+ name: "",
91
+ type: "address",
92
+ },
93
+ ],
94
+ name: "allowance",
95
+ outputs: [
96
+ {
97
+ internalType: "uint256",
98
+ name: "",
99
+ type: "uint256",
100
+ },
101
+ ],
102
+ stateMutability: "view",
103
+ type: "function",
104
+ },
105
+ {
106
+ inputs: [
107
+ {
108
+ internalType: "address",
109
+ name: "spender",
110
+ type: "address",
111
+ },
112
+ {
113
+ internalType: "uint256",
114
+ name: "amount",
115
+ type: "uint256",
116
+ },
117
+ ],
118
+ name: "approve",
119
+ outputs: [
120
+ {
121
+ internalType: "bool",
122
+ name: "",
123
+ type: "bool",
124
+ },
125
+ ],
126
+ stateMutability: "nonpayable",
127
+ type: "function",
128
+ },
129
+ {
130
+ inputs: [
131
+ {
132
+ internalType: "address",
133
+ name: "",
134
+ type: "address",
135
+ },
136
+ ],
137
+ name: "balanceOf",
138
+ outputs: [
139
+ {
140
+ internalType: "uint256",
141
+ name: "",
142
+ type: "uint256",
143
+ },
144
+ ],
145
+ stateMutability: "view",
146
+ type: "function",
147
+ },
148
+ {
149
+ inputs: [],
150
+ name: "decimals",
151
+ outputs: [
152
+ {
153
+ internalType: "uint8",
154
+ name: "",
155
+ type: "uint8",
156
+ },
157
+ ],
158
+ stateMutability: "view",
159
+ type: "function",
160
+ },
161
+ {
162
+ inputs: [],
163
+ name: "name",
164
+ outputs: [
165
+ {
166
+ internalType: "string",
167
+ name: "",
168
+ type: "string",
169
+ },
170
+ ],
171
+ stateMutability: "view",
172
+ type: "function",
173
+ },
174
+ {
175
+ inputs: [
176
+ {
177
+ internalType: "address",
178
+ name: "",
179
+ type: "address",
180
+ },
181
+ ],
182
+ name: "nonces",
183
+ outputs: [
184
+ {
185
+ internalType: "uint256",
186
+ name: "",
187
+ type: "uint256",
188
+ },
189
+ ],
190
+ stateMutability: "view",
191
+ type: "function",
192
+ },
193
+ {
194
+ inputs: [
195
+ {
196
+ internalType: "address",
197
+ name: "owner",
198
+ type: "address",
199
+ },
200
+ {
201
+ internalType: "address",
202
+ name: "spender",
203
+ type: "address",
204
+ },
205
+ {
206
+ internalType: "uint256",
207
+ name: "value",
208
+ type: "uint256",
209
+ },
210
+ {
211
+ internalType: "uint256",
212
+ name: "deadline",
213
+ type: "uint256",
214
+ },
215
+ {
216
+ internalType: "uint8",
217
+ name: "v",
218
+ type: "uint8",
219
+ },
220
+ {
221
+ internalType: "bytes32",
222
+ name: "r",
223
+ type: "bytes32",
224
+ },
225
+ {
226
+ internalType: "bytes32",
227
+ name: "s",
228
+ type: "bytes32",
229
+ },
230
+ ],
231
+ name: "permit",
232
+ outputs: [],
233
+ stateMutability: "nonpayable",
234
+ type: "function",
235
+ },
236
+ {
237
+ inputs: [],
238
+ name: "symbol",
239
+ outputs: [
240
+ {
241
+ internalType: "string",
242
+ name: "",
243
+ type: "string",
244
+ },
245
+ ],
246
+ stateMutability: "view",
247
+ type: "function",
248
+ },
249
+ {
250
+ inputs: [],
251
+ name: "totalSupply",
252
+ outputs: [
253
+ {
254
+ internalType: "uint256",
255
+ name: "",
256
+ type: "uint256",
257
+ },
258
+ ],
259
+ stateMutability: "view",
260
+ type: "function",
261
+ },
262
+ {
263
+ inputs: [
264
+ {
265
+ internalType: "address",
266
+ name: "to",
267
+ type: "address",
268
+ },
269
+ {
270
+ internalType: "uint256",
271
+ name: "amount",
272
+ type: "uint256",
273
+ },
274
+ ],
275
+ name: "transfer",
276
+ outputs: [
277
+ {
278
+ internalType: "bool",
279
+ name: "",
280
+ type: "bool",
281
+ },
282
+ ],
283
+ stateMutability: "nonpayable",
284
+ type: "function",
285
+ },
286
+ {
287
+ inputs: [
288
+ {
289
+ internalType: "address",
290
+ name: "from",
291
+ type: "address",
292
+ },
293
+ {
294
+ internalType: "address",
295
+ name: "to",
296
+ type: "address",
297
+ },
298
+ {
299
+ internalType: "uint256",
300
+ name: "amount",
301
+ type: "uint256",
302
+ },
303
+ ],
304
+ name: "transferFrom",
305
+ outputs: [
306
+ {
307
+ internalType: "bool",
308
+ name: "",
309
+ type: "bool",
310
+ },
311
+ ],
312
+ stateMutability: "nonpayable",
313
+ type: "function",
314
+ },
315
+ ];
316
+ exports.ERC20ABI = ERC20ABI;
317
+ //# sourceMappingURL=ERC20.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ERC20.js","sourceRoot":"","sources":["../../src/abi/ERC20.ts"],"names":[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;gBACE,YAAY,EAAE,MAAM;gBACpB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,MAAM;aACb;SACF;QACD,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEO,4BAAQ"}
@@ -1,29 +1,29 @@
1
- declare const ERC721ABI: ({
2
- anonymous: boolean;
3
- inputs: {
4
- indexed: boolean;
5
- internalType: string;
6
- name: string;
7
- type: string;
8
- }[];
9
- name: string;
10
- type: string;
11
- outputs?: undefined;
12
- stateMutability?: undefined;
13
- } | {
14
- inputs: {
15
- internalType: string;
16
- name: string;
17
- type: string;
18
- }[];
19
- name: string;
20
- outputs: {
21
- internalType: string;
22
- name: string;
23
- type: string;
24
- }[];
25
- stateMutability: string;
26
- type: string;
27
- anonymous?: undefined;
28
- })[];
29
- export { ERC721ABI };
1
+ declare const ERC721ABI: ({
2
+ anonymous: boolean;
3
+ inputs: {
4
+ indexed: boolean;
5
+ internalType: string;
6
+ name: string;
7
+ type: string;
8
+ }[];
9
+ name: string;
10
+ type: string;
11
+ outputs?: undefined;
12
+ stateMutability?: undefined;
13
+ } | {
14
+ inputs: {
15
+ internalType: string;
16
+ name: string;
17
+ type: string;
18
+ }[];
19
+ name: string;
20
+ outputs: {
21
+ internalType: string;
22
+ name: string;
23
+ type: string;
24
+ }[];
25
+ stateMutability: string;
26
+ type: string;
27
+ anonymous?: undefined;
28
+ })[];
29
+ export { ERC721ABI };