thirdweb 5.48.2 → 5.48.3-nightly-a8e2bc58c9e8fe5b75d6c27d406e6b80d5d067e2-20240828000339
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/wallets/smart.js +4 -2
- package/dist/cjs/exports/wallets/smart.js.map +1 -1
- package/dist/cjs/extensions/erc1155/drops/write/claimTo.js.map +1 -1
- package/dist/cjs/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.js +32 -0
- package/dist/cjs/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.js.map +1 -0
- package/dist/cjs/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.js +153 -0
- package/dist/cjs/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.js.map +1 -0
- package/dist/cjs/extensions/prebuilts/__generated__/VoteERC20/write/initialize.js +184 -0
- package/dist/cjs/extensions/prebuilts/__generated__/VoteERC20/write/initialize.js.map +1 -0
- package/dist/cjs/extensions/prebuilts/deploy-vote.js +122 -0
- package/dist/cjs/extensions/prebuilts/deploy-vote.js.map +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoQuote.js +5 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuote.js +5 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendAndConfirmTransaction.js +12 -0
- package/dist/cjs/react/core/hooks/transaction/useSendAndConfirmTransaction.js.map +1 -1
- package/dist/cjs/react/native/hooks/transaction/useSendTransaction.js +11 -0
- package/dist/cjs/react/native/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/index.js +13 -0
- package/dist/cjs/react/web/ui/TransactionButton/index.js.map +1 -1
- package/dist/cjs/transaction/actions/send-and-confirm-transaction.js +13 -0
- package/dist/cjs/transaction/actions/send-and-confirm-transaction.js.map +1 -1
- package/dist/cjs/transaction/actions/send-transaction.js +13 -0
- package/dist/cjs/transaction/actions/send-transaction.js.map +1 -1
- package/dist/cjs/transaction/actions/zksync/send-eip712-transaction.js +1 -1
- package/dist/cjs/transaction/actions/zksync/send-eip712-transaction.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/lib/in-app-account.js +5 -1
- package/dist/cjs/wallets/in-app/web/lib/in-app-account.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js +1 -0
- package/dist/cjs/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js.map +1 -1
- package/dist/cjs/wallets/smart/index.js +13 -2
- package/dist/cjs/wallets/smart/index.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/bundler.js +11 -2
- package/dist/cjs/wallets/smart/lib/bundler.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/constants.js +27 -13
- package/dist/cjs/wallets/smart/lib/constants.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/packUserOp.js +75 -0
- package/dist/cjs/wallets/smart/lib/packUserOp.js.map +1 -0
- package/dist/cjs/wallets/smart/lib/paymaster.js +11 -1
- package/dist/cjs/wallets/smart/lib/paymaster.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/userop.js +201 -66
- package/dist/cjs/wallets/smart/lib/userop.js.map +1 -1
- package/dist/cjs/wallets/smart/lib/utils.js +1 -1
- package/dist/cjs/wallets/smart/lib/utils.js.map +1 -1
- package/dist/cjs/wallets/smart/smart-wallet.js +2 -1
- package/dist/cjs/wallets/smart/smart-wallet.js.map +1 -1
- package/dist/cjs/wallets/smart/types.js.map +1 -1
- package/dist/esm/exports/wallets/smart.js +1 -1
- package/dist/esm/exports/wallets/smart.js.map +1 -1
- package/dist/esm/extensions/erc1155/drops/write/claimTo.js.map +1 -1
- package/dist/esm/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.js +29 -0
- package/dist/esm/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.js.map +1 -0
- package/dist/esm/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.js +145 -0
- package/dist/esm/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.js.map +1 -0
- package/dist/esm/extensions/prebuilts/__generated__/VoteERC20/write/initialize.js +177 -0
- package/dist/esm/extensions/prebuilts/__generated__/VoteERC20/write/initialize.js.map +1 -0
- package/dist/esm/extensions/prebuilts/deploy-vote.js +119 -0
- package/dist/esm/extensions/prebuilts/deploy-vote.js.map +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoQuote.js +5 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuote.js +5 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendAndConfirmTransaction.js +12 -0
- package/dist/esm/react/core/hooks/transaction/useSendAndConfirmTransaction.js.map +1 -1
- package/dist/esm/react/native/hooks/transaction/useSendTransaction.js +11 -0
- package/dist/esm/react/native/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/index.js +13 -0
- package/dist/esm/react/web/ui/TransactionButton/index.js.map +1 -1
- package/dist/esm/transaction/actions/send-and-confirm-transaction.js +13 -0
- package/dist/esm/transaction/actions/send-and-confirm-transaction.js.map +1 -1
- package/dist/esm/transaction/actions/send-transaction.js +13 -0
- package/dist/esm/transaction/actions/send-transaction.js.map +1 -1
- package/dist/esm/transaction/actions/zksync/send-eip712-transaction.js +1 -1
- package/dist/esm/transaction/actions/zksync/send-eip712-transaction.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/in-app/web/lib/in-app-account.js +5 -1
- package/dist/esm/wallets/in-app/web/lib/in-app-account.js.map +1 -1
- package/dist/esm/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js +1 -0
- package/dist/esm/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.js.map +1 -1
- package/dist/esm/wallets/smart/index.js +14 -3
- package/dist/esm/wallets/smart/index.js.map +1 -1
- package/dist/esm/wallets/smart/lib/bundler.js +12 -3
- package/dist/esm/wallets/smart/lib/bundler.js.map +1 -1
- package/dist/esm/wallets/smart/lib/constants.js +23 -10
- package/dist/esm/wallets/smart/lib/constants.js.map +1 -1
- package/dist/esm/wallets/smart/lib/packUserOp.js +65 -0
- package/dist/esm/wallets/smart/lib/packUserOp.js.map +1 -0
- package/dist/esm/wallets/smart/lib/paymaster.js +12 -2
- package/dist/esm/wallets/smart/lib/paymaster.js.map +1 -1
- package/dist/esm/wallets/smart/lib/userop.js +202 -67
- package/dist/esm/wallets/smart/lib/userop.js.map +1 -1
- package/dist/esm/wallets/smart/lib/utils.js +1 -1
- package/dist/esm/wallets/smart/lib/utils.js.map +1 -1
- package/dist/esm/wallets/smart/smart-wallet.js +3 -2
- package/dist/esm/wallets/smart/smart-wallet.js.map +1 -1
- package/dist/esm/wallets/smart/types.js.map +1 -1
- package/dist/types/exports/wallets/smart.d.ts +2 -2
- package/dist/types/exports/wallets/smart.d.ts.map +1 -1
- package/dist/types/extensions/erc1155/drops/write/claimTo.d.ts +2 -3
- package/dist/types/extensions/erc1155/drops/write/claimTo.d.ts.map +1 -1
- package/dist/types/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.d.ts +57 -0
- package/dist/types/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.d.ts.map +1 -0
- package/dist/types/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.d.ts +123 -0
- package/dist/types/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.d.ts.map +1 -0
- package/dist/types/extensions/prebuilts/__generated__/VoteERC20/write/initialize.d.ts +129 -0
- package/dist/types/extensions/prebuilts/__generated__/VoteERC20/write/initialize.d.ts.map +1 -0
- package/dist/types/extensions/prebuilts/deploy-vote.d.ts +82 -0
- package/dist/types/extensions/prebuilts/deploy-vote.d.ts.map +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendAndConfirmTransaction.d.ts +12 -0
- package/dist/types/react/core/hooks/transaction/useSendAndConfirmTransaction.d.ts.map +1 -1
- package/dist/types/react/native/hooks/transaction/useSendTransaction.d.ts +11 -0
- package/dist/types/react/native/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/index.d.ts +13 -0
- package/dist/types/react/web/ui/TransactionButton/index.d.ts.map +1 -1
- package/dist/types/transaction/actions/send-and-confirm-transaction.d.ts +13 -0
- package/dist/types/transaction/actions/send-and-confirm-transaction.d.ts.map +1 -1
- package/dist/types/transaction/actions/send-transaction.d.ts +13 -0
- package/dist/types/transaction/actions/send-transaction.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/lib/in-app-account.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.d.ts.map +1 -1
- package/dist/types/wallets/smart/index.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/bundler.d.ts +3 -3
- package/dist/types/wallets/smart/lib/bundler.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/constants.d.ts +6 -6
- package/dist/types/wallets/smart/lib/constants.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/packUserOp.d.ts +16 -0
- package/dist/types/wallets/smart/lib/packUserOp.d.ts.map +1 -0
- package/dist/types/wallets/smart/lib/paymaster.d.ts +3 -3
- package/dist/types/wallets/smart/lib/paymaster.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/userop.d.ts +6 -4
- package/dist/types/wallets/smart/lib/userop.d.ts.map +1 -1
- package/dist/types/wallets/smart/lib/utils.d.ts +2 -2
- package/dist/types/wallets/smart/lib/utils.d.ts.map +1 -1
- package/dist/types/wallets/smart/smart-wallet.d.ts.map +1 -1
- package/dist/types/wallets/smart/types.d.ts +62 -9
- package/dist/types/wallets/smart/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/exports/wallets/smart.ts +4 -2
- package/src/extensions/erc1155/drops/write/claimTo.ts +2 -3
- package/src/extensions/erc4337/__generated__/IEntryPoint_v07/events/PostOpRevertReason.ts +49 -0
- package/src/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.ts +181 -0
- package/src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts +230 -0
- package/src/extensions/prebuilts/deploy-vote.test.ts +73 -0
- package/src/extensions/prebuilts/deploy-vote.ts +213 -0
- package/src/extensions/vote/read/proposalExists.test.ts +123 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoQuote.ts +16 -1
- package/src/react/core/hooks/pay/useBuyWithFiatQuote.ts +16 -1
- package/src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts +12 -0
- package/src/react/native/hooks/transaction/useSendTransaction.tsx +11 -0
- package/src/react/web/ui/TransactionButton/index.tsx +13 -0
- package/src/transaction/actions/send-and-confirm-transaction.ts +13 -0
- package/src/transaction/actions/send-transaction.ts +13 -0
- package/src/transaction/actions/zksync/send-eip712-transaction.ts +1 -1
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/lib/in-app-account.ts +5 -1
- package/src/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.ts +1 -0
- package/src/wallets/smart/index.ts +21 -5
- package/src/wallets/smart/lib/bundler.ts +21 -5
- package/src/wallets/smart/lib/constants.ts +29 -10
- package/src/wallets/smart/lib/packUserOp.ts +79 -0
- package/src/wallets/smart/lib/paymaster.ts +22 -5
- package/src/wallets/smart/lib/userop.ts +292 -85
- package/src/wallets/smart/lib/utils.ts +11 -4
- package/src/wallets/smart/smart-wallet-integration-v07.test.ts +206 -0
- package/src/wallets/smart/smart-wallet-integration.test.ts +1 -1
- package/src/wallets/smart/smart-wallet-zksync.test.ts +3 -3
- package/src/wallets/smart/smart-wallet.ts +4 -2
- package/src/wallets/smart/types.ts +73 -9
@@ -0,0 +1,123 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions } from "../../../../../transaction/types.js";
|
3
|
+
import type { Hex } from "../../../../../utils/encoding/hex.js";
|
4
|
+
import type { ThirdwebContract } from "../../../../../contract/contract.js";
|
5
|
+
/**
|
6
|
+
* Represents the parameters for the "getUserOpHash" function.
|
7
|
+
*/
|
8
|
+
export type GetUserOpHashParams = {
|
9
|
+
userOp: AbiParameterToPrimitiveType<{
|
10
|
+
type: "tuple";
|
11
|
+
name: "userOp";
|
12
|
+
components: [
|
13
|
+
{
|
14
|
+
type: "address";
|
15
|
+
name: "sender";
|
16
|
+
},
|
17
|
+
{
|
18
|
+
type: "uint256";
|
19
|
+
name: "nonce";
|
20
|
+
},
|
21
|
+
{
|
22
|
+
type: "bytes";
|
23
|
+
name: "initCode";
|
24
|
+
},
|
25
|
+
{
|
26
|
+
type: "bytes";
|
27
|
+
name: "callData";
|
28
|
+
},
|
29
|
+
{
|
30
|
+
type: "bytes32";
|
31
|
+
name: "accountGasLimits";
|
32
|
+
},
|
33
|
+
{
|
34
|
+
type: "uint256";
|
35
|
+
name: "preVerificationGas";
|
36
|
+
},
|
37
|
+
{
|
38
|
+
type: "bytes32";
|
39
|
+
name: "gasFees";
|
40
|
+
},
|
41
|
+
{
|
42
|
+
type: "bytes";
|
43
|
+
name: "paymasterAndData";
|
44
|
+
},
|
45
|
+
{
|
46
|
+
type: "bytes";
|
47
|
+
name: "signature";
|
48
|
+
}
|
49
|
+
];
|
50
|
+
}>;
|
51
|
+
};
|
52
|
+
export declare const FN_SELECTOR: "0x22cdde4c";
|
53
|
+
/**
|
54
|
+
* Checks if the `getUserOpHash` method is supported by the given contract.
|
55
|
+
* @param contract The ThirdwebContract.
|
56
|
+
* @returns A promise that resolves to a boolean indicating if the `getUserOpHash` method is supported.
|
57
|
+
* @extension ERC4337
|
58
|
+
* @example
|
59
|
+
* ```ts
|
60
|
+
* import { isGetUserOpHashSupported } from "thirdweb/extensions/erc4337";
|
61
|
+
*
|
62
|
+
* const supported = await isGetUserOpHashSupported(contract);
|
63
|
+
* ```
|
64
|
+
*/
|
65
|
+
export declare function isGetUserOpHashSupported(contract: ThirdwebContract<any>): Promise<boolean>;
|
66
|
+
/**
|
67
|
+
* Encodes the parameters for the "getUserOpHash" function.
|
68
|
+
* @param options - The options for the getUserOpHash function.
|
69
|
+
* @returns The encoded ABI parameters.
|
70
|
+
* @extension ERC4337
|
71
|
+
* @example
|
72
|
+
* ```ts
|
73
|
+
* import { encodeGetUserOpHashParams } "thirdweb/extensions/erc4337";
|
74
|
+
* const result = encodeGetUserOpHashParams({
|
75
|
+
* userOp: ...,
|
76
|
+
* });
|
77
|
+
* ```
|
78
|
+
*/
|
79
|
+
export declare function encodeGetUserOpHashParams(options: GetUserOpHashParams): `0x${string}`;
|
80
|
+
/**
|
81
|
+
* Encodes the "getUserOpHash" function into a Hex string with its parameters.
|
82
|
+
* @param options - The options for the getUserOpHash function.
|
83
|
+
* @returns The encoded hexadecimal string.
|
84
|
+
* @extension ERC4337
|
85
|
+
* @example
|
86
|
+
* ```ts
|
87
|
+
* import { encodeGetUserOpHash } "thirdweb/extensions/erc4337";
|
88
|
+
* const result = encodeGetUserOpHash({
|
89
|
+
* userOp: ...,
|
90
|
+
* });
|
91
|
+
* ```
|
92
|
+
*/
|
93
|
+
export declare function encodeGetUserOpHash(options: GetUserOpHashParams): `${typeof FN_SELECTOR}${string}`;
|
94
|
+
/**
|
95
|
+
* Decodes the result of the getUserOpHash function call.
|
96
|
+
* @param result - The hexadecimal result to decode.
|
97
|
+
* @returns The decoded result as per the FN_OUTPUTS definition.
|
98
|
+
* @extension ERC4337
|
99
|
+
* @example
|
100
|
+
* ```ts
|
101
|
+
* import { decodeGetUserOpHashResult } from "thirdweb/extensions/erc4337";
|
102
|
+
* const result = decodeGetUserOpHashResult("...");
|
103
|
+
* ```
|
104
|
+
*/
|
105
|
+
export declare function decodeGetUserOpHashResult(result: Hex): `0x${string}`;
|
106
|
+
/**
|
107
|
+
* Calls the "getUserOpHash" function on the contract.
|
108
|
+
* @param options - The options for the getUserOpHash function.
|
109
|
+
* @returns The parsed result of the function call.
|
110
|
+
* @extension ERC4337
|
111
|
+
* @example
|
112
|
+
* ```ts
|
113
|
+
* import { getUserOpHash } from "thirdweb/extensions/erc4337";
|
114
|
+
*
|
115
|
+
* const result = await getUserOpHash({
|
116
|
+
* contract,
|
117
|
+
* userOp: ...,
|
118
|
+
* });
|
119
|
+
*
|
120
|
+
* ```
|
121
|
+
*/
|
122
|
+
export declare function getUserOpHash(options: BaseTransactionOptions<GetUserOpHashParams>): Promise<`0x${string}`>;
|
123
|
+
//# sourceMappingURL=getUserOpHash.d.ts.map
|
package/dist/types/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getUserOpHash.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/erc4337/__generated__/IEntryPoint_v07/read/getUserOpHash.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;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAG5E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,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AG,iBAEpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,0BAOrD"}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
import type { AbiParameterToPrimitiveType } from "abitype";
|
2
|
+
import type { BaseTransactionOptions, WithOverrides } from "../../../../../transaction/types.js";
|
3
|
+
import type { ThirdwebContract } from "../../../../../contract/contract.js";
|
4
|
+
/**
|
5
|
+
* Represents the parameters for the "initialize" function.
|
6
|
+
*/
|
7
|
+
export type InitializeParams = WithOverrides<{
|
8
|
+
name: AbiParameterToPrimitiveType<{
|
9
|
+
type: "string";
|
10
|
+
name: "_name";
|
11
|
+
}>;
|
12
|
+
contractURI: AbiParameterToPrimitiveType<{
|
13
|
+
type: "string";
|
14
|
+
name: "_contractURI";
|
15
|
+
}>;
|
16
|
+
trustedForwarders: AbiParameterToPrimitiveType<{
|
17
|
+
type: "address[]";
|
18
|
+
name: "_trustedForwarders";
|
19
|
+
}>;
|
20
|
+
token: AbiParameterToPrimitiveType<{
|
21
|
+
type: "address";
|
22
|
+
name: "_token";
|
23
|
+
}>;
|
24
|
+
initialVotingDelay: AbiParameterToPrimitiveType<{
|
25
|
+
type: "uint256";
|
26
|
+
name: "_initialVotingDelay";
|
27
|
+
}>;
|
28
|
+
initialVotingPeriod: AbiParameterToPrimitiveType<{
|
29
|
+
type: "uint256";
|
30
|
+
name: "_initialVotingPeriod";
|
31
|
+
}>;
|
32
|
+
initialProposalThreshold: AbiParameterToPrimitiveType<{
|
33
|
+
type: "uint256";
|
34
|
+
name: "_initialProposalThreshold";
|
35
|
+
}>;
|
36
|
+
initialVoteQuorumFraction: AbiParameterToPrimitiveType<{
|
37
|
+
type: "uint256";
|
38
|
+
name: "_initialVoteQuorumFraction";
|
39
|
+
}>;
|
40
|
+
}>;
|
41
|
+
export declare const FN_SELECTOR: "0x7cf43f8d";
|
42
|
+
/**
|
43
|
+
* Checks if the `initialize` method is supported by the given contract.
|
44
|
+
* @param contract The ThirdwebContract.
|
45
|
+
* @returns A promise that resolves to a boolean indicating if the `initialize` method is supported.
|
46
|
+
* @extension PREBUILTS
|
47
|
+
* @example
|
48
|
+
* ```ts
|
49
|
+
* import { isInitializeSupported } from "thirdweb/extensions/prebuilts";
|
50
|
+
*
|
51
|
+
* const supported = await isInitializeSupported(contract);
|
52
|
+
* ```
|
53
|
+
*/
|
54
|
+
export declare function isInitializeSupported(contract: ThirdwebContract<any>): Promise<boolean>;
|
55
|
+
/**
|
56
|
+
* Encodes the parameters for the "initialize" function.
|
57
|
+
* @param options - The options for the initialize function.
|
58
|
+
* @returns The encoded ABI parameters.
|
59
|
+
* @extension PREBUILTS
|
60
|
+
* @example
|
61
|
+
* ```ts
|
62
|
+
* import { encodeInitializeParams } "thirdweb/extensions/prebuilts";
|
63
|
+
* const result = encodeInitializeParams({
|
64
|
+
* name: ...,
|
65
|
+
* contractURI: ...,
|
66
|
+
* trustedForwarders: ...,
|
67
|
+
* token: ...,
|
68
|
+
* initialVotingDelay: ...,
|
69
|
+
* initialVotingPeriod: ...,
|
70
|
+
* initialProposalThreshold: ...,
|
71
|
+
* initialVoteQuorumFraction: ...,
|
72
|
+
* });
|
73
|
+
* ```
|
74
|
+
*/
|
75
|
+
export declare function encodeInitializeParams(options: InitializeParams): `0x${string}`;
|
76
|
+
/**
|
77
|
+
* Encodes the "initialize" function into a Hex string with its parameters.
|
78
|
+
* @param options - The options for the initialize function.
|
79
|
+
* @returns The encoded hexadecimal string.
|
80
|
+
* @extension PREBUILTS
|
81
|
+
* @example
|
82
|
+
* ```ts
|
83
|
+
* import { encodeInitialize } "thirdweb/extensions/prebuilts";
|
84
|
+
* const result = encodeInitialize({
|
85
|
+
* name: ...,
|
86
|
+
* contractURI: ...,
|
87
|
+
* trustedForwarders: ...,
|
88
|
+
* token: ...,
|
89
|
+
* initialVotingDelay: ...,
|
90
|
+
* initialVotingPeriod: ...,
|
91
|
+
* initialProposalThreshold: ...,
|
92
|
+
* initialVoteQuorumFraction: ...,
|
93
|
+
* });
|
94
|
+
* ```
|
95
|
+
*/
|
96
|
+
export declare function encodeInitialize(options: InitializeParams): `${typeof FN_SELECTOR}${string}`;
|
97
|
+
/**
|
98
|
+
* Prepares a transaction to call the "initialize" function on the contract.
|
99
|
+
* @param options - The options for the "initialize" function.
|
100
|
+
* @returns A prepared transaction object.
|
101
|
+
* @extension PREBUILTS
|
102
|
+
* @example
|
103
|
+
* ```ts
|
104
|
+
* import { initialize } from "thirdweb/extensions/prebuilts";
|
105
|
+
*
|
106
|
+
* const transaction = initialize({
|
107
|
+
* contract,
|
108
|
+
* name: ...,
|
109
|
+
* contractURI: ...,
|
110
|
+
* trustedForwarders: ...,
|
111
|
+
* token: ...,
|
112
|
+
* initialVotingDelay: ...,
|
113
|
+
* initialVotingPeriod: ...,
|
114
|
+
* initialProposalThreshold: ...,
|
115
|
+
* initialVoteQuorumFraction: ...,
|
116
|
+
* overrides: {
|
117
|
+
* ...
|
118
|
+
* }
|
119
|
+
* });
|
120
|
+
*
|
121
|
+
* // Send the transaction
|
122
|
+
* ...
|
123
|
+
*
|
124
|
+
* ```
|
125
|
+
*/
|
126
|
+
export declare function initialize(options: BaseTransactionOptions<InitializeParams | {
|
127
|
+
asyncParams: () => Promise<InitializeParams>;
|
128
|
+
}>): import("../../../../../transaction/prepare-transaction.js").PreparedTransaction<any, import("abitype").AbiFunction, import("../../../../../transaction/prepare-transaction.js").PrepareTransactionOptions>;
|
129
|
+
//# sourceMappingURL=initialize.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/prebuilts/__generated__/VoteERC20/write/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,qCAAqC,CAAC;AAI7C,OAAO,KA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AC,OAAO,EAAE,gBAAgB,iBAW/D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAMhD,GAAG,OAAO,WAAW,GAAG,MAAM,EAAE,CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,sBAAsB,CAC3B,gBAAgB,GAChB;IACE,WAAW,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CACJ,8MAiCF"}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import type { FileOrBufferOrString } from "../../storage/upload/types.js";
|
2
|
+
import type { Prettify } from "../../utils/type-utils.js";
|
3
|
+
import type { ClientAndChainAndAccount } from "../../utils/types.js";
|
4
|
+
/**
|
5
|
+
* @extension DEPLOY
|
6
|
+
*/
|
7
|
+
export type VoteContractParams = {
|
8
|
+
name: string;
|
9
|
+
/**
|
10
|
+
* The contract address for the ERC20 that will be used as voting power
|
11
|
+
*/
|
12
|
+
tokenAddress: string;
|
13
|
+
/**
|
14
|
+
* The number of blocks after a proposal is created that voting on the proposal starts.
|
15
|
+
* A block is a series of blockchain transactions and occurs every ~1 seconds.
|
16
|
+
* Block time is different across EVM networks
|
17
|
+
*
|
18
|
+
* Defaults to 0 (zero)
|
19
|
+
*/
|
20
|
+
initialVotingDelay?: number;
|
21
|
+
/**
|
22
|
+
* The number of blocks that voters have to vote on any new proposal.
|
23
|
+
*/
|
24
|
+
initialVotingPeriod: number;
|
25
|
+
/**
|
26
|
+
* The minimum number of voting tokens a wallet needs in order to create proposals.
|
27
|
+
* This amount that you have to enter is _not_ in wei. If you want users to have a least 0.5 ERC20 token to create proposals,
|
28
|
+
* enter `"0.5"` or `0.5`. The deploy script will fetch the ERC20 token's decimals and do the unit conversion for you.
|
29
|
+
*/
|
30
|
+
initialProposalThreshold: string | number;
|
31
|
+
/**
|
32
|
+
* The fraction of the total voting power that is required for a proposal to pass.
|
33
|
+
* A value of 0 indicates that no voting power is sufficient,
|
34
|
+
* whereas a value of 100 indicates that the entirety of voting power must vote for a proposal to pass.
|
35
|
+
* `initialProposalThreshold` should be an integer or an integer-convertoble string. For example:
|
36
|
+
* - 51 or "51" is a valid input
|
37
|
+
* - 51.225 or "51.225" is an invalid input
|
38
|
+
*/
|
39
|
+
minVoteQuorumRequiredPercent: number | string;
|
40
|
+
description?: string;
|
41
|
+
image?: FileOrBufferOrString;
|
42
|
+
external_link?: string;
|
43
|
+
social_urls?: Record<string, string>;
|
44
|
+
symbol?: string;
|
45
|
+
contractURI?: string;
|
46
|
+
defaultAdmin?: string;
|
47
|
+
trustedForwarders?: string[];
|
48
|
+
};
|
49
|
+
/**
|
50
|
+
* @extension DEPLOY
|
51
|
+
*/
|
52
|
+
export type DeployVoteContractOptions = Prettify<ClientAndChainAndAccount & {
|
53
|
+
params: VoteContractParams;
|
54
|
+
}>;
|
55
|
+
/**
|
56
|
+
* Deploys a thirdweb [`VoteERC20 contract`](https://thirdweb.com/thirdweb.eth/VoteERC20)
|
57
|
+
* On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well.
|
58
|
+
* @param options - The deployment options.
|
59
|
+
* @returns The deployed contract address.
|
60
|
+
* @extension DEPLOY
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* ```ts
|
64
|
+
* import { deployVoteContract } from "thirdweb/deploys";
|
65
|
+
* const contractAddress = await deployVoteContract({
|
66
|
+
* chain,
|
67
|
+
* client,
|
68
|
+
* account,
|
69
|
+
* params: {
|
70
|
+
* tokenAddress: "0x...",
|
71
|
+
* // user needs 0.5 <token> to create proposal
|
72
|
+
* initialProposalThreshold: "0.5",
|
73
|
+
* // vote expires 10 blocks later
|
74
|
+
* initialVotingPeriod: 10,
|
75
|
+
* // Requires 51% of users who voted, voted "For", for this proposal to pass
|
76
|
+
* minVoteQuorumRequiredPercent: 51,
|
77
|
+
* }
|
78
|
+
* });
|
79
|
+
* ```
|
80
|
+
*/
|
81
|
+
export declare function deployVoteContract(options: DeployVoteContractOptions): Promise<string>;
|
82
|
+
//# sourceMappingURL=deploy-vote.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deploy-vote.d.ts","sourceRoot":"","sources":["../../../../src/extensions/prebuilts/deploy-vote.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAGrE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,wBAAwB,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1C;;;;;;;OAOG;IACH,4BAA4B,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAC9C,wBAAwB,GAAG;IACzB,MAAM,EAAE,kBAAkB,CAAC;CAC5B,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,mBAyB1E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithCryptoQuote.d.ts","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAEjC,MAAM,2CAA2C,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,eAAe,CAAC,kBAAkB,CAAC,EACnC,SAAS,GAAG,UAAU,GAAG,SAAS,CACnC,CAAC;
|
1
|
+
{"version":3,"file":"useBuyWithCryptoQuote.d.ts","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithCryptoQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAEjC,MAAM,2CAA2C,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,eAAe,CAAC,kBAAkB,CAAC,EACnC,SAAS,GAAG,UAAU,GAAG,SAAS,CACnC,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,CAAC,EAAE,2BAA2B,EACpC,WAAW,CAAC,EAAE,8BAA8B,GAC3C,cAAc,CAAC,kBAAkB,CAAC,CAkCpC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useBuyWithFiatQuote.d.ts","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAE/B,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,eAAe,CAAC,gBAAgB,CAAC,EACjC,SAAS,GAAG,UAAU,GAAG,SAAS,CACnC,CAAC;
|
1
|
+
{"version":3,"file":"useBuyWithFiatQuote.d.ts","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/pay/useBuyWithFiatQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAE/B,MAAM,yCAAyC,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,eAAe,CAAC,gBAAgB,CAAC,EACjC,SAAS,GAAG,UAAU,GAAG,SAAS,CACnC,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,CAAC,EAAE,yBAAyB,EAClC,YAAY,CAAC,EAAE,4BAA4B,GAC1C,cAAc,CAAC,gBAAgB,CAAC,CAiClC"}
|
@@ -36,6 +36,18 @@ export type SendAndConfirmTransactionConfig = {
|
|
36
36
|
* }
|
37
37
|
* });
|
38
38
|
* ```
|
39
|
+
*
|
40
|
+
* ### Gasless usage with OpenZeppelin
|
41
|
+
* ```tsx
|
42
|
+
* import { useSendAndConfirmTransaction } from "thirdweb/react";
|
43
|
+
* const mutation = useSendAndConfirmTransaction({
|
44
|
+
* gasless: {
|
45
|
+
* provider: "openzeppelin",
|
46
|
+
* relayerUrl: "https://...",
|
47
|
+
* relayerForwarderAddress: "0x...",
|
48
|
+
* }
|
49
|
+
* });
|
50
|
+
* ```
|
39
51
|
* @transaction
|
40
52
|
*/
|
41
53
|
export declare function useSendAndConfirmTransaction(config?: SendAndConfirmTransactionConfig): UseMutationResult<TransactionReceipt, Error, PreparedTransaction>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useSendAndConfirmTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAe,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAEvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF
|
1
|
+
{"version":3,"file":"useSendAndConfirmTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAe,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAEvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,GAAE,+BAAoC,GAC3C,iBAAiB,CAAC,kBAAkB,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAenE"}
|
@@ -24,6 +24,17 @@ import { type SendTransactionConfig } from "../../../core/hooks/transaction/useS
|
|
24
24
|
* }
|
25
25
|
* });
|
26
26
|
* ```
|
27
|
+
*
|
28
|
+
* ### Gasless usage with OpenZeppelin
|
29
|
+
* ```tsx
|
30
|
+
* import { useSendTransaction } from "thirdweb/react";
|
31
|
+
* const mutation = useSendTransaction({
|
32
|
+
* gasless: {
|
33
|
+
* provider: "openzeppelin",
|
34
|
+
* relayerUrl: "https://...",
|
35
|
+
* relayerForwarderAddress: "0x...",
|
36
|
+
* }
|
37
|
+
* });
|
27
38
|
* @transaction
|
28
39
|
*/
|
29
40
|
export declare function useSendTransaction(config?: SendTransactionConfig): import("@tanstack/react-query").UseMutationResult<{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useSendTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/react/native/hooks/transaction/useSendTransaction.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,uDAAuD,CAAC;AAI/D
|
1
|
+
{"version":3,"file":"useSendTransaction.d.ts","sourceRoot":"","sources":["../../../../../../src/react/native/hooks/transaction/useSendTransaction.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,uDAAuD,CAAC;AAI/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,GAAE,qBAA0B;;;;;wFAQpE"}
|
@@ -105,6 +105,19 @@ import { type TransactionButtonProps } from "../../../core/hooks/transaction/tra
|
|
105
105
|
* ...
|
106
106
|
* </TransactionButton>
|
107
107
|
* ```
|
108
|
+
*
|
109
|
+
* ### Gasless usage with OpenZeppelin
|
110
|
+
* ```tsx
|
111
|
+
* <TransactionButton
|
112
|
+
* gasless={{
|
113
|
+
* provider: "openzeppelin",
|
114
|
+
* relayerUrl: "https://...",
|
115
|
+
* relayerForwarderAddress: "0x...",
|
116
|
+
* }}
|
117
|
+
* >
|
118
|
+
* ...
|
119
|
+
* </TransactionButton>
|
120
|
+
* ```
|
108
121
|
* @component
|
109
122
|
*/
|
110
123
|
export declare function TransactionButton(props: TransactionButtonProps): import("react/jsx-runtime.js").JSX.Element;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/TransactionButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,6DAA6D,CAAC;AAMrE
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/TransactionButton/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,6DAA6D,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwHG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,8CAkE9D"}
|
@@ -30,6 +30,19 @@ import { type SendTransactionOptions } from "./send-transaction.js";
|
|
30
30
|
* }
|
31
31
|
* });
|
32
32
|
* ```
|
33
|
+
*
|
34
|
+
* ### Gasless usage with OpenZeppelin
|
35
|
+
* ```ts
|
36
|
+
* const transactionReceipt = await sendAndConfirmTransaction({
|
37
|
+
* account,
|
38
|
+
* transaction,
|
39
|
+
* gasless: {
|
40
|
+
* provider: "openzeppelin",
|
41
|
+
* relayerUrl: "https://...",
|
42
|
+
* relayerForwarderAddress: "0x...",
|
43
|
+
* }
|
44
|
+
* });
|
45
|
+
* ```
|
33
46
|
*/
|
34
47
|
export declare function sendAndConfirmTransaction(options: SendTransactionOptions): Promise<TransactionReceipt>;
|
35
48
|
//# sourceMappingURL=send-and-confirm-transaction.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"send-and-confirm-transaction.d.ts","sourceRoot":"","sources":["../../../../src/transaction/actions/send-and-confirm-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,uBAAuB,CAAC;AAG/B
|
1
|
+
{"version":3,"file":"send-and-confirm-transaction.d.ts","sourceRoot":"","sources":["../../../../src/transaction/actions/send-and-confirm-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,uBAAuB,CAAC;AAG/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,kBAAkB,CAAC,CAG7B"}
|
@@ -116,6 +116,19 @@ export interface SendTransactionOptions {
|
|
116
116
|
* }
|
117
117
|
* });
|
118
118
|
* ```
|
119
|
+
*
|
120
|
+
* ### Gasless usage with OpenZeppelin
|
121
|
+
* ```ts
|
122
|
+
* const { transactionHash } = await sendTransaction({
|
123
|
+
* account,
|
124
|
+
* transaction,
|
125
|
+
* gasless: {
|
126
|
+
* provider: "openzeppelin",
|
127
|
+
* relayerUrl: "https://...",
|
128
|
+
* relayerForwarderAddress: "0x...",
|
129
|
+
* }
|
130
|
+
* });
|
131
|
+
* ```
|
119
132
|
*/
|
120
133
|
export declare function sendTransaction(options: SendTransactionOptions): Promise<WaitForReceiptOptions>;
|
121
134
|
//# sourceMappingURL=send-transaction.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"send-transaction.d.ts","sourceRoot":"","sources":["../../../../src/transaction/actions/send-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,+BAA+B;AAC/B,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IAEH,WAAW,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED
|
1
|
+
{"version":3,"file":"send-transaction.d.ts","sourceRoot":"","sources":["../../../../src/transaction/actions/send-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,+BAA+B;AAC/B,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IAEH,WAAW,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAkChC"}
|
package/dist/types/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "5.48.
|
1
|
+
export declare const version = "5.48.3-nightly-a8e2bc58c9e8fe5b75d6c27d406e6b80d5d067e2-20240828000339";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,2EAA2E,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"in-app-account.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/web/lib/in-app-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,mCAAmC,CAAC;AAG1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,KAAK,EACV,OAAO,EAER,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,uBAAuB,EACvB,SAAS,EAKV,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+DAA+D,CAAC;AAEnH,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,SAAS,CAAC;IACxB,cAAc,EAAE,SAAS,CAAC;I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AC,YAAY,EAAE,mBAAmB,CAAC;IAE5C;;;OAGG;gBACS,EACV,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE,QAAQ,CACT,uBAAuB,GAAG;QACxB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CACF;IAYD;;;;OAIG;IACG,eAAe,CAAC,EACpB,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,YAAY,GACb,EAAE,eAAe,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAOrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACG,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC;IA6B7C;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"in-app-account.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/in-app/web/lib/in-app-account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,mCAAmC,CAAC;AAG1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,KAAK,EACV,OAAO,EAER,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACV,uBAAuB,EACvB,SAAS,EAKV,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,+DAA+D,CAAC;AAEnH,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,SAAS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AAG,uBAAuB,CAChD,CAAC;IACF,SAAS,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAE5C;;;OAGG;gBACS,EACV,MAAM,EACN,SAAS,EACT,OAAO,GACR,EAAE,QAAQ,CACT,uBAAuB,GAAG;QACxB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CACF;IAYD;;;;OAIG;IACG,eAAe,CAAC,EACpB,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,YAAY,GACb,EAAE,eAAe,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAOrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACG,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC;IA6B7C;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;CA0JrC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IframeCommunicator.d.ts","sourceRoot":"","sources":["../../../../../../../src/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC,CAAC;
|
1
|
+
{"version":3,"file":"IframeCommunicator.d.ts","sourceRoot":"","sources":["../../../../../../../src/wallets/in-app/web/utils/iFrameCommunication/IframeCommunicator.ts"],"names":[],"mappings":"AAAA,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC,CAAC;AAyBF;;GAEG;AAEH,qBAAa,kBAAkB,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE;IAC9D,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,wBAAwB,CAAO;IAEvC,OAAO,CAAC,aAAa,CAAC;IACtB;;OAEG;gBACS,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAyB,EACzB,kBAAkB,GACnB,EAAE,uBAAuB;cA6CV,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAI3E;;OAEG;IACH,mBAAmB,CACjB,MAAM,EAAE,iBAAiB,EACzB,kBAAkB,CAAC,EAAE,MAAM,IAAI;IAsCjC;;OAEG;IACG,IAAI,CAAC,UAAU,EAAE,EACrB,aAAa,EACb,MAAM,EACN,UAAkB,GACnB,EAAE;QACD,aAAa,EAAE,MAAM,CAAC,CAAC;QACvB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB;IAqCD;;;;OAIG;IACH,OAAO;CAGR"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wallets/smart/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,OAAO,KAAK,EACV,OAAO,EAEP,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACT,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wallets/smart/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,OAAO,KAAK,EACV,OAAO,EAEP,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,QAAQ,EACT,MAAM,oBAAoB,CAAC;AA4B5B;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,GACvB,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,CAE3B;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC,mCAG1C,CAAC;AAIJ;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,EACvB,iBAAiB,EAAE,sBAAsB,CAAC,OAAO,CAAC,EAClD,eAAe,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC5C,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAqE3B;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GACtB,OAAO,CAAC,IAAI,CAAC,CAQf"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type TransactionSerializable } from "viem";
|
2
2
|
import type { TransactionReceipt } from "../../../transaction/types.js";
|
3
3
|
import { type Hex } from "../../../utils/encoding/hex.js";
|
4
|
-
import { type BundlerOptions, type EstimationResult, type GasPriceResult, type PmTransactionData, type
|
4
|
+
import { type BundlerOptions, type EstimationResult, type GasPriceResult, type PmTransactionData, type UserOperationReceipt, type UserOperationV06, type UserOperationV07 } from "../types.js";
|
5
5
|
/**
|
6
6
|
* Bundle a user operation.
|
7
7
|
* @param args - The options for bundling a user operation.
|
@@ -18,7 +18,7 @@ import { type BundlerOptions, type EstimationResult, type GasPriceResult, type P
|
|
18
18
|
* @walletUtils
|
19
19
|
*/
|
20
20
|
export declare function bundleUserOp(args: {
|
21
|
-
userOp:
|
21
|
+
userOp: UserOperationV06 | UserOperationV07;
|
22
22
|
options: BundlerOptions;
|
23
23
|
}): Promise<Hex>;
|
24
24
|
/**
|
@@ -37,7 +37,7 @@ export declare function bundleUserOp(args: {
|
|
37
37
|
* @walletUtils
|
38
38
|
*/
|
39
39
|
export declare function estimateUserOpGas(args: {
|
40
|
-
userOp:
|
40
|
+
userOp: UserOperationV06 | UserOperationV07;
|
41
41
|
options: BundlerOptions;
|
42
42
|
}): Promise<EstimationResult>;
|
43
43
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAqB,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAqB,MAAM,MAAM,CAAC;AAIvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,gCAAgC,CAAC;AAGvE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtB,MAAM,aAAa,CAAC;AAUrB;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;IAC5C,OAAO,EAAE,cAAc,CAAC;CACzB,GAAG,OAAO,CAAC,GAAG,CAAC,CASf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;IAC5C,OAAO,EAAE,cAAc,CAAC;CACzB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAyB5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,OAAO,EAAE,cAAc,CAAC;CACzB,GAAG,OAAO,CAAC,cAAc,CAAC,CAW1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,cAAc,GAAG;IACrB,UAAU,EAAE,GAAG,CAAC;CACjB,GACA,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CA6BzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,cAAc,GAAG;IACrB,UAAU,EAAE,GAAG,CAAC;CACjB,GACA,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAU3C;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,uBAAuB,CAAC;CACtC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAW7B;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,uBAAuB,CAAC;IACrC,iBAAiB,EAAE,GAAG,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,eAAe,EAAE,GAAG,CAAA;CAAE,CAAC,CAepC"}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import type { Chain } from "../../../chains/types.js";
|
2
2
|
export declare const DEBUG = false;
|
3
3
|
export declare const DUMMY_SIGNATURE = "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
|
4
|
-
export declare const
|
4
|
+
export declare const DEFAULT_ACCOUNT_FACTORY_V0_6 = "0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00";
|
5
|
+
export declare const DEFAULT_ACCOUNT_FACTORY_V0_7 = "0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb";
|
5
6
|
export declare const ENTRYPOINT_ADDRESS_v0_6 = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
|
7
|
+
export declare const ENTRYPOINT_ADDRESS_v0_7 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
6
8
|
export declare const MANAGED_ACCOUNT_GAS_BUFFER = 50000n;
|
9
|
+
export declare const getDefaultAccountFactory: (entryPointAddress?: string) => "0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00" | "0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb";
|
7
10
|
/**
|
8
11
|
* @internal
|
9
12
|
*/
|
10
|
-
export declare const getDefaultBundlerUrl: (chain: Chain) => string;
|
11
|
-
|
12
|
-
* @internal
|
13
|
-
*/
|
14
|
-
export declare const getDefaultPaymasterUrl: (chain: Chain) => string;
|
13
|
+
export declare const getDefaultBundlerUrl: (chain: Chain, version: "v1" | "v2") => string;
|
14
|
+
export declare const getEntryPointVersion: (address: string) => "v0.6" | "v0.7";
|
15
15
|
//# sourceMappingURL=constants.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAKtD,eAAO,MAAM,KAAK,QAAQ,CAAC;AAE3B,eAAO,MAAM,eAAe,yIAC4G,CAAC;AAEzI,eAAO,MAAM,4BAA4B,+CACK,CAAC;AAC/C,eAAO,MAAM,4BAA4B,+CACK,CAAC;AAE/C,eAAO,MAAM,uBAAuB,+CACU,CAAC;AAC/C,eAAO,MAAM,uBAAuB,+CACU,CAAC;AAE/C,eAAO,MAAM,0BAA0B,SAAS,CAAC;AAKjD,eAAO,MAAM,wBAAwB,uBAAwB,MAAM,gGAQlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,UAAW,KAAK,WAAW,IAAI,GAAG,IAAI,WAMtE,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAAM,GAAG,MAS/D,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { type Hex } from "viem";
|
2
|
+
import type { PackedUserOperation, UserOperationV07 } from "../types.js";
|
3
|
+
export declare function getInitCode(unpackedUserOperation: UserOperationV07): `0x${string}`;
|
4
|
+
export declare function getAccountGasLimits(unpackedUserOperation: UserOperationV07): Hex;
|
5
|
+
export declare function unpackAccountGasLimits(accountGasLimits: Hex): {
|
6
|
+
verificationGasLimit: bigint;
|
7
|
+
callGasLimit: bigint;
|
8
|
+
};
|
9
|
+
export declare function getGasLimits(unpackedUserOperation: UserOperationV07): Hex;
|
10
|
+
export declare function unpackGasLimits(gasLimits: Hex): {
|
11
|
+
maxPriorityFeePerGas: bigint;
|
12
|
+
maxFeePerGas: bigint;
|
13
|
+
};
|
14
|
+
export declare function getPaymasterAndData(unpackedUserOperation: UserOperationV07): `0x${string}`;
|
15
|
+
export declare const getPackedUserOperation: (userOperation: UserOperationV07) => PackedUserOperation;
|
16
|
+
//# sourceMappingURL=packUserOp.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"packUserOp.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/smart/lib/packUserOp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA6B,MAAM,MAAM,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEzE,wBAAgB,WAAW,CAAC,qBAAqB,EAAE,gBAAgB,iBAOlE;AAED,wBAAgB,mBAAmB,CAAC,qBAAqB,EAAE,gBAAgB,GAMnE,GAAG,CACV;AAED,wBAAgB,sBAAsB,CAAC,gBAAgB,EAAE,GAAG;;;EAK3D;AAED,wBAAgB,YAAY,CAAC,qBAAqB,EAAE,gBAAgB,GAM5D,GAAG,CACV;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG;;;EAK7C;AAED,wBAAgB,mBAAmB,CAAC,qBAAqB,EAAE,gBAAgB,iBAkB1E;AAED,eAAO,MAAM,sBAAsB,kBAClB,gBAAgB,KAC9B,mBAYF,CAAC"}
|