@solana/web3.js 1.41.1 → 1.41.2
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 +501 -371
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +501 -371
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +501 -371
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +37 -22
- package/lib/index.esm.js +501 -371
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +533 -612
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -23
- package/lib/index.iife.min.js.map +1 -1
- package/package.json +8 -5
- package/src/connection.ts +657 -486
package/lib/index.d.ts
CHANGED
|
@@ -527,6 +527,7 @@ declare module '@solana/web3.js' {
|
|
|
527
527
|
static populate(message: Message, signatures?: Array<string>): Transaction;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
+
export type ClientSubscriptionId = number;
|
|
530
531
|
export type TokenAccountsFilter =
|
|
531
532
|
| {
|
|
532
533
|
mint: PublicKey;
|
|
@@ -2001,13 +2002,15 @@ declare module '@solana/web3.js' {
|
|
|
2001
2002
|
publicKey: PublicKey,
|
|
2002
2003
|
callback: AccountChangeCallback,
|
|
2003
2004
|
commitment?: Commitment,
|
|
2004
|
-
):
|
|
2005
|
+
): ClientSubscriptionId;
|
|
2005
2006
|
/**
|
|
2006
2007
|
* Deregister an account notification callback
|
|
2007
2008
|
*
|
|
2008
|
-
* @param id subscription id to deregister
|
|
2009
|
+
* @param id client subscription id to deregister
|
|
2009
2010
|
*/
|
|
2010
|
-
removeAccountChangeListener(
|
|
2011
|
+
removeAccountChangeListener(
|
|
2012
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2013
|
+
): Promise<void>;
|
|
2011
2014
|
/**
|
|
2012
2015
|
* Register a callback to be invoked whenever accounts owned by the
|
|
2013
2016
|
* specified program change
|
|
@@ -2023,13 +2026,15 @@ declare module '@solana/web3.js' {
|
|
|
2023
2026
|
callback: ProgramAccountChangeCallback,
|
|
2024
2027
|
commitment?: Commitment,
|
|
2025
2028
|
filters?: GetProgramAccountsFilter[],
|
|
2026
|
-
):
|
|
2029
|
+
): ClientSubscriptionId;
|
|
2027
2030
|
/**
|
|
2028
2031
|
* Deregister an account notification callback
|
|
2029
2032
|
*
|
|
2030
|
-
* @param id subscription id to deregister
|
|
2033
|
+
* @param id client subscription id to deregister
|
|
2031
2034
|
*/
|
|
2032
|
-
removeProgramAccountChangeListener(
|
|
2035
|
+
removeProgramAccountChangeListener(
|
|
2036
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2037
|
+
): Promise<void>;
|
|
2033
2038
|
/**
|
|
2034
2039
|
* Registers a callback to be invoked whenever logs are emitted.
|
|
2035
2040
|
*/
|
|
@@ -2037,26 +2042,30 @@ declare module '@solana/web3.js' {
|
|
|
2037
2042
|
filter: LogsFilter,
|
|
2038
2043
|
callback: LogsCallback,
|
|
2039
2044
|
commitment?: Commitment,
|
|
2040
|
-
):
|
|
2045
|
+
): ClientSubscriptionId;
|
|
2041
2046
|
/**
|
|
2042
2047
|
* Deregister a logs callback.
|
|
2043
2048
|
*
|
|
2044
|
-
* @param id subscription id to deregister.
|
|
2049
|
+
* @param id client subscription id to deregister.
|
|
2045
2050
|
*/
|
|
2046
|
-
removeOnLogsListener(
|
|
2051
|
+
removeOnLogsListener(
|
|
2052
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2053
|
+
): Promise<void>;
|
|
2047
2054
|
/**
|
|
2048
2055
|
* Register a callback to be invoked upon slot changes
|
|
2049
2056
|
*
|
|
2050
2057
|
* @param callback Function to invoke whenever the slot changes
|
|
2051
2058
|
* @return subscription id
|
|
2052
2059
|
*/
|
|
2053
|
-
onSlotChange(callback: SlotChangeCallback):
|
|
2060
|
+
onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId;
|
|
2054
2061
|
/**
|
|
2055
2062
|
* Deregister a slot notification callback
|
|
2056
2063
|
*
|
|
2057
|
-
* @param id subscription id to deregister
|
|
2064
|
+
* @param id client subscription id to deregister
|
|
2058
2065
|
*/
|
|
2059
|
-
removeSlotChangeListener(
|
|
2066
|
+
removeSlotChangeListener(
|
|
2067
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2068
|
+
): Promise<void>;
|
|
2060
2069
|
/**
|
|
2061
2070
|
* Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s
|
|
2062
2071
|
* may be useful to track live progress of a cluster.
|
|
@@ -2064,13 +2073,15 @@ declare module '@solana/web3.js' {
|
|
|
2064
2073
|
* @param callback Function to invoke whenever the slot updates
|
|
2065
2074
|
* @return subscription id
|
|
2066
2075
|
*/
|
|
2067
|
-
onSlotUpdate(callback: SlotUpdateCallback):
|
|
2076
|
+
onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId;
|
|
2068
2077
|
/**
|
|
2069
2078
|
* Deregister a slot update notification callback
|
|
2070
2079
|
*
|
|
2071
|
-
* @param id subscription id to deregister
|
|
2080
|
+
* @param id client subscription id to deregister
|
|
2072
2081
|
*/
|
|
2073
|
-
removeSlotUpdateListener(
|
|
2082
|
+
removeSlotUpdateListener(
|
|
2083
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2084
|
+
): Promise<void>;
|
|
2074
2085
|
_buildArgs(
|
|
2075
2086
|
args: Array<any>,
|
|
2076
2087
|
override?: Commitment,
|
|
@@ -2089,7 +2100,7 @@ declare module '@solana/web3.js' {
|
|
|
2089
2100
|
signature: TransactionSignature,
|
|
2090
2101
|
callback: SignatureResultCallback,
|
|
2091
2102
|
commitment?: Commitment,
|
|
2092
|
-
):
|
|
2103
|
+
): ClientSubscriptionId;
|
|
2093
2104
|
/**
|
|
2094
2105
|
* Register a callback to be invoked when a transaction is
|
|
2095
2106
|
* received and/or processed.
|
|
@@ -2104,26 +2115,30 @@ declare module '@solana/web3.js' {
|
|
|
2104
2115
|
signature: TransactionSignature,
|
|
2105
2116
|
callback: SignatureSubscriptionCallback,
|
|
2106
2117
|
options?: SignatureSubscriptionOptions,
|
|
2107
|
-
):
|
|
2118
|
+
): ClientSubscriptionId;
|
|
2108
2119
|
/**
|
|
2109
2120
|
* Deregister a signature notification callback
|
|
2110
2121
|
*
|
|
2111
|
-
* @param id subscription id to deregister
|
|
2122
|
+
* @param id client subscription id to deregister
|
|
2112
2123
|
*/
|
|
2113
|
-
removeSignatureListener(
|
|
2124
|
+
removeSignatureListener(
|
|
2125
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2126
|
+
): Promise<void>;
|
|
2114
2127
|
/**
|
|
2115
2128
|
* Register a callback to be invoked upon root changes
|
|
2116
2129
|
*
|
|
2117
2130
|
* @param callback Function to invoke whenever the root changes
|
|
2118
2131
|
* @return subscription id
|
|
2119
2132
|
*/
|
|
2120
|
-
onRootChange(callback: RootChangeCallback):
|
|
2133
|
+
onRootChange(callback: RootChangeCallback): ClientSubscriptionId;
|
|
2121
2134
|
/**
|
|
2122
2135
|
* Deregister a root notification callback
|
|
2123
2136
|
*
|
|
2124
|
-
* @param id subscription id to deregister
|
|
2137
|
+
* @param id client subscription id to deregister
|
|
2125
2138
|
*/
|
|
2126
|
-
removeRootChangeListener(
|
|
2139
|
+
removeRootChangeListener(
|
|
2140
|
+
clientSubscriptionId: ClientSubscriptionId,
|
|
2141
|
+
): Promise<void>;
|
|
2127
2142
|
}
|
|
2128
2143
|
|
|
2129
2144
|
export const BPF_LOADER_PROGRAM_ID: PublicKey;
|