@crossmint/wallets-sdk 0.18.14 → 0.19.0
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/__tests__/constants.cjs +31 -0
- package/dist/api/__tests__/constants.d.cts +96 -0
- package/dist/api/__tests__/constants.d.ts +96 -0
- package/dist/api/__tests__/constants.js +31 -0
- package/dist/api/__tests__/test-utils.cjs +372 -0
- package/dist/api/__tests__/test-utils.d.cts +99 -0
- package/dist/api/__tests__/test-utils.d.ts +99 -0
- package/dist/api/__tests__/test-utils.js +372 -0
- package/dist/api/client.cjs +4 -4
- package/dist/api/client.js +3 -3
- package/dist/api/gen/types.gen.d.cts +8 -0
- package/dist/api/gen/types.gen.d.ts +8 -0
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.js +3 -3
- package/dist/chains/chains.cjs +8 -4
- package/dist/chains/chains.d.cts +3 -1
- package/dist/chains/chains.d.ts +3 -1
- package/dist/chains/chains.js +7 -3
- package/dist/{chunk-AAESOWQL.js → chunk-57HPJVTI.js} +8 -3
- package/dist/{chunk-ADCODBBF.cjs → chunk-5CBGJLA4.cjs} +1 -1
- package/dist/{chunk-CEFMURL3.js → chunk-6EP3PLGP.js} +2 -2
- package/dist/{chunk-ZJZO6LQ3.js → chunk-7EZZGCYI.js} +10 -1
- package/dist/{chunk-THLRRDVV.js → chunk-7NKX266V.js} +39 -5
- package/dist/{chunk-5CTWIW7X.js → chunk-BBYNVHFR.js} +3 -3
- package/dist/{chunk-PUXRHELK.cjs → chunk-C5F6IECX.cjs} +12 -12
- package/dist/{chunk-GROJZ247.cjs → chunk-DIM3X4IX.cjs} +13 -5
- package/dist/{chunk-OPKBL6A2.cjs → chunk-EIZVQAZO.cjs} +54 -20
- package/dist/{chunk-VJ2ZKU3R.js → chunk-ETCH6L2Y.js} +5 -5
- package/dist/{chunk-SWPJZ5JX.cjs → chunk-FQV77LH4.cjs} +3 -3
- package/dist/chunk-G6QJHFSY.cjs +74 -0
- package/dist/{chunk-FV4PV7HU.cjs → chunk-JLW3Q65G.cjs} +6 -6
- package/dist/{chunk-FUMQWMQR.cjs → chunk-JZQYCISB.cjs} +9 -9
- package/dist/{chunk-SEGDDAL2.js → chunk-KE6LX37B.js} +1 -1
- package/dist/{chunk-3PI54IUS.js → chunk-L5IMC3NM.js} +2 -2
- package/dist/{chunk-KIS2P5DM.js → chunk-N65K6TUY.js} +10 -1
- package/dist/{chunk-PST7R25G.cjs → chunk-NXST74TX.cjs} +80 -43
- package/dist/chunk-PJOJIRTY.js +74 -0
- package/dist/{chunk-SGKMU5NX.cjs → chunk-REP547HH.cjs} +36 -13
- package/dist/{chunk-B24CPC6Y.js → chunk-S2AKC2CK.js} +1 -1
- package/dist/{chunk-PCZDMOJH.js → chunk-SUJQZWLJ.js} +2 -2
- package/dist/{chunk-BEJB6ZUK.cjs → chunk-TCNXKNBQ.cjs} +7 -7
- package/dist/{chunk-5TYDRD6D.cjs → chunk-VNPL3HFN.cjs} +12 -3
- package/dist/{chunk-G7TC2YMQ.cjs → chunk-VWENCGQO.cjs} +12 -3
- package/dist/{chunk-LKAE7D7W.js → chunk-W3OYA42M.js} +32 -9
- package/dist/{chunk-ZQACPBUW.js → chunk-XEZBA7I2.js} +58 -21
- package/dist/{chunk-5WJE5X7V.cjs → chunk-XQSMZXBR.cjs} +28 -23
- package/dist/{chunk-NJTKHWXR.js → chunk-XSMIDXUA.js} +15 -7
- package/dist/{chunk-UWKMOJ4D.js → chunk-YF4DYTBM.js} +10 -1
- package/dist/{chunk-2RVPHSR5.cjs → chunk-YFOUZXSM.cjs} +12 -3
- package/dist/{chunk-SB5FTFPM.cjs → chunk-YXFIZNFL.cjs} +9 -9
- package/dist/index.cjs +18 -18
- package/dist/index.js +17 -17
- 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 +17 -12
- package/dist/sdk.js +16 -11
- package/dist/signers/index.cjs +8 -8
- package/dist/signers/index.js +7 -7
- package/dist/signers/non-custodial/index.cjs +7 -7
- package/dist/signers/non-custodial/index.js +8 -8
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-evm-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-signer.js +3 -3
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-solana-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-stellar-signer.js +4 -4
- package/dist/utils/constants.cjs +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/__tests__/test-helpers.cjs +10 -8
- package/dist/wallets/__tests__/test-helpers.d.cts +2 -1
- package/dist/wallets/__tests__/test-helpers.d.ts +2 -1
- package/dist/wallets/__tests__/test-helpers.js +9 -7
- package/dist/wallets/evm.cjs +12 -12
- package/dist/wallets/evm.d.cts +20 -0
- package/dist/wallets/evm.d.ts +20 -0
- package/dist/wallets/evm.js +11 -11
- package/dist/wallets/solana.cjs +9 -9
- package/dist/wallets/solana.d.cts +5 -0
- package/dist/wallets/solana.d.ts +5 -0
- package/dist/wallets/solana.js +8 -8
- package/dist/wallets/stellar.cjs +9 -9
- package/dist/wallets/stellar.d.cts +5 -0
- package/dist/wallets/stellar.d.ts +5 -0
- package/dist/wallets/stellar.js +8 -8
- package/dist/wallets/types.d.cts +5 -1
- package/dist/wallets/types.d.ts +5 -1
- package/dist/wallets/wallet-factory.cjs +15 -10
- package/dist/wallets/wallet-factory.d.cts +2 -0
- package/dist/wallets/wallet-factory.d.ts +2 -0
- package/dist/wallets/wallet-factory.js +14 -9
- package/dist/wallets/wallet.cjs +8 -8
- package/dist/wallets/wallet.d.cts +6 -2
- package/dist/wallets/wallet.d.ts +6 -2
- package/dist/wallets/wallet.js +7 -7
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNXST74TXcjs = require('./chunk-NXST74TX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ var _chunkPST7R25Gcjs = require('./chunk-PST7R25G.cjs');
|
|
|
8
8
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkDIM3X4IXcjs = require('./chunk-DIM3X4IX.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
20
20
|
// src/wallets/evm.ts
|
|
21
21
|
var _viem = require('viem');
|
|
22
22
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
23
|
-
var _EVMWallet = class _EVMWallet extends
|
|
23
|
+
var _EVMWallet = class _EVMWallet extends _chunkNXST74TXcjs.Wallet {
|
|
24
24
|
constructor(wallet) {
|
|
25
25
|
super(
|
|
26
26
|
{
|
|
@@ -28,10 +28,10 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
28
28
|
address: wallet.address,
|
|
29
29
|
owner: wallet.owner,
|
|
30
30
|
signer: wallet.signer,
|
|
31
|
-
options:
|
|
31
|
+
options: _chunkNXST74TXcjs.Wallet.getOptions(wallet),
|
|
32
32
|
alias: wallet.alias
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
_chunkNXST74TXcjs.Wallet.getApiClient(wallet)
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
static from(wallet) {
|
|
@@ -43,12 +43,12 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
43
43
|
sendTransaction(params) {
|
|
44
44
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
45
45
|
var _a;
|
|
46
|
-
|
|
46
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.sendTransaction.start");
|
|
47
47
|
yield this.preAuthIfNeeded();
|
|
48
48
|
const builtTransaction = this.buildTransaction(params);
|
|
49
49
|
const createdTransaction = yield this.createTransaction(builtTransaction, params.options);
|
|
50
50
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
51
|
-
|
|
51
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.sendTransaction.prepared", {
|
|
52
52
|
transactionId: createdTransaction.id
|
|
53
53
|
});
|
|
54
54
|
return {
|
|
@@ -58,7 +58,7 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
const result = yield this.approveTransactionAndWait(createdTransaction.id);
|
|
61
|
-
|
|
61
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.sendTransaction.success", {
|
|
62
62
|
transactionId: createdTransaction.id,
|
|
63
63
|
hash: result.hash
|
|
64
64
|
});
|
|
@@ -68,7 +68,7 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
68
68
|
signMessage(params) {
|
|
69
69
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
70
70
|
var _a;
|
|
71
|
-
|
|
71
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.signMessage.start");
|
|
72
72
|
yield this.preAuthIfNeeded();
|
|
73
73
|
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
74
74
|
type: "message",
|
|
@@ -79,11 +79,11 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
if ("error" in signatureCreationResponse) {
|
|
82
|
-
|
|
82
|
+
_chunkFQV77LH4cjs.walletsLogger.error("evmWallet.signMessage.error", { error: signatureCreationResponse });
|
|
83
83
|
throw new (0, _chunkXC2V34TScjs.SignatureNotCreatedError)(JSON.stringify(signatureCreationResponse));
|
|
84
84
|
}
|
|
85
85
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
86
|
-
|
|
86
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.signMessage.prepared", {
|
|
87
87
|
signatureId: signatureCreationResponse.id
|
|
88
88
|
});
|
|
89
89
|
return {
|
|
@@ -92,23 +92,23 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
95
|
-
|
|
95
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.signMessage.success", { signatureId: signatureCreationResponse.id });
|
|
96
96
|
return result;
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
signTypedData(params) {
|
|
100
100
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
101
101
|
var _a;
|
|
102
|
-
|
|
102
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.signTypedData.start");
|
|
103
103
|
yield this.preAuthIfNeeded();
|
|
104
104
|
const { domain, message, primaryType, types, chain } = params;
|
|
105
105
|
if (!domain || !message || !types || !chain) {
|
|
106
|
-
|
|
106
|
+
_chunkFQV77LH4cjs.walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data" });
|
|
107
107
|
throw new (0, _chunkXC2V34TScjs.InvalidTypedDataError)("Invalid typed data");
|
|
108
108
|
}
|
|
109
109
|
const { name, version, chainId, verifyingContract, salt } = domain;
|
|
110
110
|
if (!name || !version || !chainId || !verifyingContract) {
|
|
111
|
-
|
|
111
|
+
_chunkFQV77LH4cjs.walletsLogger.error("evmWallet.signTypedData.error", { error: "Invalid typed data domain" });
|
|
112
112
|
throw new (0, _chunkXC2V34TScjs.InvalidTypedDataError)("Invalid typed data domain");
|
|
113
113
|
}
|
|
114
114
|
const signatureCreationResponse = yield this.apiClient.createSignature(this.walletLocator, {
|
|
@@ -131,11 +131,11 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
if ("error" in signatureCreationResponse) {
|
|
134
|
-
|
|
134
|
+
_chunkFQV77LH4cjs.walletsLogger.error("evmWallet.signTypedData.error", { error: signatureCreationResponse });
|
|
135
135
|
throw new (0, _chunkXC2V34TScjs.SignatureNotCreatedError)(JSON.stringify(signatureCreationResponse));
|
|
136
136
|
}
|
|
137
137
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
138
|
-
|
|
138
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.signTypedData.prepared", {
|
|
139
139
|
signatureId: signatureCreationResponse.id
|
|
140
140
|
});
|
|
141
141
|
return {
|
|
@@ -144,15 +144,20 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
const result = yield this.approveSignatureAndWait(signatureCreationResponse.id);
|
|
147
|
-
|
|
147
|
+
_chunkFQV77LH4cjs.walletsLogger.info("evmWallet.signTypedData.success", { signatureId: signatureCreationResponse.id });
|
|
148
148
|
return result;
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Get a Viem public client instance configured for this wallet's chain.
|
|
153
|
+
* @param params - Optional transport configuration
|
|
154
|
+
* @returns A Viem public client
|
|
155
|
+
*/
|
|
151
156
|
getViemClient(params) {
|
|
152
157
|
var _a;
|
|
153
158
|
return _viem.createPublicClient.call(void 0, {
|
|
154
159
|
transport: (_a = params == null ? void 0 : params.transport) != null ? _a : _viem.http.call(void 0, ),
|
|
155
|
-
chain:
|
|
160
|
+
chain: _chunkDIM3X4IXcjs.toViemChain.call(void 0, this.chain)
|
|
156
161
|
});
|
|
157
162
|
}
|
|
158
163
|
createTransaction(transaction, options) {
|
|
@@ -200,7 +205,7 @@ var _EVMWallet = class _EVMWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
200
205
|
};
|
|
201
206
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
202
207
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
203
|
-
logger:
|
|
208
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
204
209
|
methodName: "evmWallet.sendTransaction",
|
|
205
210
|
buildContext(thisArg) {
|
|
206
211
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -209,7 +214,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
209
214
|
], _EVMWallet.prototype, "sendTransaction", 1);
|
|
210
215
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
211
216
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
212
|
-
logger:
|
|
217
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
213
218
|
methodName: "evmWallet.signMessage",
|
|
214
219
|
buildContext(thisArg) {
|
|
215
220
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -218,7 +223,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
218
223
|
], _EVMWallet.prototype, "signMessage", 1);
|
|
219
224
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
220
225
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
221
|
-
logger:
|
|
226
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
222
227
|
methodName: "evmWallet.signTypedData",
|
|
223
228
|
buildContext(thisArg) {
|
|
224
229
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
tempoTestnet
|
|
3
|
-
} from "./chunk-IZJUOXOZ.js";
|
|
4
|
-
import {
|
|
5
|
-
arcTestnet
|
|
6
|
-
} from "./chunk-ZBLW42YE.js";
|
|
7
1
|
import {
|
|
8
2
|
story
|
|
9
3
|
} from "./chunk-2T5HHKUI.js";
|
|
10
4
|
import {
|
|
11
5
|
storyTestnet
|
|
12
6
|
} from "./chunk-3U6UAYOV.js";
|
|
7
|
+
import {
|
|
8
|
+
tempoTestnet
|
|
9
|
+
} from "./chunk-IZJUOXOZ.js";
|
|
10
|
+
import {
|
|
11
|
+
arcTestnet
|
|
12
|
+
} from "./chunk-ZBLW42YE.js";
|
|
13
13
|
|
|
14
14
|
// src/chains/chains.ts
|
|
15
15
|
import { BlockchainIncludingTestnet as Blockchain } from "@crossmint/common-sdk-base";
|
|
@@ -144,7 +144,15 @@ function toViemChain(chain) {
|
|
|
144
144
|
throw new Error(`Unknown chain: ${chain}`);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
+
function isTestnetChain(chain) {
|
|
148
|
+
return TESTNET_AA_CHAINS.includes(chain);
|
|
149
|
+
}
|
|
150
|
+
function isMainnetChain(chain) {
|
|
151
|
+
return PRODUCTION_AA_CHAINS.includes(chain);
|
|
152
|
+
}
|
|
147
153
|
|
|
148
154
|
export {
|
|
149
|
-
toViemChain
|
|
155
|
+
toViemChain,
|
|
156
|
+
isTestnetChain,
|
|
157
|
+
isMainnetChain
|
|
150
158
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_EVENT_OPTIONS,
|
|
3
3
|
NonCustodialSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W3OYA42M.js";
|
|
5
|
+
import {
|
|
6
|
+
walletsLogger
|
|
7
|
+
} from "./chunk-S2AKC2CK.js";
|
|
5
8
|
import {
|
|
6
9
|
__async
|
|
7
10
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -31,6 +34,8 @@ var EVMNonCustodialSigner = class _EVMNonCustodialSigner extends NonCustodialSig
|
|
|
31
34
|
yield this.handleAuthRequired();
|
|
32
35
|
const jwt = this.getJwtOrThrow();
|
|
33
36
|
const hexString = raw.replace("0x", "");
|
|
37
|
+
walletsLogger.info("sign: sending request", { keyType: "secp256k1" });
|
|
38
|
+
const startTime = Date.now();
|
|
34
39
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
35
40
|
event: "request:sign",
|
|
36
41
|
responseEvent: "response:sign",
|
|
@@ -47,6 +52,10 @@ var EVMNonCustodialSigner = class _EVMNonCustodialSigner extends NonCustodialSig
|
|
|
47
52
|
},
|
|
48
53
|
options: DEFAULT_EVENT_OPTIONS
|
|
49
54
|
});
|
|
55
|
+
walletsLogger.info("sign: response received", {
|
|
56
|
+
status: res == null ? void 0 : res.status,
|
|
57
|
+
durationMs: Date.now() - startTime
|
|
58
|
+
});
|
|
50
59
|
if ((res == null ? void 0 : res.status) === "error") {
|
|
51
60
|
throw new Error(res.error);
|
|
52
61
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkREP547HHcjs = require('./chunk-REP547HH.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
8
11
|
|
|
9
12
|
// src/signers/non-custodial/ncs-stellar-signer.ts
|
|
10
|
-
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends
|
|
13
|
+
var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkREP547HHcjs.NonCustodialSigner {
|
|
11
14
|
constructor(config) {
|
|
12
15
|
super(config);
|
|
13
16
|
}
|
|
@@ -21,6 +24,8 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkS
|
|
|
21
24
|
var _a;
|
|
22
25
|
yield this.handleAuthRequired();
|
|
23
26
|
const jwt = this.getJwtOrThrow();
|
|
27
|
+
_chunkFQV77LH4cjs.walletsLogger.info("sign: sending request", { keyType: "ed25519" });
|
|
28
|
+
const startTime = Date.now();
|
|
24
29
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
25
30
|
event: "request:sign",
|
|
26
31
|
responseEvent: "response:sign",
|
|
@@ -35,7 +40,11 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkS
|
|
|
35
40
|
encoding: "base64"
|
|
36
41
|
}
|
|
37
42
|
},
|
|
38
|
-
options:
|
|
43
|
+
options: _chunkREP547HHcjs.DEFAULT_EVENT_OPTIONS
|
|
44
|
+
});
|
|
45
|
+
_chunkFQV77LH4cjs.walletsLogger.info("sign: response received", {
|
|
46
|
+
status: res == null ? void 0 : res.status,
|
|
47
|
+
durationMs: Date.now() - startTime
|
|
39
48
|
});
|
|
40
49
|
if ((res == null ? void 0 : res.status) === "error") {
|
|
41
50
|
throw new Error(res.error);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNXST74TXcjs = require('./chunk-NXST74TX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
@@ -9,7 +9,7 @@ var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
|
|
|
9
9
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkFQV77LH4cjs = require('./chunk-FQV77LH4.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
18
18
|
// src/wallets/solana.ts
|
|
19
19
|
var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
|
|
20
20
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
21
|
-
var _SolanaWallet = class _SolanaWallet extends
|
|
21
|
+
var _SolanaWallet = class _SolanaWallet extends _chunkNXST74TXcjs.Wallet {
|
|
22
22
|
constructor(wallet) {
|
|
23
23
|
super(
|
|
24
24
|
{
|
|
@@ -26,10 +26,10 @@ var _SolanaWallet = class _SolanaWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
26
26
|
address: wallet.address,
|
|
27
27
|
owner: wallet.owner,
|
|
28
28
|
signer: wallet.signer,
|
|
29
|
-
options:
|
|
29
|
+
options: _chunkNXST74TXcjs.Wallet.getOptions(wallet),
|
|
30
30
|
alias: wallet.alias
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
_chunkNXST74TXcjs.Wallet.getApiClient(wallet)
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
static from(wallet) {
|
|
@@ -41,11 +41,11 @@ var _SolanaWallet = class _SolanaWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
41
41
|
sendTransaction(params) {
|
|
42
42
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
43
43
|
var _a, _b;
|
|
44
|
-
|
|
44
|
+
_chunkFQV77LH4cjs.walletsLogger.info("solanaWallet.sendTransaction.start");
|
|
45
45
|
yield this.preAuthIfNeeded();
|
|
46
46
|
const createdTransaction = yield this.createTransaction(params);
|
|
47
47
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
48
|
-
|
|
48
|
+
_chunkFQV77LH4cjs.walletsLogger.info("solanaWallet.sendTransaction.prepared", {
|
|
49
49
|
transactionId: createdTransaction.id
|
|
50
50
|
});
|
|
51
51
|
return {
|
|
@@ -69,7 +69,7 @@ var _SolanaWallet = class _SolanaWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
69
69
|
additionalSigners: _additionalSigners
|
|
70
70
|
};
|
|
71
71
|
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
72
|
-
|
|
72
|
+
_chunkFQV77LH4cjs.walletsLogger.info("solanaWallet.sendTransaction.success", {
|
|
73
73
|
transactionId: createdTransaction.id,
|
|
74
74
|
hash: result.hash
|
|
75
75
|
});
|
|
@@ -101,7 +101,7 @@ var _SolanaWallet = class _SolanaWallet extends _chunkPST7R25Gcjs.Wallet {
|
|
|
101
101
|
};
|
|
102
102
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
103
103
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
104
|
-
logger:
|
|
104
|
+
logger: _chunkFQV77LH4cjs.walletsLogger,
|
|
105
105
|
methodName: "solanaWallet.sendTransaction",
|
|
106
106
|
buildContext(thisArg) {
|
|
107
107
|
return { chain: thisArg.chain, address: thisArg.address };
|
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXQSMZXBRcjs = require('./chunk-XQSMZXBR.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkYXFIZNFLcjs = require('./chunk-YXFIZNFL.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkJZQYCISBcjs = require('./chunk-JZQYCISB.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunkTCNXKNBQcjs = require('./chunk-TCNXKNBQ.cjs');
|
|
14
|
+
require('./chunk-EIZVQAZO.cjs');
|
|
15
15
|
require('./chunk-RBHGZDDX.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('./chunk-
|
|
18
|
+
var _chunkNXST74TXcjs = require('./chunk-NXST74TX.cjs');
|
|
19
|
+
require('./chunk-JLW3Q65G.cjs');
|
|
20
20
|
require('./chunk-PO6S7UR3.cjs');
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
24
|
-
require('./chunk-
|
|
21
|
+
require('./chunk-YFOUZXSM.cjs');
|
|
22
|
+
require('./chunk-VNPL3HFN.cjs');
|
|
23
|
+
require('./chunk-VWENCGQO.cjs');
|
|
24
|
+
require('./chunk-REP547HH.cjs');
|
|
25
25
|
require('./chunk-4GFSUI2I.cjs');
|
|
26
26
|
require('./chunk-JSWTGW46.cjs');
|
|
27
27
|
require('./chunk-ZTEMOYS2.cjs');
|
|
@@ -35,17 +35,17 @@ var _chunkRHR6P2KPcjs = require('./chunk-RHR6P2KP.cjs');
|
|
|
35
35
|
require('./chunk-6HXIZLEQ.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkC5F6IECXcjs = require('./chunk-C5F6IECX.cjs');
|
|
39
39
|
require('./chunk-XC2V34TS.cjs');
|
|
40
40
|
require('./chunk-ECAM5KTH.cjs');
|
|
41
|
-
require('./chunk-
|
|
42
|
-
require('./chunk-6H6ZBJC2.cjs');
|
|
43
|
-
require('./chunk-HTSQPZHW.cjs');
|
|
41
|
+
require('./chunk-DIM3X4IX.cjs');
|
|
44
42
|
require('./chunk-NIBKCMQ2.cjs');
|
|
45
43
|
require('./chunk-55V4VMTX.cjs');
|
|
44
|
+
require('./chunk-6H6ZBJC2.cjs');
|
|
45
|
+
require('./chunk-HTSQPZHW.cjs');
|
|
46
46
|
require('./chunk-CCIGWTAO.cjs');
|
|
47
|
-
require('./chunk-
|
|
48
|
-
require('./chunk-
|
|
47
|
+
require('./chunk-FQV77LH4.cjs');
|
|
48
|
+
require('./chunk-5CBGJLA4.cjs');
|
|
49
49
|
require('./chunk-UO2J2ZB2.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
@@ -56,4 +56,4 @@ require('./chunk-UO2J2ZB2.cjs');
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
exports.CrossmintWallets =
|
|
59
|
+
exports.CrossmintWallets = _chunkTCNXKNBQcjs.CrossmintWallets; exports.EVMWallet = _chunkXQSMZXBRcjs.EVMWallet; exports.SolanaWallet = _chunkYXFIZNFLcjs.SolanaWallet; exports.StellarWallet = _chunkJZQYCISBcjs.StellarWallet; exports.Wallet = _chunkNXST74TXcjs.Wallet; exports.WalletsApiClient = _chunkC5F6IECXcjs.ApiClient; exports.createCrossmint = _chunkTCNXKNBQcjs.createCrossmint; exports.isExportableSigner = _chunkRHR6P2KPcjs.isExportableSigner;
|
package/dist/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EVMWallet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-57HPJVTI.js";
|
|
4
4
|
import {
|
|
5
5
|
SolanaWallet
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SUJQZWLJ.js";
|
|
7
7
|
import {
|
|
8
8
|
StellarWallet
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L5IMC3NM.js";
|
|
10
10
|
import {
|
|
11
11
|
CrossmintWallets,
|
|
12
12
|
createCrossmint
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-BBYNVHFR.js";
|
|
14
|
+
import "./chunk-7NKX266V.js";
|
|
15
15
|
import "./chunk-ZP4ZZCIE.js";
|
|
16
16
|
import {
|
|
17
17
|
Wallet
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-XEZBA7I2.js";
|
|
19
|
+
import "./chunk-ETCH6L2Y.js";
|
|
20
20
|
import "./chunk-YDZRBHS3.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-N65K6TUY.js";
|
|
22
|
+
import "./chunk-YF4DYTBM.js";
|
|
23
|
+
import "./chunk-7EZZGCYI.js";
|
|
24
|
+
import "./chunk-W3OYA42M.js";
|
|
25
25
|
import "./chunk-FOOISYCJ.js";
|
|
26
26
|
import "./chunk-7GOUUPS4.js";
|
|
27
27
|
import "./chunk-47WKYTRN.js";
|
|
@@ -35,17 +35,17 @@ import {
|
|
|
35
35
|
import "./chunk-5IFDVB4Y.js";
|
|
36
36
|
import {
|
|
37
37
|
ApiClient
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6EP3PLGP.js";
|
|
39
39
|
import "./chunk-SGINWAB6.js";
|
|
40
40
|
import "./chunk-KBJA7JDT.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-IZJUOXOZ.js";
|
|
43
|
-
import "./chunk-ZBLW42YE.js";
|
|
41
|
+
import "./chunk-XSMIDXUA.js";
|
|
44
42
|
import "./chunk-2T5HHKUI.js";
|
|
45
43
|
import "./chunk-3U6UAYOV.js";
|
|
44
|
+
import "./chunk-IZJUOXOZ.js";
|
|
45
|
+
import "./chunk-ZBLW42YE.js";
|
|
46
46
|
import "./chunk-455NK5LB.js";
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-S2AKC2CK.js";
|
|
48
|
+
import "./chunk-KE6LX37B.js";
|
|
49
49
|
import "./chunk-ASE2FXWP.js";
|
|
50
50
|
export {
|
|
51
51
|
CrossmintWallets,
|
package/dist/logger/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkFQV77LH4cjs = require('../chunk-FQV77LH4.cjs');
|
|
6
|
+
require('../chunk-5CBGJLA4.cjs');
|
|
7
7
|
require('../chunk-UO2J2ZB2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.initWalletsLogger =
|
|
11
|
+
exports.initWalletsLogger = _chunkFQV77LH4cjs.initWalletsLogger; exports.walletsLogger = _chunkFQV77LH4cjs.walletsLogger;
|
package/dist/logger/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import "../chunk-455NK5LB.js";
|
|
|
2
2
|
import {
|
|
3
3
|
initWalletsLogger,
|
|
4
4
|
walletsLogger
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-S2AKC2CK.js";
|
|
6
|
+
import "../chunk-KE6LX37B.js";
|
|
7
7
|
import "../chunk-ASE2FXWP.js";
|
|
8
8
|
export {
|
|
9
9
|
initWalletsLogger,
|
package/dist/logger/init.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkFQV77LH4cjs = require('../chunk-FQV77LH4.cjs');
|
|
5
|
+
require('../chunk-5CBGJLA4.cjs');
|
|
6
6
|
require('../chunk-UO2J2ZB2.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.initWalletsLogger =
|
|
10
|
+
exports.initWalletsLogger = _chunkFQV77LH4cjs.initWalletsLogger; exports.walletsLogger = _chunkFQV77LH4cjs.walletsLogger;
|
package/dist/logger/init.js
CHANGED
package/dist/sdk.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkTCNXKNBQcjs = require('./chunk-TCNXKNBQ.cjs');
|
|
5
|
+
require('./chunk-EIZVQAZO.cjs');
|
|
6
6
|
require('./chunk-RBHGZDDX.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-NXST74TX.cjs');
|
|
8
|
+
require('./chunk-JLW3Q65G.cjs');
|
|
9
9
|
require('./chunk-PO6S7UR3.cjs');
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-YFOUZXSM.cjs');
|
|
11
|
+
require('./chunk-VNPL3HFN.cjs');
|
|
12
|
+
require('./chunk-VWENCGQO.cjs');
|
|
13
|
+
require('./chunk-REP547HH.cjs');
|
|
14
14
|
require('./chunk-4GFSUI2I.cjs');
|
|
15
15
|
require('./chunk-JSWTGW46.cjs');
|
|
16
16
|
require('./chunk-ZTEMOYS2.cjs');
|
|
@@ -20,14 +20,19 @@ require('./chunk-Q5KNPVYI.cjs');
|
|
|
20
20
|
require('./chunk-IOMKHF6R.cjs');
|
|
21
21
|
require('./chunk-RHR6P2KP.cjs');
|
|
22
22
|
require('./chunk-6HXIZLEQ.cjs');
|
|
23
|
-
require('./chunk-
|
|
23
|
+
require('./chunk-C5F6IECX.cjs');
|
|
24
24
|
require('./chunk-XC2V34TS.cjs');
|
|
25
25
|
require('./chunk-ECAM5KTH.cjs');
|
|
26
|
+
require('./chunk-DIM3X4IX.cjs');
|
|
27
|
+
require('./chunk-NIBKCMQ2.cjs');
|
|
28
|
+
require('./chunk-55V4VMTX.cjs');
|
|
29
|
+
require('./chunk-6H6ZBJC2.cjs');
|
|
30
|
+
require('./chunk-HTSQPZHW.cjs');
|
|
26
31
|
require('./chunk-CCIGWTAO.cjs');
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
32
|
+
require('./chunk-FQV77LH4.cjs');
|
|
33
|
+
require('./chunk-5CBGJLA4.cjs');
|
|
29
34
|
require('./chunk-UO2J2ZB2.cjs');
|
|
30
35
|
|
|
31
36
|
|
|
32
37
|
|
|
33
|
-
exports.CrossmintWallets =
|
|
38
|
+
exports.CrossmintWallets = _chunkTCNXKNBQcjs.CrossmintWallets; exports.createCrossmint = _chunkTCNXKNBQcjs.createCrossmint;
|
package/dist/sdk.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CrossmintWallets,
|
|
3
3
|
createCrossmint
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-BBYNVHFR.js";
|
|
5
|
+
import "./chunk-7NKX266V.js";
|
|
6
6
|
import "./chunk-ZP4ZZCIE.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-XEZBA7I2.js";
|
|
8
|
+
import "./chunk-ETCH6L2Y.js";
|
|
9
9
|
import "./chunk-YDZRBHS3.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-N65K6TUY.js";
|
|
11
|
+
import "./chunk-YF4DYTBM.js";
|
|
12
|
+
import "./chunk-7EZZGCYI.js";
|
|
13
|
+
import "./chunk-W3OYA42M.js";
|
|
14
14
|
import "./chunk-FOOISYCJ.js";
|
|
15
15
|
import "./chunk-7GOUUPS4.js";
|
|
16
16
|
import "./chunk-47WKYTRN.js";
|
|
@@ -20,12 +20,17 @@ import "./chunk-PIFD6KNH.js";
|
|
|
20
20
|
import "./chunk-PK7J3Y3L.js";
|
|
21
21
|
import "./chunk-WJUPOCKJ.js";
|
|
22
22
|
import "./chunk-5IFDVB4Y.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-6EP3PLGP.js";
|
|
24
24
|
import "./chunk-SGINWAB6.js";
|
|
25
25
|
import "./chunk-KBJA7JDT.js";
|
|
26
|
+
import "./chunk-XSMIDXUA.js";
|
|
27
|
+
import "./chunk-2T5HHKUI.js";
|
|
28
|
+
import "./chunk-3U6UAYOV.js";
|
|
29
|
+
import "./chunk-IZJUOXOZ.js";
|
|
30
|
+
import "./chunk-ZBLW42YE.js";
|
|
26
31
|
import "./chunk-455NK5LB.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-S2AKC2CK.js";
|
|
33
|
+
import "./chunk-KE6LX37B.js";
|
|
29
34
|
import "./chunk-ASE2FXWP.js";
|
|
30
35
|
export {
|
|
31
36
|
CrossmintWallets,
|