UNPKG

@dojima-wallet/connection

Version:

Initialise and connection for layer 1&2 blockchain

101 lines (100 loc) 2.84 kB
import { cosmosclient, proto } from "@cosmos-client/core"; import { Asset, Chain } from "@dojima-wallet/utils"; import { ComputeUnits } from "./util"; export type MsgCoin = { asset: Asset; amount: string; }; export declare class MsgCreateOperator { signer: cosmosclient.AccAddress; stakeAmount: string; serverAddress: string; constructor(signer: cosmosclient.AccAddress, stakeAmount: string, serverAddress: string); } export declare class MsgCreateEndpoint { chain: Chain; rpcUrl: string; wsUrl: string; signer: cosmosclient.AccAddress; constructor(chain: Chain, rpcUrl: string, wsUrl: string, signer: cosmosclient.AccAddress); } export declare class MsgRegisterChain { chain: Chain; computeUnits: ComputeUnits; signer: cosmosclient.AccAddress; constructor(chain: Chain, computeUnits: ComputeUnits, signer: cosmosclient.AccAddress); } export declare class MsgNativeTx { coins: MsgCoin[]; memo: string; signer: cosmosclient.AccAddress; constructor(coins: MsgCoin[], memo: string, signer: cosmosclient.AccAddress); } /** * This creates MsgNativeTx from json. * * @param value * @returns {MsgNativeTx} */ export declare const msgNativeTxFromJson: (value: { coins: MsgCoin[]; memo: string; signer: string; }) => MsgNativeTx; export declare class MsgSetPubkeysTx { secp256k1Pubkey: string; ed25519Pubkey: string; validatorConsPubkey: string; signer: cosmosclient.AccAddress; constructor(signer: cosmosclient.AccAddress, secp256k1Pubkey: string, ed25519Pubkey: string, validatorConsPubkey: string); } export type AminoWrapping<T> = { type: string; value: T; }; export type DojchainDepositResponse = AminoWrapping<{ msg: AminoWrapping<{ coins: MsgCoin[]; memo: string; signer: string; }>[]; fee: proto.cosmos.tx.v1beta1.Fee; signatures: string[]; memo: string; timeout_height: string; }>; export type TxResult = { observed_tx: { tx: { id: string; chain: string; from_address: string; to_address: string; coins: { asset: string; amount: string; }[]; gas: { asset: string; amount: string; }[]; memo: string; }; status: string; signers: string[]; }; keysign_metric: { tx_id: string; node_tss_times: null; }; }; export declare class MsgSetVersionTx { version: string; signer: cosmosclient.AccAddress; constructor(signer: cosmosclient.AccAddress, version: string); } export declare class MsgSetIpAddressTx { ipAddress: string; signer: cosmosclient.AccAddress; constructor(signer: cosmosclient.AccAddress, ipAddress: string); }