@crossmint/wallets-sdk 0.18.8 → 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.
Files changed (130) hide show
  1. package/dist/api/client.cjs +5 -5
  2. package/dist/api/client.js +4 -4
  3. package/dist/api/gen/client.gen.cjs +1 -1
  4. package/dist/api/gen/client.gen.js +1 -1
  5. package/dist/api/gen/index.cjs +4 -4
  6. package/dist/api/gen/index.js +3 -3
  7. package/dist/api/gen/sdk.gen.cjs +3 -3
  8. package/dist/api/gen/sdk.gen.js +2 -2
  9. package/dist/api/gen/types.gen.d.cts +35 -35
  10. package/dist/api/gen/types.gen.d.ts +35 -35
  11. package/dist/api/index.cjs +5 -5
  12. package/dist/api/index.js +4 -4
  13. package/dist/chains/chains.cjs +5 -4
  14. package/dist/chains/chains.d.cts +1 -1
  15. package/dist/chains/chains.d.ts +1 -1
  16. package/dist/chains/chains.js +4 -3
  17. package/dist/chains/definitions/arcTestnet.cjs +1 -1
  18. package/dist/chains/definitions/arcTestnet.js +1 -1
  19. package/dist/chains/definitions/story.cjs +1 -1
  20. package/dist/chains/definitions/story.js +1 -1
  21. package/dist/chains/definitions/storyTestnet.cjs +1 -1
  22. package/dist/chains/definitions/storyTestnet.js +1 -1
  23. package/dist/chains/definitions/tempoTestnet.cjs +7 -0
  24. package/dist/chains/definitions/tempoTestnet.d.cts +43 -0
  25. package/dist/chains/definitions/tempoTestnet.d.ts +43 -0
  26. package/dist/chains/definitions/tempoTestnet.js +7 -0
  27. package/dist/{chunk-ZTGRDOOH.js → chunk-2I2OFGNL.js} +1 -1
  28. package/dist/{chunk-ZPH2YLZO.js → chunk-3RSZDA3X.js} +2 -2
  29. package/dist/{chunk-MZBFXUHT.js → chunk-47WKYTRN.js} +1 -1
  30. package/dist/{chunk-BRNT3DZP.cjs → chunk-4GFSUI2I.cjs} +3 -3
  31. package/dist/{chunk-N3RG7OZW.cjs → chunk-5KFST6KH.cjs} +60 -37
  32. package/dist/chunk-6H6ZBJC2.cjs +25 -0
  33. package/dist/chunk-6Z5QSTIS.cjs +58 -0
  34. package/dist/{chunk-YSDATSFB.js → chunk-73EJIGRV.js} +30 -7
  35. package/dist/{chunk-AL77JANE.js → chunk-7GOUUPS4.js} +1 -1
  36. package/dist/{chunk-LLDPJU6L.cjs → chunk-AN7MHABM.cjs} +6 -6
  37. package/dist/{chunk-FPMW7Q5O.js → chunk-ASE2FXWP.js} +10 -0
  38. package/dist/{chunk-ZBW2YHQZ.cjs → chunk-AZIXXLMP.cjs} +29 -29
  39. package/dist/{chunk-RTRDZB52.js → chunk-BMMZIPXT.js} +1 -1
  40. package/dist/{chunk-V3QJQUT7.cjs → chunk-COR3CNRW.cjs} +128 -128
  41. package/dist/{chunk-SXR4KWXS.js → chunk-CQNVHQHH.js} +3 -3
  42. package/dist/{chunk-V3FETRWW.js → chunk-FOOISYCJ.js} +1 -1
  43. package/dist/{chunk-FWC2WXFN.cjs → chunk-GRAV7BTN.cjs} +31 -8
  44. package/dist/{chunk-6QEK7D2B.cjs → chunk-GROJZ247.cjs} +10 -4
  45. package/dist/{chunk-YBA7WO32.cjs → chunk-IOMKHF6R.cjs} +3 -3
  46. package/dist/{chunk-EYJQSDDI.js → chunk-IPO25BCU.js} +1 -1
  47. package/dist/{chunk-4NHVYWZC.js → chunk-IYTDGUGZ.js} +116 -50
  48. package/dist/chunk-IZJUOXOZ.js +25 -0
  49. package/dist/{chunk-CHGPNMRL.cjs → chunk-JSWTGW46.cjs} +3 -3
  50. package/dist/{chunk-K5HDSLUV.js → chunk-KMHPLOVX.js} +4 -4
  51. package/dist/{chunk-ASJVZCHA.js → chunk-LVSVT2VD.js} +1 -1
  52. package/dist/{chunk-SD7I7CQ4.cjs → chunk-MNJA5EPY.cjs} +6 -6
  53. package/dist/{chunk-2JCKWYGA.cjs → chunk-NBDHZJ44.cjs} +11 -11
  54. package/dist/{chunk-3ZIQQ4PW.js → chunk-NIHJXITI.js} +52 -29
  55. package/dist/{chunk-PROOTUIO.js → chunk-NJTKHWXR.js} +10 -4
  56. package/dist/{chunk-4CPLMKRO.cjs → chunk-OFQDCA2H.cjs} +1 -1
  57. package/dist/{chunk-PCFXTJL4.cjs → chunk-OWGPEA2A.cjs} +3 -3
  58. package/dist/{chunk-DQCXGBZM.js → chunk-PIFD6KNH.js} +1 -1
  59. package/dist/{chunk-WC7T2CR4.js → chunk-PK7J3Y3L.js} +1 -1
  60. package/dist/{chunk-R2OY54EJ.cjs → chunk-Q5KNPVYI.cjs} +3 -3
  61. package/dist/{chunk-Y24JAHPT.cjs → chunk-QXJZ75GW.cjs} +166 -100
  62. package/dist/{chunk-7L5EEVWT.js → chunk-R5TY6M5Z.js} +66 -9
  63. package/dist/{chunk-NUOU3SCU.js → chunk-RCK3ZEP7.js} +2 -2
  64. package/dist/{chunk-TR2CW644.js → chunk-SYZKDDGK.js} +2 -2
  65. package/dist/{chunk-EAMPCH35.cjs → chunk-TEQYWMHS.cjs} +13 -13
  66. package/dist/{chunk-BQF3R3BC.cjs → chunk-TYN3KL7U.cjs} +33 -10
  67. package/dist/{chunk-G5NYLGM5.cjs → chunk-UO2J2ZB2.cjs} +11 -1
  68. package/dist/{chunk-HNISEOCV.js → chunk-UPS2UQJO.js} +2 -2
  69. package/dist/{chunk-M4JBQNOI.cjs → chunk-UXNFYAIS.cjs} +71 -14
  70. package/dist/{chunk-ZFFB4RDK.js → chunk-UZN67GMO.js} +9 -9
  71. package/dist/{chunk-5BSYP2R3.cjs → chunk-WFGKVGZ2.cjs} +7 -7
  72. package/dist/{chunk-LLFD22UQ.cjs → chunk-XOCC3MPK.cjs} +3 -3
  73. package/dist/{chunk-V2DJ5TIR.js → chunk-YNLL6GP4.js} +29 -6
  74. package/dist/{chunk-VRMQGFQX.js → chunk-ZJUXMOUB.js} +1 -1
  75. package/dist/{chunk-BSC55MYK.cjs → chunk-ZNAGDENG.cjs} +3 -3
  76. package/dist/{chunk-7ECQJFYM.cjs → chunk-ZTEMOYS2.cjs} +3 -3
  77. package/dist/index.cjs +26 -25
  78. package/dist/index.js +25 -24
  79. package/dist/logger/index.cjs +4 -4
  80. package/dist/logger/index.js +3 -3
  81. package/dist/logger/init.cjs +4 -4
  82. package/dist/logger/init.js +3 -3
  83. package/dist/sdk.cjs +20 -20
  84. package/dist/sdk.js +19 -19
  85. package/dist/signers/evm-api-key.cjs +3 -3
  86. package/dist/signers/evm-api-key.js +2 -2
  87. package/dist/signers/evm-external-wallet.cjs +3 -3
  88. package/dist/signers/evm-external-wallet.js +2 -2
  89. package/dist/signers/index.cjs +14 -14
  90. package/dist/signers/index.js +13 -13
  91. package/dist/signers/non-custodial/index.cjs +7 -7
  92. package/dist/signers/non-custodial/index.js +6 -6
  93. package/dist/signers/non-custodial/ncs-evm-signer.cjs +5 -5
  94. package/dist/signers/non-custodial/ncs-evm-signer.js +4 -4
  95. package/dist/signers/non-custodial/ncs-iframe-manager.cjs +3 -3
  96. package/dist/signers/non-custodial/ncs-iframe-manager.js +2 -2
  97. package/dist/signers/non-custodial/ncs-signer.cjs +4 -4
  98. package/dist/signers/non-custodial/ncs-signer.js +3 -3
  99. package/dist/signers/non-custodial/ncs-solana-signer.cjs +5 -5
  100. package/dist/signers/non-custodial/ncs-solana-signer.js +4 -4
  101. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +5 -5
  102. package/dist/signers/non-custodial/ncs-stellar-signer.js +4 -4
  103. package/dist/signers/passkey.cjs +3 -3
  104. package/dist/signers/passkey.js +2 -2
  105. package/dist/signers/solana-api-key.cjs +3 -3
  106. package/dist/signers/solana-api-key.js +2 -2
  107. package/dist/signers/solana-external-wallet.cjs +3 -3
  108. package/dist/signers/solana-external-wallet.js +2 -2
  109. package/dist/signers/stellar-external-wallet.cjs +3 -3
  110. package/dist/signers/stellar-external-wallet.js +2 -2
  111. package/dist/signers/types.cjs +1 -1
  112. package/dist/signers/types.js +1 -1
  113. package/dist/utils/constants.cjs +3 -3
  114. package/dist/utils/constants.js +2 -2
  115. package/dist/utils/errors.cjs +1 -1
  116. package/dist/utils/errors.js +1 -1
  117. package/dist/utils/signer-validation.cjs +1 -1
  118. package/dist/utils/signer-validation.js +1 -1
  119. package/dist/wallets/evm.cjs +15 -12
  120. package/dist/wallets/evm.js +14 -11
  121. package/dist/wallets/solana.cjs +13 -11
  122. package/dist/wallets/solana.js +12 -10
  123. package/dist/wallets/stellar.cjs +12 -10
  124. package/dist/wallets/stellar.js +11 -9
  125. package/dist/wallets/wallet-factory.cjs +18 -18
  126. package/dist/wallets/wallet-factory.js +17 -17
  127. package/dist/wallets/wallet.cjs +11 -9
  128. package/dist/wallets/wallet.js +10 -8
  129. package/package.json +3 -3
  130. package/dist/chunk-3LKDNHF5.cjs +0 -58
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-SGINWAB6.js";
4
4
  import {
5
5
  walletsLogger
6
- } from "./chunk-VRMQGFQX.js";
6
+ } from "./chunk-ZJUXMOUB.js";
7
7
  import {
8
8
  SDK_NAME,
9
9
  SDK_VERSION
10
- } from "./chunk-ASJVZCHA.js";
10
+ } from "./chunk-LVSVT2VD.js";
11
11
  import {
12
12
  __async
13
- } from "./chunk-FPMW7Q5O.js";
13
+ } from "./chunk-ASE2FXWP.js";
14
14
 
