@solana/kit 2.2.0-canary-20250708184753 → 2.2.1
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.browser.cjs +1 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.development.js +89 -117
- package/dist/index.development.js.map +1 -1
- package/dist/index.native.mjs +2 -2
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.node.cjs +1 -1
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +2 -2
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.production.min.js +515 -529
- package/dist/types/compute-limit-internal.d.ts +2 -2
- package/dist/types/compute-limit-internal.d.ts.map +1 -1
- package/dist/types/compute-limit.d.ts +2 -4
- package/dist/types/compute-limit.d.ts.map +1 -1
- package/package.json +19 -19
|
@@ -159,7 +159,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
159
159
|
var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;
|
|
160
160
|
var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;
|
|
161
161
|
var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;
|
|
162
|
-
var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = 5663020;
|
|
163
162
|
var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;
|
|
164
163
|
var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;
|
|
165
164
|
var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;
|
|
@@ -393,7 +392,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
393
392
|
[SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: "The provided value does not implement the `TransactionSendingSigner` interface",
|
|
394
393
|
[SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: "The provided value does not implement any of the `TransactionSigner` interfaces",
|
|
395
394
|
[SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: "More than one `TransactionSendingSigner` was identified.",
|
|
396
|
-
[SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: "No `TransactionSendingSigner` was identified. Please provide a valid `
|
|
395
|
+
[SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: "No `TransactionSendingSigner` was identified. Please provide a valid `ITransactionWithSingleSendingSigner` transaction.",
|
|
397
396
|
[SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: "Wallet account signers do not support signing multiple messages/transactions in a single operation",
|
|
398
397
|
[SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: "Cannot export a non-extractable key.",
|
|
399
398
|
[SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: "No digest implementation could be found.",
|
|
@@ -444,7 +443,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
444
443
|
[SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: "Attempted to sign a transaction with an address that is not a signer for it",
|
|
445
444
|
[SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: "Transaction is missing an address at index: $index.",
|
|
446
445
|
[SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: "Transaction has no expected signers therefore it cannot be encoded",
|
|
447
|
-
[SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT]: "Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",
|
|
448
446
|
[SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: "Transaction does not have a blockhash lifetime",
|
|
449
447
|
[SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: "Transaction is not a durable nonce transaction",
|
|
450
448
|
[SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
|
|
@@ -3427,9 +3425,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
3427
3425
|
return false;
|
|
3428
3426
|
},
|
|
3429
3427
|
get(target, p, receiver) {
|
|
3430
|
-
if (p === "then") {
|
|
3431
|
-
return void 0;
|
|
3432
|
-
}
|
|
3433
3428
|
return function(...rawParams) {
|
|
3434
3429
|
const methodName = p.toString();
|
|
3435
3430
|
const getApiPlan = Reflect.get(target, methodName, receiver);
|
|
@@ -4268,7 +4263,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
4268
4263
|
...config.headers ? normalizeHeaders2(config.headers) : void 0,
|
|
4269
4264
|
...{
|
|
4270
4265
|
// Keep these headers lowercase so they will override any user-supplied headers above.
|
|
4271
|
-
"solana-client": `js/${"2.2.
|
|
4266
|
+
"solana-client": `js/${"2.2.1"}`
|
|
4272
4267
|
}
|
|
4273
4268
|
}
|
|
4274
4269
|
}),
|
|
@@ -4538,9 +4533,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
4538
4533
|
return false;
|
|
4539
4534
|
},
|
|
4540
4535
|
get(target, p, receiver) {
|
|
4541
|
-
if (p === "then") {
|
|
4542
|
-
return void 0;
|
|
4543
|
-
}
|
|
4544
4536
|
return function(...rawParams) {
|
|
4545
4537
|
const notificationName = p.toString();
|
|
4546
4538
|
const createRpcSubscriptionPlan = Reflect.get(target, notificationName, receiver);
|
|
@@ -5435,20 +5427,49 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5435
5427
|
}
|
|
5436
5428
|
|
|
5437
5429
|
// ../rpc-types/dist/index.browser.mjs
|
|
5430
|
+
var memoizedBase58Encoder2;
|
|
5431
|
+
var memoizedBase58Decoder2;
|
|
5432
|
+
function getMemoizedBase58Encoder2() {
|
|
5433
|
+
if (!memoizedBase58Encoder2) memoizedBase58Encoder2 = getBase58Encoder();
|
|
5434
|
+
return memoizedBase58Encoder2;
|
|
5435
|
+
}
|
|
5436
|
+
function getMemoizedBase58Decoder2() {
|
|
5437
|
+
if (!memoizedBase58Decoder2) memoizedBase58Decoder2 = getBase58Decoder();
|
|
5438
|
+
return memoizedBase58Decoder2;
|
|
5439
|
+
}
|
|
5438
5440
|
function isBlockhash(putativeBlockhash) {
|
|
5439
|
-
|
|
5441
|
+
if (
|
|
5442
|
+
// Lowest value (32 bytes of zeroes)
|
|
5443
|
+
putativeBlockhash.length < 32 || // Highest value (32 bytes of 255)
|
|
5444
|
+
putativeBlockhash.length > 44
|
|
5445
|
+
) {
|
|
5446
|
+
return false;
|
|
5447
|
+
}
|
|
5448
|
+
const base58Encoder2 = getMemoizedBase58Encoder2();
|
|
5449
|
+
const bytes = base58Encoder2.encode(putativeBlockhash);
|
|
5450
|
+
const numBytes = bytes.byteLength;
|
|
5451
|
+
if (numBytes !== 32) {
|
|
5452
|
+
return false;
|
|
5453
|
+
}
|
|
5454
|
+
return true;
|
|
5440
5455
|
}
|
|
5441
5456
|
function assertIsBlockhash(putativeBlockhash) {
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5457
|
+
if (
|
|
5458
|
+
// Lowest value (32 bytes of zeroes)
|
|
5459
|
+
putativeBlockhash.length < 32 || // Highest value (32 bytes of 255)
|
|
5460
|
+
putativeBlockhash.length > 44
|
|
5461
|
+
) {
|
|
5462
|
+
throw new SolanaError(SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE, {
|
|
5463
|
+
actualLength: putativeBlockhash.length
|
|
5464
|
+
});
|
|
5465
|
+
}
|
|
5466
|
+
const base58Encoder2 = getMemoizedBase58Encoder2();
|
|
5467
|
+
const bytes = base58Encoder2.encode(putativeBlockhash);
|
|
5468
|
+
const numBytes = bytes.byteLength;
|
|
5469
|
+
if (numBytes !== 32) {
|
|
5470
|
+
throw new SolanaError(SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH, {
|
|
5471
|
+
actualLength: numBytes
|
|
5472
|
+
});
|
|
5452
5473
|
}
|
|
5453
5474
|
}
|
|
5454
5475
|
function blockhash(putativeBlockhash) {
|
|
@@ -5456,17 +5477,13 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5456
5477
|
return putativeBlockhash;
|
|
5457
5478
|
}
|
|
5458
5479
|
function getBlockhashEncoder() {
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
assertIsBlockhash(value);
|
|
5464
|
-
return addressEncoder.write(value, bytes, offset);
|
|
5465
|
-
}
|
|
5466
|
-
});
|
|
5480
|
+
return transformEncoder(
|
|
5481
|
+
fixEncoderSize(getMemoizedBase58Encoder2(), 32),
|
|
5482
|
+
(putativeBlockhash) => blockhash(putativeBlockhash)
|
|
5483
|
+
);
|
|
5467
5484
|
}
|
|
5468
5485
|
function getBlockhashDecoder() {
|
|
5469
|
-
return
|
|
5486
|
+
return fixDecoderSize(getMemoizedBase58Decoder2(), 32);
|
|
5470
5487
|
}
|
|
5471
5488
|
function getBlockhashCodec() {
|
|
5472
5489
|
return combineCodec(getBlockhashEncoder(), getBlockhashDecoder());
|
|
@@ -5608,7 +5625,14 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5608
5625
|
|
|
5609
5626
|
// ../transaction-messages/dist/index.browser.mjs
|
|
5610
5627
|
function isTransactionMessageWithBlockhashLifetime(transactionMessage) {
|
|
5611
|
-
|
|
5628
|
+
const lifetimeConstraintShapeMatches = "lifetimeConstraint" in transactionMessage && typeof transactionMessage.lifetimeConstraint.blockhash === "string" && typeof transactionMessage.lifetimeConstraint.lastValidBlockHeight === "bigint";
|
|
5629
|
+
if (!lifetimeConstraintShapeMatches) return false;
|
|
5630
|
+
try {
|
|
5631
|
+
assertIsBlockhash(transactionMessage.lifetimeConstraint.blockhash);
|
|
5632
|
+
return true;
|
|
5633
|
+
} catch {
|
|
5634
|
+
return false;
|
|
5635
|
+
}
|
|
5612
5636
|
}
|
|
5613
5637
|
function assertIsTransactionMessageWithBlockhashLifetime(transactionMessage) {
|
|
5614
5638
|
if (!isTransactionMessageWithBlockhashLifetime(transactionMessage)) {
|
|
@@ -5616,13 +5640,15 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
5616
5640
|
}
|
|
5617
5641
|
}
|
|
5618
5642
|
function setTransactionMessageLifetimeUsingBlockhash(blockhashLifetimeConstraint, transactionMessage) {
|
|
5619
|
-
if ("lifetimeConstraint" in transactionMessage && transactionMessage.lifetimeConstraint
|
|
5643
|
+
if ("lifetimeConstraint" in transactionMessage && transactionMessage.lifetimeConstraint.blockhash === blockhashLifetimeConstraint.blockhash && transactionMessage.lifetimeConstraint.lastValidBlockHeight === blockhashLifetimeConstraint.lastValidBlockHeight) {
|
|
5620
5644
|
return transactionMessage;
|
|
5621
5645
|
}
|
|
5622
|
-
|
|
5646
|
+
const out = {
|
|
5623
5647
|
...transactionMessage,
|
|
5624
5648
|
lifetimeConstraint: Object.freeze(blockhashLifetimeConstraint)
|
|
5625
|
-
}
|
|
5649
|
+
};
|
|
5650
|
+
Object.freeze(out);
|
|
5651
|
+
return out;
|
|
5626
5652
|
}
|
|
5627
5653
|
function assertValidBaseString2(alphabet4, testValue, givenValue = testValue) {
|
|
5628
5654
|
if (!testValue.match(new RegExp(`^[${alphabet4}]*$`))) {
|
|
@@ -6242,14 +6268,21 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6242
6268
|
updatedAnyInstructions ? { ...transactionMessage, instructions: newInstructions } : transactionMessage
|
|
6243
6269
|
);
|
|
6244
6270
|
}
|
|
6245
|
-
function createTransactionMessage(
|
|
6271
|
+
function createTransactionMessage({
|
|
6272
|
+
version
|
|
6273
|
+
}) {
|
|
6246
6274
|
return Object.freeze({
|
|
6247
6275
|
instructions: Object.freeze([]),
|
|
6248
|
-
version
|
|
6276
|
+
version
|
|
6249
6277
|
});
|
|
6250
6278
|
}
|
|
6251
6279
|
var RECENT_BLOCKHASHES_SYSVAR_ADDRESS = "SysvarRecentB1ockHashes11111111111111111111";
|
|
6252
6280
|
var SYSTEM_PROGRAM_ADDRESS = "11111111111111111111111111111111";
|
|
6281
|
+
function assertIsDurableNonceTransactionMessage(transactionMessage) {
|
|
6282
|
+
if (!isDurableNonceTransaction(transactionMessage)) {
|
|
6283
|
+
throw new SolanaError(SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6253
6286
|
function createAdvanceNonceAccountInstruction(nonceAccountAddress, nonceAuthorityAddress) {
|
|
6254
6287
|
return {
|
|
6255
6288
|
accounts: [
|
|
@@ -6276,14 +6309,9 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6276
6309
|
function isAdvanceNonceAccountInstructionData(data) {
|
|
6277
6310
|
return data.byteLength === 4 && data[0] === 4 && data[1] === 0 && data[2] === 0 && data[3] === 0;
|
|
6278
6311
|
}
|
|
6279
|
-
function
|
|
6312
|
+
function isDurableNonceTransaction(transactionMessage) {
|
|
6280
6313
|
return "lifetimeConstraint" in transactionMessage && typeof transactionMessage.lifetimeConstraint.nonce === "string" && transactionMessage.instructions[0] != null && isAdvanceNonceAccountInstruction(transactionMessage.instructions[0]);
|
|
6281
6314
|
}
|
|
6282
|
-
function assertIsTransactionMessageWithDurableNonceLifetime(transactionMessage) {
|
|
6283
|
-
if (!isTransactionMessageWithDurableNonceLifetime(transactionMessage)) {
|
|
6284
|
-
throw new SolanaError(SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
|
|
6285
|
-
}
|
|
6286
|
-
}
|
|
6287
6315
|
function isAdvanceNonceAccountInstructionForNonce(instruction, nonceAccountAddress, nonceAuthorityAddress) {
|
|
6288
6316
|
return instruction.accounts[0].address === nonceAccountAddress && instruction.accounts[2].address === nonceAuthorityAddress;
|
|
6289
6317
|
}
|
|
@@ -6296,7 +6324,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6296
6324
|
const firstInstruction = transactionMessage.instructions[0];
|
|
6297
6325
|
if (firstInstruction && isAdvanceNonceAccountInstruction(firstInstruction)) {
|
|
6298
6326
|
if (isAdvanceNonceAccountInstructionForNonce(firstInstruction, nonceAccountAddress, nonceAuthorityAddress)) {
|
|
6299
|
-
if (
|
|
6327
|
+
if (isDurableNonceTransaction(transactionMessage) && transactionMessage.lifetimeConstraint.nonce === nonce) {
|
|
6300
6328
|
return transactionMessage;
|
|
6301
6329
|
} else {
|
|
6302
6330
|
newInstructions = [firstInstruction, ...transactionMessage.instructions.slice(1)];
|
|
@@ -6316,7 +6344,9 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6316
6344
|
return Object.freeze({
|
|
6317
6345
|
...transactionMessage,
|
|
6318
6346
|
instructions: Object.freeze(newInstructions),
|
|
6319
|
-
lifetimeConstraint: Object.freeze({
|
|
6347
|
+
lifetimeConstraint: Object.freeze({
|
|
6348
|
+
nonce
|
|
6349
|
+
})
|
|
6320
6350
|
});
|
|
6321
6351
|
}
|
|
6322
6352
|
function setTransactionMessageFeePayer(feePayer, transactionMessage) {
|
|
@@ -6340,10 +6370,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6340
6370
|
function appendTransactionMessageInstructions(instructions, transactionMessage) {
|
|
6341
6371
|
return Object.freeze({
|
|
6342
6372
|
...transactionMessage,
|
|
6343
|
-
instructions: Object.freeze([
|
|
6344
|
-
...transactionMessage.instructions,
|
|
6345
|
-
...instructions
|
|
6346
|
-
])
|
|
6373
|
+
instructions: Object.freeze([...transactionMessage.instructions, ...instructions])
|
|
6347
6374
|
});
|
|
6348
6375
|
}
|
|
6349
6376
|
function prependTransactionMessageInstruction(instruction, transactionMessage) {
|
|
@@ -6352,10 +6379,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6352
6379
|
function prependTransactionMessageInstructions(instructions, transactionMessage) {
|
|
6353
6380
|
return Object.freeze({
|
|
6354
6381
|
...transactionMessage,
|
|
6355
|
-
instructions: Object.freeze([
|
|
6356
|
-
...instructions,
|
|
6357
|
-
...transactionMessage.instructions
|
|
6358
|
-
])
|
|
6382
|
+
instructions: Object.freeze([...instructions, ...transactionMessage.instructions])
|
|
6359
6383
|
});
|
|
6360
6384
|
}
|
|
6361
6385
|
function getAccountMetas(message) {
|
|
@@ -6502,15 +6526,12 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6502
6526
|
return pipe(
|
|
6503
6527
|
createTransactionMessage({ version: compiledTransactionMessage.version }),
|
|
6504
6528
|
(m) => setTransactionMessageFeePayer(feePayer, m),
|
|
6505
|
-
(m) => instructions.reduce(
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
),
|
|
6529
|
+
(m) => instructions.reduce((acc, instruction) => {
|
|
6530
|
+
return appendTransactionMessageInstruction(instruction, acc);
|
|
6531
|
+
}, m),
|
|
6509
6532
|
(m) => "blockhash" in lifetimeConstraint ? setTransactionMessageLifetimeUsingBlockhash(lifetimeConstraint, m) : setTransactionMessageLifetimeUsingDurableNonce(lifetimeConstraint, m)
|
|
6510
6533
|
);
|
|
6511
6534
|
}
|
|
6512
|
-
var assertIsDurableNonceTransactionMessage = assertIsTransactionMessageWithDurableNonceLifetime;
|
|
6513
|
-
var isDurableNonceTransaction = isTransactionMessageWithDurableNonceLifetime;
|
|
6514
6535
|
|
|
6515
6536
|
// ../transactions/dist/index.browser.mjs
|
|
6516
6537
|
function getSignaturesToEncode(signaturesMap) {
|
|
@@ -6603,11 +6624,12 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6603
6624
|
nonceAccountAddress: transactionMessage.instructions[0].accounts[0].address
|
|
6604
6625
|
};
|
|
6605
6626
|
}
|
|
6606
|
-
|
|
6627
|
+
const transaction = {
|
|
6607
6628
|
lifetimeConstraint,
|
|
6608
6629
|
messageBytes,
|
|
6609
6630
|
signatures: Object.freeze(signatures)
|
|
6610
|
-
}
|
|
6631
|
+
};
|
|
6632
|
+
return Object.freeze(transaction);
|
|
6611
6633
|
}
|
|
6612
6634
|
var base58Decoder;
|
|
6613
6635
|
function getSignatureFromTransaction(transaction) {
|
|
@@ -6665,14 +6687,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6665
6687
|
}
|
|
6666
6688
|
async function signTransaction(keyPairs, transaction) {
|
|
6667
6689
|
const out = await partiallySignTransaction(keyPairs, transaction);
|
|
6668
|
-
|
|
6690
|
+
assertTransactionIsFullySigned(out);
|
|
6669
6691
|
Object.freeze(out);
|
|
6670
6692
|
return out;
|
|
6671
6693
|
}
|
|
6672
|
-
function
|
|
6673
|
-
return Object.entries(transaction.signatures).every(([_, signatureBytes]) => !!signatureBytes);
|
|
6674
|
-
}
|
|
6675
|
-
function assertIsFullySignedTransaction(transaction) {
|
|
6694
|
+
function assertTransactionIsFullySigned(transaction) {
|
|
6676
6695
|
const missingSigs = [];
|
|
6677
6696
|
Object.entries(transaction.signatures).forEach(([address2, signatureBytes]) => {
|
|
6678
6697
|
if (!signatureBytes) {
|
|
@@ -6689,40 +6708,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6689
6708
|
const wireTransactionBytes = getTransactionEncoder().encode(transaction);
|
|
6690
6709
|
return getBase64Decoder().decode(wireTransactionBytes);
|
|
6691
6710
|
}
|
|
6692
|
-
var TRANSACTION_PACKET_SIZE = 1280;
|
|
6693
|
-
var TRANSACTION_PACKET_HEADER = 40 + 8;
|
|
6694
|
-
var TRANSACTION_SIZE_LIMIT = TRANSACTION_PACKET_SIZE - TRANSACTION_PACKET_HEADER;
|
|
6695
|
-
function getTransactionSize(transaction) {
|
|
6696
|
-
return getTransactionEncoder().getSizeFromValue(transaction);
|
|
6697
|
-
}
|
|
6698
|
-
function isTransactionWithinSizeLimit(transaction) {
|
|
6699
|
-
return getTransactionSize(transaction) <= TRANSACTION_SIZE_LIMIT;
|
|
6700
|
-
}
|
|
6701
|
-
function assertIsTransactionWithinSizeLimit(transaction) {
|
|
6702
|
-
const transactionSize = getTransactionSize(transaction);
|
|
6703
|
-
if (transactionSize > TRANSACTION_SIZE_LIMIT) {
|
|
6704
|
-
throw new SolanaError(SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT, {
|
|
6705
|
-
transactionSize,
|
|
6706
|
-
transactionSizeLimit: TRANSACTION_SIZE_LIMIT
|
|
6707
|
-
});
|
|
6708
|
-
}
|
|
6709
|
-
}
|
|
6710
|
-
function getTransactionMessageSize(transactionMessage) {
|
|
6711
|
-
return getTransactionSize(compileTransaction(transactionMessage));
|
|
6712
|
-
}
|
|
6713
|
-
function isTransactionMessageWithinSizeLimit(transactionMessage) {
|
|
6714
|
-
return getTransactionMessageSize(transactionMessage) <= TRANSACTION_SIZE_LIMIT;
|
|
6715
|
-
}
|
|
6716
|
-
function assertIsTransactionMessageWithinSizeLimit(transactionMessage) {
|
|
6717
|
-
const transactionSize = getTransactionMessageSize(transactionMessage);
|
|
6718
|
-
if (transactionSize > TRANSACTION_SIZE_LIMIT) {
|
|
6719
|
-
throw new SolanaError(SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT, {
|
|
6720
|
-
transactionSize,
|
|
6721
|
-
transactionSizeLimit: TRANSACTION_SIZE_LIMIT
|
|
6722
|
-
});
|
|
6723
|
-
}
|
|
6724
|
-
}
|
|
6725
|
-
var assertTransactionIsFullySigned = assertIsFullySignedTransaction;
|
|
6726
6711
|
|
|
6727
6712
|
// ../signers/dist/index.browser.mjs
|
|
6728
6713
|
function deduplicateSigners(signers) {
|
|
@@ -6937,7 +6922,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
6937
6922
|
}
|
|
6938
6923
|
async function signTransactionMessageWithSigners(transactionMessage, config) {
|
|
6939
6924
|
const signedTransaction = await partiallySignTransactionMessageWithSigners(transactionMessage, config);
|
|
6940
|
-
|
|
6925
|
+
assertTransactionIsFullySigned(signedTransaction);
|
|
6941
6926
|
return signedTransaction;
|
|
6942
6927
|
}
|
|
6943
6928
|
async function signAndSendTransactionMessageWithSigners(transaction, config) {
|
|
@@ -7009,14 +6994,15 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7009
6994
|
return signatures;
|
|
7010
6995
|
})
|
|
7011
6996
|
);
|
|
7012
|
-
|
|
6997
|
+
const signedTransaction = {
|
|
7013
6998
|
...modifiedTransaction,
|
|
7014
6999
|
signatures: Object.freeze(
|
|
7015
7000
|
signatureDictionaries.reduce((signatures, signatureDictionary) => {
|
|
7016
7001
|
return { ...signatures, ...signatureDictionary };
|
|
7017
7002
|
}, (_b = modifiedTransaction.signatures) != null ? _b : {})
|
|
7018
7003
|
)
|
|
7019
|
-
}
|
|
7004
|
+
};
|
|
7005
|
+
return Object.freeze(signedTransaction);
|
|
7020
7006
|
}
|
|
7021
7007
|
var o6 = globalThis.TextEncoder;
|
|
7022
7008
|
function createSignableMessage(content, signatures = {}) {
|
|
@@ -7369,7 +7355,7 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7369
7355
|
transactionMessage,
|
|
7370
7356
|
...simulateConfig
|
|
7371
7357
|
}) {
|
|
7372
|
-
const isDurableNonceTransactionMessage =
|
|
7358
|
+
const isDurableNonceTransactionMessage = isDurableNonceTransaction(transactionMessage);
|
|
7373
7359
|
let compilableTransactionMessage;
|
|
7374
7360
|
if (isDurableNonceTransactionMessage || isTransactionMessageWithBlockhashLifetime(transactionMessage)) {
|
|
7375
7361
|
compilableTransactionMessage = transactionMessage;
|
|
@@ -7836,7 +7822,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7836
7822
|
exports.SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION;
|
|
7837
7823
|
exports.SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING;
|
|
7838
7824
|
exports.SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES;
|
|
7839
|
-
exports.SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT = SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT;
|
|
7840
7825
|
exports.SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME;
|
|
7841
7826
|
exports.SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME;
|
|
7842
7827
|
exports.SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING;
|
|
@@ -7855,9 +7840,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7855
7840
|
exports.SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING;
|
|
7856
7841
|
exports.SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE;
|
|
7857
7842
|
exports.SolanaError = SolanaError;
|
|
7858
|
-
exports.TRANSACTION_PACKET_HEADER = TRANSACTION_PACKET_HEADER;
|
|
7859
|
-
exports.TRANSACTION_PACKET_SIZE = TRANSACTION_PACKET_SIZE;
|
|
7860
|
-
exports.TRANSACTION_SIZE_LIMIT = TRANSACTION_SIZE_LIMIT;
|
|
7861
7843
|
exports.addCodecSentinel = addCodecSentinel;
|
|
7862
7844
|
exports.addCodecSizePrefix = addCodecSizePrefix;
|
|
7863
7845
|
exports.addDecoderSentinel = addDecoderSentinel;
|
|
@@ -7881,7 +7863,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7881
7863
|
exports.assertIsBlockhash = assertIsBlockhash;
|
|
7882
7864
|
exports.assertIsDurableNonceTransactionMessage = assertIsDurableNonceTransactionMessage;
|
|
7883
7865
|
exports.assertIsFixedSize = assertIsFixedSize;
|
|
7884
|
-
exports.assertIsFullySignedTransaction = assertIsFullySignedTransaction;
|
|
7885
7866
|
exports.assertIsInstructionForProgram = assertIsInstructionForProgram;
|
|
7886
7867
|
exports.assertIsInstructionWithAccounts = assertIsInstructionWithAccounts;
|
|
7887
7868
|
exports.assertIsInstructionWithData = assertIsInstructionWithData;
|
|
@@ -7896,14 +7877,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
7896
7877
|
exports.assertIsStringifiedBigInt = assertIsStringifiedBigInt;
|
|
7897
7878
|
exports.assertIsStringifiedNumber = assertIsStringifiedNumber;
|
|
7898
7879
|
exports.assertIsTransactionMessageWithBlockhashLifetime = assertIsTransactionMessageWithBlockhashLifetime;
|
|
7899
|
-
exports.assertIsTransactionMessageWithDurableNonceLifetime = assertIsTransactionMessageWithDurableNonceLifetime;
|
|
7900
7880
|
exports.assertIsTransactionMessageWithSingleSendingSigner = assertIsTransactionMessageWithSingleSendingSigner;
|
|
7901
|
-
exports.assertIsTransactionMessageWithinSizeLimit = assertIsTransactionMessageWithinSizeLimit;
|
|
7902
7881
|
exports.assertIsTransactionModifyingSigner = assertIsTransactionModifyingSigner;
|
|
7903
7882
|
exports.assertIsTransactionPartialSigner = assertIsTransactionPartialSigner;
|
|
7904
7883
|
exports.assertIsTransactionSendingSigner = assertIsTransactionSendingSigner;
|
|
7905
7884
|
exports.assertIsTransactionSigner = assertIsTransactionSigner;
|
|
7906
|
-
exports.assertIsTransactionWithinSizeLimit = assertIsTransactionWithinSizeLimit;
|
|
7907
7885
|
exports.assertIsUnixTimestamp = assertIsUnixTimestamp;
|
|
7908
7886
|
exports.assertIsVariableSize = assertIsVariableSize;
|
|
7909
7887
|
exports.assertNumberIsBetweenForCodec = assertNumberIsBetweenForCodec;
|
|
@@ -8093,8 +8071,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
8093
8071
|
exports.getTransactionCodec = getTransactionCodec;
|
|
8094
8072
|
exports.getTransactionDecoder = getTransactionDecoder;
|
|
8095
8073
|
exports.getTransactionEncoder = getTransactionEncoder;
|
|
8096
|
-
exports.getTransactionMessageSize = getTransactionMessageSize;
|
|
8097
|
-
exports.getTransactionSize = getTransactionSize;
|
|
8098
8074
|
exports.getTransactionVersionCodec = getTransactionVersionCodec;
|
|
8099
8075
|
exports.getTransactionVersionDecoder = getTransactionVersionDecoder;
|
|
8100
8076
|
exports.getTransactionVersionEncoder = getTransactionVersionEncoder;
|
|
@@ -8130,7 +8106,6 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
8130
8106
|
exports.isBlockhash = isBlockhash;
|
|
8131
8107
|
exports.isDurableNonceTransaction = isDurableNonceTransaction;
|
|
8132
8108
|
exports.isFixedSize = isFixedSize;
|
|
8133
|
-
exports.isFullySignedTransaction = isFullySignedTransaction;
|
|
8134
8109
|
exports.isInstructionForProgram = isInstructionForProgram;
|
|
8135
8110
|
exports.isInstructionWithAccounts = isInstructionWithAccounts;
|
|
8136
8111
|
exports.isInstructionWithData = isInstructionWithData;
|
|
@@ -8152,14 +8127,11 @@ this.globalThis.solanaWeb3 = (function (exports) {
|
|
|
8152
8127
|
exports.isStringifiedBigInt = isStringifiedBigInt;
|
|
8153
8128
|
exports.isStringifiedNumber = isStringifiedNumber;
|
|
8154
8129
|
exports.isTransactionMessageWithBlockhashLifetime = isTransactionMessageWithBlockhashLifetime;
|
|
8155
|
-
exports.isTransactionMessageWithDurableNonceLifetime = isTransactionMessageWithDurableNonceLifetime;
|
|
8156
8130
|
exports.isTransactionMessageWithSingleSendingSigner = isTransactionMessageWithSingleSendingSigner;
|
|
8157
|
-
exports.isTransactionMessageWithinSizeLimit = isTransactionMessageWithinSizeLimit;
|
|
8158
8131
|
exports.isTransactionModifyingSigner = isTransactionModifyingSigner;
|
|
8159
8132
|
exports.isTransactionPartialSigner = isTransactionPartialSigner;
|
|
8160
8133
|
exports.isTransactionSendingSigner = isTransactionSendingSigner;
|
|
8161
8134
|
exports.isTransactionSigner = isTransactionSigner;
|
|
8162
|
-
exports.isTransactionWithinSizeLimit = isTransactionWithinSizeLimit;
|
|
8163
8135
|
exports.isUnixTimestamp = isUnixTimestamp;
|
|
8164
8136
|
exports.isVariableSize = isVariableSize;
|
|
8165
8137
|
exports.isWritableRole = isWritableRole;
|