thirdweb 5.59.2 → 5.60.0-nightly-6c26012a71d884f99dd5d8c914b3879037b36d56-20240929000339
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/dist/cjs/exports/deploys.js +3 -1
- package/dist/cjs/exports/deploys.js.map +1 -1
- package/dist/cjs/exports/extensions/pack.js +24 -0
- package/dist/cjs/exports/extensions/pack.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/events/PackCreated.js +31 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/events/PackCreated.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/events/PackOpened.js +32 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/events/PackOpened.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/events/PackUpdated.js +31 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/events/PackUpdated.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/canUpdatePack.js +114 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/canUpdatePack.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getPackContents.js +137 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getPackContents.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.js +114 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getTokenOfBundle.js +139 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getTokenOfBundle.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getUriOfBundle.js +114 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/read/getUriOfBundle.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/write/addPackContents.js +175 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/write/addPackContents.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/write/createPack.js +193 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/write/createPack.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/write/openPack.js +146 -0
- package/dist/cjs/extensions/pack/__generated__/IPack/write/openPack.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.js +32 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.js +32 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.js +114 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.js +74 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.js.map +1 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.js +143 -0
- package/dist/cjs/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.js.map +1 -0
- package/dist/cjs/extensions/pack/createNewPack.js +285 -0
- package/dist/cjs/extensions/pack/createNewPack.js.map +1 -0
- package/dist/cjs/extensions/prebuilts/__generated__/Pack/write/initialize.js +175 -0
- package/dist/cjs/extensions/prebuilts/__generated__/Pack/write/initialize.js.map +1 -0
- package/dist/cjs/extensions/prebuilts/deploy-pack.js +115 -0
- package/dist/cjs/extensions/prebuilts/deploy-pack.js.map +1 -0
- package/dist/cjs/rpc/watchBlockNumber.js +2 -8
- package/dist/cjs/rpc/watchBlockNumber.js.map +1 -1
- package/dist/cjs/utils/sleep.js +12 -0
- package/dist/cjs/utils/sleep.js.map +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js +4 -8
- package/dist/cjs/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js.map +1 -1
- package/dist/esm/exports/deploys.js +1 -0
- package/dist/esm/exports/deploys.js.map +1 -1
- package/dist/esm/exports/extensions/pack.js +12 -0
- package/dist/esm/exports/extensions/pack.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/events/PackCreated.js +28 -0
- package/dist/esm/extensions/pack/__generated__/IPack/events/PackCreated.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/events/PackOpened.js +29 -0
- package/dist/esm/extensions/pack/__generated__/IPack/events/PackOpened.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/events/PackUpdated.js +28 -0
- package/dist/esm/extensions/pack/__generated__/IPack/events/PackUpdated.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/canUpdatePack.js +106 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/canUpdatePack.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getPackContents.js +129 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getPackContents.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.js +106 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getTokenOfBundle.js +131 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getTokenOfBundle.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getUriOfBundle.js +106 -0
- package/dist/esm/extensions/pack/__generated__/IPack/read/getUriOfBundle.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/write/addPackContents.js +168 -0
- package/dist/esm/extensions/pack/__generated__/IPack/write/addPackContents.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/write/createPack.js +186 -0
- package/dist/esm/extensions/pack/__generated__/IPack/write/createPack.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPack/write/openPack.js +139 -0
- package/dist/esm/extensions/pack/__generated__/IPack/write/openPack.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.js +29 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.js +29 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.js +106 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.js +69 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.js.map +1 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.js +136 -0
- package/dist/esm/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.js.map +1 -0
- package/dist/esm/extensions/pack/createNewPack.js +281 -0
- package/dist/esm/extensions/pack/createNewPack.js.map +1 -0
- package/dist/esm/extensions/prebuilts/__generated__/Pack/write/initialize.js +168 -0
- package/dist/esm/extensions/prebuilts/__generated__/Pack/write/initialize.js.map +1 -0
- package/dist/esm/extensions/prebuilts/deploy-pack.js +112 -0
- package/dist/esm/extensions/prebuilts/deploy-pack.js.map +1 -0
- package/dist/esm/rpc/watchBlockNumber.js +1 -7
- package/dist/esm/rpc/watchBlockNumber.js.map +1 -1
- package/dist/esm/utils/sleep.js +9 -0
- package/dist/esm/utils/sleep.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js +4 -8
- package/dist/esm/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js.map +1 -1
- package/dist/types/exports/deploys.d.ts +1 -0
- package/dist/types/exports/deploys.d.ts.map +1 -1
- package/dist/types/exports/extensions/pack.d.ts +9 -0
- package/dist/types/exports/extensions/pack.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/events/PackCreated.d.ts +47 -0
- package/dist/types/extensions/pack/__generated__/IPack/events/PackCreated.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/events/PackOpened.d.ts +70 -0
- package/dist/types/extensions/pack/__generated__/IPack/events/PackOpened.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/events/PackUpdated.d.ts +47 -0
- package/dist/types/extensions/pack/__generated__/IPack/events/PackUpdated.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/canUpdatePack.d.ts +83 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/canUpdatePack.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getPackContents.d.ts +93 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getPackContents.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.d.ts +83 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getTokenOfBundle.d.ts +100 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getTokenOfBundle.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getUriOfBundle.d.ts +83 -0
- package/dist/types/extensions/pack/__generated__/IPack/read/getUriOfBundle.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/write/addPackContents.d.ts +118 -0
- package/dist/types/extensions/pack/__generated__/IPack/write/addPackContents.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/write/createPack.d.ts +132 -0
- package/dist/types/extensions/pack/__generated__/IPack/write/createPack.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPack/write/openPack.d.ts +86 -0
- package/dist/types/extensions/pack/__generated__/IPack/write/openPack.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.d.ts +57 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.d.ts +51 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.d.ts +83 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.d.ts +33 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.d.ts.map +1 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.d.ts +93 -0
- package/dist/types/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.d.ts.map +1 -0
- package/dist/types/extensions/pack/createNewPack.d.ts +104 -0
- package/dist/types/extensions/pack/createNewPack.d.ts.map +1 -0
- package/dist/types/extensions/prebuilts/__generated__/Pack/write/initialize.d.ts +121 -0
- package/dist/types/extensions/prebuilts/__generated__/Pack/write/initialize.d.ts.map +1 -0
- package/dist/types/extensions/prebuilts/deploy-pack.d.ts +62 -0
- package/dist/types/extensions/prebuilts/deploy-pack.d.ts.map +1 -0
- package/dist/types/rpc/watchBlockNumber.d.ts.map +1 -1
- package/dist/types/utils/sleep.d.ts +7 -0
- package/dist/types/utils/sleep.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/exports/deploys.ts +6 -0
- package/src/exports/extensions/pack.ts +42 -0
- package/src/extensions/erc1155/drops/read/getActiveClaimCondition.test.ts +6 -4
- package/src/extensions/erc721/drops/write/updateMetadata.test.ts +2 -2
- package/src/extensions/erc721/read/getTotalClaimedSupply.test.ts +2 -2
- package/src/extensions/erc721/read/getTotalUnclaimedSupply.test.ts +2 -2
- package/src/extensions/erc721/write/updateTokenURI.test.ts +2 -2
- package/src/extensions/pack/__generated__/IPack/events/PackCreated.ts +41 -0
- package/src/extensions/pack/__generated__/IPack/events/PackOpened.ts +47 -0
- package/src/extensions/pack/__generated__/IPack/events/PackUpdated.ts +41 -0
- package/src/extensions/pack/__generated__/IPack/read/canUpdatePack.ts +125 -0
- package/src/extensions/pack/__generated__/IPack/read/getPackContents.ts +148 -0
- package/src/extensions/pack/__generated__/IPack/read/getTokenCountOfBundle.ts +129 -0
- package/src/extensions/pack/__generated__/IPack/read/getTokenOfBundle.ts +151 -0
- package/src/extensions/pack/__generated__/IPack/read/getUriOfBundle.ts +125 -0
- package/src/extensions/pack/__generated__/IPack/write/addPackContents.ts +213 -0
- package/src/extensions/pack/__generated__/IPack/write/createPack.ts +239 -0
- package/src/extensions/pack/__generated__/IPack/write/openPack.ts +168 -0
- package/src/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.ts +49 -0
- package/src/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts +49 -0
- package/src/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.ts +125 -0
- package/src/extensions/pack/__generated__/IPackVRFDirect/write/claimRewards.ts +73 -0
- package/src/extensions/pack/__generated__/IPackVRFDirect/write/openPackAndClaimRewards.ts +177 -0
- package/src/extensions/pack/createNewPack.test.ts +207 -0
- package/src/extensions/pack/createNewPack.ts +433 -0
- package/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts +216 -0
- package/src/extensions/prebuilts/deploy-erc20.test.ts +5 -3
- package/src/extensions/prebuilts/deploy-erc721.test.ts +6 -4
- package/src/extensions/prebuilts/deploy-pack.test.ts +23 -0
- package/src/extensions/prebuilts/deploy-pack.ts +173 -0
- package/src/extensions/prebuilts/deploy-split.test.ts +2 -2
- package/src/extensions/prebuilts/deploy-vote.test.ts +7 -5
- package/src/extensions/split/read/getAllRecipientsAddresses.test.ts +2 -2
- package/src/extensions/split/read/getAllRecipientsPercentages.test.ts +2 -2
- package/src/extensions/split/read/getRecipientSplitPercentage.test.ts +4 -2
- package/src/extensions/vote/read/proposalExists.test.ts +6 -6
- package/src/rpc/watchBlockNumber.ts +1 -8
- package/src/utils/sleep.ts +8 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.ts +5 -9
- package/src/wallets/smart/smart-wallet-integration-v07.test.ts +11 -8
- package/src/wallets/utils/getTokenBalance.test.ts +8 -6
@@ -0,0 +1,83 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions } from "../../../../../transaction/types.js";
|
3
|
+
import type { Hex } from "../../../../../utils/encoding/hex.js";
|
4
|
+
/**
|
5
|
+
* Represents the parameters for the "getUriOfBundle" function.
|
6
|
+
*/
|
7
|
+
export type GetUriOfBundleParams = {
|
8
|
+
bundleId: AbiParameterToPrimitiveType<{
|
9
|
+
type: "uint256";
|
10
|
+
name: "_bundleId";
|
11
|
+
}>;
|
12
|
+
};
|
13
|
+
export declare const FN_SELECTOR: "0x61195e94";
|
14
|
+
/**
|
15
|
+
* Checks if the `getUriOfBundle` method is supported by the given contract.
|
16
|
+
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
|
17
|
+
* @returns A boolean indicating if the `getUriOfBundle` method is supported.
|
18
|
+
* @extension PACK
|
19
|
+
* @example
|
20
|
+
* ```ts
|
21
|
+
* import { isGetUriOfBundleSupported } from "thirdweb/extensions/pack";
|
22
|
+
* const supported = isGetUriOfBundleSupported(["0x..."]);
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export declare function isGetUriOfBundleSupported(availableSelectors: string[]): boolean;
|
26
|
+
/**
|
27
|
+
* Encodes the parameters for the "getUriOfBundle" function.
|
28
|
+
* @param options - The options for the getUriOfBundle function.
|
29
|
+
* @returns The encoded ABI parameters.
|
30
|
+
* @extension PACK
|
31
|
+
* @example
|
32
|
+
* ```ts
|
33
|
+
* import { encodeGetUriOfBundleParams } from "thirdweb/extensions/pack";
|
34
|
+
* const result = encodeGetUriOfBundleParams({
|
35
|
+
* bundleId: ...,
|
36
|
+
* });
|
37
|
+
* ```
|
38
|
+
*/
|
39
|
+
export declare function encodeGetUriOfBundleParams(options: GetUriOfBundleParams): `0x${string}`;
|
40
|
+
/**
|
41
|
+
* Encodes the "getUriOfBundle" function into a Hex string with its parameters.
|
42
|
+
* @param options - The options for the getUriOfBundle function.
|
43
|
+
* @returns The encoded hexadecimal string.
|
44
|
+
* @extension PACK
|
45
|
+
* @example
|
46
|
+
* ```ts
|
47
|
+
* import { encodeGetUriOfBundle } from "thirdweb/extensions/pack";
|
48
|
+
* const result = encodeGetUriOfBundle({
|
49
|
+
* bundleId: ...,
|
50
|
+
* });
|
51
|
+
* ```
|
52
|
+
*/
|
53
|
+
export declare function encodeGetUriOfBundle(options: GetUriOfBundleParams): `${typeof FN_SELECTOR}${string}`;
|
54
|
+
/**
|
55
|
+
* Decodes the result of the getUriOfBundle function call.
|
56
|
+
* @param result - The hexadecimal result to decode.
|
57
|
+
* @returns The decoded result as per the FN_OUTPUTS definition.
|
58
|
+
* @extension PACK
|
59
|
+
* @example
|
60
|
+
* ```ts
|
61
|
+
* import { decodeGetUriOfBundleResult } from "thirdweb/extensions/pack";
|
62
|
+
* const result = decodeGetUriOfBundleResultResult("...");
|
63
|
+
* ```
|
64
|
+
*/
|
65
|
+
export declare function decodeGetUriOfBundleResult(result: Hex): string;
|
66
|
+
/**
|
67
|
+
* Calls the "getUriOfBundle" function on the contract.
|
68
|
+
* @param options - The options for the getUriOfBundle function.
|
69
|
+
* @returns The parsed result of the function call.
|
70
|
+
* @extension PACK
|
71
|
+
* @example
|
72
|
+
* ```ts
|
73
|
+
* import { getUriOfBundle } from "thirdweb/extensions/pack";
|
74
|
+
*
|
75
|
+
* const result = await getUriOfBundle({
|
76
|
+
* contract,
|
77
|
+
* bundleId: ...,
|
78
|
+
* });
|
79
|
+
*
|
80
|
+
* ```
|
81
|
+
*/
|
82
|
+
export declare function getUriOfBundle(options: BaseTransactionOptions<GetUriOfBundleParams>): Promise<string>;
|
83
|
+
//# sourceMappingURL=getUriOfBundle.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getUriOfBundle.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPack/read/getUriOfBundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAGlF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGhE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,2BAA2B,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;CAC/E,CAAC;AAEF,eAAO,MAAM,WAAW,cAAwB,CAAC;AAajD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAKrE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,iBAEvE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAMxD,GAAG,OAAO,WAAW,GAAG,MAAM,EAAE,CACzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,GAAG,UAErD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,mBAOtD"}
|
@@ -0,0 +1,118 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions, WithOverrides } from "../../../../../transaction/types.js";
|
3
|
+
/**
|
4
|
+
* Represents the parameters for the "addPackContents" function.
|
5
|
+
*/
|
6
|
+
export type AddPackContentsParams = WithOverrides<{
|
7
|
+
packId: AbiParameterToPrimitiveType<{
|
8
|
+
type: "uint256";
|
9
|
+
name: "_packId";
|
10
|
+
}>;
|
11
|
+
contents: AbiParameterToPrimitiveType<{
|
12
|
+
type: "tuple[]";
|
13
|
+
name: "_contents";
|
14
|
+
components: [
|
15
|
+
{
|
16
|
+
type: "address";
|
17
|
+
name: "assetContract";
|
18
|
+
},
|
19
|
+
{
|
20
|
+
type: "uint8";
|
21
|
+
name: "tokenType";
|
22
|
+
},
|
23
|
+
{
|
24
|
+
type: "uint256";
|
25
|
+
name: "tokenId";
|
26
|
+
},
|
27
|
+
{
|
28
|
+
type: "uint256";
|
29
|
+
name: "totalAmount";
|
30
|
+
}
|
31
|
+
];
|
32
|
+
}>;
|
33
|
+
numOfRewardUnits: AbiParameterToPrimitiveType<{
|
34
|
+
type: "uint256[]";
|
35
|
+
name: "_numOfRewardUnits";
|
36
|
+
}>;
|
37
|
+
recipient: AbiParameterToPrimitiveType<{
|
38
|
+
type: "address";
|
39
|
+
name: "_recipient";
|
40
|
+
}>;
|
41
|
+
}>;
|
42
|
+
export declare const FN_SELECTOR: "0xa96b1438";
|
43
|
+
/**
|
44
|
+
* Checks if the `addPackContents` method is supported by the given contract.
|
45
|
+
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
|
46
|
+
* @returns A boolean indicating if the `addPackContents` method is supported.
|
47
|
+
* @extension PACK
|
48
|
+
* @example
|
49
|
+
* ```ts
|
50
|
+
* import { isAddPackContentsSupported } from "thirdweb/extensions/pack";
|
51
|
+
*
|
52
|
+
* const supported = isAddPackContentsSupported(["0x..."]);
|
53
|
+
* ```
|
54
|
+
*/
|
55
|
+
export declare function isAddPackContentsSupported(availableSelectors: string[]): boolean;
|
56
|
+
/**
|
57
|
+
* Encodes the parameters for the "addPackContents" function.
|
58
|
+
* @param options - The options for the addPackContents function.
|
59
|
+
* @returns The encoded ABI parameters.
|
60
|
+
* @extension PACK
|
61
|
+
* @example
|
62
|
+
* ```ts
|
63
|
+
* import { encodeAddPackContentsParams } from "thirdweb/extensions/pack";
|
64
|
+
* const result = encodeAddPackContentsParams({
|
65
|
+
* packId: ...,
|
66
|
+
* contents: ...,
|
67
|
+
* numOfRewardUnits: ...,
|
68
|
+
* recipient: ...,
|
69
|
+
* });
|
70
|
+
* ```
|
71
|
+
*/
|
72
|
+
export declare function encodeAddPackContentsParams(options: AddPackContentsParams): `0x${string}`;
|
73
|
+
/**
|
74
|
+
* Encodes the "addPackContents" function into a Hex string with its parameters.
|
75
|
+
* @param options - The options for the addPackContents function.
|
76
|
+
* @returns The encoded hexadecimal string.
|
77
|
+
* @extension PACK
|
78
|
+
* @example
|
79
|
+
* ```ts
|
80
|
+
* import { encodeAddPackContents } from "thirdweb/extensions/pack";
|
81
|
+
* const result = encodeAddPackContents({
|
82
|
+
* packId: ...,
|
83
|
+
* contents: ...,
|
84
|
+
* numOfRewardUnits: ...,
|
85
|
+
* recipient: ...,
|
86
|
+
* });
|
87
|
+
* ```
|
88
|
+
*/
|
89
|
+
export declare function encodeAddPackContents(options: AddPackContentsParams): `${typeof FN_SELECTOR}${string}`;
|
90
|
+
/**
|
91
|
+
* Prepares a transaction to call the "addPackContents" function on the contract.
|
92
|
+
* @param options - The options for the "addPackContents" function.
|
93
|
+
* @returns A prepared transaction object.
|
94
|
+
* @extension PACK
|
95
|
+
* @example
|
96
|
+
* ```ts
|
97
|
+
* import { sendTransaction } from "thirdweb";
|
98
|
+
* import { addPackContents } from "thirdweb/extensions/pack";
|
99
|
+
*
|
100
|
+
* const transaction = addPackContents({
|
101
|
+
* contract,
|
102
|
+
* packId: ...,
|
103
|
+
* contents: ...,
|
104
|
+
* numOfRewardUnits: ...,
|
105
|
+
* recipient: ...,
|
106
|
+
* overrides: {
|
107
|
+
* ...
|
108
|
+
* }
|
109
|
+
* });
|
110
|
+
*
|
111
|
+
* // Send the transaction
|
112
|
+
* await sendTransaction({ transaction, account });
|
113
|
+
* ```
|
114
|
+
*/
|
115
|
+
export declare function addPackContents(options: BaseTransactionOptions<AddPackContentsParams | {
|
116
|
+
asyncParams: () => Promise<AddPackContentsParams>;
|
117
|
+
}>): import("../../../../../transaction/prepare-transaction.js").PreparedTransaction<any, import("abitype").AbiFunction, import("../../../../../transaction/prepare-transaction.js").PrepareTransactionOptions>;
|
118
|
+
//# sourceMappingURL=addPackContents.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"addPackContents.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPack/write/addPackContents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAM7C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;IAChD,MAAM,EAAE,2BAA2B,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAC1E,QAAQ,EAAE,2BAA2B,CAAC;QACpC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,WAAW,CAAC;QAClB,UAAU,EAAE;YACV;gBAAE,IAAI,EAAE,SAAS,CAAC;gBAAC,IAAI,EAAE,eAAe,CAAA;aAAE;YAC1C;gBAAE,IAAI,EAAE,OAAO,CAAC;gBAAC,IAAI,EAAE,WAAW,CAAA;aAAE;YACpC;gBAAE,IAAI,EAAE,SAAS,CAAC;gBAAC,IAAI,EAAE,SAAS,CAAA;aAAE;YACpC;gBAAE,IAAI,EAAE,SAAS,CAAC;gBAAC,IAAI,EAAE,aAAa,CAAA;aAAE;SACzC,CAAC;KACH,CAAC,CAAC;IACH,gBAAgB,EAAE,2BAA2B,CAAC;QAC5C,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,mBAAmB,CAAC;KAC3B,CAAC,CAAC;IACH,SAAS,EAAE,2BAA2B,CAAC;QACrC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,YAAY,CAAC;KACpB,CAAC,CAAC;CACJ,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,cAAwB,CAAC;AAgDjD;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAKtE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,qBAAqB,iBAOzE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,GAM1D,GAAG,OAAO,WAAW,GAAG,MAAM,EAAE,CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,sBAAsB,CAC3B,qBAAqB,GACrB;IACE,WAAW,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnD,CACJ,8MA6BF"}
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions, WithOverrides } from "../../../../../transaction/types.js";
|
3
|
+
/**
|
4
|
+
* Represents the parameters for the "createPack" function.
|
5
|
+
*/
|
6
|
+
export type CreatePackParams = WithOverrides<{
|
7
|
+
contents: AbiParameterToPrimitiveType<{
|
8
|
+
type: "tuple[]";
|
9
|
+
name: "contents";
|
10
|
+
components: [
|
11
|
+
{
|
12
|
+
type: "address";
|
13
|
+
name: "assetContract";
|
14
|
+
},
|
15
|
+
{
|
16
|
+
type: "uint8";
|
17
|
+
name: "tokenType";
|
18
|
+
},
|
19
|
+
{
|
20
|
+
type: "uint256";
|
21
|
+
name: "tokenId";
|
22
|
+
},
|
23
|
+
{
|
24
|
+
type: "uint256";
|
25
|
+
name: "totalAmount";
|
26
|
+
}
|
27
|
+
];
|
28
|
+
}>;
|
29
|
+
numOfRewardUnits: AbiParameterToPrimitiveType<{
|
30
|
+
type: "uint256[]";
|
31
|
+
name: "numOfRewardUnits";
|
32
|
+
}>;
|
33
|
+
packUri: AbiParameterToPrimitiveType<{
|
34
|
+
type: "string";
|
35
|
+
name: "packUri";
|
36
|
+
}>;
|
37
|
+
openStartTimestamp: AbiParameterToPrimitiveType<{
|
38
|
+
type: "uint128";
|
39
|
+
name: "openStartTimestamp";
|
40
|
+
}>;
|
41
|
+
amountDistributedPerOpen: AbiParameterToPrimitiveType<{
|
42
|
+
type: "uint128";
|
43
|
+
name: "amountDistributedPerOpen";
|
44
|
+
}>;
|
45
|
+
recipient: AbiParameterToPrimitiveType<{
|
46
|
+
type: "address";
|
47
|
+
name: "recipient";
|
48
|
+
}>;
|
49
|
+
}>;
|
50
|
+
export declare const FN_SELECTOR: "0x092e6075";
|
51
|
+
/**
|
52
|
+
* Checks if the `createPack` method is supported by the given contract.
|
53
|
+
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
|
54
|
+
* @returns A boolean indicating if the `createPack` method is supported.
|
55
|
+
* @extension PACK
|
56
|
+
* @example
|
57
|
+
* ```ts
|
58
|
+
* import { isCreatePackSupported } from "thirdweb/extensions/pack";
|
59
|
+
*
|
60
|
+
* const supported = isCreatePackSupported(["0x..."]);
|
61
|
+
* ```
|
62
|
+
*/
|
63
|
+
export declare function isCreatePackSupported(availableSelectors: string[]): boolean;
|
64
|
+
/**
|
65
|
+
* Encodes the parameters for the "createPack" function.
|
66
|
+
* @param options - The options for the createPack function.
|
67
|
+
* @returns The encoded ABI parameters.
|
68
|
+
* @extension PACK
|
69
|
+
* @example
|
70
|
+
* ```ts
|
71
|
+
* import { encodeCreatePackParams } from "thirdweb/extensions/pack";
|
72
|
+
* const result = encodeCreatePackParams({
|
73
|
+
* contents: ...,
|
74
|
+
* numOfRewardUnits: ...,
|
75
|
+
* packUri: ...,
|
76
|
+
* openStartTimestamp: ...,
|
77
|
+
* amountDistributedPerOpen: ...,
|
78
|
+
* recipient: ...,
|
79
|
+
* });
|
80
|
+
* ```
|
81
|
+
*/
|
82
|
+
export declare function encodeCreatePackParams(options: CreatePackParams): `0x${string}`;
|
83
|
+
/**
|
84
|
+
* Encodes the "createPack" function into a Hex string with its parameters.
|
85
|
+
* @param options - The options for the createPack function.
|
86
|
+
* @returns The encoded hexadecimal string.
|
87
|
+
* @extension PACK
|
88
|
+
* @example
|
89
|
+
* ```ts
|
90
|
+
* import { encodeCreatePack } from "thirdweb/extensions/pack";
|
91
|
+
* const result = encodeCreatePack({
|
92
|
+
* contents: ...,
|
93
|
+
* numOfRewardUnits: ...,
|
94
|
+
* packUri: ...,
|
95
|
+
* openStartTimestamp: ...,
|
96
|
+
* amountDistributedPerOpen: ...,
|
97
|
+
* recipient: ...,
|
98
|
+
* });
|
99
|
+
* ```
|
100
|
+
*/
|
101
|
+
export declare function encodeCreatePack(options: CreatePackParams): `${typeof FN_SELECTOR}${string}`;
|
102
|
+
/**
|
103
|
+
* Prepares a transaction to call the "createPack" function on the contract.
|
104
|
+
* @param options - The options for the "createPack" function.
|
105
|
+
* @returns A prepared transaction object.
|
106
|
+
* @extension PACK
|
107
|
+
* @example
|
108
|
+
* ```ts
|
109
|
+
* import { sendTransaction } from "thirdweb";
|
110
|
+
* import { createPack } from "thirdweb/extensions/pack";
|
111
|
+
*
|
112
|
+
* const transaction = createPack({
|
113
|
+
* contract,
|
114
|
+
* contents: ...,
|
115
|
+
* numOfRewardUnits: ...,
|
116
|
+
* packUri: ...,
|
117
|
+
* openStartTimestamp: ...,
|
118
|
+
* amountDistributedPerOpen: ...,
|
119
|
+
* recipient: ...,
|
120
|
+
* overrides: {
|
121
|
+
* ...
|
122
|
+
* }
|
123
|
+
* });
|
124
|
+
*
|
125
|
+
* // Send the transaction
|
126
|
+
* await sendTransaction({ transaction, account });
|
127
|
+
* ```
|
128
|
+
*/
|
129
|
+
export declare function createPack(options: BaseTransactionOptions<CreatePackParams | {
|
130
|
+
asyncParams: () => Promise<CreatePackParams>;
|
131
|
+
}>): import("../../../../../transaction/prepare-transaction.js").PreparedTransaction<any, import("abitype").AbiFunction, import("../../../../../transaction/prepare-transaction.js").PrepareTransactionOptions>;
|
132
|
+
//# sourceMappingURL=createPack.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createPack.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPack/write/createPack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAM7C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC;IAC3C,QAAQ,EAAE,2BAA2B,CAAC;QACpC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,UAAU,CAAC;QACjB,UAAU,EAAE;YACV;gBAAE,IAAI,EAAE,SAAS,CAAC;gBAAC,IAAI,EAAE,eAAe,CAAA;aAAE;YAC1C;gBAAE,IAAI,EAAE,OAAO,CAAC;gBAAC,IAAI,EAAE,WAAW,CAAA;aAAE;YACpC;gBAAE,IAAI,EAAE,SAAS,CAAC;gBAAC,IAAI,EAAE,SAAS,CAAA;aAAE;YACpC;gBAAE,IAAI,EAAE,SAAS,CAAC;gBAAC,IAAI,EAAE,aAAa,CAAA;aAAE;SACzC,CAAC;KACH,CAAC,CAAC;IACH,gBAAgB,EAAE,2BAA2B,CAAC;QAC5C,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,kBAAkB,CAAC;KAC1B,CAAC,CAAC;IACH,OAAO,EAAE,2BAA2B,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAC1E,kBAAkB,EAAE,2BAA2B,CAAC;QAC9C,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,oBAAoB,CAAC;KAC5B,CAAC,CAAC;IACH,wBAAwB,EAAE,2BAA2B,CAAC;QACpD,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,0BAA0B,CAAC;KAClC,CAAC,CAAC;IACH,SAAS,EAAE,2BAA2B,CAAC;QACrC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,WAAW,CAAC;KACnB,CAAC,CAAC;CACJ,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,cAAwB,CAAC;AAwDjD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAKjE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,iBAS/D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAMhD,GAAG,OAAO,WAAW,GAAG,MAAM,EAAE,CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,sBAAsB,CAC3B,gBAAgB,GAChB;IACE,WAAW,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CACJ,8MA+BF"}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions, WithOverrides } from "../../../../../transaction/types.js";
|
3
|
+
/**
|
4
|
+
* Represents the parameters for the "openPack" function.
|
5
|
+
*/
|
6
|
+
export type OpenPackParams = WithOverrides<{
|
7
|
+
packId: AbiParameterToPrimitiveType<{
|
8
|
+
type: "uint256";
|
9
|
+
name: "packId";
|
10
|
+
}>;
|
11
|
+
amountToOpen: AbiParameterToPrimitiveType<{
|
12
|
+
type: "uint256";
|
13
|
+
name: "amountToOpen";
|
14
|
+
}>;
|
15
|
+
}>;
|
16
|
+
export declare const FN_SELECTOR: "0x914e126a";
|
17
|
+
/**
|
18
|
+
* Checks if the `openPack` method is supported by the given contract.
|
19
|
+
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
|
20
|
+
* @returns A boolean indicating if the `openPack` method is supported.
|
21
|
+
* @extension PACK
|
22
|
+
* @example
|
23
|
+
* ```ts
|
24
|
+
* import { isOpenPackSupported } from "thirdweb/extensions/pack";
|
25
|
+
*
|
26
|
+
* const supported = isOpenPackSupported(["0x..."]);
|
27
|
+
* ```
|
28
|
+
*/
|
29
|
+
export declare function isOpenPackSupported(availableSelectors: string[]): boolean;
|
30
|
+
/**
|
31
|
+
* Encodes the parameters for the "openPack" function.
|
32
|
+
* @param options - The options for the openPack function.
|
33
|
+
* @returns The encoded ABI parameters.
|
34
|
+
* @extension PACK
|
35
|
+
* @example
|
36
|
+
* ```ts
|
37
|
+
* import { encodeOpenPackParams } from "thirdweb/extensions/pack";
|
38
|
+
* const result = encodeOpenPackParams({
|
39
|
+
* packId: ...,
|
40
|
+
* amountToOpen: ...,
|
41
|
+
* });
|
42
|
+
* ```
|
43
|
+
*/
|
44
|
+
export declare function encodeOpenPackParams(options: OpenPackParams): `0x${string}`;
|
45
|
+
/**
|
46
|
+
* Encodes the "openPack" function into a Hex string with its parameters.
|
47
|
+
* @param options - The options for the openPack function.
|
48
|
+
* @returns The encoded hexadecimal string.
|
49
|
+
* @extension PACK
|
50
|
+
* @example
|
51
|
+
* ```ts
|
52
|
+
* import { encodeOpenPack } from "thirdweb/extensions/pack";
|
53
|
+
* const result = encodeOpenPack({
|
54
|
+
* packId: ...,
|
55
|
+
* amountToOpen: ...,
|
56
|
+
* });
|
57
|
+
* ```
|
58
|
+
*/
|
59
|
+
export declare function encodeOpenPack(options: OpenPackParams): `${typeof FN_SELECTOR}${string}`;
|
60
|
+
/**
|
61
|
+
* Prepares a transaction to call the "openPack" function on the contract.
|
62
|
+
* @param options - The options for the "openPack" function.
|
63
|
+
* @returns A prepared transaction object.
|
64
|
+
* @extension PACK
|
65
|
+
* @example
|
66
|
+
* ```ts
|
67
|
+
* import { sendTransaction } from "thirdweb";
|
68
|
+
* import { openPack } from "thirdweb/extensions/pack";
|
69
|
+
*
|
70
|
+
* const transaction = openPack({
|
71
|
+
* contract,
|
72
|
+
* packId: ...,
|
73
|
+
* amountToOpen: ...,
|
74
|
+
* overrides: {
|
75
|
+
* ...
|
76
|
+
* }
|
77
|
+
* });
|
78
|
+
*
|
79
|
+
* // Send the transaction
|
80
|
+
* await sendTransaction({ transaction, account });
|
81
|
+
* ```
|
82
|
+
*/
|
83
|
+
export declare function openPack(options: BaseTransactionOptions<OpenPackParams | {
|
84
|
+
asyncParams: () => Promise<OpenPackParams>;
|
85
|
+
}>): import("../../../../../transaction/prepare-transaction.js").PreparedTransaction<any, import("abitype").AbiFunction, import("../../../../../transaction/prepare-transaction.js").PrepareTransactionOptions>;
|
86
|
+
//# sourceMappingURL=openPack.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"openPack.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPack/write/openPack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAM7C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC;IACzC,MAAM,EAAE,2BAA2B,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;IACzE,YAAY,EAAE,2BAA2B,CAAC;QACxC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,cAAc,CAAC;KACtB,CAAC,CAAC;CACJ,CAAC,CAAC;AAEH,eAAO,MAAM,WAAW,cAAwB,CAAC;AAmCjD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAK/D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,iBAE3D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,GAIP,GAAG,OAAO,WAAW,GAAG,MAAM,EAAE,CAC9E;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,sBAAsB,CAC3B,cAAc,GACd;IACE,WAAW,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;CAC5C,CACJ,8MAwBF"}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
/**
|
3
|
+
* Represents the filters for the "PackOpenRequested" event.
|
4
|
+
*/
|
5
|
+
export type PackOpenRequestedEventFilters = Partial<{
|
6
|
+
opener: AbiParameterToPrimitiveType<{
|
7
|
+
type: "address";
|
8
|
+
name: "opener";
|
9
|
+
indexed: true;
|
10
|
+
}>;
|
11
|
+
packId: AbiParameterToPrimitiveType<{
|
12
|
+
type: "uint256";
|
13
|
+
name: "packId";
|
14
|
+
indexed: true;
|
15
|
+
}>;
|
16
|
+
}>;
|
17
|
+
/**
|
18
|
+
* Creates an event object for the PackOpenRequested event.
|
19
|
+
* @param filters - Optional filters to apply to the event.
|
20
|
+
* @returns The prepared event object.
|
21
|
+
* @extension PACK
|
22
|
+
* @example
|
23
|
+
* ```ts
|
24
|
+
* import { getContractEvents } from "thirdweb";
|
25
|
+
* import { packOpenRequestedEvent } from "thirdweb/extensions/pack";
|
26
|
+
*
|
27
|
+
* const events = await getContractEvents({
|
28
|
+
* contract,
|
29
|
+
* events: [
|
30
|
+
* packOpenRequestedEvent({
|
31
|
+
* opener: ...,
|
32
|
+
* packId: ...,
|
33
|
+
* })
|
34
|
+
* ],
|
35
|
+
* });
|
36
|
+
* ```
|
37
|
+
*/
|
38
|
+
export declare function packOpenRequestedEvent(filters?: PackOpenRequestedEventFilters): import("../../../../../event/prepare-event.js").PreparedEvent<{
|
39
|
+
readonly name: "PackOpenRequested";
|
40
|
+
readonly type: "event";
|
41
|
+
readonly inputs: readonly [{
|
42
|
+
readonly type: "address";
|
43
|
+
readonly name: "opener";
|
44
|
+
readonly indexed: true;
|
45
|
+
}, {
|
46
|
+
readonly type: "uint256";
|
47
|
+
readonly name: "packId";
|
48
|
+
readonly indexed: true;
|
49
|
+
}, {
|
50
|
+
readonly type: "uint256";
|
51
|
+
readonly name: "amountToOpen";
|
52
|
+
}, {
|
53
|
+
readonly type: "uint256";
|
54
|
+
readonly name: "requestId";
|
55
|
+
}];
|
56
|
+
}>;
|
57
|
+
//# sourceMappingURL=PackOpenRequested.d.ts.map
|
package/dist/types/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PackOpenRequested.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPackVRFDirect/events/PackOpenRequested.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;IAClD,MAAM,EAAE,2BAA2B,CAAC;QAClC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,EAAE,IAAI,CAAC;KACf,CAAC,CAAC;IACH,MAAM,EAAE,2BAA2B,CAAC;QAClC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,EAAE,IAAI,CAAC;KACf,CAAC,CAAC;CACJ,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;GAO5C"}
|
package/dist/types/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.d.ts
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
/**
|
3
|
+
* Represents the filters for the "PackRandomnessFulfilled" event.
|
4
|
+
*/
|
5
|
+
export type PackRandomnessFulfilledEventFilters = Partial<{
|
6
|
+
packId: AbiParameterToPrimitiveType<{
|
7
|
+
type: "uint256";
|
8
|
+
name: "packId";
|
9
|
+
indexed: true;
|
10
|
+
}>;
|
11
|
+
requestId: AbiParameterToPrimitiveType<{
|
12
|
+
type: "uint256";
|
13
|
+
name: "requestId";
|
14
|
+
indexed: true;
|
15
|
+
}>;
|
16
|
+
}>;
|
17
|
+
/**
|
18
|
+
* Creates an event object for the PackRandomnessFulfilled event.
|
19
|
+
* @param filters - Optional filters to apply to the event.
|
20
|
+
* @returns The prepared event object.
|
21
|
+
* @extension PACK
|
22
|
+
* @example
|
23
|
+
* ```ts
|
24
|
+
* import { getContractEvents } from "thirdweb";
|
25
|
+
* import { packRandomnessFulfilledEvent } from "thirdweb/extensions/pack";
|
26
|
+
*
|
27
|
+
* const events = await getContractEvents({
|
28
|
+
* contract,
|
29
|
+
* events: [
|
30
|
+
* packRandomnessFulfilledEvent({
|
31
|
+
* packId: ...,
|
32
|
+
* requestId: ...,
|
33
|
+
* })
|
34
|
+
* ],
|
35
|
+
* });
|
36
|
+
* ```
|
37
|
+
*/
|
38
|
+
export declare function packRandomnessFulfilledEvent(filters?: PackRandomnessFulfilledEventFilters): import("../../../../../event/prepare-event.js").PreparedEvent<{
|
39
|
+
readonly name: "PackRandomnessFulfilled";
|
40
|
+
readonly type: "event";
|
41
|
+
readonly inputs: readonly [{
|
42
|
+
readonly type: "uint256";
|
43
|
+
readonly name: "packId";
|
44
|
+
readonly indexed: true;
|
45
|
+
}, {
|
46
|
+
readonly type: "uint256";
|
47
|
+
readonly name: "requestId";
|
48
|
+
readonly indexed: true;
|
49
|
+
}];
|
50
|
+
}>;
|
51
|
+
//# sourceMappingURL=PackRandomnessFulfilled.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PackRandomnessFulfilled.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPackVRFDirect/events/PackRandomnessFulfilled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAC;IACxD,MAAM,EAAE,2BAA2B,CAAC;QAClC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,QAAQ,CAAC;QACf,OAAO,EAAE,IAAI,CAAC;KACf,CAAC,CAAC;IACH,SAAS,EAAE,2BAA2B,CAAC;QACrC,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,WAAW,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC;KACf,CAAC,CAAC;CACJ,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,mCAAwC;;;;;;;;;;;;GAOlD"}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions } from "../../../../../transaction/types.js";
|
3
|
+
import type { Hex } from "../../../../../utils/encoding/hex.js";
|
4
|
+
/**
|
5
|
+
* Represents the parameters for the "canClaimRewards" function.
|
6
|
+
*/
|
7
|
+
export type CanClaimRewardsParams = {
|
8
|
+
opener: AbiParameterToPrimitiveType<{
|
9
|
+
type: "address";
|
10
|
+
name: "_opener";
|
11
|
+
}>;
|
12
|
+
};
|
13
|
+
export declare const FN_SELECTOR: "0xa9b47a66";
|
14
|
+
/**
|
15
|
+
* Checks if the `canClaimRewards` method is supported by the given contract.
|
16
|
+
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
|
17
|
+
* @returns A boolean indicating if the `canClaimRewards` method is supported.
|
18
|
+
* @extension PACK
|
19
|
+
* @example
|
20
|
+
* ```ts
|
21
|
+
* import { isCanClaimRewardsSupported } from "thirdweb/extensions/pack";
|
22
|
+
* const supported = isCanClaimRewardsSupported(["0x..."]);
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export declare function isCanClaimRewardsSupported(availableSelectors: string[]): boolean;
|
26
|
+
/**
|
27
|
+
* Encodes the parameters for the "canClaimRewards" function.
|
28
|
+
* @param options - The options for the canClaimRewards function.
|
29
|
+
* @returns The encoded ABI parameters.
|
30
|
+
* @extension PACK
|
31
|
+
* @example
|
32
|
+
* ```ts
|
33
|
+
* import { encodeCanClaimRewardsParams } from "thirdweb/extensions/pack";
|
34
|
+
* const result = encodeCanClaimRewardsParams({
|
35
|
+
* opener: ...,
|
36
|
+
* });
|
37
|
+
* ```
|
38
|
+
*/
|
39
|
+
export declare function encodeCanClaimRewardsParams(options: CanClaimRewardsParams): `0x${string}`;
|
40
|
+
/**
|
41
|
+
* Encodes the "canClaimRewards" function into a Hex string with its parameters.
|
42
|
+
* @param options - The options for the canClaimRewards function.
|
43
|
+
* @returns The encoded hexadecimal string.
|
44
|
+
* @extension PACK
|
45
|
+
* @example
|
46
|
+
* ```ts
|
47
|
+
* import { encodeCanClaimRewards } from "thirdweb/extensions/pack";
|
48
|
+
* const result = encodeCanClaimRewards({
|
49
|
+
* opener: ...,
|
50
|
+
* });
|
51
|
+
* ```
|
52
|
+
*/
|
53
|
+
export declare function encodeCanClaimRewards(options: CanClaimRewardsParams): `${typeof FN_SELECTOR}${string}`;
|
54
|
+
/**
|
55
|
+
* Decodes the result of the canClaimRewards function call.
|
56
|
+
* @param result - The hexadecimal result to decode.
|
57
|
+
* @returns The decoded result as per the FN_OUTPUTS definition.
|
58
|
+
* @extension PACK
|
59
|
+
* @example
|
60
|
+
* ```ts
|
61
|
+
* import { decodeCanClaimRewardsResult } from "thirdweb/extensions/pack";
|
62
|
+
* const result = decodeCanClaimRewardsResultResult("...");
|
63
|
+
* ```
|
64
|
+
*/
|
65
|
+
export declare function decodeCanClaimRewardsResult(result: Hex): boolean;
|
66
|
+
/**
|
67
|
+
* Calls the "canClaimRewards" function on the contract.
|
68
|
+
* @param options - The options for the canClaimRewards function.
|
69
|
+
* @returns The parsed result of the function call.
|
70
|
+
* @extension PACK
|
71
|
+
* @example
|
72
|
+
* ```ts
|
73
|
+
* import { canClaimRewards } from "thirdweb/extensions/pack";
|
74
|
+
*
|
75
|
+
* const result = await canClaimRewards({
|
76
|
+
* contract,
|
77
|
+
* opener: ...,
|
78
|
+
* });
|
79
|
+
*
|
80
|
+
* ```
|
81
|
+
*/
|
82
|
+
export declare function canClaimRewards(options: BaseTransactionOptions<CanClaimRewardsParams>): Promise<boolean>;
|
83
|
+
//# sourceMappingURL=canClaimRewards.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"canClaimRewards.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/pack/__generated__/IPackVRFDirect/read/canClaimRewards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAGlF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGhE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,2BAA2B,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CAC3E,CAAC;AAEF,eAAO,MAAM,WAAW,cAAwB,CAAC;AAajD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAKtE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,qBAAqB,iBAEzE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,qBAAqB,GAM1D,GAAG,OAAO,WAAW,GAAG,MAAM,EAAE,CACzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,GAAG,WAEtD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,CAAC,qBAAqB,CAAC,oBAOvD"}
|