@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
@@ -1,6 +1,6 @@
1
1
  import { Chain as Chain$1 } from 'viem';
2
2
 
3
- declare const TESTNET_AA_CHAINS: readonly ["abstract-testnet", "arbitrum-sepolia", "base-sepolia", "curtis", "ethereum-sepolia", "flow-testnet", "mantle-sepolia", "mode-sepolia", "optimism-sepolia", "plume-testnet", "polygon-amoy", "scroll-sepolia", "sei-atlantic-2-testnet", "story-testnet", "world-chain-sepolia", "zora-sepolia", "arc-testnet"];
3
+ declare const TESTNET_AA_CHAINS: readonly ["abstract-testnet", "arbitrum-sepolia", "base-sepolia", "curtis", "ethereum-sepolia", "flow-testnet", "mantle-sepolia", "mode-sepolia", "optimism-sepolia", "plume-testnet", "polygon-amoy", "scroll-sepolia", "sei-atlantic-2-testnet", "story-testnet", "world-chain-sepolia", "zora-sepolia", "arc-testnet", "tempo-testnet"];
4
4
  declare const PRODUCTION_AA_CHAINS: readonly ["abstract", "apechain", "arbitrum", "arbitrumnova", "base", "bsc", "flow", "mantle", "mode", "optimism", "plume", "polygon", "scroll", "sei-pacific-1", "shape", "story", "world-chain", "zora"];
5
5
  type EVMSmartWalletTestnet = (typeof TESTNET_AA_CHAINS)[number];
6
6
  type EVMSmartWalletMainnet = (typeof PRODUCTION_AA_CHAINS)[number];
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  toViemChain
3
- } from "../chunk-PROOTUIO.js";
3
+ } from "../chunk-NJTKHWXR.js";
4
+ import "../chunk-IZJUOXOZ.js";
5
+ import "../chunk-ZBLW42YE.js";
4
6
  import "../chunk-2T5HHKUI.js";
5
7
  import "../chunk-3U6UAYOV.js";
6
- import "../chunk-ZBLW42YE.js";
7
- import "../chunk-FPMW7Q5O.js";
8
+ import "../chunk-ASE2FXWP.js";
8
9
  export {
9
10
  toViemChain
10
11
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
  var _chunkHTSQPZHWcjs = require('../../chunk-HTSQPZHW.cjs');
4
- require('../../chunk-G5NYLGM5.cjs');
4
+ require('../../chunk-UO2J2ZB2.cjs');
5
5
 
6
6
 
7
7
  exports.arcTestnet = _chunkHTSQPZHWcjs.arcTestnet;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  arcTestnet
3
3
  } from "../../chunk-ZBLW42YE.js";
4
- import "../../chunk-FPMW7Q5O.js";
4
+ import "../../chunk-ASE2FXWP.js";
5
5
  export {
6
6
  arcTestnet
7
7
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
  var _chunkNIBKCMQ2cjs = require('../../chunk-NIBKCMQ2.cjs');
4
- require('../../chunk-G5NYLGM5.cjs');
4
+ require('../../chunk-UO2J2ZB2.cjs');
5
5
 
6
6
 
7
7
  exports.story = _chunkNIBKCMQ2cjs.story;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  story
3
3
  } from "../../chunk-2T5HHKUI.js";
4
- import "../../chunk-FPMW7Q5O.js";
4
+ import "../../chunk-ASE2FXWP.js";
5
5
  export {
6
6
  story
7
7
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
  var _chunk55V4VMTXcjs = require('../../chunk-55V4VMTX.cjs');
4
- require('../../chunk-G5NYLGM5.cjs');
4
+ require('../../chunk-UO2J2ZB2.cjs');
5
5
 
6
6
 
7
7
  exports.storyTestnet = _chunk55V4VMTXcjs.storyTestnet;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  storyTestnet
3
3
  } from "../../chunk-3U6UAYOV.js";
