decentralcardgame-cardchain-client-ts 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DecentralCardGame.cardchain.cardchain/module.js +1044 -0
- package/DecentralCardGame.cardchain.cardchain/registry.js +72 -70
- package/DecentralCardGame.cardchain.cardchain/rest.js +1 -1
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +30 -6
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/council.js +11 -17
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +1 -217
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/tx.js +166 -8
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/user.js +7 -65
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.js +30 -10
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.js +4137 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +22 -21
- package/client.js +2 -1
- package/cosmos.authz.v1beta1/module.js +19 -19
- package/cosmos.authz.v1beta1/registry.js +2 -2
- package/cosmos.distribution.v1beta1/module.js +24 -24
- package/cosmos.distribution.v1beta1/registry.js +4 -4
- package/cosmos.gov.v1/module.js +31 -31
- package/cosmos.gov.v1/registry.js +4 -4
- package/cosmos.gov.v1beta1/module.js +22 -22
- package/cosmos.gov.v1beta1/registry.js +2 -2
- package/cosmos.group.v1/module.js +102 -102
- package/cosmos.group.v1/registry.js +14 -14
- package/cosmos.group.v1/rest.js +15 -0
- package/cosmos.group.v1/types/cosmos/group/v1/query.js +110 -0
- package/cosmos.staking.v1beta1/module.js +40 -40
- package/cosmos.staking.v1beta1/registry.js +8 -8
- package/cosmos.vesting.v1beta1/module.js +16 -16
- package/cosmos.vesting.v1beta1/registry.js +2 -2
- package/ibc.applications.interchain_accounts.controller.v1/rest.js +9 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/google/protobuf/any.js +99 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/controller/v1/tx.js +266 -0
- package/ibc.applications.interchain_accounts.controller.v1/types/ibc/applications/interchain_accounts/v1/packet.js +192 -0
- package/ibc.applications.transfer.v1/types/ibc/applications/transfer/v1/tx.js +24 -6
- package/ibc.core.client.v1/rest.js +14 -14
- package/ibc.core.connection.v1/rest.js +14 -0
- package/ibc.core.connection.v1/types/ibc/core/connection/v1/query.js +83 -1
- package/package.json +2 -2
- package/tsconfig.json +0 -1
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import Long from "long";
|
|
3
|
+
import _m0 from "protobufjs/minimal";
|
|
4
|
+
import { InterchainAccountPacketData } from "../../v1/packet";
|
|
5
|
+
export const protobufPackage = "ibc.applications.interchain_accounts.controller.v1";
|
|
6
|
+
function createBaseMsgRegisterInterchainAccount() {
|
|
7
|
+
return { owner: "", connectionId: "", version: "" };
|
|
8
|
+
}
|
|
9
|
+
export const MsgRegisterInterchainAccount = {
|
|
10
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
11
|
+
if (message.owner !== "") {
|
|
12
|
+
writer.uint32(10).string(message.owner);
|
|
13
|
+
}
|
|
14
|
+
if (message.connectionId !== "") {
|
|
15
|
+
writer.uint32(18).string(message.connectionId);
|
|
16
|
+
}
|
|
17
|
+
if (message.version !== "") {
|
|
18
|
+
writer.uint32(26).string(message.version);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBaseMsgRegisterInterchainAccount();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1:
|
|
30
|
+
message.owner = reader.string();
|
|
31
|
+
break;
|
|
32
|
+
case 2:
|
|
33
|
+
message.connectionId = reader.string();
|
|
34
|
+
break;
|
|
35
|
+
case 3:
|
|
36
|
+
message.version = reader.string();
|
|
37
|
+
break;
|
|
38
|
+
default:
|
|
39
|
+
reader.skipType(tag & 7);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return message;
|
|
44
|
+
},
|
|
45
|
+
fromJSON(object) {
|
|
46
|
+
return {
|
|
47
|
+
owner: isSet(object.owner) ? String(object.owner) : "",
|
|
48
|
+
connectionId: isSet(object.connectionId) ? String(object.connectionId) : "",
|
|
49
|
+
version: isSet(object.version) ? String(object.version) : "",
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
toJSON(message) {
|
|
53
|
+
const obj = {};
|
|
54
|
+
message.owner !== undefined && (obj.owner = message.owner);
|
|
55
|
+
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
|
56
|
+
message.version !== undefined && (obj.version = message.version);
|
|
57
|
+
return obj;
|
|
58
|
+
},
|
|
59
|
+
fromPartial(object) {
|
|
60
|
+
const message = createBaseMsgRegisterInterchainAccount();
|
|
61
|
+
message.owner = object.owner ?? "";
|
|
62
|
+
message.connectionId = object.connectionId ?? "";
|
|
63
|
+
message.version = object.version ?? "";
|
|
64
|
+
return message;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
function createBaseMsgRegisterInterchainAccountResponse() {
|
|
68
|
+
return { channelId: "" };
|
|
69
|
+
}
|
|
70
|
+
export const MsgRegisterInterchainAccountResponse = {
|
|
71
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
72
|
+
if (message.channelId !== "") {
|
|
73
|
+
writer.uint32(10).string(message.channelId);
|
|
74
|
+
}
|
|
75
|
+
return writer;
|
|
76
|
+
},
|
|
77
|
+
decode(input, length) {
|
|
78
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
79
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
80
|
+
const message = createBaseMsgRegisterInterchainAccountResponse();
|
|
81
|
+
while (reader.pos < end) {
|
|
82
|
+
const tag = reader.uint32();
|
|
83
|
+
switch (tag >>> 3) {
|
|
84
|
+
case 1:
|
|
85
|
+
message.channelId = reader.string();
|
|
86
|
+
break;
|
|
87
|
+
default:
|
|
88
|
+
reader.skipType(tag & 7);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return message;
|
|
93
|
+
},
|
|
94
|
+
fromJSON(object) {
|
|
95
|
+
return { channelId: isSet(object.channelId) ? String(object.channelId) : "" };
|
|
96
|
+
},
|
|
97
|
+
toJSON(message) {
|
|
98
|
+
const obj = {};
|
|
99
|
+
message.channelId !== undefined && (obj.channelId = message.channelId);
|
|
100
|
+
return obj;
|
|
101
|
+
},
|
|
102
|
+
fromPartial(object) {
|
|
103
|
+
const message = createBaseMsgRegisterInterchainAccountResponse();
|
|
104
|
+
message.channelId = object.channelId ?? "";
|
|
105
|
+
return message;
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
function createBaseMsgSendTx() {
|
|
109
|
+
return { owner: "", connectionId: "", packetData: undefined, relativeTimeout: 0 };
|
|
110
|
+
}
|
|
111
|
+
export const MsgSendTx = {
|
|
112
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
113
|
+
if (message.owner !== "") {
|
|
114
|
+
writer.uint32(10).string(message.owner);
|
|
115
|
+
}
|
|
116
|
+
if (message.connectionId !== "") {
|
|
117
|
+
writer.uint32(18).string(message.connectionId);
|
|
118
|
+
}
|
|
119
|
+
if (message.packetData !== undefined) {
|
|
120
|
+
InterchainAccountPacketData.encode(message.packetData, writer.uint32(26).fork()).ldelim();
|
|
121
|
+
}
|
|
122
|
+
if (message.relativeTimeout !== 0) {
|
|
123
|
+
writer.uint32(32).uint64(message.relativeTimeout);
|
|
124
|
+
}
|
|
125
|
+
return writer;
|
|
126
|
+
},
|
|
127
|
+
decode(input, length) {
|
|
128
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
129
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
130
|
+
const message = createBaseMsgSendTx();
|
|
131
|
+
while (reader.pos < end) {
|
|
132
|
+
const tag = reader.uint32();
|
|
133
|
+
switch (tag >>> 3) {
|
|
134
|
+
case 1:
|
|
135
|
+
message.owner = reader.string();
|
|
136
|
+
break;
|
|
137
|
+
case 2:
|
|
138
|
+
message.connectionId = reader.string();
|
|
139
|
+
break;
|
|
140
|
+
case 3:
|
|
141
|
+
message.packetData = InterchainAccountPacketData.decode(reader, reader.uint32());
|
|
142
|
+
break;
|
|
143
|
+
case 4:
|
|
144
|
+
message.relativeTimeout = longToNumber(reader.uint64());
|
|
145
|
+
break;
|
|
146
|
+
default:
|
|
147
|
+
reader.skipType(tag & 7);
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return message;
|
|
152
|
+
},
|
|
153
|
+
fromJSON(object) {
|
|
154
|
+
return {
|
|
155
|
+
owner: isSet(object.owner) ? String(object.owner) : "",
|
|
156
|
+
connectionId: isSet(object.connectionId) ? String(object.connectionId) : "",
|
|
157
|
+
packetData: isSet(object.packetData) ? InterchainAccountPacketData.fromJSON(object.packetData) : undefined,
|
|
158
|
+
relativeTimeout: isSet(object.relativeTimeout) ? Number(object.relativeTimeout) : 0,
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
toJSON(message) {
|
|
162
|
+
const obj = {};
|
|
163
|
+
message.owner !== undefined && (obj.owner = message.owner);
|
|
164
|
+
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
|
165
|
+
message.packetData !== undefined
|
|
166
|
+
&& (obj.packetData = message.packetData ? InterchainAccountPacketData.toJSON(message.packetData) : undefined);
|
|
167
|
+
message.relativeTimeout !== undefined && (obj.relativeTimeout = Math.round(message.relativeTimeout));
|
|
168
|
+
return obj;
|
|
169
|
+
},
|
|
170
|
+
fromPartial(object) {
|
|
171
|
+
const message = createBaseMsgSendTx();
|
|
172
|
+
message.owner = object.owner ?? "";
|
|
173
|
+
message.connectionId = object.connectionId ?? "";
|
|
174
|
+
message.packetData = (object.packetData !== undefined && object.packetData !== null)
|
|
175
|
+
? InterchainAccountPacketData.fromPartial(object.packetData)
|
|
176
|
+
: undefined;
|
|
177
|
+
message.relativeTimeout = object.relativeTimeout ?? 0;
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
function createBaseMsgSendTxResponse() {
|
|
182
|
+
return { sequence: 0 };
|
|
183
|
+
}
|
|
184
|
+
export const MsgSendTxResponse = {
|
|
185
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
186
|
+
if (message.sequence !== 0) {
|
|
187
|
+
writer.uint32(8).uint64(message.sequence);
|
|
188
|
+
}
|
|
189
|
+
return writer;
|
|
190
|
+
},
|
|
191
|
+
decode(input, length) {
|
|
192
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
193
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
194
|
+
const message = createBaseMsgSendTxResponse();
|
|
195
|
+
while (reader.pos < end) {
|
|
196
|
+
const tag = reader.uint32();
|
|
197
|
+
switch (tag >>> 3) {
|
|
198
|
+
case 1:
|
|
199
|
+
message.sequence = longToNumber(reader.uint64());
|
|
200
|
+
break;
|
|
201
|
+
default:
|
|
202
|
+
reader.skipType(tag & 7);
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return message;
|
|
207
|
+
},
|
|
208
|
+
fromJSON(object) {
|
|
209
|
+
return { sequence: isSet(object.sequence) ? Number(object.sequence) : 0 };
|
|
210
|
+
},
|
|
211
|
+
toJSON(message) {
|
|
212
|
+
const obj = {};
|
|
213
|
+
message.sequence !== undefined && (obj.sequence = Math.round(message.sequence));
|
|
214
|
+
return obj;
|
|
215
|
+
},
|
|
216
|
+
fromPartial(object) {
|
|
217
|
+
const message = createBaseMsgSendTxResponse();
|
|
218
|
+
message.sequence = object.sequence ?? 0;
|
|
219
|
+
return message;
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
export class MsgClientImpl {
|
|
223
|
+
constructor(rpc) {
|
|
224
|
+
this.rpc = rpc;
|
|
225
|
+
this.RegisterInterchainAccount = this.RegisterInterchainAccount.bind(this);
|
|
226
|
+
this.SendTx = this.SendTx.bind(this);
|
|
227
|
+
}
|
|
228
|
+
RegisterInterchainAccount(request) {
|
|
229
|
+
const data = MsgRegisterInterchainAccount.encode(request).finish();
|
|
230
|
+
const promise = this.rpc.request("ibc.applications.interchain_accounts.controller.v1.Msg", "RegisterInterchainAccount", data);
|
|
231
|
+
return promise.then((data) => MsgRegisterInterchainAccountResponse.decode(new _m0.Reader(data)));
|
|
232
|
+
}
|
|
233
|
+
SendTx(request) {
|
|
234
|
+
const data = MsgSendTx.encode(request).finish();
|
|
235
|
+
const promise = this.rpc.request("ibc.applications.interchain_accounts.controller.v1.Msg", "SendTx", data);
|
|
236
|
+
return promise.then((data) => MsgSendTxResponse.decode(new _m0.Reader(data)));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
var globalThis = (() => {
|
|
240
|
+
if (typeof globalThis !== "undefined") {
|
|
241
|
+
return globalThis;
|
|
242
|
+
}
|
|
243
|
+
if (typeof self !== "undefined") {
|
|
244
|
+
return self;
|
|
245
|
+
}
|
|
246
|
+
if (typeof window !== "undefined") {
|
|
247
|
+
return window;
|
|
248
|
+
}
|
|
249
|
+
if (typeof global !== "undefined") {
|
|
250
|
+
return global;
|
|
251
|
+
}
|
|
252
|
+
throw "Unable to locate global object";
|
|
253
|
+
})();
|
|
254
|
+
function longToNumber(long) {
|
|
255
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
256
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
257
|
+
}
|
|
258
|
+
return long.toNumber();
|
|
259
|
+
}
|
|
260
|
+
if (_m0.util.Long !== Long) {
|
|
261
|
+
_m0.util.Long = Long;
|
|
262
|
+
_m0.configure();
|
|
263
|
+
}
|
|
264
|
+
function isSet(value) {
|
|
265
|
+
return value !== null && value !== undefined;
|
|
266
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Any } from "../../../../google/protobuf/any";
|
|
4
|
+
export const protobufPackage = "ibc.applications.interchain_accounts.v1";
|
|
5
|
+
/**
|
|
6
|
+
* Type defines a classification of message issued from a controller chain to its associated interchain accounts
|
|
7
|
+
* host
|
|
8
|
+
*/
|
|
9
|
+
export var Type;
|
|
10
|
+
(function (Type) {
|
|
11
|
+
/** TYPE_UNSPECIFIED - Default zero value enumeration */
|
|
12
|
+
Type[Type["TYPE_UNSPECIFIED"] = 0] = "TYPE_UNSPECIFIED";
|
|
13
|
+
/** TYPE_EXECUTE_TX - Execute a transaction on an interchain accounts host chain */
|
|
14
|
+
Type[Type["TYPE_EXECUTE_TX"] = 1] = "TYPE_EXECUTE_TX";
|
|
15
|
+
Type[Type["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
16
|
+
})(Type || (Type = {}));
|
|
17
|
+
export function typeFromJSON(object) {
|
|
18
|
+
switch (object) {
|
|
19
|
+
case 0:
|
|
20
|
+
case "TYPE_UNSPECIFIED":
|
|
21
|
+
return Type.TYPE_UNSPECIFIED;
|
|
22
|
+
case 1:
|
|
23
|
+
case "TYPE_EXECUTE_TX":
|
|
24
|
+
return Type.TYPE_EXECUTE_TX;
|
|
25
|
+
case -1:
|
|
26
|
+
case "UNRECOGNIZED":
|
|
27
|
+
default:
|
|
28
|
+
return Type.UNRECOGNIZED;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function typeToJSON(object) {
|
|
32
|
+
switch (object) {
|
|
33
|
+
case Type.TYPE_UNSPECIFIED:
|
|
34
|
+
return "TYPE_UNSPECIFIED";
|
|
35
|
+
case Type.TYPE_EXECUTE_TX:
|
|
36
|
+
return "TYPE_EXECUTE_TX";
|
|
37
|
+
case Type.UNRECOGNIZED:
|
|
38
|
+
default:
|
|
39
|
+
return "UNRECOGNIZED";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function createBaseInterchainAccountPacketData() {
|
|
43
|
+
return { type: 0, data: new Uint8Array(), memo: "" };
|
|
44
|
+
}
|
|
45
|
+
export const InterchainAccountPacketData = {
|
|
46
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
47
|
+
if (message.type !== 0) {
|
|
48
|
+
writer.uint32(8).int32(message.type);
|
|
49
|
+
}
|
|
50
|
+
if (message.data.length !== 0) {
|
|
51
|
+
writer.uint32(18).bytes(message.data);
|
|
52
|
+
}
|
|
53
|
+
if (message.memo !== "") {
|
|
54
|
+
writer.uint32(26).string(message.memo);
|
|
55
|
+
}
|
|
56
|
+
return writer;
|
|
57
|
+
},
|
|
58
|
+
decode(input, length) {
|
|
59
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
60
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
61
|
+
const message = createBaseInterchainAccountPacketData();
|
|
62
|
+
while (reader.pos < end) {
|
|
63
|
+
const tag = reader.uint32();
|
|
64
|
+
switch (tag >>> 3) {
|
|
65
|
+
case 1:
|
|
66
|
+
message.type = reader.int32();
|
|
67
|
+
break;
|
|
68
|
+
case 2:
|
|
69
|
+
message.data = reader.bytes();
|
|
70
|
+
break;
|
|
71
|
+
case 3:
|
|
72
|
+
message.memo = reader.string();
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
reader.skipType(tag & 7);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return message;
|
|
80
|
+
},
|
|
81
|
+
fromJSON(object) {
|
|
82
|
+
return {
|
|
83
|
+
type: isSet(object.type) ? typeFromJSON(object.type) : 0,
|
|
84
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
|
|
85
|
+
memo: isSet(object.memo) ? String(object.memo) : "",
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
toJSON(message) {
|
|
89
|
+
const obj = {};
|
|
90
|
+
message.type !== undefined && (obj.type = typeToJSON(message.type));
|
|
91
|
+
message.data !== undefined
|
|
92
|
+
&& (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
|
93
|
+
message.memo !== undefined && (obj.memo = message.memo);
|
|
94
|
+
return obj;
|
|
95
|
+
},
|
|
96
|
+
fromPartial(object) {
|
|
97
|
+
const message = createBaseInterchainAccountPacketData();
|
|
98
|
+
message.type = object.type ?? 0;
|
|
99
|
+
message.data = object.data ?? new Uint8Array();
|
|
100
|
+
message.memo = object.memo ?? "";
|
|
101
|
+
return message;
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
function createBaseCosmosTx() {
|
|
105
|
+
return { messages: [] };
|
|
106
|
+
}
|
|
107
|
+
export const CosmosTx = {
|
|
108
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
109
|
+
for (const v of message.messages) {
|
|
110
|
+
Any.encode(v, writer.uint32(10).fork()).ldelim();
|
|
111
|
+
}
|
|
112
|
+
return writer;
|
|
113
|
+
},
|
|
114
|
+
decode(input, length) {
|
|
115
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
116
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
117
|
+
const message = createBaseCosmosTx();
|
|
118
|
+
while (reader.pos < end) {
|
|
119
|
+
const tag = reader.uint32();
|
|
120
|
+
switch (tag >>> 3) {
|
|
121
|
+
case 1:
|
|
122
|
+
message.messages.push(Any.decode(reader, reader.uint32()));
|
|
123
|
+
break;
|
|
124
|
+
default:
|
|
125
|
+
reader.skipType(tag & 7);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return message;
|
|
130
|
+
},
|
|
131
|
+
fromJSON(object) {
|
|
132
|
+
return { messages: Array.isArray(object?.messages) ? object.messages.map((e) => Any.fromJSON(e)) : [] };
|
|
133
|
+
},
|
|
134
|
+
toJSON(message) {
|
|
135
|
+
const obj = {};
|
|
136
|
+
if (message.messages) {
|
|
137
|
+
obj.messages = message.messages.map((e) => e ? Any.toJSON(e) : undefined);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
obj.messages = [];
|
|
141
|
+
}
|
|
142
|
+
return obj;
|
|
143
|
+
},
|
|
144
|
+
fromPartial(object) {
|
|
145
|
+
const message = createBaseCosmosTx();
|
|
146
|
+
message.messages = object.messages?.map((e) => Any.fromPartial(e)) || [];
|
|
147
|
+
return message;
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
var globalThis = (() => {
|
|
151
|
+
if (typeof globalThis !== "undefined") {
|
|
152
|
+
return globalThis;
|
|
153
|
+
}
|
|
154
|
+
if (typeof self !== "undefined") {
|
|
155
|
+
return self;
|
|
156
|
+
}
|
|
157
|
+
if (typeof window !== "undefined") {
|
|
158
|
+
return window;
|
|
159
|
+
}
|
|
160
|
+
if (typeof global !== "undefined") {
|
|
161
|
+
return global;
|
|
162
|
+
}
|
|
163
|
+
throw "Unable to locate global object";
|
|
164
|
+
})();
|
|
165
|
+
function bytesFromBase64(b64) {
|
|
166
|
+
if (globalThis.Buffer) {
|
|
167
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
const bin = globalThis.atob(b64);
|
|
171
|
+
const arr = new Uint8Array(bin.length);
|
|
172
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
173
|
+
arr[i] = bin.charCodeAt(i);
|
|
174
|
+
}
|
|
175
|
+
return arr;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function base64FromBytes(arr) {
|
|
179
|
+
if (globalThis.Buffer) {
|
|
180
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const bin = [];
|
|
184
|
+
arr.forEach((byte) => {
|
|
185
|
+
bin.push(String.fromCharCode(byte));
|
|
186
|
+
});
|
|
187
|
+
return globalThis.btoa(bin.join(""));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function isSet(value) {
|
|
191
|
+
return value !== null && value !== undefined;
|
|
192
|
+
}
|
|
@@ -13,6 +13,7 @@ function createBaseMsgTransfer() {
|
|
|
13
13
|
receiver: "",
|
|
14
14
|
timeoutHeight: undefined,
|
|
15
15
|
timeoutTimestamp: 0,
|
|
16
|
+
memo: "",
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
export const MsgTransfer = {
|
|
@@ -38,6 +39,9 @@ export const MsgTransfer = {
|
|
|
38
39
|
if (message.timeoutTimestamp !== 0) {
|
|
39
40
|
writer.uint32(56).uint64(message.timeoutTimestamp);
|
|
40
41
|
}
|
|
42
|
+
if (message.memo !== "") {
|
|
43
|
+
writer.uint32(66).string(message.memo);
|
|
44
|
+
}
|
|
41
45
|
return writer;
|
|
42
46
|
},
|
|
43
47
|
decode(input, length) {
|
|
@@ -68,6 +72,9 @@ export const MsgTransfer = {
|
|
|
68
72
|
case 7:
|
|
69
73
|
message.timeoutTimestamp = longToNumber(reader.uint64());
|
|
70
74
|
break;
|
|
75
|
+
case 8:
|
|
76
|
+
message.memo = reader.string();
|
|
77
|
+
break;
|
|
71
78
|
default:
|
|
72
79
|
reader.skipType(tag & 7);
|
|
73
80
|
break;
|
|
@@ -84,6 +91,7 @@ export const MsgTransfer = {
|
|
|
84
91
|
receiver: isSet(object.receiver) ? String(object.receiver) : "",
|
|
85
92
|
timeoutHeight: isSet(object.timeoutHeight) ? Height.fromJSON(object.timeoutHeight) : undefined,
|
|
86
93
|
timeoutTimestamp: isSet(object.timeoutTimestamp) ? Number(object.timeoutTimestamp) : 0,
|
|
94
|
+
memo: isSet(object.memo) ? String(object.memo) : "",
|
|
87
95
|
};
|
|
88
96
|
},
|
|
89
97
|
toJSON(message) {
|
|
@@ -96,6 +104,7 @@ export const MsgTransfer = {
|
|
|
96
104
|
message.timeoutHeight !== undefined
|
|
97
105
|
&& (obj.timeoutHeight = message.timeoutHeight ? Height.toJSON(message.timeoutHeight) : undefined);
|
|
98
106
|
message.timeoutTimestamp !== undefined && (obj.timeoutTimestamp = Math.round(message.timeoutTimestamp));
|
|
107
|
+
message.memo !== undefined && (obj.memo = message.memo);
|
|
99
108
|
return obj;
|
|
100
109
|
},
|
|
101
110
|
fromPartial(object) {
|
|
@@ -109,14 +118,18 @@ export const MsgTransfer = {
|
|
|
109
118
|
? Height.fromPartial(object.timeoutHeight)
|
|
110
119
|
: undefined;
|
|
111
120
|
message.timeoutTimestamp = object.timeoutTimestamp ?? 0;
|
|
121
|
+
message.memo = object.memo ?? "";
|
|
112
122
|
return message;
|
|
113
123
|
},
|
|
114
124
|
};
|
|
115
125
|
function createBaseMsgTransferResponse() {
|
|
116
|
-
return {};
|
|
126
|
+
return { sequence: 0 };
|
|
117
127
|
}
|
|
118
128
|
export const MsgTransferResponse = {
|
|
119
|
-
encode(
|
|
129
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
130
|
+
if (message.sequence !== 0) {
|
|
131
|
+
writer.uint32(8).uint64(message.sequence);
|
|
132
|
+
}
|
|
120
133
|
return writer;
|
|
121
134
|
},
|
|
122
135
|
decode(input, length) {
|
|
@@ -126,6 +139,9 @@ export const MsgTransferResponse = {
|
|
|
126
139
|
while (reader.pos < end) {
|
|
127
140
|
const tag = reader.uint32();
|
|
128
141
|
switch (tag >>> 3) {
|
|
142
|
+
case 1:
|
|
143
|
+
message.sequence = longToNumber(reader.uint64());
|
|
144
|
+
break;
|
|
129
145
|
default:
|
|
130
146
|
reader.skipType(tag & 7);
|
|
131
147
|
break;
|
|
@@ -133,15 +149,17 @@ export const MsgTransferResponse = {
|
|
|
133
149
|
}
|
|
134
150
|
return message;
|
|
135
151
|
},
|
|
136
|
-
fromJSON(
|
|
137
|
-
return {};
|
|
152
|
+
fromJSON(object) {
|
|
153
|
+
return { sequence: isSet(object.sequence) ? Number(object.sequence) : 0 };
|
|
138
154
|
},
|
|
139
|
-
toJSON(
|
|
155
|
+
toJSON(message) {
|
|
140
156
|
const obj = {};
|
|
157
|
+
message.sequence !== undefined && (obj.sequence = Math.round(message.sequence));
|
|
141
158
|
return obj;
|
|
142
159
|
},
|
|
143
|
-
fromPartial(
|
|
160
|
+
fromPartial(object) {
|
|
144
161
|
const message = createBaseMsgTransferResponse();
|
|
162
|
+
message.sequence = object.sequence ?? 0;
|
|
145
163
|
return message;
|
|
146
164
|
},
|
|
147
165
|
};
|
|
@@ -82,20 +82,6 @@ export class HttpClient {
|
|
|
82
82
|
export class Api extends HttpClient {
|
|
83
83
|
constructor() {
|
|
84
84
|
super(...arguments);
|
|
85
|
-
/**
|
|
86
|
-
* No description
|
|
87
|
-
*
|
|
88
|
-
* @tags Query
|
|
89
|
-
* @name QueryClientParams
|
|
90
|
-
* @summary ClientParams queries all parameters of the ibc client.
|
|
91
|
-
* @request GET:/ibc/client/v1/params
|
|
92
|
-
*/
|
|
93
|
-
this.queryClientParams = (params = {}) => this.request({
|
|
94
|
-
path: `/ibc/client/v1/params`,
|
|
95
|
-
method: "GET",
|
|
96
|
-
format: "json",
|
|
97
|
-
...params,
|
|
98
|
-
});
|
|
99
85
|
/**
|
|
100
86
|
* No description
|
|
101
87
|
*
|
|
@@ -186,6 +172,20 @@ export class Api extends HttpClient {
|
|
|
186
172
|
format: "json",
|
|
187
173
|
...params,
|
|
188
174
|
});
|
|
175
|
+
/**
|
|
176
|
+
* No description
|
|
177
|
+
*
|
|
178
|
+
* @tags Query
|
|
179
|
+
* @name QueryClientParams
|
|
180
|
+
* @summary ClientParams queries all parameters of the ibc client submodule.
|
|
181
|
+
* @request GET:/ibc/core/client/v1/params
|
|
182
|
+
*/
|
|
183
|
+
this.queryClientParams = (params = {}) => this.request({
|
|
184
|
+
path: `/ibc/core/client/v1/params`,
|
|
185
|
+
method: "GET",
|
|
186
|
+
format: "json",
|
|
187
|
+
...params,
|
|
188
|
+
});
|
|
189
189
|
/**
|
|
190
190
|
* No description
|
|
191
191
|
*
|
|
@@ -173,5 +173,19 @@ export class Api extends HttpClient {
|
|
|
173
173
|
format: "json",
|
|
174
174
|
...params,
|
|
175
175
|
});
|
|
176
|
+
/**
|
|
177
|
+
* No description
|
|
178
|
+
*
|
|
179
|
+
* @tags Query
|
|
180
|
+
* @name QueryConnectionParams
|
|
181
|
+
* @summary ConnectionParams queries all parameters of the ibc connection submodule.
|
|
182
|
+
* @request GET:/ibc/core/connection/v1/params
|
|
183
|
+
*/
|
|
184
|
+
this.queryConnectionParams = (params = {}) => this.request({
|
|
185
|
+
path: `/ibc/core/connection/v1/params`,
|
|
186
|
+
method: "GET",
|
|
187
|
+
format: "json",
|
|
188
|
+
...params,
|
|
189
|
+
});
|
|
176
190
|
}
|
|
177
191
|
}
|