From 841f91469dc447abce5b69520d724147e7daa83a Mon Sep 17 00:00:00 2001 From: jacobcoro Date: Fri, 14 Jan 2022 17:18:35 +0800 Subject: [PATCH] poc --- src/msg/cosmos/index.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/msg/cosmos/index.ts b/src/msg/cosmos/index.ts index 393db31..6a13c75 100644 --- a/src/msg/cosmos/index.ts +++ b/src/msg/cosmos/index.ts @@ -58,6 +58,23 @@ function newMsgVoteGovernance( }; } +export interface Msg { + type: T; + value: V; +} +export type TransferMsg = Msg< + { + source_port: string; + source_channel: string; + token: Coin; + sender: string; + receiver: string; + timeout_height: {}; + timeout_timestamp: string; + }, + 'cosmos-sdk/MsgTransfer' +>; + /** * Creates an IBC transfer * @param {String} sourcePort the port identifier, we would expect to always be "transfer" * @param {String} sourcePort the port identifier, we would expect to always be "transfer" @@ -75,7 +92,7 @@ function newMsgTransfer( sender: string, receiver: string, timeoutTimestamp: number -) { +): TransferMsg { return { type: 'cosmos-sdk/MsgTransfer', value: {