4
- import "../../chunk-FPMW7Q5O.js";
4
+ import "../../chunk-ASE2FXWP.js";
5
5
  export {
6
6
  storyTestnet
7
7
  };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk6H6ZBJC2cjs = require('../../chunk-6H6ZBJC2.cjs');
4
+ require('../../chunk-UO2J2ZB2.cjs');
5
+
6
+
7
+ exports.tempoTestnet = _chunk6H6ZBJC2cjs.tempoTestnet;
@@ -0,0 +1,43 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const tempoTestnet: {
4
+ blockExplorers: {
5
+ readonly default: {
6
+ readonly name: "Tempo Scout";
7
+ readonly url: "https://scout.tempo.xyz";
8
+ };
9
+ };
10
+ blockTime?: number | undefined;
11
+ contracts?: viem.Prettify<{
12
+ [key: string]: viem.ChainContract | {
13
+ [sourceId: number]: viem.ChainContract | undefined;
14
+ } | undefined;
15
+ } & {
16
+ ensRegistry?: viem.ChainContract | undefined;
17
+ ensUniversalResolver?: viem.ChainContract | undefined;
18
+ multicall3?: viem.ChainContract | undefined;
19
+ universalSignatureVerifier?: viem.ChainContract | undefined;
20
+ }> | undefined;
21
+ ensTlds?: readonly string[] | undefined;
22
+ id: 42429;
23
+ name: "Tempo Testnet";
24
+ nativeCurrency: {
25
+ readonly decimals: 6;
26
+ readonly name: "pathUSD";
27
+ readonly symbol: "pathUSD";
28
+ };
29
+ experimental_preconfirmationTime?: number | undefined;
30
+ rpcUrls: {
31
+ readonly default: {
32
+ readonly http: readonly ["https://rpc.testnet.tempo.xyz"];
33
+ };
34
+ };
35
+ sourceId?: number | undefined;
36
+ testnet: true;
37
+ custom?: Record<string, unknown> | undefined;
38
+ fees?: viem.ChainFees<undefined> | undefined;
39
+ formatters?: undefined;
40
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
41
+ };
42
+
43
+ export { tempoTestnet };
@@ -0,0 +1,43 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const tempoTestnet: {
4
+ blockExplorers: {
5
+ readonly default: {
6
+ readonly name: "Tempo Scout";
7
+ readonly url: "https://scout.tempo.xyz";
8
+ };
9
+ };
10
+ blockTime?: number | undefined;
11
+ contracts?: viem.Prettify<{
12
+ [key: string]: viem.ChainContract | {
13
+ [sourceId: number]: viem.ChainContract | undefined;
14
+ } | undefined;
15
+ } & {
16
+ ensRegistry?: viem.ChainContract | undefined;
17
+ ensUniversalResolver?: viem.ChainContract | undefined;
18
+ multicall3?: viem.ChainContract | undefined;
19
+ universalSignatureVerifier?: viem.ChainContract | undefined;
20
+ }> | undefined;
21
+ ensTlds?: readonly string[] | undefined;
22
+ id: 42429;
23
+ name: "Tempo Testnet";
24
+ nativeCurrency: {
25
+ readonly decimals: 6;
26
+ readonly name: "pathUSD";
27
+ readonly symbol: "pathUSD";
28
+ };
29
+ experimental_preconfirmationTime?: number | undefined;
30
+ rpcUrls: {
31
+ readonly default: {
32
+ readonly http: readonly ["https://rpc.testnet.tempo.xyz"];
33
+ };
34
+ };
35
+ sourceId?: number | undefined;
36
+ testnet: true;
37
+ custom?: Record<string, unknown> | undefined;
38
+ fees?: viem.ChainFees<undefined> | undefined;
39
+ formatters?: undefined;
40
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
41
+ };
42
+
43
+ export { tempoTestnet };
@@ -0,0 +1,7 @@
1
+ import {
2
+ tempoTestnet
3
+ } from "../../chunk-IZJUOXOZ.js";
4
+ import "../../chunk-ASE2FXWP.js";
5
+ export {
6
+ tempoTestnet
7
+ };
@@ -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/solana-api-key.ts
6
6
  var SolanaApiKeySigner = class {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DEFAULT_EVENT_OPTIONS,
3
3
  NonCustodialSigner
4
- } from "./chunk-NUOU3SCU.js";
4
+ } from "./chunk-RCK3ZEP7.js";
5
5
  import {
6
6
  __async
7
- } from "./chunk-FPMW7Q5O.js";
7
+ } from "./chunk-ASE2FXWP.js";
8
8
 
