@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.native.js
CHANGED
|
@@ -7772,13 +7772,22 @@ class Connection {
|
|
|
7772
7772
|
*
|
|
7773
7773
|
* @param publicKey Public key of the account to monitor
|
|
7774
7774
|
* @param callback Function to invoke whenever the account is changed
|
|
7775
|
-
* @param
|
|
7775
|
+
* @param config
|
|
7776
7776
|
* @return subscription id
|
|
7777
7777
|
*/
|
|
7778
|
-
|
|
7778
|
+
|
|
7779
|
+
/** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
|
|
7780
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7781
|
+
|
|
7782
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7783
|
+
onAccountChange(publicKey, callback, commitmentOrConfig) {
|
|
7784
|
+
const {
|
|
7785
|
+
commitment,
|
|
7786
|
+
config
|
|
7787
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
7779
7788
|
const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',
|
|
7780
7789
|
// Apply connection/server default.
|
|
7781
|
-
'base64');
|
|
7790
|
+
'base64', config);
|
|
7782
7791
|
return this._makeSubscription({
|
|
7783
7792
|
callback,
|
|
7784
7793
|
method: 'accountSubscribe',
|
|
@@ -7815,15 +7824,23 @@ class Connection {
|
|
|
7815
7824
|
*
|
|
7816
7825
|
* @param programId Public key of the program to monitor
|
|
7817
7826
|
* @param callback Function to invoke whenever the account is changed
|
|
7818
|
-
* @param
|
|
7819
|
-
* @param filters The program account filters to pass into the RPC method
|
|
7827
|
+
* @param config
|
|
7820
7828
|
* @return subscription id
|
|
7821
7829
|
*/
|
|
7822
|
-
|
|
7830
|
+
|
|
7831
|
+
/** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
|
|
7832
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7833
|
+
|
|
7834
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7835
|
+
onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
|
|
7836
|
+
const {
|
|
7837
|
+
commitment,
|
|
7838
|
+
config
|
|
7839
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
7823
7840
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
7824
7841
|
// Apply connection/server default.
|
|
7825
|
-
'base64' /* encoding */,
|
|
7826
|
-
filters:
|
|
7842
|
+
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
7843
|
+
filters: maybeFilters
|
|
7827
7844
|
} : undefined /* extra */);
|
|
7828
7845
|
return this._makeSubscription({
|
|
7829
7846
|
callback,
|