@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.browser.esm.js
CHANGED
|
@@ -7746,13 +7746,22 @@ class Connection {
|
|
|
7746
7746
|
*
|
|
7747
7747
|
* @param publicKey Public key of the account to monitor
|
|
7748
7748
|
* @param callback Function to invoke whenever the account is changed
|
|
7749
|
-
* @param
|
|
7749
|
+
* @param config
|
|
7750
7750
|
* @return subscription id
|
|
7751
7751
|
*/
|
|
7752
|
-
|
|
7752
|
+
|
|
7753
|
+
/** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
|
|
7754
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7755
|
+
|
|
7756
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7757
|
+
onAccountChange(publicKey, callback, commitmentOrConfig) {
|
|
7758
|
+
const {
|
|
7759
|
+
commitment,
|
|
7760
|
+
config
|
|
7761
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
7753
7762
|
const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',
|
|
7754
7763
|
// Apply connection/server default.
|
|
7755
|
-
'base64');
|
|
7764
|
+
'base64', config);
|
|
7756
7765
|
return this._makeSubscription({
|
|
7757
7766
|
callback,
|
|
7758
7767
|
method: 'accountSubscribe',
|
|
@@ -7789,15 +7798,23 @@ class Connection {
|
|
|
7789
7798
|
*
|
|
7790
7799
|
* @param programId Public key of the program to monitor
|
|
7791
7800
|
* @param callback Function to invoke whenever the account is changed
|
|
7792
|
-
* @param
|
|
7793
|
-
* @param filters The program account filters to pass into the RPC method
|
|
7801
|
+
* @param config
|
|
7794
7802
|
* @return subscription id
|
|
7795
7803
|
*/
|
|
7796
|
-
|
|
7804
|
+
|
|
7805
|
+
/** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
|
|
7806
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7807
|
+
|
|
7808
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7809
|
+
onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
|
|
7810
|
+
const {
|
|
7811
|
+
commitment,
|
|
7812
|
+
config
|
|
7813
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
7797
7814
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
7798
7815
|
// Apply connection/server default.
|
|
7799
|
-
'base64' /* encoding */,
|
|
7800
|
-
filters:
|
|
7816
|
+
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
7817
|
+
filters: maybeFilters
|
|
7801
7818
|
} : undefined /* extra */);
|
|
7802
7819
|
return this._makeSubscription({
|
|
7803
7820
|
callback,
|