15
15
  // src/api/client.ts
16
16
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __async
3
- } from "./chunk-FPMW7Q5O.js";
3
+ } from "./chunk-ASE2FXWP.js";
4
4
 
5
5
  // src/signers/non-custodial/ncs-iframe-manager.ts
6
6
  import { IFrameWindow, SignersWindowTransport } from "@crossmint/client-sdk-window";
@@ -1,16 +1,20 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkY24JAHPTcjs = require('./chunk-Y24JAHPT.cjs');
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 _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
9
+ var _chunkOWGPEA2Acjs = require('./chunk-OWGPEA2A.cjs');
10
+
11
+
12
+
13
+ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
10
14
 
11
15
  // src/wallets/stellar.ts
12
16
  var _commonsdkbase = require('@crossmint/common-sdk-base');
13
- var StellarWallet = class _StellarWallet extends _chunkY24JAHPTcjs.Wallet {
17
+ var _StellarWallet = class _StellarWallet extends _chunkQXJZ75GWcjs.Wallet {
14
18
  constructor(wallet) {
15
19
  super(
16
20
  {
@@ -18,10 +22,10 @@ var StellarWallet = class _StellarWallet extends _chunkY24JAHPTcjs.Wallet {
18
22
  address: wallet.address,
19
23
  owner: wallet.owner,
20
24
  signer: wallet.signer,
21
- options: _chunkY24JAHPTcjs.Wallet.getOptions(wallet),
25
+ options: _chunkQXJZ75GWcjs.Wallet.getOptions(wallet),
22
26
  alias: wallet.alias
23
27
  },
24
- _chunkY24JAHPTcjs.Wallet.getApiClient(wallet)
28
+ _chunkQXJZ75GWcjs.Wallet.getApiClient(wallet)
25
29
  );
26
30
  }
27
31
  static from(wallet) {
@@ -31,11 +35,15 @@ var StellarWallet = class _StellarWallet extends _chunkY24JAHPTcjs.Wallet {
31
35
  return new _StellarWallet(wallet);
32
36
  }
33
37
  sendTransaction(params) {
34
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
38
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
35
39
  var _a;
40
+ _chunkOWGPEA2Acjs.walletsLogger.info("stellarWallet.sendTransaction.start");
36
41
  yield this.preAuthIfNeeded();
37
42
  const createdTransaction = yield this.createTransaction(params);
38
43
  if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
44
+ _chunkOWGPEA2Acjs.walletsLogger.info("stellarWallet.sendTransaction.prepared", {
45
+ transactionId: createdTransaction.id
46
+ });
39
47
  return {
40
48
  hash: void 0,
41
49
  explorerLink: void 0,
@@ -43,11 +51,16 @@ var StellarWallet = class _StellarWallet extends _chunkY24JAHPTcjs.Wallet {
43
51
  };
44
52
  }
45
53
  const options = {};
46
- return yield this.approveTransactionAndWait(createdTransaction.id, options);
54
+ const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
55
+ _chunkOWGPEA2Acjs.walletsLogger.info("stellarWallet.sendTransaction.success", {
56
+ transactionId: createdTransaction.id,
57
+ hash: result.hash
58
+ });
59
+ return result;
47
60
  });
48
61
  }
49
62
  createTransaction(params) {
50
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
63
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
51
64
  var _a;
52
65
  const { contractId, options } = params;
53
66
  const signer = (_a = options == null ? void 0 : options.experimental_signer) != null ? _a : this.signer.locator();
@@ -81,6 +94,16 @@ var StellarWallet = class _StellarWallet extends _chunkY24JAHPTcjs.Wallet {
81
94
  });
82
95
  }
83
96
  };
