@trustwallet/cli 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -22
  2. package/package.json +14 -13
package/dist/index.js CHANGED
@@ -676,7 +676,7 @@ function signRequest(method, path5, query, accessId, hmacSecret) {
676
676
  function createTwakClient(config2) {
677
677
  return new TwakHttpClient(config2);
678
678
  }
679
- var import_crypto, NATIVE_TOKEN_ADDRESS, SOLANA_NATIVE_ADDRESS, CHAINS, COMMON_TOKENS, BSC_18_DECIMAL_TOKENS, NATIVE_SYMBOLS, TOKEN_DECIMALS, CELO_NATIVE_ADDRESS, TwakError, TwakApiError, TwakNetworkError, TwakValidationError, NAMING_API, DEFAULT_GATEWAY_URL, DEFAULT_AMBER_URL, DEFAULT_MARKET_URL, DEFAULT_TIMEOUT, TwakHttpClient;
679
+ var import_crypto, NATIVE_TOKEN_ADDRESS, SOLANA_NATIVE_ADDRESS, CHAINS, COMMON_TOKENS, BSC_18_DECIMAL_TOKENS, NATIVE_SYMBOLS, TOKEN_DECIMALS, CELO_NATIVE_ADDRESS, TwakError, TwakApiError, TwakNetworkError, TwakValidationError, NAMING_API, DEFAULT_GATEWAY_URL, DEFAULT_MARKET_URL, DEFAULT_TIMEOUT, TwakHttpClient;
680
680
  var init_dist2 = __esm({
681
681
  "../core/dist/index.mjs"() {
682
682
  "use strict";
@@ -1169,7 +1169,6 @@ var init_dist2 = __esm({
1169
1169
  };
1170
1170
  NAMING_API = "https://naming.trustwallet.com/v1/lookup";
1171
1171
  DEFAULT_GATEWAY_URL = "https://tws.trustwallet.com";
1172
- DEFAULT_AMBER_URL = "https://api.trustwallet.com";
1173
1172
  DEFAULT_MARKET_URL = "https://market.trustwallet.com";
1174
1173
  DEFAULT_TIMEOUT = 3e4;
1175
1174
  TwakHttpClient = class {
@@ -1177,7 +1176,6 @@ var init_dist2 = __esm({
1177
1176
  constructor(config2) {
1178
1177
  this.config = {
1179
1178
  gatewayBaseUrl: DEFAULT_GATEWAY_URL,
1180
- amberBaseUrl: DEFAULT_AMBER_URL,
1181
1179
  marketBaseUrl: DEFAULT_MARKET_URL,
1182
1180
  timeout: DEFAULT_TIMEOUT,
1183
1181
  userAgent: void 0,
@@ -1205,23 +1203,10 @@ var init_dist2 = __esm({
1205
1203
  });
1206
1204
  }
1207
1205
  async amber(method, path5, body) {
1208
- const url = new URL(path5, this.config.amberBaseUrl);
1209
- const headers = signRequest(
1210
- method,
1211
- path5,
1212
- "",
1213
- this.config.accessId,
1214
- this.config.hmacSecret
1215
- );
1216
- return this.fetch(url.toString(), {
1217
- method,
1218
- headers: {
1219
- ...headers,
1220
- "Content-Type": "application/json",
1221
- ...this.config.headers
1222
- },
1223
- body: body ? JSON.stringify(body) : void 0
1224
- });
1206
+ if (!path5.startsWith("/amber-api/")) {
1207
+ throw new Error("Amber API path must start with '/amber-api/'.");
1208
+ }
1209
+ return this.gateway(method, path5, body);
1225
1210
  }
1226
1211
  async market(method, path5, body) {
1227
1212
  const url = new URL(path5, this.config.marketBaseUrl);
@@ -28072,7 +28057,7 @@ var crypto3 = __toESM(require("crypto"));
28072
28057
  // package.json
28073
28058
  var package_default = {
28074
28059
  name: "@trustwallet/cli",
28075
- version: "0.6.0",
28060
+ version: "0.6.2",
28076
28061
  description: "TWAK CLI \u2014 command-line interface for Trust Wallet Agent Kit",
28077
28062
  main: "dist/index.js",
28078
28063
  types: "dist/index.d.ts",
@@ -28100,7 +28085,8 @@ var package_default = {
28100
28085
  "qrcode-terminal": "0.12.0"
28101
28086
  },
28102
28087
  optionalDependencies: {
28103
- "@amplitude/analytics-node": "1.5.39"
28088
+ "@amplitude/analytics-node": "1.5.39",
28089
+ keytar: "7.9.0"
28104
28090
  },
28105
28091
  devDependencies: {
28106
28092
  "@twak/actions": "workspace:*",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustwallet/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
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",
@@ -21,22 +21,23 @@
21
21
  "qrcode-terminal": "0.12.0"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@amplitude/analytics-node": "1.5.39"
24
+ "@amplitude/analytics-node": "1.5.39",
25
+ "keytar": "7.9.0"
25
26
  },
26
27
  "devDependencies": {
27
28
  "tsup": "8.5.1",
28
29
  "typescript": "5.7.3",
29
- "@twak/actions": "0.6.0",
30
- "@twak/blockchain": "0.6.0",
31
- "@twak/core": "0.6.0",
32
- "@twak/mcp": "0.6.0",
33
- "@twak/security": "0.6.0",
34
- "@twak/storage": "0.6.0",
35
- "@twak/swap": "0.6.0",
36
- "@twak/transactions": "0.6.0",
37
- "@twak/wallet": "0.6.0",
38
- "@twak/wallet-core": "0.6.0",
39
- "@twak/walletconnect": "0.6.0"
30
+ "@twak/actions": "0.6.2",
31
+ "@twak/blockchain": "0.6.2",
32
+ "@twak/core": "0.6.2",
33
+ "@twak/mcp": "0.6.2",
34
+ "@twak/storage": "0.6.2",
35
+ "@twak/swap": "0.6.2",
36
+ "@twak/wallet": "0.6.2",
37
+ "@twak/wallet-core": "0.6.2",
38
+ "@twak/walletconnect": "0.6.2",
39
+ "@twak/transactions": "0.6.2",
40
+ "@twak/security": "0.6.2"
40
41
  },
41
42
  "publishConfig": {
42
43
  "access": "public"