@crossmint/wallets-sdk 0.18.2 → 0.18.4
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/client.cjs +9 -1
- package/dist/api/client.d.cts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/client.js +9 -1
- package/dist/api/gen/client.gen.cjs +7 -1
- package/dist/api/gen/client.gen.js +7 -1
- package/dist/api/gen/index.cjs +179 -1
- package/dist/api/gen/index.js +179 -1
- package/dist/api/gen/sdk.gen.cjs +178 -1
- package/dist/api/gen/sdk.gen.js +178 -1
- package/dist/api/gen/types.gen.js +1 -1
- package/dist/api/index.cjs +11 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +11 -1
- package/dist/api/types.d.cts +4 -2
- package/dist/api/types.d.ts +4 -2
- package/dist/api/types.js +1 -1
- package/dist/chains/chains.cjs +9 -1
- package/dist/chains/chains.js +9 -1
- package/dist/chains/definitions/story.cjs +7 -1
- package/dist/chains/definitions/story.js +7 -1
- package/dist/chains/definitions/storyTestnet.cjs +7 -1
- package/dist/chains/definitions/storyTestnet.js +7 -1
- package/dist/chunk-2DHIAP2S.js +58 -0
- package/dist/chunk-2T5HHKUI.js +19 -0
- package/dist/chunk-2VOEAAFA.cjs +200 -0
- package/dist/chunk-3U6UAYOV.js +25 -0
- package/dist/chunk-4BMNDPJ4.cjs +92 -0
- package/dist/chunk-4QGBVHV3.js +629 -0
- package/dist/chunk-55V4VMTX.cjs +25 -0
- package/dist/chunk-5H5YHSCK.js +200 -0
- package/dist/chunk-7ECQJFYM.cjs +63 -0
- package/dist/chunk-7GHQBCRV.cjs +57 -0
- package/dist/chunk-7JFVG4IY.js +59 -0
- package/dist/chunk-7QL5JVK4.js +262 -0
- package/dist/chunk-AJCWEEWH.js +73 -0
- package/dist/chunk-AL77JANE.js +36 -0
- package/dist/chunk-BAHU3KZE.cjs +75 -0
- package/dist/chunk-BAULM7A2.js +289 -0
- package/dist/chunk-BFAU2NL6.js +175 -0
- package/dist/chunk-BSC55MYK.cjs +43 -0
- package/dist/chunk-CHGPNMRL.cjs +36 -0
- package/dist/chunk-CN2GVFBU.cjs +138 -0
- package/dist/chunk-COVOGZ4S.js +80 -0
- package/dist/chunk-DPERJZBG.js +63 -0
- package/dist/chunk-DQCXGBZM.js +59 -0
- package/dist/chunk-E4LJ7252.cjs +289 -0
- package/dist/chunk-EM6H7EUU.cjs +80 -0
- package/dist/chunk-EYJQSDDI.js +43 -0
- package/dist/chunk-FAGFW4AR.js +16 -0
- package/dist/chunk-FK23BDCU.js +87 -0
- package/dist/chunk-FPMW7Q5O.js +55 -0
- package/dist/chunk-G5NYLGM5.cjs +55 -0
- package/dist/chunk-HHDDI3CS.js +75 -0
- package/dist/chunk-HNRM45KF.cjs +87 -0
- package/dist/chunk-JICSSJOK.js +57 -0
- package/dist/chunk-KS63YEQ4.js +138 -0
- package/dist/chunk-KT3CVXFG.js +9 -0
- package/dist/chunk-LLFD22UQ.cjs +36 -0
- package/dist/chunk-MPGPBFUZ.cjs +16 -0
- package/dist/chunk-MYKPHXUR.cjs +629 -0
- package/dist/chunk-MZBFXUHT.js +63 -0
- package/dist/chunk-NIBKCMQ2.cjs +19 -0
- package/dist/chunk-OD5RGQ4Z.js +92 -0
- package/dist/chunk-PSPNZEG4.cjs +175 -0
- package/dist/chunk-R2OY54EJ.cjs +59 -0
- package/dist/chunk-RHR6P2KP.cjs +15 -0
- package/dist/chunk-RSPJPRQW.cjs +262 -0
- package/dist/chunk-RTRDZB52.js +778 -0
- package/dist/chunk-SG7WIZLK.cjs +63 -0
- package/dist/chunk-SGINWAB6.js +155 -0
- package/dist/chunk-TK3EUCQ4.cjs +59 -0
- package/dist/chunk-V3QJQUT7.cjs +778 -0
- package/dist/chunk-WC7T2CR4.js +44 -0
- package/dist/chunk-WJUPOCKJ.js +15 -0
- package/dist/chunk-XC2V34TS.cjs +155 -0
- package/dist/chunk-XH3ARVJG.cjs +58 -0
- package/dist/chunk-YBA7WO32.cjs +44 -0
- package/dist/chunk-YOJETSLN.cjs +73 -0
- package/dist/chunk-ZT7EGOCI.cjs +9 -0
- package/dist/chunk-ZTGRDOOH.js +36 -0
- package/dist/index.cjs +55 -1
- package/dist/index.js +55 -1
- package/dist/sdk.cjs +31 -1
- package/dist/sdk.js +31 -1
- package/dist/signers/evm-api-key.cjs +7 -1
- package/dist/signers/evm-api-key.js +7 -1
- package/dist/signers/evm-external-wallet.cjs +7 -1
- package/dist/signers/evm-external-wallet.js +7 -1
- package/dist/signers/index.cjs +21 -1
- package/dist/signers/index.js +21 -1
- package/dist/signers/non-custodial/index.cjs +24 -1
- package/dist/signers/non-custodial/index.js +24 -1
- package/dist/signers/non-custodial/ncs-evm-signer.cjs +10 -1
- package/dist/signers/non-custodial/ncs-evm-signer.js +10 -1
- package/dist/signers/non-custodial/ncs-iframe-manager.cjs +7 -1
- package/dist/signers/non-custodial/ncs-iframe-manager.js +7 -1
- package/dist/signers/non-custodial/ncs-signer.cjs +11 -1
- package/dist/signers/non-custodial/ncs-signer.js +11 -1
- package/dist/signers/non-custodial/ncs-solana-signer.cjs +10 -1
- package/dist/signers/non-custodial/ncs-solana-signer.js +10 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.cjs +10 -1
- package/dist/signers/non-custodial/ncs-stellar-signer.js +10 -1
- package/dist/signers/passkey.cjs +7 -1
- package/dist/signers/passkey.js +7 -1
- package/dist/signers/solana-api-key.cjs +7 -1
- package/dist/signers/solana-api-key.js +7 -1
- package/dist/signers/solana-external-wallet.cjs +8 -1
- package/dist/signers/solana-external-wallet.js +8 -1
- package/dist/signers/stellar-external-wallet.cjs +7 -1
- package/dist/signers/stellar-external-wallet.js +7 -1
- package/dist/signers/types.cjs +9 -1
- package/dist/signers/types.js +9 -1
- package/dist/utils/constants.cjs +13 -1
- package/dist/utils/constants.js +13 -1
- package/dist/utils/errors.cjs +55 -1
- package/dist/utils/errors.js +55 -1
- package/dist/utils/signer-validation.cjs +8 -1
- package/dist/utils/signer-validation.js +8 -1
- package/dist/wallets/evm.cjs +20 -1
- package/dist/wallets/evm.js +20 -1
- package/dist/wallets/solana.cjs +18 -1
- package/dist/wallets/solana.js +18 -1
- package/dist/wallets/stellar.cjs +17 -1
- package/dist/wallets/stellar.js +17 -1
- package/dist/wallets/wallet-factory.cjs +25 -1
- package/dist/wallets/wallet-factory.js +25 -1
- package/dist/wallets/wallet.cjs +16 -1
- package/dist/wallets/wallet.d.cts +12 -1
- package/dist/wallets/wallet.d.ts +12 -1
- package/dist/wallets/wallet.js +16 -1
- package/package.json +4 -4
- package/dist/chunk-23ZHV3VD.js +0 -1
- package/dist/chunk-2SHDBC47.js +0 -1
- package/dist/chunk-2XVV7Z43.cjs +0 -1
- package/dist/chunk-2YH3NVVK.cjs +0 -1
- package/dist/chunk-3APSOOE3.js +0 -1
- package/dist/chunk-3IZNWAZE.cjs +0 -1
- package/dist/chunk-4AJT6I6Q.js +0 -1
- package/dist/chunk-4KXOWU5E.cjs +0 -1
- package/dist/chunk-5M7IRODB.js +0 -1
- package/dist/chunk-5QIW67NU.cjs +0 -1
- package/dist/chunk-6PVKL5RC.js +0 -1
- package/dist/chunk-73RCBQG5.js +0 -1
- package/dist/chunk-7JIPYRKX.js +0 -1
- package/dist/chunk-7WKKOG6H.cjs +0 -3
- package/dist/chunk-BQZES4ST.js +0 -1
- package/dist/chunk-BW7YYVZE.js +0 -1
- package/dist/chunk-C3T63EC7.cjs +0 -1
- package/dist/chunk-CVZ3RNWV.cjs +0 -1
- package/dist/chunk-GEY574TH.cjs +0 -1
- package/dist/chunk-H4T4IXCF.js +0 -1
- package/dist/chunk-HJ5EDMTA.js +0 -1
- package/dist/chunk-HMPMFEPS.cjs +0 -1
- package/dist/chunk-HPHVJ6BA.cjs +0 -1
- package/dist/chunk-HRSVFJND.cjs +0 -1
- package/dist/chunk-IGBQEAD5.js +0 -1
- package/dist/chunk-IR5WN6FQ.cjs +0 -1
- package/dist/chunk-JUSY5XEE.js +0 -1
- package/dist/chunk-KHSWQE6W.js +0 -1
- package/dist/chunk-KKQBZXFE.js +0 -1
- package/dist/chunk-KO6QYKDX.cjs +0 -1
- package/dist/chunk-KRV3IXJU.cjs +0 -1
- package/dist/chunk-L5L64FWM.js +0 -1
- package/dist/chunk-LW6JSI4J.js +0 -1
- package/dist/chunk-M4TOGGLV.cjs +0 -1
- package/dist/chunk-MQP5VZCA.cjs +0 -1
- package/dist/chunk-NEJPPLYW.cjs +0 -1
- package/dist/chunk-NIKULSJK.cjs +0 -1
- package/dist/chunk-NT4EICOB.cjs +0 -1
- package/dist/chunk-O4FVTK7X.cjs +0 -1
- package/dist/chunk-P6JJHAAV.js +0 -1
- package/dist/chunk-PONCGT2H.cjs +0 -1
- package/dist/chunk-PSXRNSOE.js +0 -1
- package/dist/chunk-R6VFNNAA.js +0 -3
- package/dist/chunk-RJZV72YF.js +0 -1
- package/dist/chunk-S3DYQVRD.js +0 -1
- package/dist/chunk-SHVVA55W.js +0 -1
- package/dist/chunk-STYSP6KL.cjs +0 -1
- package/dist/chunk-UBOWSXW3.js +0 -1
- package/dist/chunk-UNBXKCNN.js +0 -1
- package/dist/chunk-VXFSSEA4.js +0 -1
- package/dist/chunk-VY634F3J.js +0 -1
- package/dist/chunk-WQP2FSVI.js +0 -1
- package/dist/chunk-WYYAPI4G.cjs +0 -1
- package/dist/chunk-WZFHEUWT.cjs +0 -1
- package/dist/chunk-XALFCQKD.cjs +0 -1
- package/dist/chunk-XIRT2EZN.cjs +0 -1
- package/dist/chunk-YWPTI2QO.cjs +0 -1
- package/dist/chunk-YZ4HRYSL.cjs +0 -1
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NonCustodialSigner
|
|
3
|
+
} from "./chunk-BAULM7A2.js";
|
|
4
|
+
import {
|
|
5
|
+
STATUS_POLLING_INTERVAL_MS
|
|
6
|
+
} from "./chunk-FAGFW4AR.js";
|
|
7
|
+
import {
|
|
8
|
+
InvalidSignerError,
|
|
9
|
+
SignatureFailedError,
|
|
10
|
+
SignatureNotAvailableError,
|
|
11
|
+
SigningFailedError,
|
|
12
|
+
TransactionAwaitingApprovalError,
|
|
13
|
+
TransactionConfirmationTimeoutError,
|
|
14
|
+
TransactionFailedError,
|
|
15
|
+
TransactionHashNotFoundError,
|
|
16
|
+
TransactionNotAvailableError,
|
|
17
|
+
TransactionNotCreatedError,
|
|
18
|
+
TransactionSendingFailedError,
|
|
19
|
+
WalletNotAvailableError,
|
|
20
|
+
WalletTypeNotSupportedError
|
|
21
|
+
} from "./chunk-SGINWAB6.js";
|
|
22
|
+
import {
|
|
23
|
+
__async,
|
|
24
|
+
__privateAdd,
|
|
25
|
+
__privateGet,
|
|
26
|
+
__privateSet,
|
|
27
|
+
__spreadProps,
|
|
28
|
+
__spreadValues
|
|
29
|
+
} from "./chunk-FPMW7Q5O.js";
|
|
30
|
+
|
|
31
|
+
// src/wallets/wallet.ts
|
|
32
|
+
import { isValidAddress } from "@crossmint/common-sdk-base";
|
|
33
|
+
var _options, _apiClient;
|
|
34
|
+
var Wallet = class {
|
|
35
|
+
constructor(args, apiClient) {
|
|
36
|
+
__privateAdd(this, _options);
|
|
37
|
+
__privateAdd(this, _apiClient);
|
|
38
|
+
const { chain, address, owner, signer, options, alias } = args;
|
|
39
|
+
__privateSet(this, _apiClient, apiClient);
|
|
40
|
+
this.chain = chain;
|
|
41
|
+
this.address = address;
|
|
42
|
+
this.owner = owner;
|
|
43
|
+
this.signer = signer;
|
|
44
|
+
__privateSet(this, _options, options);
|
|
45
|
+
this.alias = alias;
|
|
46
|
+
}
|
|
47
|
+
static getApiClient(wallet) {
|
|
48
|
+
return wallet.apiClient;
|
|
49
|
+
}
|
|
50
|
+
static getOptions(wallet) {
|
|
51
|
+
return wallet.options;
|
|
52
|
+
}
|
|
53
|
+
get apiClient() {
|
|
54
|
+
return __privateGet(this, _apiClient);
|
|
55
|
+
}
|
|
56
|
+
get options() {
|
|
57
|
+
return __privateGet(this, _options);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the API client
|
|
61
|
+
* @returns The API client
|
|
62
|
+
* @experimental This API is experimental and may change in the future
|
|
63
|
+
*/
|
|
64
|
+
experimental_apiClient() {
|
|
65
|
+
return __privateGet(this, _apiClient);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get the wallet balances - always includes USDC and native token (ETH/SOL)
|
|
69
|
+
* @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
|
|
70
|
+
* @param {Chain[]} chains - The chains (optional)
|
|
71
|
+
* @returns {Promise<Balances<C>>} The balances returns nativeToken, usdc, tokens
|
|
72
|
+
* @throws {Error} If the balances cannot be retrieved
|
|
73
|
+
*/
|
|
74
|
+
balances(tokens, chains) {
|
|
75
|
+
return __async(this, null, function* () {
|
|
76
|
+
let nativeToken;
|
|
77
|
+
switch (this.chain) {
|
|
78
|
+
case "solana":
|
|
79
|
+
nativeToken = "sol";
|
|
80
|
+
break;
|
|
81
|
+
case "stellar":
|
|
82
|
+
nativeToken = "xlm";
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
nativeToken = "eth";
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
const allTokens = [nativeToken, "usdc", ...tokens != null ? tokens : []];
|
|
89
|
+
const response = yield __privateGet(this, _apiClient).getBalance(this.address, {
|
|
90
|
+
chains: chains != null ? chains : [this.chain],
|
|
91
|
+
tokens: allTokens
|
|
92
|
+
});
|
|
93
|
+
if ("error" in response) {
|
|
94
|
+
throw new Error(`Failed to get balances for wallet: ${JSON.stringify(response.message)}`);
|
|
95
|
+
}
|
|
96
|
+
return this.transformBalanceResponse(response, nativeToken, tokens);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Funds the wallet with Crossmint's stablecoin (USDXM).
|
|
101
|
+
*
|
|
102
|
+
* **Note:** This method is only available in staging environments and exclusively supports USDXM tokens.
|
|
103
|
+
* It cannot be used in production environments.
|
|
104
|
+
* @param amount - The amount of USDXM to fund the wallet with
|
|
105
|
+
* @param chain - Optional chain to fund on. If not provided, uses the wallet's default chain
|
|
106
|
+
* @returns The funding response
|
|
107
|
+
* @throws {Error} If the funding operation fails or if called in a production environment
|
|
108
|
+
*/
|
|
109
|
+
stagingFund(amount, chain) {
|
|
110
|
+
return __async(this, null, function* () {
|
|
111
|
+
const response = yield this.apiClient.fundWallet(this.address, {
|
|
112
|
+
amount,
|
|
113
|
+
token: "usdxm",
|
|
114
|
+
// Type casting is necessary here due to a type mismatch between our DTO schema and server-side types
|
|
115
|
+
// (which only contains 10 testnet chains. Variable in main server is called EvmUsdcEnabledTestnetChains for reference).
|
|
116
|
+
chain: chain != null ? chain : this.chain
|
|
117
|
+
});
|
|
118
|
+
if ("error" in response) {
|
|
119
|
+
throw new Error(`Failed to fund wallet: ${JSON.stringify(response.message)}`);
|
|
120
|
+
}
|
|
121
|
+
return response;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Transform the API balance response to the new structure
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
transformBalanceResponse(apiResponse, nativeTokenSymbol, requestedTokens) {
|
|
129
|
+
const transformTokenBalance = (tokenData) => {
|
|
130
|
+
var _a, _b, _c, _d, _e;
|
|
131
|
+
const chainData = (_a = tokenData.chains) == null ? void 0 : _a[this.chain];
|
|
132
|
+
let chainSpecificField = {};
|
|
133
|
+
if (this.chain === "solana" && chainData != null && "mintHash" in chainData) {
|
|
134
|
+
chainSpecificField = { mintHash: chainData.mintHash };
|
|
135
|
+
} else if (this.chain === "stellar" && chainData != null && "contractId" in chainData) {
|
|
136
|
+
chainSpecificField = { contractId: chainData.contractId };
|
|
137
|
+
} else if (chainData != null && "contractAddress" in chainData) {
|
|
138
|
+
chainSpecificField = { contractAddress: chainData.contractAddress };
|
|
139
|
+
}
|
|
140
|
+
return __spreadValues({
|
|
141
|
+
symbol: (_b = tokenData.symbol) != null ? _b : "",
|
|
142
|
+
name: (_c = tokenData.name) != null ? _c : "",
|
|
143
|
+
amount: (_d = tokenData.amount) != null ? _d : "0",
|
|
144
|
+
decimals: tokenData.decimals,
|
|
145
|
+
rawAmount: (_e = tokenData.rawAmount) != null ? _e : "0"
|
|
146
|
+
}, chainSpecificField);
|
|
147
|
+
};
|
|
148
|
+
const nativeTokenData = apiResponse.find((token) => token.symbol === nativeTokenSymbol);
|
|
149
|
+
const usdcData = apiResponse.find((token) => token.symbol === "usdc");
|
|
150
|
+
const otherTokens = apiResponse.filter((token) => {
|
|
151
|
+
return token.symbol !== nativeTokenSymbol && token.symbol !== "usdc";
|
|
152
|
+
});
|
|
153
|
+
const createDefaultToken = (symbol) => {
|
|
154
|
+
const baseToken = {
|
|
155
|
+
symbol,
|
|
156
|
+
name: symbol,
|
|
157
|
+
amount: "0",
|
|
158
|
+
decimals: 0,
|
|
159
|
+
rawAmount: "0"
|
|
160
|
+
};
|
|
161
|
+
let chainSpecificField = {};
|
|
162
|
+
if (this.chain === "solana") {
|
|
163
|
+
chainSpecificField = { mintHash: void 0 };
|
|
164
|
+
} else if (this.chain === "stellar") {
|
|
165
|
+
chainSpecificField = { contractId: void 0 };
|
|
166
|
+
} else {
|
|
167
|
+
chainSpecificField = { contractAddress: void 0 };
|
|
168
|
+
}
|
|
169
|
+
return __spreadValues(__spreadValues({}, baseToken), chainSpecificField);
|
|
170
|
+
};
|
|
171
|
+
return {
|
|
172
|
+
nativeToken: nativeTokenData != null ? transformTokenBalance(nativeTokenData) : createDefaultToken(nativeTokenSymbol),
|
|
173
|
+
usdc: usdcData != null ? transformTokenBalance(usdcData) : createDefaultToken("usdc"),
|
|
174
|
+
tokens: otherTokens.map(transformTokenBalance)
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the wallet NFTs
|
|
179
|
+
* @param {Object} params - The parameters
|
|
180
|
+
* @param {number} params.perPage - The number of NFTs per page
|
|
181
|
+
* @param {number} params.page - The page number
|
|
182
|
+
* @param {WalletLocator} [params.locator] - The locator
|
|
183
|
+
* @returns The NFTs
|
|
184
|
+
* @experimental This API is experimental and may change in the future
|
|
185
|
+
*/
|
|
186
|
+
experimental_nfts(params) {
|
|
187
|
+
return __async(this, null, function* () {
|
|
188
|
+
return yield __privateGet(this, _apiClient).experimental_getNfts(__spreadProps(__spreadValues({}, params), {
|
|
189
|
+
chain: this.chain,
|
|
190
|
+
address: this.address
|
|
191
|
+
}));
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Get the wallet transactions
|
|
196
|
+
* @returns The transactions
|
|
197
|
+
* @throws {Error} If the transactions cannot be retrieved
|
|
198
|
+
*/
|
|
199
|
+
experimental_transactions() {
|
|
200
|
+
return __async(this, null, function* () {
|
|
201
|
+
const response = yield __privateGet(this, _apiClient).getTransactions(this.walletLocator);
|
|
202
|
+
if ("error" in response) {
|
|
203
|
+
throw new Error(`Failed to get transactions: ${JSON.stringify(response.message)}`);
|
|
204
|
+
}
|
|
205
|
+
return response;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Get a transaction by id
|
|
210
|
+
* @returns The transaction
|
|
211
|
+
* @throws {Error} If the transaction cannot be retrieved
|
|
212
|
+
*/
|
|
213
|
+
experimental_transaction(transactionId) {
|
|
214
|
+
return __async(this, null, function* () {
|
|
215
|
+
const response = yield __privateGet(this, _apiClient).getTransaction(this.walletLocator, transactionId);
|
|
216
|
+
if ("error" in response) {
|
|
217
|
+
throw new Error(`Failed to get transaction: ${JSON.stringify(response.error)}`);
|
|
218
|
+
}
|
|
219
|
+
return response;
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Get the wallet activity
|
|
224
|
+
* @returns The activity
|
|
225
|
+
* @experimental This API is experimental and may change in the future
|
|
226
|
+
* @throws {Error} If the activity cannot be retrieved
|
|
227
|
+
*/
|
|
228
|
+
experimental_activity() {
|
|
229
|
+
return __async(this, null, function* () {
|
|
230
|
+
const response = yield this.apiClient.experimental_activity(this.walletLocator, { chain: this.chain });
|
|
231
|
+
if ("error" in response) {
|
|
232
|
+
throw new Error(`Failed to get activity: ${JSON.stringify(response.message)}`);
|
|
233
|
+
}
|
|
234
|
+
return response;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Send a token to a wallet or user locator
|
|
239
|
+
* @param {string | UserLocator} to - The recipient (address or user locator)
|
|
240
|
+
* @param {string} token - The token (address or currency symbol)
|
|
241
|
+
* @param {string} amount - The amount to send (decimal units)
|
|
242
|
+
* @param {TransactionInputOptions} options - The options for the transaction
|
|
243
|
+
* @returns {Transaction} The transaction
|
|
244
|
+
*/
|
|
245
|
+
send(to, token, amount, options) {
|
|
246
|
+
return __async(this, null, function* () {
|
|
247
|
+
yield this.preAuthIfNeeded();
|
|
248
|
+
const recipient = toRecipientLocator(to);
|
|
249
|
+
const tokenLocator = toTokenLocator(token, this.chain);
|
|
250
|
+
const sendParams = __spreadValues({
|
|
251
|
+
recipient,
|
|
252
|
+
amount
|
|
253
|
+
}, (options == null ? void 0 : options.experimental_signer) != null ? { signer: options.experimental_signer } : {});
|
|
254
|
+
const transactionCreationResponse = yield __privateGet(this, _apiClient).send(this.walletLocator, tokenLocator, sendParams);
|
|
255
|
+
if ("message" in transactionCreationResponse) {
|
|
256
|
+
throw new TransactionNotCreatedError(
|
|
257
|
+
`Failed to send token: ${JSON.stringify(transactionCreationResponse.message)}`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
if (options == null ? void 0 : options.experimental_prepareOnly) {
|
|
261
|
+
return {
|
|
262
|
+
hash: void 0,
|
|
263
|
+
explorerLink: void 0,
|
|
264
|
+
transactionId: transactionCreationResponse.id
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
return yield this.approveTransactionAndWait(transactionCreationResponse.id);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* @deprecated Use `approve` instead.
|
|
272
|
+
* Approve a transaction
|
|
273
|
+
* @param params - The parameters
|
|
274
|
+
* @param params.transactionId - The transaction id
|
|
275
|
+
* @param params.options - The options for the transaction
|
|
276
|
+
* @param params.options.experimental_approval - The approval
|
|
277
|
+
* @param params.options.additionalSigners - The additional signers
|
|
278
|
+
* @returns The transaction
|
|
279
|
+
*/
|
|
280
|
+
// TODO: Remove this method in the next major version
|
|
281
|
+
approveTransaction(params) {
|
|
282
|
+
return __async(this, null, function* () {
|
|
283
|
+
console.warn(
|
|
284
|
+
"approveTransaction is deprecated. Use approve instead. This method will be removed in the next major version."
|
|
285
|
+
);
|
|
286
|
+
return yield this.approve(params);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Approve a transaction or signature
|
|
291
|
+
* @param params - The parameters
|
|
292
|
+
* @param params.transactionId - The transaction id or
|
|
293
|
+
* @param params.signatureId - The signature id
|
|
294
|
+
* @param params.options - The options for the transaction
|
|
295
|
+
* @param params.options.experimental_approval - The approval
|
|
296
|
+
* @param params.options.additionalSigners - The additional signers
|
|
297
|
+
* @returns The transaction or signature
|
|
298
|
+
*/
|
|
299
|
+
approve(params) {
|
|
300
|
+
return __async(this, null, function* () {
|
|
301
|
+
if (params.transactionId != null) {
|
|
302
|
+
return yield this.approveTransactionAndWait(params.transactionId, params.options);
|
|
303
|
+
}
|
|
304
|
+
if (params.signatureId != null) {
|
|
305
|
+
return yield this.approveSignatureAndWait(params.signatureId, params.options);
|
|
306
|
+
}
|
|
307
|
+
throw new Error("Either transactionId or signatureId must be provided");
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Add a delegated signer to the wallet
|
|
312
|
+
* @param signer - The signer. For Solana, it must be a string. For EVM, it can be a string or a passkey.
|
|
313
|
+
* @param options - The options for the operation
|
|
314
|
+
* @param options.experimental_prepareOnly - If true, returns the transaction/signature ID without auto-approving
|
|
315
|
+
*/
|
|
316
|
+
addDelegatedSigner(params) {
|
|
317
|
+
return __async(this, null, function* () {
|
|
318
|
+
var _a, _b, _c;
|
|
319
|
+
const response = yield __privateGet(this, _apiClient).registerSigner(this.walletLocator, {
|
|
320
|
+
signer: params.signer,
|
|
321
|
+
chain: this.chain === "solana" || this.chain === "stellar" ? void 0 : this.chain
|
|
322
|
+
});
|
|
323
|
+
if ("error" in response) {
|
|
324
|
+
throw new Error(`Failed to register signer: ${JSON.stringify(response.message)}`);
|
|
325
|
+
}
|
|
326
|
+
if (this.chain === "solana" || this.chain === "stellar") {
|
|
327
|
+
if (!("transaction" in response) || response.transaction == null) {
|
|
328
|
+
throw new Error("Expected transaction in response for Solana/Stellar chain");
|
|
329
|
+
}
|
|
330
|
+
const transactionId = response.transaction.id;
|
|
331
|
+
if ((_a = params.options) == null ? void 0 : _a.experimental_prepareOnly) {
|
|
332
|
+
return { transactionId };
|
|
333
|
+
}
|
|
334
|
+
yield this.approveTransactionAndWait(transactionId);
|
|
335
|
+
return void 0;
|
|
336
|
+
}
|
|
337
|
+
if (!("chains" in response)) {
|
|
338
|
+
throw new Error("Expected chains in response for EVM chain");
|
|
339
|
+
}
|
|
340
|
+
const chainResponse = (_b = response.chains) == null ? void 0 : _b[this.chain];
|
|
341
|
+
if ((_c = params.options) == null ? void 0 : _c.experimental_prepareOnly) {
|
|
342
|
+
const signatureId = (chainResponse == null ? void 0 : chainResponse.status) !== "success" ? chainResponse == null ? void 0 : chainResponse.id : void 0;
|
|
343
|
+
return { signatureId };
|
|
344
|
+
}
|
|
345
|
+
if ((chainResponse == null ? void 0 : chainResponse.status) === "awaiting-approval") {
|
|
346
|
+
yield this.approveSignatureAndWait(chainResponse.id);
|
|
347
|
+
return void 0;
|
|
348
|
+
}
|
|
349
|
+
if ((chainResponse == null ? void 0 : chainResponse.status) === "pending") {
|
|
350
|
+
yield this.waitForSignature(chainResponse.id);
|
|
351
|
+
return void 0;
|
|
352
|
+
}
|
|
353
|
+
return void 0;
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
delegatedSigners() {
|
|
357
|
+
return __async(this, null, function* () {
|
|
358
|
+
var _a, _b, _c;
|
|
359
|
+
const walletResponse = yield __privateGet(this, _apiClient).getWallet(this.walletLocator);
|
|
360
|
+
if ("error" in walletResponse) {
|
|
361
|
+
throw new WalletNotAvailableError(JSON.stringify(walletResponse));
|
|
362
|
+
}
|
|
363
|
+
if (walletResponse.type !== "smart" || walletResponse.chainType !== "evm" && walletResponse.chainType !== "solana" && walletResponse.chainType !== "stellar") {
|
|
364
|
+
throw new WalletTypeNotSupportedError(`Wallet type ${walletResponse.type} not supported`);
|
|
365
|
+
}
|
|
366
|
+
return (_c = (_b = (_a = walletResponse == null ? void 0 : walletResponse.config) == null ? void 0 : _a.delegatedSigners) == null ? void 0 : _b.map((signer) => {
|
|
367
|
+
const colonIndex = signer.locator.indexOf(":");
|
|
368
|
+
const address = colonIndex >= 0 ? signer.locator.slice(colonIndex + 1) : signer.locator;
|
|
369
|
+
return {
|
|
370
|
+
signer: `external-wallet:${address}`
|
|
371
|
+
};
|
|
372
|
+
})) != null ? _c : [];
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
get walletLocator() {
|
|
376
|
+
if (__privateGet(this, _apiClient).isServerSide) {
|
|
377
|
+
return this.address;
|
|
378
|
+
} else {
|
|
379
|
+
let baseLocator;
|
|
380
|
+
switch (this.chain) {
|
|
381
|
+
case "stellar":
|
|
382
|
+
baseLocator = `me:stellar:smart`;
|
|
383
|
+
break;
|
|
384
|
+
case "solana":
|
|
385
|
+
baseLocator = `me:solana:smart`;
|
|
386
|
+
break;
|
|
387
|
+
default:
|
|
388
|
+
baseLocator = `me:evm:smart`;
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
const aliasLocatorPart = this.alias != null ? `:alias:${this.alias}` : "";
|
|
392
|
+
return baseLocator + aliasLocatorPart;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
preAuthIfNeeded() {
|
|
396
|
+
return __async(this, null, function* () {
|
|
397
|
+
if (this.signer instanceof NonCustodialSigner) {
|
|
398
|
+
yield this.signer.ensureAuthenticated();
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
get isSolanaWallet() {
|
|
403
|
+
return this.chain === "solana";
|
|
404
|
+
}
|
|
405
|
+
approveTransactionAndWait(transactionId, options) {
|
|
406
|
+
return __async(this, null, function* () {
|
|
407
|
+
yield this.approveTransactionInternal(transactionId, options);
|
|
408
|
+
yield this.sleep(1e3);
|
|
409
|
+
return yield this.waitForTransaction(transactionId);
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
approveSignatureAndWait(signatureId, options) {
|
|
413
|
+
return __async(this, null, function* () {
|
|
414
|
+
const signatureResponse = yield this.approveSignatureInternal(signatureId, options);
|
|
415
|
+
if (!("error" in signatureResponse) && signatureResponse.status === "success" && signatureResponse.outputSignature != null) {
|
|
416
|
+
return {
|
|
417
|
+
signature: signatureResponse.outputSignature,
|
|
418
|
+
signatureId
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
yield this.sleep(1e3);
|
|
422
|
+
return yield this.waitForSignature(signatureId);
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
approveSignatureInternal(signatureId, options) {
|
|
426
|
+
return __async(this, null, function* () {
|
|
427
|
+
var _a, _b;
|
|
428
|
+
if (this.isSolanaWallet) {
|
|
429
|
+
throw new Error("Approving signatures is only supported for EVM smart wallets");
|
|
430
|
+
}
|
|
431
|
+
const signature = yield __privateGet(this, _apiClient).getSignature(this.walletLocator, signatureId);
|
|
432
|
+
if ("error" in signature) {
|
|
433
|
+
throw new SignatureNotAvailableError(JSON.stringify(signature));
|
|
434
|
+
}
|
|
435
|
+
if (this.signer.type === "api-key") {
|
|
436
|
+
return signature;
|
|
437
|
+
}
|
|
438
|
+
if ((options == null ? void 0 : options.experimental_approval) != null) {
|
|
439
|
+
const approvals2 = [options.experimental_approval];
|
|
440
|
+
return yield this.executeApproveSignatureWithErrorHandling(signatureId, approvals2);
|
|
441
|
+
}
|
|
442
|
+
const pendingApprovals = (_a = signature.approvals) == null ? void 0 : _a.pending;
|
|
443
|
+
if (pendingApprovals == null) {
|
|
444
|
+
return signature;
|
|
445
|
+
}
|
|
446
|
+
const signers = [...(_b = options == null ? void 0 : options.additionalSigners) != null ? _b : [], this.signer];
|
|
447
|
+
const signedApprovals = yield Promise.all(
|
|
448
|
+
pendingApprovals.map((pendingApproval) => {
|
|
449
|
+
const signer = signers.find((s) => s.locator() === pendingApproval.signer.locator);
|
|
450
|
+
if (signer == null) {
|
|
451
|
+
throw new InvalidSignerError(`Signer ${pendingApproval.signer} not found in pending approvals`);
|
|
452
|
+
}
|
|
453
|
+
return signer.signMessage(pendingApproval.message);
|
|
454
|
+
})
|
|
455
|
+
);
|
|
456
|
+
const approvals = signedApprovals.map((signature2) => {
|
|
457
|
+
return __spreadProps(__spreadValues({}, signature2), {
|
|
458
|
+
signer: this.signer.locator()
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
return yield this.executeApproveSignatureWithErrorHandling(signatureId, approvals);
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
approveTransactionInternal(transactionId, options) {
|
|
465
|
+
return __async(this, null, function* () {
|
|
466
|
+
var _a, _b, _c, _d, _e;
|
|
467
|
+
const transaction = yield __privateGet(this, _apiClient).getTransaction(this.walletLocator, transactionId);
|
|
468
|
+
if ("error" in transaction) {
|
|
469
|
+
throw new TransactionNotAvailableError(JSON.stringify(transaction));
|
|
470
|
+
}
|
|
471
|
+
yield (_c = (_b = (_a = __privateGet(this, _options)) == null ? void 0 : _a.experimental_callbacks) == null ? void 0 : _b.onTransactionStart) == null ? void 0 : _c.call(_b);
|
|
472
|
+
if (this.signer.type === "api-key") {
|
|
473
|
+
return transaction;
|
|
474
|
+
}
|
|
475
|
+
if ((options == null ? void 0 : options.experimental_approval) != null) {
|
|
476
|
+
const approvals2 = [options.experimental_approval];
|
|
477
|
+
return yield this.executeApproveTransactionWithErrorHandling(transactionId, approvals2);
|
|
478
|
+
}
|
|
479
|
+
const pendingApprovals = (_d = transaction.approvals) == null ? void 0 : _d.pending;
|
|
480
|
+
if (pendingApprovals == null) {
|
|
481
|
+
return transaction;
|
|
482
|
+
}
|
|
483
|
+
const signers = [...(_e = options == null ? void 0 : options.additionalSigners) != null ? _e : [], this.signer];
|
|
484
|
+
const signedApprovals = yield Promise.all(
|
|
485
|
+
pendingApprovals.map((pendingApproval) => {
|
|
486
|
+
const signer = signers.find((s) => s.locator() === pendingApproval.signer.locator);
|
|
487
|
+
if (signer == null) {
|
|
488
|
+
throw new InvalidSignerError(`Signer ${pendingApproval.signer} not found in pending approvals`);
|
|
489
|
+
}
|
|
490
|
+
const transactionToSign = transaction.chainType === "solana" && "transaction" in transaction.onChain ? transaction.onChain.transaction : pendingApproval.message;
|
|
491
|
+
return signer.signTransaction(transactionToSign);
|
|
492
|
+
})
|
|
493
|
+
);
|
|
494
|
+
const approvals = signedApprovals.map((signature) => {
|
|
495
|
+
return __spreadProps(__spreadValues({}, signature), {
|
|
496
|
+
signer: this.signer.locator()
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
return yield this.executeApproveTransactionWithErrorHandling(transactionId, approvals);
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
executeApproveTransactionWithErrorHandling(transactionId, approvals) {
|
|
503
|
+
return __async(this, null, function* () {
|
|
504
|
+
const approvedTransaction = yield __privateGet(this, _apiClient).approveTransaction(this.walletLocator, transactionId, {
|
|
505
|
+
approvals
|
|
506
|
+
});
|
|
507
|
+
if (approvedTransaction.error) {
|
|
508
|
+
throw new TransactionFailedError(JSON.stringify(approvedTransaction));
|
|
509
|
+
}
|
|
510
|
+
return approvedTransaction;
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
executeApproveSignatureWithErrorHandling(signatureId, approvals) {
|
|
514
|
+
return __async(this, null, function* () {
|
|
515
|
+
const approvedSignature = yield __privateGet(this, _apiClient).approveSignature(this.walletLocator, signatureId, {
|
|
516
|
+
approvals
|
|
517
|
+
});
|
|
518
|
+
if (approvedSignature.error) {
|
|
519
|
+
throw new SignatureFailedError(JSON.stringify(approvedSignature));
|
|
520
|
+
}
|
|
521
|
+
return approvedSignature;
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
waitForSignature(signatureId) {
|
|
525
|
+
return __async(this, null, function* () {
|
|
526
|
+
let signatureResponse = null;
|
|
527
|
+
do {
|
|
528
|
+
yield new Promise((resolve) => setTimeout(resolve, STATUS_POLLING_INTERVAL_MS));
|
|
529
|
+
signatureResponse = yield __privateGet(this, _apiClient).getSignature(this.walletLocator, signatureId);
|
|
530
|
+
if ("error" in signatureResponse) {
|
|
531
|
+
throw new SignatureNotAvailableError(JSON.stringify(signatureResponse));
|
|
532
|
+
}
|
|
533
|
+
} while (signatureResponse === null || signatureResponse.status === "pending");
|
|
534
|
+
if (signatureResponse.status === "failed") {
|
|
535
|
+
throw new SigningFailedError("Signature signing failed");
|
|
536
|
+
}
|
|
537
|
+
if (!signatureResponse.outputSignature) {
|
|
538
|
+
throw new SignatureNotAvailableError("Signature not available");
|
|
539
|
+
}
|
|
540
|
+
return {
|
|
541
|
+
signature: signatureResponse.outputSignature,
|
|
542
|
+
signatureId
|
|
543
|
+
};
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
waitForTransaction(_0) {
|
|
547
|
+
return __async(this, arguments, function* (transactionId, timeoutMs = 6e4, {
|
|
548
|
+
backoffMultiplier = 1.1,
|
|
549
|
+
maxBackoffMs = 2e3,
|
|
550
|
+
initialBackoffMs = STATUS_POLLING_INTERVAL_MS
|
|
551
|
+
} = {}) {
|
|
552
|
+
var _a;
|
|
553
|
+
const startTime = Date.now();
|
|
554
|
+
let transactionResponse;
|
|
555
|
+
do {
|
|
556
|
+
if (Date.now() - startTime > timeoutMs) {
|
|
557
|
+
const error = new TransactionConfirmationTimeoutError("Transaction confirmation timeout");
|
|
558
|
+
throw error;
|
|
559
|
+
}
|
|
560
|
+
transactionResponse = yield __privateGet(this, _apiClient).getTransaction(this.walletLocator, transactionId);
|
|
561
|
+
if (transactionResponse.error) {
|
|
562
|
+
throw new TransactionNotAvailableError(JSON.stringify(transactionResponse));
|
|
563
|
+
}
|
|
564
|
+
yield this.sleep(initialBackoffMs);
|
|
565
|
+
initialBackoffMs = Math.min(initialBackoffMs * backoffMultiplier, maxBackoffMs);
|
|
566
|
+
} while (transactionResponse.status === "pending");
|
|
567
|
+
if (transactionResponse.status === "failed") {
|
|
568
|
+
const error = new TransactionSendingFailedError(
|
|
569
|
+
`Transaction sending failed: ${JSON.stringify(transactionResponse.error)}`
|
|
570
|
+
);
|
|
571
|
+
throw error;
|
|
572
|
+
}
|
|
573
|
+
if (transactionResponse.status === "awaiting-approval") {
|
|
574
|
+
const error = new TransactionAwaitingApprovalError(
|
|
575
|
+
`Transaction is awaiting approval. Please submit required approvals before waiting for completion.`
|
|
576
|
+
);
|
|
577
|
+
throw error;
|
|
578
|
+
}
|
|
579
|
+
const transactionHash = transactionResponse.onChain.txId;
|
|
580
|
+
if (transactionHash == null) {
|
|
581
|
+
const error = new TransactionHashNotFoundError("Transaction hash not found on transaction response");
|
|
582
|
+
throw error;
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
hash: transactionHash,
|
|
586
|
+
explorerLink: (_a = transactionResponse.onChain.explorerLink) != null ? _a : "",
|
|
587
|
+
transactionId: transactionResponse.id
|
|
588
|
+
};
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
sleep(ms) {
|
|
592
|
+
return __async(this, null, function* () {
|
|
593
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
_options = new WeakMap();
|
|
598
|
+
_apiClient = new WeakMap();
|
|
599
|
+
function toRecipientLocator(to) {
|
|
600
|
+
if (typeof to === "string") {
|
|
601
|
+
return to;
|
|
602
|
+
}
|
|
603
|
+
if ("email" in to) {
|
|
604
|
+
return `email:${to.email}`;
|
|
605
|
+
}
|
|
606
|
+
if ("x" in to) {
|
|
607
|
+
return `x:${to.x}`;
|
|
608
|
+
}
|
|
609
|
+
if ("twitter" in to) {
|
|
610
|
+
return `twitter:${to.twitter}`;
|
|
611
|
+
}
|
|
612
|
+
if ("phone" in to) {
|
|
613
|
+
return `phoneNumber:${to.phone}`;
|
|
614
|
+
}
|
|
615
|
+
if ("userId" in to) {
|
|
616
|
+
return `userId:${to.userId}`;
|
|
617
|
+
}
|
|
618
|
+
throw new Error("Invalid recipient locator");
|
|
619
|
+
}
|
|
620
|
+
function toTokenLocator(token, chain) {
|
|
621
|
+
if (isValidAddress(token)) {
|
|
622
|
+
return `${chain}:${token}`;
|
|
623
|
+
}
|
|
624
|
+
return `${chain}:${token.toLowerCase()}`;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export {
|
|
628
|
+
Wallet
|
|
629
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/storyTestnet.ts
|
|
2
|
+
var _viem = require('viem');
|
|
3
|
+
var storyTestnet = _viem.defineChain.call(void 0, {
|
|
4
|
+
id: 1513,
|
|
5
|
+
name: "Story Testnet",
|
|
6
|
+
nativeCurrency: {
|
|
7
|
+
decimals: 18,
|
|
8
|
+
name: "IP",
|
|
9
|
+
symbol: "IP"
|
|
10
|
+
},
|
|
11
|
+
rpcUrls: {
|
|
12
|
+
default: { http: ["https://testnet.storyrpc.io"] }
|
|
13
|
+
},
|
|
14
|
+
blockExplorers: {
|
|
15
|
+
default: {
|
|
16
|
+
name: "Story Testnet Explorer",
|
|
17
|
+
url: "https://testnet.storyscan.xyz"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
testnet: true
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.storyTestnet = storyTestnet;
|