@solana/web3.js 1.67.0 → 1.67.2
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 +8 -4
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +8 -4
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +8 -4
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +7 -3
- package/lib/index.esm.js +8 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +8 -4
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +8 -4
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -3
- package/src/account.ts +1 -1
- package/src/connection.ts +2 -2
- package/src/message/legacy.ts +4 -4
- package/src/publickey.ts +6 -2
- package/src/transaction/message.ts +3 -1
package/lib/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare module '@solana/web3.js' {
|
|
|
46
46
|
*/
|
|
47
47
|
constructor(value: PublicKeyInitData);
|
|
48
48
|
/**
|
|
49
|
-
* Returns a unique PublicKey for tests and benchmarks using
|
|
49
|
+
* Returns a unique PublicKey for tests and benchmarks using a counter
|
|
50
50
|
*/
|
|
51
51
|
static unique(): PublicKey;
|
|
52
52
|
/**
|
|
@@ -95,6 +95,8 @@ declare module '@solana/web3.js' {
|
|
|
95
95
|
/**
|
|
96
96
|
* Async version of createProgramAddressSync
|
|
97
97
|
* For backwards compatibility
|
|
98
|
+
*
|
|
99
|
+
* @deprecated Use {@link createProgramAddressSync} instead
|
|
98
100
|
*/
|
|
99
101
|
static createProgramAddress(
|
|
100
102
|
seeds: Array<Buffer | Uint8Array>,
|
|
@@ -114,6 +116,8 @@ declare module '@solana/web3.js' {
|
|
|
114
116
|
/**
|
|
115
117
|
* Async version of findProgramAddressSync
|
|
116
118
|
* For backwards compatibility
|
|
119
|
+
*
|
|
120
|
+
* @deprecated Use {@link findProgramAddressSync} instead
|
|
117
121
|
*/
|
|
118
122
|
static findProgramAddress(
|
|
119
123
|
seeds: Array<Buffer | Uint8Array>,
|
|
@@ -139,7 +143,7 @@ declare module '@solana/web3.js' {
|
|
|
139
143
|
*
|
|
140
144
|
* @param secretKey Secret key for the account
|
|
141
145
|
*/
|
|
142
|
-
constructor(secretKey?:
|
|
146
|
+
constructor(secretKey?: Uint8Array | Array<number>);
|
|
143
147
|
/**
|
|
144
148
|
* The public key for this account
|
|
145
149
|
*/
|
|
@@ -3530,7 +3534,7 @@ declare module '@solana/web3.js' {
|
|
|
3530
3534
|
* Fetch the fee for a message from the cluster, return with context
|
|
3531
3535
|
*/
|
|
3532
3536
|
getFeeForMessage(
|
|
3533
|
-
message:
|
|
3537
|
+
message: VersionedMessage,
|
|
3534
3538
|
commitment?: Commitment,
|
|
3535
3539
|
): Promise<RpcResponseAndContext<number>>;
|
|
3536
3540
|
/**
|
package/lib/index.esm.js
CHANGED
|
@@ -150,13 +150,13 @@ class PublicKey extends Struct {
|
|
|
150
150
|
this._bn = new BN(value);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
if (this._bn.byteLength() >
|
|
153
|
+
if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {
|
|
154
154
|
throw new Error(`Invalid public key input`);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
|
-
* Returns a unique PublicKey for tests and benchmarks using
|
|
159
|
+
* Returns a unique PublicKey for tests and benchmarks using a counter
|
|
160
160
|
*/
|
|
161
161
|
|
|
162
162
|
|
|
@@ -263,6 +263,8 @@ class PublicKey extends Struct {
|
|
|
263
263
|
/**
|
|
264
264
|
* Async version of createProgramAddressSync
|
|
265
265
|
* For backwards compatibility
|
|
266
|
+
*
|
|
267
|
+
* @deprecated Use {@link createProgramAddressSync} instead
|
|
266
268
|
*/
|
|
267
269
|
|
|
268
270
|
/* eslint-disable require-await */
|
|
@@ -305,6 +307,8 @@ class PublicKey extends Struct {
|
|
|
305
307
|
/**
|
|
306
308
|
* Async version of findProgramAddressSync
|
|
307
309
|
* For backwards compatibility
|
|
310
|
+
*
|
|
311
|
+
* @deprecated Use {@link findProgramAddressSync} instead
|
|
308
312
|
*/
|
|
309
313
|
|
|
310
314
|
|
|
@@ -2020,7 +2024,7 @@ class TransactionMessage {
|
|
|
2020
2024
|
} = header;
|
|
2021
2025
|
const numWritableSignedAccounts = numRequiredSignatures - numReadonlySignedAccounts;
|
|
2022
2026
|
assert(numWritableSignedAccounts > 0, 'Message header is invalid');
|
|
2023
|
-
const numWritableUnsignedAccounts = message.staticAccountKeys.length - numReadonlyUnsignedAccounts;
|
|
2027
|
+
const numWritableUnsignedAccounts = message.staticAccountKeys.length - numRequiredSignatures - numReadonlyUnsignedAccounts;
|
|
2024
2028
|
assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');
|
|
2025
2029
|
const accountKeys = message.getAccountKeys(args);
|
|
2026
2030
|
const payerKey = accountKeys.get(0);
|
|
@@ -6042,7 +6046,7 @@ class Connection {
|
|
|
6042
6046
|
|
|
6043
6047
|
|
|
6044
6048
|
async getFeeForMessage(message, commitment) {
|
|
6045
|
-
const wireMessage = message.serialize().toString('base64');
|
|
6049
|
+
const wireMessage = toBuffer(message.serialize()).toString('base64');
|
|
6046
6050
|
|
|
6047
6051
|
const args = this._buildArgs([wireMessage], commitment);
|
|
6048
6052
|
|