@lucid-agents/taskmarket 1.48.0 → 1.50.0
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/agent-compatibility.json +1 -1
- package/dist/{api-2PFUP432.js → api-SXHSD3WO.js} +2 -2
- package/dist/{channels-Z6VN7FXP.js → channels-4YOMV7R7.js} +4 -4
- package/dist/{chunk-AB3BDUMS.js → chunk-6VZBAHQC.js} +3 -3
- package/dist/{chunk-GPKAJ7QH.js → chunk-C7557KRB.js} +1 -1
- package/dist/{chunk-KTT6PSHQ.js → chunk-CGUFHUIV.js} +1 -1
- package/dist/{chunk-JXBWKGXC.js → chunk-EJ7KUYME.js} +141 -25
- package/dist/{chunk-UJ3FRWUU.js → chunk-EVCG557X.js} +1 -1
- package/dist/{chunk-SV6LNVI5.js → chunk-EYHXTVYK.js} +2 -2
- package/dist/{chunk-QRNIBDYX.js → chunk-FGW2NNPQ.js} +3 -3
- package/dist/{chunk-DKBI3SE3.js → chunk-M5WTLXDY.js} +1 -1
- package/dist/{chunk-WPJRL4F7.js → chunk-MY5CD4PT.js} +8 -8
- package/dist/{chunk-YAUYTYQI.js → chunk-PZI3QQO4.js} +5 -5
- package/dist/{chunk-VYYJ7FUB.js → chunk-V5S4LCIE.js} +318 -88
- package/dist/{chunk-VENFZBAZ.js → chunk-YBSZTSJE.js} +1 -1
- package/dist/{doctor-6ASEDCCF.js → doctor-FACAMASV.js} +9 -8
- package/dist/index.js +993 -1917
- package/dist/{launch-JVXJSXJF.js → launch-K5666QYB.js} +11 -11
- package/dist/pi-extensions/xgate.cjs +204 -121
- package/dist/{read-auth-OQ3VVA4V.js → read-auth-EFE6NQFG.js} +3 -3
- package/dist/{reconcile-TJ2VXC6R.js → reconcile-Q4MJXXR3.js} +4 -4
- package/dist/{status-LU7AKAKJ.js → status-YKFKGTMQ.js} +9 -8
- package/dist/{sync-pull-52G7XZZT.js → sync-pull-AN2M344W.js} +4 -4
- package/dist/{task-access-grants-HUYBGG5E.js → task-access-grants-MN5WXHHQ.js} +2 -2
- package/package.json +7 -10
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
listWorkerSubmissions,
|
|
15
15
|
submitTaskFiles,
|
|
16
16
|
taskRequirementsOf
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MY5CD4PT.js";
|
|
18
18
|
import {
|
|
19
19
|
ComputeCreditError,
|
|
20
20
|
applyComputeCreditSetup,
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
executeX402PayRequest,
|
|
27
27
|
failedAfterPayment,
|
|
28
28
|
fetchComputePricing,
|
|
29
|
+
filledWriteOutcome,
|
|
30
|
+
forgetPaidWriteBody,
|
|
29
31
|
listPendingComputePurchases,
|
|
30
32
|
loadComputeCreditConfig,
|
|
31
33
|
loadExternalHeaders,
|
|
@@ -35,18 +37,20 @@ import {
|
|
|
35
37
|
reconcileX402PaymentById,
|
|
36
38
|
refusedPaidWrite,
|
|
37
39
|
releasePendingComputePurchase,
|
|
40
|
+
replayedFields,
|
|
38
41
|
resolvePendingComputePurchases,
|
|
39
42
|
withPaymentProtocol,
|
|
43
|
+
withSelectedChain,
|
|
40
44
|
x402FeePost,
|
|
41
45
|
x402PaymentProtocol
|
|
42
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-V5S4LCIE.js";
|
|
43
47
|
import {
|
|
44
48
|
signReadAuth
|
|
45
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-EYHXTVYK.js";
|
|
46
50
|
import {
|
|
47
51
|
saveTaskAccessGrant,
|
|
48
52
|
taskAccessGrantHeaders
|
|
49
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-M5WTLXDY.js";
|
|
50
54
|
import {
|
|
51
55
|
MPP_TEMPO_DEFAULT_VALIDITY_SECONDS,
|
|
52
56
|
X402PayError,
|
|
@@ -65,7 +69,7 @@ import {
|
|
|
65
69
|
setX402PolicyRuleEnabled,
|
|
66
70
|
signSponsoredTempoTransfer,
|
|
67
71
|
signTaskmarketFeePayment
|
|
68
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-C7557KRB.js";
|
|
69
73
|
import {
|
|
70
74
|
ALL_NETWORKS,
|
|
71
75
|
ApiError,
|
|
@@ -131,7 +135,7 @@ import {
|
|
|
131
135
|
withErrorContext,
|
|
132
136
|
withIdempotentWrite,
|
|
133
137
|
withTapSignature
|
|
134
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-EVCG557X.js";
|
|
135
139
|
import {
|
|
136
140
|
AGENT_AVATAR_MAX_BYTES,
|
|
137
141
|
AGENT_HIRES_ROLES,
|
|
@@ -405,7 +409,7 @@ import {
|
|
|
405
409
|
vaultCallGasLimit7702,
|
|
406
410
|
verifiersUnsupportedOnChain,
|
|
407
411
|
viemChainFor
|
|
408
|
-
} from "./chunk-
|
|
412
|
+
} from "./chunk-EJ7KUYME.js";
|
|
409
413
|
import "./chunk-S7SJMJ2I.js";
|
|
410
414
|
|
|
411
415
|
// src/index.ts
|
|
@@ -486,6 +490,34 @@ function readLastError() {
|
|
|
486
490
|
}
|
|
487
491
|
}
|
|
488
492
|
|
|
493
|
+
// src/lib/wrong-network.ts
|
|
494
|
+
var WRONG_NETWORK_CODE = "wrong_network";
|
|
495
|
+
var WrongNetworkError = class extends Error {
|
|
496
|
+
code = WRONG_NETWORK_CODE;
|
|
497
|
+
details;
|
|
498
|
+
constructor(subject, chainId) {
|
|
499
|
+
const network = selectedNetwork();
|
|
500
|
+
const named = networkNameForChain(chainId) ?? null;
|
|
501
|
+
super(
|
|
502
|
+
named === null ? `${subject} is on chain ${chainId}, which no CLI network serves, but the selected network is ${network.name}.` : `${subject} is on ${named}, but the selected network is ${network.name}. Re-run with ${taskmarketCommandFor(chainId)}.`
|
|
503
|
+
);
|
|
504
|
+
this.details = {
|
|
505
|
+
code: WRONG_NETWORK_CODE,
|
|
506
|
+
chainId,
|
|
507
|
+
network: named,
|
|
508
|
+
taskChainId: chainId,
|
|
509
|
+
taskNetwork: named,
|
|
510
|
+
selectedNetwork: network.name
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
function wrongNetworkOfApiError(error) {
|
|
515
|
+
if (error.envelope?.reason !== "chain_conflict") return null;
|
|
516
|
+
const taskChain = /the task is on chain (\d+)/.exec(error.message)?.[1];
|
|
517
|
+
if (taskChain === void 0 || Number(taskChain) === selectedNetwork().chainId) return null;
|
|
518
|
+
return new WrongNetworkError("This task", Number(taskChain));
|
|
519
|
+
}
|
|
520
|
+
|
|
489
521
|
// src/lib/output.ts
|
|
490
522
|
import fs2 from "fs";
|
|
491
523
|
|
|
@@ -636,16 +668,16 @@ function recoverableFailure(message, status) {
|
|
|
636
668
|
const quoted = /"amount":"(\d+)"/.exec(message)?.[1];
|
|
637
669
|
const required = quoted !== void 0 ? BigInt(quoted) : void 0;
|
|
638
670
|
const chainId = selectedNetworkOrUndefined()?.chainId;
|
|
639
|
-
let
|
|
671
|
+
let address2;
|
|
640
672
|
try {
|
|
641
673
|
const keystore = JSON.parse(fs2.readFileSync(getKeystorePath(), "utf8"));
|
|
642
|
-
if (typeof keystore.walletAddress === "string")
|
|
674
|
+
if (typeof keystore.walletAddress === "string") address2 = keystore.walletAddress;
|
|
643
675
|
} catch {
|
|
644
676
|
}
|
|
645
677
|
return {
|
|
646
678
|
code: "insufficient_funds",
|
|
647
679
|
next: nextForInsufficientFunds(
|
|
648
|
-
|
|
680
|
+
address2 !== void 0 && chainId !== void 0 ? { address: address2, chainId } : void 0,
|
|
649
681
|
required
|
|
650
682
|
),
|
|
651
683
|
...quoted !== void 0 ? { required: { baseUnits: quoted } } : {}
|
|
@@ -680,8 +712,9 @@ function x402FailureFields(error) {
|
|
|
680
712
|
};
|
|
681
713
|
}
|
|
682
714
|
function renderFailure(error, options) {
|
|
683
|
-
const message = error instanceof Error ? error.message : options?.fallback ?? String(error);
|
|
684
715
|
const apiError = error instanceof ApiError ? error : void 0;
|
|
716
|
+
const wrongNetwork = error instanceof WrongNetworkError ? error : apiError !== void 0 ? wrongNetworkOfApiError(apiError) : null;
|
|
717
|
+
const message = wrongNetwork?.message ?? (error instanceof Error ? error.message : options?.fallback ?? String(error));
|
|
685
718
|
const x402PayError = error instanceof X402PayError ? error : void 0;
|
|
686
719
|
const idempotencyKey = options?.idempotencyKey ?? apiError?.idempotencyKey ?? idempotencyKeyForError(error);
|
|
687
720
|
const envelope = apiError?.envelope;
|
|
@@ -706,12 +739,16 @@ function renderFailure(error, options) {
|
|
|
706
739
|
...x402PayError?.pending !== void 0 ? { pending: x402PayError.pending } : {},
|
|
707
740
|
...x402PayError?.payment !== void 0 ? { payment: x402PayError.payment } : {},
|
|
708
741
|
...x402PayError !== void 0 ? x402FailureFields(x402PayError) : {},
|
|
742
|
+
...wrongNetwork?.details ?? {},
|
|
709
743
|
...options?.details ?? {},
|
|
710
744
|
...recoverable !== void 0 ? {
|
|
711
745
|
code: recoverable.code,
|
|
712
746
|
...recoverable.required !== void 0 ? { required: recoverable.required } : {},
|
|
713
747
|
next: recoverable.next
|
|
714
|
-
} :
|
|
748
|
+
} : (
|
|
749
|
+
// Running on the wrong network is the caller's to correct, not a bug to report.
|
|
750
|
+
recorded && wrongNetwork === null ? { reportBug: REPORT_BUG_HINT } : {}
|
|
751
|
+
)
|
|
715
752
|
}) + "\n"
|
|
716
753
|
);
|
|
717
754
|
process.exitCode = 1;
|
|
@@ -734,10 +771,10 @@ function agentIdForChain(keystore, chainId) {
|
|
|
734
771
|
function withAgentIdForChain(keystore, chainId, agentId) {
|
|
735
772
|
return { ...keystore, agentIds: { ...keystore.agentIds, [String(chainId)]: agentId } };
|
|
736
773
|
}
|
|
737
|
-
async function lookupAgentId(
|
|
774
|
+
async function lookupAgentId(address2, chainId = selectedNetwork().chainId) {
|
|
738
775
|
try {
|
|
739
776
|
const res = await fetch(
|
|
740
|
-
`${apiUrl()}/api/identity/status?address=${
|
|
777
|
+
`${apiUrl()}/api/identity/status?address=${address2}&chainId=${chainId}`
|
|
741
778
|
);
|
|
742
779
|
if (!res.ok) return null;
|
|
743
780
|
const data = await res.json();
|
|
@@ -746,12 +783,12 @@ async function lookupAgentId(address3, chainId = selectedNetwork().chainId) {
|
|
|
746
783
|
return null;
|
|
747
784
|
}
|
|
748
785
|
}
|
|
749
|
-
async function pollAgentId(
|
|
786
|
+
async function pollAgentId(address2, maxWaitMs = 6e4) {
|
|
750
787
|
const interval = 3e3;
|
|
751
788
|
const deadline = Date.now() + maxWaitMs;
|
|
752
789
|
while (Date.now() < deadline) {
|
|
753
790
|
await new Promise((r) => setTimeout(r, interval));
|
|
754
|
-
const agentId = await lookupAgentId(
|
|
791
|
+
const agentId = await lookupAgentId(address2);
|
|
755
792
|
if (agentId) return agentId;
|
|
756
793
|
}
|
|
757
794
|
return null;
|
|
@@ -1830,11 +1867,11 @@ function getErrorMessage(code, context = {}) {
|
|
|
1830
1867
|
return `${decodingAdviceMessage}\``;
|
|
1831
1868
|
}
|
|
1832
1869
|
}
|
|
1833
|
-
function isSolanaError(
|
|
1834
|
-
const
|
|
1835
|
-
if (
|
|
1870
|
+
function isSolanaError(e4, code) {
|
|
1871
|
+
const isSolanaError2 = e4 instanceof Error && e4.name === "SolanaError";
|
|
1872
|
+
if (isSolanaError2) {
|
|
1836
1873
|
if (code !== void 0) {
|
|
1837
|
-
return
|
|
1874
|
+
return e4.context.__code === code;
|
|
1838
1875
|
}
|
|
1839
1876
|
return true;
|
|
1840
1877
|
}
|
|
@@ -2391,10 +2428,10 @@ function decodeAccount(encodedAccount, decoder) {
|
|
|
2391
2428
|
});
|
|
2392
2429
|
}
|
|
2393
2430
|
}
|
|
2394
|
-
function parseBase64RpcAccount(
|
|
2395
|
-
if (!rpcAccount) return Object.freeze({ address:
|
|
2431
|
+
function parseBase64RpcAccount(address2, rpcAccount) {
|
|
2432
|
+
if (!rpcAccount) return Object.freeze({ address: address2, exists: false });
|
|
2396
2433
|
const data = getBase64Encoder().encode(rpcAccount.data[0]);
|
|
2397
|
-
return Object.freeze({ ...parseBaseAccount(rpcAccount), address:
|
|
2434
|
+
return Object.freeze({ ...parseBaseAccount(rpcAccount), address: address2, data, exists: true });
|
|
2398
2435
|
}
|
|
2399
2436
|
function parseBaseAccount(rpcAccount) {
|
|
2400
2437
|
return Object.freeze({
|
|
@@ -2404,10 +2441,10 @@ function parseBaseAccount(rpcAccount) {
|
|
|
2404
2441
|
space: rpcAccount.space
|
|
2405
2442
|
});
|
|
2406
2443
|
}
|
|
2407
|
-
async function fetchEncodedAccount(rpc,
|
|
2444
|
+
async function fetchEncodedAccount(rpc, address2, config = {}) {
|
|
2408
2445
|
const { abortSignal, ...rpcConfig } = config;
|
|
2409
|
-
const response = await rpc.getAccountInfo(
|
|
2410
|
-
return parseBase64RpcAccount(
|
|
2446
|
+
const response = await rpc.getAccountInfo(address2, { ...rpcConfig, encoding: "base64" }).send({ abortSignal });
|
|
2447
|
+
return parseBase64RpcAccount(address2, response.value);
|
|
2411
2448
|
}
|
|
2412
2449
|
|
|
2413
2450
|
// ../../node_modules/.pnpm/@solana+assertions@8.4.0_typescript@5.7.3/node_modules/@solana/assertions/dist/index.node.mjs
|
|
@@ -2657,16 +2694,16 @@ async function getProgramDerivedAddress({
|
|
|
2657
2694
|
let bumpSeed = 255;
|
|
2658
2695
|
while (bumpSeed > 0) {
|
|
2659
2696
|
try {
|
|
2660
|
-
const
|
|
2697
|
+
const address2 = await createProgramDerivedAddress({
|
|
2661
2698
|
programAddress,
|
|
2662
2699
|
seeds: [...seeds, new Uint8Array([bumpSeed])]
|
|
2663
2700
|
});
|
|
2664
|
-
return [
|
|
2665
|
-
} catch (
|
|
2666
|
-
if (isSolanaError(
|
|
2701
|
+
return [address2, bumpSeed];
|
|
2702
|
+
} catch (e4) {
|
|
2703
|
+
if (isSolanaError(e4, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE)) {
|
|
2667
2704
|
bumpSeed--;
|
|
2668
2705
|
} else {
|
|
2669
|
-
throw
|
|
2706
|
+
throw e4;
|
|
2670
2707
|
}
|
|
2671
2708
|
}
|
|
2672
2709
|
}
|
|
@@ -3187,16 +3224,16 @@ function pipe(init, ...fns) {
|
|
|
3187
3224
|
}
|
|
3188
3225
|
|
|
3189
3226
|
// ../../node_modules/.pnpm/@solana+instructions@8.4.0_typescript@5.7.3/node_modules/@solana/instructions/dist/index.node.mjs
|
|
3190
|
-
var AccountRole = /* @__PURE__ */ ((
|
|
3191
|
-
|
|
3227
|
+
var AccountRole = /* @__PURE__ */ ((AccountRole2) => {
|
|
3228
|
+
AccountRole2[AccountRole2["WRITABLE_SIGNER"] = /* 3 */
|
|
3192
3229
|
3] = "WRITABLE_SIGNER";
|
|
3193
|
-
|
|
3230
|
+
AccountRole2[AccountRole2["READONLY_SIGNER"] = /* 2 */
|
|
3194
3231
|
2] = "READONLY_SIGNER";
|
|
3195
|
-
|
|
3232
|
+
AccountRole2[AccountRole2["WRITABLE"] = /* 1 */
|
|
3196
3233
|
1] = "WRITABLE";
|
|
3197
|
-
|
|
3234
|
+
AccountRole2[AccountRole2["READONLY"] = /* 0 */
|
|
3198
3235
|
0] = "READONLY";
|
|
3199
|
-
return
|
|
3236
|
+
return AccountRole2;
|
|
3200
3237
|
})(AccountRole || {});
|
|
3201
3238
|
var IS_SIGNER_BITMASK = 2;
|
|
3202
3239
|
var IS_WRITABLE_BITMASK = 1;
|
|
@@ -3486,8 +3523,8 @@ function getCompiledTransactionMessageEncoder() {
|
|
|
3486
3523
|
}
|
|
3487
3524
|
);
|
|
3488
3525
|
}
|
|
3489
|
-
function upsert(addressMap,
|
|
3490
|
-
addressMap[
|
|
3526
|
+
function upsert(addressMap, address2, update) {
|
|
3527
|
+
addressMap[address2] = update(addressMap[address2] ?? { role: AccountRole.READONLY });
|
|
3491
3528
|
}
|
|
3492
3529
|
var TYPE2 = /* @__PURE__ */ Symbol("AddressMapTypeProperty");
|
|
3493
3530
|
function getAddressMapFromInstructions(feePayer, instructions) {
|
|
@@ -3601,8 +3638,8 @@ function getOrderedAccountsFromAddressMap(addressMap) {
|
|
|
3601
3638
|
}
|
|
3602
3639
|
addressComparator ||= getAddressComparator();
|
|
3603
3640
|
return addressComparator(leftAddress, rightAddress);
|
|
3604
|
-
}).map(([
|
|
3605
|
-
address:
|
|
3641
|
+
}).map(([address2, addressMeta]) => ({
|
|
3642
|
+
address: address2,
|
|
3606
3643
|
...addressMeta
|
|
3607
3644
|
}));
|
|
3608
3645
|
return orderedAccounts;
|
|
@@ -3643,7 +3680,7 @@ function getCompiledInstructions(instructions, orderedAccounts) {
|
|
|
3643
3680
|
return instructions.map(({ accounts, data, programAddress }) => {
|
|
3644
3681
|
return {
|
|
3645
3682
|
programAddressIndex: accountIndex[programAddress],
|
|
3646
|
-
...accounts ? { accountIndices: accounts.map(({ address:
|
|
3683
|
+
...accounts ? { accountIndices: accounts.map(({ address: address2 }) => accountIndex[address2]) } : null,
|
|
3647
3684
|
...data ? { data } : null
|
|
3648
3685
|
};
|
|
3649
3686
|
});
|
|
@@ -3700,8 +3737,8 @@ function compileTransactionMessage(transactionMessage) {
|
|
|
3700
3737
|
version: transactionMessage.version
|
|
3701
3738
|
};
|
|
3702
3739
|
}
|
|
3703
|
-
function upsert2(addressMap,
|
|
3704
|
-
addressMap[
|
|
3740
|
+
function upsert2(addressMap, address2, update) {
|
|
3741
|
+
addressMap[address2] = update(addressMap[address2] ?? { role: AccountRole.READONLY });
|
|
3705
3742
|
}
|
|
3706
3743
|
var TYPE22 = /* @__PURE__ */ Symbol("AddressMapTypeProperty");
|
|
3707
3744
|
function getAddressMapFromInstructions2(feePayer, instructions) {
|
|
@@ -3869,8 +3906,8 @@ function getOrderedAccountsFromAddressMap2(addressMap) {
|
|
|
3869
3906
|
} else {
|
|
3870
3907
|
return addressComparator(leftAddress, rightAddress);
|
|
3871
3908
|
}
|
|
3872
|
-
}).map(([
|
|
3873
|
-
address:
|
|
3909
|
+
}).map(([address2, addressMeta]) => ({
|
|
3910
|
+
address: address2,
|
|
3874
3911
|
...addressMeta
|
|
3875
3912
|
}));
|
|
3876
3913
|
return orderedAccounts;
|
|
@@ -3908,7 +3945,7 @@ function getCompiledInstructions2(instructions, orderedAccounts) {
|
|
|
3908
3945
|
return instructions.map(({ accounts, data, programAddress }) => {
|
|
3909
3946
|
return {
|
|
3910
3947
|
programAddressIndex: accountIndex[programAddress],
|
|
3911
|
-
...accounts ? { accountIndices: accounts.map(({ address:
|
|
3948
|
+
...accounts ? { accountIndices: accounts.map(({ address: address2 }) => accountIndex[address2]) } : null,
|
|
3912
3949
|
...data ? { data } : null
|
|
3913
3950
|
};
|
|
3914
3951
|
});
|
|
@@ -3916,7 +3953,7 @@ function getCompiledInstructions2(instructions, orderedAccounts) {
|
|
|
3916
3953
|
function getCompiledStaticAccounts(orderedAccounts) {
|
|
3917
3954
|
const firstLookupTableAccountIndex = orderedAccounts.findIndex((account) => "lookupTableAddress" in account);
|
|
3918
3955
|
const orderedStaticAccounts = firstLookupTableAccountIndex === -1 ? orderedAccounts : orderedAccounts.slice(0, firstLookupTableAccountIndex);
|
|
3919
|
-
return orderedStaticAccounts.map(({ address:
|
|
3956
|
+
return orderedStaticAccounts.map(({ address: address2 }) => address2);
|
|
3920
3957
|
}
|
|
3921
3958
|
function compileTransactionMessage2(transactionMessage) {
|
|
3922
3959
|
const addressMap = getAddressMapFromInstructions2(
|
|
@@ -3999,7 +4036,7 @@ function getInstructionHeader(instruction, accountIndex) {
|
|
|
3999
4036
|
}
|
|
4000
4037
|
function getInstructionPayload(instruction, accountIndex) {
|
|
4001
4038
|
return {
|
|
4002
|
-
instructionAccountIndices: instruction.accounts?.map(({ address:
|
|
4039
|
+
instructionAccountIndices: instruction.accounts?.map(({ address: address2 }) => accountIndex[address2]) ?? [],
|
|
4003
4040
|
instructionData: instruction.data ?? new Uint8Array()
|
|
4004
4041
|
};
|
|
4005
4042
|
}
|
|
@@ -4449,11 +4486,11 @@ async function partiallySignTransaction(keyPairs, transaction) {
|
|
|
4449
4486
|
let unexpectedSigners;
|
|
4450
4487
|
await Promise.all(
|
|
4451
4488
|
keyPairs.map(async (keyPair) => {
|
|
4452
|
-
const
|
|
4453
|
-
const existingSignature = transaction.signatures[
|
|
4489
|
+
const address2 = await getAddressFromPublicKey(keyPair.publicKey);
|
|
4490
|
+
const existingSignature = transaction.signatures[address2];
|
|
4454
4491
|
if (existingSignature === void 0) {
|
|
4455
4492
|
unexpectedSigners ||= /* @__PURE__ */ new Set();
|
|
4456
|
-
unexpectedSigners.add(
|
|
4493
|
+
unexpectedSigners.add(address2);
|
|
4457
4494
|
return;
|
|
4458
4495
|
}
|
|
4459
4496
|
if (unexpectedSigners) {
|
|
@@ -4464,7 +4501,7 @@ async function partiallySignTransaction(keyPairs, transaction) {
|
|
|
4464
4501
|
return;
|
|
4465
4502
|
}
|
|
4466
4503
|
newSignatures ||= {};
|
|
4467
|
-
newSignatures[
|
|
4504
|
+
newSignatures[address2] = newSignature;
|
|
4468
4505
|
})
|
|
4469
4506
|
);
|
|
4470
4507
|
if (unexpectedSigners && unexpectedSigners.size > 0) {
|
|
@@ -4487,9 +4524,9 @@ async function partiallySignTransaction(keyPairs, transaction) {
|
|
|
4487
4524
|
}
|
|
4488
4525
|
function assertIsFullySignedTransaction(transaction) {
|
|
4489
4526
|
const missingSigs = [];
|
|
4490
|
-
Object.entries(transaction.signatures).forEach(([
|
|
4527
|
+
Object.entries(transaction.signatures).forEach(([address2, signatureBytes2]) => {
|
|
4491
4528
|
if (!signatureBytes2) {
|
|
4492
|
-
missingSigs.push(
|
|
4529
|
+
missingSigs.push(address2);
|
|
4493
4530
|
}
|
|
4494
4531
|
});
|
|
4495
4532
|
if (missingSigs.length > 0) {
|
|
@@ -5690,19 +5727,19 @@ function setTransactionMessageFeePayerSigner(feePayer, transactionMessage) {
|
|
|
5690
5727
|
return out;
|
|
5691
5728
|
}
|
|
5692
5729
|
async function createSignerFromKeyPair(keyPair) {
|
|
5693
|
-
const
|
|
5730
|
+
const address2 = await getAddressFromPublicKey(keyPair.publicKey);
|
|
5694
5731
|
const out = {
|
|
5695
|
-
address:
|
|
5732
|
+
address: address2,
|
|
5696
5733
|
keyPair,
|
|
5697
5734
|
signMessages: (messages) => Promise.all(
|
|
5698
5735
|
messages.map(
|
|
5699
|
-
async (message) => Object.freeze({ [
|
|
5736
|
+
async (message) => Object.freeze({ [address2]: await signBytes(keyPair.privateKey, message.content) })
|
|
5700
5737
|
)
|
|
5701
5738
|
),
|
|
5702
5739
|
signTransactions: (transactions) => Promise.all(
|
|
5703
5740
|
transactions.map(async (transaction) => {
|
|
5704
5741
|
const signedTransaction = await partiallySignTransaction([keyPair], transaction);
|
|
5705
|
-
return Object.freeze({ [
|
|
5742
|
+
return Object.freeze({ [address2]: signedTransaction.signatures[address2] });
|
|
5706
5743
|
})
|
|
5707
5744
|
)
|
|
5708
5745
|
};
|
|
@@ -5714,9 +5751,9 @@ async function createKeyPairSignerFromBytes(bytes, extractable) {
|
|
|
5714
5751
|
async function createKeyPairSignerFromPrivateKeyBytes(bytes, extractable) {
|
|
5715
5752
|
return await createSignerFromKeyPair(await createKeyPairFromPrivateKeyBytes(bytes, extractable));
|
|
5716
5753
|
}
|
|
5717
|
-
function createNoopSigner(
|
|
5754
|
+
function createNoopSigner(address2) {
|
|
5718
5755
|
const out = {
|
|
5719
|
-
address:
|
|
5756
|
+
address: address2,
|
|
5720
5757
|
signMessages: (messages) => Promise.resolve(messages.map(() => Object.freeze({}))),
|
|
5721
5758
|
signTransactions: (transactions) => Promise.resolve(transactions.map(() => Object.freeze({})))
|
|
5722
5759
|
};
|
|
@@ -5797,1451 +5834,95 @@ async function signModifyingAndPartialTransactionSigners(transaction, modifyingS
|
|
|
5797
5834
|
}
|
|
5798
5835
|
var o2 = globalThis.TextEncoder;
|
|
5799
5836
|
|
|
5800
|
-
// ../../node_modules/.pnpm/@solana+
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE2 = 6;
|
|
5807
|
-
var SOLANA_ERROR__MALFORMED_BIGINT_STRING2 = 7;
|
|
5808
|
-
var SOLANA_ERROR__MALFORMED_NUMBER_STRING2 = 8;
|
|
5809
|
-
var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE2 = 9;
|
|
5810
|
-
var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR2 = 10;
|
|
5811
|
-
var SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION2 = 11;
|
|
5812
|
-
var SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS2 = 12;
|
|
5813
|
-
var SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTION2 = 13;
|
|
5814
|
-
var SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS2 = 14;
|
|
5815
|
-
var SOLANA_ERROR__JSON_RPC__PARSE_ERROR2 = -32700;
|
|
5816
|
-
var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR2 = -32603;
|
|
5817
|
-
var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS2 = -32602;
|
|
5818
|
-
var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND2 = -32601;
|
|
5819
|
-
var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST2 = -32600;
|
|
5820
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SLOT_HISTORY2 = -32021;
|
|
5821
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_FILTER_TRANSACTION_NOT_FOUND2 = -32020;
|
|
5822
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_UNREACHABLE2 = -32019;
|
|
5823
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_NOT_EPOCH_BOUNDARY2 = -32018;
|
|
5824
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_EPOCH_REWARDS_PERIOD_ACTIVE2 = -32017;
|
|
5825
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED2 = -32016;
|
|
5826
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION2 = -32015;
|
|
5827
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET2 = -32014;
|
|
5828
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH2 = -32013;
|
|
5829
|
-
var SOLANA_ERROR__JSON_RPC__SCAN_ERROR2 = -32012;
|
|
5830
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE2 = -32011;
|
|
5831
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX2 = -32010;
|
|
5832
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED2 = -32009;
|
|
5833
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT2 = -32008;
|
|
5834
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED2 = -32007;
|
|
5835
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE2 = -32006;
|
|
5836
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY2 = -32005;
|
|
5837
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE2 = -32004;
|
|
5838
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE2 = -32003;
|
|
5839
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE2 = -32002;
|
|
5840
|
-
var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP2 = -32001;
|
|
5841
|
-
var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2 = 28e5;
|
|
5842
|
-
var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2 = 2800001;
|
|
5843
|
-
var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS2 = 2800002;
|
|
5844
|
-
var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY2 = 2800003;
|
|
5845
|
-
var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA2 = 2800004;
|
|
5846
|
-
var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE2 = 2800005;
|
|
5847
|
-
var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2 = 2800006;
|
|
5848
|
-
var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2 = 2800007;
|
|
5849
|
-
var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2 = 2800008;
|
|
5850
|
-
var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2 = 2800009;
|
|
5851
|
-
var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER2 = 2800010;
|
|
5852
|
-
var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS2 = 2800011;
|
|
5853
|
-
var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND2 = 323e4;
|
|
5854
|
-
var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND2 = 32300001;
|
|
5855
|
-
var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT2 = 3230002;
|
|
5856
|
-
var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT2 = 3230003;
|
|
5857
|
-
var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED2 = 3230004;
|
|
5858
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT2 = 361e4;
|
|
5859
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2 = 3610001;
|
|
5860
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED2 = 3610002;
|
|
5861
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED2 = 3610003;
|
|
5862
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED2 = 3610004;
|
|
5863
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED2 = 3610005;
|
|
5864
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED2 = 3610006;
|
|
5865
|
-
var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY2 = 3610007;
|
|
5866
|
-
var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED2 = 3611e3;
|
|
5867
|
-
var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH2 = 3704e3;
|
|
5868
|
-
var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH2 = 3704001;
|
|
5869
|
-
var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH2 = 3704002;
|
|
5870
|
-
var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE2 = 3704003;
|
|
5871
|
-
var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY2 = 3704004;
|
|
5872
|
-
var SOLANA_ERROR__KEYS__INVALID_BASE58_IN_GRIND_REGEX2 = 3704005;
|
|
5873
|
-
var SOLANA_ERROR__KEYS__WRITE_KEY_PAIR_UNSUPPORTED_ENVIRONMENT2 = 3704006;
|
|
5874
|
-
var SOLANA_ERROR__FS__UNSUPPORTED_ENVIRONMENT2 = 3712e3;
|
|
5875
|
-
var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS2 = 4128e3;
|
|
5876
|
-
var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA2 = 4128001;
|
|
5877
|
-
var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH2 = 4128002;
|
|
5878
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 = 4615e3;
|
|
5879
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR2 = 4615001;
|
|
5880
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT2 = 4615002;
|
|
5881
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA2 = 4615003;
|
|
5882
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA2 = 4615004;
|
|
5883
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL2 = 4615005;
|
|
5884
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS2 = 4615006;
|
|
5885
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID2 = 4615007;
|
|
5886
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE2 = 4615008;
|
|
5887
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED2 = 4615009;
|
|
5888
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT2 = 4615010;
|
|
5889
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION2 = 4615011;
|
|
5890
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID2 = 4615012;
|
|
5891
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND2 = 4615013;
|
|
5892
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED2 = 4615014;
|
|
5893
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE2 = 4615015;
|
|
5894
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED2 = 4615016;
|
|
5895
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX2 = 4615017;
|
|
5896
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED2 = 4615018;
|
|
5897
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED2 = 4615019;
|
|
5898
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS2 = 4615020;
|
|
5899
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED2 = 4615021;
|
|
5900
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE2 = 4615022;
|
|
5901
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED2 = 4615023;
|
|
5902
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2 = 4615024;
|
|
5903
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC2 = 4615025;
|
|
5904
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM2 = 4615026;
|
|
5905
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR2 = 4615027;
|
|
5906
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED2 = 4615028;
|
|
5907
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE2 = 4615029;
|
|
5908
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT2 = 4615030;
|
|
5909
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID2 = 4615031;
|
|
5910
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH2 = 4615032;
|
|
5911
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT2 = 4615033;
|
|
5912
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED2 = 4615034;
|
|
5913
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED2 = 4615035;
|
|
5914
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS2 = 4615036;
|
|
5915
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC2 = 4615037;
|
|
5916
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED2 = 4615038;
|
|
5917
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION2 = 4615039;
|
|
5918
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE2 = 4615040;
|
|
5919
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE2 = 4615041;
|
|
5920
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE2 = 4615042;
|
|
5921
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE2 = 4615043;
|
|
5922
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY2 = 4615044;
|
|
5923
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR2 = 4615045;
|
|
5924
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT2 = 4615046;
|
|
5925
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER2 = 4615047;
|
|
5926
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW2 = 4615048;
|
|
5927
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR2 = 4615049;
|
|
5928
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER2 = 4615050;
|
|
5929
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED2 = 4615051;
|
|
5930
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED2 = 4615052;
|
|
5931
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED2 = 4615053;
|
|
5932
|
-
var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS2 = 4615054;
|
|
5933
|
-
var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS2 = 5508e3;
|
|
5934
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER2 = 5508001;
|
|
5935
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER2 = 5508002;
|
|
5936
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER2 = 5508003;
|
|
5937
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER2 = 5508004;
|
|
5938
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER2 = 5508005;
|
|
5939
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER2 = 5508006;
|
|
5940
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER2 = 5508007;
|
|
5941
|
-
var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER2 = 5508008;
|
|
5942
|
-
var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS2 = 5508009;
|
|
5943
|
-
var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING2 = 5508010;
|
|
5944
|
-
var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED2 = 5508011;
|
|
5945
|
-
var SOLANA_ERROR__SIGNER__WALLET_ACCOUNT_CANNOT_SIGN_TRANSACTION2 = 5508012;
|
|
5946
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__MAXIMUM_LENGTH_EXCEEDED2 = 5607e3;
|
|
5947
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__RESTRICTED_ASCII_BODY_CHARACTER_OUT_OF_RANGE2 = 5607001;
|
|
5948
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__APPLICATION_DOMAIN_STRING_LENGTH_OUT_OF_RANGE2 = 5607002;
|
|
5949
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__INVALID_APPLICATION_DOMAIN_BYTE_LENGTH2 = 5607003;
|
|
5950
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_SIGNATURES_MISMATCH2 = 5607004;
|
|
5951
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_REQUIRED_SIGNERS_CANNOT_BE_ZERO2 = 5607005;
|
|
5952
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__VERSION_NUMBER_NOT_SUPPORTED2 = 5607006;
|
|
5953
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_FORMAT_MISMATCH2 = 5607007;
|
|
5954
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_LENGTH_MISMATCH2 = 5607008;
|
|
5955
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_MUST_BE_NON_EMPTY2 = 5607009;
|
|
5956
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_ENVELOPE_SIGNATURES_CANNOT_BE_ZERO2 = 5607010;
|
|
5957
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURES_MISSING2 = 5607011;
|
|
5958
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__ENVELOPE_SIGNERS_MISMATCH2 = 5607012;
|
|
5959
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__ADDRESSES_CANNOT_SIGN_OFFCHAIN_MESSAGE2 = 5607013;
|
|
5960
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__UNEXPECTED_VERSION2 = 5607014;
|
|
5961
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_SORTED2 = 5607015;
|
|
5962
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_UNIQUE2 = 5607016;
|
|
5963
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURE_VERIFICATION_FAILURE2 = 5607017;
|
|
5964
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__CONTENT_DOES_NOT_MATCH_EXPECTED2 = 5607018;
|
|
5965
|
-
var SOLANA_ERROR__OFFCHAIN_MESSAGE__REQUIRED_SIGNATORIES_DO_NOT_MATCH_EXPECTED2 = 5607019;
|
|
5966
|
-
var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES2 = 5663e3;
|
|
5967
|
-
var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE2 = 5663001;
|
|
5968
|
-
var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME2 = 5663002;
|
|
5969
|
-
var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME2 = 5663003;
|
|
5970
|
-
var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE2 = 5663004;
|
|
5971
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING2 = 5663005;
|
|
5972
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE2 = 5663006;
|
|
5973
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND2 = 5663007;
|
|
5974
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING2 = 5663008;
|
|
5975
|
-
var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING2 = 5663009;
|
|
5976
|
-
var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING2 = 5663010;
|
|
5977
|
-
var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING2 = 5663011;
|
|
5978
|
-
var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING2 = 5663012;
|
|
5979
|
-
var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING2 = 5663013;
|
|
5980
|
-
var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE2 = 5663014;
|
|
5981
|
-
var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION2 = 5663015;
|
|
5982
|
-
var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES2 = 5663016;
|
|
5983
|
-
var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH2 = 5663017;
|
|
5984
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT2 = 5663018;
|
|
5985
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT2 = 5663019;
|
|
5986
|
-
var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT2 = 5663020;
|
|
5987
|
-
var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED2 = 5663021;
|
|
5988
|
-
var SOLANA_ERROR__TRANSACTION__NONCE_ACCOUNT_CANNOT_BE_IN_LOOKUP_TABLE2 = 5663022;
|
|
5989
|
-
var SOLANA_ERROR__TRANSACTION__MALFORMED_MESSAGE_BYTES2 = 5663023;
|
|
5990
|
-
var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_MESSAGE_BYTES2 = 5663024;
|
|
5991
|
-
var SOLANA_ERROR__TRANSACTION__CANNOT_DECODE_EMPTY_TRANSACTION_BYTES2 = 5663025;
|
|
5992
|
-
var SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST2 = 5663026;
|
|
5993
|
-
var SOLANA_ERROR__TRANSACTION__SIGNATURE_COUNT_TOO_HIGH_FOR_TRANSACTION_BYTES2 = 5663027;
|
|
5994
|
-
var SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_MASK_PRIORITY_FEE_BITS2 = 5663028;
|
|
5995
|
-
var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_ACCOUNT_INDEX2 = 5663029;
|
|
5996
|
-
var SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_VALUE_KIND2 = 5663030;
|
|
5997
|
-
var SOLANA_ERROR__TRANSACTION__INSTRUCTION_HEADERS_PAYLOADS_MISMATCH2 = 5663031;
|
|
5998
|
-
var SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES2 = 5663032;
|
|
5999
|
-
var SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES2 = 5663033;
|
|
6000
|
-
var SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS2 = 5663034;
|
|
6001
|
-
var SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION2 = 5663035;
|
|
6002
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2 = 5663036;
|
|
6003
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_RESOURCE_LIMITS2 = 5663037;
|
|
6004
|
-
var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_ACCOUNT_INDEX_OUT_OF_RANGE2 = 5663038;
|
|
6005
|
-
var SOLANA_ERROR__TRANSACTION__COMPUTE_UNIT_LIMIT_OUT_OF_RANGE2 = 5663039;
|
|
6006
|
-
var SOLANA_ERROR__TRANSACTION__INVALID_HEAP_SIZE2 = 5663040;
|
|
6007
|
-
var SOLANA_ERROR__TRANSACTION_INTROSPECTION__CANNOT_DECODE_JSON_PARSED_TRANSACTION2 = 5664e3;
|
|
6008
|
-
var SOLANA_ERROR__TRANSACTION_INTROSPECTION__UNRECOGNIZED_GET_TRANSACTION_RESPONSE2 = 5664001;
|
|
6009
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN2 = 705e4;
|
|
6010
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE2 = 7050001;
|
|
6011
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE2 = 7050002;
|
|
6012
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND2 = 7050003;
|
|
6013
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND2 = 7050004;
|
|
6014
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE2 = 7050005;
|
|
6015
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE2 = 7050006;
|
|
6016
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED2 = 7050007;
|
|
6017
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND2 = 7050008;
|
|
6018
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP2 = 7050009;
|
|
6019
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE2 = 7050010;
|
|
6020
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX2 = 7050011;
|
|
6021
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE2 = 7050012;
|
|
6022
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION2 = 7050013;
|
|
6023
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE2 = 7050014;
|
|
6024
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE2 = 7050015;
|
|
6025
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2 = 7050016;
|
|
6026
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT2 = 7050017;
|
|
6027
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION2 = 7050018;
|
|
6028
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT2 = 7050019;
|
|
6029
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT2 = 7050020;
|
|
6030
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT2 = 7050021;
|
|
6031
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS2 = 7050022;
|
|
6032
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND2 = 7050023;
|
|
6033
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER2 = 7050024;
|
|
6034
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA2 = 7050025;
|
|
6035
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX2 = 7050026;
|
|
6036
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT2 = 7050027;
|
|
6037
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT2 = 7050028;
|
|
6038
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT2 = 7050029;
|
|
6039
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION2 = 7050030;
|
|
6040
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT2 = 7050031;
|
|
6041
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED2 = 7050032;
|
|
6042
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2 = 7050033;
|
|
6043
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED2 = 7050034;
|
|
6044
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED2 = 7050035;
|
|
6045
|
-
var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION2 = 7050036;
|
|
6046
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN2 = 7618e3;
|
|
6047
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE2 = 7618001;
|
|
6048
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN2 = 7618002;
|
|
6049
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN2 = 7618003;
|
|
6050
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED2 = 7618004;
|
|
6051
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_SINGLE_TRANSACTION_PLAN_RESULT_NOT_FOUND2 = 7618005;
|
|
6052
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_INSTRUCTION_PLAN2 = 7618006;
|
|
6053
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN2 = 7618007;
|
|
6054
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT2 = 7618008;
|
|
6055
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__EXPECTED_SUCCESSFUL_TRANSACTION_PLAN_RESULT2 = 7618009;
|
|
6056
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__MAX_INSTRUCTIONS_PER_TRANSACTION_EXCEEDED2 = 7618010;
|
|
6057
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__INVALID_MAX_INSTRUCTIONS_PER_TRANSACTION2 = 7618011;
|
|
6058
|
-
var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_REJECTED_BY_PACKER2 = 7618012;
|
|
6059
|
-
var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY2 = 8078e3;
|
|
6060
|
-
var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2 = 8078001;
|
|
6061
|
-
var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH2 = 8078002;
|
|
6062
|
-
var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH2 = 8078003;
|
|
6063
|
-
var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2 = 8078004;
|
|
6064
|
-
var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2 = 8078005;
|
|
6065
|
-
var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2 = 8078006;
|
|
6066
|
-
var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS2 = 8078007;
|
|
6067
|
-
var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE2 = 8078008;
|
|
6068
|
-
var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT2 = 8078009;
|
|
6069
|
-
var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT2 = 8078010;
|
|
6070
|
-
var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2 = 8078011;
|
|
6071
|
-
var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2 = 8078012;
|
|
6072
|
-
var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH2 = 8078013;
|
|
6073
|
-
var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE2 = 8078014;
|
|
6074
|
-
var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT2 = 8078015;
|
|
6075
|
-
var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE2 = 8078016;
|
|
6076
|
-
var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE2 = 8078017;
|
|
6077
|
-
var SOLANA_ERROR__CODECS__INVALID_CONSTANT2 = 8078018;
|
|
6078
|
-
var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE2 = 8078019;
|
|
6079
|
-
var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL2 = 8078020;
|
|
6080
|
-
var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES2 = 8078021;
|
|
6081
|
-
var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS2 = 8078022;
|
|
6082
|
-
var SOLANA_ERROR__CODECS__EXPECTED_DECODER_TO_CONSUME_ENTIRE_BYTE_ARRAY2 = 8078023;
|
|
6083
|
-
var SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_VALUE2 = 8078024;
|
|
6084
|
-
var SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_BYTES2 = 8078025;
|
|
6085
|
-
var SOLANA_ERROR__CODECS__INVALID_UTF8_BYTES2 = 8078026;
|
|
6086
|
-
var SOLANA_ERROR__CODECS__INVALID_UTF8_STRING2 = 8078027;
|
|
6087
|
-
var SOLANA_ERROR__CODECS__SENTINEL_MISSING_AT_END_OF_BYTES2 = 8078028;
|
|
6088
|
-
var SOLANA_ERROR__CODECS__SENTINEL_MUST_NOT_BE_EMPTY2 = 8078029;
|
|
6089
|
-
var SOLANA_ERROR__FIXED_POINTS__INVALID_TOTAL_BITS2 = 809e4;
|
|
6090
|
-
var SOLANA_ERROR__FIXED_POINTS__INVALID_FRACTIONAL_BITS2 = 8090001;
|
|
6091
|
-
var SOLANA_ERROR__FIXED_POINTS__INVALID_DECIMALS2 = 8090002;
|
|
6092
|
-
var SOLANA_ERROR__FIXED_POINTS__FRACTIONAL_BITS_EXCEED_TOTAL_BITS2 = 8090003;
|
|
6093
|
-
var SOLANA_ERROR__FIXED_POINTS__VALUE_OUT_OF_RANGE2 = 8090004;
|
|
6094
|
-
var SOLANA_ERROR__FIXED_POINTS__INVALID_STRING2 = 8090005;
|
|
6095
|
-
var SOLANA_ERROR__FIXED_POINTS__INVALID_ZERO_DENOMINATOR_RATIO2 = 8090006;
|
|
6096
|
-
var SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW2 = 8090007;
|
|
6097
|
-
var SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH2 = 8090008;
|
|
6098
|
-
var SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO2 = 8090009;
|
|
6099
|
-
var SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS2 = 8090010;
|
|
6100
|
-
var SOLANA_ERROR__FIXED_POINTS__MALFORMED_RAW_VALUE2 = 8090011;
|
|
6101
|
-
var SOLANA_ERROR__FIXED_POINTS__TOTAL_BITS_NOT_BYTE_ALIGNED2 = 8090012;
|
|
6102
|
-
var SOLANA_ERROR__RPC__INTEGER_OVERFLOW2 = 81e5;
|
|
6103
|
-
var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN2 = 8100001;
|
|
6104
|
-
var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR2 = 8100002;
|
|
6105
|
-
var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD2 = 8100003;
|
|
6106
|
-
var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN2 = 819e4;
|
|
6107
|
-
var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID2 = 8190001;
|
|
6108
|
-
var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED2 = 8190002;
|
|
6109
|
-
var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED2 = 8190003;
|
|
6110
|
-
var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT2 = 8190004;
|
|
6111
|
-
var SOLANA_ERROR__SUBSCRIBABLE__RETRY_NOT_SUPPORTED2 = 8195e3;
|
|
6112
|
-
var SOLANA_ERROR__SUBSCRIBABLE__STREAM_CLOSED_WITHOUT_ERROR2 = 8195001;
|
|
6113
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS2 = 85e5;
|
|
6114
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE2 = 8500001;
|
|
6115
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION2 = 8500002;
|
|
6116
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__UNEXPECTED_RESOLVED_INSTRUCTION_INPUT_TYPE2 = 8500003;
|
|
6117
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2 = 8500004;
|
|
6118
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE2 = 8500005;
|
|
6119
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT2 = 8500006;
|
|
6120
|
-
var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2 = 8500007;
|
|
6121
|
-
var SOLANA_ERROR__WALLET__NOT_CONNECTED2 = 89e5;
|
|
6122
|
-
var SOLANA_ERROR__WALLET__NO_SIGNER_CONNECTED2 = 8900001;
|
|
6123
|
-
var SOLANA_ERROR__WALLET__SIGNER_NOT_AVAILABLE2 = 8900002;
|
|
6124
|
-
var SOLANA_ERROR__WALLET__ACCOUNT_NOT_AVAILABLE2 = 8900003;
|
|
6125
|
-
var SOLANA_ERROR__REACT__MISSING_PROVIDER2 = 9e6;
|
|
6126
|
-
var SOLANA_ERROR__REACT__MISSING_CAPABILITY2 = 9000001;
|
|
6127
|
-
var SOLANA_ERROR__REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR2 = 9000002;
|
|
6128
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING2 = 99e5;
|
|
6129
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE2 = 9900001;
|
|
6130
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING2 = 9900002;
|
|
6131
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE2 = 9900003;
|
|
6132
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED2 = 9900004;
|
|
6133
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND2 = 9900005;
|
|
6134
|
-
var SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND2 = 9900006;
|
|
6135
|
-
function encodeValue2(value) {
|
|
6136
|
-
if (Array.isArray(value)) {
|
|
6137
|
-
const commaSeparatedValues = value.map(encodeValue2).join(
|
|
6138
|
-
"%2C%20"
|
|
6139
|
-
/* ", " */
|
|
6140
|
-
);
|
|
6141
|
-
return "%5B" + commaSeparatedValues + /* "]" */
|
|
6142
|
-
"%5D";
|
|
6143
|
-
} else if (typeof value === "bigint") {
|
|
6144
|
-
return `${value}n`;
|
|
6145
|
-
} else {
|
|
6146
|
-
return encodeURIComponent(
|
|
6147
|
-
String(
|
|
6148
|
-
value != null && Object.getPrototypeOf(value) === null ? (
|
|
6149
|
-
// Plain objects with no prototype don't have a `toString` method.
|
|
6150
|
-
// Convert them before stringifying them.
|
|
6151
|
-
{ ...value }
|
|
6152
|
-
) : value
|
|
6153
|
-
)
|
|
6154
|
-
);
|
|
5837
|
+
// ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@5.7.3/node_modules/@solana/program-client-core/dist/index.node.mjs
|
|
5838
|
+
function getNonNullResolvedInstructionInput(inputName, value) {
|
|
5839
|
+
if (value === null || value === void 0) {
|
|
5840
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, {
|
|
5841
|
+
inputName
|
|
5842
|
+
});
|
|
6155
5843
|
}
|
|
5844
|
+
return value;
|
|
6156
5845
|
}
|
|
6157
|
-
function
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
const searchParamsString = Object.entries(context).map(encodeObjectContextEntry2).join("&");
|
|
6162
|
-
return Buffer.from(searchParamsString, "utf8").toString("base64");
|
|
6163
|
-
}
|
|
6164
|
-
var SolanaErrorMessages2 = {
|
|
6165
|
-
[SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND2]: "Account not found at address: $address",
|
|
6166
|
-
[SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED2]: "Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",
|
|
6167
|
-
[SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT2]: "Expected decoded account at address: $address",
|
|
6168
|
-
[SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT2]: "Failed to decode account data at address: $address",
|
|
6169
|
-
[SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND2]: "Accounts not found at addresses: $addresses",
|
|
6170
|
-
[SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2]: "Unable to find a viable program address bump seed.",
|
|
6171
|
-
[SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS2]: "$putativeAddress is not a base58-encoded address.",
|
|
6172
|
-
[SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2]: "Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",
|
|
6173
|
-
[SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY2]: "The `CryptoKey` must be an `Ed25519` public key.",
|
|
6174
|
-
[SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS2]: "$putativeOffCurveAddress is not a base58-encoded off-curve address.",
|
|
6175
|
-
[SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2]: "Invalid seeds; point must fall off the Ed25519 curve.",
|
|
6176
|
-
[SOLANA_ERROR__ADDRESSES__MALFORMED_PDA2]: "Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",
|
|
6177
|
-
[SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2]: "A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",
|
|
6178
|
-
[SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2]: "The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",
|
|
6179
|
-
[SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE2]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
|
|
6180
|
-
[SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER2]: "Program address cannot end with PDA marker.",
|
|
6181
|
-
[SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
6182
|
-
[SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded blockhash string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
6183
|
-
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED2]: "The network has progressed past the last block for which this transaction could have been committed.",
|
|
6184
|
-
[SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY2]: "Codec [$codecDescription] cannot decode empty byte arrays.",
|
|
6185
|
-
[SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS2]: "Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",
|
|
6186
|
-
[SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL2]: "Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",
|
|
6187
|
-
[SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2]: "Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",
|
|
6188
|
-
[SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2]: "Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",
|
|
6189
|
-
[SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2]: "Encoder and decoder must either both be fixed-size or variable-size.",
|
|
6190
|
-
[SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE2]: "Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",
|
|
6191
|
-
[SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH2]: "Expected a fixed-size codec, got a variable-size one.",
|
|
6192
|
-
[SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH2]: "Codec [$codecDescription] expected a positive byte length, got $bytesLength.",
|
|
6193
|
-
[SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH2]: "Expected a variable-size codec, got a fixed-size one.",
|
|
6194
|
-
[SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE2]: "Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",
|
|
6195
|
-
[SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2]: "Codec [$codecDescription] expected $expected bytes, got $bytesLength.",
|
|
6196
|
-
[SOLANA_ERROR__CODECS__INVALID_CONSTANT2]: "Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",
|
|
6197
|
-
[SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT2]: "Invalid discriminated union variant. Expected one of [$variants], got $value.",
|
|
6198
|
-
[SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT2]: "Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",
|
|
6199
|
-
[SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT2]: "Invalid literal union variant. Expected one of [$variants], got $value.",
|
|
6200
|
-
[SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS2]: "Expected [$codecDescription] to have $expected items, got $actual.",
|
|
6201
|
-
[SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2]: "Invalid value $value for base $base with alphabet $alphabet.",
|
|
6202
|
-
[SOLANA_ERROR__CODECS__INVALID_UTF8_BYTES2]: "Invalid UTF-8 byte sequence at offset $offset.",
|
|
6203
|
-
[SOLANA_ERROR__CODECS__INVALID_UTF8_STRING2]: "Invalid UTF-8 string. Found a lone surrogate at index $index.",
|
|
6204
|
-
[SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE2]: "Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",
|
|
6205
|
-
[SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2]: "Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",
|
|
6206
|
-
[SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE2]: "Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",
|
|
6207
|
-
[SOLANA_ERROR__CODECS__SENTINEL_MISSING_AT_END_OF_BYTES2]: "Codec [$codecDescription] expected sentinel [$hexSentinel] to terminate the collection, but reached the end of the byte array without it.",
|
|
6208
|
-
[SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES2]: "Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",
|
|
6209
|
-
[SOLANA_ERROR__CODECS__SENTINEL_MUST_NOT_BE_EMPTY2]: "The sentinel must not be empty.",
|
|
6210
|
-
[SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE2]: "Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",
|
|
6211
|
-
[SOLANA_ERROR__CODECS__EXPECTED_DECODER_TO_CONSUME_ENTIRE_BYTE_ARRAY2]: "This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",
|
|
6212
|
-
[SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_VALUE2]: "Invalid pattern match value. The provided value does not match any of the specified patterns.",
|
|
6213
|
-
[SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_BYTES2]: "Invalid pattern match bytes. The provided byte array does not match any of the specified patterns.",
|
|
6214
|
-
[SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED2]: "No random values implementation could be found.",
|
|
6215
|
-
[SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION2]: "Failed to send transaction$causeMessage",
|
|
6216
|
-
[SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS2]: "Failed to send transactions$causeMessages",
|
|
6217
|
-
[SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTION2]: "Failed to sign transaction$causeMessage",
|
|
6218
|
-
[SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS2]: "Failed to sign transactions$causeMessages",
|
|
6219
|
-
[SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW2]: "Fixed-point operation `$operation` of kind `$kind` overflowed. Expected a raw bigint in [$min, $max], got $result.",
|
|
6220
|
-
[SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO2]: "Fixed-point division by zero for value of kind `$kind` ($signedness, $totalBits bits).",
|
|
6221
|
-
[SOLANA_ERROR__FIXED_POINTS__FRACTIONAL_BITS_EXCEED_TOTAL_BITS2]: "`fractionalBits` ($fractionalBits) must not exceed `totalBits` ($totalBits).",
|
|
6222
|
-
[SOLANA_ERROR__FIXED_POINTS__INVALID_DECIMALS2]: "Invalid `decimals`. Expected a non-negative integer, got $decimals.",
|
|
6223
|
-
[SOLANA_ERROR__FIXED_POINTS__INVALID_FRACTIONAL_BITS2]: "Invalid `fractionalBits`. Expected a non-negative integer, got $fractionalBits.",
|
|
6224
|
-
[SOLANA_ERROR__FIXED_POINTS__INVALID_STRING2]: "Invalid string `$input` for fixed-point value of kind `$kind`.",
|
|
6225
|
-
[SOLANA_ERROR__FIXED_POINTS__INVALID_TOTAL_BITS2]: "Invalid `totalBits`. Expected a positive integer, got $totalBits.",
|
|
6226
|
-
[SOLANA_ERROR__FIXED_POINTS__INVALID_ZERO_DENOMINATOR_RATIO2]: "Invalid ratio $numerator/$denominator for fixed-point value of kind `$kind`. Denominator must be non-zero.",
|
|
6227
|
-
[SOLANA_ERROR__FIXED_POINTS__MALFORMED_RAW_VALUE2]: "Fixed-point value of kind `$kind` has a malformed `raw` field. Expected a bigint, got `$raw`.",
|
|
6228
|
-
[SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH2]: "Fixed-point `$operation` operation expected $expectedKind ($expectedSignedness, $expectedTotalBits bits, $expectedScale $expectedScaleLabel); got $actualKind ($actualSignedness, $actualTotalBits bits, $actualScale $actualScaleLabel).",
|
|
6229
|
-
[SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS2]: "Fixed-point operation `$operation` of kind `$kind` cannot be performed exactly; pass a rounding mode other than `strict` to allow a rounded result.",
|
|
6230
|
-
[SOLANA_ERROR__FIXED_POINTS__TOTAL_BITS_NOT_BYTE_ALIGNED2]: "Fixed-point codec of kind `$kind` requires `totalBits` to be a multiple of 8; got $totalBits.",
|
|
6231
|
-
[SOLANA_ERROR__FIXED_POINTS__VALUE_OUT_OF_RANGE2]: "Fixed-point value of kind `$kind` is out of range for $signedness $totalBits-bit storage. Expected a raw bigint in [$min, $max], got $raw.",
|
|
6232
|
-
[SOLANA_ERROR__FS__UNSUPPORTED_ENVIRONMENT2]: "Filesystem operation `$operation` is not supported in this environment.",
|
|
6233
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED2]: "Instruction requires an uninitialized account",
|
|
6234
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED2]: "Instruction tries to borrow reference for an account which is already borrowed",
|
|
6235
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2]: "Instruction left account with an outstanding borrowed reference",
|
|
6236
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED2]: "Program other than the account's owner changed the size of the account data",
|
|
6237
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL2]: "Account data too small for instruction",
|
|
6238
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE2]: "Instruction expected an executable account",
|
|
6239
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT2]: "An account does not have enough lamports to be rent-exempt",
|
|
6240
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW2]: "Program arithmetic overflowed",
|
|
6241
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR2]: "Failed to serialize or deserialize account data",
|
|
6242
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS2]: "Builtin programs must consume compute units",
|
|
6243
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH2]: "Cross-program invocation call depth too deep",
|
|
6244
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED2]: "Computational budget exceeded",
|
|
6245
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM2]: "Custom program error: #$code",
|
|
6246
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX2]: "Instruction contains duplicate accounts",
|
|
6247
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC2]: "Instruction modifications of multiply-passed account differ",
|
|
6248
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT2]: "Executable accounts must be rent exempt",
|
|
6249
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED2]: "Instruction changed executable accounts data",
|
|
6250
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE2]: "Instruction changed the balance of an executable account",
|
|
6251
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED2]: "Instruction changed executable bit of an account",
|
|
6252
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED2]: "Instruction modified data of an account it does not own",
|
|
6253
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND2]: "Instruction spent from the balance of an account it does not own",
|
|
6254
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR2]: "Generic instruction error",
|
|
6255
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER2]: "Provided owner is not allowed",
|
|
6256
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE2]: "Account is immutable",
|
|
6257
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY2]: "Incorrect authority provided",
|
|
6258
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID2]: "Incorrect program id for instruction",
|
|
6259
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS2]: "Insufficient funds for instruction",
|
|
6260
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA2]: "Invalid account data for instruction",
|
|
6261
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER2]: "Invalid account owner",
|
|
6262
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT2]: "Invalid program argument",
|
|
6263
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR2]: "Program returned invalid error code",
|
|
6264
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA2]: "Invalid instruction data",
|
|
6265
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC2]: "Failed to reallocate account data",
|
|
6266
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS2]: "Provided seeds do not result in a valid address",
|
|
6267
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED2]: "Accounts data allocations exceeded the maximum allowed per transaction",
|
|
6268
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED2]: "Max accounts exceeded",
|
|
6269
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED2]: "Max instruction trace length exceeded",
|
|
6270
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED2]: "Length of the seed is too long for address generation",
|
|
6271
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT2]: "An account required by the instruction is missing",
|
|
6272
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE2]: "Missing required signature for instruction",
|
|
6273
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID2]: "Instruction illegally modified the program id of an account",
|
|
6274
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS2]: "Insufficient account keys for instruction",
|
|
6275
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION2]: "Cross-program invocation with unauthorized signer or writable account",
|
|
6276
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE2]: "Failed to create program execution environment",
|
|
6277
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE2]: "Program failed to compile",
|
|
6278
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE2]: "Program failed to complete",
|
|
6279
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED2]: "Instruction modified data of a read-only account",
|
|
6280
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE2]: "Instruction changed the balance of a read-only account",
|
|
6281
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED2]: "Cross-program invocation reentrancy not allowed for this instruction",
|
|
6282
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED2]: "Instruction modified rent epoch of an account",
|
|
6283
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION2]: "Sum of account balances before and after instruction do not match",
|
|
6284
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT2]: "Instruction requires an initialized account",
|
|
6285
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2]: "The instruction failed with the error: $errorName",
|
|
6286
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID2]: "Unsupported program id",
|
|
6287
|
-
[SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR2]: "Unsupported sysvar",
|
|
6288
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND2]: "Invalid instruction plan kind: $kind.",
|
|
6289
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN2]: "The provided instruction plan is empty.",
|
|
6290
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_SINGLE_TRANSACTION_PLAN_RESULT_NOT_FOUND2]: "No failed transaction plan result was found in the provided transaction plan result.",
|
|
6291
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED2]: "This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",
|
|
6292
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN2]: "The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",
|
|
6293
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__INVALID_MAX_INSTRUCTIONS_PER_TRANSACTION2]: "The configured maximum of $maxInstructions instructions per transaction is invalid. It must be a positive integer no greater than the transaction format limit of $transactionInstructionLimit instructions per transaction. Provide a `maxInstructionsPerTransaction` (on the transaction planner) or `maxInstructions` (on the message packer) value between 1 and $transactionInstructionLimit.",
|
|
6294
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__MAX_INSTRUCTIONS_PER_TRANSACTION_EXCEEDED2]: "Planning this transaction message would require $numInstructions instructions, which exceeds the configured maximum of $maxInstructions instructions per transaction. This limit is configurable, and intended to leave headroom for inner instructions which are included in the maximum instruction limit for transactions. Increase `maxInstructionsPerTransaction` on the transaction planner (or `maxInstructions` on the message packer) to allow more instructions per transaction.",
|
|
6295
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN2]: "The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",
|
|
6296
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND2]: "Invalid transaction plan kind: $kind.",
|
|
6297
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE2]: "No more instructions to pack; the message packer has completed the instruction plan.",
|
|
6298
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_REJECTED_BY_PACKER2]: "The message packer rejected the provided transaction message: $reason.",
|
|
6299
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_INSTRUCTION_PLAN2]: "Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",
|
|
6300
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN2]: "Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",
|
|
6301
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT2]: "Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",
|
|
6302
|
-
[SOLANA_ERROR__INSTRUCTION_PLANS__EXPECTED_SUCCESSFUL_TRANSACTION_PLAN_RESULT2]: "Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",
|
|
6303
|
-
[SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS2]: "The instruction does not have any accounts.",
|
|
6304
|
-
[SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA2]: "The instruction does not have any data.",
|
|
6305
|
-
[SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH2]: "Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",
|
|
6306
|
-
[SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH2]: "Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",
|
|
6307
|
-
[SOLANA_ERROR__INVALID_NONCE2]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
|
|
6308
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING2]: "Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
6309
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED2]: "Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",
|
|
6310
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE2]: "Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
6311
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING2]: "Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
6312
|
-
[SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE2]: "Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
6313
|
-
[SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR2]: "JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",
|
|
6314
|
-
[SOLANA_ERROR__JSON_RPC__INVALID_PARAMS2]: "JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",
|
|
6315
|
-
[SOLANA_ERROR__JSON_RPC__INVALID_REQUEST2]: "JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",
|
|
6316
|
-
[SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND2]: "JSON-RPC error: The method does not exist / is not available ($__serverMessage)",
|
|
6317
|
-
[SOLANA_ERROR__JSON_RPC__PARSE_ERROR2]: "JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",
|
|
6318
|
-
[SOLANA_ERROR__JSON_RPC__SCAN_ERROR2]: "$__serverMessage",
|
|
6319
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP2]: "$__serverMessage",
|
|
6320
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE2]: "$__serverMessage",
|
|
6321
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET2]: "$__serverMessage",
|
|
6322
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_EPOCH_REWARDS_PERIOD_ACTIVE2]: "Epoch rewards period still active at slot $slot",
|
|
6323
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_FILTER_TRANSACTION_NOT_FOUND2]: "$__serverMessage",
|
|
6324
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX2]: "$__serverMessage",
|
|
6325
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED2]: "$__serverMessage",
|
|
6326
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_UNREACHABLE2]: "Failed to query long-term storage; please try again",
|
|
6327
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED2]: "Minimum context slot has not been reached",
|
|
6328
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY2]: "Node is unhealthy; behind by $numSlotsBehind slots",
|
|
6329
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SLOT_HISTORY2]: "No slot history",
|
|
6330
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT2]: "No snapshot",
|
|
6331
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE2]: "Transaction simulation failed",
|
|
6332
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_NOT_EPOCH_BOUNDARY2]: "Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",
|
|
6333
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED2]: "$__serverMessage",
|
|
6334
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE2]: "Transaction history is not available from this node",
|
|
6335
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE2]: "$__serverMessage",
|
|
6336
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH2]: "Transaction signature length mismatch",
|
|
6337
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE2]: "Transaction signature verification failure",
|
|
6338
|
-
[SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION2]: "$__serverMessage",
|
|
6339
|
-
[SOLANA_ERROR__KEYS__INVALID_BASE58_IN_GRIND_REGEX2]: "The grind regex `/$source/` contains the character `$character`, which is not in the base58 alphabet and can never match a Solana address.",
|
|
6340
|
-
[SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH2]: "Key pair bytes must be of length 64, got $byteLength.",
|
|
6341
|
-
[SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH2]: "Expected private key bytes with length 32. Actual length: $actualLength.",
|
|
6342
|
-
[SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH2]: "Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",
|
|
6343
|
-
[SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY2]: "The provided private key does not match the provided public key.",
|
|
6344
|
-
[SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",
|
|
6345
|
-
[SOLANA_ERROR__KEYS__WRITE_KEY_PAIR_UNSUPPORTED_ENVIRONMENT2]: "Writing a key pair to disk is not supported in this environment.",
|
|
6346
|
-
[SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE2]: "Lamports value must be in the range [0, 2e64-1]",
|
|
6347
|
-
[SOLANA_ERROR__MALFORMED_BIGINT_STRING2]: "`$value` cannot be parsed as a `BigInt`",
|
|
6348
|
-
[SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR2]: "$message",
|
|
6349
|
-
[SOLANA_ERROR__MALFORMED_NUMBER_STRING2]: "`$value` cannot be parsed as a `Number`",
|
|
6350
|
-
[SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND2]: "No nonce account could be found at address `$nonceAccountAddress`",
|
|
6351
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__INVALID_APPLICATION_DOMAIN_BYTE_LENGTH2]: "Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",
|
|
6352
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__ADDRESSES_CANNOT_SIGN_OFFCHAIN_MESSAGE2]: "Attempted to sign an offchain message with an address that is not a signer for it",
|
|
6353
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__APPLICATION_DOMAIN_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
6354
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__CONTENT_DOES_NOT_MATCH_EXPECTED2]: "The content of the offchain message does not match the content that was expected. Expected content with a byte-length of $expectedBytes; got content with a byte-length of $actualBytes. The signer may have signed different data than was requested; do not trust its signature.",
|
|
6355
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__ENVELOPE_SIGNERS_MISMATCH2]: "The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",
|
|
6356
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__MAXIMUM_LENGTH_EXCEEDED2]: "The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",
|
|
6357
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_FORMAT_MISMATCH2]: "Expected message format $expectedMessageFormat, got $actualMessageFormat",
|
|
6358
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_LENGTH_MISMATCH2]: "The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",
|
|
6359
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_MUST_BE_NON_EMPTY2]: "Offchain message content must be non-empty",
|
|
6360
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_REQUIRED_SIGNERS_CANNOT_BE_ZERO2]: "Offchain message must specify the address of at least one required signer",
|
|
6361
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_ENVELOPE_SIGNATURES_CANNOT_BE_ZERO2]: "Offchain message envelope must reserve space for at least one signature",
|
|
6362
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_SIGNATURES_MISMATCH2]: "The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",
|
|
6363
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__REQUIRED_SIGNATORIES_DO_NOT_MATCH_EXPECTED2]: "The offchain message lists different required signatories than was expected. Expected [$expectedAddresses]. Got [$actualAddresses]. The signer may have signed different data than was requested; do not trust its signature.",
|
|
6364
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_SORTED2]: "The signatories of this offchain message must be listed in lexicographical order",
|
|
6365
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_UNIQUE2]: "An address must be listed no more than once among the signatories of an offchain message",
|
|
6366
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURES_MISSING2]: "Offchain message is missing signatures for addresses: $addresses.",
|
|
6367
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURE_VERIFICATION_FAILURE2]: "Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",
|
|
6368
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__RESTRICTED_ASCII_BODY_CHARACTER_OUT_OF_RANGE2]: "The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",
|
|
6369
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__UNEXPECTED_VERSION2]: "Expected offchain message version $expectedVersion. Got $actualVersion.",
|
|
6370
|
-
[SOLANA_ERROR__OFFCHAIN_MESSAGE__VERSION_NUMBER_NOT_SUPPORTED2]: "This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",
|
|
6371
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT2]: "The provided account could not be identified as an account from the $programName program.",
|
|
6372
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION2]: "The provided instruction could not be identified as an instruction from the $programName program.",
|
|
6373
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS2]: "The provided instruction is missing some accounts. Expected at least $expectedAccountMetas account(s), got $actualAccountMetas.",
|
|
6374
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2]: "Expected resolved instruction input '$inputName' to be non-null.",
|
|
6375
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2]: "Expected resolved instruction input '$inputName' to be a `TransactionSigner` because the instruction requires this account to sign the transaction. If its signature is provided by other means, use `createNoopSigner()` from `@solana/signers` to satisfy this requirement.",
|
|
6376
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__UNEXPECTED_RESOLVED_INSTRUCTION_INPUT_TYPE2]: "Expected resolved instruction input '$inputName' to be of type `$expectedType`.",
|
|
6377
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE2]: "Unrecognized account type '$accountType' for the $programName program.",
|
|
6378
|
-
[SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE2]: "Unrecognized instruction type '$instructionType' for the $programName program.",
|
|
6379
|
-
[SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN2]: "The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",
|
|
6380
|
-
[SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED2]: "WebSocket was closed before payload could be added to the send buffer",
|
|
6381
|
-
[SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED2]: "WebSocket connection closed",
|
|
6382
|
-
[SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT2]: "WebSocket failed to connect",
|
|
6383
|
-
[SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID2]: "Failed to obtain a subscription id from the server",
|
|
6384
|
-
[SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD2]: "Could not find an API plan for RPC method: `$method`",
|
|
6385
|
-
[SOLANA_ERROR__RPC__INTEGER_OVERFLOW2]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
|
|
6386
|
-
[SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR2]: "HTTP error ($statusCode): $message",
|
|
6387
|
-
[SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN2]: "HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",
|
|
6388
|
-
[SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS2]: "Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",
|
|
6389
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER2]: "The provided value does not implement the `KeyPairSigner` interface",
|
|
6390
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER2]: "The provided value does not implement the `MessageModifyingSigner` interface",
|
|
6391
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER2]: "The provided value does not implement the `MessagePartialSigner` interface",
|
|
6392
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER2]: "The provided value does not implement any of the `MessageSigner` interfaces",
|
|
6393
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER2]: "The provided value does not implement the `TransactionModifyingSigner` interface",
|
|
6394
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER2]: "The provided value does not implement the `TransactionPartialSigner` interface",
|
|
6395
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER2]: "The provided value does not implement the `TransactionSendingSigner` interface",
|
|
6396
|
-
[SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER2]: "The provided value does not implement any of the `TransactionSigner` interfaces",
|
|
6397
|
-
[SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS2]: "More than one `TransactionSendingSigner` was identified.",
|
|
6398
|
-
[SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING2]: "No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",
|
|
6399
|
-
[SOLANA_ERROR__SIGNER__WALLET_ACCOUNT_CANNOT_SIGN_TRANSACTION2]: "The wallet account $address cannot be used to create a transaction signer because it does not implement either the `solana:signTransaction` or `solana:signAndSendTransaction` feature. At least one of these features is required. The account supports the following features: $supportedFeatures.",
|
|
6400
|
-
[SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED2]: "Wallet account signers do not support signing multiple messages/transactions in a single operation",
|
|
6401
|
-
[SOLANA_ERROR__SUBSCRIBABLE__RETRY_NOT_SUPPORTED2]: "This `ReactiveStreamStore` does not support retry. Use `createReactiveStoreFromDataPublisherFactory` to construct a retryable store.",
|
|
6402
|
-
[SOLANA_ERROR__SUBSCRIBABLE__STREAM_CLOSED_WITHOUT_ERROR2]: "The stream store closed in an error state but did not report an error.",
|
|
6403
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY2]: "Cannot export a non-extractable key.",
|
|
6404
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2]: "No digest implementation could be found.",
|
|
6405
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT2]: "Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",
|
|
6406
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED2]: "This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",
|
|
6407
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED2]: "No key export implementation could be found.",
|
|
6408
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED2]: "No key generation implementation could be found.",
|
|
6409
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED2]: "No signing implementation could be found.",
|
|
6410
|
-
[SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED2]: "No signature verification implementation could be found.",
|
|
6411
|
-
[SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE2]: "Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",
|
|
6412
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2]: "Transaction processing left an account with an outstanding borrowed reference",
|
|
6413
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE2]: "Account in use",
|
|
6414
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE2]: "Account loaded twice",
|
|
6415
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND2]: "Attempt to debit an account but found no record of a prior credit.",
|
|
6416
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND2]: "Transaction loads an address table account that doesn't exist",
|
|
6417
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED2]: "This transaction has already been processed",
|
|
6418
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND2]: "Blockhash not found",
|
|
6419
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP2]: "Loader call chain is too deep",
|
|
6420
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE2]: "Transactions are currently disabled due to cluster maintenance",
|
|
6421
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION2]: "Transaction contains a duplicate instruction ($index) that is not allowed",
|
|
6422
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE2]: "Insufficient funds for fee",
|
|
6423
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT2]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
|
|
6424
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE2]: "This account may not be used to pay transaction fees",
|
|
6425
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX2]: "Transaction contains an invalid account reference",
|
|
6426
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA2]: "Transaction loads an address table account with invalid data",
|
|
6427
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX2]: "Transaction address table lookup uses an invalid index",
|
|
6428
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER2]: "Transaction loads an address table account with an invalid owner",
|
|
6429
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
|
|
6430
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION2]: "This program may not be used for executing instructions",
|
|
6431
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT2]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
|
|
6432
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT2]: "Transaction loads a writable account that cannot be written",
|
|
6433
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED2]: "Transaction exceeded max loaded accounts data size cap",
|
|
6434
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE2]: "Transaction requires a fee but has no signature present",
|
|
6435
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND2]: "Attempt to load a program that does not exist",
|
|
6436
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED2]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
|
|
6437
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED2]: "ResanitizationNeeded",
|
|
6438
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE2]: "Transaction failed to sanitize accounts offsets correctly",
|
|
6439
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE2]: "Transaction did not pass signature verification",
|
|
6440
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS2]: "Transaction locked too many accounts",
|
|
6441
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION2]: "Sum of account balances before and after transaction do not match",
|
|
6442
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN2]: "The transaction failed with the error `$errorName`",
|
|
6443
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION2]: "Transaction version is unsupported",
|
|
6444
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT2]: "Transaction would exceed account data limit within the block",
|
|
6445
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT2]: "Transaction would exceed total account data limit",
|
|
6446
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT2]: "Transaction would exceed max account limit within the block",
|
|
6447
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT2]: "Transaction would exceed max Block Cost Limit",
|
|
6448
|
-
[SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT2]: "Transaction would exceed max Vote Cost Limit",
|
|
6449
|
-
[SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION2]: "Attempted to sign a transaction with an address that is not a signer for it",
|
|
6450
|
-
[SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING2]: "Transaction is missing an address at index: $index.",
|
|
6451
|
-
[SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES2]: "Transaction has no expected signers therefore it cannot be encoded",
|
|
6452
|
-
[SOLANA_ERROR__TRANSACTION__COMPUTE_UNIT_LIMIT_OUT_OF_RANGE2]: "Transaction compute unit limit must be an integer in the range [0, $maxComputeUnitLimit]. `$computeUnitLimit` given",
|
|
6453
|
-
[SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT2]: "Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",
|
|
6454
|
-
[SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME2]: "Transaction does not have a blockhash lifetime",
|
|
6455
|
-
[SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME2]: "Transaction is not a durable nonce transaction",
|
|
6456
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING2]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
|
|
6457
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE2]: "Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",
|
|
6458
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING2]: "No fee payer set in CompiledTransaction",
|
|
6459
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND2]: "Could not find program address at index $index",
|
|
6460
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT2]: "Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",
|
|
6461
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2]: "Failed to estimate the loaded accounts data size for this transaction message. The RPC did not return a `loadedAccountsDataSize` value from simulation. This value is required for version 1 transactions",
|
|
6462
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT2]: "Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",
|
|
6463
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_RESOURCE_LIMITS2]: "Transaction failed when it was simulated in order to estimate its resource limits. The resource limit estimates provided are for a transaction that failed when simulated and may not be representative of the resources this transaction would consume if successful. Inspect the `cause` property of this error to learn more",
|
|
6464
|
-
[SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING2]: "Transaction is missing a fee payer.",
|
|
6465
|
-
[SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING2]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",
|
|
6466
|
-
[SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE2]: "Transaction first instruction is not advance nonce account instruction.",
|
|
6467
|
-
[SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING2]: "Transaction with no instructions cannot be durable nonce transaction.",
|
|
6468
|
-
[SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES2]: "This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",
|
|
6469
|
-
[SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE2]: "This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",
|
|
6470
|
-
[SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH2]: "The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",
|
|
6471
|
-
[SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING2]: "Transaction is missing signatures for addresses: $addresses.",
|
|
6472
|
-
[SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE2]: "Transaction version must be in the range [0, 127]. `$actualVersion` given",
|
|
6473
|
-
[SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED2]: "This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 1.",
|
|
6474
|
-
[SOLANA_ERROR__TRANSACTION__NONCE_ACCOUNT_CANNOT_BE_IN_LOOKUP_TABLE2]: "The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction.",
|
|
6475
|
-
[SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_MASK_PRIORITY_FEE_BITS2]: "Invalid transaction config mask: $mask. Bits 0 and 1 must match (both set or both unset)",
|
|
6476
|
-
[SOLANA_ERROR__TRANSACTION__MALFORMED_MESSAGE_BYTES2]: "Transaction message bytes are malformed: $messageBytes",
|
|
6477
|
-
[SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_MESSAGE_BYTES2]: "Transaction message bytes are empty, so the transaction cannot be encoded",
|
|
6478
|
-
[SOLANA_ERROR__TRANSACTION__CANNOT_DECODE_EMPTY_TRANSACTION_BYTES2]: "Transaction bytes are empty, so no transaction can be decoded",
|
|
6479
|
-
[SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST2]: "Transaction version 0 must be encoded with signatures first. This transaction was encoded with first byte $firstByte, which is expected to be a signature count for v0 transactions.",
|
|
6480
|
-
[SOLANA_ERROR__TRANSACTION__SIGNATURE_COUNT_TOO_HIGH_FOR_TRANSACTION_BYTES2]: "The provided transaction bytes expect that there should be $numExpectedSignatures signatures, but the bytes are not long enough to contain a transaction message with this many signatures. The provided bytes are $transactionBytesLength bytes long.",
|
|
6481
|
-
[SOLANA_ERROR__TRANSACTION__INVALID_HEAP_SIZE2]: "Transaction heap size must be an integer multiple of $multipleOf bytes in the range [$minHeapSize, $maxHeapSize]. `$heapSize` given",
|
|
6482
|
-
[SOLANA_ERROR__TRANSACTION__INVALID_NONCE_ACCOUNT_INDEX2]: "The transaction has a durable nonce lifetime, but the nonce account index is invalid. Expected a nonce account index less than $numberOfStaticAccounts, got $nonceAccountIndex.",
|
|
6483
|
-
[SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_VALUE_KIND2]: "The transaction config value for $configName has the incorrect kind. Expected $expectedKind, got $actualKind.",
|
|
6484
|
-
[SOLANA_ERROR__TRANSACTION__INSTRUCTION_HEADERS_PAYLOADS_MISMATCH2]: "The transaction does not have the same number of instruction headers and instruction payloads. Got $numInstructionHeaders instruction headers, and $numInstructionPayloads instruction payloads.",
|
|
6485
|
-
[SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES2]: "Transaction has $actualCount unique signer addresses but the maximum allowed is $maxAllowed",
|
|
6486
|
-
[SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES2]: "Transaction has $actualCount unique account addresses but the maximum allowed is $maxAllowed",
|
|
6487
|
-
[SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS2]: "Transaction has $actualCount instructions but the maximum allowed is $maxAllowed",
|
|
6488
|
-
[SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION2]: "The instruction at index $instructionIndex has $actualCount account references but the maximum allowed is $maxAllowed",
|
|
6489
|
-
[SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_ACCOUNT_INDEX_OUT_OF_RANGE2]: "Could not find an account address at index $index while decompiling an instruction",
|
|
6490
|
-
[SOLANA_ERROR__TRANSACTION_INTROSPECTION__CANNOT_DECODE_JSON_PARSED_TRANSACTION2]: "`getTransaction` responses fetched with `encoding: 'jsonParsed'` cannot be decoded. Re-fetch the transaction with `encoding: 'base64'`, `'base58'`, or `'json'`",
|
|
6491
|
-
[SOLANA_ERROR__TRANSACTION_INTROSPECTION__UNRECOGNIZED_GET_TRANSACTION_RESPONSE2]: "Could not recognize the shape of this `getTransaction` response. Expected a response fetched with `encoding: 'base64'`, `'base58'`, or `'json'`",
|
|
6492
|
-
[SOLANA_ERROR__REACT__MISSING_CAPABILITY2]: "`$hookName` requires the following capabilities to be installed on the client: [$capabilities]. $providerHint",
|
|
6493
|
-
[SOLANA_ERROR__REACT__MISSING_PROVIDER2]: "`$hookName` was called outside of a `ClientProvider`. Mount a `<ClientProvider client={client}>` in the ancestor tree.",
|
|
6494
|
-
[SOLANA_ERROR__REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR2]: "The subscription closed in an error state but did not report an error.",
|
|
6495
|
-
[SOLANA_ERROR__WALLET__NOT_CONNECTED2]: "Cannot $operation: no wallet connected",
|
|
6496
|
-
[SOLANA_ERROR__WALLET__NO_SIGNER_CONNECTED2]: "No signing wallet connected (status: $status)",
|
|
6497
|
-
[SOLANA_ERROR__WALLET__SIGNER_NOT_AVAILABLE2]: "Connected wallet does not support signing",
|
|
6498
|
-
[SOLANA_ERROR__WALLET__ACCOUNT_NOT_AVAILABLE2]: 'Account $address is not available in wallet "$walletName"'
|
|
6499
|
-
};
|
|
6500
|
-
var INSTRUCTION_ERROR_RANGE_SIZE2 = 1e3;
|
|
6501
|
-
var START_INDEX2 = "i";
|
|
6502
|
-
var TYPE3 = "t";
|
|
6503
|
-
function getHumanReadableErrorMessage2(code, context = {}) {
|
|
6504
|
-
const messageFormatString = SolanaErrorMessages2[code];
|
|
6505
|
-
if (messageFormatString.length === 0) {
|
|
6506
|
-
return "";
|
|
6507
|
-
}
|
|
6508
|
-
let state;
|
|
6509
|
-
function commitStateUpTo(endIndex) {
|
|
6510
|
-
if (state[TYPE3] === 2) {
|
|
6511
|
-
const variableName = messageFormatString.slice(state[START_INDEX2] + 1, endIndex);
|
|
6512
|
-
fragments.push(
|
|
6513
|
-
variableName in context ? (
|
|
6514
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
6515
|
-
`${context[variableName]}`
|
|
6516
|
-
) : `$${variableName}`
|
|
6517
|
-
);
|
|
6518
|
-
} else if (state[TYPE3] === 1) {
|
|
6519
|
-
fragments.push(messageFormatString.slice(state[START_INDEX2], endIndex));
|
|
6520
|
-
}
|
|
5846
|
+
function getAddressFromResolvedInstructionAccount(inputName, value) {
|
|
5847
|
+
const nonNullValue = getNonNullResolvedInstructionInput(inputName, value);
|
|
5848
|
+
if (typeof value === "object" && "address" in nonNullValue) {
|
|
5849
|
+
return nonNullValue.address;
|
|
6521
5850
|
}
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
if (ii === 0) {
|
|
6525
|
-
state = {
|
|
6526
|
-
[START_INDEX2]: 0,
|
|
6527
|
-
[TYPE3]: messageFormatString[0] === "\\" ? 0 : messageFormatString[0] === "$" ? 2 : 1
|
|
6528
|
-
/* Text */
|
|
6529
|
-
};
|
|
6530
|
-
return;
|
|
6531
|
-
}
|
|
6532
|
-
let nextState;
|
|
6533
|
-
switch (state[TYPE3]) {
|
|
6534
|
-
case 0:
|
|
6535
|
-
nextState = {
|
|
6536
|
-
[START_INDEX2]: ii,
|
|
6537
|
-
[TYPE3]: 1
|
|
6538
|
-
/* Text */
|
|
6539
|
-
};
|
|
6540
|
-
break;
|
|
6541
|
-
case 1:
|
|
6542
|
-
if (char === "\\") {
|
|
6543
|
-
nextState = {
|
|
6544
|
-
[START_INDEX2]: ii,
|
|
6545
|
-
[TYPE3]: 0
|
|
6546
|
-
/* EscapeSequence */
|
|
6547
|
-
};
|
|
6548
|
-
} else if (char === "$") {
|
|
6549
|
-
nextState = {
|
|
6550
|
-
[START_INDEX2]: ii,
|
|
6551
|
-
[TYPE3]: 2
|
|
6552
|
-
/* Variable */
|
|
6553
|
-
};
|
|
6554
|
-
}
|
|
6555
|
-
break;
|
|
6556
|
-
case 2:
|
|
6557
|
-
if (char === "\\") {
|
|
6558
|
-
nextState = {
|
|
6559
|
-
[START_INDEX2]: ii,
|
|
6560
|
-
[TYPE3]: 0
|
|
6561
|
-
/* EscapeSequence */
|
|
6562
|
-
};
|
|
6563
|
-
} else if (char === "$") {
|
|
6564
|
-
nextState = {
|
|
6565
|
-
[START_INDEX2]: ii,
|
|
6566
|
-
[TYPE3]: 2
|
|
6567
|
-
/* Variable */
|
|
6568
|
-
};
|
|
6569
|
-
} else if (!char.match(/\w/)) {
|
|
6570
|
-
nextState = {
|
|
6571
|
-
[START_INDEX2]: ii,
|
|
6572
|
-
[TYPE3]: 1
|
|
6573
|
-
/* Text */
|
|
6574
|
-
};
|
|
6575
|
-
}
|
|
6576
|
-
break;
|
|
6577
|
-
}
|
|
6578
|
-
if (nextState) {
|
|
6579
|
-
if (state !== nextState) {
|
|
6580
|
-
commitStateUpTo(ii);
|
|
6581
|
-
}
|
|
6582
|
-
state = nextState;
|
|
6583
|
-
}
|
|
6584
|
-
});
|
|
6585
|
-
commitStateUpTo();
|
|
6586
|
-
let message = fragments.join("");
|
|
6587
|
-
if (code >= SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 && code < SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 + INSTRUCTION_ERROR_RANGE_SIZE2 && "index" in context) {
|
|
6588
|
-
message += ` (instruction #${context.index + 1})`;
|
|
5851
|
+
if (Array.isArray(nonNullValue)) {
|
|
5852
|
+
return nonNullValue[0];
|
|
6589
5853
|
}
|
|
6590
|
-
return
|
|
5854
|
+
return nonNullValue;
|
|
6591
5855
|
}
|
|
6592
|
-
function
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
if (Object.keys(context).length) {
|
|
6598
|
-
decodingAdviceMessage += ` '${encodeContextObject2(context)}'`;
|
|
5856
|
+
function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
5857
|
+
return (inputName, account) => {
|
|
5858
|
+
if (!account.value) {
|
|
5859
|
+
if (optionalAccountStrategy === "omitted") return;
|
|
5860
|
+
return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
|
|
6599
5861
|
}
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
if (code !== void 0) {
|
|
6607
|
-
return e5.context.__code === code;
|
|
5862
|
+
if (hasExplicitRole(account.value)) {
|
|
5863
|
+
return Object.freeze({
|
|
5864
|
+
address: account.value.address,
|
|
5865
|
+
role: account.value.role,
|
|
5866
|
+
..."signer" in account.value && account.value.signer ? { signer: account.value.signer } : {}
|
|
5867
|
+
});
|
|
6608
5868
|
}
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
/**
|
|
6615
|
-
* Indicates the root cause of this {@link SolanaError}, if any.
|
|
6616
|
-
*
|
|
6617
|
-
* For example, a transaction error might have an instruction error as its root cause. In this
|
|
6618
|
-
* case, you will be able to access the instruction error on the transaction error as `cause`.
|
|
6619
|
-
*/
|
|
6620
|
-
cause = this.cause;
|
|
6621
|
-
/**
|
|
6622
|
-
* Contains context that can assist in understanding or recovering from a {@link SolanaError}.
|
|
6623
|
-
*/
|
|
6624
|
-
context;
|
|
6625
|
-
constructor(...[code, contextAndErrorOptions]) {
|
|
6626
|
-
let context;
|
|
6627
|
-
let errorOptions;
|
|
6628
|
-
if (contextAndErrorOptions) {
|
|
6629
|
-
Object.entries(Object.getOwnPropertyDescriptors(contextAndErrorOptions)).forEach(([name, descriptor]) => {
|
|
6630
|
-
if (name === "cause") {
|
|
6631
|
-
errorOptions = { cause: descriptor.value };
|
|
6632
|
-
} else {
|
|
6633
|
-
if (context === void 0) {
|
|
6634
|
-
context = {
|
|
6635
|
-
__code: code
|
|
6636
|
-
};
|
|
6637
|
-
}
|
|
6638
|
-
Object.defineProperty(context, name, descriptor);
|
|
6639
|
-
}
|
|
5869
|
+
const idlIsSigner = account.isSigner ?? "either";
|
|
5870
|
+
const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner(account.value);
|
|
5871
|
+
if (!isSigner && idlIsSigner === true) {
|
|
5872
|
+
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER, {
|
|
5873
|
+
inputName
|
|
6640
5874
|
});
|
|
6641
5875
|
}
|
|
6642
|
-
const
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
this.name = "SolanaError";
|
|
6650
|
-
}
|
|
6651
|
-
};
|
|
6652
|
-
|
|
6653
|
-
// ../../node_modules/.pnpm/@solana+codecs-core@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-core/dist/index.node.mjs
|
|
6654
|
-
function padBytes2(bytes, length) {
|
|
6655
|
-
if (bytes.length >= length) return bytes;
|
|
6656
|
-
const paddedBytes = new Uint8Array(length).fill(0);
|
|
6657
|
-
paddedBytes.set(bytes);
|
|
6658
|
-
return paddedBytes;
|
|
5876
|
+
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
5877
|
+
return Object.freeze({
|
|
5878
|
+
address: getAddressFromResolvedInstructionAccount(inputName, account.value),
|
|
5879
|
+
role: isSigner ? upgradeRoleToSigner(writableRole) : writableRole,
|
|
5880
|
+
...isSigner ? { signer: account.value } : {}
|
|
5881
|
+
});
|
|
5882
|
+
};
|
|
6659
5883
|
}
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
return "fixedSize" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);
|
|
5884
|
+
function hasExplicitRole(value) {
|
|
5885
|
+
return typeof value === "object" && "role" in value && typeof value.role === "number";
|
|
6663
5886
|
}
|
|
6664
|
-
function
|
|
6665
|
-
return
|
|
6666
|
-
...encoder,
|
|
6667
|
-
encode: (value) => {
|
|
6668
|
-
const bytes = new Uint8Array(getEncodedSize2(value, encoder));
|
|
6669
|
-
encoder.write(value, bytes, 0);
|
|
6670
|
-
return bytes;
|
|
6671
|
-
}
|
|
6672
|
-
});
|
|
5887
|
+
function isResolvedInstructionAccountSigner(value) {
|
|
5888
|
+
return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner(value);
|
|
6673
5889
|
}
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
5890
|
+
|
|
5891
|
+
// ../../node_modules/.pnpm/@solana-program+token@0.17.0_@solana+kit@8.4.0/node_modules/@solana-program/token/dist/src/index.mjs
|
|
5892
|
+
async function findAssociatedTokenPda(seeds, config = {}) {
|
|
5893
|
+
const {
|
|
5894
|
+
programAddress = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
5895
|
+
} = config;
|
|
5896
|
+
return await getProgramDerivedAddress({
|
|
5897
|
+
programAddress,
|
|
5898
|
+
seeds: [
|
|
5899
|
+
getAddressEncoder().encode(seeds.owner),
|
|
5900
|
+
getAddressEncoder().encode(seeds.tokenProgram),
|
|
5901
|
+
getAddressEncoder().encode(seeds.mint)
|
|
5902
|
+
]
|
|
6678
5903
|
});
|
|
6679
5904
|
}
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
5905
|
+
var CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR = 1;
|
|
5906
|
+
function getCreateAssociatedTokenIdempotentInstructionDataEncoder() {
|
|
5907
|
+
return transformEncoder(getStructEncoder([["discriminator", getU8Encoder()]]), (value) => ({
|
|
5908
|
+
...value,
|
|
5909
|
+
discriminator: CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR
|
|
5910
|
+
}));
|
|
6685
5911
|
}
|
|
6686
|
-
function
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
}
|
|
6695
|
-
|
|
6696
|
-
if (!isFixedSize2(encoder) && !isFixedSize2(decoder) && encoder.maxSize !== decoder.maxSize) {
|
|
6697
|
-
throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2, {
|
|
6698
|
-
decoderMaxSize: decoder.maxSize,
|
|
6699
|
-
encoderMaxSize: encoder.maxSize
|
|
6700
|
-
});
|
|
6701
|
-
}
|
|
6702
|
-
return {
|
|
6703
|
-
...decoder,
|
|
6704
|
-
...encoder,
|
|
6705
|
-
decode: decoder.decode,
|
|
6706
|
-
encode: encoder.encode,
|
|
6707
|
-
read: decoder.read,
|
|
6708
|
-
write: encoder.write
|
|
5912
|
+
function getCreateAssociatedTokenIdempotentInstruction(input, config) {
|
|
5913
|
+
const programAddress = config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;
|
|
5914
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5915
|
+
const originalAccounts = {
|
|
5916
|
+
payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
|
|
5917
|
+
ata: { value: input.ata ?? null, isSigner: false, isWritable: true },
|
|
5918
|
+
owner: { value: input.owner ?? null, isSigner: false, isWritable: false },
|
|
5919
|
+
mint: { value: input.mint ?? null, isSigner: false, isWritable: false },
|
|
5920
|
+
systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
|
|
5921
|
+
tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false }
|
|
6709
5922
|
};
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
if (bytesLength < expected) {
|
|
6714
|
-
throw new SolanaError2(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2, {
|
|
6715
|
-
bytesLength,
|
|
6716
|
-
codecDescription,
|
|
6717
|
-
expected
|
|
6718
|
-
});
|
|
6719
|
-
}
|
|
6720
|
-
}
|
|
6721
|
-
function fixEncoderSize2(encoder, fixedBytes) {
|
|
6722
|
-
return createEncoder2({
|
|
6723
|
-
fixedSize: fixedBytes,
|
|
6724
|
-
write: (value, bytes, offset) => {
|
|
6725
|
-
const variableByteArray = encoder.encode(value);
|
|
6726
|
-
const fixedByteArray = variableByteArray.length > fixedBytes ? variableByteArray.slice(0, fixedBytes) : variableByteArray;
|
|
6727
|
-
bytes.set(fixedByteArray, offset);
|
|
6728
|
-
return offset + fixedBytes;
|
|
6729
|
-
}
|
|
6730
|
-
});
|
|
6731
|
-
}
|
|
6732
|
-
function fixDecoderSize2(decoder, fixedBytes) {
|
|
6733
|
-
return createDecoder2({
|
|
6734
|
-
fixedSize: fixedBytes,
|
|
6735
|
-
read: (bytes, offset) => {
|
|
6736
|
-
assertByteArrayHasEnoughBytesForCodec2("fixCodecSize", fixedBytes, bytes, offset);
|
|
6737
|
-
if (offset > 0 || bytes.length > fixedBytes) {
|
|
6738
|
-
bytes = bytes.slice(offset, offset + fixedBytes);
|
|
6739
|
-
}
|
|
6740
|
-
if (isFixedSize2(decoder)) {
|
|
6741
|
-
bytes = fixBytes2(bytes, decoder.fixedSize);
|
|
6742
|
-
}
|
|
6743
|
-
const [value] = decoder.read(bytes, 0);
|
|
6744
|
-
return [value, offset + fixedBytes];
|
|
6745
|
-
}
|
|
6746
|
-
});
|
|
6747
|
-
}
|
|
6748
|
-
function transformEncoder2(encoder, unmap) {
|
|
6749
|
-
return createEncoder2({
|
|
6750
|
-
...isVariableSize2(encoder) ? { ...encoder, getSizeFromValue: (value) => encoder.getSizeFromValue(unmap(value)) } : encoder,
|
|
6751
|
-
write: (value, bytes, offset) => encoder.write(unmap(value), bytes, offset)
|
|
6752
|
-
});
|
|
6753
|
-
}
|
|
6754
|
-
|
|
6755
|
-
// ../../node_modules/.pnpm/@solana+codecs-strings@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-strings/dist/index.node.mjs
|
|
6756
|
-
function assertValidBaseString3(alphabet4, testValue, givenValue = testValue) {
|
|
6757
|
-
if (!testValue.match(new RegExp(`^[${alphabet4}]*$`))) {
|
|
6758
|
-
throw new SolanaError2(SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2, {
|
|
6759
|
-
alphabet: alphabet4,
|
|
6760
|
-
base: alphabet4.length,
|
|
6761
|
-
value: givenValue
|
|
6762
|
-
});
|
|
6763
|
-
}
|
|
6764
|
-
}
|
|
6765
|
-
var getBaseXEncoder3 = (alphabet4) => {
|
|
6766
|
-
return createEncoder2({
|
|
6767
|
-
getSizeFromValue: (value) => {
|
|
6768
|
-
const [leadingZeroes, tailChars] = partitionLeadingZeroes3(value, alphabet4[0]);
|
|
6769
|
-
if (!tailChars) return value.length;
|
|
6770
|
-
const base10Number = getBigIntFromBaseX3(tailChars, alphabet4);
|
|
6771
|
-
return leadingZeroes.length + Math.ceil(base10Number.toString(16).length / 2);
|
|
6772
|
-
},
|
|
6773
|
-
write(value, bytes, offset) {
|
|
6774
|
-
assertValidBaseString3(alphabet4, value);
|
|
6775
|
-
if (value === "") return offset;
|
|
6776
|
-
const [leadingZeroes, tailChars] = partitionLeadingZeroes3(value, alphabet4[0]);
|
|
6777
|
-
if (!tailChars) {
|
|
6778
|
-
bytes.set(new Uint8Array(leadingZeroes.length).fill(0), offset);
|
|
6779
|
-
return offset + leadingZeroes.length;
|
|
6780
|
-
}
|
|
6781
|
-
let base10Number = getBigIntFromBaseX3(tailChars, alphabet4);
|
|
6782
|
-
const tailBytes = [];
|
|
6783
|
-
while (base10Number > 0n) {
|
|
6784
|
-
tailBytes.unshift(Number(base10Number % 256n));
|
|
6785
|
-
base10Number /= 256n;
|
|
6786
|
-
}
|
|
6787
|
-
const bytesToAdd = [...Array(leadingZeroes.length).fill(0), ...tailBytes];
|
|
6788
|
-
bytes.set(bytesToAdd, offset);
|
|
6789
|
-
return offset + bytesToAdd.length;
|
|
6790
|
-
}
|
|
6791
|
-
});
|
|
6792
|
-
};
|
|
6793
|
-
var getBaseXDecoder2 = (alphabet4) => {
|
|
6794
|
-
return createDecoder2({
|
|
6795
|
-
read(rawBytes, offset) {
|
|
6796
|
-
const bytes = offset === 0 || offset <= -rawBytes.byteLength ? rawBytes : rawBytes.slice(offset);
|
|
6797
|
-
if (bytes.length === 0) return ["", rawBytes.length];
|
|
6798
|
-
let trailIndex = bytes.findIndex((n) => n !== 0);
|
|
6799
|
-
trailIndex = trailIndex === -1 ? bytes.length : trailIndex;
|
|
6800
|
-
const leadingZeroes = alphabet4[0].repeat(trailIndex);
|
|
6801
|
-
if (trailIndex === bytes.length) return [leadingZeroes, rawBytes.length];
|
|
6802
|
-
const base10Number = bytes.slice(trailIndex).reduce((sum, byte) => sum * 256n + BigInt(byte), 0n);
|
|
6803
|
-
const tailChars = getBaseXFromBigInt2(base10Number, alphabet4);
|
|
6804
|
-
return [leadingZeroes + tailChars, rawBytes.length];
|
|
6805
|
-
}
|
|
6806
|
-
});
|
|
6807
|
-
};
|
|
6808
|
-
function partitionLeadingZeroes3(value, zeroCharacter) {
|
|
6809
|
-
const [leadingZeros, tailChars] = value.split(new RegExp(`((?!${zeroCharacter}).*)`));
|
|
6810
|
-
return [leadingZeros, tailChars];
|
|
6811
|
-
}
|
|
6812
|
-
function getBigIntFromBaseX3(value, alphabet4) {
|
|
6813
|
-
const base = BigInt(alphabet4.length);
|
|
6814
|
-
let sum = 0n;
|
|
6815
|
-
for (const char of value) {
|
|
6816
|
-
sum *= base;
|
|
6817
|
-
sum += BigInt(alphabet4.indexOf(char));
|
|
6818
|
-
}
|
|
6819
|
-
return sum;
|
|
6820
|
-
}
|
|
6821
|
-
function getBaseXFromBigInt2(value, alphabet4) {
|
|
6822
|
-
const base = BigInt(alphabet4.length);
|
|
6823
|
-
const tailChars = [];
|
|
6824
|
-
while (value > 0n) {
|
|
6825
|
-
tailChars.unshift(alphabet4[Number(value % base)]);
|
|
6826
|
-
value /= base;
|
|
6827
|
-
}
|
|
6828
|
-
return tailChars.join("");
|
|
6829
|
-
}
|
|
6830
|
-
var alphabet23 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
6831
|
-
var getBase58Encoder3 = () => getBaseXEncoder3(alphabet23);
|
|
6832
|
-
var getBase58Decoder2 = () => getBaseXDecoder2(alphabet23);
|
|
6833
|
-
var e4 = globalThis.TextDecoder;
|
|
6834
|
-
var o3 = globalThis.TextEncoder;
|
|
6835
|
-
|
|
6836
|
-
// ../../node_modules/.pnpm/@solana+assertions@8.4.0_typescript@6.0.3/node_modules/@solana/assertions/dist/index.node.mjs
|
|
6837
|
-
function assertDigestCapabilityIsAvailable2() {
|
|
6838
|
-
if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.digest !== "function") {
|
|
6839
|
-
throw new SolanaError2(SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2);
|
|
6840
|
-
}
|
|
6841
|
-
}
|
|
6842
|
-
|
|
6843
|
-
// ../../node_modules/.pnpm/@solana+addresses@8.4.0_typescript@6.0.3/node_modules/@solana/addresses/dist/index.node.mjs
|
|
6844
|
-
var memoizedBase58Encoder2;
|
|
6845
|
-
var memoizedBase58Decoder2;
|
|
6846
|
-
function getMemoizedBase58Encoder2() {
|
|
6847
|
-
if (!memoizedBase58Encoder2) memoizedBase58Encoder2 = getBase58Encoder3();
|
|
6848
|
-
return memoizedBase58Encoder2;
|
|
6849
|
-
}
|
|
6850
|
-
function getMemoizedBase58Decoder2() {
|
|
6851
|
-
if (!memoizedBase58Decoder2) memoizedBase58Decoder2 = getBase58Decoder2();
|
|
6852
|
-
return memoizedBase58Decoder2;
|
|
6853
|
-
}
|
|
6854
|
-
function assertIsAddress2(putativeAddress) {
|
|
6855
|
-
if (
|
|
6856
|
-
// Lowest address (32 bytes of zeroes)
|
|
6857
|
-
putativeAddress.length < 32 || // Highest address (32 bytes of 255)
|
|
6858
|
-
putativeAddress.length > 44
|
|
6859
|
-
) {
|
|
6860
|
-
throw new SolanaError2(SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2, {
|
|
6861
|
-
actualLength: putativeAddress.length
|
|
6862
|
-
});
|
|
6863
|
-
}
|
|
6864
|
-
const base58Encoder = getMemoizedBase58Encoder2();
|
|
6865
|
-
const bytes = base58Encoder.encode(putativeAddress);
|
|
6866
|
-
const numBytes = bytes.byteLength;
|
|
6867
|
-
if (numBytes !== 32) {
|
|
6868
|
-
throw new SolanaError2(SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2, {
|
|
6869
|
-
actualLength: numBytes
|
|
6870
|
-
});
|
|
6871
|
-
}
|
|
6872
|
-
}
|
|
6873
|
-
function address2(putativeAddress) {
|
|
6874
|
-
assertIsAddress2(putativeAddress);
|
|
6875
|
-
return putativeAddress;
|
|
6876
|
-
}
|
|
6877
|
-
function getAddressEncoder2() {
|
|
6878
|
-
return transformEncoder2(
|
|
6879
|
-
fixEncoderSize2(getMemoizedBase58Encoder2(), 32),
|
|
6880
|
-
(putativeAddress) => address2(putativeAddress)
|
|
6881
|
-
);
|
|
6882
|
-
}
|
|
6883
|
-
function getAddressDecoder2() {
|
|
6884
|
-
return fixDecoderSize2(getMemoizedBase58Decoder2(), 32);
|
|
6885
|
-
}
|
|
6886
|
-
function getAddressCodec2() {
|
|
6887
|
-
return combineCodec2(getAddressEncoder2(), getAddressDecoder2());
|
|
6888
|
-
}
|
|
6889
|
-
var D2 = 37095705934669439343138083508754565189542113879843219016388785533085940283555n;
|
|
6890
|
-
var P2 = 57896044618658097711785492504343953926634992332820282019728792003956564819949n;
|
|
6891
|
-
var RM12 = 19681161376707505956807079304988542015446066515923890162744021073123829784752n;
|
|
6892
|
-
function mod2(a) {
|
|
6893
|
-
const r = a % P2;
|
|
6894
|
-
return r >= 0n ? r : P2 + r;
|
|
6895
|
-
}
|
|
6896
|
-
function pow22(x, power) {
|
|
6897
|
-
let r = x;
|
|
6898
|
-
while (power-- > 0n) {
|
|
6899
|
-
r *= r;
|
|
6900
|
-
r %= P2;
|
|
6901
|
-
}
|
|
6902
|
-
return r;
|
|
6903
|
-
}
|
|
6904
|
-
function pow_2_252_32(x) {
|
|
6905
|
-
const x2 = x * x % P2;
|
|
6906
|
-
const b2 = x2 * x % P2;
|
|
6907
|
-
const b4 = pow22(b2, 2n) * b2 % P2;
|
|
6908
|
-
const b5 = pow22(b4, 1n) * x % P2;
|
|
6909
|
-
const b10 = pow22(b5, 5n) * b5 % P2;
|
|
6910
|
-
const b20 = pow22(b10, 10n) * b10 % P2;
|
|
6911
|
-
const b40 = pow22(b20, 20n) * b20 % P2;
|
|
6912
|
-
const b80 = pow22(b40, 40n) * b40 % P2;
|
|
6913
|
-
const b160 = pow22(b80, 80n) * b80 % P2;
|
|
6914
|
-
const b240 = pow22(b160, 80n) * b80 % P2;
|
|
6915
|
-
const b250 = pow22(b240, 10n) * b10 % P2;
|
|
6916
|
-
const pow_p_5_8 = pow22(b250, 2n) * x % P2;
|
|
6917
|
-
return pow_p_5_8;
|
|
6918
|
-
}
|
|
6919
|
-
function uvRatio2(u, v) {
|
|
6920
|
-
const v3 = mod2(v * v * v);
|
|
6921
|
-
const v7 = mod2(v3 * v3 * v);
|
|
6922
|
-
const pow = pow_2_252_32(u * v7);
|
|
6923
|
-
let x = mod2(u * v3 * pow);
|
|
6924
|
-
const vx2 = mod2(v * x * x);
|
|
6925
|
-
const root1 = x;
|
|
6926
|
-
const root2 = mod2(x * RM12);
|
|
6927
|
-
const useRoot1 = vx2 === u;
|
|
6928
|
-
const useRoot2 = vx2 === mod2(-u);
|
|
6929
|
-
const noRoot = vx2 === mod2(-u * RM12);
|
|
6930
|
-
if (useRoot1) x = root1;
|
|
6931
|
-
if (useRoot2 || noRoot) x = root2;
|
|
6932
|
-
if ((mod2(x) & 1n) === 1n) x = mod2(-x);
|
|
6933
|
-
if (!useRoot1 && !useRoot2) {
|
|
6934
|
-
return null;
|
|
6935
|
-
}
|
|
6936
|
-
return x;
|
|
6937
|
-
}
|
|
6938
|
-
function pointIsOnCurve2(y, lastByte) {
|
|
6939
|
-
const y2 = mod2(y * y);
|
|
6940
|
-
const u = mod2(y2 - 1n);
|
|
6941
|
-
const v = mod2(D2 * y2 + 1n);
|
|
6942
|
-
const x = uvRatio2(u, v);
|
|
6943
|
-
if (x === null) {
|
|
6944
|
-
return false;
|
|
6945
|
-
}
|
|
6946
|
-
const isLastByteOdd = (lastByte & 128) !== 0;
|
|
6947
|
-
if (x === 0n && isLastByteOdd) {
|
|
6948
|
-
return false;
|
|
6949
|
-
}
|
|
6950
|
-
return true;
|
|
6951
|
-
}
|
|
6952
|
-
function byteToHex2(byte) {
|
|
6953
|
-
const hexString = byte.toString(16);
|
|
6954
|
-
if (hexString.length === 1) {
|
|
6955
|
-
return `0${hexString}`;
|
|
6956
|
-
} else {
|
|
6957
|
-
return hexString;
|
|
6958
|
-
}
|
|
6959
|
-
}
|
|
6960
|
-
function decompressPointBytes2(bytes) {
|
|
6961
|
-
const hexString = bytes.reduce((acc, byte, ii) => `${byteToHex2(ii === 31 ? byte & -129 : byte)}${acc}`, "");
|
|
6962
|
-
const integerLiteralString = `0x${hexString}`;
|
|
6963
|
-
return BigInt(integerLiteralString);
|
|
6964
|
-
}
|
|
6965
|
-
function compressedPointBytesAreOnCurve2(bytes) {
|
|
6966
|
-
if (bytes.byteLength !== 32) {
|
|
6967
|
-
return false;
|
|
6968
|
-
}
|
|
6969
|
-
const y = decompressPointBytes2(bytes);
|
|
6970
|
-
return pointIsOnCurve2(y, bytes[31]);
|
|
6971
|
-
}
|
|
6972
|
-
var MAX_SEED_LENGTH2 = 32;
|
|
6973
|
-
var MAX_SEEDS2 = 16;
|
|
6974
|
-
var PDA_MARKER_BYTES2 = [
|
|
6975
|
-
// The string 'ProgramDerivedAddress'
|
|
6976
|
-
80,
|
|
6977
|
-
114,
|
|
6978
|
-
111,
|
|
6979
|
-
103,
|
|
6980
|
-
114,
|
|
6981
|
-
97,
|
|
6982
|
-
109,
|
|
6983
|
-
68,
|
|
6984
|
-
101,
|
|
6985
|
-
114,
|
|
6986
|
-
105,
|
|
6987
|
-
118,
|
|
6988
|
-
101,
|
|
6989
|
-
100,
|
|
6990
|
-
65,
|
|
6991
|
-
100,
|
|
6992
|
-
100,
|
|
6993
|
-
114,
|
|
6994
|
-
101,
|
|
6995
|
-
115,
|
|
6996
|
-
115
|
|
6997
|
-
];
|
|
6998
|
-
async function createProgramDerivedAddress2({ programAddress, seeds }) {
|
|
6999
|
-
assertDigestCapabilityIsAvailable2();
|
|
7000
|
-
if (seeds.length > MAX_SEEDS2) {
|
|
7001
|
-
throw new SolanaError2(SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2, {
|
|
7002
|
-
actual: seeds.length,
|
|
7003
|
-
maxSeeds: MAX_SEEDS2
|
|
7004
|
-
});
|
|
7005
|
-
}
|
|
7006
|
-
let textEncoder;
|
|
7007
|
-
const seedBytes = seeds.reduce((acc, seed, ii) => {
|
|
7008
|
-
const bytes = typeof seed === "string" ? (textEncoder ||= new TextEncoder()).encode(seed) : seed;
|
|
7009
|
-
if (bytes.byteLength > MAX_SEED_LENGTH2) {
|
|
7010
|
-
throw new SolanaError2(SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2, {
|
|
7011
|
-
actual: bytes.byteLength,
|
|
7012
|
-
index: ii,
|
|
7013
|
-
maxSeedLength: MAX_SEED_LENGTH2
|
|
7014
|
-
});
|
|
7015
|
-
}
|
|
7016
|
-
acc.push(...bytes);
|
|
7017
|
-
return acc;
|
|
7018
|
-
}, []);
|
|
7019
|
-
const base58EncodedAddressCodec = getAddressCodec2();
|
|
7020
|
-
const programAddressBytes = base58EncodedAddressCodec.encode(programAddress);
|
|
7021
|
-
const addressBytesBuffer = await crypto.subtle.digest(
|
|
7022
|
-
"SHA-256",
|
|
7023
|
-
new Uint8Array([...seedBytes, ...programAddressBytes, ...PDA_MARKER_BYTES2])
|
|
7024
|
-
);
|
|
7025
|
-
const addressBytes = new Uint8Array(addressBytesBuffer);
|
|
7026
|
-
if (compressedPointBytesAreOnCurve2(addressBytes)) {
|
|
7027
|
-
throw new SolanaError2(SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2);
|
|
7028
|
-
}
|
|
7029
|
-
return base58EncodedAddressCodec.decode(addressBytes);
|
|
7030
|
-
}
|
|
7031
|
-
async function getProgramDerivedAddress2({
|
|
7032
|
-
programAddress,
|
|
7033
|
-
seeds
|
|
7034
|
-
}) {
|
|
7035
|
-
let bumpSeed = 255;
|
|
7036
|
-
while (bumpSeed > 0) {
|
|
7037
|
-
try {
|
|
7038
|
-
const address22 = await createProgramDerivedAddress2({
|
|
7039
|
-
programAddress,
|
|
7040
|
-
seeds: [...seeds, new Uint8Array([bumpSeed])]
|
|
7041
|
-
});
|
|
7042
|
-
return [address22, bumpSeed];
|
|
7043
|
-
} catch (e5) {
|
|
7044
|
-
if (isSolanaError2(e5, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2)) {
|
|
7045
|
-
bumpSeed--;
|
|
7046
|
-
} else {
|
|
7047
|
-
throw e5;
|
|
7048
|
-
}
|
|
7049
|
-
}
|
|
7050
|
-
}
|
|
7051
|
-
throw new SolanaError2(SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2);
|
|
7052
|
-
}
|
|
7053
|
-
|
|
7054
|
-
// ../../node_modules/.pnpm/@solana+codecs-numbers@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-numbers/dist/index.node.mjs
|
|
7055
|
-
function assertNumberIsBetweenForCodec2(codecDescription, min, max, value) {
|
|
7056
|
-
if (value < min || value > max) {
|
|
7057
|
-
throw new SolanaError2(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2, {
|
|
7058
|
-
codecDescription,
|
|
7059
|
-
max,
|
|
7060
|
-
min,
|
|
7061
|
-
value
|
|
7062
|
-
});
|
|
7063
|
-
}
|
|
7064
|
-
}
|
|
7065
|
-
function isLittleEndian2(config) {
|
|
7066
|
-
return config?.endian === 1 ? false : true;
|
|
7067
|
-
}
|
|
7068
|
-
function numberEncoderFactory2(input) {
|
|
7069
|
-
return createEncoder2({
|
|
7070
|
-
fixedSize: input.size,
|
|
7071
|
-
write(value, bytes, offset) {
|
|
7072
|
-
if (input.range) {
|
|
7073
|
-
assertNumberIsBetweenForCodec2(input.name, input.range[0], input.range[1], value);
|
|
7074
|
-
}
|
|
7075
|
-
const arrayBuffer = new ArrayBuffer(input.size);
|
|
7076
|
-
input.set(new DataView(arrayBuffer), value, isLittleEndian2(input.config));
|
|
7077
|
-
bytes.set(new Uint8Array(arrayBuffer), offset);
|
|
7078
|
-
return offset + input.size;
|
|
7079
|
-
}
|
|
7080
|
-
});
|
|
7081
|
-
}
|
|
7082
|
-
var getU64Encoder2 = (config = {}) => numberEncoderFactory2({
|
|
7083
|
-
config,
|
|
7084
|
-
name: "u64",
|
|
7085
|
-
range: [0n, BigInt("0xffffffffffffffff")],
|
|
7086
|
-
set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),
|
|
7087
|
-
size: 8
|
|
7088
|
-
});
|
|
7089
|
-
var getU8Encoder2 = () => numberEncoderFactory2({
|
|
7090
|
-
name: "u8",
|
|
7091
|
-
range: [0, Number("0xff")],
|
|
7092
|
-
set: (view, value) => view.setUint8(0, Number(value)),
|
|
7093
|
-
size: 1
|
|
7094
|
-
});
|
|
7095
|
-
|
|
7096
|
-
// ../../node_modules/.pnpm/@solana+codecs-data-structures@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-data-structures/dist/index.node.mjs
|
|
7097
|
-
function sumCodecSizes2(sizes) {
|
|
7098
|
-
return sizes.reduce((all, size) => all === null || size === null ? null : all + size, 0);
|
|
7099
|
-
}
|
|
7100
|
-
function getFixedSize2(codec) {
|
|
7101
|
-
return isFixedSize2(codec) ? codec.fixedSize : null;
|
|
7102
|
-
}
|
|
7103
|
-
function getMaxSize2(codec) {
|
|
7104
|
-
return isFixedSize2(codec) ? codec.fixedSize : codec.maxSize ?? null;
|
|
7105
|
-
}
|
|
7106
|
-
function getStructEncoder2(fields) {
|
|
7107
|
-
const fieldCodecs = fields.map(([, codec]) => codec);
|
|
7108
|
-
const fixedSize = sumCodecSizes2(fieldCodecs.map(getFixedSize2));
|
|
7109
|
-
const maxSize = sumCodecSizes2(fieldCodecs.map(getMaxSize2)) ?? void 0;
|
|
7110
|
-
return createEncoder2({
|
|
7111
|
-
...fixedSize === null ? {
|
|
7112
|
-
getSizeFromValue: (value) => fields.map(([key, codec]) => getEncodedSize2(value[key], codec)).reduce((all, one) => all + one, 0),
|
|
7113
|
-
maxSize
|
|
7114
|
-
} : { fixedSize },
|
|
7115
|
-
write: (struct, bytes, offset) => {
|
|
7116
|
-
fields.forEach(([key, codec]) => {
|
|
7117
|
-
offset = codec.write(struct[key], bytes, offset);
|
|
7118
|
-
});
|
|
7119
|
-
return offset;
|
|
7120
|
-
}
|
|
7121
|
-
});
|
|
7122
|
-
}
|
|
7123
|
-
|
|
7124
|
-
// ../../node_modules/.pnpm/@solana+instructions@8.4.0_typescript@6.0.3/node_modules/@solana/instructions/dist/index.node.mjs
|
|
7125
|
-
var AccountRole2 = /* @__PURE__ */ ((AccountRole22) => {
|
|
7126
|
-
AccountRole22[AccountRole22["WRITABLE_SIGNER"] = /* 3 */
|
|
7127
|
-
3] = "WRITABLE_SIGNER";
|
|
7128
|
-
AccountRole22[AccountRole22["READONLY_SIGNER"] = /* 2 */
|
|
7129
|
-
2] = "READONLY_SIGNER";
|
|
7130
|
-
AccountRole22[AccountRole22["WRITABLE"] = /* 1 */
|
|
7131
|
-
1] = "WRITABLE";
|
|
7132
|
-
AccountRole22[AccountRole22["READONLY"] = /* 0 */
|
|
7133
|
-
0] = "READONLY";
|
|
7134
|
-
return AccountRole22;
|
|
7135
|
-
})(AccountRole2 || {});
|
|
7136
|
-
var IS_SIGNER_BITMASK2 = 2;
|
|
7137
|
-
function upgradeRoleToSigner2(role) {
|
|
7138
|
-
return role | IS_SIGNER_BITMASK2;
|
|
7139
|
-
}
|
|
7140
|
-
|
|
7141
|
-
// ../../node_modules/.pnpm/@solana+signers@8.4.0_typescript@6.0.3/node_modules/@solana/signers/dist/index.node.mjs
|
|
7142
|
-
function isTransactionModifyingSigner2(value) {
|
|
7143
|
-
return "modifyAndSignTransactions" in value && typeof value.modifyAndSignTransactions === "function";
|
|
7144
|
-
}
|
|
7145
|
-
function isTransactionPartialSigner2(value) {
|
|
7146
|
-
return "signTransactions" in value && typeof value.signTransactions === "function";
|
|
7147
|
-
}
|
|
7148
|
-
function isTransactionSendingSigner2(value) {
|
|
7149
|
-
return "signAndSendTransactions" in value && typeof value.signAndSendTransactions === "function";
|
|
7150
|
-
}
|
|
7151
|
-
function isTransactionSigner2(value) {
|
|
7152
|
-
return isTransactionPartialSigner2(value) || isTransactionModifyingSigner2(value) || isTransactionSendingSigner2(value);
|
|
7153
|
-
}
|
|
7154
|
-
var o4 = globalThis.TextEncoder;
|
|
7155
|
-
|
|
7156
|
-
// ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@6.0.3/node_modules/@solana/program-client-core/dist/index.node.mjs
|
|
7157
|
-
function getNonNullResolvedInstructionInput(inputName, value) {
|
|
7158
|
-
if (value === null || value === void 0) {
|
|
7159
|
-
throw new SolanaError2(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2, {
|
|
7160
|
-
inputName
|
|
7161
|
-
});
|
|
7162
|
-
}
|
|
7163
|
-
return value;
|
|
7164
|
-
}
|
|
7165
|
-
function getAddressFromResolvedInstructionAccount(inputName, value) {
|
|
7166
|
-
const nonNullValue = getNonNullResolvedInstructionInput(inputName, value);
|
|
7167
|
-
if (typeof value === "object" && "address" in nonNullValue) {
|
|
7168
|
-
return nonNullValue.address;
|
|
7169
|
-
}
|
|
7170
|
-
if (Array.isArray(nonNullValue)) {
|
|
7171
|
-
return nonNullValue[0];
|
|
7172
|
-
}
|
|
7173
|
-
return nonNullValue;
|
|
7174
|
-
}
|
|
7175
|
-
function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
7176
|
-
return (inputName, account) => {
|
|
7177
|
-
if (!account.value) {
|
|
7178
|
-
if (optionalAccountStrategy === "omitted") return;
|
|
7179
|
-
return Object.freeze({ address: programAddress, role: AccountRole2.READONLY });
|
|
7180
|
-
}
|
|
7181
|
-
if (hasExplicitRole(account.value)) {
|
|
7182
|
-
return Object.freeze({
|
|
7183
|
-
address: account.value.address,
|
|
7184
|
-
role: account.value.role,
|
|
7185
|
-
..."signer" in account.value && account.value.signer ? { signer: account.value.signer } : {}
|
|
7186
|
-
});
|
|
7187
|
-
}
|
|
7188
|
-
const idlIsSigner = account.isSigner ?? "either";
|
|
7189
|
-
const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner(account.value);
|
|
7190
|
-
if (!isSigner && idlIsSigner === true) {
|
|
7191
|
-
throw new SolanaError2(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2, {
|
|
7192
|
-
inputName
|
|
7193
|
-
});
|
|
7194
|
-
}
|
|
7195
|
-
const writableRole = account.isWritable ? AccountRole2.WRITABLE : AccountRole2.READONLY;
|
|
7196
|
-
return Object.freeze({
|
|
7197
|
-
address: getAddressFromResolvedInstructionAccount(inputName, account.value),
|
|
7198
|
-
role: isSigner ? upgradeRoleToSigner2(writableRole) : writableRole,
|
|
7199
|
-
...isSigner ? { signer: account.value } : {}
|
|
7200
|
-
});
|
|
7201
|
-
};
|
|
7202
|
-
}
|
|
7203
|
-
function hasExplicitRole(value) {
|
|
7204
|
-
return typeof value === "object" && "role" in value && typeof value.role === "number";
|
|
7205
|
-
}
|
|
7206
|
-
function isResolvedInstructionAccountSigner(value) {
|
|
7207
|
-
return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner2(value);
|
|
7208
|
-
}
|
|
7209
|
-
|
|
7210
|
-
// ../../node_modules/.pnpm/@solana-program+token@0.17.0_@solana+kit@8.4.0/node_modules/@solana-program/token/dist/src/index.mjs
|
|
7211
|
-
async function findAssociatedTokenPda(seeds, config = {}) {
|
|
7212
|
-
const {
|
|
7213
|
-
programAddress = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
7214
|
-
} = config;
|
|
7215
|
-
return await getProgramDerivedAddress2({
|
|
7216
|
-
programAddress,
|
|
7217
|
-
seeds: [
|
|
7218
|
-
getAddressEncoder2().encode(seeds.owner),
|
|
7219
|
-
getAddressEncoder2().encode(seeds.tokenProgram),
|
|
7220
|
-
getAddressEncoder2().encode(seeds.mint)
|
|
7221
|
-
]
|
|
7222
|
-
});
|
|
7223
|
-
}
|
|
7224
|
-
var CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR = 1;
|
|
7225
|
-
function getCreateAssociatedTokenIdempotentInstructionDataEncoder() {
|
|
7226
|
-
return transformEncoder2(getStructEncoder2([["discriminator", getU8Encoder2()]]), (value) => ({
|
|
7227
|
-
...value,
|
|
7228
|
-
discriminator: CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR
|
|
7229
|
-
}));
|
|
7230
|
-
}
|
|
7231
|
-
function getCreateAssociatedTokenIdempotentInstruction(input, config) {
|
|
7232
|
-
const programAddress = config?.programAddress ?? ASSOCIATED_TOKEN_PROGRAM_ADDRESS;
|
|
7233
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7234
|
-
const originalAccounts = {
|
|
7235
|
-
payer: { value: input.payer ?? null, isSigner: true, isWritable: true },
|
|
7236
|
-
ata: { value: input.ata ?? null, isSigner: false, isWritable: true },
|
|
7237
|
-
owner: { value: input.owner ?? null, isSigner: false, isWritable: false },
|
|
7238
|
-
mint: { value: input.mint ?? null, isSigner: false, isWritable: false },
|
|
7239
|
-
systemProgram: { value: input.systemProgram ?? null, isSigner: false, isWritable: false },
|
|
7240
|
-
tokenProgram: { value: input.tokenProgram ?? null, isSigner: false, isWritable: false }
|
|
7241
|
-
};
|
|
7242
|
-
const accounts = originalAccounts;
|
|
7243
|
-
if (!accounts.tokenProgram.value) {
|
|
7244
|
-
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
5923
|
+
const accounts = originalAccounts;
|
|
5924
|
+
if (!accounts.tokenProgram.value) {
|
|
5925
|
+
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
7245
5926
|
}
|
|
7246
5927
|
if (!accounts.systemProgram.value) {
|
|
7247
5928
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
@@ -7261,11 +5942,11 @@ function getCreateAssociatedTokenIdempotentInstruction(input, config) {
|
|
|
7261
5942
|
}
|
|
7262
5943
|
var TRANSFER_CHECKED_DISCRIMINATOR = 12;
|
|
7263
5944
|
function getTransferCheckedInstructionDataEncoder() {
|
|
7264
|
-
return
|
|
7265
|
-
|
|
7266
|
-
["discriminator",
|
|
7267
|
-
["amount",
|
|
7268
|
-
["decimals",
|
|
5945
|
+
return transformEncoder(
|
|
5946
|
+
getStructEncoder([
|
|
5947
|
+
["discriminator", getU8Encoder()],
|
|
5948
|
+
["amount", getU64Encoder()],
|
|
5949
|
+
["decimals", getU8Encoder()]
|
|
7269
5950
|
]),
|
|
7270
5951
|
(value) => ({ ...value, discriminator: TRANSFER_CHECKED_DISCRIMINATOR })
|
|
7271
5952
|
);
|
|
@@ -7800,7 +6481,7 @@ var initCommand = new Command2("init").description(
|
|
|
7800
6481
|
return;
|
|
7801
6482
|
}
|
|
7802
6483
|
await ensureInitNetwork();
|
|
7803
|
-
const { privateKey, address:
|
|
6484
|
+
const { privateKey, address: address2 } = generateKeypair();
|
|
7804
6485
|
const solanaWallet = await generateSolanaKeypair();
|
|
7805
6486
|
const publicKey = deriveCompressedPublicKey(privateKey);
|
|
7806
6487
|
const legalBundle = LegalBundleSchema.parse(await apiGet("/api/legal/current"));
|
|
@@ -7808,11 +6489,11 @@ var initCommand = new Command2("init").description(
|
|
|
7808
6489
|
assumeYes: Boolean(opts.yes),
|
|
7809
6490
|
bundle: legalBundle,
|
|
7810
6491
|
signMessage: (message) => privateKeyToAccount(privateKey).signMessage({ message }),
|
|
7811
|
-
walletAddress:
|
|
6492
|
+
walletAddress: address2
|
|
7812
6493
|
}) : void 0;
|
|
7813
6494
|
const deviceRegisterSignature = await privateKeyToAccount(
|
|
7814
6495
|
privateKey
|
|
7815
|
-
).signMessage({ message: buildDeviceRegisterMessage(
|
|
6496
|
+
).signMessage({ message: buildDeviceRegisterMessage(address2) });
|
|
7816
6497
|
const {
|
|
7817
6498
|
deviceId,
|
|
7818
6499
|
apiToken,
|
|
@@ -7822,14 +6503,14 @@ var initCommand = new Command2("init").description(
|
|
|
7822
6503
|
legalReceipt: legalAcceptance?.receipt,
|
|
7823
6504
|
publicKey,
|
|
7824
6505
|
signature: deviceRegisterSignature,
|
|
7825
|
-
walletAddress:
|
|
6506
|
+
walletAddress: address2
|
|
7826
6507
|
});
|
|
7827
6508
|
const encryptedKey = encryptPrivateKey(deviceEncryptionKey, privateKey);
|
|
7828
6509
|
const createdTapKey = opts.tap ? storedTapKey(deviceEncryptionKey, null, generateTapKey(), /* @__PURE__ */ new Date(), "created") : void 0;
|
|
7829
6510
|
let agentId = initialAgentId;
|
|
7830
6511
|
const newKeystore = {
|
|
7831
6512
|
encryptedKey,
|
|
7832
|
-
walletAddress:
|
|
6513
|
+
walletAddress: address2,
|
|
7833
6514
|
deviceId,
|
|
7834
6515
|
apiToken,
|
|
7835
6516
|
agentId,
|
|
@@ -7856,7 +6537,7 @@ var initCommand = new Command2("init").description(
|
|
|
7856
6537
|
return;
|
|
7857
6538
|
}
|
|
7858
6539
|
if (!agentId) {
|
|
7859
|
-
agentId = await pollAgentId(
|
|
6540
|
+
agentId = await pollAgentId(address2);
|
|
7860
6541
|
if (agentId) {
|
|
7861
6542
|
const keystore = await loadKeystore();
|
|
7862
6543
|
await saveKeystore(
|
|
@@ -7882,7 +6563,7 @@ var initCommand = new Command2("init").description(
|
|
|
7882
6563
|
const tapKey = createdTapKey ? await tryEnrolTapKey(createdTapKey, selectedNetwork().chainId, warnings) : void 0;
|
|
7883
6564
|
printResult(
|
|
7884
6565
|
{
|
|
7885
|
-
address:
|
|
6566
|
+
address: address2,
|
|
7886
6567
|
agentId,
|
|
7887
6568
|
solanaAddress: solanaWallet.address,
|
|
7888
6569
|
network: chain?.networkName ?? networkInfo?.networkName,
|
|
@@ -7892,7 +6573,7 @@ var initCommand = new Command2("init").description(
|
|
|
7892
6573
|
emailAddress,
|
|
7893
6574
|
...tapKey ? { tapKey: tapKeySummary(tapKey) } : {}
|
|
7894
6575
|
},
|
|
7895
|
-
{ warnings, next: nextAfterInit({ address:
|
|
6576
|
+
{ warnings, next: nextAfterInit({ address: address2, chainId: selectedNetwork().chainId }) }
|
|
7896
6577
|
);
|
|
7897
6578
|
});
|
|
7898
6579
|
|
|
@@ -7926,22 +6607,22 @@ var startCommand = new Command3("start").description(
|
|
|
7926
6607
|
printError("No keystore found. Run `taskmarket init` first.");
|
|
7927
6608
|
return;
|
|
7928
6609
|
}
|
|
7929
|
-
const
|
|
6610
|
+
const address2 = auth.walletAddress;
|
|
7930
6611
|
const chainId = selectedNetwork().chainId;
|
|
7931
6612
|
const [balance, queue, withdrawal, open] = await Promise.all([
|
|
7932
6613
|
settle(
|
|
7933
6614
|
() => apiGet(
|
|
7934
|
-
`/api/wallet/balance?${new URLSearchParams({ address:
|
|
6615
|
+
`/api/wallet/balance?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
|
|
7935
6616
|
)
|
|
7936
6617
|
),
|
|
7937
6618
|
settle(
|
|
7938
|
-
() => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address:
|
|
6619
|
+
() => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address2, limit: "50" })}`, {
|
|
7939
6620
|
headers: auth.headers
|
|
7940
6621
|
})
|
|
7941
6622
|
),
|
|
7942
6623
|
settle(
|
|
7943
6624
|
() => apiGet(
|
|
7944
|
-
`/api/wallet/withdrawal-address?${new URLSearchParams({ address:
|
|
6625
|
+
`/api/wallet/withdrawal-address?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
|
|
7945
6626
|
)
|
|
7946
6627
|
),
|
|
7947
6628
|
settle(
|
|
@@ -7955,7 +6636,7 @@ var startCommand = new Command3("start").description(
|
|
|
7955
6636
|
const needsYou = queue ? queue.total : null;
|
|
7956
6637
|
printResult(
|
|
7957
6638
|
{
|
|
7958
|
-
address:
|
|
6639
|
+
address: address2,
|
|
7959
6640
|
network: selectedNetwork().name,
|
|
7960
6641
|
chainId,
|
|
7961
6642
|
balance: balance ? {
|
|
@@ -7980,7 +6661,7 @@ var startCommand = new Command3("start").description(
|
|
|
7980
6661
|
},
|
|
7981
6662
|
{
|
|
7982
6663
|
next: nextForHome({
|
|
7983
|
-
address:
|
|
6664
|
+
address: address2,
|
|
7984
6665
|
chainId,
|
|
7985
6666
|
balanceBaseUnits: balance?.balanceBaseUnits,
|
|
7986
6667
|
needsYou: needsYou ?? 0,
|
|
@@ -8349,6 +7030,26 @@ identityCommand.command("set-uri").description(
|
|
|
8349
7030
|
{ idempotencyKey }
|
|
8350
7031
|
);
|
|
8351
7032
|
});
|
|
7033
|
+
identityCommand.command("claim").description(
|
|
7034
|
+
"Take ownership of this wallet's ERC-8004 agent identity on the selected network when the platform still holds it (free; the platform sends the transfer)"
|
|
7035
|
+
).action(async () => {
|
|
7036
|
+
const keystore = await loadKeystore();
|
|
7037
|
+
const chainId = selectedNetwork().chainId;
|
|
7038
|
+
const { data, idempotencyKey } = await apiPost(
|
|
7039
|
+
`/api/devices/${encodeURIComponent(keystore.deviceId)}/identity/claim`,
|
|
7040
|
+
{ deviceId: keystore.deviceId, apiToken: keystore.apiToken, chainId }
|
|
7041
|
+
);
|
|
7042
|
+
printResult(
|
|
7043
|
+
{
|
|
7044
|
+
status: data.status,
|
|
7045
|
+
agentId: data.agentId,
|
|
7046
|
+
chainId: data.chainId,
|
|
7047
|
+
...data.intentId ? { intentId: data.intentId, paidBy: "platform" } : {},
|
|
7048
|
+
...data.owner ? { owner: data.owner } : {}
|
|
7049
|
+
},
|
|
7050
|
+
{ idempotencyKey }
|
|
7051
|
+
);
|
|
7052
|
+
});
|
|
8352
7053
|
identityCommand.command("status").description("Check identity registration status").action(async () => {
|
|
8353
7054
|
const keystore = await loadKeystore();
|
|
8354
7055
|
const result = await apiGet(
|
|
@@ -8359,9 +7060,9 @@ identityCommand.command("status").description("Check identity registration statu
|
|
|
8359
7060
|
identityCommand.command("feedback").description(
|
|
8360
7061
|
"Show the agent your requester feedback is bound to and the protocol reputation feedback values"
|
|
8361
7062
|
).option("--address <address>", "Wallet to read (defaults to this wallet)").action(async (options) => {
|
|
8362
|
-
const
|
|
7063
|
+
const address2 = options.address ?? (await loadKeystore()).walletAddress;
|
|
8363
7064
|
const result = await apiGet(
|
|
8364
|
-
`/api/identity/requester-feedback?address=${
|
|
7065
|
+
`/api/identity/requester-feedback?address=${address2}&chainId=${selectedNetwork().chainId}`
|
|
8365
7066
|
);
|
|
8366
7067
|
printResult(result);
|
|
8367
7068
|
});
|
|
@@ -8473,12 +7174,12 @@ async function platformView(opts) {
|
|
|
8473
7174
|
printResult(await apiGet(withChainId(`/api/stats/activity-heatmap?${query(input2)}`)));
|
|
8474
7175
|
return true;
|
|
8475
7176
|
}
|
|
8476
|
-
let
|
|
8477
|
-
if (!
|
|
8478
|
-
|
|
7177
|
+
let address2 = opts.address;
|
|
7178
|
+
if (!address2 && !opts.agent) {
|
|
7179
|
+
address2 = (await loadKeystore()).walletAddress;
|
|
8479
7180
|
}
|
|
8480
7181
|
const input = parseInput(AgentTimeSeriesInputSchema, {
|
|
8481
|
-
address: opts.agent ? void 0 :
|
|
7182
|
+
address: opts.agent ? void 0 : address2,
|
|
8482
7183
|
agentId: opts.agent,
|
|
8483
7184
|
range: opts.range,
|
|
8484
7185
|
bucket: opts.bucket
|
|
@@ -8493,20 +7194,20 @@ var statsCommand = new Command7("stats").description("View agent or platform-wid
|
|
|
8493
7194
|
renderFailure(err);
|
|
8494
7195
|
return;
|
|
8495
7196
|
}
|
|
8496
|
-
let
|
|
8497
|
-
if (!
|
|
7197
|
+
let address2 = opts.address;
|
|
7198
|
+
if (!address2) {
|
|
8498
7199
|
const keystore = await loadKeystore();
|
|
8499
|
-
|
|
7200
|
+
address2 = keystore.walletAddress;
|
|
8500
7201
|
}
|
|
8501
7202
|
const statsQuery = withChainId(
|
|
8502
|
-
opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${
|
|
7203
|
+
opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${address2}`
|
|
8503
7204
|
);
|
|
8504
7205
|
const [result, balanceResult, dreamsResult, exchangeRateResult] = await Promise.all([
|
|
8505
7206
|
apiGet(statsQuery),
|
|
8506
7207
|
apiGet(
|
|
8507
|
-
`/api/wallet/balance?address=${
|
|
7208
|
+
`/api/wallet/balance?address=${address2}&chainId=${selectedNetwork().chainId}`
|
|
8508
7209
|
),
|
|
8509
|
-
apiGet(withChainId(`/api/wallet/dreams-balance?address=${
|
|
7210
|
+
apiGet(withChainId(`/api/wallet/dreams-balance?address=${address2}`)).then(
|
|
8510
7211
|
(r) => r
|
|
8511
7212
|
).catch(() => null),
|
|
8512
7213
|
apiGet(withChainId("/api/wallet/exchange-rate")).then((r) => r).catch(() => null)
|
|
@@ -8632,11 +7333,11 @@ var statsCommand2 = new Command8("stats").description("Market totals and the act
|
|
|
8632
7333
|
renderFailure(err);
|
|
8633
7334
|
}
|
|
8634
7335
|
});
|
|
8635
|
-
var addressCommand2 = new Command8("address").description("One wallet on the selected --network: earnings, completed tasks, rating, events").argument("<address>", "wallet address (0x...)").option("--range <days>", `Window in days: ${RANGES.join(", ")} (default 30)`).action(async (
|
|
7336
|
+
var addressCommand2 = new Command8("address").description("One wallet on the selected --network: earnings, completed tasks, rating, events").argument("<address>", "wallet address (0x...)").option("--range <days>", `Window in days: ${RANGES.join(", ")} (default 30)`).action(async (address2, opts) => {
|
|
8636
7337
|
try {
|
|
8637
|
-
if (!ADDRESS_PATTERN.test(
|
|
7338
|
+
if (!ADDRESS_PATTERN.test(address2)) throw new Error("address must be a 0x wallet address");
|
|
8638
7339
|
const windowDays = parseRange(opts.range, "30");
|
|
8639
|
-
const wanted =
|
|
7340
|
+
const wanted = address2.toLowerCase();
|
|
8640
7341
|
const [snapshot, page] = await Promise.all([
|
|
8641
7342
|
apiGet(snapshotPath(windowDays, NODE_LIMIT)),
|
|
8642
7343
|
apiGet(
|
|
@@ -8672,8 +7373,8 @@ function directTarget(query4) {
|
|
|
8672
7373
|
return { type: "task", id, command: `taskmarket task get ${id}` };
|
|
8673
7374
|
}
|
|
8674
7375
|
if (ADDRESS_PATTERN2.test(query4)) {
|
|
8675
|
-
const
|
|
8676
|
-
return { type: "address", address:
|
|
7376
|
+
const address2 = query4.toLowerCase();
|
|
7377
|
+
return { type: "address", address: address2, command: `taskmarket explorer address ${address2}` };
|
|
8677
7378
|
}
|
|
8678
7379
|
return null;
|
|
8679
7380
|
}
|
|
@@ -9302,7 +8003,12 @@ async function x402Post(path10, body, options) {
|
|
|
9302
8003
|
return mppPost(path10, body, options);
|
|
9303
8004
|
const keystore = await loadKeystore();
|
|
9304
8005
|
const idempotencyKey = resolveIdempotencyKey(options?.idempotencyKey);
|
|
9305
|
-
const request = paidWriteRequest(
|
|
8006
|
+
const request = await paidWriteRequest(
|
|
8007
|
+
keystore,
|
|
8008
|
+
path10,
|
|
8009
|
+
withSelectedChain(path10, body),
|
|
8010
|
+
idempotencyKey
|
|
8011
|
+
);
|
|
9306
8012
|
Object.assign(request.headers, options?.headers ?? {});
|
|
9307
8013
|
return withIdempotentWrite(idempotencyKey, async () => {
|
|
9308
8014
|
const r1 = await fetch(request.url, {
|
|
@@ -9317,9 +8023,17 @@ async function x402Post(path10, body, options) {
|
|
|
9317
8023
|
});
|
|
9318
8024
|
if (r1.status !== 402) {
|
|
9319
8025
|
if (r1.ok) {
|
|
9320
|
-
|
|
8026
|
+
const data = await r1.json();
|
|
8027
|
+
await forgetPaidWriteBody(idempotencyKey);
|
|
8028
|
+
return { data, idempotencyKey };
|
|
8029
|
+
}
|
|
8030
|
+
const read4 = await readFailureBody(r1);
|
|
8031
|
+
const filled = await filledWriteOutcome(r1.status, read4, idempotencyKey);
|
|
8032
|
+
if (filled) {
|
|
8033
|
+
await forgetPaidWriteBody(idempotencyKey);
|
|
8034
|
+
return filled;
|
|
9321
8035
|
}
|
|
9322
|
-
throw refusedPaidWrite(path10, r1.status,
|
|
8036
|
+
throw refusedPaidWrite(path10, r1.status, read4, idempotencyKey);
|
|
9323
8037
|
}
|
|
9324
8038
|
const requirements = await r1.json();
|
|
9325
8039
|
const chain = taskmarketChain(selectedNetwork().chainId);
|
|
@@ -9350,12 +8064,21 @@ async function x402Post(path10, body, options) {
|
|
|
9350
8064
|
),
|
|
9351
8065
|
body: request.body
|
|
9352
8066
|
});
|
|
9353
|
-
if (r2.ok)
|
|
8067
|
+
if (r2.ok) {
|
|
8068
|
+
const data = await r2.json();
|
|
8069
|
+
await forgetPaidWriteBody(idempotencyKey);
|
|
8070
|
+
return { data, idempotencyKey };
|
|
8071
|
+
}
|
|
9354
8072
|
const read4 = await readFailureBody(r2);
|
|
9355
8073
|
if (r2.status === 503 && apiErrorEnvelopeOf(read4.body)?.reason === "facilitator_unavailable" && attempt < FACILITATOR_RETRIES) {
|
|
9356
8074
|
await sleep4(retryAfterMs(r2));
|
|
9357
8075
|
continue;
|
|
9358
8076
|
}
|
|
8077
|
+
const filledByKey = await filledWriteOutcome(r2.status, read4, idempotencyKey);
|
|
8078
|
+
if (filledByKey) {
|
|
8079
|
+
await forgetPaidWriteBody(idempotencyKey);
|
|
8080
|
+
return filledByKey;
|
|
8081
|
+
}
|
|
9359
8082
|
throw failedAfterPayment(path10, r2.status, read4, idempotencyKey);
|
|
9360
8083
|
}
|
|
9361
8084
|
});
|
|
@@ -9434,8 +8157,8 @@ function parseRequirementFilter(value, schema, flag) {
|
|
|
9434
8157
|
}
|
|
9435
8158
|
|
|
9436
8159
|
// src/lib/hook-registry.ts
|
|
9437
|
-
async function fetchHookRegistry(
|
|
9438
|
-
const query4 =
|
|
8160
|
+
async function fetchHookRegistry(address2) {
|
|
8161
|
+
const query4 = address2 ? `?address=${address2}` : "";
|
|
9439
8162
|
return await apiGet(withChainId(`/api/hooks/registry${query4}`));
|
|
9440
8163
|
}
|
|
9441
8164
|
async function describeHookListings(hooks, alwaysListed = [], known) {
|
|
@@ -9448,20 +8171,20 @@ async function describeHookListings(hooks, alwaysListed = [], known) {
|
|
|
9448
8171
|
return null;
|
|
9449
8172
|
}
|
|
9450
8173
|
const listed = new Map(registry.listed.map((entry) => [entry.address.toLowerCase(), entry]));
|
|
9451
|
-
const implicit = new Set(alwaysListed.map((
|
|
8174
|
+
const implicit = new Set(alwaysListed.map((address2) => address2.toLowerCase()));
|
|
9452
8175
|
const listings = [];
|
|
9453
8176
|
const warnings = [];
|
|
9454
8177
|
for (const raw of hooks) {
|
|
9455
|
-
const
|
|
9456
|
-
const entry = listed.get(
|
|
9457
|
-
const isListed = entry !== void 0 || implicit.has(
|
|
9458
|
-
listings.push({ address:
|
|
8178
|
+
const address2 = raw.toLowerCase();
|
|
8179
|
+
const entry = listed.get(address2);
|
|
8180
|
+
const isListed = entry !== void 0 || implicit.has(address2);
|
|
8181
|
+
listings.push({ address: address2, listed: isListed, name: entry?.name ?? null });
|
|
9459
8182
|
if (!isListed) {
|
|
9460
8183
|
warnings.push(
|
|
9461
8184
|
cliWarning(
|
|
9462
8185
|
"hook_unlisted",
|
|
9463
|
-
`Hook ${
|
|
9464
|
-
{ address:
|
|
8186
|
+
`Hook ${address2} is not listed in the hook registry for chain ${registry.chainId}. It was attached as given; run \`taskmarket hooks list\` for listed hooks.`,
|
|
8187
|
+
{ address: address2, chainId: registry.chainId }
|
|
9465
8188
|
)
|
|
9466
8189
|
);
|
|
9467
8190
|
}
|
|
@@ -10043,8 +8766,8 @@ var FILLED_FLAGS = [
|
|
|
10043
8766
|
["evaluationWindow", "--evaluation-window"],
|
|
10044
8767
|
["evaluatorStake", "--evaluator-stake"]
|
|
10045
8768
|
];
|
|
10046
|
-
async function fetchListedEvaluator(
|
|
10047
|
-
const wallet = parseInput(EthAddressSchema,
|
|
8769
|
+
async function fetchListedEvaluator(address2) {
|
|
8770
|
+
const wallet = parseInput(EthAddressSchema, address2);
|
|
10048
8771
|
const params = new URLSearchParams({
|
|
10049
8772
|
address: wallet,
|
|
10050
8773
|
limit: "1",
|
|
@@ -10064,13 +8787,13 @@ async function fetchListedEvaluator(address3) {
|
|
|
10064
8787
|
}
|
|
10065
8788
|
return entry;
|
|
10066
8789
|
}
|
|
10067
|
-
async function evaluatorFlagsFromListing(
|
|
8790
|
+
async function evaluatorFlagsFromListing(address2, opts) {
|
|
10068
8791
|
for (const [key, flag] of FILLED_FLAGS) {
|
|
10069
8792
|
if (opts[key] !== void 0) {
|
|
10070
8793
|
throw new Error(`--evaluator-from-listing fills ${flag} from the listing; leave it out`);
|
|
10071
8794
|
}
|
|
10072
8795
|
}
|
|
10073
|
-
const listing = await fetchListedEvaluator(
|
|
8796
|
+
const listing = await fetchListedEvaluator(address2);
|
|
10074
8797
|
const { feeBps, evaluationWindowHours, stakeUsd } = listing.service;
|
|
10075
8798
|
return {
|
|
10076
8799
|
listing,
|
|
@@ -10799,17 +9522,17 @@ async function runCreateTask(input, extra = {}) {
|
|
|
10799
9522
|
const hookConfigs = /* @__PURE__ */ new Map();
|
|
10800
9523
|
for (const raw of opts.hookConfig ?? []) {
|
|
10801
9524
|
const separator = raw.indexOf("=");
|
|
10802
|
-
const
|
|
10803
|
-
if (!ethAddrRe.test(
|
|
9525
|
+
const address2 = separator > 0 ? raw.slice(0, separator).trim() : "";
|
|
9526
|
+
if (!ethAddrRe.test(address2)) {
|
|
10804
9527
|
return void printError("--hook-config must be <address>=<config> with a valid hook address");
|
|
10805
9528
|
}
|
|
10806
|
-
if (!hooks.some((hook) => hook.toLowerCase() ===
|
|
10807
|
-
return void printError(`--hook-config names ${
|
|
9529
|
+
if (!hooks.some((hook) => hook.toLowerCase() === address2.toLowerCase())) {
|
|
9530
|
+
return void printError(`--hook-config names ${address2}, which is not attached with --hook`);
|
|
10808
9531
|
}
|
|
10809
|
-
if (hookConfigs.has(
|
|
10810
|
-
return void printError(`--hook-config is given twice for ${
|
|
9532
|
+
if (hookConfigs.has(address2.toLowerCase())) {
|
|
9533
|
+
return void printError(`--hook-config is given twice for ${address2}`);
|
|
10811
9534
|
}
|
|
10812
|
-
hookConfigs.set(
|
|
9535
|
+
hookConfigs.set(address2.toLowerCase(), raw.slice(separator + 1));
|
|
10813
9536
|
}
|
|
10814
9537
|
let hookRegistry = null;
|
|
10815
9538
|
const needsRegistry = Boolean(opts.gateDeadline) || gatesTargets.length > 0 || [...hookConfigs.values()].some((value) => !value.trim().startsWith("0x"));
|
|
@@ -11330,12 +10053,12 @@ async function confirmStakeTerms(action, taskId, yes) {
|
|
|
11330
10053
|
);
|
|
11331
10054
|
return false;
|
|
11332
10055
|
}
|
|
11333
|
-
async function confirmStakeAffordable(
|
|
10056
|
+
async function confirmStakeAffordable(address2, stake) {
|
|
11334
10057
|
if (stake <= 0n) return true;
|
|
11335
10058
|
let balance;
|
|
11336
10059
|
try {
|
|
11337
10060
|
const result = await apiGet(
|
|
11338
|
-
`/api/wallet/balance?address=${
|
|
10061
|
+
`/api/wallet/balance?address=${address2}&chainId=${selectedNetwork().chainId}`
|
|
11339
10062
|
);
|
|
11340
10063
|
if (typeof result?.balanceBaseUnits !== "string") return true;
|
|
11341
10064
|
balance = BigInt(result.balanceBaseUnits);
|
|
@@ -11650,7 +10373,6 @@ function announceCommands(spec) {
|
|
|
11650
10373
|
}
|
|
11651
10374
|
|
|
11652
10375
|
// src/lib/task-network.ts
|
|
11653
|
-
var WRONG_NETWORK_CODE = "wrong_network";
|
|
11654
10376
|
async function confirmTaskOnSelectedNetwork(taskId, task) {
|
|
11655
10377
|
let read4 = task;
|
|
11656
10378
|
if (read4 === void 0) {
|
|
@@ -11663,20 +10385,7 @@ async function confirmTaskOnSelectedNetwork(taskId, task) {
|
|
|
11663
10385
|
const taskChainId = read4?.chainId;
|
|
11664
10386
|
const network = selectedNetwork();
|
|
11665
10387
|
if (typeof taskChainId !== "number" || taskChainId === network.chainId) return true;
|
|
11666
|
-
|
|
11667
|
-
renderFailure(
|
|
11668
|
-
new Error(
|
|
11669
|
-
`This task is on ${taskNetwork ?? `chain ${taskChainId}`}, but the selected network is ${network.name}. Re-run with ${taskmarketCommandFor(taskChainId)}.`
|
|
11670
|
-
),
|
|
11671
|
-
{
|
|
11672
|
-
details: {
|
|
11673
|
-
code: WRONG_NETWORK_CODE,
|
|
11674
|
-
taskChainId,
|
|
11675
|
-
taskNetwork,
|
|
11676
|
-
selectedNetwork: network.name
|
|
11677
|
-
}
|
|
11678
|
-
}
|
|
11679
|
-
);
|
|
10388
|
+
renderFailure(new WrongNetworkError("This task", taskChainId));
|
|
11680
10389
|
return false;
|
|
11681
10390
|
}
|
|
11682
10391
|
|
|
@@ -12188,12 +10897,12 @@ var listCmd2 = new Command20("list").description(
|
|
|
12188
10897
|
if (tab === null) {
|
|
12189
10898
|
return void printError(`--tab must be one of: ${HIRE_TABS.join(", ")}`);
|
|
12190
10899
|
}
|
|
12191
|
-
const
|
|
10900
|
+
const address2 = opts.address ?? (await loadKeystore()).walletAddress;
|
|
12192
10901
|
const result = await listTasks(cliTaskReadContext(), {
|
|
12193
10902
|
status: "ALL",
|
|
12194
10903
|
hire: true,
|
|
12195
10904
|
// Offers to a worker are reserved hires; a requester's hires include quotes and requests.
|
|
12196
|
-
...opts.role === "worker" ? { hireKind: HireKind.enum.reserved, reservedWorker:
|
|
10905
|
+
...opts.role === "worker" ? { hireKind: HireKind.enum.reserved, reservedWorker: address2 } : { requester: address2 },
|
|
12197
10906
|
hireState: opts.state,
|
|
12198
10907
|
hireTab: tab,
|
|
12199
10908
|
hireServiceId: opts.service,
|
|
@@ -13022,7 +11731,7 @@ var updateCmd = new Command41("update").description(
|
|
|
13022
11731
|
Object.assign(body, requirements.fields);
|
|
13023
11732
|
const projectId = projectIdOf(task);
|
|
13024
11733
|
const increase = body.reward === void 0 || projectId === null ? 0n : BigInt(String(body.reward)) - BigInt(String(task.reward));
|
|
13025
|
-
const
|
|
11734
|
+
const outcome = await x402Post(
|
|
13026
11735
|
`/api/tasks/${taskId}/update`,
|
|
13027
11736
|
body,
|
|
13028
11737
|
// A reward increase is paid with the action fee, so the new reward bounds the extra. A
|
|
@@ -13031,6 +11740,8 @@ var updateCmd = new Command41("update").description(
|
|
|
13031
11740
|
maxAmount: body.reward === void 0 || projectId !== null ? ACTION_FEE_MAX_AMOUNT : (BigInt(ACTION_FEE_MAX_AMOUNT) + BigInt(String(body.reward))).toString()
|
|
13032
11741
|
}
|
|
13033
11742
|
);
|
|
11743
|
+
const result = { ...outcome.data, ...replayedFields(outcome) };
|
|
11744
|
+
const { idempotencyKey } = outcome;
|
|
13034
11745
|
printResult(
|
|
13035
11746
|
projectId !== null && increase > 0n ? { ...result, projectTopUp: projectTopUp(projectId, increase, "reward increase") } : result,
|
|
13036
11747
|
{ idempotencyKey }
|
|
@@ -13344,7 +12055,7 @@ var unlockCmd = new Command49("unlock").description("Unlock a private task with
|
|
|
13344
12055
|
|
|
13345
12056
|
// src/commands/task/invite.ts
|
|
13346
12057
|
import { Command as Command50 } from "commander";
|
|
13347
|
-
var inviteCmd = new Command50("invite").description("Invite a wallet to view a private task (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to invite").action(async (taskId,
|
|
12058
|
+
var inviteCmd = new Command50("invite").description("Invite a wallet to view a private task (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to invite").action(async (taskId, address2) => {
|
|
13348
12059
|
const auth = await signReadAuth();
|
|
13349
12060
|
if (!auth || Object.keys(auth.headers).length === 0) {
|
|
13350
12061
|
printError("No keystore found. Run `taskmarket init` first.");
|
|
@@ -13353,7 +12064,7 @@ var inviteCmd = new Command50("invite").description("Invite a wallet to view a p
|
|
|
13353
12064
|
try {
|
|
13354
12065
|
const { data: result, idempotencyKey } = await apiPost(
|
|
13355
12066
|
`/api/tasks/${taskId}/private-access/viewers`,
|
|
13356
|
-
{ taskId, viewerAddress:
|
|
12067
|
+
{ taskId, viewerAddress: address2 },
|
|
13357
12068
|
{ headers: auth.headers }
|
|
13358
12069
|
);
|
|
13359
12070
|
printResult(result, { idempotencyKey });
|
|
@@ -13364,7 +12075,7 @@ var inviteCmd = new Command50("invite").description("Invite a wallet to view a p
|
|
|
13364
12075
|
|
|
13365
12076
|
// src/commands/task/uninvite.ts
|
|
13366
12077
|
import { Command as Command51 } from "commander";
|
|
13367
|
-
var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a private task's allowlist (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to remove").action(async (taskId,
|
|
12078
|
+
var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a private task's allowlist (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to remove").action(async (taskId, address2) => {
|
|
13368
12079
|
const auth = await signReadAuth();
|
|
13369
12080
|
if (!auth || Object.keys(auth.headers).length === 0) {
|
|
13370
12081
|
printError("No keystore found. Run `taskmarket init` first.");
|
|
@@ -13372,7 +12083,7 @@ var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a
|
|
|
13372
12083
|
}
|
|
13373
12084
|
try {
|
|
13374
12085
|
const { data: result, idempotencyKey } = await apiDelete(
|
|
13375
|
-
`/api/tasks/${taskId}/private-access/viewers/${encodeURIComponent(
|
|
12086
|
+
`/api/tasks/${taskId}/private-access/viewers/${encodeURIComponent(address2)}`,
|
|
13376
12087
|
{ headers: auth.headers }
|
|
13377
12088
|
);
|
|
13378
12089
|
printResult(result, { idempotencyKey });
|
|
@@ -13785,7 +12496,7 @@ async function runAgentCommand(options) {
|
|
|
13785
12496
|
try {
|
|
13786
12497
|
const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
|
|
13787
12498
|
const pi = assertAgentCompatibility();
|
|
13788
|
-
const { runAgent } = await import("./launch-
|
|
12499
|
+
const { runAgent } = await import("./launch-K5666QYB.js");
|
|
13789
12500
|
result = await runAgent({
|
|
13790
12501
|
model: options.model,
|
|
13791
12502
|
pi,
|
|
@@ -13858,25 +12569,25 @@ function wholeNumber(flag, value) {
|
|
|
13858
12569
|
function hoursToSecs2(flag, value) {
|
|
13859
12570
|
return Math.round(positiveNumber(flag, value) * HOUR);
|
|
13860
12571
|
}
|
|
13861
|
-
async function fetchListing(
|
|
12572
|
+
async function fetchListing(address2) {
|
|
13862
12573
|
const auth = await signReadAuth();
|
|
13863
|
-
const result = await apiGet(`/api/agents/${
|
|
12574
|
+
const result = await apiGet(`/api/agents/${address2}/listing`, { headers: auth?.headers });
|
|
13864
12575
|
return AgentListingSchema.parse(result);
|
|
13865
12576
|
}
|
|
13866
|
-
async function fetchServiceRecords(
|
|
12577
|
+
async function fetchServiceRecords(address2, chainId) {
|
|
13867
12578
|
try {
|
|
13868
12579
|
const params = new URLSearchParams({ chainId: String(chainId) });
|
|
13869
12580
|
const parsed = AgentServiceRecordsResponseSchema.safeParse(
|
|
13870
|
-
await apiGet(`/api/agents/${
|
|
12581
|
+
await apiGet(`/api/agents/${address2}/hires/services?${params.toString()}`)
|
|
13871
12582
|
);
|
|
13872
12583
|
return parsed.success ? parsed.data : null;
|
|
13873
12584
|
} catch {
|
|
13874
12585
|
return null;
|
|
13875
12586
|
}
|
|
13876
12587
|
}
|
|
13877
|
-
async function fetchHireAvailability(
|
|
12588
|
+
async function fetchHireAvailability(address2) {
|
|
13878
12589
|
try {
|
|
13879
|
-
const params = new URLSearchParams({ worker:
|
|
12590
|
+
const params = new URLSearchParams({ worker: address2 });
|
|
13880
12591
|
const parsed = HireAvailabilitySchema.safeParse(
|
|
13881
12592
|
await apiGet(`/api/tasks/hire-availability?${params.toString()}`)
|
|
13882
12593
|
);
|
|
@@ -14168,9 +12879,9 @@ var availabilityCommand = new Command58("availability").description(
|
|
|
14168
12879
|
});
|
|
14169
12880
|
var listingCommand = new Command58("listing").description(
|
|
14170
12881
|
"Show your listing, or another worker's, with whether it is taking hires now and each service's track record on the selected --network"
|
|
14171
|
-
).argument("[address]", "Wallet address; your own when left out").action(async (
|
|
12882
|
+
).argument("[address]", "Wallet address; your own when left out").action(async (address2) => {
|
|
14172
12883
|
try {
|
|
14173
|
-
const listing =
|
|
12884
|
+
const listing = address2 ? await fetchListing(address2) : await ownListing();
|
|
14174
12885
|
const network = selectedNetworkOrUndefined();
|
|
14175
12886
|
const [records, hireAvailability] = await Promise.all([
|
|
14176
12887
|
network && listing.listed && listing.services.length > 0 ? fetchServiceRecords(listing.address, network.chainId) : null,
|
|
@@ -14219,13 +12930,13 @@ function agentManagementCommands() {
|
|
|
14219
12930
|
const status = new Command59("status").description(
|
|
14220
12931
|
"Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
|
|
14221
12932
|
).action(async () => {
|
|
14222
|
-
const { collectAgentStatus } = await import("./status-
|
|
12933
|
+
const { collectAgentStatus } = await import("./status-YKFKGTMQ.js");
|
|
14223
12934
|
await run(() => collectAgentStatus());
|
|
14224
12935
|
});
|
|
14225
12936
|
const doctor = new Command59("doctor").description(
|
|
14226
12937
|
"Check that the agent can start: Node and the bundled runtime, wallet and policy, channels, API, sandbox broker, host keys, xgate and RPC. Reads only."
|
|
14227
12938
|
).action(async () => {
|
|
14228
|
-
const { runDoctor } = await import("./doctor-
|
|
12939
|
+
const { runDoctor } = await import("./doctor-FACAMASV.js");
|
|
14229
12940
|
const report = await run(() => runDoctor());
|
|
14230
12941
|
if (report && !report.ok) process.exitCode = 1;
|
|
14231
12942
|
});
|
|
@@ -14236,7 +12947,7 @@ function agentManagementCommands() {
|
|
|
14236
12947
|
"Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
|
|
14237
12948
|
).action(
|
|
14238
12949
|
async (invocationId, options) => {
|
|
14239
|
-
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-
|
|
12950
|
+
const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-Q4MJXXR3.js");
|
|
14240
12951
|
const choice = { rail: options.rail, channel: options.channel };
|
|
14241
12952
|
if (invocationId !== void 0) {
|
|
14242
12953
|
await run(() => reconcileInvocation(invocationId, { choice }));
|
|
@@ -14268,7 +12979,7 @@ function agentManagementCommands() {
|
|
|
14268
12979
|
`Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
|
|
14269
12980
|
);
|
|
14270
12981
|
}
|
|
14271
|
-
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-
|
|
12982
|
+
const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-4YOMV7R7.js");
|
|
14272
12983
|
const { rails } = await openAgentChannels();
|
|
14273
12984
|
const result = await requestTopUp(selectRail(rails, options.rail), amount2);
|
|
14274
12985
|
return {
|
|
@@ -14288,8 +12999,8 @@ function agentManagementCommands() {
|
|
|
14288
12999
|
await run(async () => {
|
|
14289
13000
|
await requireExperimental();
|
|
14290
13001
|
const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
|
|
14291
|
-
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-
|
|
14292
|
-
const { reconcileLeasedPurchase } = await import("./reconcile-
|
|
13002
|
+
const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-4YOMV7R7.js");
|
|
13003
|
+
const { reconcileLeasedPurchase } = await import("./reconcile-Q4MJXXR3.js");
|
|
14293
13004
|
const opened = await openAgentChannels();
|
|
14294
13005
|
const { rail, retired } = selectChannel(opened, options);
|
|
14295
13006
|
const result = await closeChannel(
|
|
@@ -14343,7 +13054,7 @@ function agentManagementCommands() {
|
|
|
14343
13054
|
async (options) => {
|
|
14344
13055
|
await run(async () => {
|
|
14345
13056
|
await requireExperimental();
|
|
14346
|
-
const { runPull } = await import("./sync-pull-
|
|
13057
|
+
const { runPull } = await import("./sync-pull-AN2M344W.js");
|
|
14347
13058
|
const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
|
|
14348
13059
|
return runPull(options, {
|
|
14349
13060
|
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
|
|
@@ -14500,10 +13211,10 @@ agentsCommand.command("get").description(
|
|
|
14500
13211
|
).argument("<address>", "Wallet address of the worker").option("--all-chains", "List the worker's records on every served chain").option(
|
|
14501
13212
|
"--hires",
|
|
14502
13213
|
"Add the worker's hire record, each listed service's record (serviceRecords) and the workers it hired (see `taskmarket agents hires`)"
|
|
14503
|
-
).action(async (
|
|
13214
|
+
).action(async (address2, opts) => {
|
|
14504
13215
|
let wallet;
|
|
14505
13216
|
try {
|
|
14506
|
-
wallet = parseInput(EthAddressSchema,
|
|
13217
|
+
wallet = parseInput(EthAddressSchema, address2);
|
|
14507
13218
|
} catch (err) {
|
|
14508
13219
|
renderFailure(err);
|
|
14509
13220
|
return;
|
|
@@ -14578,9 +13289,9 @@ agentsCommand.command("hires").description(
|
|
|
14578
13289
|
"--role <role>",
|
|
14579
13290
|
`${AGENT_HIRES_ROLES.join(" (hires of this wallet) or ")} (hires this wallet made)`,
|
|
14580
13291
|
"worker"
|
|
14581
|
-
).option("--limit <n>", "Maximum public hires to list (1 to 50)", "20").option("--offset <n>", "Public hires to skip", "0").action(async (
|
|
13292
|
+
).option("--limit <n>", "Maximum public hires to list (1 to 50)", "20").option("--offset <n>", "Public hires to skip", "0").action(async (address2, opts) => {
|
|
14582
13293
|
try {
|
|
14583
|
-
const wallet = parseInput(EthAddressSchema,
|
|
13294
|
+
const wallet = parseInput(EthAddressSchema, address2);
|
|
14584
13295
|
const role = parseInput(AgentHiresRoleSchema, opts.role);
|
|
14585
13296
|
const limit = parseInput(AgentHiresInputSchema.shape.limit, Number(opts.limit));
|
|
14586
13297
|
const offset = parseInput(AgentHiresInputSchema.shape.offset, Number(opts.offset));
|
|
@@ -14633,12 +13344,12 @@ agentsCommand.command("specialties").description("List the specialties workers a
|
|
|
14633
13344
|
renderFailure(err);
|
|
14634
13345
|
}
|
|
14635
13346
|
});
|
|
14636
|
-
agentsCommand.command("report").description("Report a worker's listing, or one of its services, to Taskmarket staff").argument("<address>", "Wallet address of the reported worker").requiredOption("--reason <reason>", `One of: ${AGENT_LISTING_REPORT_REASONS.join(", ")}`).option("--service <serviceId>", "Report this service only").option("--note <text>", "What is wrong, for staff").action(async (
|
|
13347
|
+
agentsCommand.command("report").description("Report a worker's listing, or one of its services, to Taskmarket staff").argument("<address>", "Wallet address of the reported worker").requiredOption("--reason <reason>", `One of: ${AGENT_LISTING_REPORT_REASONS.join(", ")}`).option("--service <serviceId>", "Report this service only").option("--note <text>", "What is wrong, for staff").action(async (address2, opts) => {
|
|
14637
13348
|
try {
|
|
14638
13349
|
const auth = await signReadAuth();
|
|
14639
13350
|
const signedIn = auth !== null && Object.keys(auth.headers).length > 0;
|
|
14640
13351
|
const body = parseInput(AgentListingReportInputSchema, {
|
|
14641
|
-
listingAddress:
|
|
13352
|
+
listingAddress: address2,
|
|
14642
13353
|
...signedIn ? { walletAddress: auth.walletAddress } : {},
|
|
14643
13354
|
...opts.service ? { serviceId: opts.service } : {},
|
|
14644
13355
|
reason: opts.reason,
|
|
@@ -14859,23 +13570,23 @@ var dashboardCommand = new Command62("dashboard").description(
|
|
|
14859
13570
|
printError("No keystore found. Run `taskmarket init` first.");
|
|
14860
13571
|
return;
|
|
14861
13572
|
}
|
|
14862
|
-
const
|
|
13573
|
+
const address2 = auth.walletAddress;
|
|
14863
13574
|
const chainId = selectedNetwork().chainId;
|
|
14864
13575
|
const headers = auth.headers;
|
|
14865
13576
|
const owner = new URLSearchParams({
|
|
14866
|
-
owner:
|
|
13577
|
+
owner: address2,
|
|
14867
13578
|
status: "all",
|
|
14868
13579
|
limit: String(AUTOMATIONS_READ_LIMIT)
|
|
14869
13580
|
});
|
|
14870
13581
|
const [queue, inbox, workflows, schedules, projects, balance, activity] = await Promise.all([
|
|
14871
13582
|
settle2(
|
|
14872
|
-
() => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address:
|
|
13583
|
+
() => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address2, limit: "50" })}`, {
|
|
14873
13584
|
headers
|
|
14874
13585
|
})
|
|
14875
13586
|
),
|
|
14876
13587
|
settle2(
|
|
14877
13588
|
() => apiGet(
|
|
14878
|
-
`/api/agents/inbox?${new URLSearchParams({ address:
|
|
13589
|
+
`/api/agents/inbox?${new URLSearchParams({ address: address2, sort: "attention", limit: String(DASHBOARD_TASK_LIMIT) })}`,
|
|
14879
13590
|
{ headers }
|
|
14880
13591
|
)
|
|
14881
13592
|
),
|
|
@@ -14888,13 +13599,13 @@ var dashboardCommand = new Command62("dashboard").description(
|
|
|
14888
13599
|
settle2(
|
|
14889
13600
|
() => apiGet(
|
|
14890
13601
|
withChainId(
|
|
14891
|
-
`/api/projects?${new URLSearchParams({ address:
|
|
13602
|
+
`/api/projects?${new URLSearchParams({ address: address2, role: "owner", status: "open", limit: String(PROJECTS_READ_LIMIT) })}`
|
|
14892
13603
|
)
|
|
14893
13604
|
)
|
|
14894
13605
|
),
|
|
14895
13606
|
settle2(
|
|
14896
13607
|
() => apiGet(
|
|
14897
|
-
`/api/wallet/balance?${new URLSearchParams({ address:
|
|
13608
|
+
`/api/wallet/balance?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
|
|
14898
13609
|
)
|
|
14899
13610
|
),
|
|
14900
13611
|
settle2(
|
|
@@ -14926,7 +13637,7 @@ var dashboardCommand = new Command62("dashboard").description(
|
|
|
14926
13637
|
});
|
|
14927
13638
|
printResult(
|
|
14928
13639
|
withChainNames({
|
|
14929
|
-
address:
|
|
13640
|
+
address: address2,
|
|
14930
13641
|
chainId,
|
|
14931
13642
|
generatedAt: new Date(nowMs).toISOString(),
|
|
14932
13643
|
needsYou,
|
|
@@ -14959,7 +13670,7 @@ var dashboardCommand = new Command62("dashboard").description(
|
|
|
14959
13670
|
}),
|
|
14960
13671
|
{
|
|
14961
13672
|
next: nextForHome({
|
|
14962
|
-
address:
|
|
13673
|
+
address: address2,
|
|
14963
13674
|
chainId,
|
|
14964
13675
|
balanceBaseUnits: balance.value?.balanceBaseUnits,
|
|
14965
13676
|
needsYou: needsYou.total,
|
|
@@ -15041,12 +13752,12 @@ var inboxCommand = new Command63("inbox").description(
|
|
|
15041
13752
|
}
|
|
15042
13753
|
return;
|
|
15043
13754
|
}
|
|
15044
|
-
const
|
|
13755
|
+
const address2 = auth.walletAddress;
|
|
15045
13756
|
const hasReadAuth = Object.keys(auth.headers).length > 0;
|
|
15046
|
-
const inboxParams = new URLSearchParams({ address:
|
|
13757
|
+
const inboxParams = new URLSearchParams({ address: address2 });
|
|
15047
13758
|
if (opts.tasksSort) inboxParams.set("sort", opts.tasksSort);
|
|
15048
13759
|
if (tasksLimit !== void 0) inboxParams.set("limit", String(tasksLimit));
|
|
15049
|
-
const actionParams = new URLSearchParams({ address:
|
|
13760
|
+
const actionParams = new URLSearchParams({ address: address2, limit: String(page.limit) });
|
|
15050
13761
|
if (page.cursor) actionParams.set("cursor", page.cursor);
|
|
15051
13762
|
if (opts.actionsOnly) {
|
|
15052
13763
|
try {
|
|
@@ -15063,7 +13774,7 @@ var inboxCommand = new Command63("inbox").description(
|
|
|
15063
13774
|
return;
|
|
15064
13775
|
}
|
|
15065
13776
|
const ownerParams = new URLSearchParams({
|
|
15066
|
-
owner:
|
|
13777
|
+
owner: address2,
|
|
15067
13778
|
status: "needs_action",
|
|
15068
13779
|
limit: "20"
|
|
15069
13780
|
});
|
|
@@ -15203,9 +13914,9 @@ var depositCommand = new Command64("deposit").description(
|
|
|
15203
13914
|
"--relay-route <routeId>",
|
|
15204
13915
|
"Request a Relay deposit address for this wallet on an offered route (see fundingOptions.relayRoutes)"
|
|
15205
13916
|
).option("--amount <amount>", "Amount of the route origin stablecoin to send, for --relay-route").action(async (opts) => {
|
|
15206
|
-
let
|
|
13917
|
+
let address2;
|
|
15207
13918
|
try {
|
|
15208
|
-
|
|
13919
|
+
address2 = await getWalletAddress();
|
|
15209
13920
|
} catch (err) {
|
|
15210
13921
|
renderFailure(err, { fallback: "No keystore found. Run `taskmarket init` first." });
|
|
15211
13922
|
return;
|
|
@@ -15234,7 +13945,7 @@ var depositCommand = new Command64("deposit").description(
|
|
|
15234
13945
|
const chainId = chain.chainId;
|
|
15235
13946
|
const tokenAddress = chain.tokenAddress;
|
|
15236
13947
|
const data = {
|
|
15237
|
-
address:
|
|
13948
|
+
address: address2,
|
|
15238
13949
|
network: chain.networkName,
|
|
15239
13950
|
chainId,
|
|
15240
13951
|
currency: paymentTokenSymbol(chainId),
|
|
@@ -15249,13 +13960,13 @@ var depositCommand = new Command64("deposit").description(
|
|
|
15249
13960
|
return;
|
|
15250
13961
|
}
|
|
15251
13962
|
const balance = await apiGet(
|
|
15252
|
-
`/api/wallet/balance?address=${
|
|
13963
|
+
`/api/wallet/balance?address=${address2}&chainId=${chainId}`
|
|
15253
13964
|
).catch(() => null);
|
|
15254
13965
|
printResult(
|
|
15255
13966
|
{ ...data, fundingOptions },
|
|
15256
13967
|
{
|
|
15257
13968
|
next: nextForBalance({
|
|
15258
|
-
address:
|
|
13969
|
+
address: address2,
|
|
15259
13970
|
chainId,
|
|
15260
13971
|
balanceBaseUnits: balance?.balanceBaseUnits
|
|
15261
13972
|
})
|
|
@@ -15280,7 +13991,7 @@ var depositCommand = new Command64("deposit").description(
|
|
|
15280
13991
|
if (BigInt(amountBaseUnits) <= 0n) throw new Error("Enter a valid amount.");
|
|
15281
13992
|
const deposit = await requestRelayBridgeDepositAddress({
|
|
15282
13993
|
routeId,
|
|
15283
|
-
recipient:
|
|
13994
|
+
recipient: address2,
|
|
15284
13995
|
amountBaseUnits
|
|
15285
13996
|
});
|
|
15286
13997
|
const route = RELAY_BRIDGE_ROUTES[routeId];
|
|
@@ -15290,7 +14001,7 @@ var depositCommand = new Command64("deposit").description(
|
|
|
15290
14001
|
routeId,
|
|
15291
14002
|
...deposit,
|
|
15292
14003
|
send: `${opts.amount} ${route.origin.symbol} on ${route.origin.chainName} to ${deposit.depositAddress}`,
|
|
15293
|
-
credits: `${route.destination.symbol} on ${route.destination.chainName} to ${
|
|
14004
|
+
credits: `${route.destination.symbol} on ${route.destination.chainName} to ${address2}`
|
|
15294
14005
|
}
|
|
15295
14006
|
});
|
|
15296
14007
|
} catch (err) {
|
|
@@ -15303,10 +14014,10 @@ import { Command as Command75 } from "commander";
|
|
|
15303
14014
|
|
|
15304
14015
|
// src/commands/wallet/balance.ts
|
|
15305
14016
|
import { Command as Command65 } from "commander";
|
|
15306
|
-
function balancePath(
|
|
15307
|
-
return `/api/wallet/balance?address=${
|
|
14017
|
+
function balancePath(address2, chainId) {
|
|
14018
|
+
return `/api/wallet/balance?address=${address2}&chainId=${chainId}`;
|
|
15308
14019
|
}
|
|
15309
|
-
async function allChainBalances(
|
|
14020
|
+
async function allChainBalances(address2) {
|
|
15310
14021
|
const raw = await apiGet("/trpc/network.info");
|
|
15311
14022
|
const info = NetworkInfoSchema.safeParse(raw?.result?.data);
|
|
15312
14023
|
if (!info.success) {
|
|
@@ -15322,7 +14033,7 @@ async function allChainBalances(address3) {
|
|
|
15322
14033
|
tokenSymbol: chain.tokenSymbol
|
|
15323
14034
|
};
|
|
15324
14035
|
try {
|
|
15325
|
-
const result = await apiGet(balancePath(
|
|
14036
|
+
const result = await apiGet(balancePath(address2, chain.chainId));
|
|
15326
14037
|
return {
|
|
15327
14038
|
...base,
|
|
15328
14039
|
tokenSymbol: result.tokenSymbol ?? chain.tokenSymbol,
|
|
@@ -15334,7 +14045,7 @@ async function allChainBalances(address3) {
|
|
|
15334
14045
|
}
|
|
15335
14046
|
})
|
|
15336
14047
|
);
|
|
15337
|
-
return { address:
|
|
14048
|
+
return { address: address2, chains };
|
|
15338
14049
|
}
|
|
15339
14050
|
var walletBalanceCommand = new Command65("balance").description("Show the wallet's payment-token balance on the selected network").option("--address <addr>", "Address to check (defaults to own wallet)").option(
|
|
15340
14051
|
"--all-chains",
|
|
@@ -15355,26 +14066,26 @@ var walletBalanceCommand = new Command65("balance").description("Show the wallet
|
|
|
15355
14066
|
printResult(await readSolanaBalances(createRpc2(connection), connection, owner));
|
|
15356
14067
|
return;
|
|
15357
14068
|
}
|
|
15358
|
-
let
|
|
15359
|
-
const ownWallet = !
|
|
15360
|
-
if (!
|
|
14069
|
+
let address2 = opts.address;
|
|
14070
|
+
const ownWallet = !address2;
|
|
14071
|
+
if (!address2) {
|
|
15361
14072
|
const keystore = await loadKeystore();
|
|
15362
|
-
|
|
14073
|
+
address2 = keystore.walletAddress;
|
|
15363
14074
|
}
|
|
15364
14075
|
if (opts.allChains) {
|
|
15365
14076
|
try {
|
|
15366
|
-
printResult(await allChainBalances(
|
|
14077
|
+
printResult(await allChainBalances(address2));
|
|
15367
14078
|
} catch (err) {
|
|
15368
14079
|
renderFailure(err, { fallback: "Failed to fetch network info from backend." });
|
|
15369
14080
|
}
|
|
15370
14081
|
return;
|
|
15371
14082
|
}
|
|
15372
14083
|
const chainId = selectedNetwork().chainId;
|
|
15373
|
-
const result = await apiGet(balancePath(
|
|
14084
|
+
const result = await apiGet(balancePath(address2, chainId));
|
|
15374
14085
|
printResult(
|
|
15375
14086
|
result,
|
|
15376
14087
|
ownWallet ? {
|
|
15377
|
-
next: nextForBalance({ address:
|
|
14088
|
+
next: nextForBalance({ address: address2, chainId, balanceBaseUnits: result.balanceBaseUnits })
|
|
15378
14089
|
} : void 0
|
|
15379
14090
|
);
|
|
15380
14091
|
}
|
|
@@ -15492,17 +14203,17 @@ var walletImportCommand = new Command66("import").description("Import an existin
|
|
|
15492
14203
|
}
|
|
15493
14204
|
const privateKey = normalizePrivateKey(rawKey);
|
|
15494
14205
|
const account = privateKeyToAccount2(privateKey);
|
|
15495
|
-
const
|
|
14206
|
+
const address2 = account.address;
|
|
15496
14207
|
const publicKey = deriveCompressedPublicKey(privateKey);
|
|
15497
14208
|
const legalBundle = LegalBundleSchema.parse(await apiGet("/api/legal/current"));
|
|
15498
14209
|
const legalAcceptance = legalBundle.enforcementEnabled ? await acceptLegalBundle({
|
|
15499
14210
|
assumeYes: Boolean(opts.yes),
|
|
15500
14211
|
bundle: legalBundle,
|
|
15501
14212
|
signMessage: (message) => account.signMessage({ message }),
|
|
15502
|
-
walletAddress:
|
|
14213
|
+
walletAddress: address2
|
|
15503
14214
|
}) : void 0;
|
|
15504
14215
|
const deviceRegisterSignature = await account.signMessage({
|
|
15505
|
-
message: buildDeviceRegisterMessage(
|
|
14216
|
+
message: buildDeviceRegisterMessage(address2)
|
|
15506
14217
|
});
|
|
15507
14218
|
const {
|
|
15508
14219
|
deviceId,
|
|
@@ -15513,13 +14224,13 @@ var walletImportCommand = new Command66("import").description("Import an existin
|
|
|
15513
14224
|
legalReceipt: legalAcceptance?.receipt,
|
|
15514
14225
|
publicKey,
|
|
15515
14226
|
signature: deviceRegisterSignature,
|
|
15516
|
-
walletAddress:
|
|
14227
|
+
walletAddress: address2
|
|
15517
14228
|
});
|
|
15518
14229
|
const encryptedKey = encryptPrivateKey(deviceEncryptionKey, privateKey);
|
|
15519
14230
|
let agentId = initialAgentId;
|
|
15520
14231
|
await saveKeystore({
|
|
15521
14232
|
encryptedKey,
|
|
15522
|
-
walletAddress:
|
|
14233
|
+
walletAddress: address2,
|
|
15523
14234
|
deviceId,
|
|
15524
14235
|
apiToken,
|
|
15525
14236
|
agentId,
|
|
@@ -15533,7 +14244,7 @@ var walletImportCommand = new Command66("import").description("Import an existin
|
|
|
15533
14244
|
} : {}
|
|
15534
14245
|
});
|
|
15535
14246
|
if (!agentId) {
|
|
15536
|
-
agentId = await pollAgentId(
|
|
14247
|
+
agentId = await pollAgentId(address2);
|
|
15537
14248
|
if (agentId) {
|
|
15538
14249
|
const keystore = await loadKeystore();
|
|
15539
14250
|
await saveKeystore(
|
|
@@ -15541,7 +14252,7 @@ var walletImportCommand = new Command66("import").description("Import an existin
|
|
|
15541
14252
|
);
|
|
15542
14253
|
}
|
|
15543
14254
|
}
|
|
15544
|
-
printResult({ address:
|
|
14255
|
+
printResult({ address: address2, agentId }, { warnings: argvKeyWarnings(keySource) });
|
|
15545
14256
|
});
|
|
15546
14257
|
|
|
15547
14258
|
// src/commands/wallet/set-withdrawal-address.ts
|
|
@@ -15563,19 +14274,19 @@ var WithdrawalAddressMismatchError = class extends Error {
|
|
|
15563
14274
|
function pinnedWithdrawalAddress(keystore, chainId) {
|
|
15564
14275
|
return keystore.withdrawalAddresses?.[String(chainId)] ?? keystore.withdrawalAddress;
|
|
15565
14276
|
}
|
|
15566
|
-
async function pinWithdrawalAddress(keystore, chainId,
|
|
14277
|
+
async function pinWithdrawalAddress(keystore, chainId, address2) {
|
|
15567
14278
|
await saveKeystore({
|
|
15568
14279
|
...keystore,
|
|
15569
|
-
withdrawalAddresses: { ...keystore.withdrawalAddresses, [String(chainId)]:
|
|
14280
|
+
withdrawalAddresses: { ...keystore.withdrawalAddresses, [String(chainId)]: address2 }
|
|
15570
14281
|
});
|
|
15571
14282
|
}
|
|
15572
14283
|
function serverChainMismatch(requested, answered) {
|
|
15573
14284
|
if (answered === void 0 || answered === requested) return void 0;
|
|
15574
14285
|
return `Refusing to continue: the server answered for chain ${answered}, but this CLI asked for chain ${requested}. Nothing was pinned.`;
|
|
15575
14286
|
}
|
|
15576
|
-
async function fetchWithdrawalAddress(
|
|
14287
|
+
async function fetchWithdrawalAddress(address2, chainId) {
|
|
15577
14288
|
const response = await apiGet(
|
|
15578
|
-
`/api/wallet/withdrawal-address?address=${
|
|
14289
|
+
`/api/wallet/withdrawal-address?address=${address2}&chainId=${chainId}`
|
|
15579
14290
|
);
|
|
15580
14291
|
const mismatch = serverChainMismatch(chainId, response.chainId);
|
|
15581
14292
|
if (mismatch) throw new Error(mismatch);
|
|
@@ -15625,8 +14336,8 @@ function isValidAddress(addr) {
|
|
|
15625
14336
|
}
|
|
15626
14337
|
var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").description(
|
|
15627
14338
|
"Set the withdrawal address for payment-token withdrawals on the selected network (once per chain, free)"
|
|
15628
|
-
).argument("<address>", "Ethereum address to receive withdrawals").action(async (
|
|
15629
|
-
if (!isValidAddress(
|
|
14339
|
+
).argument("<address>", "Ethereum address to receive withdrawals").action(async (address2) => {
|
|
14340
|
+
if (!isValidAddress(address2)) {
|
|
15630
14341
|
printError("Invalid Ethereum address: must be 0x followed by 40 hex characters");
|
|
15631
14342
|
return;
|
|
15632
14343
|
}
|
|
@@ -15643,7 +14354,7 @@ var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").descri
|
|
|
15643
14354
|
const expiresAt = Math.floor(Date.now() / 1e3) + SIGNATURE_TTL_SECONDS;
|
|
15644
14355
|
const message = buildSetWithdrawalAddressMessage({
|
|
15645
14356
|
walletAddress,
|
|
15646
|
-
withdrawalAddress:
|
|
14357
|
+
withdrawalAddress: address2,
|
|
15647
14358
|
chainId,
|
|
15648
14359
|
nonce,
|
|
15649
14360
|
expiresAt
|
|
@@ -15651,7 +14362,7 @@ var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").descri
|
|
|
15651
14362
|
const signature = await signMessage(message, keystore);
|
|
15652
14363
|
const { data: result, idempotencyKey } = await apiPost("/api/wallet/set-withdrawal-address", {
|
|
15653
14364
|
walletAddress,
|
|
15654
|
-
withdrawalAddress:
|
|
14365
|
+
withdrawalAddress: address2,
|
|
15655
14366
|
signature,
|
|
15656
14367
|
nonce,
|
|
15657
14368
|
expiresAt,
|
|
@@ -15688,14 +14399,14 @@ import { Command as Command68 } from "commander";
|
|
|
15688
14399
|
var getWithdrawalAddressCommand = new Command68("get-withdrawal-address").description(
|
|
15689
14400
|
"Show the withdrawal address registered on the selected network, if any (the address is per chain)"
|
|
15690
14401
|
).option("--address <addr>", "Wallet address to check (defaults to own wallet)").action(async (opts) => {
|
|
15691
|
-
let
|
|
15692
|
-
if (!
|
|
14402
|
+
let address2 = opts.address;
|
|
14403
|
+
if (!address2) {
|
|
15693
14404
|
const keystore = await loadKeystore();
|
|
15694
|
-
|
|
14405
|
+
address2 = keystore.walletAddress;
|
|
15695
14406
|
}
|
|
15696
14407
|
const { chainId } = selectedNetwork();
|
|
15697
14408
|
const result = await apiGet(
|
|
15698
|
-
`/api/wallet/withdrawal-address?address=${
|
|
14409
|
+
`/api/wallet/withdrawal-address?address=${address2}&chainId=${chainId}`
|
|
15699
14410
|
);
|
|
15700
14411
|
printResult({ ...result, chainId: result.chainId ?? chainId });
|
|
15701
14412
|
});
|
|
@@ -15805,12 +14516,12 @@ var revealRecoveryCodeCommand = new Command71("reveal-recovery-code").descriptio
|
|
|
15805
14516
|
printError("No keystore found. Run `taskmarket init` first.");
|
|
15806
14517
|
return;
|
|
15807
14518
|
}
|
|
15808
|
-
const
|
|
14519
|
+
const address2 = keystore.walletAddress;
|
|
15809
14520
|
const { chainId } = selectedNetwork();
|
|
15810
|
-
const message = buildRevealAccountRecoveryCodeMessage(
|
|
14521
|
+
const message = buildRevealAccountRecoveryCodeMessage(address2, chainId);
|
|
15811
14522
|
const signature = await signMessage(message, keystore);
|
|
15812
14523
|
const { data: result, idempotencyKey } = await apiPost("/api/wallet/reveal-backfilled-recovery-code", {
|
|
15813
|
-
address:
|
|
14524
|
+
address: address2,
|
|
15814
14525
|
signature,
|
|
15815
14526
|
chainId
|
|
15816
14527
|
});
|
|
@@ -16650,8 +15361,8 @@ function cachedInboxLookup(lookup, options = {}) {
|
|
|
16650
15361
|
const now = options.now ?? Date.now;
|
|
16651
15362
|
const maxEntries = options.maxEntries ?? 5e3;
|
|
16652
15363
|
const cache = /* @__PURE__ */ new Map();
|
|
16653
|
-
return async (
|
|
16654
|
-
const key =
|
|
15364
|
+
return async (address2) => {
|
|
15365
|
+
const key = address2.toLowerCase();
|
|
16655
15366
|
const cached = cache.get(key);
|
|
16656
15367
|
if (cached && cached.expiresAt > now()) {
|
|
16657
15368
|
return cached.inboxId;
|
|
@@ -16987,12 +15698,12 @@ function devConversationId(a, b) {
|
|
|
16987
15698
|
function createFileBus(dir) {
|
|
16988
15699
|
fs7.mkdirSync(dir, { recursive: true });
|
|
16989
15700
|
const logPath = (inboxId) => path4.join(dir, `inbox-${inboxId}.jsonl`);
|
|
16990
|
-
const addressPath = (
|
|
15701
|
+
const addressPath = (address2) => path4.join(dir, `address-${address2.toLowerCase()}`);
|
|
16991
15702
|
return {
|
|
16992
|
-
register: (
|
|
16993
|
-
lookup: (
|
|
15703
|
+
register: (address2, inboxId) => fs7.writeFileSync(addressPath(address2), inboxId),
|
|
15704
|
+
lookup: (address2) => {
|
|
16994
15705
|
try {
|
|
16995
|
-
return fs7.readFileSync(addressPath(
|
|
15706
|
+
return fs7.readFileSync(addressPath(address2), "utf8").trim() || null;
|
|
16996
15707
|
} catch {
|
|
16997
15708
|
return null;
|
|
16998
15709
|
}
|
|
@@ -17033,8 +15744,8 @@ async function createDevClient(input) {
|
|
|
17033
15744
|
inboxId,
|
|
17034
15745
|
installationId,
|
|
17035
15746
|
dbPath,
|
|
17036
|
-
async inboxIdForAddress(
|
|
17037
|
-
return devInboxByAddress.get(
|
|
15747
|
+
async inboxIdForAddress(address2) {
|
|
15748
|
+
return devInboxByAddress.get(address2.toLowerCase()) ?? fileBus?.lookup(address2) ?? null;
|
|
17038
15749
|
},
|
|
17039
15750
|
async sendMessage(toInboxId, body) {
|
|
17040
15751
|
const message = {
|
|
@@ -17557,7 +16268,7 @@ async function createProductionClient(input, env) {
|
|
|
17557
16268
|
}
|
|
17558
16269
|
const installationId = extractString(client, ["installationId", "installationID"]) ?? extractString(asObject(client)?.installation, ["id", "installationId"]) ?? input.existingInstallationId ?? randomUUID3();
|
|
17559
16270
|
const cursor = loadXmtpCursor(xmtpCursorPath(defaultXmtpDbDir(), input.walletAddress));
|
|
17560
|
-
const inboxIdForAddress = cachedInboxLookup(async (
|
|
16271
|
+
const inboxIdForAddress = cachedInboxLookup(async (address2) => {
|
|
17561
16272
|
const lookup = asObject(client)?.fetchInboxIdByIdentifier;
|
|
17562
16273
|
if (typeof lookup !== "function") {
|
|
17563
16274
|
throw new XmtpTransportError(
|
|
@@ -17566,7 +16277,7 @@ async function createProductionClient(input, env) {
|
|
|
17566
16277
|
);
|
|
17567
16278
|
}
|
|
17568
16279
|
const resolved = await withRetry(
|
|
17569
|
-
() => lookup.call(client, { identifier:
|
|
16280
|
+
() => lookup.call(client, { identifier: address2, identifierKind: 0 }),
|
|
17570
16281
|
parseRetryAttempts()
|
|
17571
16282
|
);
|
|
17572
16283
|
return resolved ?? null;
|
|
@@ -17740,24 +16451,24 @@ async function createXmtpClient(input) {
|
|
|
17740
16451
|
return createProductionClient(input, env);
|
|
17741
16452
|
}
|
|
17742
16453
|
var networkInboxLookups = /* @__PURE__ */ new Map();
|
|
17743
|
-
async function lookupInboxIdOnNetwork(
|
|
16454
|
+
async function lookupInboxIdOnNetwork(address2) {
|
|
17744
16455
|
const env = resolveXmtpEnv();
|
|
17745
16456
|
let lookup = networkInboxLookups.get(env);
|
|
17746
16457
|
if (!lookup) {
|
|
17747
16458
|
lookup = env === "memory" ? memoryInboxLookup() : sdkNetworkInboxLookup(env);
|
|
17748
16459
|
networkInboxLookups.set(env, lookup);
|
|
17749
16460
|
}
|
|
17750
|
-
return lookup(
|
|
16461
|
+
return lookup(address2);
|
|
17751
16462
|
}
|
|
17752
16463
|
function memoryInboxLookup() {
|
|
17753
|
-
return async (
|
|
16464
|
+
return async (address2) => {
|
|
17754
16465
|
const busDir = process.env.TASKMARKET_XMTP_MEMORY_DIR?.trim();
|
|
17755
|
-
return devInboxByAddress.get(
|
|
16466
|
+
return devInboxByAddress.get(address2.toLowerCase()) ?? (busDir ? createFileBus(busDir).lookup(address2) : null);
|
|
17756
16467
|
};
|
|
17757
16468
|
}
|
|
17758
16469
|
function sdkNetworkInboxLookup(env) {
|
|
17759
16470
|
let backend;
|
|
17760
|
-
return cachedInboxLookup(async (
|
|
16471
|
+
return cachedInboxLookup(async (address2) => {
|
|
17761
16472
|
assertXmtpSupported();
|
|
17762
16473
|
const sdkModule = asObject(
|
|
17763
16474
|
await import("@xmtp/node-sdk").catch((error) => {
|
|
@@ -17781,7 +16492,7 @@ function sdkNetworkInboxLookup(env) {
|
|
|
17781
16492
|
backend ??= createBackend({ env });
|
|
17782
16493
|
try {
|
|
17783
16494
|
return await getInboxIdForIdentifier(await backend, {
|
|
17784
|
-
identifier:
|
|
16495
|
+
identifier: address2,
|
|
17785
16496
|
identifierKind: 0
|
|
17786
16497
|
});
|
|
17787
16498
|
} catch (error) {
|
|
@@ -18078,7 +16789,7 @@ async function resolvePeerRuleInboxId(to, inboxIdOnNetwork = lookupInboxIdOnNetw
|
|
|
18078
16789
|
if (isRawInboxId(to)) {
|
|
18079
16790
|
return to;
|
|
18080
16791
|
}
|
|
18081
|
-
let
|
|
16792
|
+
let address2 = to;
|
|
18082
16793
|
if (!isAddress3(to)) {
|
|
18083
16794
|
const result = await apiGet(
|
|
18084
16795
|
`/api/xmtp/resolve?agentId=${encodeURIComponent(to)}&chainId=${selectedNetwork().chainId}`
|
|
@@ -18086,11 +16797,11 @@ async function resolvePeerRuleInboxId(to, inboxIdOnNetwork = lookupInboxIdOnNetw
|
|
|
18086
16797
|
if (!result.address) {
|
|
18087
16798
|
throw new Error(`No XMTP inbox found for agent "${to}"`);
|
|
18088
16799
|
}
|
|
18089
|
-
|
|
16800
|
+
address2 = result.address;
|
|
18090
16801
|
}
|
|
18091
|
-
const inboxId = await inboxIdOnNetwork(
|
|
16802
|
+
const inboxId = await inboxIdOnNetwork(address2);
|
|
18092
16803
|
if (!inboxId) {
|
|
18093
|
-
throw new Error(`No XMTP inbox found on the XMTP network for address ${
|
|
16804
|
+
throw new Error(`No XMTP inbox found on the XMTP network for address ${address2}`);
|
|
18094
16805
|
}
|
|
18095
16806
|
return inboxId;
|
|
18096
16807
|
}
|
|
@@ -19648,8 +18359,8 @@ var VERIFIED_SENDER_VALUES = ["pass", "platform"];
|
|
|
19648
18359
|
function isVerifiedSender(senderVerification) {
|
|
19649
18360
|
return senderVerification != null && VERIFIED_SENDER_VALUES.includes(senderVerification);
|
|
19650
18361
|
}
|
|
19651
|
-
function domainOf(
|
|
19652
|
-
return
|
|
18362
|
+
function domainOf(address2) {
|
|
18363
|
+
return address2.slice(address2.lastIndexOf("@") + 1).trim().toLowerCase();
|
|
19653
18364
|
}
|
|
19654
18365
|
function replyNeedsVerifiedSender(original) {
|
|
19655
18366
|
if (isVerifiedSender(original.senderVerification)) return false;
|
|
@@ -20749,12 +19460,12 @@ import { Command as Command107 } from "commander";
|
|
|
20749
19460
|
|
|
20750
19461
|
// src/commands/requester/stats.ts
|
|
20751
19462
|
import { Command as Command106 } from "commander";
|
|
20752
|
-
var requesterStatsCmd = new Command106("stats").description("Get requester reputation stats for an address").argument("<address>", "Wallet address of the requester").action(async (
|
|
20753
|
-
if (!/^0x[0-9a-fA-F]{40}$/.test(
|
|
19463
|
+
var requesterStatsCmd = new Command106("stats").description("Get requester reputation stats for an address").argument("<address>", "Wallet address of the requester").action(async (address2) => {
|
|
19464
|
+
if (!/^0x[0-9a-fA-F]{40}$/.test(address2)) {
|
|
20754
19465
|
printError("Address must be a 0x-prefixed 20-byte hex string");
|
|
20755
19466
|
return;
|
|
20756
19467
|
}
|
|
20757
|
-
const data = await apiGet(`/api/requester/${
|
|
19468
|
+
const data = await apiGet(`/api/requester/${address2}/stats`);
|
|
20758
19469
|
if (!data) {
|
|
20759
19470
|
printError("No stats found for address");
|
|
20760
19471
|
return;
|
|
@@ -21027,6 +19738,19 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21027
19738
|
],
|
|
21028
19739
|
"stateMutability": "view"
|
|
21029
19740
|
},
|
|
19741
|
+
{
|
|
19742
|
+
"type": "function",
|
|
19743
|
+
"name": "CONFIGURE_MANAGER_FOR_CHAIN_TYPEHASH",
|
|
19744
|
+
"inputs": [],
|
|
19745
|
+
"outputs": [
|
|
19746
|
+
{
|
|
19747
|
+
"name": "",
|
|
19748
|
+
"type": "bytes32",
|
|
19749
|
+
"internalType": "bytes32"
|
|
19750
|
+
}
|
|
19751
|
+
],
|
|
19752
|
+
"stateMutability": "view"
|
|
19753
|
+
},
|
|
21030
19754
|
{
|
|
21031
19755
|
"type": "function",
|
|
21032
19756
|
"name": "CONFIGURE_MANAGER_TYPEHASH",
|
|
@@ -21438,29 +20162,90 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21438
20162
|
"internalType": "bytes32"
|
|
21439
20163
|
},
|
|
21440
20164
|
{
|
|
21441
|
-
"name": "index",
|
|
20165
|
+
"name": "index",
|
|
20166
|
+
"type": "uint256",
|
|
20167
|
+
"internalType": "uint256"
|
|
20168
|
+
},
|
|
20169
|
+
{
|
|
20170
|
+
"name": "worker",
|
|
20171
|
+
"type": "address",
|
|
20172
|
+
"internalType": "address"
|
|
20173
|
+
},
|
|
20174
|
+
{
|
|
20175
|
+
"name": "destination",
|
|
20176
|
+
"type": "address",
|
|
20177
|
+
"internalType": "address"
|
|
20178
|
+
},
|
|
20179
|
+
{
|
|
20180
|
+
"name": "amount",
|
|
20181
|
+
"type": "uint256",
|
|
20182
|
+
"internalType": "uint256"
|
|
20183
|
+
},
|
|
20184
|
+
{
|
|
20185
|
+
"name": "nonce",
|
|
20186
|
+
"type": "uint256",
|
|
20187
|
+
"internalType": "uint256"
|
|
20188
|
+
},
|
|
20189
|
+
{
|
|
20190
|
+
"name": "deadline",
|
|
20191
|
+
"type": "uint256",
|
|
20192
|
+
"internalType": "uint256"
|
|
20193
|
+
},
|
|
20194
|
+
{
|
|
20195
|
+
"name": "signature",
|
|
20196
|
+
"type": "bytes",
|
|
20197
|
+
"internalType": "bytes"
|
|
20198
|
+
},
|
|
20199
|
+
{
|
|
20200
|
+
"name": "proof",
|
|
20201
|
+
"type": "bytes32[]",
|
|
20202
|
+
"internalType": "bytes32[]"
|
|
20203
|
+
}
|
|
20204
|
+
],
|
|
20205
|
+
"outputs": [],
|
|
20206
|
+
"stateMutability": "nonpayable"
|
|
20207
|
+
},
|
|
20208
|
+
{
|
|
20209
|
+
"type": "function",
|
|
20210
|
+
"name": "configureManager",
|
|
20211
|
+
"inputs": [
|
|
20212
|
+
{
|
|
20213
|
+
"name": "manager",
|
|
20214
|
+
"type": "address",
|
|
20215
|
+
"internalType": "address"
|
|
20216
|
+
},
|
|
20217
|
+
{
|
|
20218
|
+
"name": "newCap",
|
|
21442
20219
|
"type": "uint256",
|
|
21443
20220
|
"internalType": "uint256"
|
|
21444
20221
|
},
|
|
21445
20222
|
{
|
|
21446
|
-
"name": "
|
|
21447
|
-
"type": "
|
|
21448
|
-
"internalType": "
|
|
21449
|
-
}
|
|
20223
|
+
"name": "active",
|
|
20224
|
+
"type": "bool",
|
|
20225
|
+
"internalType": "bool"
|
|
20226
|
+
}
|
|
20227
|
+
],
|
|
20228
|
+
"outputs": [],
|
|
20229
|
+
"stateMutability": "nonpayable"
|
|
20230
|
+
},
|
|
20231
|
+
{
|
|
20232
|
+
"type": "function",
|
|
20233
|
+
"name": "configureManagerBySig",
|
|
20234
|
+
"inputs": [
|
|
21450
20235
|
{
|
|
21451
|
-
"name": "
|
|
20236
|
+
"name": "manager",
|
|
21452
20237
|
"type": "address",
|
|
21453
20238
|
"internalType": "address"
|
|
21454
20239
|
},
|
|
21455
20240
|
{
|
|
21456
|
-
"name": "
|
|
20241
|
+
"name": "newCap",
|
|
21457
20242
|
"type": "uint256",
|
|
21458
20243
|
"internalType": "uint256"
|
|
21459
20244
|
},
|
|
21460
20245
|
{
|
|
21461
|
-
"name": "
|
|
21462
|
-
"type": "
|
|
21463
|
-
"internalType": "
|
|
20246
|
+
"name": "active",
|
|
20247
|
+
"type": "bool",
|
|
20248
|
+
"internalType": "bool"
|
|
21464
20249
|
},
|
|
21465
20250
|
{
|
|
21466
20251
|
"name": "deadline",
|
|
@@ -21471,11 +20256,6 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21471
20256
|
"name": "signature",
|
|
21472
20257
|
"type": "bytes",
|
|
21473
20258
|
"internalType": "bytes"
|
|
21474
|
-
},
|
|
21475
|
-
{
|
|
21476
|
-
"name": "proof",
|
|
21477
|
-
"type": "bytes32[]",
|
|
21478
|
-
"internalType": "bytes32[]"
|
|
21479
20259
|
}
|
|
21480
20260
|
],
|
|
21481
20261
|
"outputs": [],
|
|
@@ -21483,8 +20263,13 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21483
20263
|
},
|
|
21484
20264
|
{
|
|
21485
20265
|
"type": "function",
|
|
21486
|
-
"name": "
|
|
20266
|
+
"name": "configureManagerForChain",
|
|
21487
20267
|
"inputs": [
|
|
20268
|
+
{
|
|
20269
|
+
"name": "taskChainId",
|
|
20270
|
+
"type": "uint256",
|
|
20271
|
+
"internalType": "uint256"
|
|
20272
|
+
},
|
|
21488
20273
|
{
|
|
21489
20274
|
"name": "manager",
|
|
21490
20275
|
"type": "address",
|
|
@@ -21506,8 +20291,13 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21506
20291
|
},
|
|
21507
20292
|
{
|
|
21508
20293
|
"type": "function",
|
|
21509
|
-
"name": "
|
|
20294
|
+
"name": "configureManagerForChainBySig",
|
|
21510
20295
|
"inputs": [
|
|
20296
|
+
{
|
|
20297
|
+
"name": "taskChainId",
|
|
20298
|
+
"type": "uint256",
|
|
20299
|
+
"internalType": "uint256"
|
|
20300
|
+
},
|
|
21511
20301
|
{
|
|
21512
20302
|
"name": "manager",
|
|
21513
20303
|
"type": "address",
|
|
@@ -21884,6 +20674,52 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21884
20674
|
],
|
|
21885
20675
|
"stateMutability": "view"
|
|
21886
20676
|
},
|
|
20677
|
+
{
|
|
20678
|
+
"type": "function",
|
|
20679
|
+
"name": "managerAccountForChain",
|
|
20680
|
+
"inputs": [
|
|
20681
|
+
{
|
|
20682
|
+
"name": "taskChainId",
|
|
20683
|
+
"type": "uint256",
|
|
20684
|
+
"internalType": "uint256"
|
|
20685
|
+
},
|
|
20686
|
+
{
|
|
20687
|
+
"name": "manager",
|
|
20688
|
+
"type": "address",
|
|
20689
|
+
"internalType": "address"
|
|
20690
|
+
}
|
|
20691
|
+
],
|
|
20692
|
+
"outputs": [
|
|
20693
|
+
{
|
|
20694
|
+
"name": "account",
|
|
20695
|
+
"type": "tuple",
|
|
20696
|
+
"internalType": "struct SponsoredTaskTypes.ManagerAccount",
|
|
20697
|
+
"components": [
|
|
20698
|
+
{
|
|
20699
|
+
"name": "cap",
|
|
20700
|
+
"type": "uint256",
|
|
20701
|
+
"internalType": "uint256"
|
|
20702
|
+
},
|
|
20703
|
+
{
|
|
20704
|
+
"name": "reserved",
|
|
20705
|
+
"type": "uint256",
|
|
20706
|
+
"internalType": "uint256"
|
|
20707
|
+
},
|
|
20708
|
+
{
|
|
20709
|
+
"name": "spent",
|
|
20710
|
+
"type": "uint256",
|
|
20711
|
+
"internalType": "uint256"
|
|
20712
|
+
},
|
|
20713
|
+
{
|
|
20714
|
+
"name": "active",
|
|
20715
|
+
"type": "bool",
|
|
20716
|
+
"internalType": "bool"
|
|
20717
|
+
}
|
|
20718
|
+
]
|
|
20719
|
+
}
|
|
20720
|
+
],
|
|
20721
|
+
"stateMutability": "view"
|
|
20722
|
+
},
|
|
21887
20723
|
{
|
|
21888
20724
|
"type": "function",
|
|
21889
20725
|
"name": "managerRemaining",
|
|
@@ -21903,6 +20739,30 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
21903
20739
|
],
|
|
21904
20740
|
"stateMutability": "view"
|
|
21905
20741
|
},
|
|
20742
|
+
{
|
|
20743
|
+
"type": "function",
|
|
20744
|
+
"name": "managerRemainingForChain",
|
|
20745
|
+
"inputs": [
|
|
20746
|
+
{
|
|
20747
|
+
"name": "taskChainId",
|
|
20748
|
+
"type": "uint256",
|
|
20749
|
+
"internalType": "uint256"
|
|
20750
|
+
},
|
|
20751
|
+
{
|
|
20752
|
+
"name": "manager",
|
|
20753
|
+
"type": "address",
|
|
20754
|
+
"internalType": "address"
|
|
20755
|
+
}
|
|
20756
|
+
],
|
|
20757
|
+
"outputs": [
|
|
20758
|
+
{
|
|
20759
|
+
"name": "",
|
|
20760
|
+
"type": "uint256",
|
|
20761
|
+
"internalType": "uint256"
|
|
20762
|
+
}
|
|
20763
|
+
],
|
|
20764
|
+
"stateMutability": "view"
|
|
20765
|
+
},
|
|
21906
20766
|
{
|
|
21907
20767
|
"type": "function",
|
|
21908
20768
|
"name": "owner",
|
|
@@ -22048,6 +20908,59 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
22048
20908
|
"outputs": [],
|
|
22049
20909
|
"stateMutability": "nonpayable"
|
|
22050
20910
|
},
|
|
20911
|
+
{
|
|
20912
|
+
"type": "function",
|
|
20913
|
+
"name": "reserveTaskForChain",
|
|
20914
|
+
"inputs": [
|
|
20915
|
+
{
|
|
20916
|
+
"name": "allocationId",
|
|
20917
|
+
"type": "bytes32",
|
|
20918
|
+
"internalType": "bytes32"
|
|
20919
|
+
},
|
|
20920
|
+
{
|
|
20921
|
+
"name": "taskChainId",
|
|
20922
|
+
"type": "uint256",
|
|
20923
|
+
"internalType": "uint256"
|
|
20924
|
+
},
|
|
20925
|
+
{
|
|
20926
|
+
"name": "taskId",
|
|
20927
|
+
"type": "bytes32",
|
|
20928
|
+
"internalType": "bytes32"
|
|
20929
|
+
},
|
|
20930
|
+
{
|
|
20931
|
+
"name": "manager",
|
|
20932
|
+
"type": "address",
|
|
20933
|
+
"internalType": "address"
|
|
20934
|
+
},
|
|
20935
|
+
{
|
|
20936
|
+
"name": "grossAmount",
|
|
20937
|
+
"type": "uint256",
|
|
20938
|
+
"internalType": "uint256"
|
|
20939
|
+
},
|
|
20940
|
+
{
|
|
20941
|
+
"name": "expectedEpoch",
|
|
20942
|
+
"type": "uint64",
|
|
20943
|
+
"internalType": "uint64"
|
|
20944
|
+
},
|
|
20945
|
+
{
|
|
20946
|
+
"name": "expectedFeeBps",
|
|
20947
|
+
"type": "uint16",
|
|
20948
|
+
"internalType": "uint16"
|
|
20949
|
+
},
|
|
20950
|
+
{
|
|
20951
|
+
"name": "expectedFeeRecipient",
|
|
20952
|
+
"type": "address",
|
|
20953
|
+
"internalType": "address"
|
|
20954
|
+
},
|
|
20955
|
+
{
|
|
20956
|
+
"name": "termsHash",
|
|
20957
|
+
"type": "bytes32",
|
|
20958
|
+
"internalType": "bytes32"
|
|
20959
|
+
}
|
|
20960
|
+
],
|
|
20961
|
+
"outputs": [],
|
|
20962
|
+
"stateMutability": "nonpayable"
|
|
20963
|
+
},
|
|
22051
20964
|
{
|
|
22052
20965
|
"type": "function",
|
|
22053
20966
|
"name": "settlementChain",
|
|
@@ -22074,6 +20987,25 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
22074
20987
|
],
|
|
22075
20988
|
"stateMutability": "view"
|
|
22076
20989
|
},
|
|
20990
|
+
{
|
|
20991
|
+
"type": "function",
|
|
20992
|
+
"name": "sweepExited",
|
|
20993
|
+
"inputs": [
|
|
20994
|
+
{
|
|
20995
|
+
"name": "recipient",
|
|
20996
|
+
"type": "address",
|
|
20997
|
+
"internalType": "address"
|
|
20998
|
+
}
|
|
20999
|
+
],
|
|
21000
|
+
"outputs": [
|
|
21001
|
+
{
|
|
21002
|
+
"name": "amount",
|
|
21003
|
+
"type": "uint256",
|
|
21004
|
+
"internalType": "uint256"
|
|
21005
|
+
}
|
|
21006
|
+
],
|
|
21007
|
+
"stateMutability": "nonpayable"
|
|
21008
|
+
},
|
|
22077
21009
|
{
|
|
22078
21010
|
"type": "function",
|
|
22079
21011
|
"name": "token",
|
|
@@ -22307,6 +21239,37 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
22307
21239
|
"inputs": [],
|
|
22308
21240
|
"anonymous": false
|
|
22309
21241
|
},
|
|
21242
|
+
{
|
|
21243
|
+
"type": "event",
|
|
21244
|
+
"name": "ExitedVaultSwept",
|
|
21245
|
+
"inputs": [
|
|
21246
|
+
{
|
|
21247
|
+
"name": "vaultId",
|
|
21248
|
+
"type": "bytes32",
|
|
21249
|
+
"indexed": true,
|
|
21250
|
+
"internalType": "bytes32"
|
|
21251
|
+
},
|
|
21252
|
+
{
|
|
21253
|
+
"name": "owner",
|
|
21254
|
+
"type": "address",
|
|
21255
|
+
"indexed": true,
|
|
21256
|
+
"internalType": "address"
|
|
21257
|
+
},
|
|
21258
|
+
{
|
|
21259
|
+
"name": "recipient",
|
|
21260
|
+
"type": "address",
|
|
21261
|
+
"indexed": true,
|
|
21262
|
+
"internalType": "address"
|
|
21263
|
+
},
|
|
21264
|
+
{
|
|
21265
|
+
"name": "amount",
|
|
21266
|
+
"type": "uint256",
|
|
21267
|
+
"indexed": false,
|
|
21268
|
+
"internalType": "uint256"
|
|
21269
|
+
}
|
|
21270
|
+
],
|
|
21271
|
+
"anonymous": false
|
|
21272
|
+
},
|
|
22310
21273
|
{
|
|
22311
21274
|
"type": "event",
|
|
22312
21275
|
"name": "FeeClaimed",
|
|
@@ -22336,31 +21299,74 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
22336
21299
|
"internalType": "address"
|
|
22337
21300
|
},
|
|
22338
21301
|
{
|
|
22339
|
-
"name": "amount",
|
|
21302
|
+
"name": "amount",
|
|
21303
|
+
"type": "uint256",
|
|
21304
|
+
"indexed": false,
|
|
21305
|
+
"internalType": "uint256"
|
|
21306
|
+
}
|
|
21307
|
+
],
|
|
21308
|
+
"anonymous": false
|
|
21309
|
+
},
|
|
21310
|
+
{
|
|
21311
|
+
"type": "event",
|
|
21312
|
+
"name": "Initialized",
|
|
21313
|
+
"inputs": [
|
|
21314
|
+
{
|
|
21315
|
+
"name": "version",
|
|
21316
|
+
"type": "uint64",
|
|
21317
|
+
"indexed": false,
|
|
21318
|
+
"internalType": "uint64"
|
|
21319
|
+
}
|
|
21320
|
+
],
|
|
21321
|
+
"anonymous": false
|
|
21322
|
+
},
|
|
21323
|
+
{
|
|
21324
|
+
"type": "event",
|
|
21325
|
+
"name": "ManagerConfigured",
|
|
21326
|
+
"inputs": [
|
|
21327
|
+
{
|
|
21328
|
+
"name": "manager",
|
|
21329
|
+
"type": "address",
|
|
21330
|
+
"indexed": true,
|
|
21331
|
+
"internalType": "address"
|
|
21332
|
+
},
|
|
21333
|
+
{
|
|
21334
|
+
"name": "cap",
|
|
21335
|
+
"type": "uint256",
|
|
21336
|
+
"indexed": false,
|
|
21337
|
+
"internalType": "uint256"
|
|
21338
|
+
},
|
|
21339
|
+
{
|
|
21340
|
+
"name": "reserved",
|
|
21341
|
+
"type": "uint256",
|
|
21342
|
+
"indexed": false,
|
|
21343
|
+
"internalType": "uint256"
|
|
21344
|
+
},
|
|
21345
|
+
{
|
|
21346
|
+
"name": "spent",
|
|
22340
21347
|
"type": "uint256",
|
|
22341
21348
|
"indexed": false,
|
|
22342
21349
|
"internalType": "uint256"
|
|
22343
|
-
}
|
|
22344
|
-
],
|
|
22345
|
-
"anonymous": false
|
|
22346
|
-
},
|
|
22347
|
-
{
|
|
22348
|
-
"type": "event",
|
|
22349
|
-
"name": "Initialized",
|
|
22350
|
-
"inputs": [
|
|
21350
|
+
},
|
|
22351
21351
|
{
|
|
22352
|
-
"name": "
|
|
22353
|
-
"type": "
|
|
21352
|
+
"name": "active",
|
|
21353
|
+
"type": "bool",
|
|
22354
21354
|
"indexed": false,
|
|
22355
|
-
"internalType": "
|
|
21355
|
+
"internalType": "bool"
|
|
22356
21356
|
}
|
|
22357
21357
|
],
|
|
22358
21358
|
"anonymous": false
|
|
22359
21359
|
},
|
|
22360
21360
|
{
|
|
22361
21361
|
"type": "event",
|
|
22362
|
-
"name": "
|
|
21362
|
+
"name": "ManagerConfiguredForChain",
|
|
22363
21363
|
"inputs": [
|
|
21364
|
+
{
|
|
21365
|
+
"name": "taskChainId",
|
|
21366
|
+
"type": "uint256",
|
|
21367
|
+
"indexed": true,
|
|
21368
|
+
"internalType": "uint256"
|
|
21369
|
+
},
|
|
22364
21370
|
{
|
|
22365
21371
|
"name": "manager",
|
|
22366
21372
|
"type": "address",
|
|
@@ -23268,6 +22274,11 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
23268
22274
|
}
|
|
23269
22275
|
]
|
|
23270
22276
|
},
|
|
22277
|
+
{
|
|
22278
|
+
"type": "error",
|
|
22279
|
+
"name": "TaskChainRequired",
|
|
22280
|
+
"inputs": []
|
|
22281
|
+
},
|
|
23271
22282
|
{
|
|
23272
22283
|
"type": "error",
|
|
23273
22284
|
"name": "TaskIdRequired",
|
|
@@ -23336,6 +22347,11 @@ var SponsoredTasksVaultV2ABI = [
|
|
|
23336
22347
|
"name": "VaultNotActive",
|
|
23337
22348
|
"inputs": []
|
|
23338
22349
|
},
|
|
22350
|
+
{
|
|
22351
|
+
"type": "error",
|
|
22352
|
+
"name": "VaultNotExited",
|
|
22353
|
+
"inputs": []
|
|
22354
|
+
},
|
|
23339
22355
|
{
|
|
23340
22356
|
"type": "error",
|
|
23341
22357
|
"name": "ZeroAddress",
|
|
@@ -24179,8 +23195,8 @@ function getConfigDecoder() {
|
|
|
24179
23195
|
function decodeConfig(encodedAccount) {
|
|
24180
23196
|
return decodeAccount(encodedAccount, getConfigDecoder());
|
|
24181
23197
|
}
|
|
24182
|
-
async function fetchMaybeConfig(rpc,
|
|
24183
|
-
const maybeAccount = await fetchEncodedAccount(rpc,
|
|
23198
|
+
async function fetchMaybeConfig(rpc, address2, config) {
|
|
23199
|
+
const maybeAccount = await fetchEncodedAccount(rpc, address2, config);
|
|
24184
23200
|
return decodeConfig(maybeAccount);
|
|
24185
23201
|
}
|
|
24186
23202
|
|
|
@@ -24308,65 +23324,11 @@ function getVaultDecoder() {
|
|
|
24308
23324
|
function decodeVault(encodedAccount) {
|
|
24309
23325
|
return decodeAccount(encodedAccount, getVaultDecoder());
|
|
24310
23326
|
}
|
|
24311
|
-
async function fetchMaybeVault(rpc,
|
|
24312
|
-
const maybeAccount = await fetchEncodedAccount(rpc,
|
|
23327
|
+
async function fetchMaybeVault(rpc, address2, config) {
|
|
23328
|
+
const maybeAccount = await fetchEncodedAccount(rpc, address2, config);
|
|
24313
23329
|
return decodeVault(maybeAccount);
|
|
24314
23330
|
}
|
|
24315
23331
|
|
|
24316
|
-
// ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@5.7.3/node_modules/@solana/program-client-core/dist/index.node.mjs
|
|
24317
|
-
function getNonNullResolvedInstructionInput2(inputName, value) {
|
|
24318
|
-
if (value === null || value === void 0) {
|
|
24319
|
-
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, {
|
|
24320
|
-
inputName
|
|
24321
|
-
});
|
|
24322
|
-
}
|
|
24323
|
-
return value;
|
|
24324
|
-
}
|
|
24325
|
-
function getAddressFromResolvedInstructionAccount2(inputName, value) {
|
|
24326
|
-
const nonNullValue = getNonNullResolvedInstructionInput2(inputName, value);
|
|
24327
|
-
if (typeof value === "object" && "address" in nonNullValue) {
|
|
24328
|
-
return nonNullValue.address;
|
|
24329
|
-
}
|
|
24330
|
-
if (Array.isArray(nonNullValue)) {
|
|
24331
|
-
return nonNullValue[0];
|
|
24332
|
-
}
|
|
24333
|
-
return nonNullValue;
|
|
24334
|
-
}
|
|
24335
|
-
function getAccountMetaFactory2(programAddress, optionalAccountStrategy) {
|
|
24336
|
-
return (inputName, account) => {
|
|
24337
|
-
if (!account.value) {
|
|
24338
|
-
if (optionalAccountStrategy === "omitted") return;
|
|
24339
|
-
return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
|
|
24340
|
-
}
|
|
24341
|
-
if (hasExplicitRole2(account.value)) {
|
|
24342
|
-
return Object.freeze({
|
|
24343
|
-
address: account.value.address,
|
|
24344
|
-
role: account.value.role,
|
|
24345
|
-
..."signer" in account.value && account.value.signer ? { signer: account.value.signer } : {}
|
|
24346
|
-
});
|
|
24347
|
-
}
|
|
24348
|
-
const idlIsSigner = account.isSigner ?? "either";
|
|
24349
|
-
const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner2(account.value);
|
|
24350
|
-
if (!isSigner && idlIsSigner === true) {
|
|
24351
|
-
throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER, {
|
|
24352
|
-
inputName
|
|
24353
|
-
});
|
|
24354
|
-
}
|
|
24355
|
-
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
24356
|
-
return Object.freeze({
|
|
24357
|
-
address: getAddressFromResolvedInstructionAccount2(inputName, account.value),
|
|
24358
|
-
role: isSigner ? upgradeRoleToSigner(writableRole) : writableRole,
|
|
24359
|
-
...isSigner ? { signer: account.value } : {}
|
|
24360
|
-
});
|
|
24361
|
-
};
|
|
24362
|
-
}
|
|
24363
|
-
function hasExplicitRole2(value) {
|
|
24364
|
-
return typeof value === "object" && "role" in value && typeof value.role === "number";
|
|
24365
|
-
}
|
|
24366
|
-
function isResolvedInstructionAccountSigner2(value) {
|
|
24367
|
-
return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner(value);
|
|
24368
|
-
}
|
|
24369
|
-
|
|
24370
23332
|
// ../../packages/solana-sponsored-client/dist/generated/pdas/binding.js
|
|
24371
23333
|
async function findBindingPda(seeds, config = {}) {
|
|
24372
23334
|
const { programAddress = "STvau1t111111111111111111111111111111111111" } = config;
|
|
@@ -24439,7 +23401,7 @@ function getBindPayoutInstructionDataEncoder() {
|
|
|
24439
23401
|
}
|
|
24440
23402
|
async function getBindPayoutInstructionAsync(input, config) {
|
|
24441
23403
|
const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
|
|
24442
|
-
const getAccountMeta =
|
|
23404
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
24443
23405
|
const originalAccounts = {
|
|
24444
23406
|
config: { value: input.config ?? null, isSigner: false, isWritable: false },
|
|
24445
23407
|
binding: { value: input.binding ?? null, isSigner: false, isWritable: true },
|
|
@@ -24455,8 +23417,8 @@ async function getBindPayoutInstructionAsync(input, config) {
|
|
|
24455
23417
|
}
|
|
24456
23418
|
if (!accounts.binding.value) {
|
|
24457
23419
|
accounts.binding.value = await findBindingPda({
|
|
24458
|
-
taskChainId:
|
|
24459
|
-
agent:
|
|
23420
|
+
taskChainId: getNonNullResolvedInstructionInput("taskChainId", args.taskChainId),
|
|
23421
|
+
agent: getNonNullResolvedInstructionInput("agent", args.agent)
|
|
24460
23422
|
}, { programAddress });
|
|
24461
23423
|
}
|
|
24462
23424
|
if (!accounts.systemProgram.value) {
|
|
@@ -24531,7 +23493,7 @@ function getCreateVaultInstructionDataEncoder() {
|
|
|
24531
23493
|
}
|
|
24532
23494
|
function getCreateVaultInstruction(input, config) {
|
|
24533
23495
|
const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
|
|
24534
|
-
const getAccountMeta =
|
|
23496
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
24535
23497
|
const originalAccounts = {
|
|
24536
23498
|
config: { value: input.config ?? null, isSigner: false, isWritable: false },
|
|
24537
23499
|
sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: true },
|
|
@@ -24597,7 +23559,7 @@ function getEmergencyExitInstructionDataEncoder() {
|
|
|
24597
23559
|
}
|
|
24598
23560
|
function getEmergencyExitInstruction(input, config) {
|
|
24599
23561
|
const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
|
|
24600
|
-
const getAccountMeta =
|
|
23562
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
24601
23563
|
const originalAccounts = {
|
|
24602
23564
|
vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
|
|
24603
23565
|
sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: false },
|
|
@@ -24636,6 +23598,18 @@ function getEmergencyExitInstruction(input, config) {
|
|
|
24636
23598
|
});
|
|
24637
23599
|
}
|
|
24638
23600
|
|
|
23601
|
+
// ../../packages/solana-sponsored-client/dist/generated/instructions/extendDeadline.js
|
|
23602
|
+
var EXTEND_DEADLINE_DISCRIMINATOR = new Uint8Array([
|
|
23603
|
+
18,
|
|
23604
|
+
209,
|
|
23605
|
+
27,
|
|
23606
|
+
175,
|
|
23607
|
+
87,
|
|
23608
|
+
13,
|
|
23609
|
+
213,
|
|
23610
|
+
188
|
|
23611
|
+
]);
|
|
23612
|
+
|
|
24639
23613
|
// ../../packages/solana-sponsored-client/dist/generated/instructions/fund.js
|
|
24640
23614
|
var FUND_DISCRIMINATOR = new Uint8Array([
|
|
24641
23615
|
218,
|
|
@@ -24655,7 +23629,7 @@ function getFundInstructionDataEncoder() {
|
|
|
24655
23629
|
}
|
|
24656
23630
|
function getFundInstruction(input, config) {
|
|
24657
23631
|
const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
|
|
24658
|
-
const getAccountMeta =
|
|
23632
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
24659
23633
|
const originalAccounts = {
|
|
24660
23634
|
vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
|
|
24661
23635
|
mint: { value: input.mint ?? null, isSigner: false, isWritable: false },
|
|
@@ -24822,7 +23796,7 @@ function getSetManagersInstructionDataEncoder() {
|
|
|
24822
23796
|
}
|
|
24823
23797
|
function getSetManagersInstruction(input, config) {
|
|
24824
23798
|
const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
|
|
24825
|
-
const getAccountMeta =
|
|
23799
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
24826
23800
|
const originalAccounts = {
|
|
24827
23801
|
vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
|
|
24828
23802
|
sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: false },
|
|
@@ -24867,6 +23841,18 @@ var SETTLE_DISCRIMINATOR = new Uint8Array([
|
|
|
24867
23841
|
212
|
|
24868
23842
|
]);
|
|
24869
23843
|
|
|
23844
|
+
// ../../packages/solana-sponsored-client/dist/generated/instructions/sweepExited.js
|
|
23845
|
+
var SWEEP_EXITED_DISCRIMINATOR = new Uint8Array([
|
|
23846
|
+
49,
|
|
23847
|
+
51,
|
|
23848
|
+
165,
|
|
23849
|
+
229,
|
|
23850
|
+
234,
|
|
23851
|
+
130,
|
|
23852
|
+
98,
|
|
23853
|
+
7
|
|
23854
|
+
]);
|
|
23855
|
+
|
|
24870
23856
|
// ../../packages/solana-sponsored-client/dist/generated/programs/sponsoredTasks.js
|
|
24871
23857
|
var SPONSORED_TASKS_PROGRAM_ADDRESS = "STvau1t111111111111111111111111111111111111";
|
|
24872
23858
|
var SponsoredTasksAccount;
|
|
@@ -24883,22 +23869,24 @@ var SponsoredTasksEvent;
|
|
|
24883
23869
|
SponsoredTasksEvent2[SponsoredTasksEvent2["AdminProposed"] = 1] = "AdminProposed";
|
|
24884
23870
|
SponsoredTasksEvent2[SponsoredTasksEvent2["ClaimDelaySet"] = 2] = "ClaimDelaySet";
|
|
24885
23871
|
SponsoredTasksEvent2[SponsoredTasksEvent2["ConfigInitialized"] = 3] = "ConfigInitialized";
|
|
24886
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24887
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24888
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24889
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24890
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24891
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24892
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24893
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24894
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24895
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24896
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24897
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24898
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24899
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24900
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
24901
|
-
SponsoredTasksEvent2[SponsoredTasksEvent2["
|
|
23872
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["ExitedVaultSwept"] = 4] = "ExitedVaultSwept";
|
|
23873
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["FeeClaimed"] = 5] = "FeeClaimed";
|
|
23874
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["FeeSet"] = 6] = "FeeSet";
|
|
23875
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["ManagerConfigured"] = 7] = "ManagerConfigured";
|
|
23876
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["ManagerRemoved"] = 8] = "ManagerRemoved";
|
|
23877
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["PauseSet"] = 9] = "PauseSet";
|
|
23878
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["PayoutBindingPending"] = 10] = "PayoutBindingPending";
|
|
23879
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["PayoutBound"] = 11] = "PayoutBound";
|
|
23880
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["ReservationDeadlineExtended"] = 12] = "ReservationDeadlineExtended";
|
|
23881
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["SettlementInstalled"] = 13] = "SettlementInstalled";
|
|
23882
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["SettlementRevoked"] = 14] = "SettlementRevoked";
|
|
23883
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["SettlersChanged"] = 15] = "SettlersChanged";
|
|
23884
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["SponsoredTaskClaimed"] = 16] = "SponsoredTaskClaimed";
|
|
23885
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["TaskReleased"] = 17] = "TaskReleased";
|
|
23886
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["TaskReserved"] = 18] = "TaskReserved";
|
|
23887
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["VaultCreated"] = 19] = "VaultCreated";
|
|
23888
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["VaultEmergencyExited"] = 20] = "VaultEmergencyExited";
|
|
23889
|
+
SponsoredTasksEvent2[SponsoredTasksEvent2["VaultFunded"] = 21] = "VaultFunded";
|
|
24902
23890
|
})(SponsoredTasksEvent || (SponsoredTasksEvent = {}));
|
|
24903
23891
|
var SponsoredTasksInstruction;
|
|
24904
23892
|
(function(SponsoredTasksInstruction2) {
|
|
@@ -24909,19 +23897,21 @@ var SponsoredTasksInstruction;
|
|
|
24909
23897
|
SponsoredTasksInstruction2[SponsoredTasksInstruction2["ClaimFee"] = 4] = "ClaimFee";
|
|
24910
23898
|
SponsoredTasksInstruction2[SponsoredTasksInstruction2["CreateVault"] = 5] = "CreateVault";
|
|
24911
23899
|
SponsoredTasksInstruction2[SponsoredTasksInstruction2["EmergencyExit"] = 6] = "EmergencyExit";
|
|
24912
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24913
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24914
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24915
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24916
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24917
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24918
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24919
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24920
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24921
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24922
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24923
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
24924
|
-
SponsoredTasksInstruction2[SponsoredTasksInstruction2["
|
|
23900
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["ExtendDeadline"] = 7] = "ExtendDeadline";
|
|
23901
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["Fund"] = 8] = "Fund";
|
|
23902
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["InitConfig"] = 9] = "InitConfig";
|
|
23903
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["Pause"] = 10] = "Pause";
|
|
23904
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["Release"] = 11] = "Release";
|
|
23905
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["ReleaseExpired"] = 12] = "ReleaseExpired";
|
|
23906
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["Reserve"] = 13] = "Reserve";
|
|
23907
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["RevokeSettlement"] = 14] = "RevokeSettlement";
|
|
23908
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetAdmin"] = 15] = "SetAdmin";
|
|
23909
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetClaimDelay"] = 16] = "SetClaimDelay";
|
|
23910
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetFee"] = 17] = "SetFee";
|
|
23911
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetManagers"] = 18] = "SetManagers";
|
|
23912
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetSettlers"] = 19] = "SetSettlers";
|
|
23913
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["Settle"] = 20] = "Settle";
|
|
23914
|
+
SponsoredTasksInstruction2[SponsoredTasksInstruction2["SweepExited"] = 21] = "SweepExited";
|
|
24925
23915
|
})(SponsoredTasksInstruction || (SponsoredTasksInstruction = {}));
|
|
24926
23916
|
|
|
24927
23917
|
// ../../packages/solana-sponsored-client/dist/generated/errors/sponsoredTasks.js
|
|
@@ -24967,6 +23957,9 @@ var SPONSORED_TASKS_ERROR__INVALID_CLUSTER_ID = 6038;
|
|
|
24967
23957
|
var SPONSORED_TASKS_ERROR__PAYOUT_SIGNATURE_EXPIRED = 6039;
|
|
24968
23958
|
var SPONSORED_TASKS_ERROR__INVALID_PAYOUT_NONCE = 6040;
|
|
24969
23959
|
var SPONSORED_TASKS_ERROR__RESERVATION_NOT_EXPIRED = 6041;
|
|
23960
|
+
var SPONSORED_TASKS_ERROR__VAULT_NOT_EXITED = 6042;
|
|
23961
|
+
var SPONSORED_TASKS_ERROR__DEADLINE_TOO_FAR = 6043;
|
|
23962
|
+
var SPONSORED_TASKS_ERROR__PAYOUT_ACCOUNT_NOT_ASSOCIATED = 6044;
|
|
24970
23963
|
var sponsoredTasksErrorMessages;
|
|
24971
23964
|
if (process.env["NODE_ENV"] !== "production") {
|
|
24972
23965
|
sponsoredTasksErrorMessages = {
|
|
@@ -24974,6 +23967,7 @@ if (process.env["NODE_ENV"] !== "production") {
|
|
|
24974
23967
|
[SPONSORED_TASKS_ERROR__CLAIM_DELAY_NOT_ELAPSED]: `The settlement's claim delay has not passed`,
|
|
24975
23968
|
[SPONSORED_TASKS_ERROR__CLAIM_INDEX_OUT_OF_BOUNDS]: `Award leaf index is not below the settlement's leaf count`,
|
|
24976
23969
|
[SPONSORED_TASKS_ERROR__DEADLINE_IN_PAST]: `Reservation deadline is in the past`,
|
|
23970
|
+
[SPONSORED_TASKS_ERROR__DEADLINE_TOO_FAR]: `Reservation deadline is more than MAX_RESERVATION_SECS from now`,
|
|
24977
23971
|
[SPONSORED_TASKS_ERROR__EPOCH_MISMATCH]: `Reservation belongs to an earlier vault epoch`,
|
|
24978
23972
|
[SPONSORED_TASKS_ERROR__INSUFFICIENT_AVAILABLE]: `Reservation exceeds the vault's available balance`,
|
|
24979
23973
|
[SPONSORED_TASKS_ERROR__INVALID_ADMIN]: `Admin must not be the zero key`,
|
|
@@ -24986,7 +23980,7 @@ if (process.env["NODE_ENV"] !== "production") {
|
|
|
24986
23980
|
[SPONSORED_TASKS_ERROR__INVALID_PAYOUT_NONCE]: `Payout binding nonce must be below u64::MAX`,
|
|
24987
23981
|
[SPONSORED_TASKS_ERROR__INVALID_PAYOUT_SIGNATURE]: `Payout binding signature is not from the agent`,
|
|
24988
23982
|
[SPONSORED_TASKS_ERROR__INVALID_SETTLEMENT_TOTALS]: `Settlement totals do not add up or do not match the root`,
|
|
24989
|
-
[SPONSORED_TASKS_ERROR__INVALID_SETTLERS]: `Settler set is empty, too large or
|
|
23983
|
+
[SPONSORED_TASKS_ERROR__INVALID_SETTLERS]: `Settler set is empty, too large, has duplicates or the zero key`,
|
|
24990
23984
|
[SPONSORED_TASKS_ERROR__INVALID_THRESHOLD]: `Threshold must be between 1 and the number of settlers`,
|
|
24991
23985
|
[SPONSORED_TASKS_ERROR__MANAGER_ALLOWANCE_EXCEEDED]: `Reservation exceeds the manager's remaining allowance`,
|
|
24992
23986
|
[SPONSORED_TASKS_ERROR__MANAGER_CHAIN_MISMATCH]: `Manager is on a different chain than the task`,
|
|
@@ -24999,6 +23993,7 @@ if (process.env["NODE_ENV"] !== "production") {
|
|
|
24999
23993
|
[SPONSORED_TASKS_ERROR__NOT_SPONSOR]: `Caller is not the vault sponsor`,
|
|
25000
23994
|
[SPONSORED_TASKS_ERROR__OVERFLOW]: `Arithmetic overflow`,
|
|
25001
23995
|
[SPONSORED_TASKS_ERROR__PAUSED]: `Program is paused`,
|
|
23996
|
+
[SPONSORED_TASKS_ERROR__PAYOUT_ACCOUNT_NOT_ASSOCIATED]: `Destination is not the payout's associated token account`,
|
|
25002
23997
|
[SPONSORED_TASKS_ERROR__PAYOUT_NOT_BOUND]: `Worker has no payout binding`,
|
|
25003
23998
|
[SPONSORED_TASKS_ERROR__PAYOUT_SIGNATURE_EXPIRED]: `Payout binding signature has expired`,
|
|
25004
23999
|
[SPONSORED_TASKS_ERROR__RESERVATION_NOT_EXPIRED]: `Reservation deadline has not passed`,
|
|
@@ -25011,6 +24006,7 @@ if (process.env["NODE_ENV"] !== "production") {
|
|
|
25011
24006
|
[SPONSORED_TASKS_ERROR__TRANSFER_AMOUNT_MISMATCH]: `Vault received a different amount than was sent`,
|
|
25012
24007
|
[SPONSORED_TASKS_ERROR__UNSUPPORTED_MINT_EXTENSION]: `Mint has an extension the vault does not accept`,
|
|
25013
24008
|
[SPONSORED_TASKS_ERROR__VAULT_NOT_ACTIVE]: `Vault is not active`,
|
|
24009
|
+
[SPONSORED_TASKS_ERROR__VAULT_NOT_EXITED]: `Vault has not exited`,
|
|
25014
24010
|
[SPONSORED_TASKS_ERROR__ZERO_AMOUNT]: `Amount must be greater than zero`
|
|
25015
24011
|
};
|
|
25016
24012
|
}
|
|
@@ -25063,6 +24059,18 @@ var CONFIG_INITIALIZED_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
|
25063
24059
|
91
|
|
25064
24060
|
]);
|
|
25065
24061
|
|
|
24062
|
+
// ../../packages/solana-sponsored-client/dist/generated/events/exitedVaultSwept.js
|
|
24063
|
+
var EXITED_VAULT_SWEPT_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
24064
|
+
253,
|
|
24065
|
+
50,
|
|
24066
|
+
228,
|
|
24067
|
+
175,
|
|
24068
|
+
185,
|
|
24069
|
+
60,
|
|
24070
|
+
9,
|
|
24071
|
+
133
|
|
24072
|
+
]);
|
|
24073
|
+
|
|
25066
24074
|
// ../../packages/solana-sponsored-client/dist/generated/events/feeClaimed.js
|
|
25067
24075
|
var FEE_CLAIMED_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
25068
24076
|
202,
|
|
@@ -25147,6 +24155,9 @@ var PAYOUT_BOUND_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
|
25147
24155
|
31
|
|
25148
24156
|
]);
|
|
25149
24157
|
|
|
24158
|
+
// ../../packages/solana-sponsored-client/dist/generated/events/reservationDeadlineExtended.js
|
|
24159
|
+
var RESERVATION_DEADLINE_EXTENDED_EVENT_DISCRIMINATOR = new Uint8Array([84, 139, 91, 136, 29, 55, 178, 64]);
|
|
24160
|
+
|
|
25150
24161
|
// ../../packages/solana-sponsored-client/dist/generated/events/settlementInstalled.js
|
|
25151
24162
|
var SETTLEMENT_INSTALLED_EVENT_DISCRIMINATOR = new Uint8Array([
|
|
25152
24163
|
170,
|
|
@@ -26030,6 +25041,14 @@ async function configureSolana(opts, solanaChainId) {
|
|
|
26030
25041
|
renderFailure(err);
|
|
26031
25042
|
}
|
|
26032
25043
|
}
|
|
25044
|
+
async function isChainScopedVault(publicClient, vault) {
|
|
25045
|
+
const version2 = await publicClient.readContract({
|
|
25046
|
+
address: vault,
|
|
25047
|
+
abi: SponsoredTasksVaultV2ABI,
|
|
25048
|
+
functionName: "VAULT_VERSION"
|
|
25049
|
+
});
|
|
25050
|
+
return Number(version2) >= 3;
|
|
25051
|
+
}
|
|
26033
25052
|
async function configure(opts) {
|
|
26034
25053
|
const vaultChainId = opts.chainId;
|
|
26035
25054
|
if (isSolanaChainId(vaultChainId)) return configureSolana(opts, vaultChainId);
|
|
@@ -26043,16 +25062,44 @@ async function configure(opts) {
|
|
|
26043
25062
|
keystore,
|
|
26044
25063
|
opts.chainId
|
|
26045
25064
|
);
|
|
25065
|
+
const vault = opts.vault;
|
|
25066
|
+
const manager = opts.manager;
|
|
25067
|
+
const remote = isSettlerModeChainId(vaultChainId);
|
|
25068
|
+
if (!remote && opts.managerChainId !== void 0 && opts.managerChainId !== vaultChainId) {
|
|
25069
|
+
printError(
|
|
25070
|
+
`--manager-chain-id must be the vault's own chain (${vaultChainId}) for this vault: its tasks are created only on that chain. Leave the option out.`
|
|
25071
|
+
);
|
|
25072
|
+
return;
|
|
25073
|
+
}
|
|
25074
|
+
const managerChainId = opts.managerChainId !== void 0 && opts.managerChainId !== vaultChainId ? opts.managerChainId : void 0;
|
|
25075
|
+
const chainScoped = remote || managerChainId !== void 0 ? await isChainScopedVault(publicClient, vault) : false;
|
|
25076
|
+
if (chainScoped && remote && managerChainId === void 0) {
|
|
25077
|
+
printError(
|
|
25078
|
+
"--manager-chain-id is required for this vault: the chain the manager creates tasks on (base, tempo, 8453 or 4217). Its allowance is spent only by tasks from that chain."
|
|
25079
|
+
);
|
|
25080
|
+
return;
|
|
25081
|
+
}
|
|
25082
|
+
if (!chainScoped && managerChainId !== void 0) {
|
|
25083
|
+
printError(
|
|
25084
|
+
"--manager-chain-id does not apply to this vault: it predates per-chain allowances, so one allowance covers every task chain it serves. Leave the option out."
|
|
25085
|
+
);
|
|
25086
|
+
return;
|
|
25087
|
+
}
|
|
26046
25088
|
let cap;
|
|
26047
25089
|
if (opts.cap !== void 0) {
|
|
26048
25090
|
cap = BigInt(opts.cap);
|
|
26049
25091
|
} else {
|
|
26050
|
-
const current = await publicClient.readContract({
|
|
26051
|
-
address:
|
|
25092
|
+
const current = await (managerChainId !== void 0 ? publicClient.readContract({
|
|
25093
|
+
address: vault,
|
|
25094
|
+
abi: SponsoredTasksVaultV2ABI,
|
|
25095
|
+
functionName: "managerAccountForChain",
|
|
25096
|
+
args: [BigInt(managerChainId), manager]
|
|
25097
|
+
}) : publicClient.readContract({
|
|
25098
|
+
address: vault,
|
|
26052
25099
|
abi: SponsoredTasksVaultV2ABI,
|
|
26053
25100
|
functionName: "managerAccount",
|
|
26054
|
-
args: [
|
|
26055
|
-
});
|
|
25101
|
+
args: [manager]
|
|
25102
|
+
}));
|
|
26056
25103
|
cap = current.reserved + current.spent;
|
|
26057
25104
|
}
|
|
26058
25105
|
const { txHash, feePayer } = await writeSponsoredTaskVaultContract({
|
|
@@ -26060,15 +25107,18 @@ async function configure(opts) {
|
|
|
26060
25107
|
publicClient,
|
|
26061
25108
|
walletClient,
|
|
26062
25109
|
relay,
|
|
26063
|
-
address:
|
|
25110
|
+
address: vault,
|
|
26064
25111
|
abi: SponsoredTasksVaultV2ABI,
|
|
26065
|
-
|
|
26066
|
-
|
|
25112
|
+
...managerChainId !== void 0 ? {
|
|
25113
|
+
functionName: "configureManagerForChain",
|
|
25114
|
+
args: [BigInt(managerChainId), manager, cap, opts.active]
|
|
25115
|
+
} : { functionName: "configureManager", args: [manager, cap, opts.active] }
|
|
26067
25116
|
});
|
|
26068
25117
|
printResult({
|
|
26069
25118
|
txHash,
|
|
26070
25119
|
...feePayer ? { feePayer } : {},
|
|
26071
25120
|
manager: opts.manager,
|
|
25121
|
+
...managerChainId !== void 0 ? { managerChainId } : {},
|
|
26072
25122
|
spendCap: cap.toString(),
|
|
26073
25123
|
active: opts.active
|
|
26074
25124
|
});
|
|
@@ -26082,7 +25132,7 @@ sponsoredTaskManagersCommand.command("add").description("Authorize a manager wit
|
|
|
26082
25132
|
chainOption("--chain-id", "vault")
|
|
26083
25133
|
).requiredOption("--manager <address>", "Manager EVM address to authorize").requiredOption("--cap <baseUnits>", "Spend cap, in the project token base units").option(
|
|
26084
25134
|
"--manager-chain-id <chain>",
|
|
26085
|
-
"
|
|
25135
|
+
"The chain the manager creates tasks on, by name or id (base, tempo, 8453 or 4217): required for a Solana vault and a remote EVM vault from rev031",
|
|
26086
25136
|
chainOption("--manager-chain-id", "market")
|
|
26087
25137
|
).option("--program-id <address>", "Solana vaults: override the cluster's program id").action((opts) => configure({ ...opts, active: true }));
|
|
26088
25138
|
sponsoredTaskManagersCommand.command("remove").description("Deactivate a manager (does not reclaim tokens already reserved)").requiredOption("--vault <address>", "Vault address (base58 for a Solana vault)").requiredOption(
|
|
@@ -26091,7 +25141,7 @@ sponsoredTaskManagersCommand.command("remove").description("Deactivate a manager
|
|
|
26091
25141
|
chainOption("--chain-id", "vault")
|
|
26092
25142
|
).requiredOption("--manager <address>", "Manager EVM address to deactivate").option(
|
|
26093
25143
|
"--manager-chain-id <chain>",
|
|
26094
|
-
"
|
|
25144
|
+
"The chain the manager creates tasks on, by name or id (base, tempo, 8453 or 4217): required for a Solana vault and a remote EVM vault from rev031",
|
|
26095
25145
|
chainOption("--manager-chain-id", "market")
|
|
26096
25146
|
).option("--program-id <address>", "Solana vaults: override the cluster's program id").action((opts) => configure({ ...opts, active: false }));
|
|
26097
25147
|
sponsoredTaskManagersCommand.command("list").description("List a vault authorized managers").requiredOption("--vault-id <id>", "Vault id").action(async (opts) => {
|
|
@@ -26104,16 +25154,16 @@ import { Command as Command116 } from "commander";
|
|
|
26104
25154
|
var sponsoredTaskManagedCommand = new Command116("managed").description(
|
|
26105
25155
|
"List the active Sponsored Task vaults an address can fund tasks from as an active manager (defaults to your wallet)"
|
|
26106
25156
|
).option("--address <address>", "Manager address (defaults to your wallet)").option("--limit <n>", "Max vaults to return (1-100)", "50").option("--cursor <vaultId>", "Pagination cursor from a previous nextCursor").action(async (opts) => {
|
|
26107
|
-
let
|
|
26108
|
-
if (
|
|
25157
|
+
let address2 = opts.address;
|
|
25158
|
+
if (address2 === void 0) {
|
|
26109
25159
|
try {
|
|
26110
|
-
|
|
25160
|
+
address2 = (await loadKeystore()).walletAddress;
|
|
26111
25161
|
} catch {
|
|
26112
25162
|
printError("No keystore found. Run `taskmarket init` first, or pass --address.");
|
|
26113
25163
|
return;
|
|
26114
25164
|
}
|
|
26115
25165
|
}
|
|
26116
|
-
if (!/^0x[a-fA-F0-9]{40}$/.test(
|
|
25166
|
+
if (!/^0x[a-fA-F0-9]{40}$/.test(address2)) {
|
|
26117
25167
|
printError("Invalid Ethereum address for --address");
|
|
26118
25168
|
return;
|
|
26119
25169
|
}
|
|
@@ -26125,7 +25175,7 @@ var sponsoredTaskManagedCommand = new Command116("managed").description(
|
|
|
26125
25175
|
const params = new URLSearchParams({ limit: String(limit) });
|
|
26126
25176
|
if (opts.cursor) params.set("cursor", opts.cursor);
|
|
26127
25177
|
const result = await apiGet(
|
|
26128
|
-
`/api/sponsored-task-vaults/managed/${
|
|
25178
|
+
`/api/sponsored-task-vaults/managed/${address2.toLowerCase()}?${params.toString()}`
|
|
26129
25179
|
);
|
|
26130
25180
|
printResult(result);
|
|
26131
25181
|
});
|
|
@@ -26476,7 +25526,7 @@ async function findEntitlement(vaultId, workerAddress, taskId, options = {}) {
|
|
|
26476
25526
|
const entitlements = await apiGet(
|
|
26477
25527
|
`/api/sponsored-task-vaults/${vaultId}/entitlements?workerAddress=${workerAddress}${query4}`
|
|
26478
25528
|
);
|
|
26479
|
-
const found = taskId ? entitlements.find((
|
|
25529
|
+
const found = taskId ? entitlements.find((e4) => e4.taskId.toLowerCase() === taskId.toLowerCase()) : entitlements[0];
|
|
26480
25530
|
if (found || !taskId || Date.now() + 3e3 > deadline) return found;
|
|
26481
25531
|
await sleep4(3e3);
|
|
26482
25532
|
}
|
|
@@ -26602,16 +25652,16 @@ var REWARD_STATES = SponsoredTaskRewardStateSchema.options;
|
|
|
26602
25652
|
var CLAIM_STATUSES = SponsoredTaskWorkerRewardClaimStatusSchema.options;
|
|
26603
25653
|
var sponsoredTaskRewardsCommand = new Command126("rewards").description("List Sponsored Task rewards across every vault (defaults to your wallet)").option("--address <address>", "Worker address (defaults to your wallet)").option("--state <state>", `Reward state: ${REWARD_STATES.join(", ")}`).option("--claim-status <status>", `Claim status: ${CLAIM_STATUSES.join(", ")}`).option("--limit <n>", "Max rewards to return (1-100)", "50").option("--cursor <cursor>", "Pagination cursor from a previous nextCursor").action(
|
|
26604
25654
|
async (opts) => {
|
|
26605
|
-
let
|
|
26606
|
-
if (
|
|
25655
|
+
let address2 = opts.address;
|
|
25656
|
+
if (address2 === void 0) {
|
|
26607
25657
|
try {
|
|
26608
|
-
|
|
25658
|
+
address2 = (await loadKeystore()).walletAddress;
|
|
26609
25659
|
} catch {
|
|
26610
25660
|
printError("No keystore found. Run `taskmarket init` first, or pass --address.");
|
|
26611
25661
|
return;
|
|
26612
25662
|
}
|
|
26613
25663
|
}
|
|
26614
|
-
if (!/^0x[a-fA-F0-9]{40}$/.test(
|
|
25664
|
+
if (!/^0x[a-fA-F0-9]{40}$/.test(address2)) {
|
|
26615
25665
|
printError("Invalid Ethereum address for --address");
|
|
26616
25666
|
return;
|
|
26617
25667
|
}
|
|
@@ -26633,7 +25683,7 @@ var sponsoredTaskRewardsCommand = new Command126("rewards").description("List Sp
|
|
|
26633
25683
|
if (opts.claimStatus) params.set("claimStatus", opts.claimStatus);
|
|
26634
25684
|
if (opts.cursor) params.set("cursor", opts.cursor);
|
|
26635
25685
|
const result = await apiGet(
|
|
26636
|
-
`/api/sponsored-task-rewards/workers/${
|
|
25686
|
+
`/api/sponsored-task-rewards/workers/${address2.toLowerCase()}?${params.toString()}`
|
|
26637
25687
|
);
|
|
26638
25688
|
printResult(withChainNames(result));
|
|
26639
25689
|
}
|
|
@@ -26947,13 +25997,19 @@ function evaluatorTerms(opts) {
|
|
|
26947
25997
|
|
|
26948
25998
|
// src/commands/project/write.ts
|
|
26949
25999
|
async function postProjectWrite(path10, body, options) {
|
|
26950
|
-
const
|
|
26000
|
+
const outcome = await x402Post(
|
|
26951
26001
|
path10,
|
|
26952
26002
|
{ chainId: selectedNetwork().chainId, ...body },
|
|
26953
26003
|
{ maxAmount: options.maxAmount }
|
|
26954
26004
|
);
|
|
26005
|
+
const { data: result, idempotencyKey } = outcome;
|
|
26955
26006
|
printResult(
|
|
26956
|
-
{
|
|
26007
|
+
{
|
|
26008
|
+
...result,
|
|
26009
|
+
...options.extra,
|
|
26010
|
+
...replayedFields(outcome),
|
|
26011
|
+
...await settleRecording(result, idempotencyKey)
|
|
26012
|
+
},
|
|
26957
26013
|
{ idempotencyKey, ...options.warnings?.length ? { warnings: options.warnings } : {} }
|
|
26958
26014
|
);
|
|
26959
26015
|
}
|
|
@@ -27711,8 +26767,82 @@ var projectFundCommand = new Command138("fund").description(
|
|
|
27711
26767
|
});
|
|
27712
26768
|
|
|
27713
26769
|
// src/commands/project/grant.ts
|
|
26770
|
+
import { Command as Command140 } from "commander";
|
|
26771
|
+
|
|
26772
|
+
// src/commands/project/limits.ts
|
|
27714
26773
|
import { Command as Command139 } from "commander";
|
|
27715
|
-
function
|
|
26774
|
+
function limitFields(opts, now = /* @__PURE__ */ new Date()) {
|
|
26775
|
+
const body = {};
|
|
26776
|
+
if (opts.expires !== void 0) {
|
|
26777
|
+
const at = parseEndsAt(opts.expires, now, "--expires");
|
|
26778
|
+
if (typeof at !== "string") return at;
|
|
26779
|
+
body.expiresAt = Math.floor(new Date(at).getTime() / 1e3);
|
|
26780
|
+
}
|
|
26781
|
+
if (opts.modes !== void 0) {
|
|
26782
|
+
const modes = opts.modes.split(",").map((m) => m.trim().toLowerCase());
|
|
26783
|
+
const unknown = modes.filter((m) => !GRANT_MODE_NAMES.includes(m));
|
|
26784
|
+
if (modes.length === 0 || unknown.length > 0) {
|
|
26785
|
+
return { error: `--modes takes a comma-separated list of: ${GRANT_MODE_NAMES.join(", ")}` };
|
|
26786
|
+
}
|
|
26787
|
+
body.allowedModes = [...new Set(modes)];
|
|
26788
|
+
}
|
|
26789
|
+
if (opts.maxReward !== void 0) {
|
|
26790
|
+
const max = parseAmount(opts.maxReward, "--max-reward");
|
|
26791
|
+
if (typeof max !== "string") return max;
|
|
26792
|
+
if (BigInt(max) <= 0n) return { error: "--max-reward must be greater than zero" };
|
|
26793
|
+
body.maxRewardPerTask = max;
|
|
26794
|
+
}
|
|
26795
|
+
if (opts.periodBudget === void 0 !== (opts.period === void 0)) {
|
|
26796
|
+
return { error: "--period-budget and --period go together: pass both or neither" };
|
|
26797
|
+
}
|
|
26798
|
+
if (opts.periodBudget !== void 0 && opts.period !== void 0) {
|
|
26799
|
+
if (opts.period !== "weekly" && opts.period !== "monthly") {
|
|
26800
|
+
return { error: "--period must be weekly or monthly" };
|
|
26801
|
+
}
|
|
26802
|
+
const periodCap = parseAmount(opts.periodBudget, "--period-budget");
|
|
26803
|
+
if (typeof periodCap !== "string") return periodCap;
|
|
26804
|
+
if (BigInt(periodCap) <= 0n) return { error: "--period-budget must be greater than zero" };
|
|
26805
|
+
body.periodCap = periodCap;
|
|
26806
|
+
body.period = opts.period;
|
|
26807
|
+
}
|
|
26808
|
+
return body;
|
|
26809
|
+
}
|
|
26810
|
+
function limitsBody(projectId, opts, now = /* @__PURE__ */ new Date()) {
|
|
26811
|
+
if (!ADDRESS.test(opts.operator)) {
|
|
26812
|
+
return { error: "--operator must be a wallet address (0x + 40 hex chars)" };
|
|
26813
|
+
}
|
|
26814
|
+
const fields = limitFields(opts, now);
|
|
26815
|
+
if ("error" in fields) return fields;
|
|
26816
|
+
return { projectId, operator: opts.operator, ...fields };
|
|
26817
|
+
}
|
|
26818
|
+
function withLimitFlags(command) {
|
|
26819
|
+
return command.option(
|
|
26820
|
+
"--expires <time>",
|
|
26821
|
+
"The operator cannot draw after this time: ISO 8601 or a duration such as 30d"
|
|
26822
|
+
).option(
|
|
26823
|
+
"--modes <list>",
|
|
26824
|
+
`Task modes the operator may create, comma separated (${GRANT_MODE_NAMES.join(", ")}); default every mode`
|
|
26825
|
+
).option(
|
|
26826
|
+
"--max-reward <amount>",
|
|
26827
|
+
"The most one task may hold from the budget (reward plus evaluator stake), in the payment token"
|
|
26828
|
+
).option("--period-budget <amount>", "The most the operator may draw per period. Needs --period").option("--period <period>", "weekly (7 days) or monthly (30 days). Needs --period-budget");
|
|
26829
|
+
}
|
|
26830
|
+
var projectLimitsCommand = withLimitFlags(
|
|
26831
|
+
new Command139("limits").description(
|
|
26832
|
+
"Advanced. Set all of an operator's limits as the project owner, stated whole: a flag you leave out is no limit of that kind (costs 0.001 in the payment token; contract revision 29 or later). The limits bound the operator on top of its cap: an expiry, the task modes it may create, the most one task may hold, and a budget per week or month. From contract revision 31 the operator accepts the limits with the terms, so on a pending grant it must accept again after a change. For the platform runner, `project automations on` takes --expires, --period-budget and --period"
|
|
26833
|
+
).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose limits to set")
|
|
26834
|
+
).action(async (id, opts) => {
|
|
26835
|
+
const projectId = parseProjectId(id);
|
|
26836
|
+
if (typeof projectId !== "number") return void printError(projectId.error);
|
|
26837
|
+
const body = limitsBody(projectId, opts);
|
|
26838
|
+
if ("error" in body) return void printError(String(body.error));
|
|
26839
|
+
await postProjectWrite(`/api/projects/${projectId}/grants/${opts.operator}/limits`, body, {
|
|
26840
|
+
maxAmount: ACTION_FEE_MAX_AMOUNT
|
|
26841
|
+
});
|
|
26842
|
+
});
|
|
26843
|
+
|
|
26844
|
+
// src/commands/project/grant.ts
|
|
26845
|
+
function grantBody(projectId, opts, now = /* @__PURE__ */ new Date()) {
|
|
27716
26846
|
if (!ADDRESS.test(opts.operator)) {
|
|
27717
26847
|
return { error: "--operator must be a wallet address (0x + 40 hex chars)" };
|
|
27718
26848
|
}
|
|
@@ -27725,30 +26855,35 @@ function grantBody(projectId, opts) {
|
|
|
27725
26855
|
if (typeof parsed !== "string") return parsed;
|
|
27726
26856
|
cap = parsed;
|
|
27727
26857
|
}
|
|
26858
|
+
const limits = limitFields(opts, now);
|
|
26859
|
+
if ("error" in limits) return limits;
|
|
27728
26860
|
return {
|
|
27729
26861
|
projectId,
|
|
27730
26862
|
operator: opts.operator,
|
|
27731
26863
|
cap,
|
|
27732
26864
|
requesterOfRecord: opts.requesterOfRecord,
|
|
27733
26865
|
ownerOverride: opts.ownerOverride,
|
|
27734
|
-
revokeRemovesControl: opts.revokeRemovesControl
|
|
26866
|
+
revokeRemovesControl: opts.revokeRemovesControl,
|
|
26867
|
+
...limits
|
|
27735
26868
|
};
|
|
27736
26869
|
}
|
|
27737
|
-
var projectGrantCommand =
|
|
27738
|
-
|
|
27739
|
-
).
|
|
27740
|
-
"--
|
|
27741
|
-
|
|
27742
|
-
)
|
|
27743
|
-
|
|
27744
|
-
|
|
27745
|
-
|
|
27746
|
-
|
|
27747
|
-
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
26870
|
+
var projectGrantCommand = withLimitFlags(
|
|
26871
|
+
new Command140("grant").description(
|
|
26872
|
+
"Grant a wallet (an agent or a person) the right to create tasks from the project's budget under the terms and limits below; a limit flag you leave out is no limit of that kind. It can spend only after it accepts, which freezes the terms (from contract revision 31 the operator accepts the limits with them); until then a new grant replaces them, and a revoked operator can be granted again, back to pending (costs 0.001 in the payment token; limits need contract revision 29 or later)"
|
|
26873
|
+
).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The wallet granted the right to spend the budget").option(
|
|
26874
|
+
"--cap <amount>",
|
|
26875
|
+
"The most the operator's tasks may draw from the budget in total, net of refunds (payouts keep counting, refunds free it), in the payment token (default: no cap beyond the budget)"
|
|
26876
|
+
).option(
|
|
26877
|
+
"--requester-of-record <who>",
|
|
26878
|
+
"Who is task.requester on the operator's tasks, whom ratings and reputation follow: owner or operator",
|
|
26879
|
+
"owner"
|
|
26880
|
+
).option(
|
|
26881
|
+
"--no-owner-override",
|
|
26882
|
+
"Only the operator acts on its tasks; by default the owner may also accept, reject or cancel them"
|
|
26883
|
+
).option(
|
|
26884
|
+
"--no-revoke-removes-control",
|
|
26885
|
+
"On revoke, let the operator finish the tasks it created instead of passing them to the owner"
|
|
26886
|
+
)
|
|
27752
26887
|
).action(async (id, opts) => {
|
|
27753
26888
|
const projectId = parseProjectId(id);
|
|
27754
26889
|
if (typeof projectId !== "number") return void printError(projectId.error);
|
|
@@ -27760,7 +26895,7 @@ var projectGrantCommand = new Command139("grant").description(
|
|
|
27760
26895
|
});
|
|
27761
26896
|
|
|
27762
26897
|
// src/commands/project/review.ts
|
|
27763
|
-
import { Command as
|
|
26898
|
+
import { Command as Command141 } from "commander";
|
|
27764
26899
|
function reviewEvaluator(opts) {
|
|
27765
26900
|
if (opts.evaluator !== void 0 && opts.off) {
|
|
27766
26901
|
return { error: "Pass --evaluator <address> or --off, not both" };
|
|
@@ -27775,7 +26910,7 @@ function reviewEvaluator(opts) {
|
|
|
27775
26910
|
}
|
|
27776
26911
|
return opts.evaluator;
|
|
27777
26912
|
}
|
|
27778
|
-
var projectReviewCommand = new
|
|
26913
|
+
var projectReviewCommand = new Command141("review").description(
|
|
27779
26914
|
"Read, set or clear the project's review default, as its owner. With an evaluator set, every task created through the API from the project gets that evaluator, and a project task that names a different one is refused. Enforced by the API, not the contract. Setting or clearing costs 0.001 in the payment token; reading is free"
|
|
27780
26915
|
).argument("<projectId>", "Project id").option("--evaluator <address>", "The evaluator every project task gets").option("--off", "Turn the review default off: each task's requester reviews it again").action(async (id, opts) => {
|
|
27781
26916
|
const projectId = parseProjectId(id);
|
|
@@ -27817,8 +26952,8 @@ async function ownerEvaluatorWarnings(evaluator) {
|
|
|
27817
26952
|
}
|
|
27818
26953
|
|
|
27819
26954
|
// src/commands/project/raise-cap.ts
|
|
27820
|
-
import { Command as
|
|
27821
|
-
var projectRaiseCapCommand = new
|
|
26955
|
+
import { Command as Command142 } from "commander";
|
|
26956
|
+
var projectRaiseCapCommand = new Command142("raise-cap").description(
|
|
27822
26957
|
"Advanced. Raise any operator's spending cap in place, as the project owner (costs 0.001 in the payment token). For the platform runner use `project automations on --cap <higher amount>`, which takes the same path. The new cap must be above the current one, which must be set; a cap is never lowered, and a revoked operator is granted again instead"
|
|
27823
26958
|
).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose cap to raise").requiredOption("--cap <amount>", "The new cap in the payment token, above the current cap").action(async (id, opts) => {
|
|
27824
26959
|
const projectId = parseProjectId(id);
|
|
@@ -27836,8 +26971,8 @@ var projectRaiseCapCommand = new Command141("raise-cap").description(
|
|
|
27836
26971
|
});
|
|
27837
26972
|
|
|
27838
26973
|
// src/commands/project/lower-cap.ts
|
|
27839
|
-
import { Command as
|
|
27840
|
-
var projectLowerCapCommand = new
|
|
26974
|
+
import { Command as Command143 } from "commander";
|
|
26975
|
+
var projectLowerCapCommand = new Command143("lower-cap").description(
|
|
27841
26976
|
"Advanced. Lower an operator's lifetime spending cap in place, as the project owner (costs 0.001 in the payment token; contract revision 29 or later). The new cap must be below the current one (any cap lowers a grant that has none) and at least what the operator already draws (committed). To raise a cap use `project raise-cap`; for the platform runner, `project automations on --cap`"
|
|
27842
26977
|
).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose cap to lower").requiredOption(
|
|
27843
26978
|
"--cap <amount>",
|
|
@@ -27858,68 +26993,6 @@ var projectLowerCapCommand = new Command142("lower-cap").description(
|
|
|
27858
26993
|
);
|
|
27859
26994
|
});
|
|
27860
26995
|
|
|
27861
|
-
// src/commands/project/limits.ts
|
|
27862
|
-
import { Command as Command143 } from "commander";
|
|
27863
|
-
function limitsBody(projectId, opts, now = /* @__PURE__ */ new Date()) {
|
|
27864
|
-
if (!ADDRESS.test(opts.operator)) {
|
|
27865
|
-
return { error: "--operator must be a wallet address (0x + 40 hex chars)" };
|
|
27866
|
-
}
|
|
27867
|
-
const body = { projectId, operator: opts.operator };
|
|
27868
|
-
if (opts.expires !== void 0) {
|
|
27869
|
-
const at = parseEndsAt(opts.expires, now, "--expires");
|
|
27870
|
-
if (typeof at !== "string") return at;
|
|
27871
|
-
body.expiresAt = Math.floor(new Date(at).getTime() / 1e3);
|
|
27872
|
-
}
|
|
27873
|
-
if (opts.modes !== void 0) {
|
|
27874
|
-
const modes = opts.modes.split(",").map((m) => m.trim().toLowerCase());
|
|
27875
|
-
const unknown = modes.filter((m) => !GRANT_MODE_NAMES.includes(m));
|
|
27876
|
-
if (modes.length === 0 || unknown.length > 0) {
|
|
27877
|
-
return { error: `--modes takes a comma-separated list of: ${GRANT_MODE_NAMES.join(", ")}` };
|
|
27878
|
-
}
|
|
27879
|
-
body.allowedModes = [...new Set(modes)];
|
|
27880
|
-
}
|
|
27881
|
-
if (opts.maxReward !== void 0) {
|
|
27882
|
-
const max = parseAmount(opts.maxReward, "--max-reward");
|
|
27883
|
-
if (typeof max !== "string") return max;
|
|
27884
|
-
if (BigInt(max) <= 0n) return { error: "--max-reward must be greater than zero" };
|
|
27885
|
-
body.maxRewardPerTask = max;
|
|
27886
|
-
}
|
|
27887
|
-
if (opts.periodBudget === void 0 !== (opts.period === void 0)) {
|
|
27888
|
-
return { error: "--period-budget and --period go together: pass both or neither" };
|
|
27889
|
-
}
|
|
27890
|
-
if (opts.periodBudget !== void 0 && opts.period !== void 0) {
|
|
27891
|
-
if (opts.period !== "weekly" && opts.period !== "monthly") {
|
|
27892
|
-
return { error: "--period must be weekly or monthly" };
|
|
27893
|
-
}
|
|
27894
|
-
const periodCap = parseAmount(opts.periodBudget, "--period-budget");
|
|
27895
|
-
if (typeof periodCap !== "string") return periodCap;
|
|
27896
|
-
if (BigInt(periodCap) <= 0n) return { error: "--period-budget must be greater than zero" };
|
|
27897
|
-
body.periodCap = periodCap;
|
|
27898
|
-
body.period = opts.period;
|
|
27899
|
-
}
|
|
27900
|
-
return body;
|
|
27901
|
-
}
|
|
27902
|
-
var projectLimitsCommand = new Command143("limits").description(
|
|
27903
|
-
"Advanced. Set all of an operator's limits as the project owner, stated whole: a flag you leave out is no limit of that kind (costs 0.001 in the payment token; contract revision 29 or later). The limits bound the operator on top of its cap: an expiry, the task modes it may create, the most one task may hold, and a budget per week or month. For the platform runner, `project automations on` takes --expires, --period-budget and --period"
|
|
27904
|
-
).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose limits to set").option(
|
|
27905
|
-
"--expires <time>",
|
|
27906
|
-
"The operator cannot draw after this time: ISO 8601 or a duration such as 30d"
|
|
27907
|
-
).option(
|
|
27908
|
-
"--modes <list>",
|
|
27909
|
-
`Task modes the operator may create, comma separated (${GRANT_MODE_NAMES.join(", ")}); default every mode`
|
|
27910
|
-
).option(
|
|
27911
|
-
"--max-reward <amount>",
|
|
27912
|
-
"The most one task may hold from the budget (reward plus evaluator stake), in the payment token"
|
|
27913
|
-
).option("--period-budget <amount>", "The most the operator may draw per period. Needs --period").option("--period <period>", "weekly (7 days) or monthly (30 days). Needs --period-budget").action(async (id, opts) => {
|
|
27914
|
-
const projectId = parseProjectId(id);
|
|
27915
|
-
if (typeof projectId !== "number") return void printError(projectId.error);
|
|
27916
|
-
const body = limitsBody(projectId, opts);
|
|
27917
|
-
if ("error" in body) return void printError(String(body.error));
|
|
27918
|
-
await postProjectWrite(`/api/projects/${projectId}/grants/${opts.operator}/limits`, body, {
|
|
27919
|
-
maxAmount: ACTION_FEE_MAX_AMOUNT
|
|
27920
|
-
});
|
|
27921
|
-
});
|
|
27922
|
-
|
|
27923
26996
|
// src/commands/project/revoke.ts
|
|
27924
26997
|
import { Command as Command144 } from "commander";
|
|
27925
26998
|
var projectRevokeCommand = new Command144("revoke").description(
|
|
@@ -28981,18 +28054,18 @@ var projectListCommand = new Command149("list").description(
|
|
|
28981
28054
|
if (before !== void 0) funding.set("before", String(before));
|
|
28982
28055
|
return void printResult(await apiGet(withChainId(`/api/projects?${funding.toString()}`)));
|
|
28983
28056
|
}
|
|
28984
|
-
let
|
|
28985
|
-
if (
|
|
28057
|
+
let address2 = opts.address;
|
|
28058
|
+
if (address2 === void 0) {
|
|
28986
28059
|
try {
|
|
28987
|
-
|
|
28060
|
+
address2 = (await loadKeystore()).walletAddress;
|
|
28988
28061
|
} catch {
|
|
28989
28062
|
return void printError(
|
|
28990
28063
|
"No keystore found. Run `taskmarket init` first, or pass --address."
|
|
28991
28064
|
);
|
|
28992
28065
|
}
|
|
28993
28066
|
}
|
|
28994
|
-
if (!ADDRESS.test(
|
|
28995
|
-
const params = new URLSearchParams({ address:
|
|
28067
|
+
if (!ADDRESS.test(address2)) return void printError("Invalid Ethereum address for --address");
|
|
28068
|
+
const params = new URLSearchParams({ address: address2, role: opts.role });
|
|
28996
28069
|
if (opts.open) params.set("status", "open");
|
|
28997
28070
|
if (opts.finished) params.set("status", "finished");
|
|
28998
28071
|
if (opts.limit !== void 0) params.set("limit", opts.limit.trim());
|
|
@@ -29637,11 +28710,14 @@ function submitCommandFor(kind) {
|
|
|
29637
28710
|
"listing-submission",
|
|
29638
28711
|
listingSubmissionWriteChange(kind, subject, signed)
|
|
29639
28712
|
);
|
|
29640
|
-
const
|
|
28713
|
+
const outcome = await x402FeePost(
|
|
29641
28714
|
kind === "catalog" ? "/api/catalog/submissions" : "/api/hooks/submissions",
|
|
29642
28715
|
{ chainId: selectedNetwork().chainId, ...body, ...proof }
|
|
29643
28716
|
);
|
|
29644
|
-
printResult(
|
|
28717
|
+
printResult(
|
|
28718
|
+
{ ...outcome.data, ...replayedFields(outcome), notice: NOTICE },
|
|
28719
|
+
{ idempotencyKey: outcome.idempotencyKey }
|
|
28720
|
+
);
|
|
29645
28721
|
} catch (error) {
|
|
29646
28722
|
return renderFailure(error);
|
|
29647
28723
|
}
|
|
@@ -29833,9 +28909,9 @@ var listCommand10 = new Command154("list").description(
|
|
|
29833
28909
|
);
|
|
29834
28910
|
var showCommand8 = new Command154("show").description(
|
|
29835
28911
|
"Show one hook on the selected --network: its registry listing, or its onchain observation marked unlisted"
|
|
29836
|
-
).argument("<address>", "Hook contract address").action(async (
|
|
28912
|
+
).argument("<address>", "Hook contract address").action(async (address2) => {
|
|
29837
28913
|
try {
|
|
29838
|
-
const input = parseInput(HookGetInputSchema, { address:
|
|
28914
|
+
const input = parseInput(HookGetInputSchema, { address: address2 });
|
|
29839
28915
|
const registry = await fetchHookRegistry(input.address.toLowerCase());
|
|
29840
28916
|
const wanted = input.address.toLowerCase();
|
|
29841
28917
|
const listed = registry.listed.find((hook) => hook.address.toLowerCase() === wanted);
|
|
@@ -29856,9 +28932,9 @@ var encodeConfigCommand = new Command154("encode-config").description(
|
|
|
29856
28932
|
).argument("<address>", "Hook contract address").requiredOption(
|
|
29857
28933
|
"--values <json>",
|
|
29858
28934
|
"The values as a JSON array in schema order, or a JSON object keyed by field name"
|
|
29859
|
-
).action(async (
|
|
28935
|
+
).action(async (address2, opts) => {
|
|
29860
28936
|
try {
|
|
29861
|
-
const input = parseInput(HookGetInputSchema, { address:
|
|
28937
|
+
const input = parseInput(HookGetInputSchema, { address: address2 });
|
|
29862
28938
|
const wanted = input.address.toLowerCase();
|
|
29863
28939
|
const registry = await fetchHookRegistry(wanted);
|
|
29864
28940
|
const entry = registry.listed.find((hook) => hook.address.toLowerCase() === wanted);
|