@crossmint/wallets-sdk 0.20.0 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/__tests__/test-utils.cjs +5 -5
- package/dist/api/__tests__/test-utils.js +3 -3
- package/dist/api/client.cjs +4 -4
- package/dist/api/client.js +3 -3
- package/dist/api/gen/types.gen.d.cts +35 -35
- package/dist/api/gen/types.gen.d.ts +35 -35
- package/dist/api/index.cjs +4 -4
- package/dist/api/index.js +3 -3
- package/dist/chains/chains.cjs +6 -5
- package/dist/chains/chains.d.cts +1 -1
- package/dist/chains/chains.d.ts +1 -1
- package/dist/chains/chains.js +5 -4
- package/dist/chains/definitions/tempo.cjs +7 -0
- package/dist/chains/definitions/tempo.d.cts +39 -0
- package/dist/chains/definitions/tempo.d.ts +39 -0
- package/dist/chains/definitions/tempo.js +7 -0
- package/dist/chains/definitions/tempoTestnet.cjs +2 -2
- package/dist/chains/definitions/tempoTestnet.d.cts +1 -5
- package/dist/chains/definitions/tempoTestnet.d.ts +1 -5
- package/dist/chains/definitions/tempoTestnet.js +1 -1
- package/dist/{chunk-WBTM7E5O.js → chunk-2WBSPOWU.js} +10 -3
- package/dist/{chunk-XM4Y4HS5.cjs → chunk-47R3UV3J.cjs} +6 -6
- package/dist/{chunk-SEV3UBGK.cjs → chunk-66UY53KP.cjs} +23 -23
- package/dist/{chunk-PRNZJUHI.cjs → chunk-6FG5QXII.cjs} +9 -9
- package/dist/{chunk-AZQFMK3I.js → chunk-6UMJYMAY.js} +2 -2
- package/dist/{chunk-GXEWWYHT.cjs → chunk-7TT3VUDF.cjs} +6 -6
- package/dist/chunk-7USEVMTW.cjs +21 -0
- package/dist/{chunk-24DGWV3E.js → chunk-A6E67ZZP.js} +3 -3
- package/dist/{chunk-DF3SZX2E.js → chunk-ABMZ3ZVN.js} +1 -1
- package/dist/{chunk-IAZHXIFV.js → chunk-CMBFV325.js} +3 -3
- package/dist/{chunk-NN2NBBTN.cjs → chunk-F7L2TZ3I.cjs} +1 -5
- package/dist/{chunk-2APY4BUJ.js → chunk-FHMKNG62.js} +4 -4
- package/dist/{chunk-ZKWJY2VO.js → chunk-FICVKSXZ.js} +2 -2
- package/dist/{chunk-7OW5LYR6.js → chunk-HXJ3YPAN.js} +2 -2
- package/dist/{chunk-TNASR6QE.cjs → chunk-IDKGJO2G.cjs} +9 -9
- package/dist/{chunk-VKXKQ5YI.cjs → chunk-JREZWZ2S.cjs} +3 -3
- package/dist/{chunk-AXQLP7Z6.js → chunk-JWMQALLN.js} +1 -5
- package/dist/{chunk-MUIINXJY.js → chunk-KQH5ZXJ4.js} +4 -4
- package/dist/chunk-MMISP35W.js +21 -0
- package/dist/{chunk-2XDIXELO.cjs → chunk-MRZXYVQO.cjs} +6 -6
- package/dist/{chunk-6LVFMXDR.cjs → chunk-PM7BGATN.cjs} +23 -23
- package/dist/{chunk-4ID6ZK4A.cjs → chunk-POG76HDD.cjs} +44 -44
- package/dist/{chunk-7EXE5FZJ.js → chunk-PUO4QNXH.js} +2 -2
- package/dist/{chunk-TQKCX7VN.cjs → chunk-R4AW5ADG.cjs} +1 -1
- package/dist/{chunk-6S7BKBVM.cjs → chunk-R6DH4V7S.cjs} +7 -7
- package/dist/{chunk-ZLPFQ56Q.cjs → chunk-RYQI3RXL.cjs} +12 -12
- package/dist/{chunk-YDFIY5ER.js → chunk-T2XUADHW.js} +5 -5
- package/dist/{chunk-BQN5PNZK.js → chunk-TYQ4YIP7.js} +1 -1
- package/dist/{chunk-GWLAO3PX.js → chunk-U3NV7UY7.js} +1 -1
- package/dist/{chunk-MZBMV54C.js → chunk-W7K5E64Q.js} +2 -2
- package/dist/{chunk-GEHZRAAJ.cjs → chunk-WDZY4PP4.cjs} +13 -6
- package/dist/{chunk-RJY4GT2D.cjs → chunk-WHTECI7J.cjs} +6 -6
- package/dist/{chunk-SAZ76VGQ.js → chunk-WWW6IGZ7.js} +2 -2
- package/dist/{chunk-KVYY4QDB.cjs → chunk-ZAX22GSI.cjs} +18 -18
- package/dist/index.cjs +18 -17
- package/dist/index.js +17 -16
- package/dist/logger/index.cjs +3 -3
- package/dist/logger/index.js +2 -2
- package/dist/logger/init.cjs +3 -3
- package/dist/logger/init.js +2 -2
- package/dist/sdk.cjs +15 -14
- package/dist/sdk.js +14 -13
- package/dist/signers/index.cjs +8 -8
- package/dist/signers/index.js +7 -7
- package/dist/signers/non-custodial/index.cjs +7 -7
- package/dist/signers/non-custodial/index.js +8 -8
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-evm-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-signer.cjs +4 -4
- package/dist/signers/non-custodial/ncs-signer.js +3 -3
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-solana-signer.js +4 -4
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +5 -5
- package/dist/signers/non-custodial/ncs-stellar-signer.js +4 -4
- package/dist/utils/constants.cjs +2 -2
- package/dist/utils/constants.js +1 -1
- package/dist/wallets/__tests__/test-helpers.cjs +11 -10
- package/dist/wallets/__tests__/test-helpers.js +10 -9
- package/dist/wallets/evm.cjs +12 -11
- package/dist/wallets/evm.js +11 -10
- package/dist/wallets/solana.cjs +12 -11
- package/dist/wallets/solana.js +11 -10
- package/dist/wallets/stellar.cjs +12 -11
- package/dist/wallets/stellar.js +11 -10
- package/dist/wallets/wallet-factory.cjs +13 -12
- package/dist/wallets/wallet-factory.js +12 -11
- package/dist/wallets/wallet.cjs +11 -10
- package/dist/wallets/wallet.js +10 -9
- package/package.json +3 -3
package/dist/chains/chains.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
|
|
|
2
2
|
import { Chain as Chain$1 } from 'viem';
|
|
3
3
|
|
|
4
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"];
|
|
5
|
-
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
|
+
declare const PRODUCTION_AA_CHAINS: readonly ["abstract", "apechain", "arbitrum", "arbitrumnova", "base", "bsc", "flow", "mantle", "mode", "optimism", "plume", "polygon", "scroll", "sei-pacific-1", "shape", "story", "tempo", "world-chain", "zora"];
|
|
6
6
|
type EVMSmartWalletTestnet = (typeof TESTNET_AA_CHAINS)[number];
|
|
7
7
|
type EVMSmartWalletMainnet = (typeof PRODUCTION_AA_CHAINS)[number];
|
|
8
8
|
type EVMSmartWalletChain = EVMSmartWalletTestnet | EVMSmartWalletMainnet;
|
package/dist/chains/chains.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
|
|
|
2
2
|
import { Chain as Chain$1 } from 'viem';
|
|
3
3
|
|
|
4
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"];
|
|
5
|
-
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
|
+
declare const PRODUCTION_AA_CHAINS: readonly ["abstract", "apechain", "arbitrum", "arbitrumnova", "base", "bsc", "flow", "mantle", "mode", "optimism", "plume", "polygon", "scroll", "sei-pacific-1", "shape", "story", "tempo", "world-chain", "zora"];
|
|
6
6
|
type EVMSmartWalletTestnet = (typeof TESTNET_AA_CHAINS)[number];
|
|
7
7
|
type EVMSmartWalletMainnet = (typeof PRODUCTION_AA_CHAINS)[number];
|
|
8
8
|
type EVMSmartWalletChain = EVMSmartWalletTestnet | EVMSmartWalletMainnet;
|
package/dist/chains/chains.js
CHANGED
|
@@ -4,15 +4,16 @@ import {
|
|
|
4
4
|
mainnetToTestnet,
|
|
5
5
|
toViemChain,
|
|
6
6
|
validateChainForEnvironment
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-2WBSPOWU.js";
|
|
8
8
|
import "../chunk-2T5HHKUI.js";
|
|
9
9
|
import "../chunk-3U6UAYOV.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-MMISP35W.js";
|
|
11
|
+
import "../chunk-JWMQALLN.js";
|
|
11
12
|
import "../chunk-ZBLW42YE.js";
|
|
12
13
|
import "../chunk-SGINWAB6.js";
|
|
13
14
|
import "../chunk-455NK5LB.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-ABMZ3ZVN.js";
|
|
16
|
+
import "../chunk-TYQ4YIP7.js";
|
|
16
17
|
import "../chunk-ASE2FXWP.js";
|
|
17
18
|
export {
|
|
18
19
|
isMainnetChain,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as viem from 'viem';
|
|
2
|
+
|
|
3
|
+
declare const tempo: {
|
|
4
|
+
blockExplorers: {
|
|
5
|
+
readonly default: {
|
|
6
|
+
readonly name: "Tempo Explorer";
|
|
7
|
+
readonly url: "https://explore.mainnet.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: 4217;
|
|
23
|
+
name: "Tempo";
|
|
24
|
+
experimental_preconfirmationTime?: number | undefined;
|
|
25
|
+
rpcUrls: {
|
|
26
|
+
readonly default: {
|
|
27
|
+
readonly http: readonly ["https://rpc.tempo.xyz"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
sourceId?: number | undefined;
|
|
31
|
+
testnet: false;
|
|
32
|
+
custom?: Record<string, unknown> | undefined;
|
|
33
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
34
|
+
formatters?: undefined;
|
|
35
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
+
readonly nativeCurrency: never;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { tempo };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as viem from 'viem';
|
|
2
|
+
|
|
3
|
+
declare const tempo: {
|
|
4
|
+
blockExplorers: {
|
|
5
|
+
readonly default: {
|
|
6
|
+
readonly name: "Tempo Explorer";
|
|
7
|
+
readonly url: "https://explore.mainnet.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: 4217;
|
|
23
|
+
name: "Tempo";
|
|
24
|
+
experimental_preconfirmationTime?: number | undefined;
|
|
25
|
+
rpcUrls: {
|
|
26
|
+
readonly default: {
|
|
27
|
+
readonly http: readonly ["https://rpc.tempo.xyz"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
sourceId?: number | undefined;
|
|
31
|
+
testnet: false;
|
|
32
|
+
custom?: Record<string, unknown> | undefined;
|
|
33
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
34
|
+
formatters?: undefined;
|
|
35
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
+
readonly nativeCurrency: never;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { tempo };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkF7L2TZ3Icjs = require('../../chunk-F7L2TZ3I.cjs');
|
|
4
4
|
require('../../chunk-UO2J2ZB2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.tempoTestnet =
|
|
7
|
+
exports.tempoTestnet = _chunkF7L2TZ3Icjs.tempoTestnet;
|
|
@@ -21,11 +21,6 @@ declare const tempoTestnet: {
|
|
|
21
21
|
ensTlds?: readonly string[] | undefined;
|
|
22
22
|
id: 42431;
|
|
23
23
|
name: "Tempo Testnet";
|
|
24
|
-
nativeCurrency: {
|
|
25
|
-
readonly decimals: 6;
|
|
26
|
-
readonly name: "pathUSD";
|
|
27
|
-
readonly symbol: "pathUSD";
|
|
28
|
-
};
|
|
29
24
|
experimental_preconfirmationTime?: number | undefined;
|
|
30
25
|
rpcUrls: {
|
|
31
26
|
readonly default: {
|
|
@@ -38,6 +33,7 @@ declare const tempoTestnet: {
|
|
|
38
33
|
fees?: viem.ChainFees<undefined> | undefined;
|
|
39
34
|
formatters?: undefined;
|
|
40
35
|
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
+
readonly nativeCurrency: never;
|
|
41
37
|
};
|
|
42
38
|
|
|
43
39
|
export { tempoTestnet };
|
|
@@ -21,11 +21,6 @@ declare const tempoTestnet: {
|
|
|
21
21
|
ensTlds?: readonly string[] | undefined;
|
|
22
22
|
id: 42431;
|
|
23
23
|
name: "Tempo Testnet";
|
|
24
|
-
nativeCurrency: {
|
|
25
|
-
readonly decimals: 6;
|
|
26
|
-
readonly name: "pathUSD";
|
|
27
|
-
readonly symbol: "pathUSD";
|
|
28
|
-
};
|
|
29
24
|
experimental_preconfirmationTime?: number | undefined;
|
|
30
25
|
rpcUrls: {
|
|
31
26
|
readonly default: {
|
|
@@ -38,6 +33,7 @@ declare const tempoTestnet: {
|
|
|
38
33
|
fees?: viem.ChainFees<undefined> | undefined;
|
|
39
34
|
formatters?: undefined;
|
|
40
35
|
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
36
|
+
readonly nativeCurrency: never;
|
|
41
37
|
};
|
|
42
38
|
|
|
43
39
|
export { tempoTestnet };
|
|
@@ -4,9 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
storyTestnet
|
|
6
6
|
} from "./chunk-3U6UAYOV.js";
|
|
7
|
+
import {
|
|
8
|
+
tempo
|
|
9
|
+
} from "./chunk-MMISP35W.js";
|
|
7
10
|
import {
|
|
8
11
|
tempoTestnet
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JWMQALLN.js";
|
|
10
13
|
import {
|
|
11
14
|
arcTestnet
|
|
12
15
|
} from "./chunk-ZBLW42YE.js";
|
|
@@ -15,7 +18,7 @@ import {
|
|
|
15
18
|
} from "./chunk-SGINWAB6.js";
|
|
16
19
|
import {
|
|
17
20
|
walletsLogger
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ABMZ3ZVN.js";
|
|
19
22
|
|
|
20
23
|
// src/chains/chains.ts
|
|
21
24
|
import { APIKeyEnvironmentPrefix, BlockchainIncludingTestnet as Blockchain } from "@crossmint/common-sdk-base";
|
|
@@ -78,6 +81,7 @@ var PRODUCTION_AA_CHAINS = [
|
|
|
78
81
|
Blockchain.SEI_PACIFIC_1,
|
|
79
82
|
Blockchain.SHAPE,
|
|
80
83
|
Blockchain.STORY,
|
|
84
|
+
Blockchain.TEMPO,
|
|
81
85
|
Blockchain.WORLDCHAIN,
|
|
82
86
|
Blockchain.ZORA
|
|
83
87
|
];
|
|
@@ -129,6 +133,8 @@ function toViemChain(chain) {
|
|
|
129
133
|
return plume;
|
|
130
134
|
case Blockchain.ARC_TESTNET:
|
|
131
135
|
return arcTestnet;
|
|
136
|
+
case Blockchain.TEMPO:
|
|
137
|
+
return tempo;
|
|
132
138
|
case Blockchain.TEMPO_TESTNET:
|
|
133
139
|
return tempoTestnet;
|
|
134
140
|
case Blockchain.ABSTRACT:
|
|
@@ -171,7 +177,8 @@ var MAINNET_TO_TESTNET_MAP = {
|
|
|
171
177
|
[Blockchain.SEI_PACIFIC_1]: Blockchain.SEI_ATLANTIC_2_TESTNET,
|
|
172
178
|
[Blockchain.STORY]: Blockchain.STORY_TESTNET,
|
|
173
179
|
[Blockchain.WORLDCHAIN]: Blockchain.WORLD_CHAIN_SEPOLIA,
|
|
174
|
-
[Blockchain.ZORA]: Blockchain.ZORA_SEPOLIA
|
|
180
|
+
[Blockchain.ZORA]: Blockchain.ZORA_SEPOLIA,
|
|
181
|
+
[Blockchain.TEMPO]: Blockchain.TEMPO_TESTNET
|
|
175
182
|
};
|
|
176
183
|
function mainnetToTestnet(chain) {
|
|
177
184
|
return MAINNET_TO_TESTNET_MAP[chain];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7TT3VUDFcjs = require('./chunk-7TT3VUDF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMRZXYVQOcjs = require('./chunk-MRZXYVQO.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkWHTECI7Jcjs = require('./chunk-WHTECI7J.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkJSWTGW46cjs = require('./chunk-JSWTGW46.cjs');
|
|
@@ -32,12 +32,12 @@ function assembleSigner(chain, config) {
|
|
|
32
32
|
case "email":
|
|
33
33
|
case "phone":
|
|
34
34
|
if (chain === "solana") {
|
|
35
|
-
return new (0,
|
|
35
|
+
return new (0, _chunk7TT3VUDFcjs.SolanaNonCustodialSigner)(config);
|
|
36
36
|
}
|
|
37
37
|
if (chain === "stellar") {
|
|
38
|
-
return new (0,
|
|
38
|
+
return new (0, _chunkMRZXYVQOcjs.StellarNonCustodialSigner)(config);
|
|
39
39
|
}
|
|
40
|
-
return new (0,
|
|
40
|
+
return new (0, _chunkWHTECI7Jcjs.EVMNonCustodialSigner)(config);
|
|
41
41
|
case "api-key":
|
|
42
42
|
return chain === "solana" ? new (0, _chunkXOCC3MPKcjs.SolanaApiKeySigner)(config) : new (0, _chunkJSWTGW46cjs.EVMApiKeySigner)(config);
|
|
43
43
|
case "external-wallet":
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
var _chunkRBHGZDDXcjs = require('./chunk-RBHGZDDX.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkPOG76HDDcjs = require('./chunk-POG76HDD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk47R3UV3Jcjs = require('./chunk-47R3UV3J.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkWDZY4PP4cjs = require('./chunk-WDZY4PP4.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -36,45 +36,45 @@ var WalletFactory = class {
|
|
|
36
36
|
getOrCreateWallet(args) {
|
|
37
37
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
38
38
|
if (this.apiClient.isServerSide) {
|
|
39
|
-
|
|
39
|
+
_chunkJREZWZ2Scjs.walletsLogger.error("walletFactory.getOrCreateWallet.error", {
|
|
40
40
|
error: "getOrCreateWallet can only be called from client-side code"
|
|
41
41
|
});
|
|
42
42
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(
|
|
43
43
|
"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)."
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain:
|
|
46
|
+
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain: _chunkWDZY4PP4cjs.validateChainForEnvironment.call(void 0, args.chain, this.apiClient.environment) });
|
|
47
47
|
const locator = this.getWalletLocator(args);
|
|
48
|
-
|
|
48
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.getOrCreateWallet.start");
|
|
49
49
|
const existingWallet = yield this.apiClient.getWallet(locator);
|
|
50
50
|
if (existingWallet != null && !("error" in existingWallet)) {
|
|
51
|
-
|
|
51
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.getOrCreateWallet.existing", {
|
|
52
52
|
address: existingWallet.address
|
|
53
53
|
});
|
|
54
54
|
return this.createWalletInstance(existingWallet, args);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.getOrCreateWallet.creating");
|
|
57
57
|
return this.createWalletInternal(args);
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
getWallet(walletLocator, args) {
|
|
61
61
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
62
62
|
if (!this.apiClient.isServerSide) {
|
|
63
|
-
|
|
63
|
+
_chunkJREZWZ2Scjs.walletsLogger.error("walletFactory.getWallet.error", {
|
|
64
64
|
error: "getWallet is not supported on client side"
|
|
65
65
|
});
|
|
66
66
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)("getWallet is not supported on client side, use getOrCreateWallet instead");
|
|
67
67
|
}
|
|
68
|
-
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain:
|
|
69
|
-
|
|
68
|
+
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain: _chunkWDZY4PP4cjs.validateChainForEnvironment.call(void 0, args.chain, this.apiClient.environment) });
|
|
69
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.getWallet.start");
|
|
70
70
|
const existingWallet = yield this.apiClient.getWallet(walletLocator);
|
|
71
71
|
if ("error" in existingWallet) {
|
|
72
|
-
|
|
72
|
+
_chunkJREZWZ2Scjs.walletsLogger.warn("walletFactory.getWallet.notFound", {
|
|
73
73
|
error: existingWallet.error
|
|
74
74
|
});
|
|
75
75
|
throw new (0, _chunkXC2V34TScjs.WalletNotAvailableError)(JSON.stringify(existingWallet));
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.getWallet.success", {
|
|
78
78
|
address: existingWallet.address
|
|
79
79
|
});
|
|
80
80
|
return this.createWalletInstance(existingWallet, args);
|
|
@@ -82,7 +82,7 @@ var WalletFactory = class {
|
|
|
82
82
|
}
|
|
83
83
|
createWallet(args) {
|
|
84
84
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
85
|
-
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain:
|
|
85
|
+
args = _chunkUO2J2ZB2cjs.__spreadProps.call(void 0, _chunkUO2J2ZB2cjs.__spreadValues.call(void 0, {}, args), { chain: _chunkWDZY4PP4cjs.validateChainForEnvironment.call(void 0, args.chain, this.apiClient.environment) });
|
|
86
86
|
return this.createWalletInternal(args);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
@@ -90,7 +90,7 @@ var WalletFactory = class {
|
|
|
90
90
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
91
91
|
var _a, _b, _c, _d, _e;
|
|
92
92
|
yield (_c = (_b = (_a = args.options) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onWalletCreationStart) == null ? void 0 : _c.call(_b);
|
|
93
|
-
|
|
93
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.createWallet.start");
|
|
94
94
|
this.mutateSignerFromCustomAuth(args, true);
|
|
95
95
|
const adminSigner = args.signer.type === "passkey" ? yield this.createPasskeyAdminSigner(args.signer) : args.signer;
|
|
96
96
|
const walletResponse = yield this.apiClient.createWallet({
|
|
@@ -103,12 +103,12 @@ var WalletFactory = class {
|
|
|
103
103
|
alias: (_e = args.alias) != null ? _e : void 0
|
|
104
104
|
});
|
|
105
105
|
if ("error" in walletResponse) {
|
|
106
|
-
|
|
106
|
+
_chunkJREZWZ2Scjs.walletsLogger.error("walletFactory.createWallet.error", {
|
|
107
107
|
error: walletResponse.error
|
|
108
108
|
});
|
|
109
109
|
throw new (0, _chunkXC2V34TScjs.WalletCreationError)(JSON.stringify(walletResponse));
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("walletFactory.createWallet.success", {
|
|
112
112
|
address: walletResponse.address
|
|
113
113
|
});
|
|
114
114
|
return this.createWalletInstance(walletResponse, args);
|
|
@@ -117,12 +117,12 @@ var WalletFactory = class {
|
|
|
117
117
|
createWalletInstance(walletResponse, args) {
|
|
118
118
|
this.validateExistingWalletConfig(walletResponse, args);
|
|
119
119
|
const signerConfig = this.toInternalSignerConfig(walletResponse, args.signer, args.options);
|
|
120
|
-
return new (0,
|
|
120
|
+
return new (0, _chunkPOG76HDDcjs.Wallet)(
|
|
121
121
|
{
|
|
122
122
|
chain: args.chain,
|
|
123
123
|
address: walletResponse.address,
|
|
124
124
|
owner: walletResponse.owner,
|
|
125
|
-
signer:
|
|
125
|
+
signer: _chunk47R3UV3Jcjs.assembleSigner.call(void 0, args.chain, signerConfig),
|
|
126
126
|
options: args.options,
|
|
127
127
|
alias: args.alias
|
|
128
128
|
},
|
|
@@ -301,7 +301,7 @@ var WalletFactory = class {
|
|
|
301
301
|
};
|
|
302
302
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
303
303
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
304
|
-
logger:
|
|
304
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
305
305
|
methodName: "walletFactory.getOrCreateWallet",
|
|
306
306
|
buildContext(_thisArg, args) {
|
|
307
307
|
const walletArgs = args[0];
|
|
@@ -311,7 +311,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
311
311
|
], WalletFactory.prototype, "getOrCreateWallet", 1);
|
|
312
312
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
313
313
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
314
|
-
logger:
|
|
314
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
315
315
|
methodName: "walletFactory.getWallet",
|
|
316
316
|
buildContext(_thisArg, args) {
|
|
317
317
|
const walletLocator = args[0];
|
|
@@ -322,7 +322,7 @@ _chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
|
322
322
|
], WalletFactory.prototype, "getWallet", 1);
|
|
323
323
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
324
324
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
325
|
-
logger:
|
|
325
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
326
326
|
methodName: "walletFactory.createWallet",
|
|
327
327
|
buildContext(_thisArg, args) {
|
|
328
328
|
const walletArgs = args[0];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPOG76HDDcjs = require('./chunk-POG76HDD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkXC2V34TScjs = require('./chunk-XC2V34TS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
14
14
|
|
|
15
15
|
// src/wallets/stellar.ts
|
|
16
16
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
17
|
-
var _StellarWallet = class _StellarWallet extends
|
|
17
|
+
var _StellarWallet = class _StellarWallet extends _chunkPOG76HDDcjs.Wallet {
|
|
18
18
|
constructor(wallet) {
|
|
19
19
|
super(
|
|
20
20
|
{
|
|
@@ -22,10 +22,10 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
22
22
|
address: wallet.address,
|
|
23
23
|
owner: wallet.owner,
|
|
24
24
|
signer: wallet.signer,
|
|
25
|
-
options:
|
|
25
|
+
options: _chunkPOG76HDDcjs.Wallet.getOptions(wallet),
|
|
26
26
|
alias: wallet.alias
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
_chunkPOG76HDDcjs.Wallet.getApiClient(wallet)
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
static from(wallet) {
|
|
@@ -37,11 +37,11 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
37
37
|
sendTransaction(params) {
|
|
38
38
|
return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
|
|
39
39
|
var _a;
|
|
40
|
-
|
|
40
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("stellarWallet.sendTransaction.start");
|
|
41
41
|
yield this.preAuthIfNeeded();
|
|
42
42
|
const createdTransaction = yield this.createTransaction(params);
|
|
43
43
|
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
44
|
-
|
|
44
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("stellarWallet.sendTransaction.prepared", {
|
|
45
45
|
transactionId: createdTransaction.id
|
|
46
46
|
});
|
|
47
47
|
return {
|
|
@@ -52,7 +52,7 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
52
52
|
}
|
|
53
53
|
const options = {};
|
|
54
54
|
const result = yield this.approveTransactionAndWait(createdTransaction.id, options);
|
|
55
|
-
|
|
55
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("stellarWallet.sendTransaction.success", {
|
|
56
56
|
transactionId: createdTransaction.id,
|
|
57
57
|
hash: result.hash
|
|
58
58
|
});
|
|
@@ -96,7 +96,7 @@ var _StellarWallet = class _StellarWallet extends _chunk4ID6ZK4Acjs.Wallet {
|
|
|
96
96
|
};
|
|
97
97
|
_chunkUO2J2ZB2cjs.__decorateClass.call(void 0, [
|
|
98
98
|
_commonsdkbase.WithLoggerContext.call(void 0, {
|
|
99
|
-
logger:
|
|
99
|
+
logger: _chunkJREZWZ2Scjs.walletsLogger,
|
|
100
100
|
methodName: "stellarWallet.sendTransaction",
|
|
101
101
|
buildContext(thisArg) {
|
|
102
102
|
return { chain: thisArg.chain, address: thisArg.address };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_EVENT_OPTIONS,
|
|
3
3
|
NonCustodialSigner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U3NV7UY7.js";
|
|
5
5
|
import {
|
|
6
6
|
walletsLogger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ABMZ3ZVN.js";
|
|
8
8
|
import {
|
|
9
9
|
__async
|
|
10
10
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
|
4
|
+
var _chunkZAX22GSIcjs = require('./chunk-ZAX22GSI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkJREZWZ2Scjs = require('./chunk-JREZWZ2S.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
@@ -12,7 +12,7 @@ var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
|
|
|
12
12
|
// src/signers/non-custodial/ncs-solana-signer.ts
|
|
13
13
|
var _web3js = require('@solana/web3.js');
|
|
14
14
|
var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
|
|
15
|
-
var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends
|
|
15
|
+
var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkZAX22GSIcjs.NonCustodialSigner {
|
|
16
16
|
constructor(config) {
|
|
17
17
|
super(config);
|
|
18
18
|
}
|
|
@@ -29,7 +29,7 @@ var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkKVY
|
|
|
29
29
|
const transactionBytes = _bs582.default.decode(transaction);
|
|
30
30
|
const deserializedTransaction = _web3js.VersionedTransaction.deserialize(transactionBytes);
|
|
31
31
|
const messageData = deserializedTransaction.message.serialize();
|
|
32
|
-
|
|
32
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("sign: sending request", { keyType: "ed25519" });
|
|
33
33
|
const startTime = Date.now();
|
|
34
34
|
const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
|
|
35
35
|
event: "request:sign",
|
|
@@ -45,9 +45,9 @@ var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends _chunkKVY
|
|
|
45
45
|
encoding: "base58"
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
options:
|
|
48
|
+
options: _chunkZAX22GSIcjs.DEFAULT_EVENT_OPTIONS
|
|
49
49
|
});
|
|
50
|
-
|
|
50
|
+
_chunkJREZWZ2Scjs.walletsLogger.info("sign: response received", {
|
|
51
51
|
status: res == null ? void 0 : res.status,
|
|
52
52
|
durationMs: Date.now() - startTime
|
|
53
53
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/tempo.ts
|
|
2
|
+
var _viem = require('viem');
|
|
3
|
+
var tempo = _viem.defineChain.call(void 0, {
|
|
4
|
+
id: 4217,
|
|
5
|
+
name: "Tempo",
|
|
6
|
+
nativeCurrency: void 0,
|
|
7
|
+
rpcUrls: {
|
|
8
|
+
default: { http: ["https://rpc.tempo.xyz"] }
|
|
9
|
+
},
|
|
10
|
+
blockExplorers: {
|
|
11
|
+
default: {
|
|
12
|
+
name: "Tempo Explorer",
|
|
13
|
+
url: "https://explore.mainnet.tempo.xyz"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
testnet: false
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
exports.tempo = tempo;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Wallet
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHMKNG62.js";
|
|
4
4
|
import {
|
|
5
5
|
toViemChain
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2WBSPOWU.js";
|
|
7
7
|
import {
|
|
8
8
|
InvalidTypedDataError,
|
|
9
9
|
SignatureNotCreatedError,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-SGINWAB6.js";
|
|
12
12
|
import {
|
|
13
13
|
walletsLogger
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ABMZ3ZVN.js";
|
|
15
15
|
import {
|
|
16
16
|
__async,
|
|
17
17
|
__decorateClass
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WalletFactory
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KQH5ZXJ4.js";
|
|
4
4
|
import {
|
|
5
5
|
ApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7K5E64Q.js";
|
|
7
7
|
import {
|
|
8
8
|
initWalletsLogger,
|
|
9
9
|
walletsLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ABMZ3ZVN.js";
|
|
11
11
|
import {
|
|
12
12
|
__async
|
|
13
13
|
} from "./chunk-ASE2FXWP.js";
|
|
@@ -3,11 +3,7 @@ var _viem = require('viem');
|
|
|
3
3
|
var tempoTestnet = _viem.defineChain.call(void 0, {
|
|
4
4
|
id: 42431,
|
|
5
5
|
name: "Tempo Testnet",
|
|
6
|
-
nativeCurrency:
|
|
7
|
-
decimals: 6,
|
|
8
|
-
name: "pathUSD",
|
|
9
|
-
symbol: "pathUSD"
|
|
10
|
-
},
|
|
6
|
+
nativeCurrency: void 0,
|
|
11
7
|
rpcUrls: {
|
|
12
8
|
default: { http: ["https://rpc.moderato.tempo.xyz"] }
|
|
13
9
|
},
|