@solana/kit 5.2.0-canary-20251219213520 → 5.2.0-canary-20251228203229
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/index.development.js +30 -2
- package/dist/index.development.js.map +1 -1
- package/dist/index.production.min.js +621 -620
- package/package.json +22 -22
|
@@ -224,6 +224,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
224
224
|
var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE = 7618001;
|
|
225
225
|
var SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN = 7618002;
|
|
226
226
|
var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN = 7618003;
|
|
227
|
+
var SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED = 7618004;
|
|
227
228
|
var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;
|
|
228
229
|
var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;
|
|
229
230
|
var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;
|
|
@@ -366,6 +367,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
366
367
|
[SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: "Unsupported sysvar",
|
|
367
368
|
[SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND]: "Invalid instruction plan kind: $kind.",
|
|
368
369
|
[SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN]: "The provided instruction plan is empty.",
|
|
370
|
+
[SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED]: "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.",
|
|
369
371
|
[SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN]: "The provided transaction plan failed to execute. See the `transactionPlanResult` attribute and the `cause` error for more details.",
|
|
370
372
|
[SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN]: "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).",
|
|
371
373
|
[SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND]: "Invalid transaction plan kind: $kind.",
|
|
@@ -5024,6 +5026,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5024
5026
|
abortSignal,
|
|
5025
5027
|
canceled: (_a = abortSignal == null ? void 0 : abortSignal.aborted) != null ? _a : false
|
|
5026
5028
|
};
|
|
5029
|
+
assertDivisibleSequentialPlansOnly(plan);
|
|
5027
5030
|
const cancelHandler = () => {
|
|
5028
5031
|
context.canceled = true;
|
|
5029
5032
|
};
|
|
@@ -5058,12 +5061,15 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5058
5061
|
}
|
|
5059
5062
|
}
|
|
5060
5063
|
async function traverseSequential(transactionPlan, context) {
|
|
5064
|
+
if (!transactionPlan.divisible) {
|
|
5065
|
+
throw new SolanaError(SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED);
|
|
5066
|
+
}
|
|
5061
5067
|
const results = [];
|
|
5062
5068
|
for (const subPlan of transactionPlan.plans) {
|
|
5063
5069
|
const result = await traverse(subPlan, context);
|
|
5064
5070
|
results.push(result);
|
|
5065
5071
|
}
|
|
5066
|
-
return
|
|
5072
|
+
return sequentialTransactionPlanResult(results);
|
|
5067
5073
|
}
|
|
5068
5074
|
async function traverseParallel(transactionPlan, context) {
|
|
5069
5075
|
const results = await Promise.all(transactionPlan.plans.map((plan) => traverse(plan, context)));
|
|
@@ -5103,6 +5109,27 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5103
5109
|
}
|
|
5104
5110
|
}
|
|
5105
5111
|
}
|
|
5112
|
+
function assertDivisibleSequentialPlansOnly(transactionPlan) {
|
|
5113
|
+
const kind = transactionPlan.kind;
|
|
5114
|
+
switch (kind) {
|
|
5115
|
+
case "sequential":
|
|
5116
|
+
if (!transactionPlan.divisible) {
|
|
5117
|
+
throw new SolanaError(SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED);
|
|
5118
|
+
}
|
|
5119
|
+
for (const subPlan of transactionPlan.plans) {
|
|
5120
|
+
assertDivisibleSequentialPlansOnly(subPlan);
|
|
5121
|
+
}
|
|
5122
|
+
return;
|
|
5123
|
+
case "parallel":
|
|
5124
|
+
for (const subPlan of transactionPlan.plans) {
|
|
5125
|
+
assertDivisibleSequentialPlansOnly(subPlan);
|
|
5126
|
+
}
|
|
5127
|
+
return;
|
|
5128
|
+
case "single":
|
|
5129
|
+
default:
|
|
5130
|
+
return;
|
|
5131
|
+
}
|
|
5132
|
+
}
|
|
5106
5133
|
function parallelTransactionPlan(plans) {
|
|
5107
5134
|
return Object.freeze({ kind: "parallel", plans: parseSingleTransactionPlans(plans) });
|
|
5108
5135
|
}
|
|
@@ -7104,7 +7131,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7104
7131
|
...config.headers ? normalizeHeaders2(config.headers) : void 0,
|
|
7105
7132
|
...{
|
|
7106
7133
|
// Keep these headers lowercase so they will override any user-supplied headers above.
|
|
7107
|
-
"solana-client": `js/${"5.2.0-canary-
|
|
7134
|
+
"solana-client": `js/${"5.2.0-canary-20251228203229"}`
|
|
7108
7135
|
}
|
|
7109
7136
|
}
|
|
7110
7137
|
}),
|
|
@@ -9175,6 +9202,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
9175
9202
|
exports.SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN = SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN;
|
|
9176
9203
|
exports.SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN = SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN;
|
|
9177
9204
|
exports.SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE = SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE;
|
|
9205
|
+
exports.SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED = SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED;
|
|
9178
9206
|
exports.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS;
|
|
9179
9207
|
exports.SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA;
|
|
9180
9208
|
exports.SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH;
|