@crossmint/wallets-sdk 0.18.15 → 0.20.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.
Files changed (99) hide show
  1. package/dist/api/__tests__/test-utils.cjs +5 -5
  2. package/dist/api/__tests__/test-utils.js +3 -3
  3. package/dist/api/client.cjs +4 -4
  4. package/dist/api/client.js +3 -3
  5. package/dist/api/gen/types.gen.d.cts +8 -0
  6. package/dist/api/gen/types.gen.d.ts +8 -0
  7. package/dist/api/index.cjs +5 -5
  8. package/dist/api/index.js +4 -4
  9. package/dist/chains/chains.cjs +15 -3
  10. package/dist/chains/chains.d.cts +15 -1
  11. package/dist/chains/chains.d.ts +15 -1
  12. package/dist/chains/chains.js +16 -4
  13. package/dist/chains/definitions/tempoTestnet.cjs +2 -2
  14. package/dist/chains/definitions/tempoTestnet.d.cts +4 -4
  15. package/dist/chains/definitions/tempoTestnet.d.ts +4 -4
  16. package/dist/chains/definitions/tempoTestnet.js +1 -1
  17. package/dist/{chunk-5YX2BE4I.js → chunk-24DGWV3E.js} +10 -5
  18. package/dist/{chunk-OOVNMAQF.js → chunk-2APY4BUJ.js} +74 -24
  19. package/dist/{chunk-PRQOFWLH.cjs → chunk-2XDIXELO.cjs} +12 -3
  20. package/dist/{chunk-PADJ2CIV.cjs → chunk-4ID6ZK4A.cjs} +96 -46
  21. package/dist/{chunk-JDAWNKQ7.cjs → chunk-6LVFMXDR.cjs} +29 -24
  22. package/dist/{chunk-AUNZEGWS.cjs → chunk-6S7BKBVM.cjs} +7 -7
  23. package/dist/{chunk-SCU5YLUT.js → chunk-7EXE5FZJ.js} +10 -1
  24. package/dist/{chunk-WQDGFD34.js → chunk-7OW5LYR6.js} +2 -2
  25. package/dist/{chunk-IZJUOXOZ.js → chunk-AXQLP7Z6.js} +4 -4
  26. package/dist/{chunk-PHIXNAMT.js → chunk-AZQFMK3I.js} +10 -1
  27. package/dist/{chunk-CJWHHO4B.js → chunk-BQN5PNZK.js} +1 -1
  28. package/dist/{chunk-LFUXRLJR.js → chunk-DF3SZX2E.js} +1 -1
  29. package/dist/{chunk-OWRKZD7H.cjs → chunk-GEHZRAAJ.cjs} +69 -3
  30. package/dist/{chunk-VM6OLXBS.js → chunk-GWLAO3PX.js} +32 -9
  31. package/dist/{chunk-77HEKAFB.cjs → chunk-GXEWWYHT.cjs} +12 -3
  32. package/dist/{chunk-GSDBCRGH.js → chunk-IAZHXIFV.js} +3 -3
  33. package/dist/{chunk-BMXG52BZ.cjs → chunk-KVYY4QDB.cjs} +36 -13
  34. package/dist/{chunk-ZM437XPQ.js → chunk-MUIINXJY.js} +16 -4
  35. package/dist/{chunk-YZOPFNY3.js → chunk-MZBMV54C.js} +2 -2
  36. package/dist/{chunk-6H6ZBJC2.cjs → chunk-NN2NBBTN.cjs} +4 -4
  37. package/dist/{chunk-AKJOFUXU.cjs → chunk-PRNZJUHI.cjs} +9 -9
  38. package/dist/{chunk-AKAJ7UHQ.cjs → chunk-RJY4GT2D.cjs} +12 -3
  39. package/dist/{chunk-TOTOITTM.js → chunk-SAZ76VGQ.js} +2 -2
  40. package/dist/{chunk-QCTTQ4XE.cjs → chunk-SEV3UBGK.cjs} +32 -20
  41. package/dist/{chunk-OTI3LX45.cjs → chunk-TNASR6QE.cjs} +9 -9
  42. package/dist/{chunk-PJTTM5QQ.cjs → chunk-TQKCX7VN.cjs} +1 -1
  43. package/dist/{chunk-WMUNQJYD.cjs → chunk-VKXKQ5YI.cjs} +3 -3
  44. package/dist/{chunk-XVFUAZJY.js → chunk-WBTM7E5O.js} +69 -3
  45. package/dist/{chunk-YT64AZL6.cjs → chunk-XM4Y4HS5.cjs} +6 -6
  46. package/dist/{chunk-V65OBC5I.js → chunk-YDFIY5ER.js} +3 -3
  47. package/dist/{chunk-4ZFP3ST7.js → chunk-ZKWJY2VO.js} +10 -1
  48. package/dist/{chunk-NFQT5TFO.cjs → chunk-ZLPFQ56Q.cjs} +12 -12
  49. package/dist/index.cjs +18 -18
  50. package/dist/index.js +17 -17
  51. package/dist/logger/index.cjs +3 -3
  52. package/dist/logger/index.js +2 -2
  53. package/dist/logger/init.cjs +3 -3
  54. package/dist/logger/init.js +2 -2
  55. package/dist/sdk.cjs +18 -13
  56. package/dist/sdk.js +17 -12
  57. package/dist/signers/index.cjs +8 -8
  58. package/dist/signers/index.d.cts +1 -1
  59. package/dist/signers/index.d.ts +1 -1
  60. package/dist/signers/index.js +7 -7
  61. package/dist/signers/non-custodial/index.cjs +7 -7
  62. package/dist/signers/non-custodial/index.js +6 -6
  63. package/dist/signers/non-custodial/ncs-evm-signer.cjs +5 -5
  64. package/dist/signers/non-custodial/ncs-evm-signer.js +4 -4
  65. package/dist/signers/non-custodial/ncs-signer.cjs +4 -4
  66. package/dist/signers/non-custodial/ncs-signer.js +3 -3
  67. package/dist/signers/non-custodial/ncs-solana-signer.cjs +5 -5
  68. package/dist/signers/non-custodial/ncs-solana-signer.js +4 -4
  69. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +5 -5
  70. package/dist/signers/non-custodial/ncs-stellar-signer.js +4 -4
  71. package/dist/utils/constants.cjs +2 -2
  72. package/dist/utils/constants.js +1 -1
  73. package/dist/wallets/__tests__/test-helpers.cjs +15 -8
  74. package/dist/wallets/__tests__/test-helpers.d.cts +2 -1
  75. package/dist/wallets/__tests__/test-helpers.d.ts +2 -1
  76. package/dist/wallets/__tests__/test-helpers.js +14 -7
  77. package/dist/wallets/evm.cjs +12 -12
  78. package/dist/wallets/evm.d.cts +20 -0
  79. package/dist/wallets/evm.d.ts +20 -0
  80. package/dist/wallets/evm.js +11 -11
  81. package/dist/wallets/solana.cjs +14 -9
  82. package/dist/wallets/solana.d.cts +6 -1
  83. package/dist/wallets/solana.d.ts +6 -1
  84. package/dist/wallets/solana.js +13 -8
  85. package/dist/wallets/stellar.cjs +14 -9
  86. package/dist/wallets/stellar.d.cts +6 -1
  87. package/dist/wallets/stellar.d.ts +6 -1
  88. package/dist/wallets/stellar.js +13 -8
  89. package/dist/wallets/types.d.cts +6 -2
  90. package/dist/wallets/types.d.ts +6 -2
  91. package/dist/wallets/wallet-factory.cjs +15 -10
  92. package/dist/wallets/wallet-factory.d.cts +1 -0
  93. package/dist/wallets/wallet-factory.d.ts +1 -0
  94. package/dist/wallets/wallet-factory.js +14 -9
  95. package/dist/wallets/wallet.cjs +13 -8
  96. package/dist/wallets/wallet.d.cts +7 -2
  97. package/dist/wallets/wallet.d.ts +7 -2
  98. package/dist/wallets/wallet.js +12 -7
  99. package/package.json +7 -7
