chore: split out meta type
This commit is contained in:
committed by
Michael Vines
parent
ae53742e1a
commit
62251a8bc2
21
web3.js/module.d.ts
vendored
21
web3.js/module.d.ts
vendored
@ -83,30 +83,27 @@ declare module '@solana/web3.js' {
|
|||||||
rpc?: string;
|
rpc?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ConfirmedTransactionMeta = {
|
||||||
|
fee: number;
|
||||||
|
preBalances: Array<number>;
|
||||||
|
postBalances: Array<number>;
|
||||||
|
err: TransactionError | null;
|
||||||
|
};
|
||||||
|
|
||||||
export type ConfirmedBlock = {
|
export type ConfirmedBlock = {
|
||||||
blockhash: Blockhash;
|
blockhash: Blockhash;
|
||||||
previousBlockhash: Blockhash;
|
previousBlockhash: Blockhash;
|
||||||
parentSlot: number;
|
parentSlot: number;
|
||||||
transactions: Array<{
|
transactions: Array<{
|
||||||
transaction: Transaction;
|
transaction: Transaction;
|
||||||
meta: {
|
meta: ConfirmedTransactionMeta | null;
|
||||||
fee: number;
|
|
||||||
preBalances: Array<number>;
|
|
||||||
postBalances: Array<number>;
|
|
||||||
err: TransactionError | null;
|
|
||||||
} | null;
|
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ConfirmedTransaction = {
|
export type ConfirmedTransaction = {
|
||||||
slot: number;
|
slot: number;
|
||||||
transaction: Transaction;
|
transaction: Transaction;
|
||||||
meta: {
|
meta: ConfirmedTransactionMeta | null;
|
||||||
fee: number;
|
|
||||||
preBalances: Array<number>;
|
|
||||||
postBalances: Array<number>;
|
|
||||||
err: TransactionError | null;
|
|
||||||
} | null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type KeyedAccountInfo = {
|
export type KeyedAccountInfo = {
|
||||||
|
@ -96,30 +96,27 @@ declare module '@solana/web3.js' {
|
|||||||
rpc: string | null,
|
rpc: string | null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
declare export type ConfirmedTransactionMeta = {
|
||||||
|
fee: number,
|
||||||
|
preBalances: Array<number>,
|
||||||
|
postBalances: Array<number>,
|
||||||
|
err: TransactionError | null,
|
||||||
|
};
|
||||||
|
|
||||||
declare export type ConfirmedBlock = {
|
declare export type ConfirmedBlock = {
|
||||||
blockhash: Blockhash,
|
blockhash: Blockhash,
|
||||||
previousBlockhash: Blockhash,
|
previousBlockhash: Blockhash,
|
||||||
parentSlot: number,
|
parentSlot: number,
|
||||||
transactions: Array<{
|
transactions: Array<{
|
||||||
transaction: Transaction,
|
transaction: Transaction,
|
||||||
meta: {
|
meta: ConfirmedTransactionMeta | null,
|
||||||
fee: number,
|
|
||||||
preBalances: Array<number>,
|
|
||||||
postBalances: Array<number>,
|
|
||||||
err: TransactionError | null,
|
|
||||||
} | null,
|
|
||||||
}>,
|
}>,
|
||||||
};
|
};
|
||||||
|
|
||||||
declare export type ConfirmedTransaction = {
|
declare export type ConfirmedTransaction = {
|
||||||
slot: number,
|
slot: number,
|
||||||
transaction: Transaction,
|
transaction: Transaction,
|
||||||
meta: {
|
meta: ConfirmedTransactionMeta | null,
|
||||||
fee: number,
|
|
||||||
preBalances: Array<number>,
|
|
||||||
postBalances: Array<number>,
|
|
||||||
err: TransactionError | null,
|
|
||||||
} | null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
declare export type KeyedAccountInfo = {
|
declare export type KeyedAccountInfo = {
|
||||||
|
@ -233,23 +233,34 @@ const Version = struct({
|
|||||||
'solana-core': 'string',
|
'solana-core': 'string',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metadata for a confirmed transaction on the ledger
|
||||||
|
*
|
||||||
|
* @typedef {Object} ConfirmedTransactionMeta
|
||||||
|
* @property {number} fee The fee charged for processing the transaction
|
||||||
|
* @property {Array<number>} preBalances The balances of the transaction accounts before processing
|
||||||
|
* @property {Array<number>} postBalances The balances of the transaction accounts after processing
|
||||||
|
* @property {object|null} err The error result of transaction processing
|
||||||
|
*/
|
||||||
|
type ConfirmedTransactionMeta = {
|
||||||
|
fee: number,
|
||||||
|
preBalances: Array<number>,
|
||||||
|
postBalances: Array<number>,
|
||||||
|
err: TransactionError | null,
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A confirmed transaction on the ledger
|
* A confirmed transaction on the ledger
|
||||||
*
|
*
|
||||||
* @typedef {Object} ConfirmedTransaction
|
* @typedef {Object} ConfirmedTransaction
|
||||||
* @property {number} slot The slot during which the transaction was processed
|
* @property {number} slot The slot during which the transaction was processed
|
||||||
* @property {Transaction} transaction The details of the transaction
|
* @property {Transaction} transaction The details of the transaction
|
||||||
* @property {object} meta Slot index of this block's parent
|
* @property {ConfirmedTransactionMeta|null} meta Metadata produced from the transaction
|
||||||
*/
|
*/
|
||||||
type ConfirmedTransaction = {
|
type ConfirmedTransaction = {
|
||||||
slot: number,
|
slot: number,
|
||||||
transaction: Transaction,
|
transaction: Transaction,
|
||||||
meta: {
|
meta: ConfirmedTransactionMeta | null,
|
||||||
fee: number,
|
|
||||||
err: TransactionError | null,
|
|
||||||
preBalances: Array<number>,
|
|
||||||
postBalances: Array<number>,
|
|
||||||
} | null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -268,12 +279,7 @@ type ConfirmedBlock = {
|
|||||||
parentSlot: number,
|
parentSlot: number,
|
||||||
transactions: Array<{
|
transactions: Array<{
|
||||||
transaction: Transaction,
|
transaction: Transaction,
|
||||||
meta: {
|
meta: ConfirmedTransactionMeta | null,
|
||||||
fee: number,
|
|
||||||
preBalances: Array<number>,
|
|
||||||
postBalances: Array<number>,
|
|
||||||
err: TransactionError | null,
|
|
||||||
} | null,
|
|
||||||
}>,
|
}>,
|
||||||
rewards: Array<{
|
rewards: Array<{
|
||||||
pubkey: string,
|
pubkey: string,
|
||||||
|
Reference in New Issue
Block a user