@solana/web3.js 1.59.0 → 1.59.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/lib/index.browser.cjs.js +11 -17
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +11 -17
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +11 -17
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.esm.js +11 -17
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +11 -17
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +11 -17
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/transaction/message.ts +15 -24
package/lib/index.browser.esm.js
CHANGED
|
@@ -1942,10 +1942,10 @@ class Transaction {
|
|
|
1942
1942
|
|
|
1943
1943
|
class TransactionMessage {
|
|
1944
1944
|
constructor(args) {
|
|
1945
|
-
this.
|
|
1945
|
+
this.payerKey = void 0;
|
|
1946
1946
|
this.instructions = void 0;
|
|
1947
1947
|
this.recentBlockhash = void 0;
|
|
1948
|
-
this.
|
|
1948
|
+
this.payerKey = args.payerKey;
|
|
1949
1949
|
this.instructions = args.instructions;
|
|
1950
1950
|
this.recentBlockhash = args.recentBlockhash;
|
|
1951
1951
|
}
|
|
@@ -1966,6 +1966,12 @@ class TransactionMessage {
|
|
|
1966
1966
|
const numWritableUnsignedAccounts = message.staticAccountKeys.length - numReadonlyUnsignedAccounts;
|
|
1967
1967
|
assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');
|
|
1968
1968
|
const accountKeys = message.getAccountKeys(args);
|
|
1969
|
+
const payerKey = accountKeys.get(0);
|
|
1970
|
+
|
|
1971
|
+
if (payerKey === undefined) {
|
|
1972
|
+
throw new Error('Failed to decompile message because no account keys were found');
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1969
1975
|
const instructions = [];
|
|
1970
1976
|
|
|
1971
1977
|
for (const compiledIx of compiledInstructions) {
|
|
@@ -2011,35 +2017,23 @@ class TransactionMessage {
|
|
|
2011
2017
|
}
|
|
2012
2018
|
|
|
2013
2019
|
return new TransactionMessage({
|
|
2014
|
-
|
|
2020
|
+
payerKey,
|
|
2015
2021
|
instructions,
|
|
2016
2022
|
recentBlockhash
|
|
2017
2023
|
});
|
|
2018
2024
|
}
|
|
2019
2025
|
|
|
2020
2026
|
compileToLegacyMessage() {
|
|
2021
|
-
const payerKey = this.accountKeys.get(0);
|
|
2022
|
-
|
|
2023
|
-
if (payerKey === undefined) {
|
|
2024
|
-
throw new Error('Failed to compile message because no account keys were found');
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
2027
|
return Message.compile({
|
|
2028
|
-
payerKey,
|
|
2028
|
+
payerKey: this.payerKey,
|
|
2029
2029
|
recentBlockhash: this.recentBlockhash,
|
|
2030
2030
|
instructions: this.instructions
|
|
2031
2031
|
});
|
|
2032
2032
|
}
|
|
2033
2033
|
|
|
2034
2034
|
compileToV0Message(addressLookupTableAccounts) {
|
|
2035
|
-
const payerKey = this.accountKeys.get(0);
|
|
2036
|
-
|
|
2037
|
-
if (payerKey === undefined) {
|
|
2038
|
-
throw new Error('Failed to compile message because no account keys were found');
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
2035
|
return MessageV0.compile({
|
|
2042
|
-
payerKey,
|
|
2036
|
+
payerKey: this.payerKey,
|
|
2043
2037
|
recentBlockhash: this.recentBlockhash,
|
|
2044
2038
|
instructions: this.instructions,
|
|
2045
2039
|
addressLookupTableAccounts
|