@@ -9,10 +9,10 @@
9
9
  var _chunkG6QJHFSYcjs = require('../../chunk-G6QJHFSY.cjs');
10
10
 
11
11
 
12
- var _chunkNFQT5TFOcjs = require('../../chunk-NFQT5TFO.cjs');
12
+ var _chunkZLPFQ56Qcjs = require('../../chunk-ZLPFQ56Q.cjs');
13
13
  require('../../chunk-XC2V34TS.cjs');
14
- require('../../chunk-WMUNQJYD.cjs');
15
- require('../../chunk-PJTTM5QQ.cjs');
14
+ require('../../chunk-VKXKQ5YI.cjs');
15
+ require('../../chunk-TQKCX7VN.cjs');
16
16
 
17
17
 
18
18
 
@@ -46,7 +46,7 @@ var createMockCrossmint = (overrides = {}) => {
46
46
  });
47
47
  };
48
48
  var createTestApiClient = (crossmint) => {
49
- return new (0, _chunkNFQT5TFOcjs.ApiClient)(crossmint || createMockCrossmint());
49
+ return new (0, _chunkZLPFQ56Qcjs.ApiClient)(crossmint || createMockCrossmint());
50
50
  };
51
51
  var createServerSideApiClient = () => {
52
52
  const apiClient = createTestApiClient();
@@ -186,7 +186,7 @@ var createIntegrationApiClient = (apiKey, baseUrl, overrides = {}) => {
186
186
  setJwt: () => crossmint,
187
187
  experimental_setCustomAuth: () => crossmint
188
188
  });
