@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.
- package/CHANGELOG.md +6 -0
- package/dist/allow-list/allow-list-client.d.ts +25 -0
- package/dist/allow-list/allow-list-client.d.ts.map +1 -0
- package/dist/allow-list/types.d.ts +14 -0
- package/dist/allow-list/types.d.ts.map +1 -0
- package/dist/apis/generated/allow-list-api-types.d.ts +288 -0
- package/dist/apis/generated/allow-list-api-types.d.ts.map +1 -0
- package/dist/apis/http-api-base.d.ts.map +1 -1
- package/dist/create/1155-create-helper.d.ts +1 -0
- package/dist/create/1155-create-helper.d.ts.map +1 -1
- package/dist/create/token-setup.d.ts +3 -4
- package/dist/create/token-setup.d.ts.map +1 -1
- package/dist/create/types.d.ts +24 -4
- package/dist/create/types.d.ts.map +1 -1
- package/dist/index.cjs +219 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +220 -40
- package/dist/index.js.map +1 -1
- package/dist/mint/mint-queries.d.ts +3 -1
- package/dist/mint/mint-queries.d.ts.map +1 -1
- package/dist/mint/mint-transactions.d.ts +5 -3
- package/dist/mint/mint-transactions.d.ts.map +1 -1
- package/dist/mint/subgraph-mint-getter.d.ts.map +1 -1
- package/dist/mint/subgraph-queries.d.ts +27 -13
- package/dist/mint/subgraph-queries.d.ts.map +1 -1
- package/dist/mint/types.d.ts +22 -11
- package/dist/mint/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/allow-list/allow-list-client.ts +102 -0
- package/src/allow-list/types.ts +15 -0
- package/src/apis/generated/allow-list-api-types.ts +288 -0
- package/src/apis/http-api-base.ts +12 -0
- package/src/create/1155-create-helper.ts +17 -0
- package/src/create/token-setup.ts +116 -19
- package/src/create/types.ts +32 -4
- package/src/index.ts +4 -0
- package/src/mint/mint-queries.ts +6 -0
- package/src/mint/mint-transactions.ts +72 -6
- package/src/mint/subgraph-mint-getter.ts +12 -3
- package/src/mint/subgraph-queries.ts +39 -17
- package/src/mint/types.ts +38 -12
- package/yarn-error.log +8602 -0
- package/.turbo/turbo-build.log +0 -15
- package/src/create/1155-create-helper.test.ts +0 -325
- package/src/mint/mint-client.test.ts +0 -263
- package/src/mints/mints-contracts.test.ts +0 -529
- package/src/mints/mints-eth-unwrapper-and-caller.test.ts +0 -467
- package/src/mints/mints-queries.test.ts +0 -105
- package/src/premint/premint-client.test.ts +0 -290
- package/src/premint/preminter.test.ts +0 -866
- package/test-integration/setup-test-contracts.ts +0 -96
- package/tsconfig.build.json +0 -10
- package/tsup.config.ts +0 -12
|
@@ -2,6 +2,7 @@ import { IPremintGetter } from "src/premint/premint-api-client";
|
|
|
2
2
|
import { ContractInfo, GetMintCostsParameters, GetMintParameters, GetMintsOfContractParameters, IOnchainMintGetter, MintableReturn } from "./types";
|
|
3
3
|
import { Address } from "viem";
|
|
4
4
|
import { IPublicClient } from "src/types";
|
|
5
|
+
import { AllowListEntry } from "src/allow-list/types";
|
|
5
6
|
export declare function getMint({ params, mintGetter, premintGetter, publicClient, }: {
|
|
6
7
|
params: GetMintParameters;
|
|
7
8
|
mintGetter: IOnchainMintGetter;
|
|
@@ -29,8 +30,9 @@ export declare function getMintsOfContract({ params, mintGetter, premintGetter,
|
|
|
29
30
|
contract?: ContractInfo;
|
|
30
31
|
tokens: MintableReturn[];
|
|
31
32
|
}>;
|
|
32
|
-
export declare function getMintCosts({ params, mintGetter, premintGetter, publicClient, }: {
|
|
33
|
+
export declare function getMintCosts({ params, allowListEntry, mintGetter, premintGetter, publicClient, }: {
|
|
33
34
|
params: GetMintCostsParameters;
|
|
35
|
+
allowListEntry?: Pick<AllowListEntry, "price">;
|
|
34
36
|
mintGetter: IOnchainMintGetter;
|
|
35
37
|
premintGetter: IPremintGetter;
|
|
36
38
|
publicClient: IPublicClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mint-queries.d.ts","sourceRoot":"","sources":["../../src/mint/mint-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,YAAY,EAEZ,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAElB,cAAc,EAMf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAY5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"mint-queries.d.ts","sourceRoot":"","sources":["../../src/mint/mint-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,YAAY,EAEZ,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAElB,cAAc,EAMf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAY5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,wBAAsB,OAAO,CAAC,EAC5B,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,GACb,EAAE;IACD,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,EAAE,cAAc,CAAC;IAC9B,YAAY,EAAE,aAAa,CAAC;CAC7B,GAAG,OAAO,CAAC,cAAc,CAAC,CAwB1B;AACD,wBAAsB,mCAAmC,CAAC,EACxD,aAAa,EACb,UAAU,EACV,aAAa,GACd,EAAE;IACD,aAAa,EAAE,cAAc,CAAC;IAC9B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;CACxB;;;;;;;GAoBA;AAED,wBAAsB,kBAAkB,CAAC,EACvC,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,GACb,EAAE;IACD,MAAM,EAAE,4BAA4B,CAAC;IACrC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,EAAE,cAAc,CAAC;IAC9B,YAAY,EAAE,aAAa,CAAC;CAC7B,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAsBjE;AAED,wBAAsB,YAAY,CAAC,EACjC,MAAM,EACN,cAAc,EACd,UAAU,EACV,aAAa,EACb,YAAY,GACb,EAAE;IACD,MAAM,EAAE,sBAAsB,CAAC;IAC/B,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAC/C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,EAAE,cAAc,CAAC;IAC9B,YAAY,EAAE,aAAa,CAAC;CAC7B,wCAwBA"}
|
|
@@ -3,18 +3,20 @@ import { GenericTokenIdTypes, SimulateContractParametersWithAccount } from "src/
|
|
|
3
3
|
import { MintCosts, SaleStrategies } from "./types";
|
|
4
4
|
import { MakeMintParametersArgumentsBase } from "./types";
|
|
5
5
|
import { OnchainSalesConfigAndTokenInfo } from "./types";
|
|
6
|
+
import { AllowListEntry } from "src/allow-list/types";
|
|
6
7
|
export declare function makeOnchainMintCall({ token, mintParams, }: {
|
|
7
8
|
token: OnchainSalesConfigAndTokenInfo;
|
|
8
9
|
mintParams: Omit<MakeMintParametersArgumentsBase, "tokenContract">;
|
|
9
10
|
}): SimulateContractParametersWithAccount;
|
|
10
11
|
export type MintableParameters = Pick<OnchainSalesConfigAndTokenInfo, "contractVersion" | "mintFeePerQuantity" | "salesConfig">;
|
|
11
|
-
export declare function makePrepareMint1155TokenParams({ tokenContract: tokenContract, tokenId, salesConfigAndTokenInfo, minterAccount, mintComment, mintReferral, mintRecipient, quantityToMint, }: {
|
|
12
|
+
export declare function makePrepareMint1155TokenParams({ tokenContract: tokenContract, tokenId, salesConfigAndTokenInfo, minterAccount, mintComment, mintReferral, mintRecipient, quantityToMint, allowListEntry, }: {
|
|
12
13
|
salesConfigAndTokenInfo: MintableParameters;
|
|
13
14
|
tokenId: GenericTokenIdTypes;
|
|
14
|
-
} & Pick<MakeMintParametersArgumentsBase, "minterAccount" | "tokenContract" | "mintComment" | "mintReferral" | "quantityToMint" | "mintRecipient">): SimulateContractParameters<any, any, any, any, any, Address | Account>;
|
|
15
|
-
export declare function parseMintCosts({ salesConfig, mintFeePerQuantity, quantityToMint, }: {
|
|
15
|
+
} & Pick<MakeMintParametersArgumentsBase, "minterAccount" | "tokenContract" | "mintComment" | "mintReferral" | "quantityToMint" | "mintRecipient" | "allowListEntry">): SimulateContractParameters<any, any, any, any, any, Address | Account>;
|
|
16
|
+
export declare function parseMintCosts({ salesConfig, mintFeePerQuantity, quantityToMint, allowListEntry, }: {
|
|
16
17
|
salesConfig: SaleStrategies;
|
|
17
18
|
mintFeePerQuantity: bigint;
|
|
18
19
|
quantityToMint: bigint;
|
|
20
|
+
allowListEntry: Pick<AllowListEntry, "price"> | undefined;
|
|
19
21
|
}): MintCosts;
|
|
20
22
|
//# sourceMappingURL=mint-transactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mint-transactions.d.ts","sourceRoot":"","sources":["../../src/mint/mint-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAIP,OAAO,EACP,0BAA0B,
|
|
1
|
+
{"version":3,"file":"mint-transactions.d.ts","sourceRoot":"","sources":["../../src/mint/mint-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAIP,OAAO,EACP,0BAA0B,EAE3B,MAAM,MAAM,CAAC;AAMd,OAAO,EACL,mBAAmB,EACnB,qCAAqC,EACtC,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAuB,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,+BAA+B,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oot":"","sources":["../../src/mint/subgraph-mint-getter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAEL,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAwB,MAAM,0BAA0B,CAAC;AAE/E,OAAO,EACL,kBAAkB,EAClB,QAAQ,EAER,8BAA8B,EAG/B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAIL,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,2BAA2B,YAAa,MAAM,KAAG,aAK7D,CAAC;
|
|
1
|
+
{"version":3,"file":"subgraph-mint-getter.d.ts","sourceRoot":"","sources":["../../src/mint/subgraph-mint-getter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAEL,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAwB,MAAM,0BAA0B,CAAC;AAE/E,OAAO,EACL,kBAAkB,EAClB,QAAQ,EAER,8BAA8B,EAG/B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAIL,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,2BAA2B,YAAa,MAAM,KAAG,aAK7D,CAAC;AAuFF,qBAAa,kBAAmB,YAAW,kBAAkB;IAC3D,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,aAAa,CAAC;gBAEjB,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,WAAW;IAK/C,wBAAwB,CAAC,CAAC,EAAE,EAChC,KAAK,EACL,SAAS,EACT,iBAAiB,GAClB,EAAE,cAAc,CAAC,CAAC,CAAC;IAWpB,WAAW,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAqB5C;IAEI,mBAAmB,CAAC,EACxB,YAAY,EACZ,iBAAiB,GAClB,EAAE;QACD,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,CAAC,EAAE,QAAQ,CAAC;KAC9B;IAoBK,0BAA0B,CAAC,EAC/B,YAAY,GACb,EAAE;QACD,YAAY,EAAE,OAAO,CAAC;KACvB;;;;CAcF"}
|
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
import { GenericTokenIdTypes } from "src/types";
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
export type FixedPriceSaleStrategyResult = {
|
|
4
|
-
address: Address;
|
|
5
|
-
pricePerToken: string;
|
|
6
|
-
saleEnd: string;
|
|
7
|
-
saleStart: string;
|
|
8
|
-
maxTokensPerAddress: string;
|
|
9
|
-
};
|
|
10
|
-
export type ERC20SaleStrategyResult = FixedPriceSaleStrategyResult & {
|
|
11
|
-
currency: Address;
|
|
12
|
-
};
|
|
13
|
-
export type SalesStrategyResult = {
|
|
14
4
|
type: "FIXED_PRICE";
|
|
15
|
-
fixedPrice:
|
|
16
|
-
|
|
5
|
+
fixedPrice: {
|
|
6
|
+
address: Address;
|
|
7
|
+
pricePerToken: string;
|
|
8
|
+
saleEnd: string;
|
|
9
|
+
saleStart: string;
|
|
10
|
+
maxTokensPerAddress: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type ERC20SaleStrategyResult = {
|
|
17
14
|
type: "ERC_20_MINTER";
|
|
18
|
-
erc20Minter:
|
|
15
|
+
erc20Minter: {
|
|
16
|
+
address: Address;
|
|
17
|
+
pricePerToken: string;
|
|
18
|
+
saleEnd: string;
|
|
19
|
+
saleStart: string;
|
|
20
|
+
maxTokensPerAddress: string;
|
|
21
|
+
currency: Address;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type PresaleSalesStrategyResult = {
|
|
25
|
+
type: "PRESALE";
|
|
26
|
+
presale: {
|
|
27
|
+
address: Address;
|
|
28
|
+
presaleStart: string;
|
|
29
|
+
presaleEnd: string;
|
|
30
|
+
merkleRoot: string;
|
|
31
|
+
};
|
|
19
32
|
};
|
|
33
|
+
export type SalesStrategyResult = FixedPriceSaleStrategyResult | ERC20SaleStrategyResult | PresaleSalesStrategyResult;
|
|
20
34
|
export type TokenQueryResult = {
|
|
21
35
|
tokenId?: string;
|
|
22
36
|
creator: Address;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph-queries.d.ts","sourceRoot":"","sources":["../../src/mint/subgraph-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,MAAM,4BAA4B,GAAG;IACzC,OAAO,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"subgraph-queries.d.ts","sourceRoot":"","sources":["../../src/mint/subgraph-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,mBAAmB,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,EAAE;QACX,OAAO,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE;QAC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AAK,CAAC,GAAG,SAAS,CAAC;CAC7D,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAC3C,YAAY,GACb,EAAE;IACD,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,cAAc,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAgBrD"}
|
package/dist/mint/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Account, Address } from "viem";
|
|
2
2
|
import { GenericTokenIdTypes, SimulateContractParametersWithAccount } from "src/types";
|
|
3
|
+
import { AllowListEntry } from "src/allow-list/types";
|
|
3
4
|
export type MintParameters<MintType> = {
|
|
4
5
|
/** Type of the collection to be minted. */
|
|
5
6
|
mintType: MintType;
|
|
@@ -14,7 +15,7 @@ export type PremintMintParameters = MintParameters<"premint"> & {
|
|
|
14
15
|
/** uid of the Premint to mint */
|
|
15
16
|
uid: number;
|
|
16
17
|
};
|
|
17
|
-
export type MintType = "1155" | "721" | "premint";
|
|
18
|
+
export type MintType = "1155" | "721" | "allowlist" | "premint";
|
|
18
19
|
export type MintTypes = Erc1155MintParameters | Erc721MintParameters | PremintMintParameters;
|
|
19
20
|
export type GetMintParameters = MintTypes & {
|
|
20
21
|
/** Address of the contract that the item belongs to */
|
|
@@ -41,6 +42,8 @@ export type MintParametersBase = {
|
|
|
41
42
|
mintRecipient?: Address;
|
|
42
43
|
/** If this is a premint, the address to get the first minter reward */
|
|
43
44
|
firstMinter?: Address;
|
|
45
|
+
/** If this is an allow list mint, the info for the allow list entry */
|
|
46
|
+
allowListEntry?: AllowListEntry;
|
|
44
47
|
};
|
|
45
48
|
export type MakeMintParametersArgumentsBase = MintParametersBase & {
|
|
46
49
|
/** Premint contract address */
|
|
@@ -63,29 +66,37 @@ export type GetMintCostsParameters = {
|
|
|
63
66
|
/** Quantity of tokens that will be minted */
|
|
64
67
|
quantityMinted: number | bigint;
|
|
65
68
|
} & MintTypes;
|
|
66
|
-
export type SaleType = "fixedPrice" | "erc20" | "premint";
|
|
69
|
+
export type SaleType = "fixedPrice" | "erc20" | "allowlist" | "premint";
|
|
67
70
|
type SaleStrategy<T extends SaleType> = {
|
|
68
71
|
saleType: T;
|
|
72
|
+
};
|
|
73
|
+
type PricedSaleStrategy = {
|
|
69
74
|
pricePerToken: bigint;
|
|
70
75
|
maxTokensPerAddress: bigint;
|
|
71
76
|
};
|
|
72
|
-
type
|
|
73
|
-
address: Address;
|
|
77
|
+
export type StartAndEnd = {
|
|
74
78
|
saleStart: string;
|
|
75
79
|
saleEnd: string;
|
|
76
80
|
};
|
|
77
|
-
type
|
|
81
|
+
type FixedPriceSaleStrategy = SaleStrategy<"fixedPrice"> & PricedSaleStrategy & StartAndEnd & {
|
|
82
|
+
address: Address;
|
|
83
|
+
};
|
|
84
|
+
type ERC20SaleStrategy = SaleStrategy<"erc20"> & PricedSaleStrategy & StartAndEnd & {
|
|
85
|
+
address: Address;
|
|
86
|
+
currency: Address;
|
|
87
|
+
};
|
|
88
|
+
type AllowListSaleStrategy = SaleStrategy<"allowlist"> & {
|
|
78
89
|
address: Address;
|
|
79
90
|
saleStart: string;
|
|
80
91
|
saleEnd: string;
|
|
81
|
-
|
|
92
|
+
merkleRoot: string;
|
|
82
93
|
};
|
|
83
|
-
type PremintSaleStrategy = SaleStrategy<"premint"> & {
|
|
94
|
+
type PremintSaleStrategy = SaleStrategy<"premint"> & PricedSaleStrategy & {
|
|
84
95
|
duration: bigint;
|
|
85
96
|
};
|
|
86
|
-
export type SaleStrategies = FixedPriceSaleStrategy | ERC20SaleStrategy | PremintSaleStrategy;
|
|
87
|
-
export type OnchainSalesStrategies = FixedPriceSaleStrategy | ERC20SaleStrategy;
|
|
88
|
-
export declare function isErc20SaleStrategy(salesConfig:
|
|
97
|
+
export type SaleStrategies = FixedPriceSaleStrategy | ERC20SaleStrategy | AllowListSaleStrategy | PremintSaleStrategy;
|
|
98
|
+
export type OnchainSalesStrategies = FixedPriceSaleStrategy | ERC20SaleStrategy | AllowListSaleStrategy;
|
|
99
|
+
export declare function isErc20SaleStrategy(salesConfig: SaleStrategies): salesConfig is ERC20SaleStrategy;
|
|
89
100
|
export type ContractInfo = {
|
|
90
101
|
/** Address of the contract */
|
|
91
102
|
address: Address;
|
|
@@ -118,7 +129,7 @@ export type PremintMintable = MintableBase & {
|
|
|
118
129
|
uid: number;
|
|
119
130
|
};
|
|
120
131
|
export type OnchainSalesConfigAndTokenInfo = {
|
|
121
|
-
salesConfig: FixedPriceSaleStrategy | ERC20SaleStrategy;
|
|
132
|
+
salesConfig: FixedPriceSaleStrategy | ERC20SaleStrategy | AllowListSaleStrategy;
|
|
122
133
|
} & OnchainMintable;
|
|
123
134
|
export type PremintSalesConfigAndTokenInfo = {
|
|
124
135
|
salesConfig: PremintSaleStrategy;
|
package/dist/mint/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mint/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,qCAAqC,EACtC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mint/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,qCAAqC,EACtC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,cAAc,CAAC,QAAQ,IAAI;IACrC,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAC3D,uBAAuB;IACvB,OAAO,EAAE,mBAAmB,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AAG;IAC1B,gDAAgD;IAChD,KAAK,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0DAA0D;IAC1D,UAAU,EAAE,qCAAqC,CAAC;IAClD,4EAA4E;IAC5E,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,oDAAoD;IACpD,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,kBAAkB,KAAK,iBAAiB,CAAC;AAE5E,MAAM,MAAM,cAAc,GAAG;IAC3B,wBAAwB;IACxB,KAAK,EAAE,uBAAuB,CAAC;IAC/B,6HAA6H;IAC7H,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2-ALLOWLIST.0",
|
|
4
4
|
"repository": "https://github.com/ourzora/zora-protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@reservoir0x/relay-sdk": "^0.3.8",
|
|
38
38
|
"@reservoir0x/reservoir-sdk": "^2.0.11",
|
|
39
39
|
"abitype": "^1.0.2",
|
|
40
|
+
"axios": "^1.7.2",
|
|
40
41
|
"graphql-prettier": "^1.0.6",
|
|
41
42
|
"typescript": "^5.2.2",
|
|
42
43
|
"vite": "^4.5.0",
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IHttpClient,
|
|
3
|
+
httpClient as defaultHttpClient,
|
|
4
|
+
} from "src/apis/http-api-base";
|
|
5
|
+
import { paths } from "../apis/generated/allow-list-api-types";
|
|
6
|
+
import { Hex } from "viem";
|
|
7
|
+
import { AllowList } from "./types";
|
|
8
|
+
|
|
9
|
+
type AllowListCreateType = paths["/allowlist"]["post"];
|
|
10
|
+
type AllowListCreateParameters =
|
|
11
|
+
AllowListCreateType["requestBody"]["content"]["application/json"];
|
|
12
|
+
type AllowListCreateResponse = {
|
|
13
|
+
existing?: {
|
|
14
|
+
entries: AllowListCreateParameters["entries"];
|
|
15
|
+
root: string;
|
|
16
|
+
added: string;
|
|
17
|
+
};
|
|
18
|
+
success: boolean;
|
|
19
|
+
root: string;
|
|
20
|
+
associated_id?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const ALLOW_LIST_API_BASE = "http://allowlist.zora.co/";
|
|
24
|
+
type AllowListAllowedResponse = {
|
|
25
|
+
maxCanMint: number;
|
|
26
|
+
price: string;
|
|
27
|
+
proof: string[];
|
|
28
|
+
}[];
|
|
29
|
+
|
|
30
|
+
export const createAllowList = async ({
|
|
31
|
+
allowList,
|
|
32
|
+
httpClient = defaultHttpClient,
|
|
33
|
+
}: {
|
|
34
|
+
allowList: AllowList;
|
|
35
|
+
httpClient?: IHttpClient;
|
|
36
|
+
baseUrl?: string;
|
|
37
|
+
}) => {
|
|
38
|
+
const { post, retries } = httpClient;
|
|
39
|
+
|
|
40
|
+
const data: AllowListCreateParameters = {
|
|
41
|
+
entries: allowList.entries.map((entry) => ({
|
|
42
|
+
user: entry.user,
|
|
43
|
+
maxCanMint: entry.maxCanMint,
|
|
44
|
+
price: entry.price.toString(),
|
|
45
|
+
})),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
await retries(() =>
|
|
50
|
+
post<AllowListCreateResponse>(`${ALLOW_LIST_API_BASE}allowlist`, data),
|
|
51
|
+
)
|
|
52
|
+
).root;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
function padHex(value: string): Hex {
|
|
56
|
+
if (value.startsWith("0x")) return value as Hex;
|
|
57
|
+
|
|
58
|
+
return `0x${value}`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const getAllowListEntry = async ({
|
|
62
|
+
merkleRoot,
|
|
63
|
+
address,
|
|
64
|
+
httpClient = defaultHttpClient,
|
|
65
|
+
}: {
|
|
66
|
+
merkleRoot: string;
|
|
67
|
+
httpClient?: IHttpClient;
|
|
68
|
+
address: string;
|
|
69
|
+
}) => {
|
|
70
|
+
const { retries, get } = httpClient;
|
|
71
|
+
|
|
72
|
+
const response = await retries(() =>
|
|
73
|
+
get<AllowListAllowedResponse>(
|
|
74
|
+
`${ALLOW_LIST_API_BASE}allowed?user=${address}&root=${merkleRoot}`,
|
|
75
|
+
),
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const entries = response?.map((x) => ({
|
|
79
|
+
maxCanMint: x.maxCanMint,
|
|
80
|
+
price: BigInt(x.price),
|
|
81
|
+
proof: x.proof.map(padHex),
|
|
82
|
+
}));
|
|
83
|
+
|
|
84
|
+
const entry = entries?.sort(
|
|
85
|
+
(a, b) => Number(a.price) - Number(b.price) || b.maxCanMint - a.maxCanMint,
|
|
86
|
+
)[0];
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
accessAllowed: entry && entry?.proof?.length,
|
|
90
|
+
allowListEntry: entry,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export interface IAllowListClient {
|
|
95
|
+
createAllowList: typeof createAllowList;
|
|
96
|
+
getAllowListEntry: typeof getAllowListEntry;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const defaultAllowListClient = (): IAllowListClient => ({
|
|
100
|
+
createAllowList,
|
|
101
|
+
getAllowListEntry,
|
|
102
|
+
});
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/_health": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/** Health */
|
|
15
|
+
get: operations["health__health_get"];
|
|
16
|
+
put?: never;
|
|
17
|
+
post?: never;
|
|
18
|
+
delete?: never;
|
|
19
|
+
options?: never;
|
|
20
|
+
head?: never;
|
|
21
|
+
patch?: never;
|
|
22
|
+
trace?: never;
|
|
23
|
+
};
|
|
24
|
+
"/allowlist": {
|
|
25
|
+
parameters: {
|
|
26
|
+
query?: never;
|
|
27
|
+
header?: never;
|
|
28
|
+
path?: never;
|
|
29
|
+
cookie?: never;
|
|
30
|
+
};
|
|
31
|
+
get?: never;
|
|
32
|
+
put?: never;
|
|
33
|
+
/**
|
|
34
|
+
* Add Allowlist
|
|
35
|
+
* @description This route adds a new allowlist
|
|
36
|
+
*/
|
|
37
|
+
post: operations["add_allowlist_allowlist_post"];
|
|
38
|
+
delete?: never;
|
|
39
|
+
options?: never;
|
|
40
|
+
head?: never;
|
|
41
|
+
patch?: never;
|
|
42
|
+
trace?: never;
|
|
43
|
+
};
|
|
44
|
+
"/allowed": {
|
|
45
|
+
parameters: {
|
|
46
|
+
query?: never;
|
|
47
|
+
header?: never;
|
|
48
|
+
path?: never;
|
|
49
|
+
cookie?: never;
|
|
50
|
+
};
|
|
51
|
+
/** Allowed */
|
|
52
|
+
get: operations["allowed_allowed_get"];
|
|
53
|
+
put?: never;
|
|
54
|
+
post?: never;
|
|
55
|
+
delete?: never;
|
|
56
|
+
options?: never;
|
|
57
|
+
head?: never;
|
|
58
|
+
patch?: never;
|
|
59
|
+
trace?: never;
|
|
60
|
+
};
|
|
61
|
+
"/allowlist/{root}": {
|
|
62
|
+
parameters: {
|
|
63
|
+
query?: never;
|
|
64
|
+
header?: never;
|
|
65
|
+
path?: never;
|
|
66
|
+
cookie?: never;
|
|
67
|
+
};
|
|
68
|
+
/** Allowlist */
|
|
69
|
+
get: operations["allowlist_allowlist__root__get"];
|
|
70
|
+
put?: never;
|
|
71
|
+
post?: never;
|
|
72
|
+
delete?: never;
|
|
73
|
+
options?: never;
|
|
74
|
+
head?: never;
|
|
75
|
+
patch?: never;
|
|
76
|
+
trace?: never;
|
|
77
|
+
};
|
|
78
|
+
"/allowlist/{root}/count": {
|
|
79
|
+
parameters: {
|
|
80
|
+
query?: never;
|
|
81
|
+
header?: never;
|
|
82
|
+
path?: never;
|
|
83
|
+
cookie?: never;
|
|
84
|
+
};
|
|
85
|
+
/** Allowlist Count */
|
|
86
|
+
get: operations["allowlist_count_allowlist__root__count_get"];
|
|
87
|
+
put?: never;
|
|
88
|
+
post?: never;
|
|
89
|
+
delete?: never;
|
|
90
|
+
options?: never;
|
|
91
|
+
head?: never;
|
|
92
|
+
patch?: never;
|
|
93
|
+
trace?: never;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export type webhooks = Record<string, never>;
|
|
97
|
+
export interface components {
|
|
98
|
+
schemas: {
|
|
99
|
+
/**
|
|
100
|
+
* AllowlistEntry
|
|
101
|
+
* @description Currently matches zora-nft-drops model
|
|
102
|
+
*/
|
|
103
|
+
AllowlistEntry: {
|
|
104
|
+
/** User */
|
|
105
|
+
user: string;
|
|
106
|
+
/** Price */
|
|
107
|
+
price: string;
|
|
108
|
+
/** Maxcanmint */
|
|
109
|
+
maxCanMint: number;
|
|
110
|
+
};
|
|
111
|
+
/** AllowlistRequest */
|
|
112
|
+
AllowlistRequest: {
|
|
113
|
+
/** Entries */
|
|
114
|
+
entries: components["schemas"]["AllowlistEntry"][];
|
|
115
|
+
/** Contract */
|
|
116
|
+
contract?: string;
|
|
117
|
+
};
|
|
118
|
+
/** HTTPValidationError */
|
|
119
|
+
HTTPValidationError: {
|
|
120
|
+
/** Detail */
|
|
121
|
+
detail?: components["schemas"]["ValidationError"][];
|
|
122
|
+
};
|
|
123
|
+
/** ValidationError */
|
|
124
|
+
ValidationError: {
|
|
125
|
+
/** Location */
|
|
126
|
+
loc: (string | number)[];
|
|
127
|
+
/** Message */
|
|
128
|
+
msg: string;
|
|
129
|
+
/** Error Type */
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
responses: never;
|
|
134
|
+
parameters: never;
|
|
135
|
+
requestBodies: never;
|
|
136
|
+
headers: never;
|
|
137
|
+
pathItems: never;
|
|
138
|
+
}
|
|
139
|
+
export type $defs = Record<string, never>;
|
|
140
|
+
export interface operations {
|
|
141
|
+
health__health_get: {
|
|
142
|
+
parameters: {
|
|
143
|
+
query?: never;
|
|
144
|
+
header?: never;
|
|
145
|
+
path?: never;
|
|
146
|
+
cookie?: never;
|
|
147
|
+
};
|
|
148
|
+
requestBody?: never;
|
|
149
|
+
responses: {
|
|
150
|
+
/** @description Successful Response */
|
|
151
|
+
200: {
|
|
152
|
+
headers: {
|
|
153
|
+
[name: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
content: {
|
|
156
|
+
"application/json": unknown;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
add_allowlist_allowlist_post: {
|
|
162
|
+
parameters: {
|
|
163
|
+
query?: never;
|
|
164
|
+
header?: never;
|
|
165
|
+
path?: never;
|
|
166
|
+
cookie?: never;
|
|
167
|
+
};
|
|
168
|
+
requestBody: {
|
|
169
|
+
content: {
|
|
170
|
+
"application/json": components["schemas"]["AllowlistRequest"];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
responses: {
|
|
174
|
+
/** @description Successful Response */
|
|
175
|
+
200: {
|
|
176
|
+
headers: {
|
|
177
|
+
[name: string]: unknown;
|
|
178
|
+
};
|
|
179
|
+
content: {
|
|
180
|
+
"application/json": unknown;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
/** @description Validation Error */
|
|
184
|
+
422: {
|
|
185
|
+
headers: {
|
|
186
|
+
[name: string]: unknown;
|
|
187
|
+
};
|
|
188
|
+
content: {
|
|
189
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
allowed_allowed_get: {
|
|
195
|
+
parameters: {
|
|
196
|
+
query: {
|
|
197
|
+
user: string;
|
|
198
|
+
root: string;
|
|
199
|
+
};
|
|
200
|
+
header?: never;
|
|
201
|
+
path?: never;
|
|
202
|
+
cookie?: never;
|
|
203
|
+
};
|
|
204
|
+
requestBody?: never;
|
|
205
|
+
responses: {
|
|
206
|
+
/** @description Successful Response */
|
|
207
|
+
200: {
|
|
208
|
+
headers: {
|
|
209
|
+
[name: string]: unknown;
|
|
210
|
+
};
|
|
211
|
+
content: {
|
|
212
|
+
"application/json": unknown;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
/** @description Validation Error */
|
|
216
|
+
422: {
|
|
217
|
+
headers: {
|
|
218
|
+
[name: string]: unknown;
|
|
219
|
+
};
|
|
220
|
+
content: {
|
|
221
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
allowlist_allowlist__root__get: {
|
|
227
|
+
parameters: {
|
|
228
|
+
query?: never;
|
|
229
|
+
header?: never;
|
|
230
|
+
path: {
|
|
231
|
+
root: string;
|
|
232
|
+
};
|
|
233
|
+
cookie?: never;
|
|
234
|
+
};
|
|
235
|
+
requestBody?: never;
|
|
236
|
+
responses: {
|
|
237
|
+
/** @description Successful Response */
|
|
238
|
+
200: {
|
|
239
|
+
headers: {
|
|
240
|
+
[name: string]: unknown;
|
|
241
|
+
};
|
|
242
|
+
content: {
|
|
243
|
+
"application/json": unknown;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
/** @description Validation Error */
|
|
247
|
+
422: {
|
|
248
|
+
headers: {
|
|
249
|
+
[name: string]: unknown;
|
|
250
|
+
};
|
|
251
|
+
content: {
|
|
252
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
allowlist_count_allowlist__root__count_get: {
|
|
258
|
+
parameters: {
|
|
259
|
+
query?: never;
|
|
260
|
+
header?: never;
|
|
261
|
+
path: {
|
|
262
|
+
root: string;
|
|
263
|
+
};
|
|
264
|
+
cookie?: never;
|
|
265
|
+
};
|
|
266
|
+
requestBody?: never;
|
|
267
|
+
responses: {
|
|
268
|
+
/** @description Successful Response */
|
|
269
|
+
200: {
|
|
270
|
+
headers: {
|
|
271
|
+
[name: string]: unknown;
|
|
272
|
+
};
|
|
273
|
+
content: {
|
|
274
|
+
"application/json": unknown;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/** @description Validation Error */
|
|
278
|
+
422: {
|
|
279
|
+
headers: {
|
|
280
|
+
[name: string]: unknown;
|
|
281
|
+
};
|
|
282
|
+
content: {
|
|
283
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
}
|