@zoralabs/protocol-sdk 0.7.1 → 0.7.2-ALLOWLIST.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/allow-list/allow-list-client.d.ts +25 -0
  3. package/dist/allow-list/allow-list-client.d.ts.map +1 -0
  4. package/dist/allow-list/types.d.ts +14 -0
  5. package/dist/allow-list/types.d.ts.map +1 -0
  6. package/dist/apis/generated/allow-list-api-types.d.ts +288 -0
  7. package/dist/apis/generated/allow-list-api-types.d.ts.map +1 -0
  8. package/dist/apis/http-api-base.d.ts.map +1 -1
  9. package/dist/create/1155-create-helper.d.ts +1 -0
  10. package/dist/create/1155-create-helper.d.ts.map +1 -1
  11. package/dist/create/token-setup.d.ts +3 -4
  12. package/dist/create/token-setup.d.ts.map +1 -1
  13. package/dist/create/types.d.ts +24 -4
  14. package/dist/create/types.d.ts.map +1 -1
  15. package/dist/index.cjs +219 -39
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +220 -40
  20. package/dist/index.js.map +1 -1
  21. package/dist/mint/mint-queries.d.ts +3 -1
  22. package/dist/mint/mint-queries.d.ts.map +1 -1
  23. package/dist/mint/mint-transactions.d.ts +5 -3
  24. package/dist/mint/mint-transactions.d.ts.map +1 -1
  25. package/dist/mint/subgraph-mint-getter.d.ts.map +1 -1
  26. package/dist/mint/subgraph-queries.d.ts +27 -13
  27. package/dist/mint/subgraph-queries.d.ts.map +1 -1
  28. package/dist/mint/types.d.ts +22 -11
  29. package/dist/mint/types.d.ts.map +1 -1
  30. package/package.json +2 -1
  31. package/src/allow-list/allow-list-client.ts +102 -0
  32. package/src/allow-list/types.ts +15 -0
  33. package/src/apis/generated/allow-list-api-types.ts +288 -0
  34. package/src/apis/http-api-base.ts +12 -0
  35. package/src/create/1155-create-helper.ts +17 -0
  36. package/src/create/token-setup.ts +116 -19
  37. package/src/create/types.ts +32 -4
  38. package/src/index.ts +4 -0
  39. package/src/mint/mint-queries.ts +6 -0
  40. package/src/mint/mint-transactions.ts +72 -6
  41. package/src/mint/subgraph-mint-getter.ts +12 -3
  42. package/src/mint/subgraph-queries.ts +39 -17
  43. package/src/mint/types.ts +38 -12
  44. package/yarn-error.log +8602 -0
  45. package/.turbo/turbo-build.log +0 -15
  46. package/src/create/1155-create-helper.test.ts +0 -325
  47. package/src/mint/mint-client.test.ts +0 -263
  48. package/src/mints/mints-contracts.test.ts +0 -529
  49. package/src/mints/mints-eth-unwrapper-and-caller.test.ts +0 -467
  50. package/src/mints/mints-queries.test.ts +0 -105
  51. package/src/premint/premint-client.test.ts +0 -290
  52. package/src/premint/preminter.test.ts +0 -866
  53. package/test-integration/setup-test-contracts.ts +0 -96
  54. package/tsconfig.build.json +0 -10
  55. package/tsup.config.ts +0 -12
@@ -1,96 +0,0 @@
1
- import {
2
- createCollectorClient,
3
- createCreatorClient,
4
- getPremintCollectionAddress,
5
- } from "src";
6
- import {
7
- LocalAccount,
8
- createPublicClient,
9
- createWalletClient,
10
- http,
11
- parseEther,
12
- } from "viem";
13
- import { privateKeyToAccount } from "viem/accounts";
14
- import { zoraSepolia } from "viem/chains";
15
-
16
- const publicClient = createPublicClient({
17
- chain: zoraSepolia,
18
- transport: http(),
19
- });
20
-
21
- const walletClient = createWalletClient({
22
- chain: zoraSepolia,
23
- transport: http(),
24
- });
25
-
26
- const creatorClient = createCreatorClient({
27
- chainId: zoraSepolia.id,
28
- publicClient,
29
- });
30
-
31
- const collectorClient = createCollectorClient({
32
- chainId: zoraSepolia.id,
33
- publicClient,
34
- });
35
-
36
- export const createPremintsOnContract = async ({
37
- creatorAccount,
38
- }: {
39
- creatorAccount: LocalAccount;
40
- }) => {
41
- const collectionAddress = await getPremintCollectionAddress({
42
- publicClient,
43
- contract: {
44
- contractAdmin: creatorAccount.address,
45
- contractName: "testContract",
46
- contractURI:
47
- "ipfs://bafkreiainxen4b4wz4ubylvbhons6rembxdet4a262nf2lziclqvv7au3e",
48
- },
49
- });
50
-
51
- console.log({ collectionAddress });
52
-
53
- const { typedDataDefinition, submit } = await creatorClient.createPremint({
54
- contract: {
55
- contractAdmin: creatorAccount.address,
56
- contractName: "testContract",
57
- contractURI:
58
- "ipfs://bafkreiainxen4b4wz4ubylvbhons6rembxdet4a262nf2lziclqvv7au3e",
59
- },
60
- token: {
61
- payoutRecipient: creatorAccount.address,
62
- tokenURI:
63
- "ipfs://bafkreice23maski3x52tsfqgxstx3kbiifnt5jotg3a5ynvve53c4soi2u",
64
- pricePerToken: parseEther("0.001"),
65
- },
66
- });
67
-
68
- const signature = await walletClient.signTypedData({
69
- account: creatorAccount,
70
- ...typedDataDefinition,
71
- });
72
-
73
- await submit({
74
- signature,
75
- });
76
-
77
- const mints = await collectorClient.getTokensOfContract({
78
- tokenContract: collectionAddress,
79
- });
80
-
81
- console.log({ mints: mints.map((x) => x.mintable) });
82
- };
83
-
84
- const setupTestContracts = async () => {
85
- const creatorAccount = privateKeyToAccount(
86
- // random private key created by cast
87
- "0x0d32fcabfe28c779974a77dc635163f062be2bc0b10eea62994235617b44092f",
88
- );
89
-
90
- // create 2 premints on a contract
91
- await createPremintsOnContract({
92
- creatorAccount,
93
- });
94
- };
95
-
96
- setupTestContracts();
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "zoralabs-tsconfig/tsconfig.json",
3
- "compilerOptions": {
4
- "lib": ["es2021", "DOM"],
5
- "baseUrl": ".",
6
- "outDir": "dist"
7
- },
8
- "exclude": ["node_modules/**", "dist/**", "**/*test.ts"],
9
- "include": ["src/**/*.ts"],
10
- }
package/tsup.config.ts DELETED
@@ -1,12 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig({
4
- entry: ["src/index.ts"],
5
- sourcemap: true,
6
- clean: true,
7
- tsconfig: "tsconfig.build.json",
8
- dts: false,
9
- format: ["cjs", "esm"],
10
- onSuccess:
11
- "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
12
- });