189
- return new (0, _chunkNFQT5TFOcjs.ApiClient)(crossmint);
189
+ return new (0, _chunkZLPFQ56Qcjs.ApiClient)(crossmint);
190
190
  };
191
191
  var TestDataFactory = class {
192
192
  constructor() {
@@ -9,10 +9,10 @@ import {
9
9
  } from "../../chunk-PJOJIRTY.js";
10
10
  import {
11
11
  ApiClient
12
- } from "../../chunk-YZOPFNY3.js";
12
+ } from "../../chunk-MZBMV54C.js";
13
13
  import "../../chunk-SGINWAB6.js";
14
- import "../../chunk-LFUXRLJR.js";
15
- import "../../chunk-CJWHHO4B.js";
14
+ import "../../chunk-DF3SZX2E.js";
15
+ import "../../chunk-BQN5PNZK.js";
16
16
  import {
17
17
  __async,
18
18
  __spreadProps,
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkNFQT5TFOcjs = require('../chunk-NFQT5TFO.cjs');
3
+ var _chunkZLPFQ56Qcjs = require('../chunk-ZLPFQ56Q.cjs');
4
4
  require('../chunk-XC2V34TS.cjs');
5
- require('../chunk-WMUNQJYD.cjs');
6
- require('../chunk-PJTTM5QQ.cjs');
5
+ require('../chunk-VKXKQ5YI.cjs');
6
+ require('../chunk-TQKCX7VN.cjs');
7
7
  require('../chunk-UO2J2ZB2.cjs');
8
8
 
9
9
 
10
- exports.ApiClient = _chunkNFQT5TFOcjs.ApiClient;
10
+ exports.ApiClient = _chunkZLPFQ56Qcjs.ApiClient;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ApiClient
3
- } from "../chunk-YZOPFNY3.js";
3
+ } from "../chunk-MZBMV54C.js";
4
4
  import "../chunk-SGINWAB6.js";
5
- import "../chunk-LFUXRLJR.js";
6
- import "../chunk-CJWHHO4B.js";
5
+ import "../chunk-DF3SZX2E.js";
6
+ import "../chunk-BQN5PNZK.js";
7
7
  import "../chunk-ASE2FXWP.js";
8
8
  export {
9
9
  ApiClient
@@ -2610,6 +2610,10 @@ type SendTokenDto = {
2610
2610
  * Amount of tokens to transfer (in decimal format)
2611
2611
  */
2612
2612
  amount?: string;
2613
+ /**
2614
+ * Specifies the type of transaction. Choose 'direct' for standard interactions or 'regulated-transfer' for operations requiring compliance checks.
2615
+ */
2616
+ transactionType?: 'direct' | 'regulated-transfer' | 'onramp';
2613
2617
  };
2614
2618
  /**
2615
2619
  * Base fields for all token transfers
@@ -2649,6 +2653,10 @@ type SendTokenV2025Dto = {
2649
2653
  type: 'hash';
2650
2654
  value: string;
2651
2655
  };
2656
+ /**
2657
+ * Specifies the type of transaction. Choose 'direct' for standard interactions or 'regulated-transfer' for operations requiring compliance checks.
2658
+ */
2659
+ transactionType?: 'direct' | 'regulated-transfer' | 'onramp';
2652
2660
  };
2653
2661
  /**
2654
2662
  * Input for submitting one or more approvals
@@ -2610,6 +2610,10 @@ type SendTokenDto = {
2610
2610
  * Amount of tokens to transfer (in decimal format)
2611
2611
  */
2612
2612
  amount?: string;
2613
+ /**
2614
+ * Specifies the type of transaction. Choose 'direct' for standard interactions or 'regulated-transfer' for operations requiring compliance checks.
2615
+ */
2616
+ transactionType?: 'direct' | 'regulated-transfer' | 'onramp';
2613
2617
  };
2614
2618
  /**
2615
2619
  * Base fields for all token transfers
@@ -2649,6 +2653,10 @@ type SendTokenV2025Dto = {
2649
2653
  type: 'hash';
2650
2654
  value: string;
2651
2655
  };
2656
+ /**
2657
+ * Specifies the type of transaction. Choose 'direct' for standard interactions or 'regulated-transfer' for operations requiring compliance checks.
2658
+ */
2659
+ transactionType?: 'direct' | 'regulated-transfer' | 'onramp';
2652
2660
  };
