@defillama/sdk 5.0.236 → 5.0.240
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/package.json +3 -3
- package/build/Balances.d.ts +0 -139
- package/build/Balances.js +0 -363
- package/build/ChainApi.d.ts +0 -142
- package/build/ChainApi.js +0 -297
- package/build/abi/abi2.d.ts +0 -5
- package/build/abi/abi2.js +0 -215
- package/build/abi/cachedABIs.d.ts +0 -4
- package/build/abi/cachedABIs.js +0 -8
- package/build/abi/convertResults.d.ts +0 -5
- package/build/abi/convertResults.js +0 -60
- package/build/abi/index.d.ts +0 -31
- package/build/abi/index.js +0 -327
- package/build/abi/multicall.d.ts +0 -23
- package/build/abi/multicall.js +0 -382
- package/build/abi/multicall3.d.ts +0 -7
- package/build/abi/multicall3.js +0 -397
- package/build/abi/rpcCall.d.ts +0 -4
- package/build/abi/rpcCall.js +0 -62
- package/build/abi/tron.d.ts +0 -33
- package/build/abi/tron.js +0 -110
- package/build/api.d.ts +0 -10
- package/build/api.js +0 -45
- package/build/api2.d.ts +0 -5
- package/build/api2.js +0 -41
- package/build/chains/algorand.d.ts +0 -277
- package/build/chains/algorand.js +0 -618
- package/build/chains/aptos.d.ts +0 -230
- package/build/chains/aptos.js +0 -612
- package/build/chains/cardano.d.ts +0 -242
- package/build/chains/cardano.js +0 -407
- package/build/chains/cosmos.d.ts +0 -252
- package/build/chains/cosmos.js +0 -618
- package/build/chains/icp.d.ts +0 -235
- package/build/chains/icp.js +0 -1040
- package/build/chains/index.d.ts +0 -23
- package/build/chains/index.js +0 -59
- package/build/chains/near.d.ts +0 -192
- package/build/chains/near.js +0 -446
- package/build/chains/rpc.d.ts +0 -125
- package/build/chains/rpc.js +0 -326
- package/build/chains/starknet.d.ts +0 -205
- package/build/chains/starknet.js +0 -884
- package/build/chains/stellar.d.ts +0 -410
- package/build/chains/stellar.js +0 -1082
- package/build/chains/substrate.d.ts +0 -333
- package/build/chains/substrate.js +0 -1042
- package/build/chains/sui.d.ts +0 -365
- package/build/chains/sui.js +0 -1135
- package/build/chains/svm.d.ts +0 -340
- package/build/chains/svm.js +0 -760
- package/build/chains/tezos.d.ts +0 -225
- package/build/chains/tezos.js +0 -412
- package/build/chains/ton.d.ts +0 -353
- package/build/chains/ton.js +0 -788
- package/build/chains/tron.d.ts +0 -45
- package/build/chains/tron.js +0 -110
- package/build/chains/utxo.d.ts +0 -202
- package/build/chains/utxo.js +0 -592
- package/build/chains/xrpl.d.ts +0 -179
- package/build/chains/xrpl.js +0 -467
- package/build/computeTVL/blocks.d.ts +0 -1
- package/build/computeTVL/blocks.js +0 -12
- package/build/computeTVL/humanizeNumber.d.ts +0 -1
- package/build/computeTVL/humanizeNumber.js +0 -19
- package/build/erc20/index.d.ts +0 -31
- package/build/erc20/index.js +0 -56
- package/build/eth/index.d.ts +0 -22
- package/build/eth/index.js +0 -118
- package/build/general.d.ts +0 -5
- package/build/general.js +0 -20
- package/build/generalUtil.d.ts +0 -8
- package/build/generalUtil.js +0 -73
- package/build/index.d.ts +0 -32
- package/build/index.js +0 -74
- package/build/providers.json +0 -1
- package/build/types.d.ts +0 -76
- package/build/types.js +0 -2
- package/build/util/LlamaProvider.d.ts +0 -46
- package/build/util/LlamaProvider.js +0 -365
- package/build/util/blocks.d.ts +0 -36
- package/build/util/blocks.js +0 -292
- package/build/util/cache.d.ts +0 -45
- package/build/util/cache.js +0 -309
- package/build/util/chainUtils/data.json +0 -1356
- package/build/util/chainUtils/index.d.ts +0 -11
- package/build/util/chainUtils/index.js +0 -136
- package/build/util/coins.d.ts +0 -19
- package/build/util/coins.js +0 -113
- package/build/util/common.d.ts +0 -34
- package/build/util/common.js +0 -373
- package/build/util/computeTVL.d.ts +0 -19
- package/build/util/computeTVL.js +0 -102
- package/build/util/cosmos.d.ts +0 -1
- package/build/util/cosmos.js +0 -8
- package/build/util/debugLog.d.ts +0 -4
- package/build/util/debugLog.js +0 -18
- package/build/util/discord.d.ts +0 -1
- package/build/util/discord.js +0 -33
- package/build/util/elastic.d.ts +0 -43
- package/build/util/elastic.js +0 -113
- package/build/util/env.d.ts +0 -19
- package/build/util/env.js +0 -158
- package/build/util/graph.d.ts +0 -8
- package/build/util/graph.js +0 -50
- package/build/util/index.d.ts +0 -32
- package/build/util/index.js +0 -227
- package/build/util/indexer.compatibility.d.ts +0 -6
- package/build/util/indexer.compatibility.js +0 -64
- package/build/util/indexer.d.ts +0 -92
- package/build/util/indexer.js +0 -744
- package/build/util/indexerSql.d.ts +0 -9
- package/build/util/indexerSql.js +0 -102
- package/build/util/internal-cache.d.ts +0 -11
- package/build/util/internal-cache.js +0 -77
- package/build/util/logs.d.ts +0 -55
- package/build/util/logs.decode.shared.d.ts +0 -8
- package/build/util/logs.decode.shared.js +0 -289
- package/build/util/logs.js +0 -401
- package/build/util/promisePool.d.ts +0 -8
- package/build/util/promisePool.js +0 -31
- package/build/util/r2.d.ts +0 -4
- package/build/util/r2.js +0 -52
- package/build/util/removeRedundantRPCs.d.ts +0 -1
- package/build/util/removeRedundantRPCs.js +0 -49
- package/build/util/transactions.d.ts +0 -35
- package/build/util/transactions.js +0 -22
- package/build/util/updateChainLabels.d.ts +0 -1
- package/build/util/updateChainLabels.js +0 -5
- package/build/util/updateProviderList.d.ts +0 -1
- package/build/util/updateProviderList.js +0 -274
package/build/chains/svm.d.ts
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
/** Built-in endpoints, overridable with `<CHAIN>_RPC` (also `SDK_` / `LLAMA_SDK_` prefixed). */
|
|
2
|
-
export declare const DEFAULT_ENDPOINTS: Record<string, string>;
|
|
3
|
-
export declare const svmChains: string[];
|
|
4
|
-
export declare function isSvmChain(chain: string): boolean;
|
|
5
|
-
export interface ChainOptions {
|
|
6
|
-
/** chain key, default 'solana' */
|
|
7
|
-
chain?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface EndpointOptions extends ChainOptions {
|
|
10
|
-
/** solana only: prefer `SOLANA_RPC_CLIENT` when set (mirrors adapters' getConnection) */
|
|
11
|
-
isClient?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Endpoint list for a chain: `<CHAIN>_RPC` env wins, then `DEFAULT_ENDPOINTS`.
|
|
15
|
-
* For solana with `isClient`, `SOLANA_RPC_CLIENT` is checked first.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getEndpoints({ chain, isClient }?: EndpointOptions): string[];
|
|
18
|
-
export declare function getEndpoint(options?: EndpointOptions): string;
|
|
19
|
-
export declare const TOKEN_PROGRAM_ID = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
20
|
-
export declare const TOKEN_2022_PROGRAM_ID = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
21
|
-
export declare const ASSOCIATED_TOKEN_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
22
|
-
export declare const STAKE_PROGRAM_ID = "Stake11111111111111111111111111111111111111";
|
|
23
|
-
export declare const SYSTEM_PROGRAM_ID = "11111111111111111111111111111111";
|
|
24
|
-
export declare const SYSVAR_RENT_ID = "SysvarRent111111111111111111111111111111111";
|
|
25
|
-
export declare const MINT_ACCOUNT_SIZE = 82;
|
|
26
|
-
export declare const TOKEN_ACCOUNT_SIZE = 165;
|
|
27
|
-
export declare const LAMPORTS_PER_SOL = 1000000000;
|
|
28
|
-
/** Bitcoin-style base58 (leading zero bytes become leading '1's). */
|
|
29
|
-
export declare function base58Encode(bytes: Uint8Array | Buffer): string;
|
|
30
|
-
export declare function base58Decode(str: string): Uint8Array;
|
|
31
|
-
export declare function isValidPublicKey(str: any): boolean;
|
|
32
|
-
/** Little-endian u64 -> bigint, works on any Uint8Array (not only Buffer). */
|
|
33
|
-
export declare function readBigUInt64LE(buffer: Uint8Array, offset?: number): bigint;
|
|
34
|
-
/**
|
|
35
|
-
* Fixed point I80F48 (signed i128, 48 fractional bits) -> number.
|
|
36
|
-
* Accepts a bigint / decimal string, `{ val }` / `{ value }` wrappers (anchor BN
|
|
37
|
-
* style) or the 16 little-endian bytes of the raw i128.
|
|
38
|
-
*/
|
|
39
|
-
export declare function i80f48ToNumber(i80f48: {
|
|
40
|
-
val?: bigint | string | number[] | Uint8Array;
|
|
41
|
-
value?: any;
|
|
42
|
-
} | bigint | string | number[] | Uint8Array): number;
|
|
43
|
-
/** Little-endian I80F48 at `offset` (marginfi WrappedI80F48). */
|
|
44
|
-
export declare function readI80F48(buf: Buffer, offset: number): number;
|
|
45
|
-
export interface MintAccount {
|
|
46
|
-
mintAuthority: string | null;
|
|
47
|
-
supply: string;
|
|
48
|
-
decimals: number;
|
|
49
|
-
isInitialized: boolean;
|
|
50
|
-
freezeAuthority: string | null;
|
|
51
|
-
}
|
|
52
|
-
export interface TokenAccount {
|
|
53
|
-
mint: string;
|
|
54
|
-
owner: string;
|
|
55
|
-
amount: string;
|
|
56
|
-
delegate: string | null;
|
|
57
|
-
/** 0 uninitialized, 1 initialized, 2 frozen */
|
|
58
|
-
state: number;
|
|
59
|
-
isNative: string | null;
|
|
60
|
-
delegatedAmount: string;
|
|
61
|
-
closeAuthority: string | null;
|
|
62
|
-
}
|
|
63
|
-
/** Decode an SPL / Token-2022 mint account (first 82 bytes; extensions are ignored). */
|
|
64
|
-
export declare function decodeMintAccount(buf: Buffer | Uint8Array): MintAccount;
|
|
65
|
-
/** Decode an SPL / Token-2022 token account (first 165 bytes; extensions are ignored). */
|
|
66
|
-
export declare function decodeTokenAccount(buf: Buffer | Uint8Array): TokenAccount;
|
|
67
|
-
/**
|
|
68
|
-
* Currently-effective UI multiplier of a Token-2022 mint with the ScaledUiAmount
|
|
69
|
-
* extension, or 1 for a classic SPL mint / a mint without this extension.
|
|
70
|
-
*/
|
|
71
|
-
export declare function readScaledUiMultiplier(data: Buffer, nowSeconds?: number): number;
|
|
72
|
-
/** SPL stake pool: `total_lamports` u64 at offset 258, `pool_token_supply` u64 at 266. */
|
|
73
|
-
export declare function decodeStakePool(buf: Buffer): {
|
|
74
|
-
totalLamports: string;
|
|
75
|
-
poolTokenSupply: string;
|
|
76
|
-
};
|
|
77
|
-
/** Read the 32-byte pubkey at `offset` of a base64 encoded account payload. */
|
|
78
|
-
export declare function extractPubkey(base64Data: string, offset: number): string;
|
|
79
|
-
/**
|
|
80
|
-
* True when the 32 bytes decompress to a point on the ed25519 curve
|
|
81
|
-
* (curve25519-dalek `CompressedEdwardsY::decompress` semantics). A PDA must be
|
|
82
|
-
* off-curve so it can never have a private key.
|
|
83
|
-
*/
|
|
84
|
-
export declare function isOnCurve(pubkey: string | Uint8Array | Buffer): boolean;
|
|
85
|
-
/** True when PDA derivation is delegated to an installed `@solana/web3.js`. */
|
|
86
|
-
export declare function usesWeb3js(): boolean;
|
|
87
|
-
/** sha256(seeds || programId || "ProgramDerivedAddress"); throws when the result is on-curve. */
|
|
88
|
-
export declare function createProgramAddress(seeds: (Buffer | Uint8Array | string)[], programId: string, bump?: number): string;
|
|
89
|
-
/** Find the first off-curve address for `seeds`, walking bump 255 -> 0. */
|
|
90
|
-
export declare function findProgramAddress(seeds: (Buffer | Uint8Array | string)[], programId: string): [string, number];
|
|
91
|
-
export declare function getAssociatedTokenAddress({ mint, owner, programId, associatedTokenProgramId }: {
|
|
92
|
-
mint: string;
|
|
93
|
-
owner: string;
|
|
94
|
-
programId?: string;
|
|
95
|
-
associatedTokenProgramId?: string;
|
|
96
|
-
}): string;
|
|
97
|
-
export type Commitment = 'processed' | 'confirmed' | 'finalized';
|
|
98
|
-
export type Encoding = 'base64' | 'base58' | 'base64+zstd' | 'jsonParsed';
|
|
99
|
-
export interface AccountInfo<T = any> {
|
|
100
|
-
lamports: number;
|
|
101
|
-
owner: string;
|
|
102
|
-
/** `[payload, encoding]` for binary encodings, an object for `jsonParsed` */
|
|
103
|
-
data: T;
|
|
104
|
-
executable: boolean;
|
|
105
|
-
rentEpoch: number;
|
|
106
|
-
space?: number;
|
|
107
|
-
}
|
|
108
|
-
export interface CallOptions extends ChainOptions {
|
|
109
|
-
method: string;
|
|
110
|
-
params?: any[];
|
|
111
|
-
/** appended as `{ commitment }` to the last params object when set */
|
|
112
|
-
commitment?: Commitment;
|
|
113
|
-
timeout?: number;
|
|
114
|
-
retries?: number;
|
|
115
|
-
}
|
|
116
|
-
/** Raw JSON-RPC call against the chain's endpoints (rate limited per chain, retried). */
|
|
117
|
-
export declare function call({ chain, method, params, commitment, timeout, retries }: CallOptions): Promise<any>;
|
|
118
|
-
export declare function getSlot({ chain, commitment }?: ChainOptions & {
|
|
119
|
-
commitment?: Commitment;
|
|
120
|
-
}): Promise<number>;
|
|
121
|
-
export declare function getBlockTime({ chain, slot }: ChainOptions & {
|
|
122
|
-
slot: number;
|
|
123
|
-
}): Promise<number | null>;
|
|
124
|
-
export declare function getBlockHeight({ chain, commitment }?: ChainOptions & {
|
|
125
|
-
commitment?: Commitment;
|
|
126
|
-
}): Promise<number>;
|
|
127
|
-
/** Latest slot and its block time (walks back over skipped slots without a time). */
|
|
128
|
-
export declare function getLatestBlock({ chain, commitment }?: ChainOptions & {
|
|
129
|
-
commitment?: Commitment;
|
|
130
|
-
}): Promise<{
|
|
131
|
-
number: number;
|
|
132
|
-
timestamp: number;
|
|
133
|
-
}>;
|
|
134
|
-
export declare function getEpochInfo({ chain, commitment }?: ChainOptions & {
|
|
135
|
-
commitment?: Commitment;
|
|
136
|
-
}): Promise<{
|
|
137
|
-
absoluteSlot: number;
|
|
138
|
-
blockHeight: number;
|
|
139
|
-
epoch: number;
|
|
140
|
-
slotIndex: number;
|
|
141
|
-
slotsInEpoch: number;
|
|
142
|
-
transactionCount?: number;
|
|
143
|
-
}>;
|
|
144
|
-
/** Lamport balance of a single account. */
|
|
145
|
-
export declare function getBalance({ chain, account, commitment }: ChainOptions & {
|
|
146
|
-
account: string;
|
|
147
|
-
commitment?: Commitment;
|
|
148
|
-
}): Promise<number>;
|
|
149
|
-
/** Lamport balances of many accounts (batched `getMultipleAccounts`, 0 for missing accounts). */
|
|
150
|
-
export declare function getBalances({ chain, accounts, commitment }: ChainOptions & {
|
|
151
|
-
accounts: string[];
|
|
152
|
-
commitment?: Commitment;
|
|
153
|
-
}): Promise<number[]>;
|
|
154
|
-
export declare function getAccountInfo({ chain, account, encoding, commitment, dataSlice }: ChainOptions & {
|
|
155
|
-
account: string;
|
|
156
|
-
encoding?: Encoding;
|
|
157
|
-
commitment?: Commitment;
|
|
158
|
-
dataSlice?: {
|
|
159
|
-
offset: number;
|
|
160
|
-
length: number;
|
|
161
|
-
};
|
|
162
|
-
}): Promise<AccountInfo | null>;
|
|
163
|
-
/** Base64 payload of one account as a Buffer, or null when it does not exist. */
|
|
164
|
-
export declare function getAccountBuffer({ chain, account, commitment }: ChainOptions & {
|
|
165
|
-
account: string;
|
|
166
|
-
commitment?: Commitment;
|
|
167
|
-
}): Promise<Buffer | null>;
|
|
168
|
-
export interface GetAccountsOptions extends ChainOptions {
|
|
169
|
-
accounts: string[];
|
|
170
|
-
encoding?: Encoding;
|
|
171
|
-
commitment?: Commitment;
|
|
172
|
-
dataSlice?: {
|
|
173
|
-
offset: number;
|
|
174
|
-
length: number;
|
|
175
|
-
};
|
|
176
|
-
/** accounts per `getMultipleAccounts` call, default 99 (public node max is 100) */
|
|
177
|
-
chunkSize?: number;
|
|
178
|
-
/** parallel chunks, default 5 */
|
|
179
|
-
concurrency?: number;
|
|
180
|
-
/** ms to wait between chunks when `concurrency` is 1 */
|
|
181
|
-
sleepTime?: number;
|
|
182
|
-
}
|
|
183
|
-
/** Batched `getMultipleAccounts`; result is in input order with `null` for missing accounts. */
|
|
184
|
-
export declare function getAccounts({ chain, accounts, encoding, commitment, dataSlice, chunkSize, concurrency, sleepTime }: GetAccountsOptions): Promise<(AccountInfo | null)[]>;
|
|
185
|
-
/** Raw account payloads as Buffers, in input order (`null` for missing accounts). */
|
|
186
|
-
export declare function getAccountBuffers(options: Omit<GetAccountsOptions, 'encoding'>): Promise<(Buffer | null)[]>;
|
|
187
|
-
export interface ProgramAccount<T = any> {
|
|
188
|
-
pubkey: string;
|
|
189
|
-
account: AccountInfo<T>;
|
|
190
|
-
}
|
|
191
|
-
export interface GetProgramAccountsOptions extends ChainOptions {
|
|
192
|
-
programId: string;
|
|
193
|
-
filters?: ({
|
|
194
|
-
memcmp: {
|
|
195
|
-
offset: number;
|
|
196
|
-
bytes: string;
|
|
197
|
-
encoding?: string;
|
|
198
|
-
};
|
|
199
|
-
} | {
|
|
200
|
-
dataSize: number;
|
|
201
|
-
})[];
|
|
202
|
-
encoding?: Encoding;
|
|
203
|
-
dataSlice?: {
|
|
204
|
-
offset: number;
|
|
205
|
-
length: number;
|
|
206
|
-
};
|
|
207
|
-
commitment?: Commitment;
|
|
208
|
-
withContext?: boolean;
|
|
209
|
-
/** attempts, default 5 (public nodes rate limit this call) */
|
|
210
|
-
retries?: number;
|
|
211
|
-
timeout?: number;
|
|
212
|
-
}
|
|
213
|
-
export declare function getProgramAccounts(options: GetProgramAccountsOptions & {
|
|
214
|
-
withContext: true;
|
|
215
|
-
}): Promise<{
|
|
216
|
-
context: {
|
|
217
|
-
slot: number;
|
|
218
|
-
};
|
|
219
|
-
value: ProgramAccount[];
|
|
220
|
-
}>;
|
|
221
|
-
export declare function getProgramAccounts(options: GetProgramAccountsOptions & {
|
|
222
|
-
withContext?: false;
|
|
223
|
-
}): Promise<ProgramAccount[]>;
|
|
224
|
-
export interface TokenSupply {
|
|
225
|
-
amount: string;
|
|
226
|
-
decimals: number;
|
|
227
|
-
uiAmount: number;
|
|
228
|
-
uiAmountString?: string;
|
|
229
|
-
}
|
|
230
|
-
export declare function getTokenSupply({ chain, token, commitment }: ChainOptions & {
|
|
231
|
-
token: string;
|
|
232
|
-
commitment?: Commitment;
|
|
233
|
-
}): Promise<TokenSupply>;
|
|
234
|
-
export interface GetTokenSuppliesOptions extends ChainOptions {
|
|
235
|
-
tokens: string[];
|
|
236
|
-
commitment?: Commitment;
|
|
237
|
-
chunkSize?: number;
|
|
238
|
-
concurrency?: number;
|
|
239
|
-
sleepTime?: number;
|
|
240
|
-
/** resolve failed / missing mints to `null` instead of throwing */
|
|
241
|
-
allowError?: boolean;
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Supplies for many mints in input order (one batched `getMultipleAccounts` +
|
|
245
|
-
* `decodeMintAccount`, falling back to `getTokenSupply` for mints that fail to decode).
|
|
246
|
-
*/
|
|
247
|
-
export declare function getTokenSupplies(options: GetTokenSuppliesOptions & {
|
|
248
|
-
allowError: true;
|
|
249
|
-
}): Promise<(TokenSupply | null)[]>;
|
|
250
|
-
export declare function getTokenSupplies(options: GetTokenSuppliesOptions & {
|
|
251
|
-
allowError?: false;
|
|
252
|
-
}): Promise<TokenSupply[]>;
|
|
253
|
-
export interface TokenAccountBalance {
|
|
254
|
-
mint: string;
|
|
255
|
-
amount: string;
|
|
256
|
-
owner: string;
|
|
257
|
-
/** only set with `withDecimals` */
|
|
258
|
-
decimals?: number;
|
|
259
|
-
}
|
|
260
|
-
export interface GetTokenAccountBalancesOptions extends ChainOptions {
|
|
261
|
-
tokenAccounts: string[];
|
|
262
|
-
/** return one entry per token account (input order) instead of a `{ [mint]: amount }` sum */
|
|
263
|
-
individual?: boolean;
|
|
264
|
-
/** skip missing / undecodable accounts instead of throwing (individual mode: `{ mint: 'error', amount: '0' }` placeholder keeps positions) */
|
|
265
|
-
allowError?: boolean;
|
|
266
|
-
/** individual mode: look up the mints once and fill `decimals` (one extra batched call) */
|
|
267
|
-
withDecimals?: boolean;
|
|
268
|
-
commitment?: Commitment;
|
|
269
|
-
chunkSize?: number;
|
|
270
|
-
concurrency?: number;
|
|
271
|
-
sleepTime?: number;
|
|
272
|
-
}
|
|
273
|
-
/** Token balances of the given token accounts, aggregated per mint (raw amount strings) or individually. */
|
|
274
|
-
export declare function getTokenAccountBalances(options: GetTokenAccountBalancesOptions & {
|
|
275
|
-
individual: true;
|
|
276
|
-
}): Promise<TokenAccountBalance[]>;
|
|
277
|
-
export declare function getTokenAccountBalances(options: GetTokenAccountBalancesOptions & {
|
|
278
|
-
individual?: false;
|
|
279
|
-
}): Promise<Record<string, string>>;
|
|
280
|
-
export interface ParsedTokenAccount {
|
|
281
|
-
pubkey: string;
|
|
282
|
-
mint: string;
|
|
283
|
-
owner: string;
|
|
284
|
-
amount: string;
|
|
285
|
-
decimals: number;
|
|
286
|
-
uiAmount: number;
|
|
287
|
-
programId: string;
|
|
288
|
-
state?: string;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Token accounts of `owner` (jsonParsed). With neither `mint` nor `programId`,
|
|
292
|
-
* both the Token and Token-2022 programs are queried.
|
|
293
|
-
*/
|
|
294
|
-
export declare function getTokenAccountsByOwner({ chain, owner, mint, programId, commitment }: ChainOptions & {
|
|
295
|
-
owner: string;
|
|
296
|
-
mint?: string;
|
|
297
|
-
programId?: string;
|
|
298
|
-
commitment?: Commitment;
|
|
299
|
-
}): Promise<ParsedTokenAccount[]>;
|
|
300
|
-
/** Raw token amount (string) of `mint` held by `owner`, summed over all of the owner's token accounts. */
|
|
301
|
-
export declare function getTokenBalance({ chain, owner, mint, commitment }: ChainOptions & {
|
|
302
|
-
owner: string;
|
|
303
|
-
mint: string;
|
|
304
|
-
commitment?: Commitment;
|
|
305
|
-
}): Promise<string>;
|
|
306
|
-
export interface SignatureInfo {
|
|
307
|
-
signature: string;
|
|
308
|
-
slot: number;
|
|
309
|
-
blockTime: number | null;
|
|
310
|
-
err: any;
|
|
311
|
-
memo: string | null;
|
|
312
|
-
confirmationStatus?: string;
|
|
313
|
-
}
|
|
314
|
-
export declare function getSignaturesForAddress({ chain, address, before, until, limit, commitment }: ChainOptions & {
|
|
315
|
-
address: string;
|
|
316
|
-
before?: string;
|
|
317
|
-
until?: string;
|
|
318
|
-
limit?: number;
|
|
319
|
-
commitment?: Commitment;
|
|
320
|
-
}): Promise<SignatureInfo[]>;
|
|
321
|
-
export declare function getTransaction({ chain, signature, encoding, maxSupportedTransactionVersion, commitment }: ChainOptions & {
|
|
322
|
-
signature: string;
|
|
323
|
-
encoding?: 'json' | 'jsonParsed' | 'base64' | 'base58';
|
|
324
|
-
maxSupportedTransactionVersion?: number;
|
|
325
|
-
commitment?: Commitment;
|
|
326
|
-
}): Promise<any>;
|
|
327
|
-
/**
|
|
328
|
-
* Lamports in all stake accounts whose stake authority (default, as in the
|
|
329
|
-
* adapters helper) or withdraw authority is `address`.
|
|
330
|
-
*/
|
|
331
|
-
export declare function getStakedSol({ chain, address, authority, commitment }: ChainOptions & {
|
|
332
|
-
address: string;
|
|
333
|
-
authority?: 'staker' | 'withdrawer';
|
|
334
|
-
commitment?: Commitment;
|
|
335
|
-
}): Promise<number>;
|
|
336
|
-
/** `total_lamports` of an SPL stake pool account (lamports, as number). */
|
|
337
|
-
export declare function getSolBalanceFromStakePool({ chain, address, commitment }: ChainOptions & {
|
|
338
|
-
address: string;
|
|
339
|
-
commitment?: Commitment;
|
|
340
|
-
}): Promise<number>;
|