97
+ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
98
+ _commonsdkbase.WithLoggerContext.call(void 0, {
99
+ logger: _chunkOWGPEA2Acjs.walletsLogger,
100
+ methodName: "stellarWallet.sendTransaction",
101
+ buildContext(thisArg) {
102
+ return { chain: thisArg.chain, address: thisArg.address };
103
+ }
104
+ })
105
+ ], _StellarWallet.prototype, "sendTransaction", 1);
106
+ var StellarWallet = _StellarWallet;
84
107
 
85
108
 
86
109
 
@@ -1,12 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNIBKCMQ2cjs = require('./chunk-NIBKCMQ2.cjs');
3
+ var _chunk6H6ZBJC2cjs = require('./chunk-6H6ZBJC2.cjs');
4
4
 
5
5
 
6
- var _chunk55V4VMTXcjs = require('./chunk-55V4VMTX.cjs');
6
+ var _chunkHTSQPZHWcjs = require('./chunk-HTSQPZHW.cjs');
7
7
 
8
8
 
9
- var _chunkHTSQPZHWcjs = require('./chunk-HTSQPZHW.cjs');
9
+ var _chunkNIBKCMQ2cjs = require('./chunk-NIBKCMQ2.cjs');
10
+
11
+
12
+ var _chunk55V4VMTXcjs = require('./chunk-55V4VMTX.cjs');
10
13
 
