export default class BlockSigner { static readonly preamble: string; /** * Sign a receive block * * @param {ReceiveBlock} data The data required to sign a receive block * @param {string} privateKey Private key to sign the data with * @returns {SignedBlock} the signed block to publish to the blockchain */ static receive: (data: ReceiveBlock, privateKey: string) => SignedBlock; /** * Sign a send block * * @param {SendBlock} data The data required to sign a send block * @param {string} privateKey Private key to sign the data with * @returns {SignedBlock} the signed block to publish to the blockchain */ static send: (data: SendBlock, privateKey: string) => SignedBlock; } export interface ReceiveBlock { walletBalanceRaw: string; toAddress: string; transactionHash: string; frontier: string; representativeAddress: string; amountRaw: string; work?: string; } export interface SendBlock { walletBalanceRaw: string; fromAddress: string; toAddress: string; representativeAddress: string; frontier: string; amountRaw: string; work?: string; } export interface RepresentativeBlock { walletBalanceRaw: string; address: string; representativeAddress: string; frontier: string; work?: string; } export interface SignedBlock extends BlockData { type: 'state'; work?: string; } export interface BlockData { account: string; previous: string; representative: string; balance: string; link: string; signature: string; }