Use a class to hold state for Rust GbtGenerator

This commit is contained in:
junderw
2023-06-24 23:05:43 -07:00
committed by Mononaut
parent 8cfda1a546
commit ded2352cf8
6 changed files with 126 additions and 46 deletions

View File

@@ -3,8 +3,11 @@
/* auto-generated by NAPI-RS */
export function make(mempoolBuffer: Uint8Array): Promise<GbtResult>
export function update(newTxs: Uint8Array, removeTxs: Uint8Array): Promise<GbtResult>
export class GbtGenerator {
constructor()
make(mempoolBuffer: Uint8Array): Promise<GbtResult>
update(newTxs: Uint8Array, removeTxs: Uint8Array): Promise<GbtResult>
}
/**
* The result from calling the gbt function.
*