@solana/web3.js 1.49.0 → 1.50.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 +43 -6
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +43 -6
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +43 -6
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +16 -3
- package/lib/index.esm.js +43 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +43 -6
- 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 +43 -6
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +46 -6
package/lib/index.iife.js
CHANGED
|
@@ -21960,8 +21960,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
21960
21960
|
*/
|
|
21961
21961
|
|
|
21962
21962
|
|
|
21963
|
-
async getParsedTransaction(signature,
|
|
21964
|
-
const
|
|
21963
|
+
async getParsedTransaction(signature, commitmentOrConfig) {
|
|
21964
|
+
const {
|
|
21965
|
+
commitment,
|
|
21966
|
+
config
|
|
21967
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
21968
|
+
|
|
21969
|
+
const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);
|
|
21965
21970
|
|
|
21966
21971
|
const unsafeRes = await this._rpcRequest('getTransaction', args);
|
|
21967
21972
|
const res = create(unsafeRes, GetParsedTransactionRpcResult);
|
|
@@ -21977,9 +21982,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
21977
21982
|
*/
|
|
21978
21983
|
|
|
21979
21984
|
|
|
21980
|
-
async getParsedTransactions(signatures,
|
|
21985
|
+
async getParsedTransactions(signatures, commitmentOrConfig) {
|
|
21986
|
+
const {
|
|
21987
|
+
commitment,
|
|
21988
|
+
config
|
|
21989
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
21981
21990
|
const batch = signatures.map(signature => {
|
|
21982
|
-
const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');
|
|
21991
|
+
const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed', config);
|
|
21983
21992
|
|
|
21984
21993
|
return {
|
|
21985
21994
|
methodName: 'getTransaction',
|
|
@@ -22004,9 +22013,15 @@ var solanaWeb3 = (function (exports) {
|
|
|
22004
22013
|
*/
|
|
22005
22014
|
|
|
22006
22015
|
|
|
22007
|
-
async getTransactions(signatures,
|
|
22016
|
+
async getTransactions(signatures, commitmentOrConfig) {
|
|
22017
|
+
const {
|
|
22018
|
+
commitment,
|
|
22019
|
+
config
|
|
22020
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
22008
22021
|
const batch = signatures.map(signature => {
|
|
22009
|
-
const args = this._buildArgsAtLeastConfirmed([signature], commitment
|
|
22022
|
+
const args = this._buildArgsAtLeastConfirmed([signature], commitment, undefined
|
|
22023
|
+
/* encoding */
|
|
22024
|
+
, config);
|
|
22010
22025
|
|
|
22011
22026
|
return {
|
|
22012
22027
|
methodName: 'getTransaction',
|
|
@@ -22448,6 +22463,28 @@ var solanaWeb3 = (function (exports) {
|
|
|
22448
22463
|
this._pollingBlockhash = false;
|
|
22449
22464
|
}
|
|
22450
22465
|
}
|
|
22466
|
+
/**
|
|
22467
|
+
* get the stake minimum delegation
|
|
22468
|
+
*/
|
|
22469
|
+
|
|
22470
|
+
|
|
22471
|
+
async getStakeMinimumDelegation(config) {
|
|
22472
|
+
const {
|
|
22473
|
+
commitment,
|
|
22474
|
+
config: configArg
|
|
22475
|
+
} = extractCommitmentFromConfig(config);
|
|
22476
|
+
|
|
22477
|
+
const args = this._buildArgs([], commitment, 'base64', configArg);
|
|
22478
|
+
|
|
22479
|
+
const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);
|
|
22480
|
+
const res = create(unsafeRes, jsonRpcResultAndContext(number()));
|
|
22481
|
+
|
|
22482
|
+
if ('error' in res) {
|
|
22483
|
+
throw new SolanaJSONRPCError(res.error, `failed to get stake minimum delegation`);
|
|
22484
|
+
}
|
|
22485
|
+
|
|
22486
|
+
return res.result;
|
|
22487
|
+
}
|
|
22451
22488
|
/**
|
|
22452
22489
|
* Simulate a transaction
|
|
22453
22490
|
*/
|