9
9
  // src/signers/non-custodial/ncs-solana-signer.ts
10
10
  import { VersionedTransaction } from "@solana/web3.js";
@@ -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/evm-external-wallet.ts
6
6
  var EVMExternalWalletSigner = class {
@@ -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/non-custodial/ncs-iframe-manager.ts
6
6
  var _clientsdkwindow = require('@crossmint/client-sdk-window');
@@ -11,7 +11,7 @@ var NcsIframeManager = class {
11
11
  this.handshakeParent = null;
12
12
  }
13
13
  initialize() {
14
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
14
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
15
15
  if (this.handshakeParent) {
16
16
  return this.handshakeParent;
17
17
  }
@@ -39,7 +39,7 @@ var NcsIframeManager = class {
39
39
  });
40
40
  }
41
41
  createInvisibleIFrame(url) {
42
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
42
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
43
43
  const iframe = document.createElement("iframe");
44
44
  iframe.src = url;
45
45
  Object.assign(iframe.style, {
@@ -4,23 +4,25 @@
4
4
  var _chunkRBHGZDDXcjs = require('./chunk-RBHGZDDX.cjs');
5
5
 
6
6
 
7
- var _chunkY24JAHPTcjs = require('./chunk-Y24JAHPT.cjs');
7
+ var _chunkQXJZ75GWcjs = require('./chunk-QXJZ75GW.cjs');
8
8
 
9
9
 
10
- var _chunk3LKDNHF5cjs = require('./chunk-3LKDNHF5.cjs');
10
+ var _chunk6Z5QSTIScjs = require('./chunk-6Z5QSTIS.cjs');
11
11
 
12
12
 
13
13
 
14
14
  var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
15
15
 
16
16
 
17
- var _chunkPCFXTJL4cjs = require('./chunk-PCFXTJL4.cjs');
17
+ var _chunkOWGPEA2Acjs = require('./chunk-OWGPEA2A.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkG5NYLGM5cjs = require('./chunk-G5NYLGM5.cjs');
21
+
22
+ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
22
23
 
23
24
  // src/wallets/wallet-factory.ts
25
+ var _commonsdkbase = require('@crossmint/common-sdk-base');
24
26
  var _ox = require('ox');
25
27
  var DELEGATED_SIGNER_MISMATCH_ERROR = "When 'delegatedSigners' is provided to a method that may fetch an existing wallet, each specified delegated signer must exist in that wallet's configuration.";
26
28
  var WalletFactory = class {
@@ -28,83 +30,73 @@ var WalletFactory = class {
28
30
  this.apiClient = apiClient;
29
31
  }
30
32
  getOrCreateWallet(args) {
31
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
33
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
32
34
  if (this.apiClient.isServerSide) {
35
+ _chunkOWGPEA2Acjs.walletsLogger.error("walletFactory.getOrCreateWallet.error", {
36
+ error: "getOrCreateWallet can only be called from client-side code"
37
+ });
33
38
  throw new (0, _chunkXC2V34TScjs.WalletCreationError)(
34
39
  "getOrCreateWallet can only be called from client-side code.\n- Make sure you're running this in the browser (or another client environment), not on your server.\n- Use your Crossmint Client API Key (not a server key)."
35
40
  );
36
41
  }
37
42
  const locator = this.getWalletLocator(args);
38
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.getOrCreate.start", {
39
- chain: args.chain,
40
- signerType: args.signer.type
41
- });
43
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getOrCreateWallet.start");
42
44
  const existingWallet = yield this.apiClient.getWallet(locator);
43
45
  if (existingWallet != null && !("error" in existingWallet)) {
44
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.getOrCreate.existing", {
45
- chain: args.chain,
46
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getOrCreateWallet.existing", {
46
47
  address: existingWallet.address
47
48
  });
48
49
  return this.createWalletInstance(existingWallet, args);
49
50
  }
50
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.getOrCreate.creating", {
51
- chain: args.chain
52
- });
51
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getOrCreateWallet.creating");
53
52
  return this.createWallet(args);
