| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  | declare module '@solana/web3.js' { | 
					
						
							| 
									
										
										
										
											2020-03-03 11:16:19 +08:00
										 |  |  |   import {Buffer} from 'buffer'; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   import * as BufferLayout from 'buffer-layout'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/publickey.js ===
 | 
					
						
							| 
									
										
										
										
											2020-10-13 13:40:38 -07:00
										 |  |  |   export const MAX_SEED_LENGTH: number; | 
					
						
							| 
									
										
										
										
											2020-09-01 11:14:41 -07:00
										 |  |  |   export type PublicKeyNonce = [PublicKey, number]; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export class PublicKey { | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |     constructor(value: number | string | Buffer | Uint8Array | Array<number>); | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     static isPublicKey(o: object): boolean; | 
					
						
							| 
									
										
										
										
											2020-03-16 17:44:12 +08:00
										 |  |  |     static createWithSeed( | 
					
						
							|  |  |  |       fromPublicKey: PublicKey, | 
					
						
							|  |  |  |       seed: string, | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							|  |  |  |     ): Promise<PublicKey>; | 
					
						
							| 
									
										
										
										
											2020-09-01 11:14:41 -07:00
										 |  |  |     static createProgramAddress( | 
					
						
							|  |  |  |       seeds: Array<Buffer | Uint8Array>, | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							|  |  |  |     ): Promise<PublicKey>; | 
					
						
							|  |  |  |     static findProgramAddress( | 
					
						
							|  |  |  |       seeds: Array<Buffer | Uint8Array>, | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							|  |  |  |     ): Promise<PublicKeyNonce>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     equals(publickey: PublicKey): boolean; | 
					
						
							|  |  |  |     toBase58(): string; | 
					
						
							|  |  |  |     toBuffer(): Buffer; | 
					
						
							|  |  |  |     toString(): string; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/blockhash.js ===
 | 
					
						
							|  |  |  |   export type Blockhash = string; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/account.js ===
 | 
					
						
							|  |  |  |   export class Account { | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |     constructor(secretKey?: Buffer | Uint8Array | Array<number>); | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     publicKey: PublicKey; | 
					
						
							|  |  |  |     secretKey: Buffer; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/fee-calculator.js ===
 | 
					
						
							|  |  |  |   export type FeeCalculator = { | 
					
						
							|  |  |  |     lamportsPerSignature: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/connection.js ===
 | 
					
						
							| 
									
										
										
										
											2020-03-23 22:19:32 +08:00
										 |  |  |   export type Context = { | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |   export type SendOptions = { | 
					
						
							| 
									
										
										
										
											2020-06-15 18:34:58 +08:00
										 |  |  |     skipPreflight?: boolean; | 
					
						
							| 
									
										
										
										
											2020-09-25 08:49:34 +08:00
										 |  |  |     preflightCommitment?: Commitment; | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type ConfirmOptions = { | 
					
						
							| 
									
										
										
										
											2020-09-08 13:12:47 +08:00
										 |  |  |     commitment?: Commitment; | 
					
						
							| 
									
										
										
										
											2020-06-15 18:34:58 +08:00
										 |  |  |     skipPreflight?: boolean; | 
					
						
							| 
									
										
										
										
											2020-09-25 08:49:34 +08:00
										 |  |  |     preflightCommitment?: Commitment; | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-29 22:40:46 -07:00
										 |  |  |   export type ConfirmedSignaturesForAddress2Options = { | 
					
						
							|  |  |  |     before?: TransactionSignature; | 
					
						
							|  |  |  |     limit?: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-31 12:33:54 +08:00
										 |  |  |   export type TokenAccountsFilter = | 
					
						
							|  |  |  |     | { | 
					
						
							|  |  |  |         mint: PublicKey; | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     | { | 
					
						
							|  |  |  |         programId: PublicKey; | 
					
						
							|  |  |  |       }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type RpcResponseAndContext<T> = { | 
					
						
							| 
									
										
										
										
											2020-03-23 22:19:32 +08:00
										 |  |  |     context: Context; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     value: T; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |   export type Commitment = | 
					
						
							|  |  |  |     | 'max' | 
					
						
							|  |  |  |     | 'recent' | 
					
						
							|  |  |  |     | 'root' | 
					
						
							|  |  |  |     | 'single' | 
					
						
							|  |  |  |     | 'singleGossip'; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-23 01:23:29 +08:00
										 |  |  |   export type LargestAccountsFilter = 'circulating' | 'nonCirculating'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type GetLargestAccountsConfig = { | 
					
						
							|  |  |  |     commitment?: Commitment; | 
					
						
							|  |  |  |     filter?: LargestAccountsFilter; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-06 17:56:26 +08:00
										 |  |  |   export type SignatureStatusConfig = { | 
					
						
							|  |  |  |     searchTransactionHistory: boolean; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-23 23:01:12 +08:00
										 |  |  |   export type SignatureStatus = { | 
					
						
							|  |  |  |     slot: number; | 
					
						
							| 
									
										
										
										
											2020-04-04 21:35:08 +08:00
										 |  |  |     err: TransactionError | null; | 
					
						
							| 
									
										
										
										
											2020-03-26 21:37:45 +08:00
										 |  |  |     confirmations: number | null; | 
					
						
							| 
									
										
										
										
											2020-03-23 23:01:12 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-29 22:40:46 -07:00
										 |  |  |   export type ConfirmedSignatureInfo = { | 
					
						
							|  |  |  |     signature: string; | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |     err: TransactionError | null; | 
					
						
							|  |  |  |     memo: string | null; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type BlockhashAndFeeCalculator = { | 
					
						
							|  |  |  |     blockhash: Blockhash; | 
					
						
							|  |  |  |     feeCalculator: FeeCalculator; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |   export type PublicKeyAndAccount<T> = { | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     pubkey: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     account: AccountInfo<T>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |   export type AccountInfo<T> = { | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     executable: boolean; | 
					
						
							|  |  |  |     owner: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     data: T; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     rentEpoch?: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type ContactInfo = { | 
					
						
							| 
									
										
										
										
											2020-02-12 16:20:13 +08:00
										 |  |  |     pubkey: string; | 
					
						
							| 
									
										
										
										
											2020-05-13 23:14:03 +08:00
										 |  |  |     gossip?: string; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     tpu?: string; | 
					
						
							|  |  |  |     rpc?: string; | 
					
						
							| 
									
										
										
										
											2020-05-13 23:14:03 +08:00
										 |  |  |     version?: string; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-11 14:35:56 +08:00
										 |  |  |   export type SimulatedTransactionResponse = { | 
					
						
							|  |  |  |     err: TransactionError | string | null; | 
					
						
							|  |  |  |     logs: Array<string> | null; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-22 11:12:59 +08:00
										 |  |  |   export type ConfirmedTransactionMeta = { | 
					
						
							|  |  |  |     fee: number; | 
					
						
							|  |  |  |     preBalances: Array<number>; | 
					
						
							|  |  |  |     postBalances: Array<number>; | 
					
						
							| 
									
										
										
										
											2020-10-05 10:24:38 -07:00
										 |  |  |     logMessages?: Array<string>; | 
					
						
							| 
									
										
										
										
											2020-04-22 11:12:59 +08:00
										 |  |  |     err: TransactionError | null; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type ConfirmedBlock = { | 
					
						
							|  |  |  |     blockhash: Blockhash; | 
					
						
							|  |  |  |     previousBlockhash: Blockhash; | 
					
						
							|  |  |  |     parentSlot: number; | 
					
						
							|  |  |  |     transactions: Array<{ | 
					
						
							|  |  |  |       transaction: Transaction; | 
					
						
							| 
									
										
										
										
											2020-04-22 11:12:59 +08:00
										 |  |  |       meta: ConfirmedTransactionMeta | null; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     }>; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-08 20:26:58 -07:00
										 |  |  |   export type PerfSample = { | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |     numTransactions: number; | 
					
						
							|  |  |  |     numSlots: number; | 
					
						
							|  |  |  |     samplePeriodSecs: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-21 15:40:44 +08:00
										 |  |  |   export type ConfirmedTransaction = { | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |     transaction: Transaction; | 
					
						
							| 
									
										
										
										
											2020-04-22 11:12:59 +08:00
										 |  |  |     meta: ConfirmedTransactionMeta | null; | 
					
						
							| 
									
										
										
										
											2020-04-21 15:40:44 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-06 19:16:01 +08:00
										 |  |  |   export type ParsedMessageAccount = { | 
					
						
							|  |  |  |     pubkey: PublicKey; | 
					
						
							|  |  |  |     signer: boolean; | 
					
						
							|  |  |  |     writable: boolean; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type ParsedInstruction = { | 
					
						
							|  |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |     program: string; | 
					
						
							|  |  |  |     parsed: string; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type PartiallyDecodedInstruction = { | 
					
						
							|  |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |     accounts: Array<PublicKey>; | 
					
						
							|  |  |  |     data: string; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type ParsedTransaction = { | 
					
						
							|  |  |  |     signatures: Array<string>; | 
					
						
							|  |  |  |     message: { | 
					
						
							|  |  |  |       accountKeys: ParsedMessageAccount[]; | 
					
						
							|  |  |  |       instructions: (ParsedInstruction | PartiallyDecodedInstruction)[]; | 
					
						
							|  |  |  |       recentBlockhash: string; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type ParsedConfirmedTransaction = { | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |     transaction: ParsedTransaction; | 
					
						
							|  |  |  |     meta: ConfirmedTransactionMeta | null; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |   export type ParsedAccountData = { | 
					
						
							|  |  |  |     program: string; | 
					
						
							|  |  |  |     parsed: any; | 
					
						
							| 
									
										
										
										
											2020-08-11 21:44:28 -06:00
										 |  |  |     space: number; | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-17 01:50:13 -05:00
										 |  |  |   export type StakeActivationData = { | 
					
						
							|  |  |  |     state: 'active' | 'inactive' | 'activating' | 'deactivating'; | 
					
						
							|  |  |  |     active: number; | 
					
						
							|  |  |  |     inactive: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type KeyedAccountInfo = { | 
					
						
							|  |  |  |     accountId: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     accountInfo: AccountInfo<Buffer>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type Version = { | 
					
						
							|  |  |  |     'solana-core': string; | 
					
						
							| 
									
										
										
										
											2020-09-29 10:55:23 -07:00
										 |  |  |     'feature-set'?: number; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type VoteAccountInfo = { | 
					
						
							|  |  |  |     votePubkey: string; | 
					
						
							|  |  |  |     nodePubkey: string; | 
					
						
							|  |  |  |     stake: number; | 
					
						
							|  |  |  |     commission: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type SlotInfo = { | 
					
						
							| 
									
										
										
										
											2020-07-18 13:22:58 +08:00
										 |  |  |     parent: number; | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |     root: number; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-06 12:17:29 +08:00
										 |  |  |   export type TokenAmount = { | 
					
						
							|  |  |  |     uiAmount: number; | 
					
						
							|  |  |  |     decimals: number; | 
					
						
							|  |  |  |     amount: string; | 
					
						
							| 
									
										
										
										
											2020-07-31 12:33:54 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-11 17:28:07 +08:00
										 |  |  |   export type TokenAccountBalancePair = { | 
					
						
							|  |  |  |     address: PublicKey; | 
					
						
							|  |  |  |     amount: string; | 
					
						
							|  |  |  |     decimals: number; | 
					
						
							|  |  |  |     uiAmount: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-23 22:19:32 +08:00
										 |  |  |   export type AccountChangeCallback = ( | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     accountInfo: AccountInfo<Buffer>, | 
					
						
							| 
									
										
										
										
											2020-03-23 22:19:32 +08:00
										 |  |  |     context: Context, | 
					
						
							|  |  |  |   ) => void; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type ProgramAccountChangeCallback = ( | 
					
						
							|  |  |  |     keyedAccountInfo: KeyedAccountInfo, | 
					
						
							| 
									
										
										
										
											2020-03-23 22:19:32 +08:00
										 |  |  |     context: Context, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   ) => void; | 
					
						
							|  |  |  |   export type SlotChangeCallback = (slotInfo: SlotInfo) => void; | 
					
						
							| 
									
										
										
										
											2020-02-03 23:22:11 +08:00
										 |  |  |   export type SignatureResultCallback = ( | 
					
						
							| 
									
										
										
										
											2020-04-04 21:35:08 +08:00
										 |  |  |     signatureResult: SignatureResult, | 
					
						
							| 
									
										
										
										
											2020-03-23 22:19:32 +08:00
										 |  |  |     context: Context, | 
					
						
							| 
									
										
										
										
											2020-02-03 23:22:11 +08:00
										 |  |  |   ) => void; | 
					
						
							| 
									
										
										
										
											2020-03-27 22:22:53 +08:00
										 |  |  |   export type RootChangeCallback = (root: number) => void; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-04 21:35:08 +08:00
										 |  |  |   export type TransactionError = object; | 
					
						
							|  |  |  |   export type SignatureResult = { | 
					
						
							|  |  |  |     err: TransactionError | null; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-03 23:38:48 +08:00
										 |  |  |   export type InflationGovernor = { | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     foundation: number; | 
					
						
							|  |  |  |     foundationTerm: number; | 
					
						
							|  |  |  |     initial: number; | 
					
						
							|  |  |  |     taper: number; | 
					
						
							|  |  |  |     terminal: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-15 00:26:42 +08:00
										 |  |  |   export type EpochInfo = { | 
					
						
							|  |  |  |     epoch: number; | 
					
						
							|  |  |  |     slotIndex: number; | 
					
						
							|  |  |  |     slotsInEpoch: number; | 
					
						
							|  |  |  |     absoluteSlot: number; | 
					
						
							| 
									
										
										
										
											2020-07-21 14:43:40 -07:00
										 |  |  |     blockHeight?: number; | 
					
						
							| 
									
										
										
										
											2020-05-15 00:26:42 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type EpochSchedule = { | 
					
						
							|  |  |  |     slotsPerEpoch: number; | 
					
						
							|  |  |  |     leaderScheduleSlotOffset: number; | 
					
						
							|  |  |  |     warmup: boolean; | 
					
						
							|  |  |  |     firstNormalEpoch: number; | 
					
						
							|  |  |  |     firstNormalSlot: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 23:16:44 +08:00
										 |  |  |   export type LeaderSchedule = { | 
					
						
							|  |  |  |     [address: string]: number[]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-22 19:30:22 +08:00
										 |  |  |   export type Supply = { | 
					
						
							|  |  |  |     total: number; | 
					
						
							|  |  |  |     circulating: number; | 
					
						
							|  |  |  |     nonCirculating: number; | 
					
						
							|  |  |  |     nonCirculatingAccounts: Array<PublicKey>; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-23 01:23:29 +08:00
										 |  |  |   export type AccountBalancePair = { | 
					
						
							|  |  |  |     address: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type VoteAccountStatus = { | 
					
						
							|  |  |  |     current: Array<VoteAccountInfo>; | 
					
						
							|  |  |  |     delinquent: Array<VoteAccountInfo>; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class Connection { | 
					
						
							|  |  |  |     constructor(endpoint: string, commitment?: Commitment); | 
					
						
							| 
									
										
										
										
											2020-04-06 17:56:26 +08:00
										 |  |  |     commitment?: Commitment; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getAccountInfoAndContext( | 
					
						
							|  |  |  |       publicKey: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     ): Promise<RpcResponseAndContext<AccountInfo<Buffer> | null>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getAccountInfo( | 
					
						
							|  |  |  |       publicKey: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     ): Promise<AccountInfo<Buffer> | null>; | 
					
						
							|  |  |  |     getParsedAccountInfo( | 
					
						
							|  |  |  |       publicKey: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise< | 
					
						
							|  |  |  |       RpcResponseAndContext<AccountInfo<Buffer | ParsedAccountData> | null> | 
					
						
							|  |  |  |     >; | 
					
						
							| 
									
										
										
										
											2020-09-17 01:50:13 -05:00
										 |  |  |     getStakeActivation( | 
					
						
							|  |  |  |       publicKey: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |       epoch?: number, | 
					
						
							|  |  |  |     ): Promise<StakeActivationData>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getProgramAccounts( | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |     ): Promise<Array<PublicKeyAndAccount<Buffer>>>; | 
					
						
							|  |  |  |     getParsedProgramAccounts( | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<Array<PublicKeyAndAccount<Buffer | ParsedAccountData>>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getBalanceAndContext( | 
					
						
							|  |  |  |       publicKey: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<number>>; | 
					
						
							|  |  |  |     getBalance(publicKey: PublicKey, commitment?: Commitment): Promise<number>; | 
					
						
							| 
									
										
										
										
											2020-05-19 11:27:36 +08:00
										 |  |  |     getBlockTime(slot: number): Promise<number | null>; | 
					
						
							| 
									
										
										
										
											2020-05-21 16:58:17 +08:00
										 |  |  |     getMinimumLedgerSlot(): Promise<number>; | 
					
						
							| 
									
										
										
										
											2020-05-23 17:33:04 +08:00
										 |  |  |     getFirstAvailableBlock(): Promise<number>; | 
					
						
							| 
									
										
										
										
											2020-05-22 19:30:22 +08:00
										 |  |  |     getSupply(commitment?: Commitment): Promise<RpcResponseAndContext<Supply>>; | 
					
						
							| 
									
										
										
										
											2020-07-31 12:33:54 +08:00
										 |  |  |     getTokenSupply( | 
					
						
							|  |  |  |       tokenMintAddress: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-08-06 12:17:29 +08:00
										 |  |  |     ): Promise<RpcResponseAndContext<TokenAmount>>; | 
					
						
							| 
									
										
										
										
											2020-07-31 12:33:54 +08:00
										 |  |  |     getTokenAccountBalance( | 
					
						
							|  |  |  |       tokenAddress: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-08-06 12:17:29 +08:00
										 |  |  |     ): Promise<RpcResponseAndContext<TokenAmount>>; | 
					
						
							| 
									
										
										
										
											2020-07-31 12:33:54 +08:00
										 |  |  |     getTokenAccountsByOwner( | 
					
						
							|  |  |  |       ownerAddress: PublicKey, | 
					
						
							|  |  |  |       filter: TokenAccountsFilter, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise< | 
					
						
							| 
									
										
										
										
											2020-08-06 23:47:22 +08:00
										 |  |  |       RpcResponseAndContext< | 
					
						
							|  |  |  |         Array<{pubkey: PublicKey; account: AccountInfo<Buffer>}> | 
					
						
							|  |  |  |       > | 
					
						
							|  |  |  |     >; | 
					
						
							|  |  |  |     getParsedTokenAccountsByOwner( | 
					
						
							|  |  |  |       ownerAddress: PublicKey, | 
					
						
							|  |  |  |       filter: TokenAccountsFilter, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise< | 
					
						
							|  |  |  |       RpcResponseAndContext< | 
					
						
							|  |  |  |         Array<{pubkey: PublicKey; account: AccountInfo<ParsedAccountData>}> | 
					
						
							|  |  |  |       > | 
					
						
							| 
									
										
										
										
											2020-07-31 12:33:54 +08:00
										 |  |  |     >; | 
					
						
							| 
									
										
										
										
											2020-05-23 01:23:29 +08:00
										 |  |  |     getLargestAccounts( | 
					
						
							|  |  |  |       config?: GetLargestAccountsConfig, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<Array<AccountBalancePair>>>; | 
					
						
							| 
									
										
										
										
											2020-08-11 17:28:07 +08:00
										 |  |  |     getTokenLargestAccounts( | 
					
						
							|  |  |  |       mintAddress: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<Array<TokenAccountBalancePair>>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getClusterNodes(): Promise<Array<ContactInfo>>; | 
					
						
							| 
									
										
										
										
											2020-03-31 22:47:06 +08:00
										 |  |  |     getConfirmedBlock(slot: number): Promise<ConfirmedBlock>; | 
					
						
							| 
									
										
										
										
											2020-04-21 15:40:44 +08:00
										 |  |  |     getConfirmedTransaction( | 
					
						
							|  |  |  |       signature: TransactionSignature, | 
					
						
							|  |  |  |     ): Promise<ConfirmedTransaction | null>; | 
					
						
							| 
									
										
										
										
											2020-08-06 19:16:01 +08:00
										 |  |  |     getParsedConfirmedTransaction( | 
					
						
							|  |  |  |       signature: TransactionSignature, | 
					
						
							|  |  |  |     ): Promise<ParsedConfirmedTransaction | null>; | 
					
						
							| 
									
										
										
										
											2020-04-21 15:40:44 +08:00
										 |  |  |     getConfirmedSignaturesForAddress( | 
					
						
							|  |  |  |       address: PublicKey, | 
					
						
							|  |  |  |       startSlot: number, | 
					
						
							|  |  |  |       endSlot: number, | 
					
						
							|  |  |  |     ): Promise<Array<TransactionSignature>>; | 
					
						
							| 
									
										
										
										
											2020-08-07 16:41:22 +08:00
										 |  |  |     getConfirmedSignaturesForAddress2( | 
					
						
							|  |  |  |       address: PublicKey, | 
					
						
							|  |  |  |       options?: ConfirmedSignaturesForAddress2Options, | 
					
						
							|  |  |  |     ): Promise<Array<ConfirmedSignatureInfo>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getVoteAccounts(commitment?: Commitment): Promise<VoteAccountStatus>; | 
					
						
							|  |  |  |     confirmTransaction( | 
					
						
							|  |  |  |       signature: TransactionSignature, | 
					
						
							| 
									
										
										
										
											2020-09-08 13:12:47 +08:00
										 |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<SignatureResult>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getSlot(commitment?: Commitment): Promise<number>; | 
					
						
							|  |  |  |     getSlotLeader(commitment?: Commitment): Promise<string>; | 
					
						
							|  |  |  |     getSignatureStatus( | 
					
						
							|  |  |  |       signature: TransactionSignature, | 
					
						
							| 
									
										
										
										
											2020-04-06 17:56:26 +08:00
										 |  |  |       config?: SignatureStatusConfig, | 
					
						
							| 
									
										
										
										
											2020-03-26 21:37:45 +08:00
										 |  |  |     ): Promise<RpcResponseAndContext<SignatureStatus | null>>; | 
					
						
							| 
									
										
										
										
											2020-04-02 01:51:30 +08:00
										 |  |  |     getSignatureStatuses( | 
					
						
							| 
									
										
										
										
											2020-03-23 23:01:12 +08:00
										 |  |  |       signatures: Array<TransactionSignature>, | 
					
						
							| 
									
										
										
										
											2020-04-06 17:56:26 +08:00
										 |  |  |       config?: SignatureStatusConfig, | 
					
						
							| 
									
										
										
										
											2020-03-26 21:37:45 +08:00
										 |  |  |     ): Promise<RpcResponseAndContext<Array<SignatureStatus | null>>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getTransactionCount(commitment?: Commitment): Promise<number>; | 
					
						
							|  |  |  |     getTotalSupply(commitment?: Commitment): Promise<number>; | 
					
						
							|  |  |  |     getVersion(): Promise<Version>; | 
					
						
							| 
									
										
										
										
											2020-06-03 23:38:48 +08:00
										 |  |  |     getInflationGovernor(commitment?: Commitment): Promise<InflationGovernor>; | 
					
						
							| 
									
										
										
										
											2020-07-17 23:16:44 +08:00
										 |  |  |     getLeaderSchedule(): Promise<LeaderSchedule>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getEpochSchedule(): Promise<EpochSchedule>; | 
					
						
							| 
									
										
										
										
											2020-05-21 17:11:32 +08:00
										 |  |  |     getEpochInfo(commitment?: Commitment): Promise<EpochInfo>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getRecentBlockhashAndContext( | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>; | 
					
						
							| 
									
										
										
										
											2020-10-08 20:26:58 -07:00
										 |  |  |     getRecentPerformanceSamples(limit?: number): Promise<Array<PerfSample>>; | 
					
						
							| 
									
										
										
										
											2020-06-04 18:12:59 +08:00
										 |  |  |     getFeeCalculatorForBlockhash( | 
					
						
							|  |  |  |       blockhash: Blockhash, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<FeeCalculator | null>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     getRecentBlockhash( | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<BlockhashAndFeeCalculator>; | 
					
						
							|  |  |  |     requestAirdrop( | 
					
						
							|  |  |  |       to: PublicKey, | 
					
						
							|  |  |  |       amount: number, | 
					
						
							|  |  |  |     ): Promise<TransactionSignature>; | 
					
						
							|  |  |  |     sendTransaction( | 
					
						
							|  |  |  |       transaction: Transaction, | 
					
						
							| 
									
										
										
										
											2020-05-20 17:13:21 +08:00
										 |  |  |       signers: Array<Account>, | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |       options?: SendOptions, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     ): Promise<TransactionSignature>; | 
					
						
							|  |  |  |     sendEncodedTransaction( | 
					
						
							|  |  |  |       encodedTransaction: string, | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |       options?: SendOptions, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     ): Promise<TransactionSignature>; | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |     sendRawTransaction( | 
					
						
							|  |  |  |       wireTransaction: Buffer | Uint8Array | Array<number>, | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |       options?: SendOptions, | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |     ): Promise<TransactionSignature>; | 
					
						
							| 
									
										
										
										
											2020-08-11 14:35:56 +08:00
										 |  |  |     simulateTransaction( | 
					
						
							|  |  |  |       transaction: Transaction, | 
					
						
							|  |  |  |       signers?: Array<Account>, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     onAccountChange( | 
					
						
							|  |  |  |       publickey: PublicKey, | 
					
						
							|  |  |  |       callback: AccountChangeCallback, | 
					
						
							| 
									
										
										
										
											2020-05-21 12:17:38 +08:00
										 |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     ): number; | 
					
						
							|  |  |  |     removeAccountChangeListener(id: number): Promise<void>; | 
					
						
							|  |  |  |     onProgramAccountChange( | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							|  |  |  |       callback: ProgramAccountChangeCallback, | 
					
						
							| 
									
										
										
										
											2020-05-21 12:17:38 +08:00
										 |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     ): number; | 
					
						
							|  |  |  |     removeProgramAccountChangeListener(id: number): Promise<void>; | 
					
						
							| 
									
										
										
										
											2020-02-03 23:22:11 +08:00
										 |  |  |     onSlotChange(callback: SlotChangeCallback): number; | 
					
						
							|  |  |  |     removeSlotChangeListener(id: number): Promise<void>; | 
					
						
							|  |  |  |     onSignature( | 
					
						
							|  |  |  |       signature: TransactionSignature, | 
					
						
							|  |  |  |       callback: SignatureResultCallback, | 
					
						
							| 
									
										
										
										
											2020-05-21 12:17:38 +08:00
										 |  |  |       commitment?: Commitment, | 
					
						
							| 
									
										
										
										
											2020-02-03 23:22:11 +08:00
										 |  |  |     ): number; | 
					
						
							|  |  |  |     removeSignatureListener(id: number): Promise<void>; | 
					
						
							| 
									
										
										
										
											2020-03-27 22:22:53 +08:00
										 |  |  |     onRootChange(callback: RootChangeCallback): number; | 
					
						
							|  |  |  |     removeRootChangeListener(id: number): Promise<void>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     validatorExit(): Promise<boolean>; | 
					
						
							|  |  |  |     getMinimumBalanceForRentExemption( | 
					
						
							|  |  |  |       dataLength: number, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<number>; | 
					
						
							| 
									
										
										
										
											2020-04-05 22:10:20 +08:00
										 |  |  |     getNonce( | 
					
						
							|  |  |  |       nonceAccount: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<NonceAccount>; | 
					
						
							|  |  |  |     getNonceAndContext( | 
					
						
							|  |  |  |       nonceAccount: PublicKey, | 
					
						
							|  |  |  |       commitment?: Commitment, | 
					
						
							|  |  |  |     ): Promise<RpcResponseAndContext<NonceAccount>>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-05 09:44:56 -07:00
										 |  |  |   // === src/nonce-account.js ===
 | 
					
						
							|  |  |  |   export class NonceAccount { | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     nonce: Blockhash; | 
					
						
							|  |  |  |     feeCalculator: FeeCalculator; | 
					
						
							| 
									
										
										
										
											2020-05-13 22:44:41 +08:00
										 |  |  |     static fromAccountData( | 
					
						
							|  |  |  |       buffer: Buffer | Uint8Array | Array<number>, | 
					
						
							|  |  |  |     ): NonceAccount; | 
					
						
							| 
									
										
										
										
											2020-03-05 09:44:56 -07:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-05 22:25:53 +08:00
										 |  |  |   export const NONCE_ACCOUNT_LENGTH: number; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   // === src/validator-info.js ===
 | 
					
						
							|  |  |  |   export const VALIDATOR_INFO_KEY: PublicKey; | 
					
						
							|  |  |  |   export type Info = { | 
					
						
							|  |  |  |     name: string; | 
					
						
							|  |  |  |     website?: string; | 
					
						
							|  |  |  |     details?: string; | 
					
						
							|  |  |  |     keybaseUsername?: string; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class ValidatorInfo { | 
					
						
							|  |  |  |     key: PublicKey; | 
					
						
							|  |  |  |     info: Info; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(key: PublicKey, info: Info); | 
					
						
							| 
									
										
										
										
											2020-02-14 22:33:11 +08:00
										 |  |  |     static fromConfigData( | 
					
						
							|  |  |  |       buffer: Buffer | Uint8Array | Array<number>, | 
					
						
							|  |  |  |     ): ValidatorInfo | null; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/sysvar.js ===
 | 
					
						
							|  |  |  |   export const SYSVAR_CLOCK_PUBKEY: PublicKey; | 
					
						
							|  |  |  |   export const SYSVAR_RENT_PUBKEY: PublicKey; | 
					
						
							|  |  |  |   export const SYSVAR_REWARDS_PUBKEY: PublicKey; | 
					
						
							|  |  |  |   export const SYSVAR_STAKE_HISTORY_PUBKEY: PublicKey; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/vote-account.js ===
 | 
					
						
							|  |  |  |   export const VOTE_PROGRAM_ID: PublicKey; | 
					
						
							|  |  |  |   export type Lockout = { | 
					
						
							|  |  |  |     slot: number; | 
					
						
							|  |  |  |     confirmationCount: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type EpochCredits = { | 
					
						
							|  |  |  |     epoch: number; | 
					
						
							|  |  |  |     credits: number; | 
					
						
							|  |  |  |     prevCredits: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class VoteAccount { | 
					
						
							|  |  |  |     votes: Array<Lockout>; | 
					
						
							|  |  |  |     nodePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedVoterPubkey: PublicKey; | 
					
						
							|  |  |  |     commission: number; | 
					
						
							|  |  |  |     rootSlot?: number; | 
					
						
							|  |  |  |     epoch: number; | 
					
						
							|  |  |  |     credits: number; | 
					
						
							|  |  |  |     lastEpochCredits: number; | 
					
						
							|  |  |  |     epochCredits: Array<EpochCredits>; | 
					
						
							| 
									
										
										
										
											2020-02-14 22:33:11 +08:00
										 |  |  |     static fromAccountData( | 
					
						
							|  |  |  |       buffer: Buffer | Uint8Array | Array<number>, | 
					
						
							|  |  |  |     ): VoteAccount; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/instruction.js ===
 | 
					
						
							|  |  |  |   export type InstructionType = { | 
					
						
							|  |  |  |     index: number; | 
					
						
							|  |  |  |     layout: typeof BufferLayout; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export function encodeData( | 
					
						
							|  |  |  |     type: InstructionType, | 
					
						
							|  |  |  |     fields: Record<string, object>, | 
					
						
							|  |  |  |   ): Buffer; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |   // === src/message.js ===
 | 
					
						
							|  |  |  |   export type MessageHeader = { | 
					
						
							|  |  |  |     numRequiredSignatures: number; | 
					
						
							|  |  |  |     numReadonlySignedAccounts: number; | 
					
						
							|  |  |  |     numReadonlyUnsignedAccounts: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type CompiledInstruction = { | 
					
						
							|  |  |  |     programIdIndex: number; | 
					
						
							|  |  |  |     accounts: number[]; | 
					
						
							|  |  |  |     data: string; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type MessageArgs = { | 
					
						
							|  |  |  |     header: MessageHeader; | 
					
						
							| 
									
										
										
										
											2020-06-11 13:15:14 +08:00
										 |  |  |     accountKeys: string[]; | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |     recentBlockhash: Blockhash; | 
					
						
							|  |  |  |     instructions: CompiledInstruction[]; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class Message { | 
					
						
							|  |  |  |     header: MessageHeader; | 
					
						
							|  |  |  |     accountKeys: PublicKey[]; | 
					
						
							|  |  |  |     recentBlockhash: Blockhash; | 
					
						
							|  |  |  |     instructions: CompiledInstruction[]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(args: MessageArgs); | 
					
						
							| 
									
										
										
										
											2020-05-01 23:35:03 +08:00
										 |  |  |     isAccountWritable(index: number): boolean; | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |     serialize(): Buffer; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   // === src/transaction.js ===
 | 
					
						
							|  |  |  |   export type TransactionSignature = string; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |   export type AccountMeta = { | 
					
						
							|  |  |  |     pubkey: PublicKey; | 
					
						
							|  |  |  |     isSigner: boolean; | 
					
						
							|  |  |  |     isWritable: boolean; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type TransactionInstructionCtorFields = { | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |     keys?: Array<AccountMeta>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     programId?: PublicKey; | 
					
						
							|  |  |  |     data?: Buffer; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class TransactionInstruction { | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |     keys: Array<AccountMeta>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |     data: Buffer; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(opts?: TransactionInstructionCtorFields); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type SignaturePubkeyPair = { | 
					
						
							|  |  |  |     signature?: Buffer; | 
					
						
							|  |  |  |     publicKey: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-14 22:27:06 +08:00
										 |  |  |   export type NonceInformation = { | 
					
						
							|  |  |  |     nonce: Blockhash; | 
					
						
							|  |  |  |     nonceInstruction: TransactionInstruction; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export type TransactionCtorFields = { | 
					
						
							|  |  |  |     recentBlockhash?: Blockhash; | 
					
						
							| 
									
										
										
										
											2020-02-14 22:27:06 +08:00
										 |  |  |     nonceInfo?: NonceInformation; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     signatures?: Array<SignaturePubkeyPair>; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-11 15:04:36 -07:00
										 |  |  |   export type SerializeConfig = { | 
					
						
							|  |  |  |     requireAllSignatures?: boolean; | 
					
						
							|  |  |  |     verifySignatures?: boolean; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export class Transaction { | 
					
						
							|  |  |  |     signatures: Array<SignaturePubkeyPair>; | 
					
						
							|  |  |  |     signature?: Buffer; | 
					
						
							|  |  |  |     instructions: Array<TransactionInstruction>; | 
					
						
							|  |  |  |     recentBlockhash?: Blockhash; | 
					
						
							| 
									
										
										
										
											2020-02-14 22:27:06 +08:00
										 |  |  |     nonceInfo?: NonceInformation; | 
					
						
							| 
									
										
										
										
											2020-09-10 14:04:09 +08:00
										 |  |  |     feePayer: PublicKey | null; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     constructor(opts?: TransactionCtorFields); | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |     static from(buffer: Buffer | Uint8Array | Array<number>): Transaction; | 
					
						
							| 
									
										
										
										
											2020-06-11 13:15:14 +08:00
										 |  |  |     static populate(message: Message, signatures: Array<string>): Transaction; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     add( | 
					
						
							|  |  |  |       ...items: Array< | 
					
						
							|  |  |  |         Transaction | TransactionInstruction | TransactionInstructionCtorFields | 
					
						
							|  |  |  |       > | 
					
						
							|  |  |  |     ): Transaction; | 
					
						
							| 
									
										
										
										
											2020-05-01 00:05:29 +08:00
										 |  |  |     compileMessage(): Message; | 
					
						
							| 
									
										
										
										
											2020-04-24 10:20:27 -06:00
										 |  |  |     serializeMessage(): Buffer; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |     sign(...signers: Array<Account>): void; | 
					
						
							| 
									
										
										
										
											2020-09-10 14:04:09 +08:00
										 |  |  |     partialSign(...partialSigners: Array<Account>): void; | 
					
						
							| 
									
										
										
										
											2020-04-23 15:44:19 -06:00
										 |  |  |     addSignature(pubkey: PublicKey, signature: Buffer): void; | 
					
						
							| 
									
										
										
										
											2020-09-10 14:04:09 +08:00
										 |  |  |     setSigners(...signer: Array<PublicKey>): void; | 
					
						
							| 
									
										
										
										
											2020-03-03 13:42:57 -07:00
										 |  |  |     verifySignatures(): boolean; | 
					
						
							| 
									
										
										
										
											2020-09-11 15:04:36 -07:00
										 |  |  |     serialize(config?: SerializeConfig): Buffer; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   // === src/stake-program.js ===
 | 
					
						
							|  |  |  |   export type StakeAuthorizationType = { | 
					
						
							|  |  |  |     index: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class Authorized { | 
					
						
							|  |  |  |     staker: PublicKey; | 
					
						
							|  |  |  |     withdrawer: PublicKey; | 
					
						
							|  |  |  |     constructor(staker: PublicKey, withdrawer: PublicKey); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export class Lockup { | 
					
						
							|  |  |  |     unixTimestamp: number; | 
					
						
							|  |  |  |     epoch: number; | 
					
						
							|  |  |  |     custodian: PublicKey; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(unixTimestamp: number, epoch: number, custodian: PublicKey); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-02 23:58:10 +08:00
										 |  |  |   export type CreateStakeAccountParams = { | 
					
						
							|  |  |  |     fromPubkey: PublicKey; | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorized: Authorized; | 
					
						
							|  |  |  |     lockup: Lockup; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type CreateStakeAccountWithSeedParams = { | 
					
						
							|  |  |  |     fromPubkey: PublicKey; | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     basePubkey: PublicKey; | 
					
						
							|  |  |  |     seed: string; | 
					
						
							|  |  |  |     authorized: Authorized; | 
					
						
							|  |  |  |     lockup: Lockup; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type InitializeStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorized: Authorized; | 
					
						
							|  |  |  |     lockup: Lockup; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type DelegateStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     votePubkey: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type AuthorizeStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     newAuthorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     stakeAuthorizationType: StakeAuthorizationType; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-21 12:28:01 -06:00
										 |  |  |   export type AuthorizeWithSeedStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorityBase: PublicKey; | 
					
						
							|  |  |  |     authoritySeed: string; | 
					
						
							|  |  |  |     authorityOwner: PublicKey; | 
					
						
							|  |  |  |     newAuthorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     stakeAuthorizationType: StakeAuthorizationType; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-02 23:58:10 +08:00
										 |  |  |   export type SplitStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     splitStakePubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type WithdrawStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     toPubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type DeactivateStakeParams = { | 
					
						
							|  |  |  |     stakePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   export class StakeProgram { | 
					
						
							|  |  |  |     static programId: PublicKey; | 
					
						
							|  |  |  |     static space: number; | 
					
						
							| 
									
										
										
										
											2020-03-02 23:58:10 +08:00
										 |  |  |     static createAccount(params: CreateStakeAccountParams): Transaction; | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |     static createAccountWithSeed( | 
					
						
							| 
									
										
										
										
											2020-03-02 23:58:10 +08:00
										 |  |  |       params: CreateStakeAccountWithSeedParams, | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |     ): Transaction; | 
					
						
							| 
									
										
										
										
											2020-03-02 23:58:10 +08:00
										 |  |  |     static delegate(params: DelegateStakeParams): Transaction; | 
					
						
							|  |  |  |     static authorize(params: AuthorizeStakeParams): Transaction; | 
					
						
							|  |  |  |     static split(params: SplitStakeParams): Transaction; | 
					
						
							|  |  |  |     static withdraw(params: WithdrawStakeParams): Transaction; | 
					
						
							|  |  |  |     static deactivate(params: DeactivateStakeParams): Transaction; | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type StakeInstructionType = | 
					
						
							|  |  |  |     | 'Initialize' | 
					
						
							|  |  |  |     | 'Authorize' | 
					
						
							| 
									
										
										
										
											2020-08-21 12:28:01 -06:00
										 |  |  |     | 'AuthorizeWithSeed' | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |     | 'Delegate' | 
					
						
							|  |  |  |     | 'Split' | 
					
						
							|  |  |  |     | 'Withdraw' | 
					
						
							|  |  |  |     | 'Deactivate'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export const STAKE_INSTRUCTION_LAYOUTS: { | 
					
						
							| 
									
										
										
										
											2020-03-03 11:16:19 +08:00
										 |  |  |     [type in StakeInstructionType]: InstructionType; | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-02 23:58:10 +08:00
										 |  |  |   export class StakeInstruction { | 
					
						
							|  |  |  |     static decodeInstructionType( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): StakeInstructionType; | 
					
						
							|  |  |  |     static decodeInitialize( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): InitializeStakeParams; | 
					
						
							|  |  |  |     static decodeDelegate( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): DelegateStakeParams; | 
					
						
							|  |  |  |     static decodeAuthorize( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): AuthorizeStakeParams; | 
					
						
							|  |  |  |     static decodeSplit(instruction: TransactionInstruction): SplitStakeParams; | 
					
						
							|  |  |  |     static decodeWithdraw( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): WithdrawStakeParams; | 
					
						
							|  |  |  |     static decodeDeactivate( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): DeactivateStakeParams; | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-12 10:06:34 +08:00
										 |  |  |   // === src/system-program.js ===
 | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |   export type CreateAccountParams = { | 
					
						
							|  |  |  |     fromPubkey: PublicKey; | 
					
						
							|  |  |  |     newAccountPubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |     space: number; | 
					
						
							|  |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |   export type CreateAccountWithSeedParams = { | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |     fromPubkey: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     newAccountPubkey: PublicKey; | 
					
						
							|  |  |  |     basePubkey: PublicKey; | 
					
						
							|  |  |  |     seed: string; | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |     lamports: number; | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     space: number; | 
					
						
							|  |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type AllocateParams = { | 
					
						
							|  |  |  |     accountPubkey: PublicKey; | 
					
						
							|  |  |  |     space: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type AllocateWithSeedParams = { | 
					
						
							|  |  |  |     accountPubkey: PublicKey; | 
					
						
							|  |  |  |     basePubkey: PublicKey; | 
					
						
							|  |  |  |     seed: string; | 
					
						
							|  |  |  |     space: number; | 
					
						
							|  |  |  |     programId: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type AssignParams = { | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     accountPubkey: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |   export type AssignWithSeedParams = { | 
					
						
							|  |  |  |     accountPubkey: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |     basePubkey: PublicKey; | 
					
						
							|  |  |  |     seed: string; | 
					
						
							|  |  |  |     programId: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |   export type TransferParams = { | 
					
						
							|  |  |  |     fromPubkey: PublicKey; | 
					
						
							|  |  |  |     toPubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |   export type CreateNonceAccountParams = { | 
					
						
							|  |  |  |     fromPubkey: PublicKey; | 
					
						
							|  |  |  |     noncePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-05 13:30:55 +08:00
										 |  |  |   export type CreateNonceAccountWithSeedParams = { | 
					
						
							|  |  |  |     fromPubkey: PublicKey; | 
					
						
							|  |  |  |     noncePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |     basePubkey: PublicKey; | 
					
						
							|  |  |  |     seed: string; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |   export type InitializeNonceParams = { | 
					
						
							|  |  |  |     noncePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type AdvanceNonceParams = { | 
					
						
							|  |  |  |     noncePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type WithdrawNonceParams = { | 
					
						
							|  |  |  |     noncePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     toPubkey: PublicKey; | 
					
						
							|  |  |  |     lamports: number; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export type AuthorizeNonceParams = { | 
					
						
							|  |  |  |     noncePubkey: PublicKey; | 
					
						
							|  |  |  |     authorizedPubkey: PublicKey; | 
					
						
							|  |  |  |     newAuthorizedPubkey: PublicKey; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-12 10:06:34 +08:00
										 |  |  |   export class SystemProgram { | 
					
						
							|  |  |  |     static programId: PublicKey; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-10 15:43:32 +08:00
										 |  |  |     static createAccount(params: CreateAccountParams): TransactionInstruction; | 
					
						
							| 
									
										
										
										
											2020-02-12 10:06:34 +08:00
										 |  |  |     static createAccountWithSeed( | 
					
						
							| 
									
										
										
										
											2020-03-09 10:48:50 +08:00
										 |  |  |       params: CreateAccountWithSeedParams, | 
					
						
							| 
									
										
										
										
											2020-09-10 15:43:32 +08:00
										 |  |  |     ): TransactionInstruction; | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     static allocate( | 
					
						
							|  |  |  |       params: AllocateParams | AllocateWithSeedParams, | 
					
						
							| 
									
										
										
										
											2020-09-10 15:43:32 +08:00
										 |  |  |     ): TransactionInstruction; | 
					
						
							|  |  |  |     static assign( | 
					
						
							|  |  |  |       params: AssignParams | AssignWithSeedParams, | 
					
						
							|  |  |  |     ): TransactionInstruction; | 
					
						
							|  |  |  |     static transfer(params: TransferParams): TransactionInstruction; | 
					
						
							| 
									
										
										
										
											2020-05-05 13:30:55 +08:00
										 |  |  |     static createNonceAccount( | 
					
						
							|  |  |  |       params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams, | 
					
						
							|  |  |  |     ): Transaction; | 
					
						
							| 
									
										
										
										
											2020-03-09 10:48:50 +08:00
										 |  |  |     static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction; | 
					
						
							| 
									
										
										
										
											2020-09-10 15:43:32 +08:00
										 |  |  |     static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction; | 
					
						
							|  |  |  |     static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction; | 
					
						
							| 
									
										
										
										
											2020-02-12 10:06:34 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   export type SystemInstructionType = | 
					
						
							|  |  |  |     | 'Create' | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     | 'CreateWithSeed' | 
					
						
							|  |  |  |     | 'Allocate' | 
					
						
							|  |  |  |     | 'AllocateWithSeed' | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |     | 'Assign' | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     | 'AssignWithSeed' | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |     | 'Transfer' | 
					
						
							|  |  |  |     | 'AdvanceNonceAccount' | 
					
						
							|  |  |  |     | 'WithdrawNonceAccount' | 
					
						
							|  |  |  |     | 'InitializeNonceAccount' | 
					
						
							|  |  |  |     | 'AuthorizeNonceAccount'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   export const SYSTEM_INSTRUCTION_LAYOUTS: { | 
					
						
							| 
									
										
										
										
											2020-03-03 11:16:19 +08:00
										 |  |  |     [type in SystemInstructionType]: InstructionType; | 
					
						
							| 
									
										
										
										
											2020-02-28 18:43:10 +08:00
										 |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |   export class SystemInstruction { | 
					
						
							|  |  |  |     static decodeInstructionType( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): SystemInstructionType; | 
					
						
							|  |  |  |     static decodeCreateAccount( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): CreateAccountParams; | 
					
						
							|  |  |  |     static decodeCreateWithSeed( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): CreateAccountWithSeedParams; | 
					
						
							| 
									
										
										
										
											2020-05-09 18:33:36 +08:00
										 |  |  |     static decodeAllocate(instruction: TransactionInstruction): AllocateParams; | 
					
						
							|  |  |  |     static decodeAllocateWithSeed( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): AllocateWithSeedParams; | 
					
						
							|  |  |  |     static decodeAssign(instruction: TransactionInstruction): AssignParams; | 
					
						
							|  |  |  |     static decodeAssignWithSeed( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): AssignWithSeedParams; | 
					
						
							|  |  |  |     static decodeTransfer(instruction: TransactionInstruction): TransferParams; | 
					
						
							| 
									
										
										
										
											2020-03-03 16:05:50 +08:00
										 |  |  |     static decodeNonceInitialize( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): InitializeNonceParams; | 
					
						
							|  |  |  |     static decodeNonceAdvance( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): AdvanceNonceParams; | 
					
						
							|  |  |  |     static decodeNonceWithdraw( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): WithdrawNonceParams; | 
					
						
							|  |  |  |     static decodeNonceAuthorize( | 
					
						
							|  |  |  |       instruction: TransactionInstruction, | 
					
						
							|  |  |  |     ): AuthorizeNonceParams; | 
					
						
							| 
									
										
										
										
											2020-02-12 10:06:34 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   // === src/loader.js ===
 | 
					
						
							|  |  |  |   export class Loader { | 
					
						
							|  |  |  |     static getMinNumSignatures(dataLength: number): number; | 
					
						
							|  |  |  |     static load( | 
					
						
							|  |  |  |       connection: Connection, | 
					
						
							|  |  |  |       payer: Account, | 
					
						
							|  |  |  |       program: Account, | 
					
						
							|  |  |  |       programId: PublicKey, | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |       data: Buffer | Uint8Array | Array<number>, | 
					
						
							| 
									
										
										
										
											2020-09-23 22:54:27 +08:00
										 |  |  |     ): Promise<boolean>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/bpf-loader.js ===
 | 
					
						
							| 
									
										
										
										
											2020-08-25 09:05:33 -07:00
										 |  |  |   export const BPF_LOADER_PROGRAM_ID: PublicKey; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export class BpfLoader { | 
					
						
							|  |  |  |     static getMinNumSignatures(dataLength: number): number; | 
					
						
							|  |  |  |     static load( | 
					
						
							|  |  |  |       connection: Connection, | 
					
						
							|  |  |  |       payer: Account, | 
					
						
							| 
									
										
										
										
											2020-04-15 21:26:19 +08:00
										 |  |  |       program: Account, | 
					
						
							| 
									
										
										
										
											2020-02-13 08:25:22 +08:00
										 |  |  |       elfBytes: Buffer | Uint8Array | Array<number>, | 
					
						
							| 
									
										
										
										
											2020-08-25 09:05:33 -07:00
										 |  |  |       loaderProgramId: PublicKey, | 
					
						
							| 
									
										
										
										
											2020-09-23 22:54:27 +08:00
										 |  |  |     ): Promise<boolean>; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-25 09:05:33 -07:00
										 |  |  |   // === src/bpf-loader-deprecated.js ===
 | 
					
						
							|  |  |  |   export const BPF_LOADER_DEPRECATED_PROGRAM_ID: PublicKey; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   // === src/util/send-and-confirm-transaction.js ===
 | 
					
						
							|  |  |  |   export function sendAndConfirmTransaction( | 
					
						
							|  |  |  |     connection: Connection, | 
					
						
							|  |  |  |     transaction: Transaction, | 
					
						
							| 
									
										
										
										
											2020-05-20 17:13:21 +08:00
										 |  |  |     signers: Array<Account>, | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |     options?: ConfirmOptions, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   ): Promise<TransactionSignature>; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/util/send-and-confirm-raw-transaction.js ===
 | 
					
						
							|  |  |  |   export function sendAndConfirmRawTransaction( | 
					
						
							|  |  |  |     connection: Connection, | 
					
						
							|  |  |  |     wireTransaction: Buffer, | 
					
						
							| 
									
										
										
										
											2020-06-03 19:55:42 +08:00
										 |  |  |     options?: ConfirmOptions, | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   ): Promise<TransactionSignature>; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-30 20:27:09 +08:00
										 |  |  |   // === src/util/cluster.js ===
 | 
					
						
							|  |  |  |   export type Cluster = 'devnet' | 'testnet' | 'mainnet-beta'; | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-30 20:27:09 +08:00
										 |  |  |   export function clusterApiUrl(cluster?: Cluster, tls?: boolean): string; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // === src/index.js ===
 | 
					
						
							| 
									
										
										
										
											2020-02-03 21:36:35 +08:00
										 |  |  |   export const LAMPORTS_PER_SOL: number; | 
					
						
							|  |  |  | } |