naracli 1.0.89 → 1.0.90

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/README.md CHANGED
@@ -76,7 +76,7 @@ zkid withdraw <name> [--recipient <addr>] Withdraw deposit
76
76
  bridge transfer <token> <amount> --from <chain> Bridge tokens between Solana and Nara
77
77
  bridge status <tx-or-message-id> --from <chain> Check bridge transfer delivery status
78
78
  bridge info Show bridgeable token balances on both chains
79
- bridge tokens List supported bridge tokens (with minimum amounts)
79
+ bridge tokens List supported bridge tokens (shows min amount + min fee per token)
80
80
  dex pools [token-mint] Find Meteora pools containing a token (default: NARA)
81
81
  dex smart-quote <input> <output> <amount> Best-route quote via smart router
82
82
  dex smart-swap <input> <output> <amount> [--slippage] Execute best-route swap via smart router
@@ -66721,10 +66721,10 @@ var require_dist3 = __commonJS({
66721
66721
  }
66722
66722
  });
66723
66723
 
66724
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/constants.ts
66724
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/constants.ts
66725
66725
  var DEFAULT_RPC_URL, DEFAULT_QUEST_RELAY_URL, DEFAULT_QUEST_PROGRAM_ID, DEFAULT_SKILLS_PROGRAM_ID, DEFAULT_ZKID_PROGRAM_ID, DEFAULT_AGENT_REGISTRY_PROGRAM_ID, DEFAULT_ALT_ADDRESS, DEFAULT_BRIDGE_FEE_BPS, BRIDGE_FEE_BPS_DENOMINATOR, DEFAULT_BRIDGE_FEE_RECIPIENT_SOLANA, DEFAULT_BRIDGE_FEE_RECIPIENT_NARA;