54
53
  });
55
54
  }
56
55
  getWallet(walletLocator, args) {
57
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
56
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
58
57
  if (!this.apiClient.isServerSide) {
58
+ _chunkOWGPEA2Acjs.walletsLogger.error("walletFactory.getWallet.error", {
59
+ error: "getWallet is not supported on client side"
60
+ });
59
61
  throw new (0, _chunkXC2V34TScjs.WalletCreationError)("getWallet is not supported on client side, use getOrCreateWallet instead");
60
62
  }
61
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.get.start", {
62
- walletLocator,
63
- chain: args.chain
64
- });
63
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getWallet.start");
65
64
  const existingWallet = yield this.apiClient.getWallet(walletLocator);
66
65
  if ("error" in existingWallet) {
67
- _chunkPCFXTJL4cjs.walletsLogger.warn("wallet.get.notFound", {
68
- walletLocator,
66
+ _chunkOWGPEA2Acjs.walletsLogger.warn("walletFactory.getWallet.notFound", {
69
67
  error: existingWallet.error
70
68
  });
71
69
  throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(existingWallet));
72
70
  }
73
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.get.success", {
74
- walletLocator,
71
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.getWallet.success", {
75
72
  address: existingWallet.address
76
73
  });
77
74
  return this.createWalletInstance(existingWallet, args);
78
75
  });
79
76
  }
80
77
  createWallet(args) {
81
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
78
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
82
79
  var _a, _b, _c, _d, _e;
83
80
  yield (_c = (_b = (_a = args.options) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onWalletCreationStart) == null ? void 0 : _c.call(_b);
84
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.create.start", {
85
- chain: args.chain,
86
- signerType: args.signer.type
87
- });
81
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.createWallet.start");
88
82
  this.mutateSignerFromCustomAuth(args, true);
89
83
  const adminSigner = args.signer.type === "passkey" ? yield this.createPasskeyAdminSigner(args.signer) : args.signer;
