@solana/web3.js 1.93.1 → 1.93.3
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 +25 -8
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +25 -8
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +25 -8
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +115 -83
- package/lib/index.esm.js +25 -8
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +25 -8
- 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 +25 -8
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/__forks__/browser/fetch-impl.ts +3 -3
- package/src/__forks__/react-native/fetch-impl.ts +3 -3
- package/src/connection.ts +74 -6
package/lib/index.esm.js
CHANGED
|
@@ -8439,13 +8439,22 @@ class Connection {
|
|
|
8439
8439
|
*
|
|
8440
8440
|
* @param publicKey Public key of the account to monitor
|
|
8441
8441
|
* @param callback Function to invoke whenever the account is changed
|
|
8442
|
-
* @param
|
|
8442
|
+
* @param config
|
|
8443
8443
|
* @return subscription id
|
|
8444
8444
|
*/
|
|
8445
|
-
|
|
8445
|
+
|
|
8446
|
+
/** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
|
|
8447
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8448
|
+
|
|
8449
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8450
|
+
onAccountChange(publicKey, callback, commitmentOrConfig) {
|
|
8451
|
+
const {
|
|
8452
|
+
commitment,
|
|
8453
|
+
config
|
|
8454
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
8446
8455
|
const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',
|
|
8447
8456
|
// Apply connection/server default.
|
|
8448
|
-
'base64');
|
|
8457
|
+
'base64', config);
|
|
8449
8458
|
return this._makeSubscription({
|
|
8450
8459
|
callback,
|
|
8451
8460
|
method: 'accountSubscribe',
|
|
@@ -8482,15 +8491,23 @@ class Connection {
|
|
|
8482
8491
|
*
|
|
8483
8492
|
* @param programId Public key of the program to monitor
|
|
8484
8493
|
* @param callback Function to invoke whenever the account is changed
|
|
8485
|
-
* @param
|
|
8486
|
-
* @param filters The program account filters to pass into the RPC method
|
|
8494
|
+
* @param config
|
|
8487
8495
|
* @return subscription id
|
|
8488
8496
|
*/
|
|
8489
|
-
|
|
8497
|
+
|
|
8498
|
+
/** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
|
|
8499
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8500
|
+
|
|
8501
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8502
|
+
onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
|
|
8503
|
+
const {
|
|
8504
|
+
commitment,
|
|
8505
|
+
config
|
|
8506
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
8490
8507
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
8491
8508
|
// Apply connection/server default.
|
|
8492
|
-
'base64' /* encoding */,
|
|
8493
|
-
filters:
|
|
8509
|
+
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
8510
|
+
filters: maybeFilters
|
|
8494
8511
|
} : undefined /* extra */);
|
|
8495
8512
|
return this._makeSubscription({
|
|
8496
8513
|
callback,
|