thirdweb 5.79.0-nightly-0ddc1238073c2b7c3d876f79daa542363ec45c0b-20241216000407 → 5.79.1-nightly-a2a61df0293a29ba9855efea692681dbd530a2bd-20241219000346
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/contract/contract.js +10 -0
- package/dist/cjs/contract/contract.js.map +1 -1
- package/dist/cjs/gas/fee-data.js +1 -0
- package/dist/cjs/gas/fee-data.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/in-app/native/helpers/constants.js +1 -1
- package/dist/cjs/wallets/in-app/web/in-app.js +44 -12
- package/dist/cjs/wallets/in-app/web/in-app.js.map +1 -1
- package/dist/esm/contract/contract.js +10 -0
- package/dist/esm/contract/contract.js.map +1 -1
- package/dist/esm/gas/fee-data.js +1 -0
- package/dist/esm/gas/fee-data.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/in-app/native/helpers/constants.js +1 -1
- package/dist/esm/wallets/in-app/web/in-app.js +44 -12
- package/dist/esm/wallets/in-app/web/in-app.js.map +1 -1
- package/dist/types/contract/contract.d.ts.map +1 -1
- package/dist/types/gas/fee-data.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/native/helpers/constants.d.ts +1 -1
- package/dist/types/wallets/in-app/web/in-app.d.ts +44 -12
- package/dist/types/wallets/in-app/web/in-app.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/contract/contract.ts +16 -0
- package/src/gas/fee-data.ts +1 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/native/helpers/constants.ts +1 -1
- package/src/wallets/in-app/web/in-app.ts +44 -12
- package/src/wallets/smart/smart-wallet-dev.test.ts +2 -1
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getContract = getContract;
|
4
|
+
const address_js_1 = require("../utils/address.js");
|
4
5
|
/**
|
5
6
|
* Creates a Thirdweb contract by combining the Thirdweb client and contract options.
|
6
7
|
* @param options - The options for creating the contract.
|
@@ -22,6 +23,15 @@ exports.getContract = getContract;
|
|
22
23
|
* @contract
|
23
24
|
*/
|
24
25
|
function getContract(options) {
|
26
|
+
if (!options.client) {
|
27
|
+
throw new Error(`getContract validation error - invalid client: ${options.client}`);
|
28
|
+
}
|
29
|
+
if (!(0, address_js_1.isAddress)(options.address)) {
|
30
|
+
throw new Error(`getContract validation error - invalid address: ${options.address}`);
|
31
|
+
}
|
32
|
+
if (!options.chain || !options.chain.id) {
|
33
|
+
throw new Error(`getContract validation error - invalid chain: ${options.chain}`);
|
34
|
+
}
|
25
35
|
return options;
|
26
36
|
}
|
27
37
|
//# sourceMappingURL=contract.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/contract/contract.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/contract/contract.ts"],"names":[],"mappings":";;AA0CA,kCAmBC;AA1DD,oDAAgD;AAmBhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,WAAW,CACzB,OAA6B;IAE7B,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,kDAAkD,OAAO,CAAC,MAAM,EAAE,CACnE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,IAAA,sBAAS,EAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,mDAAmD,OAAO,CAAC,OAAO,EAAE,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,CAAC,KAAK,EAAE,CACjE,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/cjs/gas/fee-data.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fee-data.js","sourceRoot":"","sources":["../../../src/gas/fee-data.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"fee-data.js","sourceRoot":"","sources":["../../../src/gas/fee-data.ts"],"names":[],"mappings":";;AA8CA,sEAqDC;AAWD,wDAoBC;AAhID,oFAA8E;AAC9E,4FAAsF;AACtF,0CAA6C;AAE7C,0FAAkF;AAClF,gDAA4C;AAC5C,yDAAiD;AACjD,mEAAqD;AAmBrD,2DAA2D;AAC3D,MAAM,yBAAyB,GAAG;IAChC,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,gBAAgB;IACtB,GAAG,EAAE,gBAAgB;IACrB,IAAI,EAAE,gBAAgB;IACtB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,iBAAiB;IACtB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,gCAAgC;IACtC,UAAU,EAAE,mBAAmB;CAChC,CAAC;AAEF;;;GAGG;AACI,KAAK,UAAU,6BAA6B,CACjD,WAAgC;IAEhC,kCAAkC;IAClC,MAAM,CAAC,YAAY,EAAE,oBAAoB,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACvE,IAAA,gDAAoB,EAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAA,gDAAoB,EAAC,WAAW,CAAC,oBAAoB,CAAC;QACtD,IAAA,gDAAoB,EAAC,WAAW,CAAC,QAAQ,CAAC;KAC3C,CAAC,CAAC;IAEH,4DAA4D;IAC5D,IAAI,YAAY,KAAK,SAAS,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACrE,OAAO;YACL,YAAY;YACZ,oBAAoB;SACrB,CAAC;IACJ,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,O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D,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACvD,sEAAsE;QACtE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;QAC7C,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO,IAAA,kBAAO,EAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|
package/dist/cjs/version.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.version = void 0;
|
4
|
-
exports.version = "5.79.
|
4
|
+
exports.version = "5.79.1-nightly-a2a61df0293a29ba9855efea692681dbd530a2bd-20241219000346";
|
5
5
|
//# sourceMappingURL=version.js.map
|
@@ -16,7 +16,7 @@ const COGNITO_USER_POOL_ID = "us-west-2_UFwLcZIpq";
|
|
16
16
|
exports.COGNITO_IDENTITY_POOL_ID = "us-west-2:2ad7ab1e-f48b-48a6-adfa-ac1090689c26";
|
17
17
|
exports.GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V1 = "arn:aws:lambda:us-west-2:324457261097:function:recovery-share-password-GenerateRecoverySharePassw-bbE5ZbVAToil";
|
18
18
|
exports.GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V2 = "arn:aws:lambda:us-west-2:324457261097:function:lambda-thirdweb-auth-enc-key-prod-ThirdwebAuthEncKeyFunction";
|
19
|
-
exports.ENCLAVE_KMS_KEY_ARN = "arn:aws:kms:us-west-2:324457261097:key/
|
19
|
+
exports.ENCLAVE_KMS_KEY_ARN = "arn:aws:kms:us-west-2:324457261097:key/ccfb9ecd-f45d-4f37-864a-25fe72dcb49e";
|
20
20
|
// TODO allow overriding domain
|
21
21
|
const DOMAIN_URL_2023 = (0, domains_js_1.getThirdwebBaseUrl)("inAppWallet");
|
22
22
|
const BASE_URL_2023 = `${DOMAIN_URL_2023}/`;
|
@@ -28,6 +28,26 @@ const in_app_core_js_1 = require("../core/wallet/in-app-core.js");
|
|
28
28
|
*
|
29
29
|
* [View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure)
|
30
30
|
*
|
31
|
+
* ### Enable smart accounts and sponsor gas for your users:
|
32
|
+
*
|
33
|
+
* ```ts
|
34
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
35
|
+
* import { sepolia } from "thirdweb/chains";
|
36
|
+
*
|
37
|
+
* const wallet = inAppWallet({
|
38
|
+
* smartAccount: {
|
39
|
+
* chain: sepolia,
|
40
|
+
* sponsorGas: true,
|
41
|
+
* },
|
42
|
+
* });
|
43
|
+
*
|
44
|
+
* // account will be a smart account with sponsored gas enabled
|
45
|
+
* const account = await wallet.connect({
|
46
|
+
* client,
|
47
|
+
* strategy: "google",
|
48
|
+
* });
|
49
|
+
* ```
|
50
|
+
*
|
31
51
|
* ### Login with email
|
32
52
|
*
|
33
53
|
* ```ts
|
@@ -106,27 +126,38 @@ const in_app_core_js_1 = require("../core/wallet/in-app-core.js");
|
|
106
126
|
* });
|
107
127
|
* ```
|
108
128
|
*
|
109
|
-
* ###
|
110
|
-
*
|
129
|
+
* ### Connect to a guest account
|
111
130
|
* ```ts
|
112
131
|
* import { inAppWallet } from "thirdweb/wallets";
|
113
|
-
* import { sepolia } from "thirdweb/chains";
|
114
132
|
*
|
115
|
-
* const wallet = inAppWallet(
|
116
|
-
*
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
133
|
+
* const wallet = inAppWallet();
|
134
|
+
*
|
135
|
+
* const account = await wallet.connect({
|
136
|
+
* client,
|
137
|
+
* strategy: "guest",
|
120
138
|
* });
|
139
|
+
* ```
|
140
|
+
*
|
141
|
+
* ### Connect with custom JWT (any OIDC provider)
|
142
|
+
*
|
143
|
+
* You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
144
|
+
*
|
145
|
+
* ```ts
|
146
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
147
|
+
*
|
148
|
+
* const wallet = inAppWallet();
|
121
149
|
*
|
122
|
-
* // account will be a smart account with sponsored gas enabled
|
123
150
|
* const account = await wallet.connect({
|
124
151
|
* client,
|
125
|
-
* strategy: "
|
152
|
+
* strategy: "jwt",
|
153
|
+
* jwt: "your_jwt_here",
|
126
154
|
* });
|
127
155
|
* ```
|
128
156
|
*
|
129
|
-
* ### Connect
|
157
|
+
* ### Connect with custom endpoint
|
158
|
+
*
|
159
|
+
* You can also use your own endpoint to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
160
|
+
*
|
130
161
|
* ```ts
|
131
162
|
* import { inAppWallet } from "thirdweb/wallets";
|
132
163
|
*
|
@@ -134,7 +165,8 @@ const in_app_core_js_1 = require("../core/wallet/in-app-core.js");
|
|
134
165
|
*
|
135
166
|
* const account = await wallet.connect({
|
136
167
|
* client,
|
137
|
-
* strategy: "
|
168
|
+
* strategy: "auth_endpoint",
|
169
|
+
* payload: "your_auth_payload_here",
|
138
170
|
* });
|
139
171
|
* ```
|
140
172
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"in-app.js","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":";;
|
1
|
+
{"version":3,"file":"in-app.js","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":";;AAqNA,kCAaC;AA/ND,kEAAkE;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+MG;AACH,SAAgB,WAAW,CACzB,aAA4C;IAE5C,OAAO,IAAA,kCAAiB,EAAC;QACvB,aAAa;QACb,gBAAgB,EAAE,KAAK,EAAE,MAAsB,EAAE,EAAE;YACjD,MAAM,EAAE,iBAAiB,EAAE,GAAG,2CAAa,wBAAwB,EAAC,CAAC;YACrE,OAAO,IAAI,iBAAiB,CAAC;gBAC3B,MAAM;gBACN,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa;aAClD,CAAC,CAAC;QACL,CAAC;KACF,CAAoB,CAAC;AACxB,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { isAddress } from "../utils/address.js";
|
1
2
|
/**
|
2
3
|
* Creates a Thirdweb contract by combining the Thirdweb client and contract options.
|
3
4
|
* @param options - The options for creating the contract.
|
@@ -19,6 +20,15 @@
|
|
19
20
|
* @contract
|
20
21
|
*/
|
21
22
|
export function getContract(options) {
|
23
|
+
if (!options.client) {
|
24
|
+
throw new Error(`getContract validation error - invalid client: ${options.client}`);
|
25
|
+
}
|
26
|
+
if (!isAddress(options.address)) {
|
27
|
+
throw new Error(`getContract validation error - invalid address: ${options.address}`);
|
28
|
+
}
|
29
|
+
if (!options.chain || !options.chain.id) {
|
30
|
+
throw new Error(`getContract validation error - invalid chain: ${options.chain}`);
|
31
|
+
}
|
22
32
|
return options;
|
23
33
|
}
|
24
34
|
//# sourceMappingURL=contract.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/contract/contract.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../src/contract/contract.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAmBhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,WAAW,CACzB,OAA6B;IAE7B,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,kDAAkD,OAAO,CAAC,MAAM,EAAE,CACnE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,mDAAmD,OAAO,CAAC,OAAO,EAAE,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,CAAC,KAAK,EAAE,CACjE,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/esm/gas/fee-data.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fee-data.js","sourceRoot":"","sources":["../../../src/gas/fee-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAmBrD,2DAA2D;AAC3D,MAAM,yBAA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AoB;IAC5C,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,GAAG;YACN,OAAO,0CAA0C,CAAC;QACpD,KAAK,KAAK;YACR,OAAO,kDAAkD,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,MAAM,qBAAqB,GAAG,GAAG,CAAC,CAAC,UAAU;AAE7C;;;;GAIG;AACH,KAAK,UAAU,wBAAwB,CAAC,OAAoB;IAC1D,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACvD,sEAAsE;QACtE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;QAC7C,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|
package/dist/esm/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const version = "5.79.
|
1
|
+
export const version = "5.79.1-nightly-a2a61df0293a29ba9855efea692681dbd530a2bd-20241219000346";
|
2
2
|
//# sourceMappingURL=version.js.map
|
@@ -13,7 +13,7 @@ const COGNITO_USER_POOL_ID = "us-west-2_UFwLcZIpq";
|
|
13
13
|
export const COGNITO_IDENTITY_POOL_ID = "us-west-2:2ad7ab1e-f48b-48a6-adfa-ac1090689c26";
|
14
14
|
export const GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V1 = "arn:aws:lambda:us-west-2:324457261097:function:recovery-share-password-GenerateRecoverySharePassw-bbE5ZbVAToil";
|
15
15
|
export const GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V2 = "arn:aws:lambda:us-west-2:324457261097:function:lambda-thirdweb-auth-enc-key-prod-ThirdwebAuthEncKeyFunction";
|
16
|
-
export const ENCLAVE_KMS_KEY_ARN = "arn:aws:kms:us-west-2:324457261097:key/
|
16
|
+
export const ENCLAVE_KMS_KEY_ARN = "arn:aws:kms:us-west-2:324457261097:key/ccfb9ecd-f45d-4f37-864a-25fe72dcb49e";
|
17
17
|
// TODO allow overriding domain
|
18
18
|
const DOMAIN_URL_2023 = getThirdwebBaseUrl("inAppWallet");
|
19
19
|
const BASE_URL_2023 = `${DOMAIN_URL_2023}/`;
|
@@ -25,6 +25,26 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
|
|
25
25
|
*
|
26
26
|
* [View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure)
|
27
27
|
*
|
28
|
+
* ### Enable smart accounts and sponsor gas for your users:
|
29
|
+
*
|
30
|
+
* ```ts
|
31
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
32
|
+
* import { sepolia } from "thirdweb/chains";
|
33
|
+
*
|
34
|
+
* const wallet = inAppWallet({
|
35
|
+
* smartAccount: {
|
36
|
+
* chain: sepolia,
|
37
|
+
* sponsorGas: true,
|
38
|
+
* },
|
39
|
+
* });
|
40
|
+
*
|
41
|
+
* // account will be a smart account with sponsored gas enabled
|
42
|
+
* const account = await wallet.connect({
|
43
|
+
* client,
|
44
|
+
* strategy: "google",
|
45
|
+
* });
|
46
|
+
* ```
|
47
|
+
*
|
28
48
|
* ### Login with email
|
29
49
|
*
|
30
50
|
* ```ts
|
@@ -103,27 +123,38 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
|
|
103
123
|
* });
|
104
124
|
* ```
|
105
125
|
*
|
106
|
-
* ###
|
107
|
-
*
|
126
|
+
* ### Connect to a guest account
|
108
127
|
* ```ts
|
109
128
|
* import { inAppWallet } from "thirdweb/wallets";
|
110
|
-
* import { sepolia } from "thirdweb/chains";
|
111
129
|
*
|
112
|
-
* const wallet = inAppWallet(
|
113
|
-
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
130
|
+
* const wallet = inAppWallet();
|
131
|
+
*
|
132
|
+
* const account = await wallet.connect({
|
133
|
+
* client,
|
134
|
+
* strategy: "guest",
|
117
135
|
* });
|
136
|
+
* ```
|
137
|
+
*
|
138
|
+
* ### Connect with custom JWT (any OIDC provider)
|
139
|
+
*
|
140
|
+
* You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
141
|
+
*
|
142
|
+
* ```ts
|
143
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
144
|
+
*
|
145
|
+
* const wallet = inAppWallet();
|
118
146
|
*
|
119
|
-
* // account will be a smart account with sponsored gas enabled
|
120
147
|
* const account = await wallet.connect({
|
121
148
|
* client,
|
122
|
-
* strategy: "
|
149
|
+
* strategy: "jwt",
|
150
|
+
* jwt: "your_jwt_here",
|
123
151
|
* });
|
124
152
|
* ```
|
125
153
|
*
|
126
|
-
* ### Connect
|
154
|
+
* ### Connect with custom endpoint
|
155
|
+
*
|
156
|
+
* You can also use your own endpoint to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
157
|
+
*
|
127
158
|
* ```ts
|
128
159
|
* import { inAppWallet } from "thirdweb/wallets";
|
129
160
|
*
|
@@ -131,7 +162,8 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
|
|
131
162
|
*
|
132
163
|
* const account = await wallet.connect({
|
133
164
|
* client,
|
134
|
-
* strategy: "
|
165
|
+
* strategy: "auth_endpoint",
|
166
|
+
* payload: "your_auth_payload_here",
|
135
167
|
* });
|
136
168
|
* ```
|
137
169
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"in-app.js","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE
|
1
|
+
{"version":3,"file":"in-app.js","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+MG;AACH,MAAM,UAAU,WAAW,CACzB,aAA4C;IAE5C,OAAO,iBAAiB,CAAC;QACvB,aAAa;QACb,gBAAgB,EAAE,KAAK,EAAE,MAAsB,EAAE,EAAE;YACjD,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;YACrE,OAAO,IAAI,iBAAiB,CAAC;gBAC3B,MAAM;gBACN,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa;aAClD,CAAC,CAAC;QACL,CAAC;KACF,CAAoB,CAAC;AACxB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/contract/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/contract/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,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;
|
1
|
+
{"version":3,"file":"fee-data.d.ts","sourceRoot":"","sources":["../../../src/gas/fee-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAWjF,KAAK,aAAa,GACd;IACE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,GACD;IACE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,oBAAoB,CAAC,EAAE,KAAK,CAAC;CAC9B,CAAC;AAgBN;;;GAGG;AACH,wBAAsB,6BAA6B,CACjD,WAAW,EAAE,mBAAmB,GAC/B,OAAO,CAAC,aAAa,CAAC,CAmDxB;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,KAAK;;;;;;;;GAkBb"}
|
package/dist/types/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "5.79.
|
1
|
+
export declare const version = "5.79.1-nightly-a2a61df0293a29ba9855efea692681dbd530a2bd-20241219000346";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -8,7 +8,7 @@ export declare const THIRDWEB_SESSION_NONCE_HEADER = "x-session-nonce";
|
|
8
8
|
export declare const COGNITO_IDENTITY_POOL_ID = "us-west-2:2ad7ab1e-f48b-48a6-adfa-ac1090689c26";
|
9
9
|
export declare const GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V1 = "arn:aws:lambda:us-west-2:324457261097:function:recovery-share-password-GenerateRecoverySharePassw-bbE5ZbVAToil";
|
10
10
|
export declare const GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V2 = "arn:aws:lambda:us-west-2:324457261097:function:lambda-thirdweb-auth-enc-key-prod-ThirdwebAuthEncKeyFunction";
|
11
|
-
export declare const ENCLAVE_KMS_KEY_ARN = "arn:aws:kms:us-west-2:324457261097:key/
|
11
|
+
export declare const ENCLAVE_KMS_KEY_ARN = "arn:aws:kms:us-west-2:324457261097:key/ccfb9ecd-f45d-4f37-864a-25fe72dcb49e";
|
12
12
|
export declare const ROUTE_EMBEDDED_WALLET_DETAILS: string;
|
13
13
|
export declare const ROUTE_COGNITO_IDENTITY_POOL_URL = "cognito-idp.us-west-2.amazonaws.com/us-west-2_UFwLcZIpq";
|
14
14
|
export declare const ROUTE_STORE_USER_SHARES: string;
|
@@ -26,6 +26,26 @@ import type { CreateWalletArgs } from "../../wallet-types.js";
|
|
26
26
|
*
|
27
27
|
* [View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure)
|
28
28
|
*
|
29
|
+
* ### Enable smart accounts and sponsor gas for your users:
|
30
|
+
*
|
31
|
+
* ```ts
|
32
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
33
|
+
* import { sepolia } from "thirdweb/chains";
|
34
|
+
*
|
35
|
+
* const wallet = inAppWallet({
|
36
|
+
* smartAccount: {
|
37
|
+
* chain: sepolia,
|
38
|
+
* sponsorGas: true,
|
39
|
+
* },
|
40
|
+
* });
|
41
|
+
*
|
42
|
+
* // account will be a smart account with sponsored gas enabled
|
43
|
+
* const account = await wallet.connect({
|
44
|
+
* client,
|
45
|
+
* strategy: "google",
|
46
|
+
* });
|
47
|
+
* ```
|
48
|
+
*
|
29
49
|
* ### Login with email
|
30
50
|
*
|
31
51
|
* ```ts
|
@@ -104,27 +124,38 @@ import type { CreateWalletArgs } from "../../wallet-types.js";
|
|
104
124
|
* });
|
105
125
|
* ```
|
106
126
|
*
|
107
|
-
* ###
|
108
|
-
*
|
127
|
+
* ### Connect to a guest account
|
109
128
|
* ```ts
|
110
129
|
* import { inAppWallet } from "thirdweb/wallets";
|
111
|
-
* import { sepolia } from "thirdweb/chains";
|
112
130
|
*
|
113
|
-
* const wallet = inAppWallet(
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
*
|
131
|
+
* const wallet = inAppWallet();
|
132
|
+
*
|
133
|
+
* const account = await wallet.connect({
|
134
|
+
* client,
|
135
|
+
* strategy: "guest",
|
118
136
|
* });
|
137
|
+
* ```
|
138
|
+
*
|
139
|
+
* ### Connect with custom JWT (any OIDC provider)
|
140
|
+
*
|
141
|
+
* You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
142
|
+
*
|
143
|
+
* ```ts
|
144
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
145
|
+
*
|
146
|
+
* const wallet = inAppWallet();
|
119
147
|
*
|
120
|
-
* // account will be a smart account with sponsored gas enabled
|
121
148
|
* const account = await wallet.connect({
|
122
149
|
* client,
|
123
|
-
* strategy: "
|
150
|
+
* strategy: "jwt",
|
151
|
+
* jwt: "your_jwt_here",
|
124
152
|
* });
|
125
153
|
* ```
|
126
154
|
*
|
127
|
-
* ### Connect
|
155
|
+
* ### Connect with custom endpoint
|
156
|
+
*
|
157
|
+
* You can also use your own endpoint to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
158
|
+
*
|
128
159
|
* ```ts
|
129
160
|
* import { inAppWallet } from "thirdweb/wallets";
|
130
161
|
*
|
@@ -132,7 +163,8 @@ import type { CreateWalletArgs } from "../../wallet-types.js";
|
|
132
163
|
*
|
133
164
|
* const account = await wallet.connect({
|
134
165
|
* client,
|
135
|
-
* strategy: "
|
166
|
+
* strategy: "auth_endpoint",
|
167
|
+
* payload: "your_auth_payload_here",
|
136
168
|
* });
|
137
169
|
* ```
|
138
170
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"in-app.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D
|
1
|
+
{"version":3,"file":"in-app.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/in-app/web/in-app.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+MG;AACH,wBAAgB,WAAW,CACzB,aAAa,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAC3C,MAAM,CAAC,OAAO,CAAC,CAWjB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "thirdweb",
|
3
|
-
"version": "5.79.
|
3
|
+
"version": "5.79.1-nightly-a2a61df0293a29ba9855efea692681dbd530a2bd-20241219000346",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
@@ -206,20 +206,20 @@
|
|
206
206
|
"@noble/curves": "1.7.0",
|
207
207
|
"@noble/hashes": "1.6.1",
|
208
208
|
"@passwordless-id/webauthn": "^2.1.2",
|
209
|
-
"@radix-ui/react-dialog": "1.1.
|
210
|
-
"@radix-ui/react-focus-scope": "1.1.
|
209
|
+
"@radix-ui/react-dialog": "1.1.3",
|
210
|
+
"@radix-ui/react-focus-scope": "1.1.1",
|
211
211
|
"@radix-ui/react-icons": "1.3.2",
|
212
|
-
"@radix-ui/react-tooltip": "1.1.
|
212
|
+
"@radix-ui/react-tooltip": "1.1.5",
|
213
213
|
"@tanstack/react-query": "5.62.7",
|
214
|
-
"@walletconnect/ethereum-provider": "2.17.
|
215
|
-
"@walletconnect/sign-client": "2.17.
|
214
|
+
"@walletconnect/ethereum-provider": "2.17.3",
|
215
|
+
"@walletconnect/sign-client": "2.17.3",
|
216
216
|
"abitype": "1.0.7",
|
217
217
|
"fuse.js": "7.0.0",
|
218
218
|
"input-otp": "^1.4.1",
|
219
219
|
"mipd": "0.0.7",
|
220
|
-
"ox": "0.4.
|
220
|
+
"ox": "0.4.2",
|
221
221
|
"uqr": "0.1.2",
|
222
|
-
"viem": "2.21.
|
222
|
+
"viem": "2.21.55"
|
223
223
|
},
|
224
224
|
"peerDependencies": {
|
225
225
|
"@aws-sdk/client-lambda": "^3",
|
@@ -292,9 +292,9 @@
|
|
292
292
|
"node": ">=18"
|
293
293
|
},
|
294
294
|
"devDependencies": {
|
295
|
-
"@aws-sdk/client-kms": "3.
|
296
|
-
"@aws-sdk/client-lambda": "3.
|
297
|
-
"@aws-sdk/credential-providers": "3.
|
295
|
+
"@aws-sdk/client-kms": "3.592.0",
|
296
|
+
"@aws-sdk/client-lambda": "3.592.0",
|
297
|
+
"@aws-sdk/credential-providers": "3.592.0",
|
298
298
|
"@biomejs/biome": "1.9.4",
|
299
299
|
"@chromatic-com/storybook": "3.2.2",
|
300
300
|
"@codspeed/vitest-plugin": "4.0.0",
|
@@ -325,8 +325,8 @@
|
|
325
325
|
"expo-linking": "7.0.3",
|
326
326
|
"expo-web-browser": "14.0.1",
|
327
327
|
"happy-dom": "15.11.7",
|
328
|
-
"knip": "5.
|
329
|
-
"msw": "2.6.
|
328
|
+
"knip": "5.41.0",
|
329
|
+
"msw": "2.6.9",
|
330
330
|
"prettier": "3.3.3",
|
331
331
|
"react": "19.0.0",
|
332
332
|
"react-dom": "19.0.0",
|
@@ -339,7 +339,7 @@
|
|
339
339
|
"sharp": "^0.33.5",
|
340
340
|
"size-limit": "11.1.6",
|
341
341
|
"storybook": "8.4.7",
|
342
|
-
"typedoc": "0.27.
|
342
|
+
"typedoc": "0.27.5",
|
343
343
|
"typedoc-better-json": "0.9.4",
|
344
344
|
"typescript": "5.7.2",
|
345
345
|
"vite": "6.0.3",
|
package/src/contract/contract.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { Abi } from "abitype";
|
2
2
|
import type { Chain } from "../chains/types.js";
|
3
3
|
import type { ThirdwebClient } from "../client/client.js";
|
4
|
+
import { isAddress } from "../utils/address.js";
|
4
5
|
|
5
6
|
/**
|
6
7
|
* @contract
|
@@ -42,5 +43,20 @@ export type ThirdwebContract<abi extends Abi = []> = Readonly<
|
|
42
43
|
export function getContract<const abi extends Abi = []>(
|
43
44
|
options: ContractOptions<abi>,
|
44
45
|
): ThirdwebContract<abi> {
|
46
|
+
if (!options.client) {
|
47
|
+
throw new Error(
|
48
|
+
`getContract validation error - invalid client: ${options.client}`,
|
49
|
+
);
|
50
|
+
}
|
51
|
+
if (!isAddress(options.address)) {
|
52
|
+
throw new Error(
|
53
|
+
`getContract validation error - invalid address: ${options.address}`,
|
54
|
+
);
|
55
|
+
}
|
56
|
+
if (!options.chain || !options.chain.id) {
|
57
|
+
throw new Error(
|
58
|
+
`getContract validation error - invalid chain: ${options.chain}`,
|
59
|
+
);
|
60
|
+
}
|
45
61
|
return options;
|
46
62
|
}
|
package/src/gas/fee-data.ts
CHANGED
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.79.
|
1
|
+
export const version = "5.79.1-nightly-a2a61df0293a29ba9855efea692681dbd530a2bd-20241219000346";
|
@@ -23,7 +23,7 @@ export const GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V1 =
|
|
23
23
|
export const GENERATE_RECOVERY_PASSWORD_LAMBDA_FUNCTION_V2 =
|
24
24
|
"arn:aws:lambda:us-west-2:324457261097:function:lambda-thirdweb-auth-enc-key-prod-ThirdwebAuthEncKeyFunction";
|
25
25
|
export const ENCLAVE_KMS_KEY_ARN =
|
26
|
-
"arn:aws:kms:us-west-2:324457261097:key/
|
26
|
+
"arn:aws:kms:us-west-2:324457261097:key/ccfb9ecd-f45d-4f37-864a-25fe72dcb49e";
|
27
27
|
|
28
28
|
// TODO allow overriding domain
|
29
29
|
const DOMAIN_URL_2023 = getThirdwebBaseUrl("inAppWallet");
|
@@ -29,6 +29,26 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
|
|
29
29
|
*
|
30
30
|
* [View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure)
|
31
31
|
*
|
32
|
+
* ### Enable smart accounts and sponsor gas for your users:
|
33
|
+
*
|
34
|
+
* ```ts
|
35
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
36
|
+
* import { sepolia } from "thirdweb/chains";
|
37
|
+
*
|
38
|
+
* const wallet = inAppWallet({
|
39
|
+
* smartAccount: {
|
40
|
+
* chain: sepolia,
|
41
|
+
* sponsorGas: true,
|
42
|
+
* },
|
43
|
+
* });
|
44
|
+
*
|
45
|
+
* // account will be a smart account with sponsored gas enabled
|
46
|
+
* const account = await wallet.connect({
|
47
|
+
* client,
|
48
|
+
* strategy: "google",
|
49
|
+
* });
|
50
|
+
* ```
|
51
|
+
*
|
32
52
|
* ### Login with email
|
33
53
|
*
|
34
54
|
* ```ts
|
@@ -107,27 +127,38 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
|
|
107
127
|
* });
|
108
128
|
* ```
|
109
129
|
*
|
110
|
-
* ###
|
111
|
-
*
|
130
|
+
* ### Connect to a guest account
|
112
131
|
* ```ts
|
113
132
|
* import { inAppWallet } from "thirdweb/wallets";
|
114
|
-
* import { sepolia } from "thirdweb/chains";
|
115
133
|
*
|
116
|
-
* const wallet = inAppWallet(
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
*
|
134
|
+
* const wallet = inAppWallet();
|
135
|
+
*
|
136
|
+
* const account = await wallet.connect({
|
137
|
+
* client,
|
138
|
+
* strategy: "guest",
|
121
139
|
* });
|
140
|
+
* ```
|
141
|
+
*
|
142
|
+
* ### Connect with custom JWT (any OIDC provider)
|
143
|
+
*
|
144
|
+
* You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
145
|
+
*
|
146
|
+
* ```ts
|
147
|
+
* import { inAppWallet } from "thirdweb/wallets";
|
148
|
+
*
|
149
|
+
* const wallet = inAppWallet();
|
122
150
|
*
|
123
|
-
* // account will be a smart account with sponsored gas enabled
|
124
151
|
* const account = await wallet.connect({
|
125
152
|
* client,
|
126
|
-
* strategy: "
|
153
|
+
* strategy: "jwt",
|
154
|
+
* jwt: "your_jwt_here",
|
127
155
|
* });
|
128
156
|
* ```
|
129
157
|
*
|
130
|
-
* ### Connect
|
158
|
+
* ### Connect with custom endpoint
|
159
|
+
*
|
160
|
+
* You can also use your own endpoint to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings.
|
161
|
+
*
|
131
162
|
* ```ts
|
132
163
|
* import { inAppWallet } from "thirdweb/wallets";
|
133
164
|
*
|
@@ -135,7 +166,8 @@ import { createInAppWallet } from "../core/wallet/in-app-core.js";
|
|
135
166
|
*
|
136
167
|
* const account = await wallet.connect({
|
137
168
|
* client,
|
138
|
-
* strategy: "
|
169
|
+
* strategy: "auth_endpoint",
|
170
|
+
* payload: "your_auth_payload_here",
|
139
171
|
* });
|
140
172
|
* ```
|
141
173
|
*
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { beforeAll, describe, expect, it } from "vitest";
|
2
2
|
import { TEST_CLIENT } from "../../../test/src/test-clients.js";
|
3
|
-
import { arbitrumSepolia } from "../../chains/chain-definitions/arbitrum.js";
|
3
|
+
import { arbitrumSepolia } from "../../chains/chain-definitions/arbitrum-sepolia.js";
|
4
4
|
import { type ThirdwebContract, getContract } from "../../contract/contract.js";
|
5
5
|
import { balanceOf } from "../../extensions/erc1155/__generated__/IERC1155/read/balanceOf.js";
|
6
6
|
import { claimTo } from "../../extensions/erc1155/drops/write/claimTo.js";
|
@@ -14,6 +14,7 @@ import type { Account, Wallet } from "../interfaces/wallet.js";
|
|
14
14
|
import { generateAccount } from "../utils/generateAccount.js";
|
15
15
|
import { smartWallet } from "./smart-wallet.js";
|
16
16
|
let wallet: Wallet;
|
17
|
+
|
17
18
|
let smartAccount: Account;
|
18
19
|
let smartWalletAddress: Address;
|
19
20
|
let personalAccount: Account;
|