90
84
  const walletResponse = yield this.apiClient.createWallet({
91
85
  type: "smart",
92
86
  chainType: this.getChainType(args.chain),
93
- config: _chunkG5NYLGM5cjs.__spreadValues.call(void 0, _chunkG5NYLGM5cjs.__spreadValues.call(void 0, {
87
+ config: _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {
94
88
  adminSigner
95
89
  }, (args == null ? void 0 : args.plugins) ? { plugins: args.plugins } : {}), args.delegatedSigners != null ? { delegatedSigners: args.delegatedSigners } : {}),
96
90
  owner: (_d = args.owner) != null ? _d : void 0,
97
91
  alias: (_e = args.alias) != null ? _e : void 0
98
92
  });
99
93
  if ("error" in walletResponse) {
100
- _chunkPCFXTJL4cjs.walletsLogger.error("wallet.create.error", {
101
- chain: args.chain,
94
+ _chunkOWGPEA2Acjs.walletsLogger.error("walletFactory.createWallet.error", {
102
95
  error: walletResponse.error
103
96
  });
104
97
  throw new (0, _chunkXC2V34TScjs.WalletCreationError)(JSON.stringify(walletResponse));
105
98
  }
106
- _chunkPCFXTJL4cjs.walletsLogger.info("wallet.create.success", {
107
- chain: args.chain,
99
+ _chunkOWGPEA2Acjs.walletsLogger.info("walletFactory.createWallet.success", {
108
100
  address: walletResponse.address
109
101
  });
110
102
  return this.createWalletInstance(walletResponse, args);
@@ -113,12 +105,12 @@ var WalletFactory = class {
113
105
  createWalletInstance(walletResponse, args) {
114
106
  this.validateExistingWalletConfig(walletResponse, args);
115
107
  const signerConfig = this.toInternalSignerConfig(walletResponse, args.signer, args.options);
116
- return new (0, _chunkY24JAHPTcjs.Wallet)(
108
+ return new (0, _chunkQXJZ75GWcjs.Wallet)(
117
109
  {
118
110
  chain: args.chain,
119
111
  address: walletResponse.address,
120
112
  owner: walletResponse.owner,
121
- signer: _chunk3LKDNHF5cjs.assembleSigner.call(void 0, args.chain, signerConfig),
113
+ signer: _chunk6Z5QSTIScjs.assembleSigner.call(void 0, args.chain, signerConfig),
122
114
  options: args.options,
123
115
  alias: args.alias
124
116
  },
@@ -148,7 +140,7 @@ var WalletFactory = class {
148
140
  if (((_c = walletResponse.config) == null ? void 0 : _c.adminSigner.type) !== "external-wallet") {
149
141
  throw new (0, _chunkXC2V34TScjs.WalletCreationError)("External wallet signer does not match the wallet's signer type");
150
142
  }
151
- return _chunkG5NYLGM5cjs.__spreadValues.call(void 0, _chunkG5NYLGM5cjs.__spreadValues.call(void 0, {}, walletResponse.config.adminSigner), signerArgs);
143
+ return _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, walletResponse.config.adminSigner), signerArgs);
152
144
  case "passkey":
153
145
  if (((_d = walletResponse.config) == null ? void 0 : _d.adminSigner.type) !== "passkey") {
154
146
  throw new (0, _chunkXC2V34TScjs.WalletCreationError)("Passkey signer does not match the wallet's signer type");
@@ -199,7 +191,7 @@ var WalletFactory = class {
199
191
  return `me:${this.getChainType(args.chain)}:smart` + (args.alias != null ? `:alias:${args.alias}` : "");
200
192
  }
201
193
  createPasskeyAdminSigner(signer) {
202
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
194
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
203
195
  var _a;
204
196
  if (signer.type !== "passkey") {
205
197
  throw new Error("Signer is not a passkey");
@@ -295,6 +287,37 @@ var WalletFactory = class {
295
287
  return "evm";
296
288
  }
297
289
  };
290
+ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
291
+ _commonsdkbase.WithLoggerContext.call(void 0, {
292
+ logger: _chunkOWGPEA2Acjs.walletsLogger,
293
+ methodName: "walletFactory.getOrCreateWallet",
294
+ buildContext(_thisArg, args) {
295
+ const walletArgs = args[0];
296
+ return { chain: walletArgs.chain, signerType: walletArgs.signer.type };
297
+ }
298
+ })
299
+ ], WalletFactory.prototype, "getOrCreateWallet", 1);
300
+ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
301
+ _commonsdkbase.WithLoggerContext.call(void 0, {
302
+ logger: _chunkOWGPEA2Acjs.walletsLogger,
303
+ methodName: "walletFactory.getWallet",
304
+ buildContext(_thisArg, args) {
305
+ const walletLocator = args[0];
306
+ const walletArgs = args[1];
307
+ return { walletLocator, chain: walletArgs.chain };
308
+ }
309
+ })
310
+ ], WalletFactory.prototype, "getWallet", 1);
311
+ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
312
+ _commonsdkbase.WithLoggerContext.call(void 0, {
313
+ logger: _chunkOWGPEA2Acjs.walletsLogger,
314
+ methodName: "walletFactory.createWallet",
315
+ buildContext(_thisArg, args) {
316
+ const walletArgs = args[0];
317
+ return { chain: walletArgs.chain, signerType: walletArgs.signer.type };
318
+ }
319
+ })
320
+ ], WalletFactory.prototype, "createWallet", 1);
298
321
 
299
322
 
300
323
 
@@ -0,0 +1,25 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/tempoTestnet.ts
2
+ var _viem = require('viem');
3
+ var tempoTestnet = _viem.defineChain.call(void 0, {
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
+
24
+
25
+ exports.tempoTestnet = tempoTestnet;
@@ -0,0 +1,58 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkWFGKVGZ2cjs = require('./chunk-WFGKVGZ2.cjs');
4
+
5
+
6
+ var _chunkAN7MHABMcjs = require('./chunk-AN7MHABM.cjs');
7
+
8
+
9
+ var _chunkMNJA5EPYcjs = require('./chunk-MNJA5EPY.cjs');
10
+
11
+
12
+ var _chunkJSWTGW46cjs = require('./chunk-JSWTGW46.cjs');
13
+
14
+
15
+ var _chunkZTEMOYS2cjs = require('./chunk-ZTEMOYS2.cjs');
16
+
17
+
18
+ var _chunkZNAGDENGcjs = require('./chunk-ZNAGDENG.cjs');
19
+
20
+
21
+ var _chunkXOCC3MPKcjs = require('./chunk-XOCC3MPK.cjs');
22
+
23
+
24
+ var _chunkQ5KNPVYIcjs = require('./chunk-Q5KNPVYI.cjs');
25
+
26
+
27
+ var _chunkIOMKHF6Rcjs = require('./chunk-IOMKHF6R.cjs');
28
+
29
+ // src/signers/index.ts
30
+ function assembleSigner(chain, config) {
31
+ switch (config.type) {
32
+ case "email":
33
+ case "phone":
34
+ if (chain === "solana") {
35
+ return new (0, _chunkAN7MHABMcjs.SolanaNonCustodialSigner)(config);
36
+ }
37
+ if (chain === "stellar") {
38
+ return new (0, _chunkMNJA5EPYcjs.StellarNonCustodialSigner)(config);
39
+ }
40
+ return new (0, _chunkWFGKVGZ2cjs.EVMNonCustodialSigner)(config);
41
+ case "api-key":
42
+ return chain === "solana" ? new (0, _chunkXOCC3MPKcjs.SolanaApiKeySigner)(config) : new (0, _chunkJSWTGW46cjs.EVMApiKeySigner)(config);
43
+ case "external-wallet":
44
+ if (chain === "solana") {
45
+ return new (0, _chunkQ5KNPVYIcjs.SolanaExternalWalletSigner)(config);
46
+ }
47
+ if (chain === "stellar") {
48
+ return new (0, _chunkIOMKHF6Rcjs.StellarExternalWalletSigner)(config);
49
+ }
50
+ return new (0, _chunkZTEMOYS2cjs.EVMExternalWalletSigner)(config);
51
+ case "passkey":
52
+ return new (0, _chunkZNAGDENGcjs.PasskeySigner)(config);
53
+ }
54
+ }
55
+
56
+
57
+
58
+ exports.assembleSigner = assembleSigner;
@@ -1,20 +1,24 @@
1
1
  import {
2
2
  Wallet
3
- } from "./chunk-4NHVYWZC.js";
3
+ } from "./chunk-IYTDGUGZ.js";
4
4
  import {
5
5
  SolanaExternalWalletSigner
6
- } from "./chunk-DQCXGBZM.js";
6
+ } from "./chunk-PIFD6KNH.js";
7
7
  import {
8
8
  TransactionNotCreatedError
9
9
  } from "./chunk-SGINWAB6.js";
10
10
  import {
11
- __async
12
- } from "./chunk-FPMW7Q5O.js";
11
+ walletsLogger
12
+ } from "./chunk-ZJUXMOUB.js";
13
+ import {
14
+ __async,
15
+ __decorateClass
16
+ } from "./chunk-ASE2FXWP.js";
13
17
 
14
18
  // src/wallets/solana.ts
15
19
  import bs58 from "bs58";
16
- import { isValidSolanaAddress } from "@crossmint/common-sdk-base";
17
- var SolanaWallet = class _SolanaWallet extends Wallet {
20
+ import { isValidSolanaAddress, WithLoggerContext } from "@crossmint/common-sdk-base";
21
+ var _SolanaWallet = class _SolanaWallet extends Wallet {
18
22
  constructor(wallet) {
19
23
  super(
20
24
  {
@@ -37,9 +41,13 @@ var SolanaWallet = class _SolanaWallet extends Wallet {
37
41
  sendTransaction(params) {
38
42
  return __async(this, null, function* () {
39
43
  var _a, _b;
44
+ walletsLogger.info("solanaWallet.sendTransaction.start");
40
45
  yield this.preAuthIfNeeded();
41
46
  const createdTransaction = yield this.createTransaction(params);
42
47
  if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
48
+ walletsLogger.info("solanaWallet.sendTransaction.prepared", {
49
+ transactionId: createdTransaction.id
50
+ });
43
51
  return {
44
52
  hash: void 0,
45
53
  explorerLink: void 0,
@@ -60,7 +68,12 @@ var SolanaWallet = class _SolanaWallet extends Wallet {
60
68
  const options = {
61
69
  additionalSigners: _additionalSigners
62
70
  };
63
- return yield this.approveTransactionAndWait(createdTransaction.id, options);
71
+ const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
72
+ walletsLogger.info("solanaWallet.sendTransaction.success", {
73
+ transactionId: createdTransaction.id,
74
+ hash: result.hash
75
+ });
76
+ return result;
64
77
  });
65
78
  }
66
79
  createTransaction(params) {
@@ -86,6 +99,16 @@ var SolanaWallet = class _SolanaWallet extends Wallet {
86
99
  });
87
100
  }
88
101
  };
102
+ __decorateClass([
103
+ WithLoggerContext({
104
+ logger: walletsLogger,
105
+ methodName: "solanaWallet.sendTransaction",
106
+ buildContext(thisArg) {
107
+ return { chain: thisArg.chain, address: thisArg.address };
108
+ }
109
+ })
110
+ ], _SolanaWallet.prototype, "sendTransaction", 1);
111
+ var SolanaWallet = _SolanaWallet;
89
112
 
90
113
  export {
91
114
  SolanaWallet
@@ -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/evm-api-key.ts
6
6
  var EVMApiKeySigner = class {
@@ -1,25 +1,25 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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-solana-signer.ts
10
10
  var _web3js = require('@solana/web3.js');
11
11
  var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
12
- var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkEAMPCH35cjs.NonCustodialSigner {
12
+ var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkTEQYWMHScjs.NonCustodialSigner {
13
13
  constructor(config) {
14
14
  super(config);
15
15
  }
16
16
  signMessage() {
17
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
17
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
18
18
  return yield Promise.reject(new Error("signMessage method not implemented for email signer"));
19
19
  });
20
20
  }
21
21
  signTransaction(transaction) {
22
- return _chunkG5NYLGM5cjs.__async.call(void 0, this, null, function* () {
22
+ return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
23
23
  var _a;
24
24
  yield this.handleAuthRequired();
25
25
  const jwt = this.getJwtOrThrow();
@@ -40,7 +40,7 @@ var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkEAM
40
40
  encoding: "base58"
41
41
  }
42
42
  },
43
- options: _chunkEAMPCH35cjs.DEFAULT_EVENT_OPTIONS
43
+ options: _chunkTEQYWMHScjs.DEFAULT_EVENT_OPTIONS
44
44
  });
45
45
  if ((res == null ? void 0 : res.status) === "error") {
46
46
  throw new Error(res.error);