2023-06-24 11:21:58 -07:00
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
|
2023-06-24 23:05:43 -07:00
|
|
|
export class GbtGenerator {
|
|
|
|
constructor()
|
2023-06-25 16:08:16 -07:00
|
|
|
/**
|
|
|
|
* # Errors
|
|
|
|
*
|
|
|
|
* Rejects if the thread panics or if the Mutex is poisoned.
|
|
|
|
*/
|
2023-06-24 23:05:43 -07:00
|
|
|
make(mempoolBuffer: Uint8Array): Promise<GbtResult>
|
2023-06-25 16:08:16 -07:00
|
|
|
/**
|
|
|
|
* # Errors
|
|
|
|
*
|
|
|
|
* Rejects if the thread panics or if the Mutex is poisoned.
|
|
|
|
*/
|
2023-06-24 23:05:43 -07:00
|
|
|
update(newTxs: Uint8Array, removeTxs: Uint8Array): 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.
|
|
|
|
* 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 11:21:58 -07:00
|
|
|
export class GbtResult {
|
|
|
|
blocks: Array<Array<number>>
|
|
|
|
clusters: Array<Array<number>>
|
|
|
|
rates: Array<Array<number>>
|
|
|
|
constructor(blocks: Array<Array<number>>, clusters: Array<Array<number>>, rates: Array<Array<number>>)
|
|
|
|
}
|