@solana/web3.js 1.51.0 → 1.52.0
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 +9 -2
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +9 -2
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +9 -2
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +8 -2
- package/lib/index.esm.js +9 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +9 -2
- 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 +9 -2
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +9 -2
- package/src/fee-calculator.ts +2 -0
package/lib/index.d.ts
CHANGED
|
@@ -184,6 +184,8 @@ declare module '@solana/web3.js' {
|
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
186
|
* Calculator for transaction fees.
|
|
187
|
+
*
|
|
188
|
+
* @deprecated Deprecated since Solana v1.8.0.
|
|
187
189
|
*/
|
|
188
190
|
interface FeeCalculator {
|
|
189
191
|
/** Cost in lamports to validate a signature. */
|
|
@@ -794,6 +796,8 @@ declare module '@solana/web3.js' {
|
|
|
794
796
|
};
|
|
795
797
|
/**
|
|
796
798
|
* A confirmed transaction on the ledger
|
|
799
|
+
*
|
|
800
|
+
* @deprecated Deprecated since Solana v1.8.0.
|
|
797
801
|
*/
|
|
798
802
|
export type ConfirmedTransaction = {
|
|
799
803
|
/** The slot during which the transaction was processed */
|
|
@@ -914,7 +918,9 @@ declare module '@solana/web3.js' {
|
|
|
914
918
|
blockTime: number | null;
|
|
915
919
|
};
|
|
916
920
|
/**
|
|
917
|
-
* A
|
|
921
|
+
* A confirmed block on the ledger
|
|
922
|
+
*
|
|
923
|
+
* @deprecated Deprecated since Solana v1.8.0.
|
|
918
924
|
*/
|
|
919
925
|
export type ConfirmedBlock = {
|
|
920
926
|
/** Blockhash of this block */
|
|
@@ -1546,7 +1552,7 @@ declare module '@solana/web3.js' {
|
|
|
1546
1552
|
*/
|
|
1547
1553
|
getParsedAccountInfo(
|
|
1548
1554
|
publicKey: PublicKey,
|
|
1549
|
-
|
|
1555
|
+
commitmentOrConfig?: Commitment | GetAccountInfoConfig,
|
|
1550
1556
|
): Promise<
|
|
1551
1557
|
RpcResponseAndContext<AccountInfo<Buffer | ParsedAccountData> | null>
|
|
1552
1558
|
>;
|
package/lib/index.esm.js
CHANGED
|
@@ -2254,6 +2254,8 @@ function decodeData(type, buffer) {
|
|
|
2254
2254
|
const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');
|
|
2255
2255
|
/**
|
|
2256
2256
|
* Calculator for transaction fees.
|
|
2257
|
+
*
|
|
2258
|
+
* @deprecated Deprecated since Solana v1.8.0.
|
|
2257
2259
|
*/
|
|
2258
2260
|
|
|
2259
2261
|
/**
|
|
@@ -6347,8 +6349,13 @@ class Connection {
|
|
|
6347
6349
|
*/
|
|
6348
6350
|
|
|
6349
6351
|
|
|
6350
|
-
async getParsedAccountInfo(publicKey,
|
|
6351
|
-
const
|
|
6352
|
+
async getParsedAccountInfo(publicKey, commitmentOrConfig) {
|
|
6353
|
+
const {
|
|
6354
|
+
commitment,
|
|
6355
|
+
config
|
|
6356
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
6357
|
+
|
|
6358
|
+
const args = this._buildArgs([publicKey.toBase58()], commitment, 'jsonParsed', config);
|
|
6352
6359
|
|
|
6353
6360
|
const unsafeRes = await this._rpcRequest('getAccountInfo', args);
|
|
6354
6361
|
const res = create(unsafeRes, jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)));
|