naracli 1.0.88 → 1.0.89
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 +8 -1
- package/dist/nara-cli-bundle.cjs +195 -43
- package/package.json +3 -3
- package/src/cli/commands/bridge.ts +3 -1
package/README.md
CHANGED
|
@@ -76,7 +76,12 @@ 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
|
|
79
|
+
bridge tokens List supported bridge tokens (with minimum amounts)
|
|
80
|
+
dex pools [token-mint] Find Meteora pools containing a token (default: NARA)
|
|
81
|
+
dex smart-quote <input> <output> <amount> Best-route quote via smart router
|
|
82
|
+
dex smart-swap <input> <output> <amount> [--slippage] Execute best-route swap via smart router
|
|
83
|
+
dex quote <pool> <input-mint> <amount> [--slippage] Quote on a specific pool (auto-detects type)
|
|
84
|
+
dex swap <pool> <input-mint> <amount> [--slippage] Swap on a specific Meteora pool
|
|
80
85
|
guide Show the full NARA usage guide
|
|
81
86
|
activity Show current community activities
|
|
82
87
|
config get Show current config
|
|
@@ -86,6 +91,8 @@ config reset [key] Reset config to default
|
|
|
86
91
|
|
|
87
92
|
Most agent commands default to your saved agent ID (from `agent register` / `agent myid`). Use `--agent-id <id>` to override.
|
|
88
93
|
|
|
94
|
+
For `dex` commands, token symbols `NARA`, `USDC`, `USDT`, `SOL` can be used instead of mint addresses. `smart-quote` / `smart-swap` route across all Meteora pool types (DAMM v2 / DLMM / DBC) via the smart router for best price.
|
|
95
|
+
|
|
89
96
|
## Global Options
|
|
90
97
|
|
|
91
98
|
| Option | Description |
|
package/dist/nara-cli-bundle.cjs
CHANGED
|
@@ -66721,10 +66721,10 @@ var require_dist3 = __commonJS({
|
|
|
66721
66721
|
}
|
|
66722
66722
|
});
|
|
66723
66723
|
|
|
66724
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
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.
|
|
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"() {
|
|
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.
|
|
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
|
|
66743
66743
|
function getAltAddress() {
|
|
66744
66744
|
if (_overrideAltAddresses !== null) return _overrideAltAddresses;
|
|
66745
66745
|
if (!DEFAULT_ALT_ADDRESS) return [];
|
|
@@ -66837,16 +66837,12 @@ async function sendTx(connection, payer, instructions, signers, opts) {
|
|
|
66837
66837
|
skipPreflight: opts?.skipPreflight ?? _globalSkipPreflight ?? false
|
|
66838
66838
|
});
|
|
66839
66839
|
}
|
|
66840
|
-
const startTime = Date.now();
|
|
66841
66840
|
const TIMEOUT_MS = 2e4;
|
|
66842
|
-
const POLL_INTERVAL_MS =
|
|
66841
|
+
const POLL_INTERVAL_MS = 2e3;
|
|
66842
|
+
const INITIAL_DELAY_MS = 2e3;
|
|
66843
|
+
await new Promise((r) => setTimeout(r, INITIAL_DELAY_MS));
|
|
66844
|
+
const startTime = Date.now();
|
|
66843
66845
|
while (Date.now() - startTime < TIMEOUT_MS) {
|
|
66844
|
-
const currentBlockHeight = await connection.getBlockHeight("confirmed");
|
|
66845
|
-
if (currentBlockHeight > lastValidBlockHeight) {
|
|
66846
|
-
throw new Error(
|
|
66847
|
-
`Transaction ${signature} expired: block height exceeded`
|
|
66848
|
-
);
|
|
66849
|
-
}
|
|
66850
66846
|
const statusResult = await connection.getSignatureStatuses([signature]);
|
|
66851
66847
|
const status = statusResult?.value?.[0];
|
|
66852
66848
|
if (status) {
|
|
@@ -66865,7 +66861,7 @@ async function sendTx(connection, payer, instructions, signers, opts) {
|
|
|
66865
66861
|
}
|
|
66866
66862
|
var import_web394, _cachedAlts, _cachedAltKey, _overrideAltAddresses, _globalSkipPreflight;
|
|
66867
66863
|
var init_tx = __esm({
|
|
66868
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
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"() {
|
|
66869
66865
|
import_web394 = __toESM(require_index_cjs(), 1);
|
|
66870
66866
|
init_constants2();
|
|
66871
66867
|
_cachedAlts = [];
|
|
@@ -83120,10 +83116,10 @@ var require_cjs2 = __commonJS({
|
|
|
83120
83116
|
}
|
|
83121
83117
|
});
|
|
83122
83118
|
|
|
83123
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
83124
83120
|
var nara_quest_default;
|
|
83125
83121
|
var init_nara_quest = __esm({
|
|
83126
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
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"() {
|
|
83127
83123
|
nara_quest_default = {
|
|
83128
83124
|
address: "Quest11111111111111111111111111111111111111",
|
|
83129
83125
|
metadata: {
|
|
@@ -85277,10 +85273,10 @@ var init_nara_quest = __esm({
|
|
|
85277
85273
|
}
|
|
85278
85274
|
});
|
|
85279
85275
|
|
|
85280
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
85281
85277
|
var nara_agent_registry_default;
|
|
85282
85278
|
var init_nara_agent_registry = __esm({
|
|
85283
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
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"() {
|
|
85284
85280
|
nara_agent_registry_default = {
|
|
85285
85281
|
address: "AgentRegistry111111111111111111111111111111",
|
|
85286
85282
|
metadata: {
|
|
@@ -87790,6 +87786,129 @@ var init_nara_agent_registry = __esm({
|
|
|
87790
87786
|
}
|
|
87791
87787
|
]
|
|
87792
87788
|
},
|
|
87789
|
+
{
|
|
87790
|
+
name: "reject_twitter_with_reason",
|
|
87791
|
+
discriminator: [
|
|
87792
|
+
3,
|
|
87793
|
+
212,
|
|
87794
|
+
79,
|
|
87795
|
+
37,
|
|
87796
|
+
41,
|
|
87797
|
+
111,
|
|
87798
|
+
209,
|
|
87799
|
+
83
|
|
87800
|
+
],
|
|
87801
|
+
accounts: [
|
|
87802
|
+
{
|
|
87803
|
+
name: "verifier",
|
|
87804
|
+
writable: true,
|
|
87805
|
+
signer: true
|
|
87806
|
+
},
|
|
87807
|
+
{
|
|
87808
|
+
name: "config",
|
|
87809
|
+
pda: {
|
|
87810
|
+
seeds: [
|
|
87811
|
+
{
|
|
87812
|
+
kind: "const",
|
|
87813
|
+
value: [
|
|
87814
|
+
99,
|
|
87815
|
+
111,
|
|
87816
|
+
110,
|
|
87817
|
+
102,
|
|
87818
|
+
105,
|
|
87819
|
+
103
|
|
87820
|
+
]
|
|
87821
|
+
}
|
|
87822
|
+
]
|
|
87823
|
+
}
|
|
87824
|
+
},
|
|
87825
|
+
{
|
|
87826
|
+
name: "agent",
|
|
87827
|
+
pda: {
|
|
87828
|
+
seeds: [
|
|
87829
|
+
{
|
|
87830
|
+
kind: "const",
|
|
87831
|
+
value: [
|
|
87832
|
+
97,
|
|
87833
|
+
103,
|
|
87834
|
+
101,
|
|
87835
|
+
110,
|
|
87836
|
+
116
|
|
87837
|
+
]
|
|
87838
|
+
},
|
|
87839
|
+
{
|
|
87840
|
+
kind: "arg",
|
|
87841
|
+
path: "agent_id"
|
|
87842
|
+
}
|
|
87843
|
+
]
|
|
87844
|
+
}
|
|
87845
|
+
},
|
|
87846
|
+
{
|
|
87847
|
+
name: "twitter",
|
|
87848
|
+
writable: true,
|
|
87849
|
+
pda: {
|
|
87850
|
+
seeds: [
|
|
87851
|
+
{
|
|
87852
|
+
kind: "const",
|
|
87853
|
+
value: [
|
|
87854
|
+
116,
|
|
87855
|
+
119,
|
|
87856
|
+
105,
|
|
87857
|
+
116,
|
|
87858
|
+
116,
|
|
87859
|
+
101,
|
|
87860
|
+
114
|
|
87861
|
+
]
|
|
87862
|
+
},
|
|
87863
|
+
{
|
|
87864
|
+
kind: "account",
|
|
87865
|
+
path: "agent"
|
|
87866
|
+
}
|
|
87867
|
+
]
|
|
87868
|
+
}
|
|
87869
|
+
},
|
|
87870
|
+
{
|
|
87871
|
+
name: "twitter_queue",
|
|
87872
|
+
writable: true,
|
|
87873
|
+
pda: {
|
|
87874
|
+
seeds: [
|
|
87875
|
+
{
|
|
87876
|
+
kind: "const",
|
|
87877
|
+
value: [
|
|
87878
|
+
116,
|
|
87879
|
+
119,
|
|
87880
|
+
105,
|
|
87881
|
+
116,
|
|
87882
|
+
116,
|
|
87883
|
+
101,
|
|
87884
|
+
114,
|
|
87885
|
+
95,
|
|
87886
|
+
113,
|
|
87887
|
+
117,
|
|
87888
|
+
101,
|
|
87889
|
+
117,
|
|
87890
|
+
101
|
|
87891
|
+
]
|
|
87892
|
+
}
|
|
87893
|
+
]
|
|
87894
|
+
}
|
|
87895
|
+
},
|
|
87896
|
+
{
|
|
87897
|
+
name: "system_program",
|
|
87898
|
+
address: "11111111111111111111111111111111"
|
|
87899
|
+
}
|
|
87900
|
+
],
|
|
87901
|
+
args: [
|
|
87902
|
+
{
|
|
87903
|
+
name: "agent_id",
|
|
87904
|
+
type: "string"
|
|
87905
|
+
},
|
|
87906
|
+
{
|
|
87907
|
+
name: "reason",
|
|
87908
|
+
type: "u64"
|
|
87909
|
+
}
|
|
87910
|
+
]
|
|
87911
|
+
},
|
|
87793
87912
|
{
|
|
87794
87913
|
name: "set_bio",
|
|
87795
87914
|
discriminator: [
|
|
@@ -90216,12 +90335,25 @@ var init_nara_agent_registry = __esm({
|
|
|
90216
90335
|
]
|
|
90217
90336
|
}
|
|
90218
90337
|
},
|
|
90338
|
+
{
|
|
90339
|
+
name: "rejection_reason",
|
|
90340
|
+
type: "u64"
|
|
90341
|
+
},
|
|
90219
90342
|
{
|
|
90220
90343
|
name: "_reserved",
|
|
90221
90344
|
type: {
|
|
90222
90345
|
array: [
|
|
90223
90346
|
"u8",
|
|
90224
|
-
|
|
90347
|
+
96
|
|
90348
|
+
]
|
|
90349
|
+
}
|
|
90350
|
+
},
|
|
90351
|
+
{
|
|
90352
|
+
name: "_reserved_a",
|
|
90353
|
+
type: {
|
|
90354
|
+
array: [
|
|
90355
|
+
"u8",
|
|
90356
|
+
24
|
|
90225
90357
|
]
|
|
90226
90358
|
}
|
|
90227
90359
|
},
|
|
@@ -90661,7 +90793,7 @@ var init_nara_agent_registry = __esm({
|
|
|
90661
90793
|
}
|
|
90662
90794
|
});
|
|
90663
90795
|
|
|
90664
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
90665
90797
|
var agent_registry_exports = {};
|
|
90666
90798
|
__export(agent_registry_exports, {
|
|
90667
90799
|
approveRejectedTwitter: () => approveRejectedTwitter,
|
|
@@ -91568,7 +91700,7 @@ async function rejectTweet(connection, wallet, agentId, options) {
|
|
|
91568
91700
|
}
|
|
91569
91701
|
var import_web395, anchor, import_anchor, import_bn, DEFAULT_CHUNK_SIZE, BUFFER_HEADER_SIZE, MEMORY_HEADER_SIZE, BIO_META_HEADER_SIZE;
|
|
91570
91702
|
var init_agent_registry = __esm({
|
|
91571
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
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"() {
|
|
91572
91704
|
import_web395 = __toESM(require_index_cjs(), 1);
|
|
91573
91705
|
anchor = __toESM(require_cjs2(), 1);
|
|
91574
91706
|
import_anchor = __toESM(require_cjs2(), 1);
|
|
@@ -171329,7 +171461,7 @@ var init_main3 = __esm({
|
|
|
171329
171461
|
}
|
|
171330
171462
|
});
|
|
171331
171463
|
|
|
171332
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
171333
171465
|
var quest_exports = {};
|
|
171334
171466
|
__export(quest_exports, {
|
|
171335
171467
|
adjustFreeStake: () => adjustFreeStake,
|
|
@@ -171588,13 +171720,18 @@ async function submitAnswer(connection, wallet, proof, agent = "", model = "", o
|
|
|
171588
171720
|
if (options.stake === "auto") {
|
|
171589
171721
|
const quest = await getQuestInfo(connection, wallet, options);
|
|
171590
171722
|
const stakeInfo = await getStakeInfo(connection, wallet.publicKey, options);
|
|
171591
|
-
const
|
|
171592
|
-
|
|
171593
|
-
const deficit = required - current;
|
|
171594
|
-
if (deficit > 0) {
|
|
171595
|
-
stakeLamports = new import_bn2.default(Math.round(deficit * import_web396.LAMPORTS_PER_SOL));
|
|
171596
|
-
} else {
|
|
171723
|
+
const freeCredits = stakeInfo?.freeCredits ?? 0;
|
|
171724
|
+
if (freeCredits > 0) {
|
|
171597
171725
|
stakeLamports = new import_bn2.default(0);
|
|
171726
|
+
} else {
|
|
171727
|
+
const required = quest.effectiveStakeRequirement;
|
|
171728
|
+
const current = stakeInfo?.amount ?? 0;
|
|
171729
|
+
const deficit = required - current;
|
|
171730
|
+
if (deficit > 0) {
|
|
171731
|
+
stakeLamports = new import_bn2.default(Math.round(deficit * import_web396.LAMPORTS_PER_SOL));
|
|
171732
|
+
} else {
|
|
171733
|
+
stakeLamports = new import_bn2.default(0);
|
|
171734
|
+
}
|
|
171598
171735
|
}
|
|
171599
171736
|
} else {
|
|
171600
171737
|
stakeLamports = new import_bn2.default(Math.round(options.stake * import_web396.LAMPORTS_PER_SOL));
|
|
@@ -171847,7 +171984,7 @@ async function setAirdropConfig(connection, wallet, airdropAmount, maxAirdropCou
|
|
|
171847
171984
|
}
|
|
171848
171985
|
var import_web396, anchor2, import_anchor2, import_bn2, import_meta, BN254_FIELD, WSOL_MINT;
|
|
171849
171986
|
var init_quest = __esm({
|
|
171850
|
-
"node_modules/.pnpm/nara-sdk@1.0.
|
|
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"() {
|
|
171851
171988
|
import_web396 = __toESM(require_index_cjs(), 1);
|
|
171852
171989
|
init_esm4();
|
|
171853
171990
|
anchor2 = __toESM(require_cjs2(), 1);
|
|
@@ -266493,7 +266630,7 @@ var esm_default = base;
|
|
|
266493
266630
|
var ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
266494
266631
|
var esm_default2 = esm_default(ALPHABET);
|
|
266495
266632
|
|
|
266496
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
266497
266634
|
var import_web393 = __toESM(require_index_cjs(), 1);
|
|
266498
266635
|
var NaraSDK = class {
|
|
266499
266636
|
connection;
|
|
@@ -266508,10 +266645,10 @@ var NaraSDK = class {
|
|
|
266508
266645
|
}
|
|
266509
266646
|
};
|
|
266510
266647
|
|
|
266511
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
266512
266649
|
init_constants2();
|
|
266513
266650
|
|
|
266514
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
266515
266652
|
var import_tweetnacl = __toESM(require_nacl_fast(), 1);
|
|
266516
266653
|
function buildSignMessage(params) {
|
|
266517
266654
|
return Object.keys(params).filter((k2) => k2 !== "sign").sort().map((k2) => `${k2}=${params[k2]}`).join("&");
|
|
@@ -266539,17 +266676,17 @@ function signUrl(baseUrl, wallet, params) {
|
|
|
266539
266676
|
return url.toString();
|
|
266540
266677
|
}
|
|
266541
266678
|
|
|
266542
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
266543
266680
|
init_tx();
|
|
266544
266681
|
init_quest();
|
|
266545
266682
|
|
|
266546
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
266547
266684
|
var import_web397 = __toESM(require_index_cjs(), 1);
|
|
266548
266685
|
var anchor3 = __toESM(require_cjs2(), 1);
|
|
266549
266686
|
var import_anchor3 = __toESM(require_cjs2(), 1);
|
|
266550
266687
|
init_constants2();
|
|
266551
266688
|
|
|
266552
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
266553
266690
|
var nara_skills_hub_default = {
|
|
266554
266691
|
address: "SkiLLHub11111111111111111111111111111111111",
|
|
266555
266692
|
metadata: {
|
|
@@ -267947,7 +268084,7 @@ var nara_skills_hub_default = {
|
|
|
267947
268084
|
]
|
|
267948
268085
|
};
|
|
267949
268086
|
|
|
267950
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
267951
268088
|
init_tx();
|
|
267952
268089
|
var DEFAULT_CHUNK_SIZE2 = 800;
|
|
267953
268090
|
var BUFFER_HEADER_SIZE2 = 144;
|
|
@@ -268177,7 +268314,7 @@ async function uploadSkillContent(connection, wallet, name, content, options) {
|
|
|
268177
268314
|
}
|
|
268178
268315
|
}
|
|
268179
268316
|
|
|
268180
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
268181
268318
|
var import_web398 = __toESM(require_index_cjs(), 1);
|
|
268182
268319
|
var anchor4 = __toESM(require_cjs2(), 1);
|
|
268183
268320
|
var import_anchor4 = __toESM(require_cjs2(), 1);
|
|
@@ -268187,7 +268324,7 @@ var import_bn3 = __toESM(require_bn(), 1);
|
|
|
268187
268324
|
init_constants2();
|
|
268188
268325
|
init_tx();
|
|
268189
268326
|
|
|
268190
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
268191
268328
|
var nara_zk_default = {
|
|
268192
268329
|
address: "ZKidentity111111111111111111111111111111111",
|
|
268193
268330
|
metadata: {
|
|
@@ -269398,7 +269535,7 @@ var nara_zk_default = {
|
|
|
269398
269535
|
]
|
|
269399
269536
|
};
|
|
269400
269537
|
|
|
269401
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
269402
269539
|
var import_meta2 = {};
|
|
269403
269540
|
var BN254_PRIME = 21888242871839275222246405745257275088696311157297823662689037894645226208583n;
|
|
269404
269541
|
var MERKLE_LEVELS = 64;
|
|
@@ -269760,10 +269897,10 @@ async function transferZkIdByCommitment(connection, payer, name, currentIdSecret
|
|
|
269760
269897
|
return sendTx(connection, payer, [ix]);
|
|
269761
269898
|
}
|
|
269762
269899
|
|
|
269763
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
269764
269901
|
init_agent_registry();
|
|
269765
269902
|
|
|
269766
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
269767
269904
|
var import_web399 = __toESM(require_index_cjs(), 1);
|
|
269768
269905
|
init_esm4();
|
|
269769
269906
|
init_constants2();
|
|
@@ -269794,6 +269931,8 @@ var BRIDGE_TOKENS = {
|
|
|
269794
269931
|
USDC: {
|
|
269795
269932
|
symbol: "USDC",
|
|
269796
269933
|
decimals: 6,
|
|
269934
|
+
minAmount: 100000n,
|
|
269935
|
+
// 0.1 USDC
|
|
269797
269936
|
solana: {
|
|
269798
269937
|
warpProgram: new import_web399.PublicKey("4GcZJTa8s9vxtTz97Vj1RrwKMqPkT3DiiJkvUQDwsuZP"),
|
|
269799
269938
|
mode: "collateral",
|
|
@@ -269810,6 +269949,8 @@ var BRIDGE_TOKENS = {
|
|
|
269810
269949
|
USDT: {
|
|
269811
269950
|
symbol: "USDT",
|
|
269812
269951
|
decimals: 6,
|
|
269952
|
+
minAmount: 100000n,
|
|
269953
|
+
// 0.1 USDT
|
|
269813
269954
|
solana: {
|
|
269814
269955
|
warpProgram: new import_web399.PublicKey("DCTt9H3pwwU89qC3Z4voYNThZypV68AwhYNzMNBxWXoy"),
|
|
269815
269956
|
mode: "collateral",
|
|
@@ -269826,6 +269967,8 @@ var BRIDGE_TOKENS = {
|
|
|
269826
269967
|
SOL: {
|
|
269827
269968
|
symbol: "SOL",
|
|
269828
269969
|
decimals: 9,
|
|
269970
|
+
minAmount: 1000000n,
|
|
269971
|
+
// 0.001 SOL
|
|
269829
269972
|
solana: {
|
|
269830
269973
|
warpProgram: new import_web399.PublicKey("46MmAWwKRAt9uvn7m44NXbVq2DCWBQE2r1TDw25nyXrt"),
|
|
269831
269974
|
mode: "native",
|
|
@@ -270070,6 +270213,13 @@ function makeBridgeIxs(params) {
|
|
|
270070
270213
|
skipFee
|
|
270071
270214
|
} = params;
|
|
270072
270215
|
if (amount <= 0n) throw new Error("amount must be > 0");
|
|
270216
|
+
const tokenCfg = getToken(token);
|
|
270217
|
+
if (amount < tokenCfg.minAmount) {
|
|
270218
|
+
const min2 = Number(tokenCfg.minAmount) / Math.pow(10, tokenCfg.decimals);
|
|
270219
|
+
throw new Error(
|
|
270220
|
+
`Bridge amount too small: minimum for ${token} is ${min2} (raw ${tokenCfg.minAmount})`
|
|
270221
|
+
);
|
|
270222
|
+
}
|
|
270073
270223
|
const split = skipFee ? { feeAmount: 0n, bridgeAmount: amount, feeBps: 0 } : calculateBridgeFee(amount, feeBps);
|
|
270074
270224
|
if (split.bridgeAmount <= 0n) {
|
|
270075
270225
|
throw new Error("bridge amount after fee is zero \u2014 increase amount or lower feeBps");
|
|
@@ -270235,7 +270385,7 @@ async function scanValidator(folder, messageId, maxScan) {
|
|
|
270235
270385
|
};
|
|
270236
270386
|
}
|
|
270237
270387
|
|
|
270238
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
270239
270389
|
var import_web3100 = __toESM(require_index_cjs(), 1);
|
|
270240
270390
|
init_esm4();
|
|
270241
270391
|
init_constants2();
|
|
@@ -270359,7 +270509,7 @@ function buildAnchorDiscriminators() {
|
|
|
270359
270509
|
}
|
|
270360
270510
|
var anchorDiscs = buildAnchorDiscriminators();
|
|
270361
270511
|
|
|
270362
|
-
// node_modules/.pnpm/nara-sdk@1.0.
|
|
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
|
|
270363
270513
|
var import_web3101 = __toESM(require_index_cjs(), 1);
|
|
270364
270514
|
var import_bn4 = __toESM(require_bn(), 1);
|
|
270365
270515
|
|
|
@@ -274914,13 +275064,15 @@ function handleBridgeTokens(options) {
|
|
|
274914
275064
|
formatOutput(tokens.map((t2) => ({
|
|
274915
275065
|
symbol: t2.symbol,
|
|
274916
275066
|
decimals: t2.decimals,
|
|
275067
|
+
minAmount: t2.minAmount ? Number(t2.minAmount) / 10 ** t2.decimals : null,
|
|
274917
275068
|
solanaMint: t2.solana.mint?.toBase58() ?? "native",
|
|
274918
275069
|
naraMint: t2.nara.mint?.toBase58() ?? "native"
|
|
274919
275070
|
})), true);
|
|
274920
275071
|
} else {
|
|
274921
275072
|
console.log("");
|
|
274922
275073
|
for (const t2 of tokens) {
|
|
274923
|
-
|
|
275074
|
+
const minStr = t2.minAmount ? `${Number(t2.minAmount) / 10 ** t2.decimals} ${t2.symbol}` : "\u2014";
|
|
275075
|
+
console.log(` ${t2.symbol} (${t2.decimals} decimals) min: ${minStr}`);
|
|
274924
275076
|
console.log(` Solana: ${t2.solana.mint?.toBase58() ?? "native SOL"} (${t2.solana.mode})`);
|
|
274925
275077
|
console.log(` Nara: ${t2.nara.mint?.toBase58() ?? "native NARA"} (${t2.nara.mode})`);
|
|
274926
275078
|
}
|
|
@@ -276734,7 +276886,7 @@ function registerCommands(program3) {
|
|
|
276734
276886
|
}
|
|
276735
276887
|
|
|
276736
276888
|
// bin/nara-cli.ts
|
|
276737
|
-
var version2 = true ? "1.0.
|
|
276889
|
+
var version2 = true ? "1.0.89" : "dev";
|
|
276738
276890
|
var program2 = new Command();
|
|
276739
276891
|
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);
|
|
276740
276892
|
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.
|
|
3
|
+
"version": "1.0.89",
|
|
4
4
|
"description": "CLI for the Nara chain (Solana-compatible)",
|
|
5
5
|
"homepage": "https://nara.build",
|
|
6
6
|
"repository": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"typescript": "^5"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@coral-xyz/anchor": "^0.32.1",
|
|
59
58
|
"@clack/prompts": "^1.0.1",
|
|
59
|
+
"@coral-xyz/anchor": "^0.32.1",
|
|
60
60
|
"@meteora-ag/cp-amm-sdk": "^1.4.1",
|
|
61
61
|
"@meteora-ag/dlmm": "^1.9.4",
|
|
62
62
|
"@meteora-ag/dynamic-bonding-curve-sdk": "^1.5.7",
|
|
@@ -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.
|
|
70
|
+
"nara-sdk": "^1.0.82",
|
|
71
71
|
"picocolors": "^1.1.1"
|
|
72
72
|
},
|
|
73
73
|
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
|
|
@@ -209,13 +209,15 @@ function handleBridgeTokens(options: GlobalOptions) {
|
|
|
209
209
|
formatOutput(tokens.map((t: any) => ({
|
|
210
210
|
symbol: t.symbol,
|
|
211
211
|
decimals: t.decimals,
|
|
212
|
+
minAmount: t.minAmount ? (Number(t.minAmount) / 10 ** t.decimals) : null,
|
|
212
213
|
solanaMint: t.solana.mint?.toBase58() ?? "native",
|
|
213
214
|
naraMint: t.nara.mint?.toBase58() ?? "native",
|
|
214
215
|
})), true);
|
|
215
216
|
} else {
|
|
216
217
|
console.log("");
|
|
217
218
|
for (const t of tokens) {
|
|
218
|
-
|
|
219
|
+
const minStr = t.minAmount ? `${Number(t.minAmount) / 10 ** t.decimals} ${t.symbol}` : "—";
|
|
220
|
+
console.log(` ${t.symbol} (${t.decimals} decimals) min: ${minStr}`);
|
|
219
221
|
console.log(` Solana: ${t.solana.mint?.toBase58() ?? "native SOL"} (${t.solana.mode})`);
|
|
220
222
|
console.log(` Nara: ${t.nara.mint?.toBase58() ?? "native NARA"} (${t.nara.mode})`);
|
|
221
223
|
}
|