Skip to content

Commit 600ab63

Browse files
ThibaultJRDFabrice Bascoulerguelebascou
authored
Bring changes to production (#41)
* Update auto generated doc * Implement full offline signer capability (#37) * Improve abstraction to handle amino offline signer * Bump version to 0.7.2 * Remove useless double check which might cause reflection issues * Fix offline signing Co-authored-by: Fabrice Bascoulergue <lebascou@users.noreply.github.com> * [LUM-215] Add all IBC Messages (#40) * Add MsgTimeout and MsgUpdateClient * Add MsgAcknowledgement * Add MsgTransfer * Add MsgChannelOpenInit * Add MsgChannelOpenTry * Add MsgChannelOpenAck * Add MsgChannelOpenConfirm * Add MsgChannelCloseInit * Add MsgChannelCloseConfirm * Add MsgRecvPacket * Add MsgTimeoutOnClose * Add MsgCreateClient * Add MsgUpgradeClient * Add MsgSubmitMisbehaviour * Add MsgConnectionOpenInit * Add MsgConnectionOpenTry * Add MsgConnectionOpenAck * Add MsgConnectionOpenConfirm * Bump version to 0.7.4 Co-authored-by: Fabrice Bascoulergue <fabrice@flashgap.com> Co-authored-by: Fabrice Bascoulergue <3663159+lebascou@users.noreply.github.com> Co-authored-by: Fabrice Bascoulergue <lebascou@users.noreply.github.com>
1 parent 784b911 commit 600ab63

22 files changed

+425
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lum-network/sdk-javascript",
3-
"version": "0.7.3",
3+
"version": "0.7.4",
44
"license": "Apache-2.0",
55
"description": "Javascript SDK library for NodeJS and Web browsers to interact with the Lum Network.",
66
"homepage": "https://github.com/lum-network/sdk-javascript#readme",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Message } from '../Message';
2+
import { MsgAcknowledgement } from '../../codec/ibc/core/channel/v1/tx';
3+
import { Packet } from '../../codec/ibc/core/channel/v1/channel';
4+
import { Height } from '../../codec/ibc/core/client/v1/client';
5+
6+
export const MsgAcknowledgementUrl = '/ibc.core.channel.v1.MsgAcknowledgement';
7+
8+
export const BuildMsgAcknowledgement = (acknowledgement: Uint8Array, proofAcked: Uint8Array, signer: string, packet?: Packet, proofHeight?: Height): Message => {
9+
return {
10+
typeUrl: MsgAcknowledgementUrl,
11+
value: {
12+
acknowledgement,
13+
proofAcked,
14+
signer,
15+
packet,
16+
proofHeight,
17+
} as MsgAcknowledgement,
18+
};
19+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Message } from '../Message';
2+
import { MsgChannelCloseConfirm } from '../../codec/ibc/core/channel/v1/tx';
3+
import { Height } from '../../codec/ibc/core/client/v1/client';
4+
5+
export const MsgChannelCloseConfirmUrl = '/ibc.core.channel.v1.MsgChannelCloseConfirm';
6+
7+
export const BuildMsgChannelCloseConfirm = (channelId: string, portId: string, signer: string, proofInit: Uint8Array, proofHeight?: Height): Message => {
8+
return {
9+
typeUrl: MsgChannelCloseConfirmUrl,
10+
value: {
11+
channelId,
12+
portId,
13+
signer,
14+
proofInit,
15+
proofHeight,
16+
} as MsgChannelCloseConfirm,
17+
};
18+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Message } from '../Message';
2+
import { MsgChannelCloseInit } from '../../codec/ibc/core/channel/v1/tx';
3+
4+
export const MsgChannelCloseInitUrl = '/ibc.core.channel.v1.MsgChannelCloseInit';
5+
6+
export const BuildMsgChannelCloseInit = (channelId: string, signer: string, portId: string): Message => {
7+
return {
8+
typeUrl: MsgChannelCloseInitUrl,
9+
value: {
10+
channelId,
11+
signer,
12+
portId,
13+
} as MsgChannelCloseInit,
14+
};
15+
};

src/messages/ibc/MsgChannelOpenAck.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Message } from '../Message';
2+
import { MsgChannelOpenAck } from '../../codec/ibc/core/channel/v1/tx';
3+
import { Height } from '../../codec/ibc/core/client/v1/client';
4+
5+
export const MsgChannelOpenAckUrl = '/ibc.core.channel.v1.MsgChannelOpenAck';
6+
7+
export const BuildMsgChannelOpenAck = (
8+
portId: string,
9+
channelId: string,
10+
counterpartyChannelId: string,
11+
counterpartyVersion: string,
12+
signer: string,
13+
proofTry: Uint8Array,
14+
proofHeight?: Height,
15+
): Message => {
16+
return {
17+
typeUrl: MsgChannelOpenAckUrl,
18+
value: {
19+
portId,
20+
channelId,
21+
counterpartyChannelId,
22+
counterpartyVersion,
23+
signer,
24+
proofTry,
25+
proofHeight,
26+
} as MsgChannelOpenAck,
27+
};
28+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Message } from '../Message';
2+
import { MsgChannelOpenConfirm } from '../../codec/ibc/core/channel/v1/tx';
3+
import { Height } from '../../codec/ibc/core/client/v1/client';
4+
5+
export const MsgChannelOpenConfirmUrl = '/ibc.core.channel.v1.MsgChannelOpenConfirm';
6+
7+
export const BuildMsgChannelOpenConfirm = (channelId: string, portId: string, signer: string, proofAck: Uint8Array, proofHeight?: Height): Message => {
8+
return {
9+
typeUrl: MsgChannelOpenConfirmUrl,
10+
value: {
11+
channelId,
12+
portId,
13+
signer,
14+
proofAck,
15+
proofHeight,
16+
} as MsgChannelOpenConfirm,
17+
};
18+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Message } from '../Message';
2+
import { MsgChannelOpenInit } from '../../codec/ibc/core/channel/v1/tx';
3+
import { Channel } from '../../codec/ibc/core/channel/v1/channel';
4+
5+
export const MsgChannelOpenInitUrl = '/ibc.core.channel.v1.MsgChannelOpenInit';
6+
7+
export const BuildMsgChannelOpenInit = (portId: string, signer: string, channel?: Channel): Message => {
8+
return {
9+
typeUrl: MsgChannelOpenInitUrl,
10+
value: {
11+
portId,
12+
signer,
13+
channel,
14+
} as MsgChannelOpenInit,
15+
};
16+
};

