@crossmint/wallets-sdk 0.18.9 → 0.18.10
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/index.cjs +1 -1
- package/dist/api/gen/index.js +1 -1
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.js +3 -3
- package/dist/chains/chains.cjs +3 -3
- package/dist/chains/chains.js +2 -2
- package/dist/chains/definitions/tempoTestnet.cjs +2 -2
- package/dist/chains/definitions/tempoTestnet.d.cts +2 -2
- package/dist/chains/definitions/tempoTestnet.d.ts +2 -2
- package/dist/chains/definitions/tempoTestnet.js +1 -1
- package/dist/{chunk-2ZSKJAOT.cjs → chunk-5KFST6KH.cjs} +17 -17
- package/dist/{chunk-J5XAUV2V.cjs → chunk-6H6ZBJC2.cjs} +2 -2
- package/dist/{chunk-4QK4L5VF.js → chunk-73EJIGRV.js} +2 -2
- package/dist/{chunk-LQLIK47F.cjs → chunk-AZIXXLMP.cjs} +12 -12
- package/dist/{chunk-K4RPCL5B.js → chunk-CQNVHQHH.js} +2 -2
- package/dist/{chunk-WCT4BKO2.cjs → chunk-GRAV7BTN.cjs} +9 -9
- package/dist/{chunk-5KDA2N2A.cjs → chunk-GROJZ247.cjs} +2 -2
- package/dist/{chunk-G2CYEQE2.js → chunk-IYTDGUGZ.js} +2 -2
- package/dist/{chunk-T5QUCHZJ.js → chunk-IZJUOXOZ.js} +2 -2
- package/dist/{chunk-Z46X5PNX.js → chunk-KMHPLOVX.js} +3 -3
- package/dist/{chunk-5W4XWZHO.js → chunk-LVSVT2VD.js} +1 -1
- package/dist/{chunk-HMAWUNLS.cjs → chunk-NBDHZJ44.cjs} +7 -7
- package/dist/{chunk-NIVHH42N.js → chunk-NIHJXITI.js} +2 -2
- package/dist/{chunk-IZBTRZ6H.js → chunk-NJTKHWXR.js} +1 -1
- package/dist/{chunk-IIGQSNJW.cjs → chunk-OFQDCA2H.cjs} +1 -1
- package/dist/{chunk-223GEFZO.cjs → chunk-OWGPEA2A.cjs} +3 -3
- package/dist/{chunk-PNCAKT7I.cjs → chunk-QXJZ75GW.cjs} +38 -38
- package/dist/{chunk-BILOL2NR.js → chunk-R5TY6M5Z.js} +3 -3
- package/dist/{chunk-5M7F5ACW.cjs → chunk-TYN3KL7U.cjs} +9 -9
- package/dist/{chunk-DLPFZLN7.cjs → chunk-UXNFYAIS.cjs} +23 -23
- package/dist/{chunk-LOYQBZ5U.js → chunk-YNLL6GP4.js} +2 -2
- package/dist/{chunk-FQUH37WQ.js → chunk-ZJUXMOUB.js} +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.js +11 -11
- 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 +7 -7
- package/dist/sdk.js +6 -6
- package/dist/utils/constants.cjs +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/evm.cjs +7 -7
- package/dist/wallets/evm.js +6 -6
- package/dist/wallets/solana.cjs +5 -5
- package/dist/wallets/solana.js +4 -4
- package/dist/wallets/stellar.cjs +5 -5
- package/dist/wallets/stellar.js +4 -4
- package/dist/wallets/wallet-factory.cjs +5 -5
- package/dist/wallets/wallet-factory.js +4 -4
- package/dist/wallets/wallet.cjs +4 -4
- package/dist/wallets/wallet.js +3 -3
- package/package.json +3 -3
package/dist/api/client.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkAZIXXLMPcjs = require('../chunk-AZIXXLMP.cjs');
|
|
4
4
|
require('../chunk-XC2V34TS.cjs');
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-OWGPEA2A.cjs');
|
|
6
|
+
require('../chunk-OFQDCA2H.cjs');
|
|
7
7
|
require('../chunk-UO2J2ZB2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.ApiClient =
|
|
10
|
+
exports.ApiClient = _chunkAZIXXLMPcjs.ApiClient;
|
package/dist/api/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-CQNVHQHH.js";
|
|
4
4
|
import "../chunk-SGINWAB6.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-ZJUXMOUB.js";
|
|
6
|
+
import "../chunk-LVSVT2VD.js";
|
|
7
7
|
import "../chunk-ASE2FXWP.js";
|
|
8
8
|
export {
|
|
9
9
|
ApiClient
|
package/dist/api/gen/index.cjs
CHANGED
package/dist/api/gen/index.js
CHANGED
|
@@ -86,8 +86,8 @@ import {
|
|
|
86
86
|
walletsV2025ControllerSubmitSignatureApprovals2,
|
|
87
87
|
walletsVerifyRecipientControllerVerifyWalletOwnership2
|
|
88
88
|
} from "../../chunk-BMMZIPXT.js";
|
|
89
|
-
import "../../chunk-KT3CVXFG.js";
|
|
90
89
|
import "../../chunk-YMRXMNME.js";
|
|
90
|
+
import "../../chunk-KT3CVXFG.js";
|
|
91
91
|
import "../../chunk-ASE2FXWP.js";
|
|
92
92
|
export {
|
|
93
93
|
balanceControllerFundWallet2,
|
package/dist/api/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkAZIXXLMPcjs = require('../chunk-AZIXXLMP.cjs');
|
|
5
5
|
require('../chunk-XC2V34TS.cjs');
|
|
6
6
|
require('../chunk-ECAM5KTH.cjs');
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-OWGPEA2A.cjs');
|
|
8
|
+
require('../chunk-OFQDCA2H.cjs');
|
|
9
9
|
require('../chunk-UO2J2ZB2.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.ApiClient =
|
|
12
|
+
exports.ApiClient = _chunkAZIXXLMPcjs.ApiClient;
|
package/dist/api/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../chunk-5IFDVB4Y.js";
|
|
2
2
|
import {
|
|
3
3
|
ApiClient
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-CQNVHQHH.js";
|
|
5
5
|
import "../chunk-SGINWAB6.js";
|
|
6
6
|
import "../chunk-KBJA7JDT.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-ZJUXMOUB.js";
|
|
8
|
+
import "../chunk-LVSVT2VD.js";
|
|
9
9
|
import "../chunk-ASE2FXWP.js";
|
|
10
10
|
export {
|
|
11
11
|
ApiClient
|
package/dist/chains/chains.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkGROJZ247cjs = require('../chunk-GROJZ247.cjs');
|
|
4
|
+
require('../chunk-6H6ZBJC2.cjs');
|
|
5
5
|
require('../chunk-HTSQPZHW.cjs');
|
|
6
6
|
require('../chunk-NIBKCMQ2.cjs');
|
|
7
7
|
require('../chunk-55V4VMTX.cjs');
|
|
8
8
|
require('../chunk-UO2J2ZB2.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.toViemChain =
|
|
11
|
+
exports.toViemChain = _chunkGROJZ247cjs.toViemChain;
|
package/dist/chains/chains.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6H6ZBJC2cjs = require('../../chunk-6H6ZBJC2.cjs');
|
|
4
4
|
require('../../chunk-UO2J2ZB2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.tempoTestnet =
|
|
7
|
+
exports.tempoTestnet = _chunk6H6ZBJC2cjs.tempoTestnet;
|
|
@@ -23,8 +23,8 @@ declare const tempoTestnet: {
|
|
|
23
23
|
name: "Tempo Testnet";
|
|
24
24
|
nativeCurrency: {
|
|
25
25
|
readonly decimals: 6;
|
|
26
|
-
readonly name: "
|
|
27
|
-
readonly symbol: "
|
|
26
|
+
readonly name: "pathUSD";
|
|
27
|
+
readonly symbol: "pathUSD";
|
|
28
28
|
};
|
|
29
29
|
experimental_preconfirmationTime?: number | undefined;
|
|
30
30
|
rpcUrls: {
|
|
@@ -23,8 +23,8 @@ declare const tempoTestnet: {
|
|
|
23
23
|
name: "Tempo Testnet";
|
|
24
24
|
nativeCurrency: {
|
|
25
25
|
readonly decimals: 6;
|
|
26
|
-
readonly name: "
|
|
27
|
-
readonly symbol: "
|
|
26
|
+
readonly name: "pathUSD";
|
|
27
|
+
readonly symbol: "pathUSD";
|
|
28
28
|
};
|
|
29
29
|
experimental_preconfirmationTime?: number | undefined;
|
|
30
30
|
rpcUrls: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkRBHGZDDXcjs = require('./chunk-RBHGZDDX.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkQXJZ75GWcjs = require('./chunk-QXJZ75GW.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk6Z5QSTIScjs = require('./chunk-6Z5QSTIS.cjs');
|
|
@@ -14,7 +14,7 @@ var _chunk6Z5QSTIScjs = require('./chunk-6Z5QSTIS.cjs');
|
|
|
14
14
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkOWGPEA2Acjs = require('./chunk-OWGPEA2A.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -32,7 +32,7 @@ var WalletFactory = class {
|
|
|
32
32
|
getOrCreateWallet(args) {
|
|
33
33
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
34
34
|
if (this.apiClient.isServerSide) {
|
|
35
|
-
|
|
35
|
+
_chunkOWGPEA2Acjs.walletsLogger.error("walletFactory.getOrCreateWallet.error", {
|
|
36
36
|
error: "getOrCreateWallet can only be called from client-side code"
|
|
37
37
|
});
|
|
38
38
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(
|
|
@@ -40,35 +40,35 @@ var WalletFactory = class {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
const locator = this.getWalletLocator(args);
|
|
43
|
-
|
|
43
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getOrCreateWallet.start");
|
|
44
44
|
const existingWallet = yield this.apiClient.getWallet(locator);
|
|
45
45
|
if (existingWallet != null && !("error" in existingWallet)) {
|
|
46
|
-
|
|
46
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getOrCreateWallet.existing", {
|
|
47
47
|
address: existingWallet.address
|
|
48
48
|
});
|
|
49
49
|
return this.createWalletInstance(existingWallet, args);
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getOrCreateWallet.creating");
|
|
52
52
|
return this.createWallet(args);
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
getWallet(walletLocator, args) {
|
|
56
56
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
57
57
|
if (!this.apiClient.isServerSide) {
|
|
58
|
-
|
|
58
|
+
_chunkOWGPEA2Acjs.walletsLogger.error("walletFactory.getWallet.error", {
|
|
59
59
|
error: "getWallet is not supported on client side"
|
|
60
60
|
});
|
|
61
61
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)("getWallet is not supported on client side, use getOrCreateWallet instead");
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getWallet.start");
|
|
64
64
|
const existingWallet = yield this.apiClient.getWallet(walletLocator);
|
|
65
65
|
if ("error" in existingWallet) {
|
|
66
|
-
|
|
66
|
+
_chunkOWGPEA2Acjs.walletsLogger.warn("walletFactory.getWallet.notFound", {
|
|
67
67
|
error: existingWallet.error
|
|
68
68
|
});
|
|
69
69
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(existingWallet));
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getWallet.success", {
|
|
72
72
|
address: existingWallet.address
|
|
73
73
|
});
|
|
74
74
|
return this.createWalletInstance(existingWallet, args);
|
|
@@ -78,7 +78,7 @@ var WalletFactory = class {
|
|
|
78
78
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
79
79
|
var _a, _b, _c, _d, _e;
|
|
80
80
|
yield (_c = (_b = (_a = args.options) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onWalletCreationStart) == null ? void 0 : _c.call(_b);
|
|
81
|
-
|
|
81
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.createWallet.start");
|
|
82
82
|
this.mutateSignerFromCustomAuth(args, true);
|
|
83
83
|
const adminSigner = args.signer.type === "passkey" ? yield this.createPasskeyAdminSigner(args.signer) : args.signer;
|
|
84
84
|
const walletResponse = yield this.apiClient.createWallet({
|
|
@@ -91,12 +91,12 @@ var WalletFactory = class {
|
|
|
91
91
|
alias: (_e = args.alias) != null ? _e : void 0
|
|
92
92
|
});
|
|
93
93
|
if ("error" in walletResponse) {
|
|
94
|
-
|
|
94
|
+
_chunkOWGPEA2Acjs.walletsLogger.error("walletFactory.createWallet.error", {
|
|
95
95
|
error: walletResponse.error
|
|
96
96
|
});
|
|
97
97
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(JSON.stringify(walletResponse));
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.createWallet.success", {
|
|
100
100
|
address: walletResponse.address
|
|
101
101
|
});
|
|
102
102
|
return this.createWalletInstance(walletResponse, args);
|
|
@@ -105,7 +105,7 @@ var WalletFactory = class {
|
|
|
105
105
|
createWalletInstance(walletResponse, args) {
|
|
106
106
|
this.validateExistingWalletConfig(walletResponse, args);
|
|
107
107
|
const signerConfig = this.toInternalSignerConfig(walletResponse, args.signer, args.options);
|
|
108
|
-
return new (0,
|
|
108
|
+
return new (0, _chunkQXJZ75GWcjs.Wallet)(
|
|
109
109
|
{
|
|
110
110
|
chain: args.chain,
|
|
111
111
|
address: walletResponse.address,
|
|
@@ -289,7 +289,7 @@ var WalletFactory = class {
|
|
|
289
289
|
};
|
|
290
290
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
291
291
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
292
|
-
logger:
|
|
292
|
+
logger: _chunkOWGPEA2Acjs.walletsLogger,
|
|
293
293
|
methodName: "walletFactory.getOrCreateWallet",
|
|
294
294
|
buildContext(_thisArg, args) {
|
|
295
295
|
const walletArgs = args[0];
|
|
@@ -299,7 +299,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
299
299
|
], WalletFactory.prototype, "getOrCreateWallet", 1);
|
|
300
300
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
301
301
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
302
|
-
logger:
|
|
302
|
+
logger: _chunkOWGPEA2Acjs.walletsLogger,
|
|
303
303
|
methodName: "walletFactory.getWallet",
|
|
304
304
|
buildContext(_thisArg, args) {
|
|
305
305
|
const walletLocator = args[0];
|
|
@@ -310,7 +310,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
310
310
|
], WalletFactory.prototype, "getWallet", 1);
|
|
311
311
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
312
312
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
313
|
-
logger:
|
|
313
|
+
logger: _chunkOWGPEA2Acjs.walletsLogger,
|
|
314
314
|
methodName: "walletFactory.createWallet",
|
|
315
315
|
buildContext(_thisArg, args) {
|
|
316
316
|
const walletArgs = args[0];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Wallet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IYTDGUGZ.js";
|
|
4
4
|
import {
|
|
5
5
|
SolanaExternalWalletSigner
|
|
6
6
|
} from "./chunk-PIFD6KNH.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-SGINWAB6.js";
|
|
10
10
|
import {
|
|
11
11
|
walletsLogger
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZJUXMOUB.js";
|
|
13
13
|
import {
|
|
14
14
|
__async,
|
|
15
15
|
__decorateClass
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkOWGPEA2Acjs = require('./chunk-OWGPEA2A.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkOFQDCA2Hcjs = require('./chunk-OFQDCA2H.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.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: _chunkOFQDCA2Hcjs.SDK_NAME, version: _chunkOFQDCA2Hcjs.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 _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
33
33
|
const path = this.isServerSide ? `${this.apiPrefix}` : `${this.apiPrefix}/me`;
|
|
34
|
-
|
|
34
|
+
_chunkOWGPEA2Acjs.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
|
+
_chunkOWGPEA2Acjs.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
|
+
_chunkOWGPEA2Acjs.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 _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
59
|
-
|
|
59
|
+
_chunkOWGPEA2Acjs.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
|
+
_chunkOWGPEA2Acjs.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
|
+
_chunkOWGPEA2Acjs.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 _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
203
|
-
|
|
203
|
+
_chunkOWGPEA2Acjs.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
|
+
_chunkOWGPEA2Acjs.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
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("wallets.api.send.success", {
|
|
221
221
|
walletLocator,
|
|
222
222
|
transactionId: result.id
|
|
223
223
|
});
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-SGINWAB6.js";
|
|
4
4
|
import {
|
|
5
5
|
walletsLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZJUXMOUB.js";
|
|
7
7
|
import {
|
|
8
8
|
SDK_NAME,
|
|
9
9
|
SDK_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LVSVT2VD.js";
|
|
11
11
|
import {
|
|
12
12
|
__async
|
|
13
13
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQXJZ75GWcjs = require('./chunk-QXJZ75GW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkOWGPEA2Acjs = require('./chunk-OWGPEA2A.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
14
14
|
|
|
15
15
|
// src/wallets/stellar.ts
|
|
16
16
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
17
|
-
var _StellarWallet = class _StellarWallet extends
|
|
17
|
+
var _StellarWallet = class _StellarWallet extends _chunkQXJZ75GWcjs.Wallet {
|
|
18
18
|
constructor(wallet) {
|
|
19
19
|
super(
|
|
20
20
|
{
|
|
@@ -22,10 +22,10 @@ var _StellarWallet = class _StellarWallet extends _chunkPNCAKT7Icjs.Wallet {
|
|
|
22
22
|
address: wallet.address,
|
|
23
23
|
owner: wallet.owner,
|
|
24
24
|
signer: wallet.signer,
|
|
25
|
-
options:
|
|
25
|
+
options: _chunkQXJZ75GWcjs.Wallet.getOptions(wallet),
|
|
26
26
|
alias: wallet.alias
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
_chunkQXJZ75GWcjs.Wallet.getApiClient(wallet)
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
static from(wallet) {
|
|
@@ -37,11 +37,11 @@ var _StellarWallet = class _StellarWallet extends _chunkPNCAKT7Icjs.Wallet {
|
|
|
37
37
|
sendTransaction(params) {
|
|
38
38
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
39
39
|
var _a;
|
|
40
|
-
|
|
40
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("stellarWallet.sendTransaction.start");
|
|
41
41
|
yield this.preAuthIfNeeded();
|
|
42
42
|
const createdTransaction = yield this.createTransaction(params);
|
|
43
43
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
44
|
-
|
|
44
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("stellarWallet.sendTransaction.prepared", {
|
|
45
45
|
transactionId: createdTransaction.id
|
|
46
46
|
});
|
|
47
47
|
return {
|
|
@@ -52,7 +52,7 @@ var _StellarWallet = class _StellarWallet extends _chunkPNCAKT7Icjs.Wallet {
|
|
|
52
52
|
}
|
|
53
53
|
const options = {};
|
|
54
54
|
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
55
|
-
|
|
55
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("stellarWallet.sendTransaction.success", {
|
|
56
56
|
transactionId: createdTransaction.id,
|
|
57
57
|
hash: result.hash
|
|
58
58
|
});
|
|
@@ -96,7 +96,7 @@ var _StellarWallet = class _StellarWallet extends _chunkPNCAKT7Icjs.Wallet {
|
|
|
96
96
|
};
|
|
97
97
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
98
98
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
99
|
-
logger:
|
|
99
|
+
logger: _chunkOWGPEA2Acjs.walletsLogger,
|
|
100
100
|
methodName: "stellarWallet.sendTransaction",
|
|
101
101
|
buildContext(thisArg) {
|
|
102
102
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6H6ZBJC2cjs = require('./chunk-6H6ZBJC2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkHTSQPZHWcjs = require('./chunk-HTSQPZHW.cjs');
|
|
@@ -124,7 +124,7 @@ function toViemChain(chain) {
|
|
|
124
124
|
case _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET:
|
|
125
125
|
return _chunkHTSQPZHWcjs.arcTestnet;
|
|
126
126
|
case _commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET:
|
|
127
|
-
return
|
|
127
|
+
return _chunk6H6ZBJC2cjs.tempoTestnet;
|
|
128
128
|
case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT:
|
|
129
129
|
case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET:
|
|
130
130
|
case _commonsdkbase.BlockchainIncludingTestnet.APECHAIN:
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
} from "./chunk-SGINWAB6.js";
|
|
19
19
|
import {
|
|
20
20
|
walletsLogger
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZJUXMOUB.js";
|
|
22
22
|
import {
|
|
23
23
|
STATUS_POLLING_INTERVAL_MS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LVSVT2VD.js";
|
|
25
25
|
import {
|
|
26
26
|
__async,
|
|
27
27
|
__decorateClass,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WalletFactory
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NIHJXITI.js";
|
|
4
4
|
import {
|
|
5
5
|
ApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CQNVHQHH.js";
|
|
7
7
|
import {
|
|
8
8
|
initWalletsLogger,
|
|
9
9
|
walletsLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZJUXMOUB.js";
|
|
11
11
|
import {
|
|
12
12
|
__async
|
|
13
13
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5KFST6KHcjs = require('./chunk-5KFST6KH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkAZIXXLMPcjs = require('./chunk-AZIXXLMP.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkOWGPEA2Acjs = require('./chunk-OWGPEA2A.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
@@ -16,10 +16,10 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
16
16
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
17
17
|
var CrossmintWallets = class _CrossmintWallets {
|
|
18
18
|
constructor(crossmint) {
|
|
19
|
-
|
|
20
|
-
const apiClient = new (0,
|
|
21
|
-
this.walletFactory = new (0,
|
|
22
|
-
|
|
19
|
+
_chunkOWGPEA2Acjs.initWalletsLogger.call(void 0, crossmint.apiKey);
|
|
20
|
+
const apiClient = new (0, _chunkAZIXXLMPcjs.ApiClient)(crossmint);
|
|
21
|
+
this.walletFactory = new (0, _chunk5KFST6KHcjs.WalletFactory)(apiClient);
|
|
22
|
+
_chunkOWGPEA2Acjs.walletsLogger.info("wallets.sdk.initialized");
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Initialize the Wallets SDK
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZP4ZZCIE.js";
|
|
5
5
|
import {
|
|
6
6
|
Wallet
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IYTDGUGZ.js";
|
|
8
8
|
import {
|
|
9
9
|
assembleSigner
|
|
10
10
|
} from "./chunk-UZN67GMO.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-SGINWAB6.js";
|
|
15
15
|
import {
|
|
16
16
|
walletsLogger
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZJUXMOUB.js";
|
|
18
18
|
import {
|
|
19
19
|
__async,
|
|
20
20
|
__decorateClass,
|
|
@@ -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 _chunkOFQDCA2Hcjs = require('./chunk-OFQDCA2H.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: _chunkOFQDCA2Hcjs.SDK_NAME,
|
|
25
|
+
packageVersion: _chunkOFQDCA2Hcjs.SDK_VERSION,
|
|
26
26
|
environment,
|
|
27
27
|
projectId,
|
|
28
28
|
platform
|