2653
2661
  /**
2654
2662
  * Input for submitting one or more approvals
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');
2
2
 
3
3
 
4
- var _chunkNFQT5TFOcjs = require('../chunk-NFQT5TFO.cjs');
5
- require('../chunk-XC2V34TS.cjs');
4
+ var _chunkZLPFQ56Qcjs = require('../chunk-ZLPFQ56Q.cjs');
6
5
  require('../chunk-ECAM5KTH.cjs');
7
- require('../chunk-WMUNQJYD.cjs');
8
- require('../chunk-PJTTM5QQ.cjs');
6
+ require('../chunk-XC2V34TS.cjs');
7
+ require('../chunk-VKXKQ5YI.cjs');
8
+ require('../chunk-TQKCX7VN.cjs');
9
9
  require('../chunk-UO2J2ZB2.cjs');
10
10
 
11
11
 
12
- exports.ApiClient = _chunkNFQT5TFOcjs.ApiClient;
12
+ exports.ApiClient = _chunkZLPFQ56Qcjs.ApiClient;
package/dist/api/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import "../chunk-5IFDVB4Y.js";
2
2
  import {
3
3
  ApiClient
4
- } from "../chunk-YZOPFNY3.js";
5
- import "../chunk-SGINWAB6.js";
4
+ } from "../chunk-MZBMV54C.js";
6
5
  import "../chunk-KBJA7JDT.js";
7
- import "../chunk-LFUXRLJR.js";
8
- import "../chunk-CJWHHO4B.js";
6
+ import "../chunk-SGINWAB6.js";
7
+ import "../chunk-DF3SZX2E.js";
8
+ import "../chunk-BQN5PNZK.js";
9
9
  import "../chunk-ASE2FXWP.js";
10
10
  export {
11
11
  ApiClient
@@ -1,11 +1,23 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkOWRKZD7Hcjs = require('../chunk-OWRKZD7H.cjs');
3
+
4
+
5
+
6
+
7
+ var _chunkGEHZRAAJcjs = require('../chunk-GEHZRAAJ.cjs');
4
8
  require('../chunk-NIBKCMQ2.cjs');
5
9
  require('../chunk-55V4VMTX.cjs');
6
- require('../chunk-6H6ZBJC2.cjs');
10
+ require('../chunk-NN2NBBTN.cjs');
7
11
  require('../chunk-HTSQPZHW.cjs');
12
+ require('../chunk-XC2V34TS.cjs');
13
+ require('../chunk-CCIGWTAO.cjs');
14
+ require('../chunk-VKXKQ5YI.cjs');
15
+ require('../chunk-TQKCX7VN.cjs');
8
16
  require('../chunk-UO2J2ZB2.cjs');
9
17
 
10
18
 
11
- exports.toViemChain = _chunkOWRKZD7Hcjs.toViemChain;
19
+
20
+
21
+
22
+
23
+ exports.isMainnetChain = _chunkGEHZRAAJcjs.isMainnetChain; exports.isTestnetChain = _chunkGEHZRAAJcjs.isTestnetChain; exports.mainnetToTestnet = _chunkGEHZRAAJcjs.mainnetToTestnet; exports.toViemChain = _chunkGEHZRAAJcjs.toViemChain; exports.validateChainForEnvironment = _chunkGEHZRAAJcjs.validateChainForEnvironment;
@@ -1,3 +1,4 @@
1
+ import { APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
1
2
  import { Chain as Chain$1 } from 'viem';
2
3
 
3
4
  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"];
@@ -10,5 +11,18 @@ type SolanaChain = "solana";
10
11
  type StellarChain = "stellar";
11
12
  type EVMChain = EVMSmartWalletChain;
12
13
  type Chain = SolanaChain | EVMChain | StellarChain;
14
+ declare function isTestnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletTestnet;
15
+ declare function isMainnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletMainnet;
16
+ declare function mainnetToTestnet(chain: EVMSmartWalletMainnet): EVMSmartWalletTestnet | undefined;
17
+ /**
18
+ * Validates that a chain is appropriate for the given environment.
19
+ * In production, only mainnet chains are allowed - throws if a testnet chain is used.
20
+ * In non-production environments, mainnet chains are automatically converted to their testnet equivalent.
21
+ *
22
+ * @param chain - The chain to validate
23
+ * @param environment - The API key environment prefix
24
+ * @returns The validated (and potentially converted) chain
25
+ */
26
+ declare function validateChainForEnvironment<C extends Chain>(chain: C, environment: APIKeyEnvironmentPrefix): C;
13
27
 
