@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.cjs.js
CHANGED
|
@@ -8469,13 +8469,22 @@ class Connection {
|
|
|
8469
8469
|
*
|
|
8470
8470
|
* @param publicKey Public key of the account to monitor
|
|
8471
8471
|
* @param callback Function to invoke whenever the account is changed
|
|
8472
|
-
* @param
|
|
8472
|
+
* @param config
|
|
8473
8473
|
* @return subscription id
|
|
8474
8474
|
*/
|
|
8475
|
-
|
|
8475
|
+
|
|
8476
|
+
/** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
|
|
8477
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8478
|
+
|
|
8479
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8480
|
+
onAccountChange(publicKey, callback, commitmentOrConfig) {
|
|
8481
|
+
const {
|
|
8482
|
+
commitment,
|
|
8483
|
+
config
|
|
8484
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
8476
8485
|
const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',
|
|
8477
8486
|
// Apply connection/server default.
|
|
8478
|
-
'base64');
|
|
8487
|
+
'base64', config);
|
|
8479
8488
|
return this._makeSubscription({
|
|
8480
8489
|
callback,
|
|
8481
8490
|
method: 'accountSubscribe',
|
|
@@ -8512,15 +8521,23 @@ class Connection {
|
|
|
8512
8521
|
*
|
|
8513
8522
|
* @param programId Public key of the program to monitor
|
|
8514
8523
|
* @param callback Function to invoke whenever the account is changed
|
|
8515
|
-
* @param
|
|
8516
|
-
* @param filters The program account filters to pass into the RPC method
|
|
8524
|
+
* @param config
|
|
8517
8525
|
* @return subscription id
|
|
8518
8526
|
*/
|
|
8519
|
-
|
|
8527
|
+
|
|
8528
|
+
/** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
|
|
8529
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8530
|
+
|
|
8531
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
8532
|
+
onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
|
|
8533
|
+
const {
|
|
8534
|
+
commitment,
|
|
8535
|
+
config
|
|
8536
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
8520
8537
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
8521
8538
|
// Apply connection/server default.
|
|
8522
|
-
'base64' /* encoding */,
|
|
8523
|
-
filters:
|
|
8539
|
+
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
8540
|
+
filters: maybeFilters
|
|
8524
8541
|
} : undefined /* extra */);
|
|
8525
8542
|
return this._makeSubscription({
|
|
8526
8543
|
callback,
|