@trustwallet/cli 0.6.7 → 0.6.9
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/commands/alert.d.ts.map +1 -1
- package/dist/commands/query.d.ts.map +1 -1
- package/dist/commands/wallet.d.ts.map +1 -1
- package/dist/index.js +151 -35
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/commands/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/commands/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuI3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/commands/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/commands/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAshB3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/commands/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/commands/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+sB5D"}
|
package/dist/index.js
CHANGED
|
@@ -12606,15 +12606,41 @@ var init_dist5 = __esm({
|
|
|
12606
12606
|
query.set("address", params.address);
|
|
12607
12607
|
if (params.type) query.set("type", params.type);
|
|
12608
12608
|
if (params.version) query.set("version", params.version.toString());
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12609
|
+
try {
|
|
12610
|
+
return await this.client.gateway(
|
|
12611
|
+
"GET",
|
|
12612
|
+
"/v1/validate",
|
|
12613
|
+
void 0,
|
|
12614
|
+
query.toString()
|
|
12615
|
+
);
|
|
12616
|
+
} catch (err) {
|
|
12617
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
12618
|
+
const details = err?.details;
|
|
12619
|
+
const detailsStr = details ? JSON.stringify(details) : "";
|
|
12620
|
+
if (msg.includes("GraphQL") || msg.includes("Failed to decode") || detailsStr.includes("GraphQL") || detailsStr.includes("Failed to decode")) {
|
|
12621
|
+
return { valid: false, message: "Invalid address format" };
|
|
12622
|
+
}
|
|
12623
|
+
throw err;
|
|
12624
|
+
}
|
|
12615
12625
|
}
|
|
12616
12626
|
async getAssetInfo(assetId) {
|
|
12617
|
-
|
|
12627
|
+
const info2 = await this.client.gateway("GET", `/v1/assets/${assetId}`);
|
|
12628
|
+
try {
|
|
12629
|
+
const priceResp = await this.client.market(
|
|
12630
|
+
"POST",
|
|
12631
|
+
"/v2/market/tickers",
|
|
12632
|
+
{ currency: "USD", assets: [assetId] }
|
|
12633
|
+
);
|
|
12634
|
+
const ticker = priceResp.tickers?.[0];
|
|
12635
|
+
if (ticker) {
|
|
12636
|
+
if (ticker.price != null) info2.priceUsd = ticker.price;
|
|
12637
|
+
if (ticker.change_24h != null) info2.priceChange24h = ticker.change_24h;
|
|
12638
|
+
if (ticker.market_cap != null) info2.marketCapUsd = ticker.market_cap;
|
|
12639
|
+
if (ticker.volume_24h != null) info2.volume24hUsd = ticker.volume_24h;
|
|
12640
|
+
}
|
|
12641
|
+
} catch {
|
|
12642
|
+
}
|
|
12643
|
+
return info2;
|
|
12618
12644
|
}
|
|
12619
12645
|
async getTokenHoldings(assets, fromTime = 0) {
|
|
12620
12646
|
const response = await this.client.gateway("POST", "/v1/assets", {
|
|
@@ -12737,7 +12763,15 @@ var init_dist5 = __esm({
|
|
|
12737
12763
|
}
|
|
12738
12764
|
const totalRisks = (security?.contract_security?.num_risks ?? 0) + (security?.honeypot_risk?.num_risks ?? 0);
|
|
12739
12765
|
const totalWarnings = (security?.contract_security?.num_warnings ?? 0) + (security?.honeypot_risk?.num_warnings ?? 0);
|
|
12740
|
-
const
|
|
12766
|
+
const computedRiskLevel = totalRisks > 0 ? "high" : totalWarnings > 0 ? "medium" : security ? "low" : void 0;
|
|
12767
|
+
let finalRiskLevel = security?.risk_level ?? security?.riskLevel ?? computedRiskLevel;
|
|
12768
|
+
const knownStablecoins = ["USDC", "USDT", "DAI", "BUSD", "TUSD", "USDP", "FRAX", "PYUSD"];
|
|
12769
|
+
const symbol = (asset.symbol ?? raw.symbol ?? "").toUpperCase();
|
|
12770
|
+
let riskContext;
|
|
12771
|
+
if (finalRiskLevel === "medium" && knownStablecoins.includes(symbol) && totalRisks === 0) {
|
|
12772
|
+
riskContext = "Warnings are due to proxy contract pattern, common in audited stablecoins";
|
|
12773
|
+
finalRiskLevel = "low";
|
|
12774
|
+
}
|
|
12741
12775
|
return {
|
|
12742
12776
|
assetId,
|
|
12743
12777
|
name: asset.name ?? raw.name,
|
|
@@ -12749,7 +12783,8 @@ var init_dist5 = __esm({
|
|
|
12749
12783
|
isHoneypot: isHoneypot ?? security.is_honeypot ?? security.isHoneypot,
|
|
12750
12784
|
hasAudit: security.has_audit ?? security.hasAudit ?? security.is_scanned,
|
|
12751
12785
|
auditProvider: security.audit_provider ?? security.auditProvider ?? security.provider,
|
|
12752
|
-
riskLevel:
|
|
12786
|
+
riskLevel: finalRiskLevel,
|
|
12787
|
+
...riskContext ? { riskContext } : {},
|
|
12753
12788
|
warnings: warnings.length > 0 ? warnings : security.warnings
|
|
12754
12789
|
} : void 0,
|
|
12755
12790
|
solanaSecurityInfo: solanaSecurity ? {
|
|
@@ -12813,7 +12848,7 @@ var init_dapps_service = __esm({
|
|
|
12813
12848
|
let protocols = await this.getProtocols();
|
|
12814
12849
|
if (category) {
|
|
12815
12850
|
const lower = category.toLowerCase();
|
|
12816
|
-
protocols = protocols.filter((p3) => p3.category.toLowerCase()
|
|
12851
|
+
protocols = protocols.filter((p3) => p3.category.toLowerCase().includes(lower));
|
|
12817
12852
|
}
|
|
12818
12853
|
return protocols.sort((a3, b3) => b3.tvl - a3.tvl).slice(0, limit);
|
|
12819
12854
|
}
|
|
@@ -38861,15 +38896,29 @@ ${qr3}`;
|
|
|
38861
38896
|
const exists = await store.exists();
|
|
38862
38897
|
const kc2 = new KeychainManager();
|
|
38863
38898
|
const keychainHasPassword = kc2.isAvailable() ? !!await kc2.getWalletPassword() : false;
|
|
38899
|
+
const totalChains = Object.keys(CHAINS).length;
|
|
38900
|
+
let createdAt;
|
|
38901
|
+
let addressCount;
|
|
38902
|
+
if (exists) {
|
|
38903
|
+
const config2 = await store.getConfig();
|
|
38904
|
+
createdAt = config2?.createdAt;
|
|
38905
|
+
addressCount = config2?.chains?.length ?? totalChains;
|
|
38906
|
+
}
|
|
38864
38907
|
const result = {
|
|
38865
38908
|
agentWallet: exists ? "configured" : "not configured",
|
|
38866
|
-
keychainPassword: keychainHasPassword ? "stored" : "not stored"
|
|
38909
|
+
keychainPassword: keychainHasPassword ? "stored" : "not stored",
|
|
38910
|
+
supportedChains: totalChains,
|
|
38911
|
+
...createdAt ? { createdAt } : {},
|
|
38912
|
+
...addressCount !== void 0 ? { addressCount } : {}
|
|
38867
38913
|
};
|
|
38868
38914
|
if (opts.json) {
|
|
38869
38915
|
output(result, true);
|
|
38870
38916
|
} else {
|
|
38871
38917
|
console.log(` ${import_chalk5.default.dim("Wallet")} ${exists ? import_chalk5.default.green("configured") : import_chalk5.default.yellow("not configured")}`);
|
|
38918
|
+
if (createdAt) console.log(` ${import_chalk5.default.dim("Created")} ${createdAt}`);
|
|
38872
38919
|
console.log(` ${import_chalk5.default.dim("Keychain")} ${keychainHasPassword ? import_chalk5.default.green("password stored") : import_chalk5.default.yellow("no password")}`);
|
|
38920
|
+
console.log(` ${import_chalk5.default.dim("Chains")} ${totalChains} supported`);
|
|
38921
|
+
if (addressCount !== void 0) console.log(` ${import_chalk5.default.dim("Addresses")} ${addressCount}`);
|
|
38873
38922
|
if (!exists) info("\nRun `twak wallet create --password <pw>` to create a wallet.");
|
|
38874
38923
|
}
|
|
38875
38924
|
});
|
|
@@ -39099,8 +39148,7 @@ var SwapClient = class {
|
|
|
39099
39148
|
return transactions;
|
|
39100
39149
|
}
|
|
39101
39150
|
async searchTokens(params) {
|
|
39102
|
-
const
|
|
39103
|
-
const coinIds = chains.map((c3) => getChainById(c3)?.coinId).filter(Boolean).join(",");
|
|
39151
|
+
const coinIds = params.networks ? params.networks : (params.chains || Object.keys(CHAINS)).map((c3) => getChainById(c3)?.coinId).filter((id) => id != null).join(",");
|
|
39104
39152
|
const queryParams = new URLSearchParams({
|
|
39105
39153
|
networks: coinIds,
|
|
39106
39154
|
exactQuery: params.query,
|
|
@@ -39169,7 +39217,7 @@ var SwapClient = class {
|
|
|
39169
39217
|
to: { asset: step.to.asset, address: step.to.address, amount: step.to.amount, minAmountOut: step.to.minAmountOut },
|
|
39170
39218
|
slippage: step.slippage,
|
|
39171
39219
|
priceInfo: step.priceInfo,
|
|
39172
|
-
priceImpact: step.priceImpact,
|
|
39220
|
+
priceImpact: step.priceImpact ?? "0",
|
|
39173
39221
|
providerFees: step.providerFees,
|
|
39174
39222
|
networkFee: step.networkFee,
|
|
39175
39223
|
provider: step.provider,
|
|
@@ -39667,6 +39715,16 @@ function registerErc20Command(program3) {
|
|
|
39667
39715
|
// src/commands/alert.ts
|
|
39668
39716
|
init_dist();
|
|
39669
39717
|
init_dist2();
|
|
39718
|
+
function resolveTokenLabel(tokenId) {
|
|
39719
|
+
try {
|
|
39720
|
+
const { coinId, contractAddress } = parseTokenId(tokenId);
|
|
39721
|
+
const chain2 = getChainByCoinId(coinId);
|
|
39722
|
+
if (chain2 && !contractAddress) return chain2.symbol;
|
|
39723
|
+
return tokenId;
|
|
39724
|
+
} catch {
|
|
39725
|
+
return tokenId;
|
|
39726
|
+
}
|
|
39727
|
+
}
|
|
39670
39728
|
function registerAlertCommand(program3) {
|
|
39671
39729
|
const alert = program3.command("alert").description("Manage price alerts");
|
|
39672
39730
|
const alertStore = new AlertStore();
|
|
@@ -39713,14 +39771,30 @@ function registerAlertCommand(program3) {
|
|
|
39713
39771
|
alert.command("list").description("List all alerts").option("--active", "Show only active alerts").option("--json", "JSON output").action(async (opts) => {
|
|
39714
39772
|
const alerts = opts.active ? await alertStore.getActive() : await alertStore.list();
|
|
39715
39773
|
if (opts.json) {
|
|
39716
|
-
|
|
39774
|
+
const enriched = alerts.map((a3) => {
|
|
39775
|
+
let chainLabel = a3.chainKey;
|
|
39776
|
+
try {
|
|
39777
|
+
chainLabel = tokenIdToChain(a3.tokenId) ?? a3.chainKey;
|
|
39778
|
+
} catch {
|
|
39779
|
+
}
|
|
39780
|
+
return { ...a3, tokenLabel: resolveTokenLabel(a3.tokenId), chainLabel };
|
|
39781
|
+
});
|
|
39782
|
+
output(enriched, true);
|
|
39717
39783
|
} else {
|
|
39718
39784
|
if (alerts.length === 0) {
|
|
39719
39785
|
info("No alerts found");
|
|
39720
39786
|
return;
|
|
39721
39787
|
}
|
|
39722
39788
|
for (const a3 of alerts) {
|
|
39723
|
-
|
|
39789
|
+
const label = resolveTokenLabel(a3.tokenId);
|
|
39790
|
+
let chainHint = "";
|
|
39791
|
+
try {
|
|
39792
|
+
const chain2 = tokenIdToChain(a3.tokenId);
|
|
39793
|
+
chainHint = chain2 ? ` (${chain2})` : "";
|
|
39794
|
+
} catch {
|
|
39795
|
+
chainHint = "";
|
|
39796
|
+
}
|
|
39797
|
+
info(`${a3.id} | ${label}${chainHint} | ${a3.condition} $${a3.targetPrice} | ${a3.active ? "active" : "triggered"}`);
|
|
39724
39798
|
}
|
|
39725
39799
|
}
|
|
39726
39800
|
});
|
|
@@ -39888,13 +39962,20 @@ function registerQueryCommand(program3) {
|
|
|
39888
39962
|
price = results[0].priceUsd;
|
|
39889
39963
|
}
|
|
39890
39964
|
}
|
|
39965
|
+
if (price === null) {
|
|
39966
|
+
error(`Token not found: ${token}`);
|
|
39967
|
+
if (opts.json) output({ token: token.toUpperCase(), chain: chain2, priceUsd: null, error: "Token not found" }, true);
|
|
39968
|
+
process.exitCode = 1;
|
|
39969
|
+
return;
|
|
39970
|
+
}
|
|
39891
39971
|
if (opts.history) {
|
|
39892
39972
|
const chainInfo = getChainById(chain2);
|
|
39893
39973
|
if (!chainInfo) throw new Error(`Unknown chain: ${chain2}`);
|
|
39894
|
-
const
|
|
39974
|
+
const isNative = !tokenInfo.address || tokenInfo.address === NATIVE_TOKEN_ADDRESS || tokenInfo.address === SOLANA_NATIVE_ADDRESS;
|
|
39975
|
+
const assetId = isNative ? `c${chainInfo.coinId}` : `c${chainInfo.coinId}_t${tokenInfo.address}`;
|
|
39895
39976
|
const chartData = await client.gateway(
|
|
39896
39977
|
"GET",
|
|
39897
|
-
`/
|
|
39978
|
+
`/v1/market/charts/${assetId}`,
|
|
39898
39979
|
void 0,
|
|
39899
39980
|
`currency=USD&period=${opts.history}`
|
|
39900
39981
|
);
|
|
@@ -39904,7 +39985,7 @@ function registerQueryCommand(program3) {
|
|
|
39904
39985
|
if (opts.json) {
|
|
39905
39986
|
output({ token: token.toUpperCase(), chain: chain2, priceUsd: price }, true);
|
|
39906
39987
|
} else {
|
|
39907
|
-
const priceStr =
|
|
39988
|
+
const priceStr = `$${price.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 6 })}`;
|
|
39908
39989
|
console.log(`${import_chalk6.default.bold(token.toUpperCase())} ${priceStr} ${import_chalk6.default.dim(chain2)}`);
|
|
39909
39990
|
}
|
|
39910
39991
|
} catch (err) {
|
|
@@ -39915,7 +39996,11 @@ function registerQueryCommand(program3) {
|
|
|
39915
39996
|
try {
|
|
39916
39997
|
const client = await getClient();
|
|
39917
39998
|
const swapClient = new SwapClient(client);
|
|
39918
|
-
const result = await swapClient.searchTokens({
|
|
39999
|
+
const result = await swapClient.searchTokens({
|
|
40000
|
+
query,
|
|
40001
|
+
limit: parseInt(opts.limit, 10),
|
|
40002
|
+
...opts.networks ? { networks: opts.networks } : {}
|
|
40003
|
+
});
|
|
39919
40004
|
output(result, opts.json);
|
|
39920
40005
|
} catch (err) {
|
|
39921
40006
|
handleError(err, opts.json);
|
|
@@ -39989,7 +40074,9 @@ function registerQueryCommand(program3) {
|
|
|
39989
40074
|
if (opts.json) {
|
|
39990
40075
|
output(result, true);
|
|
39991
40076
|
} else if (result.length === 0) {
|
|
39992
|
-
|
|
40077
|
+
const explorer = opts.chain === "ethereum" ? "etherscan.io" : opts.chain === "bsc" ? "bscscan.com" : void 0;
|
|
40078
|
+
const hint = explorer ? ` Check ${explorer} for full history.` : "";
|
|
40079
|
+
info(`No transactions found via API.${hint}`);
|
|
39993
40080
|
} else {
|
|
39994
40081
|
output(result, false);
|
|
39995
40082
|
}
|
|
@@ -40044,7 +40131,17 @@ function registerQueryCommand(program3) {
|
|
|
40044
40131
|
const coinId = parseInt(opts.coin);
|
|
40045
40132
|
const chain2 = getChainByCoinId(coinId);
|
|
40046
40133
|
if (!chain2) throw new Error(`Unknown coin ID: ${coinId}`);
|
|
40047
|
-
|
|
40134
|
+
try {
|
|
40135
|
+
await ensureTrustSDK();
|
|
40136
|
+
const { getWalletCore: getWalletCore2, getCoinType: getCoinType2 } = await Promise.resolve().then(() => (init_dist4(), dist_exports2));
|
|
40137
|
+
const wc2 = getWalletCore2();
|
|
40138
|
+
const ct5 = getCoinType2(coinId);
|
|
40139
|
+
if (ct5 && !wc2.CoinTypeExt.validate(ct5, opts.address)) {
|
|
40140
|
+
throw new Error(`Invalid address format for ${chain2.name}`);
|
|
40141
|
+
}
|
|
40142
|
+
} catch (err) {
|
|
40143
|
+
if (err instanceof Error && err.message.startsWith("Invalid address")) throw err;
|
|
40144
|
+
}
|
|
40048
40145
|
const client = new BlockchainClient();
|
|
40049
40146
|
const balance = await client.getBalance(`c${coinId}`, opts.address);
|
|
40050
40147
|
const fmt = (raw) => {
|
|
@@ -40093,26 +40190,28 @@ function registerQueryCommand(program3) {
|
|
|
40093
40190
|
const wc2 = getWalletCore2();
|
|
40094
40191
|
const ct5 = getCoinType2(coinId);
|
|
40095
40192
|
if (ct5) {
|
|
40096
|
-
const isValid2 = wc2.
|
|
40193
|
+
const isValid2 = wc2.CoinTypeExt.validate(ct5, opts.address);
|
|
40097
40194
|
if (!isValid2) {
|
|
40098
|
-
const
|
|
40195
|
+
const chainInfo = getChainByCoinId(coinId);
|
|
40196
|
+
const label = chainInfo?.name ?? `coin ${coinId}`;
|
|
40197
|
+
const result = { status: "error", valid: false, chain: chainInfo?.id, message: `Invalid address format for ${label}` };
|
|
40099
40198
|
output(result, opts.json);
|
|
40100
40199
|
return;
|
|
40101
40200
|
}
|
|
40102
40201
|
}
|
|
40103
40202
|
} catch {
|
|
40104
|
-
const isHex = /^0x[0-9a-fA-F]{40}$/.test(opts.address);
|
|
40105
|
-
const isEvmCoin = [60, 20000714, 10009e3, 966, 10042221, 10000070, 8453, 137, 250, 10000250, 10000324, 81457, 2e3, 61].includes(coinId);
|
|
40106
|
-
if (isEvmCoin && !isHex) {
|
|
40107
|
-
output({ status: "error", valid: false, message: `Invalid EVM address format` }, opts.json);
|
|
40108
|
-
return;
|
|
40109
|
-
}
|
|
40110
40203
|
}
|
|
40111
40204
|
}
|
|
40112
40205
|
const client = await getClient();
|
|
40113
40206
|
const service = new SecurityService(client);
|
|
40114
40207
|
const backendResult = await service.validate({ address: opts.address, assetId });
|
|
40115
|
-
|
|
40208
|
+
const chainKey = opts.chain || (assetId ? (() => {
|
|
40209
|
+
const coinIdStr = assetId.replace(/^c/, "").split("_")[0];
|
|
40210
|
+
const coinId = parseInt(coinIdStr, 10);
|
|
40211
|
+
return getChainByCoinId(coinId)?.id;
|
|
40212
|
+
})() : void 0);
|
|
40213
|
+
const enriched = { ...backendResult, ...chainKey ? { chain: chainKey } : {} };
|
|
40214
|
+
output(enriched, opts.json);
|
|
40116
40215
|
} catch (err) {
|
|
40117
40216
|
handleError(err, opts.json);
|
|
40118
40217
|
}
|
|
@@ -44324,17 +44423,34 @@ var BalanceActionProvider = class extends ActionProvider {
|
|
|
44324
44423
|
getTokenHoldings() {
|
|
44325
44424
|
return {
|
|
44326
44425
|
name: "get_token_holdings",
|
|
44327
|
-
description: "Get
|
|
44426
|
+
description: "Get ERC-20 token holdings for an address",
|
|
44328
44427
|
schema: external_exports.object({
|
|
44329
44428
|
address: external_exports.string().describe("Wallet address"),
|
|
44330
44429
|
coin: external_exports.coerce.number().describe("SLIP44 coin ID")
|
|
44331
44430
|
}),
|
|
44332
44431
|
invoke: async (ctx, input) => {
|
|
44333
|
-
|
|
44432
|
+
const response = await ctx.httpClient.gateway("POST", "/v1/assets", {
|
|
44334
44433
|
version: 2,
|
|
44335
44434
|
includeDisabledAssets: false,
|
|
44336
44435
|
assets: [{ address: input.address, coin: input.coin }]
|
|
44337
44436
|
});
|
|
44437
|
+
const holdings = Array.isArray(response) ? response : response.docs ?? response.data ?? [];
|
|
44438
|
+
const tokens = [];
|
|
44439
|
+
for (const h4 of holdings) {
|
|
44440
|
+
if (Array.isArray(h4.tokens)) {
|
|
44441
|
+
for (const t of h4.tokens) {
|
|
44442
|
+
tokens.push({
|
|
44443
|
+
symbol: t.symbol ?? t.contract,
|
|
44444
|
+
contract: t.contract,
|
|
44445
|
+
decimals: t.decimals ?? 18,
|
|
44446
|
+
balance: t.balance ?? "0",
|
|
44447
|
+
name: t.name,
|
|
44448
|
+
type: t.type
|
|
44449
|
+
});
|
|
44450
|
+
}
|
|
44451
|
+
}
|
|
44452
|
+
}
|
|
44453
|
+
return { address: input.address, coin: input.coin, tokens };
|
|
44338
44454
|
}
|
|
44339
44455
|
};
|
|
44340
44456
|
}
|
|
@@ -54236,7 +54352,7 @@ var crypto5 = __toESM(require("crypto"));
|
|
|
54236
54352
|
// package.json
|
|
54237
54353
|
var package_default = {
|
|
54238
54354
|
name: "@trustwallet/cli",
|
|
54239
|
-
version: "0.6.
|
|
54355
|
+
version: "0.6.9",
|
|
54240
54356
|
description: "TWAK CLI \u2014 command-line interface for Trust Wallet Agent Kit",
|
|
54241
54357
|
main: "dist/index.js",
|
|
54242
54358
|
types: "dist/index.d.ts",
|
|
@@ -54256,6 +54372,7 @@ var package_default = {
|
|
|
54256
54372
|
clean: "rm -rf dist"
|
|
54257
54373
|
},
|
|
54258
54374
|
dependencies: {
|
|
54375
|
+
"node-fetch": "2.7.0",
|
|
54259
54376
|
"qrcode-terminal": "0.12.0"
|
|
54260
54377
|
},
|
|
54261
54378
|
optionalDependencies: {
|
|
@@ -54266,7 +54383,6 @@ var package_default = {
|
|
|
54266
54383
|
boxen: "5.1.2",
|
|
54267
54384
|
chalk: "4.1.2",
|
|
54268
54385
|
commander: "12.1.0",
|
|
54269
|
-
"node-fetch": "2.7.0",
|
|
54270
54386
|
ora: "5.4.1",
|
|
54271
54387
|
"@twak/actions": "workspace:*",
|
|
54272
54388
|
"@twak/blockchain": "workspace:*",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustwallet/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "TWAK CLI — command-line interface for Trust Wallet Agent Kit",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"scripts"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"node-fetch": "2.7.0",
|
|
16
17
|
"qrcode-terminal": "0.12.0"
|
|
17
18
|
},
|
|
18
19
|
"optionalDependencies": {
|
|
@@ -23,21 +24,20 @@
|
|
|
23
24
|
"boxen": "5.1.2",
|
|
24
25
|
"chalk": "4.1.2",
|
|
25
26
|
"commander": "12.1.0",
|
|
26
|
-
"node-fetch": "2.7.0",
|
|
27
27
|
"ora": "5.4.1",
|
|
28
28
|
"tsup": "8.5.1",
|
|
29
29
|
"typescript": "5.7.3",
|
|
30
|
-
"@twak/actions": "0.6.
|
|
31
|
-
"@twak/
|
|
32
|
-
"@twak/
|
|
33
|
-
"@twak/
|
|
34
|
-
"@twak/
|
|
35
|
-
"@twak/
|
|
36
|
-
"@twak/
|
|
37
|
-
"@twak/
|
|
38
|
-
"@twak/
|
|
39
|
-
"@twak/
|
|
40
|
-
"@twak/
|
|
30
|
+
"@twak/actions": "0.6.9",
|
|
31
|
+
"@twak/blockchain": "0.6.9",
|
|
32
|
+
"@twak/core": "0.6.9",
|
|
33
|
+
"@twak/mcp": "0.6.9",
|
|
34
|
+
"@twak/security": "0.6.9",
|
|
35
|
+
"@twak/storage": "0.6.9",
|
|
36
|
+
"@twak/transactions": "0.6.9",
|
|
37
|
+
"@twak/wallet": "0.6.9",
|
|
38
|
+
"@twak/walletconnect": "0.6.9",
|
|
39
|
+
"@twak/wallet-core": "0.6.9",
|
|
40
|
+
"@twak/swap": "0.6.9"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|