14
- export { type Chain, type EVMChain, type EVMSmartWalletChain, type EVMSmartWalletMainnet, type EVMSmartWalletTestnet, type SolanaChain, type StellarChain, toViemChain };
28
+ export { type Chain, type EVMChain, type EVMSmartWalletChain, type EVMSmartWalletMainnet, type EVMSmartWalletTestnet, type SolanaChain, type StellarChain, isMainnetChain, isTestnetChain, mainnetToTestnet, toViemChain, validateChainForEnvironment };
@@ -1,3 +1,4 @@
1
+ import { APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
1
2
  import { Chain as Chain$1 } from 'viem';
2
3
 
3
4
  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"];
@@ -10,5 +11,18 @@ type SolanaChain = "solana";
10
11
  type StellarChain = "stellar";
11
12
  type EVMChain = EVMSmartWalletChain;
12
13
  type Chain = SolanaChain | EVMChain | StellarChain;
14
+ declare function isTestnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletTestnet;
15
+ declare function isMainnetChain(chain: EVMSmartWalletChain): chain is EVMSmartWalletMainnet;
16
+ declare function mainnetToTestnet(chain: EVMSmartWalletMainnet): EVMSmartWalletTestnet | undefined;
17
+ /**
18
+ * Validates that a chain is appropriate for the given environment.
19
+ * In production, only mainnet chains are allowed - throws if a testnet chain is used.
20
+ * In non-production environments, mainnet chains are automatically converted to their testnet equivalent.
21
+ *
22
+ * @param chain - The chain to validate
23
+ * @param environment - The API key environment prefix
24
+ * @returns The validated (and potentially converted) chain
25
+ */
26
+ declare function validateChainForEnvironment<C extends Chain>(chain: C, environment: APIKeyEnvironmentPrefix): C;
13
27
 
14
- export { type Chain, type EVMChain, type EVMSmartWalletChain, type EVMSmartWalletMainnet, type EVMSmartWalletTestnet, type SolanaChain, type StellarChain, toViemChain };
28
+ export { type Chain, type EVMChain, type EVMSmartWalletChain, type EVMSmartWalletMainnet, type EVMSmartWalletTestnet, type SolanaChain, type StellarChain, isMainnetChain, isTestnetChain, mainnetToTestnet, toViemChain, validateChainForEnvironment };
@@ -1,11 +1,23 @@
1
1
  import {
2
- toViemChain
3
- } from "../chunk-XVFUAZJY.js";
2
+ isMainnetChain,
3
+ isTestnetChain,
4
+ mainnetToTestnet,
5
+ toViemChain,
6
+ validateChainForEnvironment
7
+ } from "../chunk-WBTM7E5O.js";
4
8
  import "../chunk-2T5HHKUI.js";
5
9
  import "../chunk-3U6UAYOV.js";
6
- import "../chunk-IZJUOXOZ.js";
10
+ import "../chunk-AXQLP7Z6.js";
7
11
  import "../chunk-ZBLW42YE.js";
12
+ import "../chunk-SGINWAB6.js";
13
+ import "../chunk-455NK5LB.js";
14
+ import "../chunk-DF3SZX2E.js";
15
+ import "../chunk-BQN5PNZK.js";
8
16
  import "../chunk-ASE2FXWP.js";