src/messages/ibc/MsgChannelOpenTry.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { Message } from '../Message';
2+
import { MsgChannelOpenTry } from '../../codec/ibc/core/channel/v1/tx';
3+
import { Channel } from '../../codec/ibc/core/channel/v1/channel';
4+
import { Height } from '../../codec/ibc/core/client/v1/client';
5+
6+
export const MsgChannelOpenTryUrl = '/ibc.core.channel.v1.MsgChannelOpenTry';
7+
8+
export const BuildMsgChannelOpenTry = (
9+
portId: string,
10+
previousChannelId: string,
11+
counterpartyVersion: string,
12+
signer: string,
13+
proofInit: Uint8Array,
14+
channel?: Channel,
15+
proofHeight?: Height,
16+
): Message => {
17+
return {
18+
typeUrl: MsgChannelOpenTryUrl,
19+
value: {
20+
portId,
21+
previousChannelId,
22+
counterpartyVersion,
23+
signer,
24+
proofInit,
25+
channel,
26+
proofHeight,
27+
} as MsgChannelOpenTry,
28+
};
29+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Message } from '../Message';
2+
import { MsgConnectionOpenAck } from '../../codec/ibc/core/connection/v1/tx';
3+
import { Any } from '../../codec/google/protobuf/any';
4+
import { Height } from '../../codec/ibc/core/client/v1/client';
5+
import { Version } from '../../codec/ibc/core/connection/v1/connection';
6+
7+
export const MsgConnectionOpenAckUrl = '/ibc.core.connection.v1.MsgConnectionOpenAck';
8+
9+
export const BuildMsgConnectionOpenAck = (
10+
connectionId: string,
11+
signer: string,
12+
counterpartyConnectionId: string,
13+
proofClient: Uint8Array,
14+
proofConsensus: Uint8Array,
15+
proofTry: Uint8Array,
16+
clientState?: Any,
17+
proofHeight?: Height,
18+
consensusHeight?: Height,
19+
version?: Version,
20+
): Message => {
21+
return {
22+
typeUrl: MsgConnectionOpenAckUrl,
23+
value: {
24+
connectionId,
25+
signer,
26+
counterpartyConnectionId,
27+
proofClient,
28+
proofConsensus,
29+
proofTry,
30+
clientState,
31+
proofHeight,
32+
consensusHeight,
33+
version,
34+
} as MsgConnectionOpenAck,
35+
};
36+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Message } from '../Message';
2+
import { MsgConnectionOpenConfirm } from '../../codec/ibc/core/connection/v1/tx';
3+
import { Height } from '../../codec/ibc/core/client/v1/client';
4+
5+
export const MsgConnectionOpenConfirmUrl = '/ibc.core.connection.v1.MsgConnectionOpenConfirm';
6+
7+
export const BuildMsgConnectionOpenConfirm = (connectionId: string, signer: string, proofAck: Uint8Array, proofHeight?: Height): Message => {
8+
return {
9+
typeUrl: MsgConnectionOpenConfirmUrl,
10+
value: {
11+
connectionId,
12+
signer,
13+
proofAck,
14+
proofHeight,
15+
} as MsgConnectionOpenConfirm,
16+
};
17+
};

0 commit comments

Comments
 (0)