@crossmint/wallets-sdk 0.18.6 → 0.18.8
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/api/client.cjs +4 -4
- package/dist/api/client.js +3 -3
- package/dist/api/gen/types.gen.d.cts +35 -35
- package/dist/api/gen/types.gen.d.ts +35 -35
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.js +3 -3
- package/dist/chains/chains.cjs +3 -2
- package/dist/chains/chains.d.cts +1 -1
- package/dist/chains/chains.d.ts +1 -1
- package/dist/chains/chains.js +2 -1
- package/dist/chains/definitions/arcTestnet.cjs +7 -0
- package/dist/chains/definitions/arcTestnet.d.cts +43 -0
- package/dist/chains/definitions/arcTestnet.d.ts +43 -0
- package/dist/chains/definitions/arcTestnet.js +7 -0
- package/dist/{chunk-GNF2U7IX.cjs → chunk-2JCKWYGA.cjs} +7 -7
- package/dist/{chunk-5BP6CVYY.cjs → chunk-3LKDNHF5.cjs} +6 -6
- package/dist/{chunk-S5YXROL6.js → chunk-3ZIQQ4PW.js} +3 -3
- package/dist/{chunk-LHYSCUKJ.cjs → chunk-4CPLMKRO.cjs} +1 -1
- package/dist/{chunk-UKBWSQ7R.js → chunk-4NHVYWZC.js} +2 -2
- package/dist/{chunk-LKAO2MV2.cjs → chunk-5BSYP2R3.cjs} +3 -3
- package/dist/{chunk-CN2GVFBU.cjs → chunk-6QEK7D2B.cjs} +7 -1
- package/dist/{chunk-E3OS753T.js → chunk-7L5EEVWT.js} +2 -2
- package/dist/{chunk-WQVJM3PG.js → chunk-ASJVZCHA.js} +1 -1
- package/dist/{chunk-UMGB3Q7I.cjs → chunk-BQF3R3BC.cjs} +4 -4
- package/dist/{chunk-TK3EUCQ4.cjs → chunk-BRNT3DZP.cjs} +8 -1
- package/dist/{chunk-B6JOIWRH.cjs → chunk-EAMPCH35.cjs} +11 -16
- package/dist/{chunk-34FDYDOM.cjs → chunk-FWC2WXFN.cjs} +4 -4
- package/dist/{chunk-454RYNSZ.js → chunk-HNISEOCV.js} +1 -1
- package/dist/chunk-HTSQPZHW.cjs +25 -0
- package/dist/{chunk-5YR2ILEW.js → chunk-K5HDSLUV.js} +3 -3
- package/dist/{chunk-HYKMSBCT.cjs → chunk-LLDPJU6L.cjs} +3 -3
- package/dist/{chunk-F6E3ZDRG.cjs → chunk-M4JBQNOI.cjs} +6 -6
- package/dist/{chunk-GQIZWD4F.cjs → chunk-N3RG7OZW.cjs} +14 -14
- package/dist/{chunk-CL44FTXR.js → chunk-NUOU3SCU.js} +12 -17
- package/dist/{chunk-G3LEJR3P.cjs → chunk-PCFXTJL4.cjs} +3 -3
- package/dist/{chunk-KS63YEQ4.js → chunk-PROOTUIO.js} +7 -1
- package/dist/{chunk-IVNYZDI5.cjs → chunk-SD7I7CQ4.cjs} +3 -3
- package/dist/{chunk-6G7ZWCCG.js → chunk-SXR4KWXS.js} +2 -2
- package/dist/{chunk-K3HFAPSV.js → chunk-TR2CW644.js} +1 -1
- package/dist/{chunk-OKXSUK63.js → chunk-V2DJ5TIR.js} +1 -1
- package/dist/{chunk-7JFVG4IY.js → chunk-V3FETRWW.js} +8 -1
- package/dist/{chunk-RAWKXOHR.js → chunk-VRMQGFQX.js} +1 -1
- package/dist/{chunk-LGONZW4W.cjs → chunk-Y24JAHPT.cjs} +5 -5
- package/dist/{chunk-GLRDLJS5.js → chunk-YSDATSFB.js} +1 -1
- package/dist/chunk-ZBLW42YE.js +25 -0
- package/dist/{chunk-ZZJ7U5G3.cjs → chunk-ZBW2YHQZ.cjs} +12 -12
- package/dist/{chunk-TOHXQVLS.js → chunk-ZFFB4RDK.js} +3 -3
- package/dist/{chunk-XRA5GFH3.js → chunk-ZPH2YLZO.js} +1 -1
- package/dist/index.cjs +18 -17
- package/dist/index.js +17 -16
- package/dist/logger/index.cjs +3 -3
- package/dist/logger/index.js +2 -2
- package/dist/logger/init.cjs +3 -3
- package/dist/logger/init.js +2 -2
- package/dist/sdk.cjs +13 -13
- package/dist/sdk.js +12 -12
- package/dist/signers/index.cjs +7 -7
- package/dist/signers/index.js +6 -6
- package/dist/signers/non-custodial/index.cjs +6 -6
- package/dist/signers/non-custodial/index.js +5 -5
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-evm-signer.js +3 -3
- package/dist/signers/non-custodial/ncs-iframe-manager.cjs +2 -2
- package/dist/signers/non-custodial/ncs-iframe-manager.js +1 -1
- package/dist/signers/non-custodial/ncs-signer.cjs +3 -3
- package/dist/signers/non-custodial/ncs-signer.d.cts +0 -1
- package/dist/signers/non-custodial/ncs-signer.d.ts +0 -1
- package/dist/signers/non-custodial/ncs-signer.js +2 -2
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-solana-signer.js +3 -3
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-stellar-signer.js +3 -3
- package/dist/utils/constants.cjs +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/evm.cjs +11 -10
- package/dist/wallets/evm.js +10 -9
- package/dist/wallets/solana.cjs +9 -9
- package/dist/wallets/solana.js +8 -8
- package/dist/wallets/stellar.cjs +9 -9
- package/dist/wallets/stellar.js +8 -8
- package/dist/wallets/wallet-factory.cjs +11 -11
- package/dist/wallets/wallet-factory.js +10 -10
- package/dist/wallets/wallet.cjs +8 -8
- package/dist/wallets/wallet.js +7 -7
- package/package.json +3 -3
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
var _chunkRBHGZDDXcjs = require('./chunk-RBHGZDDX.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkY24JAHPTcjs = require('./chunk-Y24JAHPT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk3LKDNHF5cjs = require('./chunk-3LKDNHF5.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkPCFXTJL4cjs = require('./chunk-PCFXTJL4.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -35,19 +35,19 @@ var WalletFactory = class {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
const locator = this.getWalletLocator(args);
|
|
38
|
-
|
|
38
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.getOrCreate.start", {
|
|
39
39
|
chain: args.chain,
|
|
40
40
|
signerType: args.signer.type
|
|
41
41
|
});
|
|
42
42
|
const existingWallet = yield this.apiClient.getWallet(locator);
|
|
43
43
|
if (existingWallet != null && !("error" in existingWallet)) {
|
|
44
|
-
|
|
44
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.getOrCreate.existing", {
|
|
45
45
|
chain: args.chain,
|
|
46
46
|
address: existingWallet.address
|
|
47
47
|
});
|
|
48
48
|
return this.createWalletInstance(existingWallet, args);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.getOrCreate.creating", {
|
|
51
51
|
chain: args.chain
|
|
52
52
|
});
|
|
53
53
|
return this.createWallet(args);
|
|
@@ -58,19 +58,19 @@ var WalletFactory = class {
|
|
|
58
58
|
if (!this.apiClient.isServerSide) {
|
|
59
59
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)("getWallet is not supported on client side, use getOrCreateWallet instead");
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.get.start", {
|
|
62
62
|
walletLocator,
|
|
63
63
|
chain: args.chain
|
|
64
64
|
});
|
|
65
65
|
const existingWallet = yield this.apiClient.getWallet(walletLocator);
|
|
66
66
|
if ("error" in existingWallet) {
|
|
67
|
-
|
|
67
|
+
_chunkPCFXTJL4cjs.walletsLogger.warn("wallet.get.notFound", {
|
|
68
68
|
walletLocator,
|
|
69
69
|
error: existingWallet.error
|
|
70
70
|
});
|
|
71
71
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(existingWallet));
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.get.success", {
|
|
74
74
|
walletLocator,
|
|
75
75
|
address: existingWallet.address
|
|
76
76
|
});
|
|
@@ -81,7 +81,7 @@ var WalletFactory = class {
|
|
|
81
81
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
|
|
82
82
|
var _a, _b, _c, _d, _e;
|
|
83
83
|
yield (_c = (_b = (_a = args.options) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onWalletCreationStart) == null ? void 0 : _c.call(_b);
|
|
84
|
-
|
|
84
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.create.start", {
|
|
85
85
|
chain: args.chain,
|
|
86
86
|
signerType: args.signer.type
|
|
87
87
|
});
|
|
@@ -97,13 +97,13 @@ var WalletFactory = class {
|
|
|
97
97
|
alias: (_e = args.alias) != null ? _e : void 0
|
|
98
98
|
});
|
|
99
99
|
if ("error" in walletResponse) {
|
|
100
|
-
|
|
100
|
+
_chunkPCFXTJL4cjs.walletsLogger.error("wallet.create.error", {
|
|
101
101
|
chain: args.chain,
|
|
102
102
|
error: walletResponse.error
|
|
103
103
|
});
|
|
104
104
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(JSON.stringify(walletResponse));
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallet.create.success", {
|
|
107
107
|
chain: args.chain,
|
|
108
108
|
address: walletResponse.address
|
|
109
109
|
});
|
|
@@ -113,12 +113,12 @@ var WalletFactory = class {
|
|
|
113
113
|
createWalletInstance(walletResponse, args) {
|
|
114
114
|
this.validateExistingWalletConfig(walletResponse, args);
|
|
115
115
|
const signerConfig = this.toInternalSignerConfig(walletResponse, args.signer, args.options);
|
|
116
|
-
return new (0,
|
|
116
|
+
return new (0, _chunkY24JAHPTcjs.Wallet)(
|
|
117
117
|
{
|
|
118
118
|
chain: args.chain,
|
|
119
119
|
address: walletResponse.address,
|
|
120
120
|
owner: walletResponse.owner,
|
|
121
|
-
signer:
|
|
121
|
+
signer: _chunk3LKDNHF5cjs.assembleSigner.call(void 0, args.chain, signerConfig),
|
|
122
122
|
options: args.options,
|
|
123
123
|
alias: args.alias
|
|
124
124
|
},
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NcsIframeManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V3FETRWW.js";
|
|
4
4
|
import {
|
|
5
5
|
AuthRejectedError
|
|
6
6
|
} from "./chunk-WJUPOCKJ.js";
|
|
7
7
|
import {
|
|
8
|
-
__async
|
|
9
|
-
__spreadProps,
|
|
10
|
-
__spreadValues
|
|
8
|
+
__async
|
|
11
9
|
} from "./chunk-FPMW7Q5O.js";
|
|
12
10
|
|
|
13
11
|
// src/signers/non-custodial/ncs-signer.ts
|
|
@@ -36,7 +34,9 @@ var NonCustodialSigner = class {
|
|
|
36
34
|
if (!parsedAPIKey.isValid) {
|
|
37
35
|
throw new Error("Invalid API key");
|
|
38
36
|
}
|
|
39
|
-
const iframeManager = new NcsIframeManager({
|
|
37
|
+
const iframeManager = new NcsIframeManager({
|
|
38
|
+
environment: parsedAPIKey.environment
|
|
39
|
+
});
|
|
40
40
|
this.config.clientTEEConnection = yield iframeManager.initialize();
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -65,7 +65,9 @@ var NonCustodialSigner = class {
|
|
|
65
65
|
if (!parsedAPIKey.isValid) {
|
|
66
66
|
throw new Error("Invalid API key");
|
|
67
67
|
}
|
|
68
|
-
const iframeManager = new NcsIframeManager({
|
|
68
|
+
const iframeManager = new NcsIframeManager({
|
|
69
|
+
environment: parsedAPIKey.environment
|
|
70
|
+
});
|
|
69
71
|
this.config.clientTEEConnection = yield iframeManager.initialize();
|
|
70
72
|
if (this.config.clientTEEConnection == null) {
|
|
71
73
|
throw new Error("Failed to initialize TEE connection");
|
|
@@ -91,9 +93,7 @@ var NonCustodialSigner = class {
|
|
|
91
93
|
apiKey: this.config.crossmint.apiKey
|
|
92
94
|
}
|
|
93
95
|
},
|
|
94
|
-
options:
|
|
95
|
-
maxRetries: 5
|
|
96
|
-
})
|
|
96
|
+
options: DEFAULT_EVENT_OPTIONS
|
|
97
97
|
});
|
|
98
98
|
if ((signerResponse == null ? void 0 : signerResponse.status) !== "success") {
|
|
99
99
|
throw new Error(signerResponse == null ? void 0 : signerResponse.error);
|
|
@@ -176,9 +176,7 @@ var NonCustodialSigner = class {
|
|
|
176
176
|
},
|
|
177
177
|
data: { authId }
|
|
178
178
|
},
|
|
179
|
-
options:
|
|
180
|
-
maxRetries: 3
|
|
181
|
-
})
|
|
179
|
+
options: DEFAULT_EVENT_OPTIONS
|
|
182
180
|
});
|
|
183
181
|
if ((response == null ? void 0 : response.status) === "success" && response.signerStatus === "ready") {
|
|
184
182
|
this._needsAuth = false;
|
|
@@ -214,9 +212,7 @@ var NonCustodialSigner = class {
|
|
|
214
212
|
onboardingAuthentication: { encryptedOtp }
|
|
215
213
|
}
|
|
216
214
|
},
|
|
217
|
-
options:
|
|
218
|
-
maxRetries: 3
|
|
219
|
-
})
|
|
215
|
+
options: DEFAULT_EVENT_OPTIONS
|
|
220
216
|
});
|
|
221
217
|
} catch (err) {
|
|
222
218
|
console.error("[verifyOtp] Error sending OTP validation request:", err);
|
|
@@ -279,8 +275,7 @@ var NonCustodialSigner = class {
|
|
|
279
275
|
}
|
|
280
276
|
};
|
|
281
277
|
var DEFAULT_EVENT_OPTIONS = {
|
|
282
|
-
timeoutMs:
|
|
283
|
-
intervalMs: 5e3
|
|
278
|
+
timeoutMs: 3e4
|
|
284
279
|
};
|
|
285
280
|
|
|
286
281
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4CPLMKROcjs = require('./chunk-4CPLMKRO.cjs');
|
|
5
5
|
|
|
6
6
|
// src/logger/init.ts
|
|
7
7
|
|
|
@@ -21,8 +21,8 @@ function initWalletsLogger(apiKey) {
|
|
|
21
21
|
}
|
|
22
22
|
const { environment, projectId } = validationResult;
|
|
23
23
|
walletsLogger.init({
|
|
24
|
-
packageName:
|
|
25
|
-
packageVersion:
|
|
24
|
+
packageName: _chunk4CPLMKROcjs.SDK_NAME,
|
|
25
|
+
packageVersion: _chunk4CPLMKROcjs.SDK_VERSION,
|
|
26
26
|
environment,
|
|
27
27
|
projectId,
|
|
28
28
|
platform
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
storyTestnet
|
|
6
6
|
} from "./chunk-3U6UAYOV.js";
|
|
7
|
+
import {
|
|
8
|
+
arcTestnet
|
|
9
|
+
} from "./chunk-ZBLW42YE.js";
|
|
7
10
|
|
|
8
11
|
// src/chains/chains.ts
|
|
9
12
|
import { BlockchainIncludingTestnet as Blockchain } from "@crossmint/common-sdk-base";
|
|
@@ -45,7 +48,8 @@ var TESTNET_AA_CHAINS = [
|
|
|
45
48
|
Blockchain.SEI_ATLANTIC_2_TESTNET,
|
|
46
49
|
Blockchain.STORY_TESTNET,
|
|
47
50
|
Blockchain.WORLD_CHAIN_SEPOLIA,
|
|
48
|
-
Blockchain.ZORA_SEPOLIA
|
|
51
|
+
Blockchain.ZORA_SEPOLIA,
|
|
52
|
+
Blockchain.ARC_TESTNET
|
|
49
53
|
];
|
|
50
54
|
var PRODUCTION_AA_CHAINS = [
|
|
51
55
|
Blockchain.ABSTRACT,
|
|
@@ -113,6 +117,8 @@ function toViemChain(chain) {
|
|
|
113
117
|
return plumeTestnet;
|
|
114
118
|
case Blockchain.PLUME:
|
|
115
119
|
return plume;
|
|
120
|
+
case Blockchain.ARC_TESTNET:
|
|
121
|
+
return arcTestnet;
|
|
116
122
|
case Blockchain.ABSTRACT:
|
|
117
123
|
case Blockchain.ABSTRACT_TESTNET:
|
|
118
124
|
case Blockchain.APECHAIN:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkEAMPCH35cjs = require('./chunk-EAMPCH35.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
|
|
8
8
|
|
|
9
9
|
// src/signers/non-custodial/ncs-stellar-signer.ts
|
|
10
|
-
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends
|
|
10
|
+
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkEAMPCH35cjs.NonCustodialSigner {
|
|
11
11
|
constructor(config) {
|
|
12
12
|
super(config);
|
|
13
13
|
}
|
|
@@ -35,7 +35,7 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkB
|
|
|
35
35
|
encoding: "base64"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
options:
|
|
38
|
+
options: _chunkEAMPCH35cjs.DEFAULT_EVENT_OPTIONS
|
|
39
39
|
});
|
|
40
40
|
if ((res == null ? void 0 : res.status) === "error") {
|
|
41
41
|
throw new Error(res.error);
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-SGINWAB6.js";
|
|
4
4
|
import {
|
|
5
5
|
walletsLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VRMQGFQX.js";
|
|
7
7
|
import {
|
|
8
8
|
SDK_NAME,
|
|
9
9
|
SDK_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ASJVZCHA.js";
|
|
11
11
|
import {
|
|
12
12
|
__async
|
|
13
13
|
} from "./chunk-FPMW7Q5O.js";
|
|
@@ -15,6 +15,8 @@ var NcsIframeManager = class {
|
|
|
15
15
|
if (this.handshakeParent) {
|
|
16
16
|
return this.handshakeParent;
|
|
17
17
|
}
|
|
18
|
+
console.info("Initializing signers frame for the first time");
|
|
19
|
+
const t0 = Date.now();
|
|
18
20
|
const iframeUrl = new URL(environmentUrlConfig[this.config.environment]);
|
|
19
21
|
iframeUrl.searchParams.set("targetOrigin", window.location.origin);
|
|
20
22
|
const iframeElement = yield this.createInvisibleIFrame(iframeUrl.toString());
|
|
@@ -23,11 +25,16 @@ var NcsIframeManager = class {
|
|
|
23
25
|
{
|
|
24
26
|
targetOrigin: iframeUrl.origin,
|
|
25
27
|
incomingEvents: signerOutboundEvents,
|
|
26
|
-
outgoingEvents: signerInboundEvents
|
|
28
|
+
outgoingEvents: signerInboundEvents,
|
|
29
|
+
handshakeOptions: {
|
|
30
|
+
timeoutMs: 3e4,
|
|
31
|
+
intervalMs: 100
|
|
32
|
+
}
|
|
27
33
|
},
|
|
28
34
|
SignersWindowTransport
|
|
29
35
|
);
|
|
30
36
|
yield this.handshakeParent.handshakeWithChild();
|
|
37
|
+
console.info(`Signers frame initialized in ${Date.now() - t0}ms`);
|
|
31
38
|
return this.handshakeParent;
|
|
32
39
|
});
|
|
33
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEAMPCH35cjs = require('./chunk-EAMPCH35.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ var _chunkB6JOIWRHcjs = require('./chunk-B6JOIWRH.cjs');
|
|
|
18
18
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk4CPLMKROcjs = require('./chunk-4CPLMKRO.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -394,7 +394,7 @@ var Wallet = class {
|
|
|
394
394
|
}
|
|
395
395
|
preAuthIfNeeded() {
|
|
396
396
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
|
|
397
|
-
if (this.signer instanceof
|
|
397
|
+
if (this.signer instanceof _chunkEAMPCH35cjs.NonCustodialSigner) {
|
|
398
398
|
yield this.signer.ensureAuthenticated();
|
|
399
399
|
}
|
|
400
400
|
});
|
|
@@ -525,7 +525,7 @@ var Wallet = class {
|
|
|
525
525
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
|
|
526
526
|
let signatureResponse = null;
|
|
527
527
|
do {
|
|
528
|
-
yield new Promise((resolve) => setTimeout(resolve,
|
|
528
|
+
yield new Promise((resolve) => setTimeout(resolve, _chunk4CPLMKROcjs.STATUS_POLLING_INTERVAL_MS));
|
|
529
529
|
signatureResponse = yield _chunkG5NYLGM5cjs.__privateGet.call(void 0, this, _apiClient).getSignature(this.walletLocator, signatureId);
|
|
530
530
|
if ("error" in signatureResponse) {
|
|
531
531
|
throw new (0, _chunkXC2V34TScjs.SignatureNotAvailableError)(JSON.stringify(signatureResponse));
|
|
@@ -547,7 +547,7 @@ var Wallet = class {
|
|
|
547
547
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, arguments, function* (transactionId, timeoutMs = 6e4, {
|
|
548
548
|
backoffMultiplier = 1.1,
|
|
549
549
|
maxBackoffMs = 2e3,
|
|
550
|
-
initialBackoffMs =
|
|
550
|
+
initialBackoffMs = _chunk4CPLMKROcjs.STATUS_POLLING_INTERVAL_MS
|
|
551
551
|
} = {}) {
|
|
552
552
|
var _a;
|
|
553
553
|
const startTime = Date.now();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/chains/definitions/arcTestnet.ts
|
|
2
|
+
import { defineChain } from "viem";
|
|
3
|
+
var arcTestnet = defineChain({
|
|
4
|
+
id: 5042002,
|
|
5
|
+
name: "Arc Testnet",
|
|
6
|
+
nativeCurrency: {
|
|
7
|
+
decimals: 6,
|
|
8
|
+
name: "USDC",
|
|
9
|
+
symbol: "USDC"
|
|
10
|
+
},
|
|
11
|
+
rpcUrls: {
|
|
12
|
+
default: { http: ["https://rpc.testnet.arc.network"] }
|
|
13
|
+
},
|
|
14
|
+
blockExplorers: {
|
|
15
|
+
default: {
|
|
16
|
+
name: "Arc Testnet Explorer",
|
|
17
|
+
url: "https://testnet.arcscan.app"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
testnet: true
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
arcTestnet
|
|
25
|
+
};
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkPCFXTJL4cjs = require('./chunk-PCFXTJL4.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk4CPLMKROcjs = require('./chunk-4CPLMKRO.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
|
|
@@ -22,7 +22,7 @@ var ApiClient = class extends _commonsdkbase.CrossmintApiClient {
|
|
|
22
22
|
constructor(crossmint) {
|
|
23
23
|
super(crossmint, {
|
|
24
24
|
internalConfig: {
|
|
25
|
-
sdkMetadata: { name:
|
|
25
|
+
sdkMetadata: { name: _chunk4CPLMKROcjs.SDK_NAME, version: _chunk4CPLMKROcjs.SDK_VERSION }
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
this.apiPrefix = "api/2025-06-09/wallets";
|
|
@@ -31,7 +31,7 @@ var ApiClient = class extends _commonsdkbase.CrossmintApiClient {
|
|
|
31
31
|
createWallet(params) {
|
|
32
32
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
|
|
33
33
|
const path = this.isServerSide ? `${this.apiPrefix}` : `${this.apiPrefix}/me`;
|
|
34
|
-
|
|
34
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallets.api.createWallet", {
|
|
35
35
|
chainType: params.chainType,
|
|
36
36
|
walletType: params.type
|
|
37
37
|
});
|
|
@@ -41,12 +41,12 @@ var ApiClient = class extends _commonsdkbase.CrossmintApiClient {
|
|
|
41
41
|
});
|
|
42
42
|
const result = yield response.json();
|
|
43
43
|
if ("error" in result) {
|
|
44
|
-
|
|
44
|
+
_chunkPCFXTJL4cjs.walletsLogger.error("wallets.api.createWallet.error", {
|
|
45
45
|
error: result.error,
|
|
46
46
|
chainType: params.chainType
|
|
47
47
|
});
|
|
48
48
|
} else if ("address" in result) {
|
|
49
|
-
|
|
49
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallets.api.createWallet.success", {
|
|
50
50
|
address: result.address,
|
|
51
51
|
chainType: params.chainType
|
|
52
52
|
});
|
|
@@ -56,18 +56,18 @@ var ApiClient = class extends _commonsdkbase.CrossmintApiClient {
|
|
|
56
56
|
}
|
|
57
57
|
getWallet(locator) {
|
|
58
58
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
|
|
59
|
-
|
|
59
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallets.api.getWallet", { locator });
|
|
60
60
|
const response = yield this.get(`${this.apiPrefix}/${locator}`, {
|
|
61
61
|
headers: this.headers
|
|
62
62
|
});
|
|
63
63
|
const result = yield response.json();
|
|
64
64
|
if ("error" in result) {
|
|
65
|
-
|
|
65
|
+
_chunkPCFXTJL4cjs.walletsLogger.warn("wallets.api.getWallet.error", {
|
|
66
66
|
locator,
|
|
67
67
|
error: result.error
|
|
68
68
|
});
|
|
69
69
|
} else if ("address" in result) {
|
|
70
|
-
|
|
70
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallets.api.getWallet.success", result);
|
|
71
71
|
}
|
|
72
72
|
return result;
|
|
73
73
|
});
|
|
@@ -200,7 +200,7 @@ var ApiClient = class extends _commonsdkbase.CrossmintApiClient {
|
|
|
200
200
|
}
|
|
201
201
|
send(walletLocator, tokenLocator, params) {
|
|
202
202
|
return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
|
|
203
|
-
|
|
203
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallets.api.send", {
|
|
204
204
|
walletLocator,
|
|
205
205
|
tokenLocator,
|
|
206
206
|
recipient: params.recipient
|
|
@@ -211,13 +211,13 @@ var ApiClient = class extends _commonsdkbase.CrossmintApiClient {
|
|
|
211
211
|
});
|
|
212
212
|
const result = yield response.json();
|
|
213
213
|
if ("error" in result) {
|
|
214
|
-
|
|
214
|
+
_chunkPCFXTJL4cjs.walletsLogger.error("wallets.api.send.error", {
|
|
215
215
|
walletLocator,
|
|
216
216
|
tokenLocator,
|
|
217
217
|
error: result.error
|
|
218
218
|
});
|
|
219
219
|
} else if ("id" in result) {
|
|
220
|
-
|
|
220
|
+
_chunkPCFXTJL4cjs.walletsLogger.info("wallets.api.send.success", {
|
|
221
221
|
walletLocator,
|
|
222
222
|
transactionId: result.id
|
|
223
223
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EVMNonCustodialSigner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HNISEOCV.js";
|
|
4
4
|
import {
|
|
5
5
|
SolanaNonCustodialSigner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZPH2YLZO.js";
|
|
7
7
|
import {
|
|
8
8
|
StellarNonCustodialSigner
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TR2CW644.js";
|
|
10
10
|
import {
|
|
11
11
|
EVMApiKeySigner
|
|
12
12
|
} from "./chunk-AL77JANE.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkM4JBQNOIcjs = require('./chunk-M4JBQNOI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBQF3R3BCcjs = require('./chunk-BQF3R3BC.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkFWC2WXFNcjs = require('./chunk-FWC2WXFN.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunk2JCKWYGAcjs = require('./chunk-2JCKWYGA.cjs');
|
|
14
|
+
require('./chunk-N3RG7OZW.cjs');
|
|
15
15
|
require('./chunk-RBHGZDDX.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-
|
|
18
|
+
var _chunkY24JAHPTcjs = require('./chunk-Y24JAHPT.cjs');
|
|
19
|
+
require('./chunk-3LKDNHF5.cjs');
|
|
20
20
|
require('./chunk-PO6S7UR3.cjs');
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
24
|
-
require('./chunk-
|
|
25
|
-
require('./chunk-
|
|
21
|
+
require('./chunk-5BSYP2R3.cjs');
|
|
22
|
+
require('./chunk-LLDPJU6L.cjs');
|
|
23
|
+
require('./chunk-SD7I7CQ4.cjs');
|
|
24
|
+
require('./chunk-EAMPCH35.cjs');
|
|
25
|
+
require('./chunk-BRNT3DZP.cjs');
|
|
26
26
|
require('./chunk-CHGPNMRL.cjs');
|
|
27
27
|
require('./chunk-7ECQJFYM.cjs');
|
|
28
28
|
require('./chunk-BSC55MYK.cjs');
|
|
@@ -35,15 +35,16 @@ var _chunkRHR6P2KPcjs = require('./chunk-RHR6P2KP.cjs');
|
|
|
35
35
|
require('./chunk-6HXIZLEQ.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkZBW2YHQZcjs = require('./chunk-ZBW2YHQZ.cjs');
|
|
39
39
|
require('./chunk-XC2V34TS.cjs');
|
|
40
40
|
require('./chunk-ECAM5KTH.cjs');
|
|
41
|
-
require('./chunk-
|
|
41
|
+
require('./chunk-6QEK7D2B.cjs');
|
|
42
42
|
require('./chunk-NIBKCMQ2.cjs');
|
|
43
43
|
require('./chunk-55V4VMTX.cjs');
|
|
44
|
+
require('./chunk-HTSQPZHW.cjs');
|
|
44
45
|
require('./chunk-CCIGWTAO.cjs');
|
|
45
|
-
require('./chunk-
|
|
46
|
-
require('./chunk-
|
|
46
|
+
require('./chunk-PCFXTJL4.cjs');
|
|
47
|
+
require('./chunk-4CPLMKRO.cjs');
|
|
47
48
|
require('./chunk-G5NYLGM5.cjs');
|
|
48
49
|
|
|
49
50
|
|
|
@@ -54,4 +55,4 @@ require('./chunk-G5NYLGM5.cjs');
|
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
|
|
57
|
-
exports.CrossmintWallets =
|
|
58
|
+
exports.CrossmintWallets = _chunk2JCKWYGAcjs.CrossmintWallets; exports.EVMWallet = _chunkM4JBQNOIcjs.EVMWallet; exports.SolanaWallet = _chunkBQF3R3BCcjs.SolanaWallet; exports.StellarWallet = _chunkFWC2WXFNcjs.StellarWallet; exports.Wallet = _chunkY24JAHPTcjs.Wallet; exports.WalletsApiClient = _chunkZBW2YHQZcjs.ApiClient; exports.createCrossmint = _chunk2JCKWYGAcjs.createCrossmint; exports.isExportableSigner = _chunkRHR6P2KPcjs.isExportableSigner;
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EVMWallet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7L5EEVWT.js";
|
|
4
4
|
import {
|
|
5
5
|
SolanaWallet
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YSDATSFB.js";
|
|
7
7
|
import {
|
|
8
8
|
StellarWallet
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-V2DJ5TIR.js";
|
|
10
10
|
import {
|
|
11
11
|
CrossmintWallets,
|
|
12
12
|
createCrossmint
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-K5HDSLUV.js";
|
|
14
|
+
import "./chunk-3ZIQQ4PW.js";
|
|
15
15
|
import "./chunk-ZP4ZZCIE.js";
|
|
16
16
|
import {
|
|
17
17
|
Wallet
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-4NHVYWZC.js";
|
|
19
|
+
import "./chunk-ZFFB4RDK.js";
|
|
20
20
|
import "./chunk-YDZRBHS3.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-HNISEOCV.js";
|
|
22
|
+
import "./chunk-ZPH2YLZO.js";
|
|
23
|
+
import "./chunk-TR2CW644.js";
|
|
24
|
+
import "./chunk-NUOU3SCU.js";
|
|
25
|
+
import "./chunk-V3FETRWW.js";
|
|
26
26
|
import "./chunk-AL77JANE.js";
|
|
27
27
|
import "./chunk-MZBFXUHT.js";
|
|
28
28
|
import "./chunk-EYJQSDDI.js";
|
|
@@ -35,15 +35,16 @@ import {
|
|
|
35
35
|
import "./chunk-5IFDVB4Y.js";
|
|
36
36
|
import {
|
|
37
37
|
ApiClient
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SXR4KWXS.js";
|
|
39
39
|
import "./chunk-SGINWAB6.js";
|
|
40
40
|
import "./chunk-KBJA7JDT.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-PROOTUIO.js";
|
|
42
42
|
import "./chunk-2T5HHKUI.js";
|
|
43
43
|
import "./chunk-3U6UAYOV.js";
|
|
44
|
+
import "./chunk-ZBLW42YE.js";
|
|
44
45
|
import "./chunk-455NK5LB.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-VRMQGFQX.js";
|
|
47
|
+
import "./chunk-ASJVZCHA.js";
|
|
47
48
|
import "./chunk-FPMW7Q5O.js";
|
|
48
49
|
export {
|
|
49
50
|
CrossmintWallets,
|