mempool/backend/rust-gbt/index.d.ts

51 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-06-24 11:21:58 -07:00
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export interface ThreadTransaction {
uid: number
order: number
fee: number
weight: number
sigops: number
effectiveFeePerVsize: number
inputs: Array<number>
}
2023-07-18 15:05:44 +09:00
export interface ThreadAcceleration {
uid: number
delta: number
}
export class GbtGenerator {
constructor()
/**
* # Errors
*
* Rejects if the thread panics or if the Mutex is poisoned.
*/
2023-07-18 15:05:44 +09:00
make(mempool: Array<ThreadTransaction>, accelerations: Array<ThreadAcceleration>, maxUid: number): Promise<GbtResult>
/**
* # Errors
*
* Rejects if the thread panics or if the Mutex is poisoned.
*/
2023-07-18 15:05:44 +09:00
update(newTxs: Array<ThreadTransaction>, removeTxs: Array<number>, accelerations: Array<ThreadAcceleration>, maxUid: number): Promise<GbtResult>
}
2023-06-24 12:21:33 -07:00
/**
* The result from calling the gbt function.
*
* This tuple contains the following:
* blocks: A 2D Vector of transaction IDs (u32), the inner Vecs each represent a block.
* block_weights: A Vector of total weights per block.
* clusters: A 2D Vector of transaction IDs representing clusters of dependent mempool transactions
* rates: A Vector of tuples containing transaction IDs (u32) and effective fee per vsize (f64)
2023-06-24 12:21:33 -07:00
*/
2023-06-24 11:21:58 -07:00
export class GbtResult {
blocks: Array<Array<number>>
blockWeights: Array<number>
2023-06-24 11:21:58 -07:00
clusters: Array<Array<number>>
rates: Array<Array<number>>
2024-01-09 17:08:25 +00:00
overflow: Array<number>
constructor(blocks: Array<Array<number>>, blockWeights: Array<number>, clusters: Array<Array<number>>, rates: Array<Array<number>>, overflow: Array<number>)
2023-06-24 11:21:58 -07:00
}