11
14
  // src/chains/chains.ts
12
15
  var _commonsdkbase = require('@crossmint/common-sdk-base');
@@ -49,7 +52,8 @@ var TESTNET_AA_CHAINS = [
49
52
  _commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,
50
53
  _commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,
51
54
  _commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,
52
- _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET
55
+ _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET,
56
+ _commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET
53
57
  ];
54
58
  var PRODUCTION_AA_CHAINS = [
55
59
  _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT,
@@ -119,6 +123,8 @@ function toViemChain(chain) {
119
123
  return _chains.plume;
120
124
  case _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET:
121
125
  return _chunkHTSQPZHWcjs.arcTestnet;
126
+ case _commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET:
127
+ return _chunk6H6ZBJC2cjs.tempoTestnet;
122
128
  case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT:
123
129
  case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET:
124
130
  case _commonsdkbase.BlockchainIncludingTestnet.APECHAIN:
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
3
+ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
4
4
 
5
5
  // src/signers/stellar-external-wallet.ts
6
6
  var StellarExternalWalletSigner = class {
@@ -20,12 +20,12 @@ var StellarExternalWalletSigner = class {
20
20
  return this.config.locator;
21
21
  }
22
22
  signMessage() {
23
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
23
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
24
24
  return yield Promise.reject(new Error("signMessage method not implemented for stellar external wallet signer"));
25
25
  });
26
26
  }
27
27
  signTransaction(payload) {
28
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
28
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
29
29
  if (this.onSignStellarTransaction == null) {
30
30
  return yield Promise.reject(
31
31
  new Error(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __async
3
- } from "./chunk-FPMW7Q5O.js";
3
+ } from "./chunk-ASE2FXWP.js";
4
4
 
5
5
  // src/signers/passkey.ts
6
6
  import { WebAuthnP256 } from "ox";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NonCustodialSigner
3
- } from "./chunk-NUOU3SCU.js";
3
+ } from "./chunk-RCK3ZEP7.js";
4
4
  import {
5
5
  InvalidSignerError,
6
6
  SignatureFailedError,
@@ -16,20 +16,24 @@ import {
16
16
  WalletNotAvailableError,
17
17
  WalletTypeNotSupportedError
18
18
  } from "./chunk-SGINWAB6.js";
19
+ import {
20
+ walletsLogger
21
+ } from "./chunk-ZJUXMOUB.js";
19
22
  import {
20
23
  STATUS_POLLING_INTERVAL_MS
21
- } from "./chunk-ASJVZCHA.js";
24
+ } from "./chunk-LVSVT2VD.js";
22
25
  import {
23
26
  __async,
27
+ __decorateClass,
24
28
  __privateAdd,
25
29
  __privateGet,
26
30
  __privateSet,
27
31
  __spreadProps,
28
32
  __spreadValues
29
- } from "./chunk-FPMW7Q5O.js";
33
+ } from "./chunk-ASE2FXWP.js";
30
34
 
