dpos-offline
Version:
Offline Signing Transactions for DPOS Blockchains
30 lines (29 loc) • 1.09 kB
TypeScript
/// <reference types="node" />
import { As } from 'type-tagger';
import { IBaseTx } from '../../base';
import { RiseV2Transaction } from '../base_rise';
import { BaseRiseV2Codec } from './base_v2';
export declare type RiseV2RegDelegateAsset = {
delegate: {
forgingPK: Buffer & As<'publicKey'>;
username?: string;
};
};
/**
* Register Delegate Identifier
*/
export interface IRegisterDelegateRiseV2Tx extends IBaseTx {
readonly kind: 'register-delegate-v2';
/**
* The identifier/username/name of the delegate to register
*/
readonly identifier?: string & As<'delegateName'>;
readonly forgingPublicKey?: Buffer & As<'publicKey'>;
}
export declare class RiseRegDelegateV2TxCodec extends BaseRiseV2Codec<RiseV2RegDelegateAsset> {
constructor();
transform(from: IRegisterDelegateRiseV2Tx): RiseV2Transaction<RiseV2RegDelegateAsset>;
calcFees(tx: IRegisterDelegateRiseV2Tx): number;
protected assetBytes(tx: RiseV2Transaction<RiseV2RegDelegateAsset>): Buffer;
protected assetFromBytes(buf: Buffer): RiseV2RegDelegateAsset;
}