@zoralabs/protocol-sdk 0.5.4-exports.0 → 0.5.4

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 (41) hide show
  1. package/.turbo/turbo-build.log +16 -0
  2. package/CHANGELOG.md +2 -3
  3. package/dist/anvil.d.ts +36 -0
  4. package/dist/anvil.d.ts.map +1 -0
  5. package/dist/apis/chain-constants.d.ts +13 -0
  6. package/dist/apis/chain-constants.d.ts.map +1 -0
  7. package/dist/apis/client-base.d.ts +15 -0
  8. package/dist/apis/client-base.d.ts.map +1 -0
  9. package/dist/apis/generated/premint-api-types.d.ts +460 -0
  10. package/dist/apis/generated/premint-api-types.d.ts.map +1 -0
  11. package/dist/apis/http-api-base.d.ts +32 -0
  12. package/dist/apis/http-api-base.d.ts.map +1 -0
  13. package/dist/constants.d.ts +36 -0
  14. package/dist/constants.d.ts.map +1 -0
  15. package/dist/create/1155-create-helper.d.ts +62 -0
  16. package/dist/create/1155-create-helper.d.ts.map +1 -0
  17. package/dist/index.cjs +1694 -0
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.ts +9 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +1664 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/mint/mint-api-client.d.ts +27 -0
  24. package/dist/mint/mint-api-client.d.ts.map +1 -0
  25. package/dist/mint/mint-client.d.ts +61 -0
  26. package/dist/mint/mint-client.d.ts.map +1 -0
  27. package/dist/premint/contract-types.d.ts +125 -0
  28. package/dist/premint/contract-types.d.ts.map +1 -0
  29. package/dist/premint/conversions.d.ts +78 -0
  30. package/dist/premint/conversions.d.ts.map +1 -0
  31. package/dist/premint/premint-api-client.d.ts +32 -0
  32. package/dist/premint/premint-api-client.d.ts.map +1 -0
  33. package/dist/premint/premint-client.d.ts +203 -0
  34. package/dist/premint/premint-client.d.ts.map +1 -0
  35. package/dist/premint/preminter.d.ts +121 -0
  36. package/dist/premint/preminter.d.ts.map +1 -0
  37. package/dist/preminter.d.ts +36 -0
  38. package/dist/preminter.d.ts.map +1 -0
  39. package/dist/types.d.ts +2 -0
  40. package/dist/types.d.ts.map +1 -0
  41. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ warning package.json: "dependencies" has dependency "vite" with range "4.5.0" that collides with a dependency in "devDependencies" of the same name with version "^4.5.0"
2
+ $ tsup
3
+ CLI Building entry: src/index.ts
4
+ CLI Using tsconfig: tsconfig.build.json
5
+ CLI tsup v7.3.0
6
+ CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-sdk/tsup.config.js
7
+ CLI Target: es2021
8
+ CLI Cleaning output folder
9
+ CJS Build start
10
+ ESM Build start
11
+ CJS dist/index.cjs 50.17 KB
12
+ CJS dist/index.cjs.map 97.10 KB
13
+ CJS ⚡️ Build success in 67ms
14
+ ESM dist/index.js 46.25 KB
15
+ ESM dist/index.js.map 97.16 KB
16
+ ESM ⚡️ Build success in 74ms
package/CHANGELOG.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # @zoralabs/protocol-sdk
2
2
 
3
- ## 0.5.4-exports.0
3
+ ## 0.5.4
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - e1f2305: Defining exports in protocol-sdk
8
- - @zoralabs/protocol-deployments@0.1.1-exports.0
7
+ - 9710e5e: Defining exports in protocol-sdk
9
8
 
10
9
  ## 0.5.3
11
10
 
