@muirglacier/jellyfish-transaction
Version:
A collection of TypeScript + JavaScript tools and libraries for DeFi Blockchain developers to build decentralized finance for Bitcoin
34 lines • 982 B
TypeScript
import { BufferComposer, ComposableBuffer } from '@muirglacier/jellyfish-buffer';
/**
* DeFi Transaction
* [OP_RETURN, OP_PUSHDATA] Custom Transaction
*/
export interface DfTx<T> {
signature: number;
type: number;
data: T;
/**
* Not composed into buffer, for readability only.
*
* Name of operation in human readable string.
* Structured as 'OP_DEFI_TX_<...>'
*/
name: string;
}
/**
* Composable DfTx, C stands for Composable.
* Immutable by design, bi-directional fromBuffer, toBuffer deep composer.
*/
export declare class CDfTx extends ComposableBuffer<DfTx<any>> {
static SIGNATURE: number;
composers(dftx: DfTx<any>): BufferComposer[];
/**
* Signature read/write with error handling if not recognized
*/
static signature(dftx: DfTx<any>): BufferComposer;
/**
* Operation data read/write composing
*/
static data(dftx: DfTx<any>): BufferComposer;
}
//# sourceMappingURL=dftx.d.ts.map