@solana/web3.js 1.18.1 → 1.19.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.esm.js +33 -0
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +33 -0
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +27 -0
- package/lib/index.esm.js +33 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +33 -0
- 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/module.flow.js +42 -16
- package/package.json +5 -5
- package/src/connection.ts +59 -0
package/lib/index.browser.esm.js
CHANGED
|
@@ -4876,6 +4876,17 @@ const GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(array(type({
|
|
|
4876
4876
|
memo: nullable(string()),
|
|
4877
4877
|
blockTime: optional(nullable(number()))
|
|
4878
4878
|
})));
|
|
4879
|
+
/**
|
|
4880
|
+
* Expected JSON RPC response for the "getSignaturesForAddress" message
|
|
4881
|
+
*/
|
|
4882
|
+
|
|
4883
|
+
const GetSignaturesForAddressRpcResult = jsonRpcResult(array(type({
|
|
4884
|
+
signature: string(),
|
|
4885
|
+
slot: number(),
|
|
4886
|
+
err: TransactionErrorResult,
|
|
4887
|
+
memo: nullable(string()),
|
|
4888
|
+
blockTime: optional(nullable(number()))
|
|
4889
|
+
})));
|
|
4879
4890
|
/***
|
|
4880
4891
|
* Expected JSON RPC response for the "accountNotification" message
|
|
4881
4892
|
*/
|
|
@@ -6461,6 +6472,28 @@ class Connection {
|
|
|
6461
6472
|
|
|
6462
6473
|
return res.result;
|
|
6463
6474
|
}
|
|
6475
|
+
/**
|
|
6476
|
+
* Returns confirmed signatures for transactions involving an
|
|
6477
|
+
* address backwards in time from the provided signature or most recent confirmed block
|
|
6478
|
+
*
|
|
6479
|
+
*
|
|
6480
|
+
* @param address queried address
|
|
6481
|
+
* @param options
|
|
6482
|
+
*/
|
|
6483
|
+
|
|
6484
|
+
|
|
6485
|
+
async getSignaturesForAddress(address, options, commitment) {
|
|
6486
|
+
const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);
|
|
6487
|
+
|
|
6488
|
+
const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);
|
|
6489
|
+
const res = create(unsafeRes, GetSignaturesForAddressRpcResult);
|
|
6490
|
+
|
|
6491
|
+
if ('error' in res) {
|
|
6492
|
+
throw new Error('failed to get signatures for address: ' + res.error.message);
|
|
6493
|
+
}
|
|
6494
|
+
|
|
6495
|
+
return res.result;
|
|
6496
|
+
}
|
|
6464
6497
|
/**
|
|
6465
6498
|
* Fetch the contents of a Nonce account from the cluster, return with context
|
|
6466
6499
|
*/
|