@@ -0,0 +1,36 @@
1
+ import { Chain, PublicClient, TestClient, WalletClient } from "viem";
2
+ export interface AnvilViemClientsTest {
3
+ viemClients: {
4
+ walletClient: WalletClient;
5
+ publicClient: PublicClient;
6
+ testClient: TestClient;
7
+ chain: Chain;
8
+ };
9
+ }
10
+ export type AnvilTestForkSettings = {
11
+ forkUrl: string;
12
+ forkBlockNumber: number;
13
+ anvilChainId?: number;
14
+ };
15
+ export declare const makeAnvilTest: ({ forkUrl, forkBlockNumber, anvilChainId, }: AnvilTestForkSettings) => import("@vitest/runner/dist/tasks-e594cd24").e<{
16
+ viemClients: {
17
+ walletClient: WalletClient;
18
+ publicClient: PublicClient;
19
+ testClient: TestClient;
20
+ chain: Chain;
21
+ };
22
+ }>;
23
+ export declare const forkUrls: {
24
+ zoraMainnet: string;
25
+ zoraGoerli: string;
26
+ zoraSepolia: string;
27
+ };
28
+ export declare const anvilTest: import("@vitest/runner/dist/tasks-e594cd24").e<{
29
+ viemClients: {
30
+ walletClient: WalletClient;
31
+ publicClient: PublicClient;
32
+ testClient: TestClient;
33
+ chain: Chain;
34
+ };
35
+ }>;
36
+ //# sourceMappingURL=anvil.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anvil.d.ts","sourceRoot":"","sources":["../src/anvil.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EAKb,MAAM,MAAM,CAAC;AAGd,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE;QACX,YAAY,EAAE,YAAY,CAAC;QAC3B,YAAY,EAAE,YAAY,CAAC;QAC3B,UAAU,EAAE,UAAU,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC;KACd,CAAC;CACH;AAUD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,gDAIvB,qBAAqB;;sBAzBN,YAAY;sBACZ,YAAY;oBACd,UAAU;eACf,KAAK;;EA8EZ,CAAC;AAEL,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,eAAO,MAAM,SAAS;;sBAzFJ,YAAY;sBACZ,YAAY;oBACd,UAAU;eACf,KAAK;;EA0Fd,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { components } from "./generated/premint-api-types";
2
+ type BackendChainName = components["schemas"]["ChainName"];
3
+ export type NetworkConfig = {
4
+ chainId: number;
5
+ zoraCollectPathChainName: string;
6
+ zoraBackendChainName: BackendChainName;
7
+ isTestnet: boolean;
8
+ subgraphUrl: string;
9
+ };
10
+ export declare const REWARD_PER_TOKEN: bigint;
11
+ export declare const networkConfigByChain: Record<number, NetworkConfig>;
12
+ export {};
13
+ //# sourceMappingURL=chain-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-constants.d.ts","sourceRoot":"","sources":["../../src/apis/chain-constants.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,KAAK,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB,EAAE,MAAM,CAAC;IACjC,oBAAoB,EAAE,gBAAgB,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAyB,CAAC;AAEvD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAuE9D,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Chain, PublicClient } from "viem";
2
+ import { NetworkConfig } from "./chain-constants";
3
+ export declare abstract class ClientBase {
4
+ network: NetworkConfig;
5
+ chain: Chain;
6
+ constructor(chain: Chain);
7
+ /**
8
+ * Getter for public client that instantiates a publicClient as needed
9
+ *
10
+ * @param publicClient Optional viem public client
11
+ * @returns Existing public client or makes a new one for the given chain as needed.
12
+ */
13
+ protected getPublicClient(publicClient?: PublicClient): PublicClient;
14
+ }
15
+ //# sourceMappingURL=client-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-base.d.ts","sourceRoot":"","sources":["../../src/apis/client-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAA4B,MAAM,MAAM,CAAC;AACrE,OAAO,EAAE,aAAa,EAAwB,MAAM,mBAAmB,CAAC;AAExE,8BAAsB,UAAU;IAC9B,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;gBAED,KAAK,EAAE,KAAK;IASxB;;;;;OAKG;IACH,SAAS,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,YAAY;CAMrE"}
@@ -0,0 +1,460 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/signature": {
7
+ /** Upsert Premint Signature */
8
+ post: operations["upsert_premint_signature_signature_post"];
9
+ };
10
+ "/signature/{chain_name}/{collection_address}": {
11
+ /** Get Premint Signatures For Collection */
12
+ get: operations["get_premint_signatures_for_collection_signature__chain_name___collection_address__get"];
13
+ };
14
+ "/signature/{chain_name}/{collection_address}/next_uid": {
15
+ /** Get Next Uid */
16
+ get: operations["get_next_uid_signature__chain_name___collection_address__next_uid_get"];
17
+ };
18
+ "/signature/{chain_name}/{collection_address}/{uid}": {
19
+ /** Get Premint Signature */
20
+ get: operations["get_premint_signature_signature__chain_name___collection_address___uid__get"];
21
+ };
22
+ "/created/{chain_name}/{signer}": {
23
+ /** Get Premint Signatures By Signer */
24
+ get: operations["get_premint_signatures_by_signer_created__chain_name___signer__get"];
25
+ };
26
+ }
27
+ export type webhooks = Record<string, never>;
28
+ export interface components {
29
+ schemas: {
30
+ /**
31
+ * ChainName
32
+ * @description An enumeration.
33
+ * @enum {string}
34
+ */
35
+ ChainName: "ETHEREUM-MAINNET" | "ETHEREUM-ROPSTEN" | "ETHEREUM-RINKEBY" | "ETHEREUM-GOERLI" | "ETHEREUM-SEPOLIA" | "OPTIMISM-MAINNET" | "OPTIMISM-GOERLI" | "ZORA-GOERLI" | "ZORA-SEPOLIA" | "ZORA-MAINNET" | "BASE-MAINNET" | "BASE-GOERLI" | "PGN-MAINNET";
36
+ /**
37
+ * CollectionCreationConfig
38
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
39
+ * (store_as, override_name), as well as provides other convinience methods.
40
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
41
+ * complex type we include on a stored entity.
42
+ *
43
+ * Example::
44
+ * >>> class Foo(ObjectBase):
45
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
46
+ * ...: other: str = "default"
47
+ */
48
+ CollectionCreationConfig: {
49
+ /** Contractadmin */
50
+ contractAdmin: string;
51
+ /** Contracturi */
52
+ contractURI: string;
53
+ /** Contractname */
54
+ contractName: string;
55
+ };
56
+ /** HTTPValidationError */
57
+ HTTPValidationError: {
58
+ /** Detail */
59
+ detail?: components["schemas"]["ValidationError"][];
60
+ };
61
+ /**
62
+ * PremintCollection
63
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
64
+ * (store_as, override_name), as well as provides other convinience methods.
65
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
66
+ * complex type we include on a stored entity.
67
+ *
68
+ * Example::
69
+ * >>> class Foo(ObjectBase):
70
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
71
+ * ...: other: str = "default"
72
+ */
73
+ PremintCollection: {
74
+ /** Contract Address */
75
+ contract_address: string;
76
+ /** Contract Admin */
77
+ contract_admin: string;
78
+ /** Contract Uri */
79
+ contract_uri: string;
80
+ /** Contract Name */
81
+ contract_name: string;
82
+ /** Premints */
83
+ premints: (components["schemas"]["SignedPremintConfigV1"] | components["schemas"]["SignedPremintConfigV2"])[];
84
+ };
85
+ /**
86
+ * PremintConfigV1
87
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
88
+ * (store_as, override_name), as well as provides other convinience methods.
89
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
90
+ * complex type we include on a stored entity.
91
+ *
92
+ * Example::
93
+ * >>> class Foo(ObjectBase):
94
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
95
+ * ...: other: str = "default"
96
+ */
97
+ PremintConfigV1: {
98
+ /**
99
+ * Config Version
100
+ * @default 1
101
+ * @enum {string}
102
+ */
103
+ config_version?: "1";
104
+ tokenConfig: components["schemas"]["TokenCreationConfigV1"];
105
+ /** Uid */
106
+ uid: number;
107
+ /** Version */
108
+ version: number;
109
+ /** Deleted */
110
+ deleted: boolean;
111
+ };
112
+ /**
113
+ * PremintConfigV2
114
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
115
+ * (store_as, override_name), as well as provides other convinience methods.
116
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
117
+ * complex type we include on a stored entity.
118
+ *
119
+ * Example::
120
+ * >>> class Foo(ObjectBase):
121
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
122
+ * ...: other: str = "default"
123
+ */
124
+ PremintConfigV2: {
125
+ /**
126
+ * Config Version
127
+ * @default 2
128
+ * @enum {string}
129
+ */
130
+ config_version?: "2";
131
+ tokenConfig: components["schemas"]["TokenCreationConfigV2"];
132
+ /** Uid */
133
+ uid: number;
134
+ /** Version */
135
+ version: number;
136
+ /** Deleted */
137
+ deleted: boolean;
138
+ };
139
+ /**
140
+ * PremintNextUid
141
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
142
+ * (store_as, override_name), as well as provides other convinience methods.
143
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
144
+ * complex type we include on a stored entity.
145
+ *
146
+ * Example::
147
+ * >>> class Foo(ObjectBase):
148
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
149
+ * ...: other: str = "default"
150
+ */
151
+ PremintNextUid: {
152
+ /** Next Uid */
153
+ next_uid: number;
154
+ };
155
+ /**
156
+ * PremintRequest
157
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
158
+ * (store_as, override_name), as well as provides other convinience methods.
159
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
160
+ * complex type we include on a stored entity.
161
+ *
162
+ * Example::
163
+ * >>> class Foo(ObjectBase):
164
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
165
+ * ...: other: str = "default"
166
+ */
167
+ PremintRequest: {
168
+ collection: components["schemas"]["CollectionCreationConfig"];
169
+ /** Premint */
170
+ premint: components["schemas"]["PremintConfigV1"] | components["schemas"]["PremintConfigV2"];
171
+ chain_name: components["schemas"]["ChainName"];
172
+ /** Signature */
173
+ signature: string;
174
+ };
175
+ /**
176
+ * PremintSignature
177
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
178
+ * (store_as, override_name), as well as provides other convinience methods.
179
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
180
+ * complex type we include on a stored entity.
181
+ *
182
+ * Example::
183
+ * >>> class Foo(ObjectBase):
184
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
185
+ * ...: other: str = "default"
186
+ */
187
+ PremintSignature: {
188
+ collection: components["schemas"]["CollectionCreationConfig"];
189
+ /** Premint */
190
+ premint: components["schemas"]["PremintConfigV1"] | components["schemas"]["PremintConfigV2"];
191
+ chain_name: components["schemas"]["ChainName"];
192
+ /** Signature */
193
+ signature: string;
194
+ /** Collection Address */
195
+ collection_address: string;
196
+ /** Signer */
197
+ signer: string;
198
+ };
199
+ /**
200
+ * SignedPremintConfigV1
201
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
202
+ * (store_as, override_name), as well as provides other convinience methods.
203
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
204
+ * complex type we include on a stored entity.
205
+ *
206
+ * Example::
207
+ * >>> class Foo(ObjectBase):
208
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
209
+ * ...: other: str = "default"
210
+ */
211
+ SignedPremintConfigV1: {
212
+ /**
213
+ * Config Version
214
+ * @default 1
215
+ * @enum {string}
216
+ */
217
+ config_version?: "1";
218
+ tokenConfig: components["schemas"]["TokenCreationConfigV1"];
219
+ /** Uid */
220
+ uid: number;
221
+ /** Version */
222
+ version: number;
223
+ /** Deleted */
224
+ deleted: boolean;
225
+ /** Signature */
226
+ signature: string;
227
+ };
228
+ /**
229
+ * SignedPremintConfigV2
230
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
231
+ * (store_as, override_name), as well as provides other convinience methods.
232
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
233
+ * complex type we include on a stored entity.
234
+ *
235
+ * Example::
236
+ * >>> class Foo(ObjectBase):
237
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
238
+ * ...: other: str = "default"
239
+ */
240
+ SignedPremintConfigV2: {
241
+ /**
242
+ * Config Version
243
+ * @default 2
244
+ * @enum {string}
245
+ */
246
+ config_version?: "2";
247
+ tokenConfig: components["schemas"]["TokenCreationConfigV2"];
248
+ /** Uid */
249
+ uid: number;
250
+ /** Version */
251
+ version: number;
252
+ /** Deleted */
253
+ deleted: boolean;
254
+ /** Signature */
255
+ signature: string;
256
+ };
257
+ /**
258
+ * TokenCreationConfigV1
259
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
260
+ * (store_as, override_name), as well as provides other convinience methods.
261
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
262
+ * complex type we include on a stored entity.
263
+ *
264
+ * Example::
265
+ * >>> class Foo(ObjectBase):
266
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
267
+ * ...: other: str = "default"
268
+ */
269
+ TokenCreationConfigV1: {
270
+ /** Tokenuri */
271
+ tokenURI: string;
272
+ /** Maxsupply */
273
+ maxSupply: string;
274
+ /** Maxtokensperaddress */
275
+ maxTokensPerAddress: string;
276
+ /** Pricepertoken */
277
+ pricePerToken: string;
278
+ /** Mintstart */
279
+ mintStart: string;
280
+ /** Mintduration */
281
+ mintDuration: string;
282
+ /** Royaltymintschedule */
283
+ royaltyMintSchedule: number;
284
+ /** Royaltybps */
285
+ royaltyBPS: number;
286
+ /** Royaltyrecipient */
287
+ royaltyRecipient: string;
288
+ /** Fixedpriceminter */
289
+ fixedPriceMinter: string;
290
+ };
291
+ /**
292
+ * TokenCreationConfigV2
293
+ * @description ObjectBase extends Pydantic's BaseModel class to support extra functionality
294
+ * (store_as, override_name), as well as provides other convinience methods.
295
+ * ObjectBase allows for validation and type enforcement, and should be used inheritedfor any
296
+ * complex type we include on a stored entity.
297
+ *
298
+ * Example::
299
+ * >>> class Foo(ObjectBase):
300
+ * ...: found_at_height: int = field(override_name="address", store_as=str)
301
+ * ...: other: str = "default"
302
+ */
303
+ TokenCreationConfigV2: {
304
+ /** Tokenuri */
305
+ tokenURI: string;
306
+ /** Maxsupply */
307
+ maxSupply: string;
308
+ /** Maxtokensperaddress */
309
+ maxTokensPerAddress: string;
310
+ /** Pricepertoken */
311
+ pricePerToken: string;
312
+ /** Mintstart */
313
+ mintStart: string;
314
+ /** Mintduration */
315
+ mintDuration: string;
316
+ /** Royaltybps */
317
+ royaltyBPS: number;
318
+ /** Fixedpriceminter */
319
+ fixedPriceMinter: string;
320
+ /** Payoutrecipient */
321
+ payoutRecipient: string;
322
+ /** Createreferral */
323
+ createReferral: string;
324
+ };
325
+ /** ValidationError */
326
+ ValidationError: {
327
+ /** Location */
328
+ loc: (string | number)[];
329
+ /** Message */
330
+ msg: string;
331
+ /** Error Type */
332
+ type: string;
333
+ };
334
+ };
335
+ responses: never;
336
+ parameters: never;
337
+ requestBodies: never;
338
+ headers: never;
339
+ pathItems: never;
340
+ }
341
+ export type $defs = Record<string, never>;
342
+ export type external = Record<string, never>;
343
+ export interface operations {
344
+ /** Upsert Premint Signature */
345
+ upsert_premint_signature_signature_post: {
346
+ requestBody: {
347
+ content: {
348
+ "application/json": components["schemas"]["PremintRequest"];
349
+ };
350
+ };
351
+ responses: {
352
+ /** @description Successful Response */
353
+ 200: {
354
+ content: {
355
+ "application/json": components["schemas"]["PremintSignature"];
356
+ };
357
+ };
358
+ /** @description Validation Error */
359
+ 422: {
360
+ content: {
361
+ "application/json": components["schemas"]["HTTPValidationError"];
362
+ };
363
+ };
364
+ };
365
+ };
366
+ /** Get Premint Signatures For Collection */
367
+ get_premint_signatures_for_collection_signature__chain_name___collection_address__get: {
368
+ parameters: {
369
+ path: {
370
+ chain_name: components["schemas"]["ChainName"];
371
+ collection_address: string;
372
+ };
373
+ };
374
+ responses: {
375
+ /** @description Successful Response */
376
+ 200: {
377
+ content: {
378
+ "application/json": components["schemas"]["PremintCollection"];
379
+ };
380
+ };
381
+ /** @description Validation Error */
382
+ 422: {
383
+ content: {
384
+ "application/json": components["schemas"]["HTTPValidationError"];
385
+ };
386
+ };
387
+ };
388
+ };
389
+ /** Get Next Uid */
390
+ get_next_uid_signature__chain_name___collection_address__next_uid_get: {
391
+ parameters: {
392
+ path: {
393
+ chain_name: components["schemas"]["ChainName"];
394
+ collection_address: string;
395
+ };
396
+ };
397
+ responses: {
398
+ /** @description Successful Response */
399
+ 200: {
400
+ content: {
401
+ "application/json": components["schemas"]["PremintNextUid"];
402
+ };
403
+ };
404
+ /** @description Validation Error */
405
+ 422: {
406
+ content: {
407
+ "application/json": components["schemas"]["HTTPValidationError"];
408
+ };
409
+ };
410
+ };
411
+ };
412
+ /** Get Premint Signature */
413
+ get_premint_signature_signature__chain_name___collection_address___uid__get: {
414
+ parameters: {
415
+ path: {
416
+ chain_name: components["schemas"]["ChainName"];
417
+ collection_address: string;
418
+ uid: number;
419
+ };
420
+ };
421
+ responses: {
422
+ /** @description Successful Response */
423
+ 200: {
424
+ content: {
425
+ "application/json": components["schemas"]["PremintSignature"];
426
+ };
427
+ };
428
+ /** @description Validation Error */
429
+ 422: {
430
+ content: {
431
+ "application/json": components["schemas"]["HTTPValidationError"];
432
+ };
433
+ };
434
+ };
435
+ };
436
+ /** Get Premint Signatures By Signer */
437
+ get_premint_signatures_by_signer_created__chain_name___signer__get: {
438
+ parameters: {
439
+ path: {
440
+ chain_name: components["schemas"]["ChainName"];
441
+ signer: string;
442
+ };
443
+ };
444
+ responses: {
445
+ /** @description Successful Response */
446
+ 200: {
447
+ content: {
448
+ "application/json": components["schemas"]["PremintCollection"][];
449
+ };
450
+ };
451
+ /** @description Validation Error */
452
+ 422: {
453
+ content: {
454
+ "application/json": components["schemas"]["HTTPValidationError"];
455
+ };
456
+ };
457
+ };
458
+ };
459
+ }
460
+ //# sourceMappingURL=premint-api-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"premint-api-types.d.ts","sourceRoot":"","sources":["../../../src/apis/generated/premint-api-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE;QACZ,+BAA+B;QAC/B,IAAI,EAAE,UAAU,CAAC,yCAAyC,CAAC,CAAC;KAC7D,CAAC;IACF,8CAA8C,EAAE;QAC9C,4CAA4C;QAC5C,GAAG,EAAE,UAAU,CAAC,uFAAuF,CAAC,CAAC;KAC1G,CAAC;IACF,uDAAuD,EAAE;QACvD,mBAAmB;QACnB,GAAG,EAAE,UAAU,CAAC,uEAAuE,CAAC,CAAC;KAC1F,CAAC;IACF,oDAAoD,EAAE;QACpD,4BAA4B;QAC5B,GAAG,EAAE,UAAU,CAAC,6EAA6E,CAAC,CAAC;KAChG,CAAC;IACF,gCAAgC,EAAE;QAChC,uCAAuC;QACvC,GAAG,EAAE,UAAU,CAAC,oEAAoE,CAAC,CAAC;KACvF,CAAC;CACH;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE7C,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE;QACP;;;;WAIG;QACH,SAAS,EACL,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,aAAa,GACb,cAAc,GACd,cAAc,GACd,cAAc,GACd,aAAa,GACb,aAAa,CAAC;QAClB;;;;;;;;;;;WAWG;QACH,wBAAwB,EAAE;YACxB,oBAAoB;YACpB,aAAa,EAAE,MAAM,CAAC;YACtB,kBAAkB;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB,mBAAmB;YACnB,YAAY,EAAE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,kBAAkB,CAAC,CAAC;iBAC/D,CAAC;aACH,CAAC;YACF,oCAAoC;YACpC,GAAG,EAAE;gBACH,OAAO,EAAE;oBACP,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;iBAClE,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;IACF,uCAAuC;IACvC,kEAAkE,EAAE;QAClE,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;gBAC/C,MAAM,EAAE,MAAM,CAAC;aAChB,CAAC;SACH,CAAC;QACF,SAAS,EAAE;YACT,uCAAuC;YACvC,GAAG,EAAE;gBACH,OAAO,EAAE;oBACP,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC;iBAClE,CAAC;aACH,CAAC;YACF,oCAAoC;YACpC,GAAG,EAAE;gBACH,OAAO,EAAE;oBACP,kBAAkB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;iBAClE,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH"}
@@ -0,0 +1,32 @@
1
+ export declare class BadResponseError<T = any> extends Error {
2
+ status: number;
3
+ json: T;
4
+ constructor(message: string, status: number, json: any);
5
+ }
6
+ /**
7
+ * A simple fetch() wrapper for HTTP gets.
8
+ * Can be overridden as needed.
9
+ *
10
+ * @param path Path to run HTTP JSON get against
11
+ * @returns JSON object response
12
+ * @throws Error when HTTP response fails
13
+ */
14
+ export declare const get: <T>(url: string) => Promise<T>;
15
+ /**
16
+ * A simple fetch() wrapper for HTTP post.
17
+ * Can be overridden as needed.
18
+ *
19
+ * @param path Path to run HTTP JSON POST against
20
+ * @param data Data to POST to the server, converted to JSON
21
+ * @returns JSON object response
22
+ * @throws Error when HTTP response fails
23
+ */
24
+ export declare const post: <T>(url: string, data: any) => Promise<T>;
25
+ export declare const retries: <T>(tryFn: () => T, maxTries?: number, atTry?: number, linearBackoffMS?: number) => Promise<T>;
26
+ export interface IHttpClient {
27
+ get: typeof get;
28
+ post: typeof post;
29
+ retries: typeof retries;
30
+ }
31
+ export declare const httpClient: IHttpClient;
32
+ //# sourceMappingURL=http-api-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-api-base.d.ts","sourceRoot":"","sources":["../../src/apis/http-api-base.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,KAAK;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,CAAC,CAAC;gBACI,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;CAMvD;AAQD;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,WAAkB,MAAM,eAcvC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,WAAkB,MAAM,QAAQ,GAAG,eAqBnD,CAAC;AAEF,eAAO,MAAM,OAAO,iCAER,MAAM,UACT,MAAM,oBACI,MAAM,eAexB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,OAAO,GAAG,CAAC;IAChB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,WAIxB,CAAC"}
@@ -0,0 +1,36 @@
1
+ export declare const ZORA_API_BASE = "https://api.zora.co/";
2
+ export declare const OPEN_EDITION_MINT_SIZE: bigint;
3
+ export declare function getSubgraph(name: string, version: string): string;
4
+ export declare const zora721Abi: readonly [{
5
+ readonly name: "mintWithRewards";
6
+ readonly type: "function";
7
+ readonly stateMutability: "payable";
8
+ readonly inputs: readonly [{
9
+ readonly type: "address";
10
+ readonly name: "recipient";
11
+ }, {
12
+ readonly type: "uint256";
13
+ readonly name: "quantity";
14
+ }, {
15
+ readonly type: "string";
16
+ readonly name: "comment";
17
+ }, {
18
+ readonly type: "address";
19
+ readonly name: "mintReferral";
20
+ }];
21
+ readonly outputs: readonly [];
22
+ }, {
23
+ readonly name: "zoraFeeForAmount";
24
+ readonly type: "function";
25
+ readonly stateMutability: "view";
26
+ readonly inputs: readonly [{
27
+ readonly type: "uint256";
28
+ readonly name: "amount";
29
+ }];
30
+ readonly outputs: readonly [{
31
+ readonly type: "address";
32
+ }, {
33
+ readonly type: "uint256";
34
+ }];
35
+ }];
36
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,yBAAyB,CAAC;AACpD,eAAO,MAAM,sBAAsB,QAAiC,CAAC;AAMrE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGZ,CAAC"}