UNPKG

dpos-offline

Version:

Offline Signing Transactions for DPOS Blockchains

25 lines (24 loc) 1.2 kB
/// <reference types="node" /> import { As } from 'type-tagger'; import { Address, ICoinCodec, ICoinCodecMsgs, ICoinCodecTxs } from './interface'; import { IBaseTx } from './txs/'; import { IRegisterDelegateTx, IRegisterSecondSignature, ISendTx, IVoteTx, LiskTransaction, PostableLiskTransaction } from './txs/lisk'; export interface IRegisterMultisignature extends IBaseTx { readonly kind: 'multisignature'; readonly min: number; readonly lifetime: number; readonly config: { added: Array<Buffer & As<'publicKey'>>; removed: Array<Buffer & As<'publicKey'>>; }; } export declare type ILiskTransaction = IVoteTx | ISendTx | IRegisterDelegateTx | IRegisterSecondSignature | IRegisterMultisignature; export declare type LiskCoinCodecTxs = ICoinCodecTxs<LiskTransaction<any>, ILiskTransaction, PostableLiskTransaction<any>> & { getAddressBytes(address: Address): Buffer; bytesForSignature(tx: LiskTransaction<any>): Buffer; }; export declare type LiskCoinCodecMsgs = ICoinCodecMsgs & { readonly prefix: Buffer; readonly signablePayload: (msg: Buffer | string) => Buffer; }; export declare const Lisk: ICoinCodec<LiskCoinCodecTxs, LiskCoinCodecMsgs>;