UNPKG

@leapwallet/buffer-boba

Version:

Buffer Boba is a library for decoding protocol buffers in the cosmos ecosystem.

29 lines (28 loc) 962 B
import { TxBody as _TxBody, AuthInfo as _AuthInfo, SignDoc as _SignDoc } from 'cosmjs-types/cosmos/tx/v1beta1/tx'; import { AnyWithUnpacked, ProtoCodec } from './codec'; export type TxBody = ReturnType<typeof _TxBody.decode>; export type AuthInfo = ReturnType<typeof _AuthInfo.decode>; export type SignDoc = ReturnType<typeof _SignDoc.decode>; /** * */ export declare class DirectSignDocDecoder { readonly signDoc: SignDoc; private readonly protoCodec; static decodeBytes(bytes: Uint8Array, protoCodec?: ProtoCodec): DirectSignDocDecoder; private _txBody; private _authInfo; constructor(signDoc: SignDoc, protoCodec?: ProtoCodec); get txBody(): TxBody; get txMsgs(): AnyWithUnpacked[]; get authInfo(): AuthInfo; get chainId(): string; get accountNumber(): string; toBytes(): Uint8Array; toJSON(): { txBody: any; authInfo: any; chainId: string; accountNumber: string; }; }