UNPKG

@onekeyfe/blockchain-libs

Version:
79 lines (78 loc) 4.03 kB
import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx'; import { Coin } from 'cosmjs-types/cosmos/base/v1beta1/coin'; import { SignDoc } from 'cosmjs-types/cosmos/tx/v1beta1/tx'; import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1beta1/tx'; declare const MsgProtoRegistry: { '/cosmos.bank.v1beta1.MsgSend': { encode(message: MsgSend, writer?: import("protobufjs").Writer | undefined): import("protobufjs").Writer; decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): MsgSend; fromJSON(object: any): MsgSend; toJSON(message: MsgSend): unknown; fromPartial<I extends { fromAddress?: string | undefined; toAddress?: string | undefined; amount?: { denom?: string | undefined; amount?: string | undefined; }[] | undefined; } & { fromAddress?: string | undefined; toAddress?: string | undefined; amount?: ({ denom?: string | undefined; amount?: string | undefined; }[] & ({ denom?: string | undefined; amount?: string | undefined; } & { denom?: string | undefined; amount?: string | undefined; } & Record<Exclude<keyof I["amount"][number], keyof Coin>, never>)[] & Record<Exclude<keyof I["amount"], keyof { denom?: string | undefined; amount?: string | undefined; }[]>, never>) | undefined; } & Record<Exclude<keyof I, keyof MsgSend>, never>>(object: I): MsgSend; }; '/terra.wasm.v1beta1.MsgExecuteContract': { encode(message: MsgExecuteContract, writer?: import("protobufjs").Writer | undefined): import("protobufjs").Writer; decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): MsgExecuteContract; fromJSON(object: any): MsgExecuteContract; toJSON(message: MsgExecuteContract): unknown; fromPartial<I_1 extends { sender?: string | undefined; contract?: string | undefined; msg?: Uint8Array | undefined; funds?: { denom?: string | undefined; amount?: string | undefined; }[] | undefined; } & { sender?: string | undefined; contract?: string | undefined; msg?: Uint8Array | undefined; funds?: ({ denom?: string | undefined; amount?: string | undefined; }[] & ({ denom?: string | undefined; amount?: string | undefined; } & { denom?: string | undefined; amount?: string | undefined; } & Record<Exclude<keyof I_1["funds"][number], keyof Coin>, never>)[] & Record<Exclude<keyof I_1["funds"], keyof { denom?: string | undefined; amount?: string | undefined; }[]>, never>) | undefined; } & Record<Exclude<keyof I_1, keyof MsgExecuteContract>, never>>(object: I_1): MsgExecuteContract; }; }; export declare type ProtoMsgObj = { typeUrl: keyof typeof MsgProtoRegistry; value: any; }; export declare function makeSignBytes({ accountNumber, authInfoBytes, bodyBytes, chainId, }: SignDoc): Uint8Array; export declare function fastMakeSignDoc(messages: ProtoMsgObj[], memo: string, gasLimit: string, feeAmount: string, pubkey: Uint8Array, mainCoinDenom: string, chainId: string, accountNumber: number, nonce: number): SignDoc; export declare function makeMsgSend(fromAddress: string, toAddress: string, value: string, denom: string): ProtoMsgObj; export declare function makeMsgExecuteContract(sender: string, contract: string, msg: object, funds?: Array<Coin>): ProtoMsgObj; export declare function makeTxRawBytes(bodyBytes: Uint8Array, authInfoBytes: Uint8Array, signatures: Uint8Array[]): Uint8Array; export {};