@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.cjs.js
CHANGED
|
@@ -1978,10 +1978,10 @@ class Transaction {
|
|
|
1978
1978
|
|
|
1979
1979
|
class TransactionMessage {
|
|
1980
1980
|
constructor(args) {
|
|
1981
|
-
this.
|
|
1981
|
+
this.payerKey = void 0;
|
|
1982
1982
|
this.instructions = void 0;
|
|
1983
1983
|
this.recentBlockhash = void 0;
|
|
1984
|
-
this.
|
|
1984
|
+
this.payerKey = args.payerKey;
|
|
1985
1985
|
this.instructions = args.instructions;
|
|
1986
1986
|
this.recentBlockhash = args.recentBlockhash;
|
|
1987
1987
|
}
|
|
@@ -2002,6 +2002,12 @@ class TransactionMessage {
|
|
|
2002
2002
|
const numWritableUnsignedAccounts = message.staticAccountKeys.length - numReadonlyUnsignedAccounts;
|
|
2003
2003
|
assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');
|
|
2004
2004
|
const accountKeys = message.getAccountKeys(args);
|
|
2005
|
+
const payerKey = accountKeys.get(0);
|
|
2006
|
+
|
|
2007
|
+
if (payerKey === undefined) {
|
|
2008
|
+
throw new Error('Failed to decompile message because no account keys were found');
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2005
2011
|
const instructions = [];
|
|
2006
2012
|
|
|
2007
2013
|
for (const compiledIx of compiledInstructions) {
|
|
@@ -2047,35 +2053,23 @@ class TransactionMessage {
|
|
|
2047
2053
|
}
|
|
2048
2054
|
|
|
2049
2055
|
return new TransactionMessage({
|
|
2050
|
-
|
|
2056
|
+
payerKey,
|
|
2051
2057
|
instructions,
|
|
2052
2058
|
recentBlockhash
|
|
2053
2059
|
});
|
|
2054
2060
|
}
|
|
2055
2061
|
|
|
2056
2062
|
compileToLegacyMessage() {
|
|
2057
|
-
const payerKey = this.accountKeys.get(0);
|
|
2058
|
-
|
|
2059
|
-
if (payerKey === undefined) {
|
|
2060
|
-
throw new Error('Failed to compile message because no account keys were found');
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
2063
|
return Message.compile({
|
|
2064
|
-
payerKey,
|
|
2064
|
+
payerKey: this.payerKey,
|
|
2065
2065
|
recentBlockhash: this.recentBlockhash,
|
|
2066
2066
|
instructions: this.instructions
|
|
2067
2067
|
});
|
|
2068
2068
|
}
|
|
2069
2069
|
|
|
2070
2070
|
compileToV0Message(addressLookupTableAccounts) {
|
|
2071
|
-
const payerKey = this.accountKeys.get(0);
|
|
2072
|
-
|
|
2073
|
-
if (payerKey === undefined) {
|
|
2074
|
-
throw new Error('Failed to compile message because no account keys were found');
|
|
2075
|
-
}
|
|
2076
|
-
|
|
2077
2071
|
return MessageV0.compile({
|
|
2078
|
-
payerKey,
|
|
2072
|
+
payerKey: this.payerKey,
|
|
2079
2073
|
recentBlockhash: this.recentBlockhash,
|
|
2080
2074
|
instructions: this.instructions,
|
|
2081
2075
|
addressLookupTableAccounts
|