66726
66726
  var init_constants2 = __esm({
66727
- "node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/constants.ts"() {
66727
+ "node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/constants.ts"() {
66728
66728
  DEFAULT_RPC_URL = process.env.RPC_URL || "https://mainnet-api.nara.build/";
66729
66729
  DEFAULT_QUEST_RELAY_URL = process.env.QUEST_RELAY_URL || "https://quest-api.nara.build/";
66730
66730
  DEFAULT_QUEST_PROGRAM_ID = process.env.QUEST_PROGRAM_ID || "Quest11111111111111111111111111111111111111";
@@ -66739,7 +66739,7 @@ var init_constants2 = __esm({
66739
66739
  }
66740
66740
  });
66741
66741
 
66742
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx.ts
66742
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx.ts
66743
66743
  function getAltAddress() {
66744
66744
  if (_overrideAltAddresses !== null) return _overrideAltAddresses;
66745
66745
  if (!DEFAULT_ALT_ADDRESS) return [];
@@ -66861,7 +66861,7 @@ async function sendTx(connection, payer, instructions, signers, opts) {
66861
66861
  }
66862
66862
  var import_web394, _cachedAlts, _cachedAltKey, _overrideAltAddresses, _globalSkipPreflight;
66863
66863
  var init_tx = __esm({
66864
- "node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx.ts"() {
66864
+ "node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx.ts"() {
66865
66865
  import_web394 = __toESM(require_index_cjs(), 1);
66866
66866
  init_constants2();
66867
66867
  _cachedAlts = [];
@@ -83116,10 +83116,10 @@ var require_cjs2 = __commonJS({
83116
83116
  }
83117
83117
  });
83118
83118
 
83119
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_quest.json
83119
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_quest.json
83120
83120
  var nara_quest_default;
83121
83121
  var init_nara_quest = __esm({
83122
- "node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_quest.json"() {
83122
+ "node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_quest.json"() {
83123
83123
  nara_quest_default = {
83124
83124
  address: "Quest11111111111111111111111111111111111111",
83125
83125
  metadata: {
@@ -85273,10 +85273,10 @@ var init_nara_quest = __esm({
85273
85273
  }
85274
85274
  });
85275
85275
 
85276
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_agent_registry.json
85276
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_agent_registry.json
85277
85277
  var nara_agent_registry_default;
85278
85278
  var init_nara_agent_registry = __esm({
85279
- "node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_agent_registry.json"() {
85279
+ "node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_agent_registry.json"() {
85280
85280
  nara_agent_registry_default = {
85281
85281
  address: "AgentRegistry111111111111111111111111111111",
85282
85282
  metadata: {
@@ -90793,7 +90793,7 @@ var init_nara_agent_registry = __esm({
90793
90793
  }
90794
90794
  });
90795
90795
 
90796
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/agent_registry.ts
90796
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/agent_registry.ts
90797
90797
  var agent_registry_exports = {};
90798
90798
  __export(agent_registry_exports, {
90799
90799
  approveRejectedTwitter: () => approveRejectedTwitter,
@@ -91700,7 +91700,7 @@ async function rejectTweet(connection, wallet, agentId, options) {
91700
91700
  }
91701
91701
  var import_web395, anchor, import_anchor, import_bn, DEFAULT_CHUNK_SIZE, BUFFER_HEADER_SIZE, MEMORY_HEADER_SIZE, BIO_META_HEADER_SIZE;
91702
91702
  var init_agent_registry = __esm({
91703
- "node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/agent_registry.ts"() {
91703
+ "node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/agent_registry.ts"() {
91704
91704
  import_web395 = __toESM(require_index_cjs(), 1);
91705
91705
  anchor = __toESM(require_cjs2(), 1);
91706
91706
  import_anchor = __toESM(require_cjs2(), 1);
@@ -171461,7 +171461,7 @@ var init_main3 = __esm({
171461
171461
  }
171462
171462
  });
171463
171463
 
171464
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/quest.ts
171464
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/quest.ts
171465
171465
  var quest_exports = {};
171466
171466
  __export(quest_exports, {
171467
171467
  adjustFreeStake: () => adjustFreeStake,
@@ -171984,7 +171984,7 @@ async function setAirdropConfig(connection, wallet, airdropAmount, maxAirdropCou
171984
171984
  }
171985
171985
  var import_web396, anchor2, import_anchor2, import_bn2, import_meta, BN254_FIELD, WSOL_MINT;
171986
171986
  var init_quest = __esm({
171987
- "node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/quest.ts"() {
171987
+ "node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/quest.ts"() {
171988
171988
  import_web396 = __toESM(require_index_cjs(), 1);
171989
171989
  init_esm4();
171990
171990
  anchor2 = __toESM(require_cjs2(), 1);
@@ -266630,7 +266630,7 @@ var esm_default = base;
266630
266630
  var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
266631
266631
  var esm_default2 = esm_default(ALPHABET);
266632
266632
 
266633
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/client.ts
266633
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/client.ts
266634
266634
  var import_web393 = __toESM(require_index_cjs(), 1);
266635
266635
  var NaraSDK = class {
266636
266636
  connection;
@@ -266645,10 +266645,10 @@ var NaraSDK = class {
266645
266645
  }
266646
266646
  };
266647
266647
 
266648
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
266648
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
266649
266649
  init_constants2();
266650
266650
 
266651
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/sign.ts
266651
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/sign.ts
266652
266652
  var import_tweetnacl = __toESM(require_nacl_fast(), 1);
266653
266653
  function buildSignMessage(params) {
266654
266654
  return Object.keys(params).filter((k2) => k2 !== "sign").sort().map((k2) => `${k2}=${params[k2]}`).join("&");
@@ -266676,17 +266676,17 @@ function signUrl(baseUrl, wallet, params) {
266676
266676
  return url.toString();
266677
266677
  }
266678
266678
 
266679
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
266679
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
266680
266680
  init_tx();
266681
266681
  init_quest();
266682
266682
 
266683
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/skills.ts
266683
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/skills.ts
266684
266684
  var import_web397 = __toESM(require_index_cjs(), 1);
266685
266685
  var anchor3 = __toESM(require_cjs2(), 1);
266686
266686
  var import_anchor3 = __toESM(require_cjs2(), 1);
266687
266687
  init_constants2();
266688
266688
 
266689
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_skills_hub.json
266689
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_skills_hub.json
266690
266690
  var nara_skills_hub_default = {
266691
266691
  address: "SkiLLHub11111111111111111111111111111111111",
266692
266692
  metadata: {
@@ -268084,7 +268084,7 @@ var nara_skills_hub_default = {
268084
268084
  ]
268085
268085
  };
268086
268086
 
268087
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/skills.ts
268087
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/skills.ts
268088
268088
  init_tx();
268089
268089
  var DEFAULT_CHUNK_SIZE2 = 800;
268090
268090
  var BUFFER_HEADER_SIZE2 = 144;
@@ -268314,7 +268314,7 @@ async function uploadSkillContent(connection, wallet, name, content, options) {
268314
268314
  }
268315
268315
  }
268316
268316
 
268317
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/zkid.ts
268317
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/zkid.ts
268318
268318
  var import_web398 = __toESM(require_index_cjs(), 1);
268319
268319
  var anchor4 = __toESM(require_cjs2(), 1);
268320
268320
  var import_anchor4 = __toESM(require_cjs2(), 1);
@@ -268324,7 +268324,7 @@ var import_bn3 = __toESM(require_bn(), 1);
268324
268324
  init_constants2();
268325
268325
  init_tx();
268326
268326
 
268327
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_zk.json
268327
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/idls/nara_zk.json
268328
268328
  var nara_zk_default = {
268329
268329
  address: "ZKidentity111111111111111111111111111111111",
268330
268330
  metadata: {
@@ -269535,7 +269535,7 @@ var nara_zk_default = {
269535
269535
  ]
269536
269536
  };
269537
269537
 
269538
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/zkid.ts
269538
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/zkid.ts
269539
269539
  var import_meta2 = {};
269540
269540
  var BN254_PRIME = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
269541
269541
  var MERKLE_LEVELS = 64;
@@ -269897,10 +269897,10 @@ async function transferZkIdByCommitment(connection, payer, name, currentIdSecret
269897
269897
  return sendTx(connection, payer, [ix]);
269898
269898
  }
269899
269899
 
269900
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
269900
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
269901
269901
  init_agent_registry();
269902
269902
 
269903
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/bridge.ts
269903
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/bridge.ts
269904
269904
  var import_web399 = __toESM(require_index_cjs(), 1);
269905
269905
  init_esm4();
269906
269906
  init_constants2();
@@ -269931,8 +269931,10 @@ var BRIDGE_TOKENS = {
269931
269931
  USDC: {
269932
269932
  symbol: "USDC",
269933
269933
  decimals: 6,
269934
- minAmount: 100000n,
269935
- // 0.1 USDC
269934
+ minAmount: 5000000n,
269935
+ // 5 USDC
269936
+ minFee: 500000n,
269937
+ // 0.5 USDC (fee floor)
269936
269938
  solana: {
269937
269939
  warpProgram: new import_web399.PublicKey("4GcZJTa8s9vxtTz97Vj1RrwKMqPkT3DiiJkvUQDwsuZP"),
269938
269940
  mode: "collateral",
@@ -269949,8 +269951,10 @@ var BRIDGE_TOKENS = {
269949
269951
  USDT: {
269950
269952
  symbol: "USDT",
269951
269953
  decimals: 6,
269952
- minAmount: 100000n,
269953
- // 0.1 USDT
269954
+ minAmount: 5000000n,
269955
+ // 5 USDT
269956
+ minFee: 500000n,
269957
+ // 0.5 USDT (fee floor)
269954
269958
  solana: {
269955
269959
  warpProgram: new import_web399.PublicKey("DCTt9H3pwwU89qC3Z4voYNThZypV68AwhYNzMNBxWXoy"),
269956
269960
  mode: "collateral",
@@ -269967,8 +269971,10 @@ var BRIDGE_TOKENS = {
269967
269971
  SOL: {
269968
269972
  symbol: "SOL",
269969
269973
  decimals: 9,
269970
- minAmount: 1000000n,
269971
- // 0.001 SOL
269974
+ minAmount: 100000000n,
269975
+ // 0.1 SOL
269976
+ minFee: 10000000n,
269977
+ // 0.01 SOL (fee floor)
269972
269978
  solana: {
269973
269979
  warpProgram: new import_web399.PublicKey("46MmAWwKRAt9uvn7m44NXbVq2DCWBQE2r1TDw25nyXrt"),
269974
269980
  mode: "native",
@@ -270072,14 +270078,15 @@ function encodeTransferRemote(destinationDomain, recipient, amount) {
270072
270078
  buf.writeBigUInt64LE(amount, 45);
270073
270079
  return buf;
270074
270080
  }
270075
- function calculateBridgeFee(amount, feeBps) {
270081
+ function calculateBridgeFee(amount, feeBps, minFee = 0n) {
270076
270082
  const bps = feeBps ?? DEFAULT_BRIDGE_FEE_BPS;
270077
270083
  if (bps < 0 || bps > BRIDGE_FEE_BPS_DENOMINATOR) {
270078
270084
  throw new Error(`Invalid feeBps: ${bps}`);
270079
270085
  }
270080
- const feeAmount = amount * BigInt(bps) / BigInt(BRIDGE_FEE_BPS_DENOMINATOR);
270086
+ const pctFee = amount * BigInt(bps) / BigInt(BRIDGE_FEE_BPS_DENOMINATOR);
270087
+ const feeAmount = pctFee > minFee ? pctFee : minFee;
270081
270088
  const bridgeAmount = amount - feeAmount;
270082
- return { feeAmount, bridgeAmount, feeBps: bps };
270089
+ return { feeAmount, bridgeAmount, feeBps: bps, minFee };
270083
270090
  }
270084
270091
  function makeBridgeFeeIxs(params) {
270085
270092
  const { token, fromChain, sender, feeRecipient, feeAmount } = params;
@@ -270220,9 +270227,9 @@ function makeBridgeIxs(params) {
270220
270227
  `Bridge amount too small: minimum for ${token} is ${min2} (raw ${tokenCfg.minAmount})`
270221
270228
  );
270222
270229
  }
270223
- const split = skipFee ? { feeAmount: 0n, bridgeAmount: amount, feeBps: 0 } : calculateBridgeFee(amount, feeBps);
270230
+ const split = skipFee ? { feeAmount: 0n, bridgeAmount: amount, feeBps: 0, minFee: 0n } : calculateBridgeFee(amount, feeBps, tokenCfg.minFee);
270224
270231
  if (split.bridgeAmount <= 0n) {
270225
- throw new Error("bridge amount after fee is zero \u2014 increase amount or lower feeBps");
270232
+ throw new Error("bridge amount after fee is zero \u2014 increase amount or lower fee");
270226
270233
  }
270227
270234
  const recipientForFee = feeRecipient ?? getBridgeFeeRecipient(fromChain);
270228
270235
  const feeIxs = makeBridgeFeeIxs({
@@ -270385,7 +270392,7 @@ async function scanValidator(folder, messageId, maxScan) {
270385
270392
  };
270386
270393
  }
270387
270394
 
270388
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx_parser.ts
270395
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/src/tx_parser.ts
270389
270396
  var import_web3100 = __toESM(require_index_cjs(), 1);
270390
270397
  init_esm4();
270391
270398
  init_constants2();
@@ -270509,7 +270516,7 @@ function buildAnchorDiscriminators() {
270509
270516
  }
270510
270517
  var anchorDiscs = buildAnchorDiscriminators();
270511
270518
 
270512
- // node_modules/.pnpm/nara-sdk@1.0.82_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
270519
+ // node_modules/.pnpm/nara-sdk@1.0.83_bufferutil@4.1.0_fastestsmallesttextencoderdecoder@1.0.22_typescript@5.9.3_utf-8-validate@6.0.6/node_modules/nara-sdk/index.ts
270513
270520
  var import_web3101 = __toESM(require_index_cjs(), 1);
270514
270521
  var import_bn4 = __toESM(require_bn(), 1);
270515
270522
 
@@ -275060,19 +275067,24 @@ async function handleBridgeStatus(id, options) {
275060
275067
  }
275061
275068
  function handleBridgeTokens(options) {
275062
275069
  const tokens = Object.values(BRIDGE_TOKENS);
275070
+ const toUi = (n, d) => n ? Number(n) / 10 ** d : null;
275063
275071
  if (options.json) {
275064
275072
  formatOutput(tokens.map((t2) => ({
275065
275073
  symbol: t2.symbol,
275066
275074
  decimals: t2.decimals,
275067
- minAmount: t2.minAmount ? Number(t2.minAmount) / 10 ** t2.decimals : null,
275075
+ minAmount: toUi(t2.minAmount, t2.decimals),
275076
+ minFee: toUi(t2.minFee, t2.decimals),
275068
275077
  solanaMint: t2.solana.mint?.toBase58() ?? "native",
275069
275078
  naraMint: t2.nara.mint?.toBase58() ?? "native"
275070
275079
  })), true);
275071
275080
  } else {
275072
275081
  console.log("");
275073
275082
  for (const t2 of tokens) {
275074
- const minStr = t2.minAmount ? `${Number(t2.minAmount) / 10 ** t2.decimals} ${t2.symbol}` : "\u2014";
275075
- console.log(` ${t2.symbol} (${t2.decimals} decimals) min: ${minStr}`);
275083
+ const minAmt = toUi(t2.minAmount, t2.decimals);
275084
+ const minFee = toUi(t2.minFee, t2.decimals);
275085
+ const minAmtStr = minAmt !== null ? `${minAmt} ${t2.symbol}` : "\u2014";
275086
+ const minFeeStr = minFee !== null ? `${minFee} ${t2.symbol}` : "\u2014";
275087
+ console.log(` ${t2.symbol} (${t2.decimals} decimals) min: ${minAmtStr} min fee: ${minFeeStr}`);
275076
275088
  console.log(` Solana: ${t2.solana.mint?.toBase58() ?? "native SOL"} (${t2.solana.mode})`);
275077
275089
  console.log(` Nara: ${t2.nara.mint?.toBase58() ?? "native NARA"} (${t2.nara.mode})`);
275078
275090
  }
@@ -275160,7 +275172,7 @@ function registerBridgeCommands(program3) {
275160
275172
  const bridge = program3.command("bridge").description("Cross-chain bridge between Solana and Nara (powered by Hyperlane)").addHelpText("after", `
275161
275173
  1. Solana and Nara use the same wallet address (Ed25519). To bridge from Solana, your wallet must have SOL on Solana mainnet for gas.
275162
275174
  2. Delivery takes ~5-10 minutes (Hyperlane multi-validator signing).
275163
- 3. Bridge fee: 0.5%.
275175
+ 3. Bridge fee: 0.5% of amount, with a per-token minimum fee floor (see "bridge tokens"). Each token also has a minimum bridgeable amount.
275164
275176
 
275165
275177
  Examples:
275166
275178
  npx naracli bridge transfer USDC 10 --from solana # Solana \u2192 Nara
@@ -276886,7 +276898,7 @@ function registerCommands(program3) {
276886
276898
  }
276887
276899
 
276888
276900
  // bin/nara-cli.ts
276889
- var version2 = true ? "1.0.89" : "dev";
276901
+ var version2 = true ? "1.0.90" : "dev";
276890
276902
  var program2 = new Command();
276891
276903
  program2.name("naracli").description("CLI for the Nara chain. Native coin is NARA (not SOL). Mine NARA for free via PoMI quests, manage wallets, register agents, and more. Run 'naracli <command> --help' for details on any command.").version(version2);
276892
276904
  program2.option("-r, --rpc-url <url>", "RPC endpoint (default: https://mainnet-api.nara.build/)").option("-w, --wallet <path>", "Path to wallet keypair JSON file (default: ~/.config/nara/id.json)").option("-j, --json", "Output in JSON format");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naracli",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "CLI for the Nara chain (Solana-compatible)",
5
5
  "homepage": "https://nara.build",
6
6
  "repository": {
@@ -67,7 +67,7 @@
67
67
  "bs58": "^6.0.0",
68
68
  "commander": "^12.1.0",
69
69
  "ed25519-hd-key": "^1.3.0",
70
- "nara-sdk": "^1.0.82",
70
+ "nara-sdk": "^1.0.83",
71
71
  "picocolors": "^1.1.1"
72
72
  },
73
73
  "packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
@@ -205,19 +205,24 @@ async function handleBridgeStatus(
205
205
 
206
206
  function handleBridgeTokens(options: GlobalOptions) {
207
207
  const tokens = Object.values(BRIDGE_TOKENS) as any[];
208
+ const toUi = (n: bigint | undefined, d: number) => n ? Number(n) / 10 ** d : null;
208
209
  if (options.json) {
209
210
  formatOutput(tokens.map((t: any) => ({
210
211
  symbol: t.symbol,
211
212
  decimals: t.decimals,
212
- minAmount: t.minAmount ? (Number(t.minAmount) / 10 ** t.decimals) : null,
213
+ minAmount: toUi(t.minAmount, t.decimals),
214
+ minFee: toUi(t.minFee, t.decimals),
213
215
  solanaMint: t.solana.mint?.toBase58() ?? "native",
214
216
  naraMint: t.nara.mint?.toBase58() ?? "native",
215
217
  })), true);
216
218
  } else {
217
219
  console.log("");
218
220
  for (const t of tokens) {
219
- const minStr = t.minAmount ? `${Number(t.minAmount) / 10 ** t.decimals} ${t.symbol}` : "—";
220
- console.log(` ${t.symbol} (${t.decimals} decimals) min: ${minStr}`);
221
+ const minAmt = toUi(t.minAmount, t.decimals);
222
+ const minFee = toUi(t.minFee, t.decimals);
223
+ const minAmtStr = minAmt !== null ? `${minAmt} ${t.symbol}` : "—";
224
+ const minFeeStr = minFee !== null ? `${minFee} ${t.symbol}` : "—";
225
+ console.log(` ${t.symbol} (${t.decimals} decimals) min: ${minAmtStr} min fee: ${minFeeStr}`);
221
226
  console.log(` Solana: ${t.solana.mint?.toBase58() ?? "native SOL"} (${t.solana.mode})`);
222
227
  console.log(` Nara: ${t.nara.mint?.toBase58() ?? "native NARA"} (${t.nara.mode})`);
223
228
  }
@@ -334,7 +339,7 @@ export function registerBridgeCommands(program: Command): void {
334
339
  .addHelpText("after", `
335
340
  1. Solana and Nara use the same wallet address (Ed25519). To bridge from Solana, your wallet must have SOL on Solana mainnet for gas.
336
341
  2. Delivery takes ~5-10 minutes (Hyperlane multi-validator signing).
337
- 3. Bridge fee: 0.5%.
342
+ 3. Bridge fee: 0.5% of amount, with a per-token minimum fee floor (see "bridge tokens"). Each token also has a minimum bridgeable amount.
338
343
 
339
344
  Examples:
340
345
  npx naracli bridge transfer USDC 10 --from solana # Solana → Nara