UNPKG

@bandprotocol/bandchain.js

Version:

TypeScript library for Cosmos SDK and BandChain

367 lines (366 loc) 16.5 kB
import { Any, AnyProtoMsg, AnyAmino, AnySDKType } from "../../../google/protobuf/any"; import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin"; import { Price, PriceAmino, PriceSDKType } from "../../feeds/v1beta1/feeds"; import { Encoder } from "../../feeds/v1beta1/encoder"; import { TSSRoute, TSSRouteProtoMsg, TSSRouteSDKType, IBCRoute, IBCRouteProtoMsg, IBCRouteSDKType, IBCHookRoute, IBCHookRouteProtoMsg, IBCHookRouteSDKType, RouterRoute, RouterRouteProtoMsg, RouterRouteSDKType, AxelarRoute, AxelarRouteProtoMsg, AxelarRouteSDKType, TSSPacketReceipt, TSSPacketReceiptProtoMsg, TSSPacketReceiptSDKType, IBCPacketReceipt, IBCPacketReceiptProtoMsg, IBCPacketReceiptSDKType, RouterPacketReceipt, RouterPacketReceiptProtoMsg, RouterPacketReceiptSDKType, AxelarPacketReceipt, AxelarPacketReceiptProtoMsg, AxelarPacketReceiptSDKType } from "./route"; import { BinaryReader, BinaryWriter } from "../../../binary"; /** Tunnel contains the information of the tunnel that is created by the user */ export interface Tunnel { /** id is the tunnel ID */ id: bigint; /** sequence is representing the sequence of the tunnel packet. */ sequence: bigint; /** route is the route for delivering the signal prices */ route?: TSSRoute | IBCRoute | IBCHookRoute | RouterRoute | AxelarRoute | Any | undefined; /** fee_payer is the address of the fee payer */ feePayer: string; /** signal_deviations is the list of signal deviations */ signalDeviations: SignalDeviation[]; /** interval is the interval for delivering the signal prices */ interval: bigint; /** total_deposit is the total deposit on the tunnel. */ totalDeposit: Coin[]; /** is_active is the flag to indicate if the tunnel is active */ isActive: boolean; /** created_at is the timestamp when the tunnel is created */ createdAt: bigint; /** creator is the address of the creator */ creator: string; } export interface TunnelProtoMsg { typeUrl: "/band.tunnel.v1beta1.Tunnel"; value: Uint8Array; } export type TunnelEncoded = Omit<Tunnel, "route"> & { /** route is the route for delivering the signal prices */ route?: TSSRouteProtoMsg | IBCRouteProtoMsg | IBCHookRouteProtoMsg | RouterRouteProtoMsg | AxelarRouteProtoMsg | AnyProtoMsg | undefined; }; /** Tunnel contains the information of the tunnel that is created by the user */ export interface TunnelAmino { /** id is the tunnel ID */ id?: string; /** sequence is representing the sequence of the tunnel packet. */ sequence?: string; /** route is the route for delivering the signal prices */ route?: AnyAmino; /** fee_payer is the address of the fee payer */ fee_payer?: string; /** signal_deviations is the list of signal deviations */ signal_deviations?: SignalDeviationAmino[]; /** interval is the interval for delivering the signal prices */ interval?: string; /** total_deposit is the total deposit on the tunnel. */ total_deposit: CoinAmino[]; /** is_active is the flag to indicate if the tunnel is active */ is_active?: boolean; /** created_at is the timestamp when the tunnel is created */ created_at?: string; /** creator is the address of the creator */ creator?: string; } export interface TunnelAminoMsg { type: "/band.tunnel.v1beta1.Tunnel"; value: TunnelAmino; } /** Tunnel contains the information of the tunnel that is created by the user */ export interface TunnelSDKType { id: bigint; sequence: bigint; route?: TSSRouteSDKType | IBCRouteSDKType | IBCHookRouteSDKType | RouterRouteSDKType | AxelarRouteSDKType | AnySDKType | undefined; fee_payer: string; signal_deviations: SignalDeviationSDKType[]; interval: bigint; total_deposit: CoinSDKType[]; is_active: boolean; created_at: bigint; creator: string; } /** LatestPrices is the type for prices that tunnel produces */ export interface LatestPrices { /** tunnel_id is the tunnel ID */ tunnelId: bigint; /** prices is the list of prices information from feeds module. */ prices: Price[]; /** last_interval is the last interval when the signal prices are produced by interval trigger */ lastInterval: bigint; } export interface LatestPricesProtoMsg { typeUrl: "/band.tunnel.v1beta1.LatestPrices"; value: Uint8Array; } /** LatestPrices is the type for prices that tunnel produces */ export interface LatestPricesAmino { /** tunnel_id is the tunnel ID */ tunnel_id?: string; /** prices is the list of prices information from feeds module. */ prices?: PriceAmino[]; /** last_interval is the last interval when the signal prices are produced by interval trigger */ last_interval?: string; } export interface LatestPricesAminoMsg { type: "/band.tunnel.v1beta1.LatestPrices"; value: LatestPricesAmino; } /** LatestPrices is the type for prices that tunnel produces */ export interface LatestPricesSDKType { tunnel_id: bigint; prices: PriceSDKType[]; last_interval: bigint; } /** TotalFees is the type for the total fees collected by the tunnel */ export interface TotalFees { /** total_base_packet_fee is the total base packet fee collected by the tunnel */ totalBasePacketFee: Coin[]; } export interface TotalFeesProtoMsg { typeUrl: "/band.tunnel.v1beta1.TotalFees"; value: Uint8Array; } /** TotalFees is the type for the total fees collected by the tunnel */ export interface TotalFeesAmino { /** total_base_packet_fee is the total base packet fee collected by the tunnel */ total_base_packet_fee?: CoinAmino[]; } export interface TotalFeesAminoMsg { type: "/band.tunnel.v1beta1.TotalFees"; value: TotalFeesAmino; } /** TotalFees is the type for the total fees collected by the tunnel */ export interface TotalFeesSDKType { total_base_packet_fee: CoinSDKType[]; } /** Packet is the packet that tunnel produces */ export interface Packet { /** tunnel_id is the tunnel ID */ tunnelId: bigint; /** sequence is representing the sequence of the tunnel packet. */ sequence: bigint; /** prices is the list of prices information from feeds module. */ prices: Price[]; /** receipt represents the confirmation of the packet delivery to the destination via the specified route. */ receipt?: TSSPacketReceipt | IBCPacketReceipt | RouterPacketReceipt | AxelarPacketReceipt | Any | undefined; /** created_at is the timestamp when the packet is created */ createdAt: bigint; } export interface PacketProtoMsg { typeUrl: "/band.tunnel.v1beta1.Packet"; value: Uint8Array; } export type PacketEncoded = Omit<Packet, "receipt"> & { /** receipt represents the confirmation of the packet delivery to the destination via the specified route. */ receipt?: TSSPacketReceiptProtoMsg | IBCPacketReceiptProtoMsg | RouterPacketReceiptProtoMsg | AxelarPacketReceiptProtoMsg | AnyProtoMsg | undefined; }; /** Packet is the packet that tunnel produces */ export interface PacketAmino { /** tunnel_id is the tunnel ID */ tunnel_id?: string; /** sequence is representing the sequence of the tunnel packet. */ sequence?: string; /** prices is the list of prices information from feeds module. */ prices?: PriceAmino[]; /** receipt represents the confirmation of the packet delivery to the destination via the specified route. */ receipt?: AnyAmino; /** created_at is the timestamp when the packet is created */ created_at?: string; } export interface PacketAminoMsg { type: "/band.tunnel.v1beta1.Packet"; value: PacketAmino; } /** Packet is the packet that tunnel produces */ export interface PacketSDKType { tunnel_id: bigint; sequence: bigint; prices: PriceSDKType[]; receipt?: TSSPacketReceiptSDKType | IBCPacketReceiptSDKType | RouterPacketReceiptSDKType | AxelarPacketReceiptSDKType | AnySDKType | undefined; created_at: bigint; } /** Deposit defines an amount deposited by an account address to the tunnel. */ export interface Deposit { /** tunnel_id defines the unique id of the tunnel. */ tunnelId: bigint; /** depositor defines the deposit addresses from the proposals. */ depositor: string; /** amount to be deposited by depositor. */ amount: Coin[]; } export interface DepositProtoMsg { typeUrl: "/band.tunnel.v1beta1.Deposit"; value: Uint8Array; } /** Deposit defines an amount deposited by an account address to the tunnel. */ export interface DepositAmino { /** tunnel_id defines the unique id of the tunnel. */ tunnel_id?: string; /** depositor defines the deposit addresses from the proposals. */ depositor?: string; /** amount to be deposited by depositor. */ amount: CoinAmino[]; } export interface DepositAminoMsg { type: "/band.tunnel.v1beta1.Deposit"; value: DepositAmino; } /** Deposit defines an amount deposited by an account address to the tunnel. */ export interface DepositSDKType { tunnel_id: bigint; depositor: string; amount: CoinSDKType[]; } /** SignalDeviation is the type for a signal with soft and hard deviation */ export interface SignalDeviation { /** signal_id is the signal ID */ signalId: string; /** soft_deviation_bps is the soft deviation in basis points */ softDeviationBps: bigint; /** hard_deviation_bps is the hard deviation in basis points */ hardDeviationBps: bigint; } export interface SignalDeviationProtoMsg { typeUrl: "/band.tunnel.v1beta1.SignalDeviation"; value: Uint8Array; } /** SignalDeviation is the type for a signal with soft and hard deviation */ export interface SignalDeviationAmino { /** signal_id is the signal ID */ signal_id?: string; /** soft_deviation_bps is the soft deviation in basis points */ soft_deviation_bps?: string; /** hard_deviation_bps is the hard deviation in basis points */ hard_deviation_bps?: string; } export interface SignalDeviationAminoMsg { type: "/band.tunnel.v1beta1.SignalDeviation"; value: SignalDeviationAmino; } /** SignalDeviation is the type for a signal with soft and hard deviation */ export interface SignalDeviationSDKType { signal_id: string; soft_deviation_bps: bigint; hard_deviation_bps: bigint; } /** TunnelSignatureOrder defines a general signature order for sending signature to tss group. */ export interface TunnelSignatureOrder { /** sequence is the sequence of the packet */ sequence: bigint; /** prices is the list of prices information from feeds module. */ prices: Price[]; /** created_at is the timestamp when the packet is created */ createdAt: bigint; /** encoder is the mode of encoding data. */ encoder: Encoder; } export interface TunnelSignatureOrderProtoMsg { typeUrl: "/band.tunnel.v1beta1.TunnelSignatureOrder"; value: Uint8Array; } /** TunnelSignatureOrder defines a general signature order for sending signature to tss group. */ export interface TunnelSignatureOrderAmino { /** sequence is the sequence of the packet */ sequence?: string; /** prices is the list of prices information from feeds module. */ prices?: PriceAmino[]; /** created_at is the timestamp when the packet is created */ created_at?: string; /** encoder is the mode of encoding data. */ encoder?: Encoder; } export interface TunnelSignatureOrderAminoMsg { type: "/band.tunnel.v1beta1.TunnelSignatureOrder"; value: TunnelSignatureOrderAmino; } /** TunnelSignatureOrder defines a general signature order for sending signature to tss group. */ export interface TunnelSignatureOrderSDKType { sequence: bigint; prices: PriceSDKType[]; created_at: bigint; encoder: Encoder; } export declare const Tunnel: { typeUrl: string; encode(message: Tunnel, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): Tunnel; fromPartial(object: Partial<Tunnel>): Tunnel; fromAmino(object: TunnelAmino): Tunnel; toAmino(message: Tunnel): TunnelAmino; fromAminoMsg(object: TunnelAminoMsg): Tunnel; fromProtoMsg(message: TunnelProtoMsg): Tunnel; toProto(message: Tunnel): Uint8Array; toProtoMsg(message: Tunnel): TunnelProtoMsg; }; export declare const LatestPrices: { typeUrl: string; encode(message: LatestPrices, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): LatestPrices; fromPartial(object: Partial<LatestPrices>): LatestPrices; fromAmino(object: LatestPricesAmino): LatestPrices; toAmino(message: LatestPrices): LatestPricesAmino; fromAminoMsg(object: LatestPricesAminoMsg): LatestPrices; fromProtoMsg(message: LatestPricesProtoMsg): LatestPrices; toProto(message: LatestPrices): Uint8Array; toProtoMsg(message: LatestPrices): LatestPricesProtoMsg; }; export declare const TotalFees: { typeUrl: string; encode(message: TotalFees, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TotalFees; fromPartial(object: Partial<TotalFees>): TotalFees; fromAmino(object: TotalFeesAmino): TotalFees; toAmino(message: TotalFees): TotalFeesAmino; fromAminoMsg(object: TotalFeesAminoMsg): TotalFees; fromProtoMsg(message: TotalFeesProtoMsg): TotalFees; toProto(message: TotalFees): Uint8Array; toProtoMsg(message: TotalFees): TotalFeesProtoMsg; }; export declare const Packet: { typeUrl: string; encode(message: Packet, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): Packet; fromPartial(object: Partial<Packet>): Packet; fromAmino(object: PacketAmino): Packet; toAmino(message: Packet): PacketAmino; fromAminoMsg(object: PacketAminoMsg): Packet; fromProtoMsg(message: PacketProtoMsg): Packet; toProto(message: Packet): Uint8Array; toProtoMsg(message: Packet): PacketProtoMsg; }; export declare const Deposit: { typeUrl: string; encode(message: Deposit, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): Deposit; fromPartial(object: Partial<Deposit>): Deposit; fromAmino(object: DepositAmino): Deposit; toAmino(message: Deposit): DepositAmino; fromAminoMsg(object: DepositAminoMsg): Deposit; fromProtoMsg(message: DepositProtoMsg): Deposit; toProto(message: Deposit): Uint8Array; toProtoMsg(message: Deposit): DepositProtoMsg; }; export declare const SignalDeviation: { typeUrl: string; encode(message: SignalDeviation, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): SignalDeviation; fromPartial(object: Partial<SignalDeviation>): SignalDeviation; fromAmino(object: SignalDeviationAmino): SignalDeviation; toAmino(message: SignalDeviation): SignalDeviationAmino; fromAminoMsg(object: SignalDeviationAminoMsg): SignalDeviation; fromProtoMsg(message: SignalDeviationProtoMsg): SignalDeviation; toProto(message: SignalDeviation): Uint8Array; toProtoMsg(message: SignalDeviation): SignalDeviationProtoMsg; }; export declare const TunnelSignatureOrder: { typeUrl: string; encode(message: TunnelSignatureOrder, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TunnelSignatureOrder; fromPartial(object: Partial<TunnelSignatureOrder>): TunnelSignatureOrder; fromAmino(object: TunnelSignatureOrderAmino): TunnelSignatureOrder; toAmino(message: TunnelSignatureOrder): TunnelSignatureOrderAmino; fromAminoMsg(object: TunnelSignatureOrderAminoMsg): TunnelSignatureOrder; fromProtoMsg(message: TunnelSignatureOrderProtoMsg): TunnelSignatureOrder; toProto(message: TunnelSignatureOrder): Uint8Array; toProtoMsg(message: TunnelSignatureOrder): TunnelSignatureOrderProtoMsg; }; export declare const RouteI_InterfaceDecoder: (input: BinaryReader | Uint8Array) => TSSRoute | IBCRoute | IBCHookRoute | RouterRoute | AxelarRoute | Any; export declare const RouteI_FromAmino: (content: AnyAmino) => Any; export declare const RouteI_ToAmino: (content: Any) => AnyAmino; export declare const PacketReceiptI_InterfaceDecoder: (input: BinaryReader | Uint8Array) => TSSPacketReceipt | IBCPacketReceipt | RouterPacketReceipt | AxelarPacketReceipt | Any; export declare const PacketReceiptI_FromAmino: (content: AnyAmino) => Any; export declare const PacketReceiptI_ToAmino: (content: Any) => AnyAmino;