31
35
  // src/wallets/wallet.ts
32
- import { isValidAddress } from "@crossmint/common-sdk-base";
36
+ import { isValidAddress, WithLoggerContext } from "@crossmint/common-sdk-base";
33
37
  var _options, _apiClient;
34
38
  var Wallet = class {
35
39
  constructor(args, apiClient) {
@@ -64,15 +68,9 @@ var Wallet = class {
64
68
  experimental_apiClient() {
65
69
  return __privateGet(this, _apiClient);
66
70
  }
67
- /**
68
- * Get the wallet balances - always includes USDC and native token (ETH/SOL)
69
- * @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
70
- * @param {Chain[]} chains - The chains (optional)
71
- * @returns {Promise<Balances<C>>} The balances returns nativeToken, usdc, tokens
72
- * @throws {Error} If the balances cannot be retrieved
73
- */
74
71
  balances(tokens, chains) {
75
72
  return __async(this, null, function* () {
73
+ walletsLogger.info("wallet.balances.start");
76
74
  let nativeToken;
77
75
  switch (this.chain) {
78
76
  case "solana":
@@ -91,23 +89,16 @@ var Wallet = class {
91
89
  tokens: allTokens
92
90
  });
93
91
  if ("error" in response) {
92
+ walletsLogger.error("wallet.balances.error", { error: response });
94
93
  throw new Error(`Failed to get balances for wallet: ${JSON.stringify(response.message)}`);
95
94
  }
95
+ walletsLogger.info("wallet.balances.success");
96
96
  return this.transformBalanceResponse(response, nativeToken, tokens);
97
97
  });
98
98
  }
99
- /**
100
- * Funds the wallet with Crossmint's stablecoin (USDXM).
101
- *
102
- * **Note:** This method is only available in staging environments and exclusively supports USDXM tokens.
103
- * It cannot be used in production environments.
104
- * @param amount - The amount of USDXM to fund the wallet with
105
- * @param chain - Optional chain to fund on. If not provided, uses the wallet's default chain
106
- * @returns The funding response
107
- * @throws {Error} If the funding operation fails or if called in a production environment
108
- */
109
99
  stagingFund(amount, chain) {
110
100
  return __async(this, null, function* () {
101
+ walletsLogger.info("wallet.stagingFund.start", { amount, chain: chain != null ? chain : this.chain });
111
102
  const response = yield this.apiClient.fundWallet(this.address, {
112
103
  amount,
113
104
  token: "usdxm",
@@ -116,8 +107,10 @@ var Wallet = class {
116
107
  chain: chain != null ? chain : this.chain
117
108
  });
118
109
  if ("error" in response) {
110
+ walletsLogger.error("wallet.stagingFund.error", { error: response });
119
111
  throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
120
112
  }
113
+ walletsLogger.info("wallet.stagingFund.success");
121
114
  return response;
122
115
  });
123
116
  }
@@ -234,37 +227,37 @@ var Wallet = class {
234
227
  return response;
235
228
  });
236
229
  }
237
- /**
238
- * Send a token to a wallet or user locator
239
- * @param {string | UserLocator} to - The recipient (address or user locator)
240
- * @param {string} token - The token (address or currency symbol)
241
- * @param {string} amount - The amount to send (decimal units)
242
- * @param {TransactionInputOptions} options - The options for the transaction
243
- * @returns {Transaction} The transaction
244
- */
245
230
  send(to, token, amount, options) {
246
231
  return __async(this, null, function* () {
247
- yield this.preAuthIfNeeded();
248
232
  const recipient = toRecipientLocator(to);
249
233
  const tokenLocator = toTokenLocator(token, this.chain);
234
+ walletsLogger.info("wallet.send.start", { recipient, token: tokenLocator, amount });
235
+ yield this.preAuthIfNeeded();
250
236
  const sendParams = __spreadValues({
251
237
  recipient,
252
238
  amount
253
239
  }, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {});
254
240
  const transactionCreationResponse = yield __privateGet(this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
255
241
  if ("message" in transactionCreationResponse) {
242
+ walletsLogger.error("wallet.send.error", { error: transactionCreationResponse });
256
243
  throw new TransactionNotCreatedError(
257
244
  `Failed to send token: ${JSON.stringify(transactionCreationResponse.message)}`
258
245
  );
259
246
  }
260
247
  if (options == null ? void 0 : options.experimental_prepareOnly) {
248
+ walletsLogger.info("wallet.send.prepared", { transactionId: transactionCreationResponse.id });
261
249
  return {
262
250
  hash: void 0,
263
251
  explorerLink: void 0,
264
252
  transactionId: transactionCreationResponse.id
265
253
  };
266
254
  }
267
- return yield this.approveTransactionAndWait(transactionCreationResponse.id);
255
+ const result = yield this.approveTransactionAndWait(transactionCreationResponse.id);
256
+ walletsLogger.info("wallet.send.success", {
257
+ transactionId: transactionCreationResponse.id,
258
+ hash: result.hash
259
+ });
260
+ return result;
268
261
  });
269
262
  }
270
263
  /**
@@ -286,90 +279,109 @@ var Wallet = class {
286
279
  return yield this.approve(params);
287
280
  });
288
281
  }
289
- /**
290
- * Approve a transaction or signature
291
- * @param params - The parameters
292
- * @param params.transactionId - The transaction id or
293
- * @param params.signatureId - The signature id
294
- * @param params.options - The options for the transaction
295
- * @param params.options.experimental_approval - The approval
296
- * @param params.options.additionalSigners - The additional signers
297
- * @returns The transaction or signature
298
- */
299
282
  approve(params) {
300
283
  return __async(this, null, function* () {
284
+ walletsLogger.info("wallet.approve.start", {
285
+ transactionId: params.transactionId,
286
+ signatureId: params.signatureId
287
+ });
301
288
  if (params.transactionId != null) {
302
- return yield this.approveTransactionAndWait(params.transactionId, params.options);
289
+ const result = yield this.approveTransactionAndWait(
290
+ params.transactionId,
291
+ params.options
292
+ );
293
+ walletsLogger.info("wallet.approve.success", { transactionId: params.transactionId });
294
+ return result;
303
295
  }
304
296
  if (params.signatureId != null) {
305
- return yield this.approveSignatureAndWait(params.signatureId, params.options);
297
+ const result = yield this.approveSignatureAndWait(params.signatureId, params.options);
298
+ walletsLogger.info("wallet.approve.success", { signatureId: params.signatureId });
299
+ return result;
306
300
  }
301
+ walletsLogger.error("wallet.approve.error", {
302
+ error: "Either transactionId or signatureId must be provided"
303
+ });
307
304
  throw new Error("Either transactionId or signatureId must be provided");
308
305
  });
309
306
  }
310
- /**
311
- * Add a delegated signer to the wallet
312
- * @param signer - The signer. For Solana, it must be a string. For EVM, it can be a string or a passkey.
313
- * @param options - The options for the operation
314
- * @param options.experimental_prepareOnly - If true, returns the transaction/signature ID without auto-approving
315
- */
316
307
  addDelegatedSigner(params) {
317
308
  return __async(this, null, function* () {
318
309
  var _a, _b, _c;
310
+ walletsLogger.info("wallet.addDelegatedSigner.start");
319
311
  const response = yield __privateGet(this, _apiClient).registerSigner(this.walletLocator, {
320
312
  signer: params.signer,
321
313
  chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
322
314
  });
323
315
  if ("error" in response) {
316
+ walletsLogger.error("wallet.addDelegatedSigner.error", { error: response });
324
317
  throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
325
318
  }
326
319
  if (this.chain === "solana" || this.chain === "stellar") {
327
320
  if (!("transaction" in response) || response.transaction == null) {
321
+ walletsLogger.error("wallet.addDelegatedSigner.error", {
322
+ error: "Expected transaction in response for Solana/Stellar chain"
323
+ });
328
324
  throw new Error("Expected transaction in response for Solana/Stellar chain");
329
325
  }
330
326
  const transactionId = response.transaction.id;
331
327
  if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
328
+ walletsLogger.info("wallet.addDelegatedSigner.prepared", { transactionId });
332
329
  return { transactionId };
333
330
  }
334
331
  yield this.approveTransactionAndWait(transactionId);
332
+ walletsLogger.info("wallet.addDelegatedSigner.success", { transactionId });
335
333
  return void 0;
336
334
  }
337
335
  if (!("chains" in response)) {
336
+ walletsLogger.error("wallet.addDelegatedSigner.error", {
337
+ error: "Expected chains in response for EVM chain"
338
+ });
338
339
  throw new Error("Expected chains in response for EVM chain");
339
340
  }
340
341
  const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
341
342
  if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
342
343
  const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
344
+ walletsLogger.info("wallet.addDelegatedSigner.prepared", { signatureId });
343
345
  return { signatureId };
344
346
  }
345
347
  if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
346
348
  yield this.approveSignatureAndWait(chainResponse.id);
349
+ walletsLogger.info("wallet.addDelegatedSigner.success", { signatureId: chainResponse.id });
347
350
  return void 0;
348
351
  }
349
352
  if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
350
353
  yield this.waitForSignature(chainResponse.id);
354
+ walletsLogger.info("wallet.addDelegatedSigner.success", { signatureId: chainResponse.id });
351
355
  return void 0;
352
356
  }
357
+ walletsLogger.info("wallet.addDelegatedSigner.success");
353
358
  return void 0;
354
359
  });