9
17
  export {
10
- toViemChain
18
+ isMainnetChain,
19
+ isTestnetChain,
20
+ mainnetToTestnet,
21
+ toViemChain,
22
+ validateChainForEnvironment
11
23
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk6H6ZBJC2cjs = require('../../chunk-6H6ZBJC2.cjs');
3
+ var _chunkNN2NBBTNcjs = require('../../chunk-NN2NBBTN.cjs');
4
4
  require('../../chunk-UO2J2ZB2.cjs');
5
5
 
6
6
 
7
- exports.tempoTestnet = _chunk6H6ZBJC2cjs.tempoTestnet;
7
+ exports.tempoTestnet = _chunkNN2NBBTNcjs.tempoTestnet;
@@ -3,8 +3,8 @@ import * as viem from 'viem';
3
3
  declare const tempoTestnet: {
4
4
  blockExplorers: {
5
5
  readonly default: {
6
- readonly name: "Tempo Scout";
7
- readonly url: "https://scout.tempo.xyz";
6
+ readonly name: "Tempo Explorer";
7
+ readonly url: "https://explore.tempo.xyz";
8
8
  };
9
9
  };
10
10
  blockTime?: number | undefined;
@@ -19,7 +19,7 @@ declare const tempoTestnet: {
19
19
  universalSignatureVerifier?: viem.ChainContract | undefined;
20
20
  }> | undefined;
21
21
  ensTlds?: readonly string[] | undefined;
22
- id: 42429;
22
+ id: 42431;
23
23
  name: "Tempo Testnet";
24
24
  nativeCurrency: {
25
25
  readonly decimals: 6;
@@ -29,7 +29,7 @@ declare const tempoTestnet: {
29
29
  experimental_preconfirmationTime?: number | undefined;
30
30
  rpcUrls: {
31
31
  readonly default: {
32
- readonly http: readonly ["https://rpc.testnet.tempo.xyz"];
32
+ readonly http: readonly ["https://rpc.moderato.tempo.xyz"];
33
33
  };
34
34
  };
35
35
  sourceId?: number | undefined;
@@ -3,8 +3,8 @@ import * as viem from 'viem';
3
3
  declare const tempoTestnet: {
4
4
  blockExplorers: {
5
5
  readonly default: {
6
- readonly name: "Tempo Scout";
7
- readonly url: "https://scout.tempo.xyz";
6
+ readonly name: "Tempo Explorer";
7
+ readonly url: "https://explore.tempo.xyz";
8
8
  };
9
9
  };
10
10
  blockTime?: number | undefined;
@@ -19,7 +19,7 @@ declare const tempoTestnet: {
19
19
  universalSignatureVerifier?: viem.ChainContract | undefined;
20
20
  }> | undefined;
21
21
  ensTlds?: readonly string[] | undefined;
22
- id: 42429;
22
+ id: 42431;
23
23
  name: "Tempo Testnet";
24
24
  nativeCurrency: {
25
25
  readonly decimals: 6;
@@ -29,7 +29,7 @@ declare const tempoTestnet: {
29
29
  experimental_preconfirmationTime?: number | undefined;
30
30
  rpcUrls: {
31
31
  readonly default: {
32
- readonly http: readonly ["https://rpc.testnet.tempo.xyz"];
32
+ readonly http: readonly ["https://rpc.moderato.tempo.xyz"];
33
33
  };
34
34
  };
35
35
  sourceId?: number | undefined;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tempoTestnet
3
- } from "../../chunk-IZJUOXOZ.js";
3
+ } from "../../chunk-AXQLP7Z6.js";
4
4
  import "../../chunk-ASE2FXWP.js";
5
5
  export {
6
6
  tempoTestnet
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  Wallet
3
- } from "./chunk-OOVNMAQF.js";
3
+ } from "./chunk-2APY4BUJ.js";
4
+ import {
5
+ toViemChain
6
+ } from "./chunk-WBTM7E5O.js";
4
7
  import {
5
8
  InvalidTypedDataError,
6
9
  SignatureNotCreatedError,
7
10
  TransactionNotCreatedError
8
11
  } from "./chunk-SGINWAB6.js";
9
- import {
10
- toViemChain
11
- } from "./chunk-XVFUAZJY.js";
12
12
  import {
13
13
  walletsLogger
14
- } from "./chunk-LFUXRLJR.js";
14
+ } from "./chunk-DF3SZX2E.js";
15
15
  import {
16
16
  __async,
17
17
  __decorateClass
@@ -148,6 +148,11 @@ var _EVMWallet = class _EVMWallet extends Wallet {
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 createPublicClient({
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  NonCustodialSigner
3
- } from "./chunk-VM6OLXBS.js";
3
+ } from "./chunk-GWLAO3PX.js";
4
+ import {
5
+ validateChainForEnvironment
6
+ } from "./chunk-WBTM7E5O.js";
4
7
  import {
5
8
  InvalidSignerError,
6
9
  SignatureFailedError,
@@ -18,10 +21,10 @@ import {
18
21
  } from "./chunk-SGINWAB6.js";
19
22
  import {
20
23
  walletsLogger
21
- } from "./chunk-LFUXRLJR.js";
24
+ } from "./chunk-DF3SZX2E.js";
22
25
  import {
23
26
  STATUS_POLLING_INTERVAL_MS
24
- } from "./chunk-CJWHHO4B.js";
27
+ } from "./chunk-BQN5PNZK.js";
25
28
  import {
26
29
  __async,
27
30
  __decorateClass,
@@ -71,6 +74,7 @@ var Wallet = class {
71
74
  balances(tokens) {
72
75
  return __async(this, null, function* () {
73
76
  walletsLogger.info("wallet.balances.start");
77
+ const resolvedChain = this.resolveChainForEnvironment();
74
78
  let nativeToken;
75
79
  switch (this.chain) {
76
80
  case "solana":
@@ -85,7 +89,7 @@ var Wallet = class {
85
89
  }
86
90
  const allTokens = [nativeToken, "usdc", ...tokens != null ? tokens : []];
87
91
  const response = yield __privateGet(this, _apiClient).getBalance(this.address, {
88
- chains: [this.chain],
92
+ chains: [resolvedChain],
89
93
  tokens: allTokens
90
94
  });
91
95
  if ("error" in response) {
@@ -98,7 +102,10 @@ var Wallet = class {
98
102
  }
99
103
  stagingFund(amount, chain) {
100
104
  return __async(this, null, function* () {
101
- walletsLogger.info("wallet.stagingFund.start", { amount, chain: chain != null ? chain : this.chain });
105
+ walletsLogger.info("wallet.stagingFund.start", {
106
+ amount,
107
+ chain: chain != null ? chain : this.chain
108
+ });
102
109
  const response = yield this.apiClient.fundWallet(this.address, {
103
110
  amount,
104
111
  token: "usdxm",
@@ -107,7 +114,9 @@ var Wallet = class {
107
114
  chain: chain != null ? chain : this.chain
108
115
  });
109
116
  if ("error" in response) {
110
- walletsLogger.error("wallet.stagingFund.error", { error: response });
117
+ walletsLogger.error("wallet.stagingFund.error", {
118
+ error: response
119
+ });
111
120
  throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
112
121
  }
113
122
  walletsLogger.info("wallet.stagingFund.success");
@@ -128,7 +137,9 @@ var Wallet = class {
128
137
  } else if (this.chain === "stellar" && chainData != null && "contractId" in chainData) {
129
138
  chainSpecificField = { contractId: chainData.contractId };
130
139
  } else if (chainData != null && "contractAddress" in chainData) {
131
- chainSpecificField = { contractAddress: chainData.contractAddress };
140
+ chainSpecificField = {
141
+ contractAddress: chainData.contractAddress
142
+ };
132
143
  }
133
144
  return __spreadValues({
134
145
  symbol: (_b = tokenData.symbol) != null ? _b : "",
@@ -220,7 +231,8 @@ var Wallet = class {
220
231
  */
221
232
  experimental_activity() {
222
233
  return __async(this, null, function* () {
223
- const response = yield this.apiClient.experimental_activity(this.walletLocator, { chain: this.chain });
234
+ const resolvedChain = this.resolveChainForEnvironment();
235
+ const response = yield this.apiClient.experimental_activity(this.walletLocator, { chain: resolvedChain });
224
236
  if ("error" in response) {
225
237
  throw new Error(`Failed to get activity: ${JSON.stringify(response.message)}`);
226
238
  }
@@ -229,23 +241,32 @@ var Wallet = class {
229
241
  }
230
242
  send(to, token, amount, options) {
231
243
  return __async(this, null, function* () {
244
+ const resolvedChain = this.resolveChainForEnvironment();
232
245
  const recipient = toRecipientLocator(to);
233
- const tokenLocator = toTokenLocator(token, this.chain);
234
- walletsLogger.info("wallet.send.start", { recipient, token: tokenLocator, amount });
246
+ const tokenLocator = toTokenLocator(token, resolvedChain);
247
+ walletsLogger.info("wallet.send.start", __spreadValues({
248
+ recipient,
249
+ token: tokenLocator,
250
+ amount
251
+ }, (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {}));
235
252
  yield this.preAuthIfNeeded();
236
- const sendParams = __spreadValues({
253
+ const sendParams = __spreadValues(__spreadValues({
237
254
  recipient,
238
255
  amount
239
- }, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {});
256
+ }, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {}), (options == null ? void 0 : options.transactionType) != null ? { transactionType: options.transactionType } : {});
240
257
  const transactionCreationResponse = yield __privateGet(this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
241
258
  if ("message" in transactionCreationResponse) {
242
- walletsLogger.error("wallet.send.error", { error: transactionCreationResponse });
259
+ walletsLogger.error("wallet.send.error", {
260
+ error: transactionCreationResponse
261
+ });
243
262
  throw new TransactionNotCreatedError(
244
263
  `Failed to send token: ${JSON.stringify(transactionCreationResponse.message)}`
245
264
  );
246
265
  }
247
266
  if (options == null ? void 0 : options.experimental_prepareOnly) {
248
- walletsLogger.info("wallet.send.prepared", { transactionId: transactionCreationResponse.id });
267
+ walletsLogger.info("wallet.send.prepared", {
268
+ transactionId: transactionCreationResponse.id
269
+ });
249
270
  return {
250
271
  hash: void 0,
251
272
  explorerLink: void 0,
@@ -290,12 +311,16 @@ var Wallet = class {
290
311
  params.transactionId,
291
312
  params.options
292
313
  );
293
- walletsLogger.info("wallet.approve.success", { transactionId: params.transactionId });
314
+ walletsLogger.info("wallet.approve.success", {
315
+ transactionId: params.transactionId
316
+ });
294
317
  return result;
295
318
  }
296
319
  if (params.signatureId != null) {
297
320
  const result = yield this.approveSignatureAndWait(params.signatureId, params.options);
298
- walletsLogger.info("wallet.approve.success", { signatureId: params.signatureId });
321
+ walletsLogger.info("wallet.approve.success", {
322
+ signatureId: params.signatureId
323
+ });
299
324
  return result;
300
325
  }
301
326
  walletsLogger.error("wallet.approve.error", {
@@ -313,7 +338,9 @@ var Wallet = class {
313
338
  chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
314
339
  });
315
340
  if ("error" in response) {
316
- walletsLogger.error("wallet.addDelegatedSigner.error", { error: response });
341
+ walletsLogger.error("wallet.addDelegatedSigner.error", {
342
+ error: response
343
+ });
317
344
  throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
318
345
  }
319
346
  if (this.chain === "solana" || this.chain === "stellar") {
@@ -325,11 +352,15 @@ var Wallet = class {
325
352
  }
326
353
  const transactionId = response.transaction.id;
327
354
  if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
328
- walletsLogger.info("wallet.addDelegatedSigner.prepared", { transactionId });
355
+ walletsLogger.info("wallet.addDelegatedSigner.prepared", {
356
+ transactionId
357
+ });
329
358
  return { transactionId };
330
359
  }
331
360
  yield this.approveTransactionAndWait(transactionId);
332
- walletsLogger.info("wallet.addDelegatedSigner.success", { transactionId });
361
+ walletsLogger.info("wallet.addDelegatedSigner.success", {
362
+ transactionId
363
+ });
333
364
  return void 0;
334
365
  }
335
366
  if (!("chains" in response)) {
@@ -341,17 +372,23 @@ var Wallet = class {
341
372
  const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
342
373
  if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
343
374
  const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
344
- walletsLogger.info("wallet.addDelegatedSigner.prepared", { signatureId });
375
+ walletsLogger.info("wallet.addDelegatedSigner.prepared", {
376
+ signatureId
377
+ });
345
378
  return { signatureId };
346
379
  }
347
380
  if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
348
381
  yield this.approveSignatureAndWait(chainResponse.id);
349
- walletsLogger.info("wallet.addDelegatedSigner.success", { signatureId: chainResponse.id });
382
+ walletsLogger.info("wallet.addDelegatedSigner.success", {
383
+ signatureId: chainResponse.id
384
+ });
350
385
  return void 0;
351
386
  }
352
387
  if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
353
388
  yield this.waitForSignature(chainResponse.id);
354
- walletsLogger.info("wallet.addDelegatedSigner.success", { signatureId: chainResponse.id });
389
+ walletsLogger.info("wallet.addDelegatedSigner.success", {
390
+ signatureId: chainResponse.id
391
+ });
355
392
  return void 0;
356
393
  }
357
394
  walletsLogger.info("wallet.addDelegatedSigner.success");
@@ -364,7 +401,9 @@ var Wallet = class {
364
401
  walletsLogger.info("wallet.delegatedSigners.start");
365
402
  const walletResponse = yield __privateGet(this, _apiClient).getWallet(this.walletLocator);
366
403
  if ("error" in walletResponse) {
367
- walletsLogger.error("wallet.delegatedSigners.error", { error: walletResponse });
404
+ walletsLogger.error("wallet.delegatedSigners.error", {
405
+ error: walletResponse
406
+ });
368
407
  throw new WalletNotAvailableError(JSON.stringify(walletResponse));
369
408
  }
370
409
  if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
@@ -380,7 +419,9 @@ var Wallet = class {
380
419
  signer: `external-wallet:${address}`
381
420
  };
382
421
  })) != null ? _c : [];
383
- walletsLogger.info("wallet.delegatedSigners.success", { count: signers.length });
422
+ walletsLogger.info("wallet.delegatedSigners.success", {
423
+ count: signers.length
424
+ });
384
425
  return signers;
385
426
  });
386
427
  }
@@ -414,6 +455,13 @@ var Wallet = class {
414
455
  get isSolanaWallet() {
415
456
  return this.chain === "solana";
416
457
  }
458
+ resolveChainForEnvironment() {
459
+ const resolvedChain = validateChainForEnvironment(this.chain, __privateGet(this, _apiClient).environment);
460
+ if (resolvedChain !== this.chain) {
461
+ this.chain = resolvedChain;
462
+ }
463
+ return this.chain;
464
+ }
417
465
  approveTransactionAndWait(transactionId, options) {
418
466
  return __async(this, null, function* () {
419
467
  yield this.approveTransactionInternal(transactionId, options);
@@ -509,6 +557,7 @@ var Wallet = class {
509
557
  }
510
558
  executeApproveTransactionWithErrorHandling(transactionId, approvals) {
511
559
  return __async(this, null, function* () {
560
+ walletsLogger.info("wallet.approve: submitting approval to API", { transactionId });
512
561
  const approvedTransaction = yield __privateGet(this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
513
562
  approvals
514
563
  });
@@ -558,6 +607,7 @@ var Wallet = class {
558
607
  initialBackoffMs = STATUS_POLLING_INTERVAL_MS
559
608
  } = {}) {
560
609
  var _a;
610
+ walletsLogger.info("wallet.approve: waiting for transaction confirmation", { transactionId, timeoutMs });
561
611
  const startTime = Date.now();
562
612
  let transactionResponse;
563
613
  do {