355
360
  }
356
361
  delegatedSigners() {
357
362
  return __async(this, null, function* () {
358
363
  var _a, _b, _c;
364
+ walletsLogger.info("wallet.delegatedSigners.start");
359
365
  const walletResponse = yield __privateGet(this, _apiClient).getWallet(this.walletLocator);
360
366
  if ("error" in walletResponse) {
367
+ walletsLogger.error("wallet.delegatedSigners.error", { error: walletResponse });
361
368
  throw new WalletNotAvailableError(JSON.stringify(walletResponse));
362
369
  }
363
370
  if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
371
+ walletsLogger.error("wallet.delegatedSigners.error", {
372
+ error: `Wallet type ${walletResponse.type} not supported`
373
+ });
364
374
  throw new WalletTypeNotSupportedError(`Wallet type ${walletResponse.type} not supported`);
365
375
  }
366
- return (_c = (_b = (_a = walletResponse == null ? void 0 : walletResponse.config) == null ? void 0 : _a.delegatedSigners) == null ? void 0 : _b.map((signer) => {
376
+ const signers = (_c = (_b = (_a = walletResponse == null ? void 0 : walletResponse.config) == null ? void 0 : _a.delegatedSigners) == null ? void 0 : _b.map((signer) => {
367
377
  const colonIndex = signer.locator.indexOf(":");
368
378
  const address = colonIndex >= 0 ? signer.locator.slice(colonIndex + 1) : signer.locator;
369
379
  return {
370
380
  signer: `external-wallet:${address}`
371
381
  };
372
382
  })) != null ? _c : [];
383
+ walletsLogger.info("wallet.delegatedSigners.success", { count: signers.length });
384
+ return signers;
373
385
  });
374
386
  }
375
387
  get walletLocator() {
@@ -596,6 +608,60 @@ var Wallet = class {
596
608
  };
597
609
  _options = new WeakMap();
598
610
  _apiClient = new WeakMap();
611
+ __decorateClass([
612
+ WithLoggerContext({
613
+ logger: walletsLogger,
614
+ methodName: "wallet.balances",
615
+ buildContext(thisArg) {
616
+ return { chain: thisArg.chain, address: thisArg.address };
617
+ }
618
+ })
619
+ ], Wallet.prototype, "balances", 1);
620
+ __decorateClass([
621
+ WithLoggerContext({
622
+ logger: walletsLogger,
623
+ methodName: "wallet.stagingFund",
624
+ buildContext(thisArg) {
625
+ return { chain: thisArg.chain, address: thisArg.address };
626
+ }
627
+ })
628
+ ], Wallet.prototype, "stagingFund", 1);
629
+ __decorateClass([
630
+ WithLoggerContext({
631
+ logger: walletsLogger,
632
+ methodName: "wallet.send",
633
+ buildContext(thisArg) {
634
+ return { chain: thisArg.chain, address: thisArg.address };
635
+ }
636
+ })
637
+ ], Wallet.prototype, "send", 1);
638
+ __decorateClass([
639
+ WithLoggerContext({
640
+ logger: walletsLogger,
641
+ methodName: "wallet.approve",
642
+ buildContext(thisArg) {
643
+ return { chain: thisArg.chain, address: thisArg.address };
644
+ }
645
+ })
646
+ ], Wallet.prototype, "approve", 1);
647
+ __decorateClass([
648
+ WithLoggerContext({
649
+ logger: walletsLogger,
650
+ methodName: "wallet.addDelegatedSigner",
651
+ buildContext(thisArg) {
652
+ return { chain: thisArg.chain, address: thisArg.address };
653
+ }
654
+ })
655
+ ], Wallet.prototype, "addDelegatedSigner", 1);
656
+ __decorateClass([
657
+ WithLoggerContext({
658
+ logger: walletsLogger,
659
+ methodName: "wallet.delegatedSigners",
660
+ buildContext(thisArg) {
661
+ return { chain: thisArg.chain, address: thisArg.address };
662
+ }
663
+ })
664
+ ], Wallet.prototype, "delegatedSigners", 1);
599
665
  function toRecipientLocator(to) {
600
666
  if (typeof to === "string") {
601
667
  return to;
@@ -0,0 +1,25 @@
1
+ // src/chains/definitions/tempoTestnet.ts
2
+ import { defineChain } from "viem";
3
+ var tempoTestnet = defineChain({
4
+ id: 42429,
5
+ name: "Tempo Testnet",
6
+ nativeCurrency: {
7
+ decimals: 6,
8
+ name: "pathUSD",
9
+ symbol: "pathUSD"
10
+ },
11
+ rpcUrls: {
12
+ default: { http: ["https://rpc.testnet.tempo.xyz"] }
13
+ },
14
+ blockExplorers: {
15
+ default: {
16
+ name: "Tempo Scout",
17
+ url: "https://scout.tempo.xyz"
18
+ }
19
+ },
20
+ testnet: true
21
+ });
22
+
23
+ export {
24
+ tempoTestnet
25
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
3
+ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
4
4
 
5
5
  // src/signers/evm-api-key.ts
6
6
  var EVMApiKeySigner = class {
@@ -12,7 +12,7 @@ var EVMApiKeySigner = class {
12
12
  return this.config.locator;
13
13
  }
14
14
  signMessage() {
15
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
15
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
16
16
  return yield Promise.reject(
17
17
  new Error(
18
18
  "API key signers do not support direct message signing - signatures are handled automatically by the backend"
@@ -21,7 +21,7 @@ var EVMApiKeySigner = class {
21
21
  });
22
22
  }
23
23
  signTransaction() {
24
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
24
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
25
25
  return yield Promise.reject(
26
26
  new Error(
27
27
  "API key signers do not support direct transaction signing - transaction are handled automatically by the backend"
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  WalletFactory
3
- } from "./chunk-3ZIQQ4PW.js";
3
+ } from "./chunk-NIHJXITI.js";
4
4
  import {
5
5
  ApiClient
6
- } from "./chunk-SXR4KWXS.js";
6
+ } from "./chunk-CQNVHQHH.js";
7
7
  import {
8
8
  initWalletsLogger,
9
9
  walletsLogger
10
- } from "./chunk-VRMQGFQX.js";
10
+ } from "./chunk-ZJUXMOUB.js";
11
11
  import {
12
12
  __async
13
- } from "./chunk-FPMW7Q5O.js";
13
+ } from "./chunk-ASE2FXWP.js";
14
14
 
15
15
  // src/sdk.ts
16
16
  import { createCrossmint } from "@crossmint/common-sdk-base";
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@crossmint/wallets-sdk";
3
- var version = "0.18.8";
3
+ var version = "0.18.10";
4
4
 
5
5
  // src/utils/constants.ts
6
6
  var WALLETS_SERVICE = "WALLETS_SDK";
@@ -1,23 +1,23 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkEAMPCH35cjs = require('./chunk-EAMPCH35.cjs');
4
+ var _chunkTEQYWMHScjs = require('./chunk-TEQYWMHS.cjs');
5
5
 
6
6
 
7
- var _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
7
+ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
8
8
 
9
9
  // src/signers/non-custodial/ncs-stellar-signer.ts
10
- var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkEAMPCH35cjs.NonCustodialSigner {
10
+ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkTEQYWMHScjs.NonCustodialSigner {
11
11
  constructor(config) {
12
12
  super(config);
13
13
  }
14
14
  signMessage() {
15
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
15
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
16
16
  return yield Promise.reject(new Error("signMessage method not implemented for stellar signer"));
17
17
  });
18
18
  }
19
19
  signTransaction(payload) {
20
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
20
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
21
21
  var _a;
22
22
  yield this.handleAuthRequired();
23
23
  const jwt = this.getJwtOrThrow();
@@ -35,7 +35,7 @@ var StellarNonCustodialSigner = class _StellarNonCustodialSigner extends _chunkE
35
35
  encoding: "base64"
36
36
  }
37
37
  },
38
- options: _chunkEAMPCH35cjs.DEFAULT_EVENT_OPTIONS
38
+ options: _chunkTEQYWMHScjs.DEFAULT_EVENT_OPTIONS
39
39
  });
40
40
  if ((res == null ? void 0 : res.status) === "error") {
41
41
  throw new Error(res.error);