@agoric/cosmic-proto 0.5.0-u19.2 → 0.5.0-u20.0
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/dist/address-hooks.d.ts +4 -3
- package/dist/address-hooks.js +1 -217
- package/dist/address-hooks.js.map +1 -1
- package/dist/codegen/agoric/bundle.js +1 -51
- package/dist/codegen/agoric/lien/genesis.js +1 -143
- package/dist/codegen/agoric/lien/lien.js +1 -87
- package/dist/codegen/agoric/swingset/genesis.js +1 -181
- package/dist/codegen/agoric/swingset/msgs.js +1 -700
- package/dist/codegen/agoric/swingset/query.js +1 -356
- package/dist/codegen/agoric/swingset/swingset.js +1 -816
- package/dist/codegen/agoric/vbank/genesis.js +1 -82
- package/dist/codegen/agoric/vbank/msgs.js +1 -2
- package/dist/codegen/agoric/vbank/query.js +1 -222
- package/dist/codegen/agoric/vbank/vbank.js +1 -237
- package/dist/codegen/agoric/vibc/msgs.js +1 -127
- package/dist/codegen/agoric/vlocalchain/vlocalchain.js +1 -307
- package/dist/codegen/agoric/vstorage/genesis.js +1 -138
- package/dist/codegen/agoric/vstorage/query.js +1 -441
- package/dist/codegen/agoric/vstorage/vstorage.js +1 -128
- package/dist/codegen/agoric/vtransfer/genesis.js +1 -70
- package/dist/codegen/amino/amino.js +1 -2
- package/dist/codegen/amino/bundle.js +1 -6
- package/dist/codegen/binary.js +1 -367
- package/dist/codegen/circle/bundle.d.ts +0 -506
- package/dist/codegen/circle/bundle.js +1 -40
- package/dist/codegen/circle/cctp/v1/attester.js +1 -63
- package/dist/codegen/circle/cctp/v1/burn_message.js +1 -117
- package/dist/codegen/circle/cctp/v1/burning_and_minting_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/events.js +1 -1612
- package/dist/codegen/circle/cctp/v1/genesis.js +1 -295
- package/dist/codegen/circle/cctp/v1/max_message_body_size.js +1 -69
- package/dist/codegen/circle/cctp/v1/message.js +1 -160
- package/dist/codegen/circle/cctp/v1/nonce.js +1 -80
- package/dist/codegen/circle/cctp/v1/per_message_burn_limit.js +1 -73
- package/dist/codegen/circle/cctp/v1/query.js +1 -2421
- package/dist/codegen/circle/cctp/v1/remote_token_messenger.js +1 -77
- package/dist/codegen/circle/cctp/v1/sending_and_receiving_messages_paused.js +1 -63
- package/dist/codegen/circle/cctp/v1/signature_threshold.js +1 -63
- package/dist/codegen/circle/cctp/v1/token_pair.js +1 -91
- package/dist/codegen/circle/cctp/v1/tx.d.ts +0 -998
- package/dist/codegen/circle/cctp/v1/tx.js +1 -3264
- package/dist/codegen/circle/cctp/v1/tx.js.map +1 -1
- package/dist/codegen/cosmos/auth/v1beta1/auth.js +1 -337
- package/dist/codegen/cosmos/auth/v1beta1/genesis.js +1 -86
- package/dist/codegen/cosmos/auth/v1beta1/query.js +1 -1113
- package/dist/codegen/cosmos/authz/v1beta1/authz.js +1 -334
- package/dist/codegen/cosmos/authz/v1beta1/event.js +1 -161
- package/dist/codegen/cosmos/authz/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/authz/v1beta1/query.js +1 -506
- package/dist/codegen/cosmos/authz/v1beta1/tx.js +1 -415
- package/dist/codegen/cosmos/bank/v1beta1/authz.js +1 -71
- package/dist/codegen/cosmos/bank/v1beta1/bank.js +1 -592
- package/dist/codegen/cosmos/bank/v1beta1/genesis.js +1 -196
- package/dist/codegen/cosmos/bank/v1beta1/query.js +1 -1347
- package/dist/codegen/cosmos/bank/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/base/abci/v1beta1/abci.js +1 -1012
- package/dist/codegen/cosmos/base/node/v1beta1/query.js +1 -112
- package/dist/codegen/cosmos/base/query/v1beta1/pagination.js +1 -189
- package/dist/codegen/cosmos/base/reflection/v2alpha1/reflection.js +1 -1755
- package/dist/codegen/cosmos/base/v1beta1/coin.js +1 -257
- package/dist/codegen/cosmos/bundle.js +1 -249
- package/dist/codegen/cosmos/crypto/ed25519/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/hd/v1/hd.js +1 -109
- package/dist/codegen/cosmos/crypto/keyring/v1/record.js +1 -367
- package/dist/codegen/cosmos/crypto/multisig/keys.js +1 -82
- package/dist/codegen/cosmos/crypto/multisig/v1beta1/multisig.js +1 -144
- package/dist/codegen/cosmos/crypto/secp256k1/keys.js +1 -123
- package/dist/codegen/cosmos/crypto/secp256r1/keys.js +1 -125
- package/dist/codegen/cosmos/distribution/v1beta1/distribution.js +1 -978
- package/dist/codegen/cosmos/distribution/v1beta1/genesis.js +1 -837
- package/dist/codegen/cosmos/distribution/v1beta1/query.js +1 -1207
- package/dist/codegen/cosmos/distribution/v1beta1/tx.js +1 -512
- package/dist/codegen/cosmos/feegrant/v1beta1/feegrant.js +1 -412
- package/dist/codegen/cosmos/feegrant/v1beta1/genesis.js +1 -71
- package/dist/codegen/cosmos/feegrant/v1beta1/query.js +1 -461
- package/dist/codegen/cosmos/feegrant/v1beta1/tx.js +1 -267
- package/dist/codegen/cosmos/gov/v1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1/gov.js +1 -928
- package/dist/codegen/cosmos/gov/v1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1/tx.js +1 -730
- package/dist/codegen/cosmos/gov/v1beta1/genesis.js +1 -177
- package/dist/codegen/cosmos/gov/v1beta1/gov.js +1 -1003
- package/dist/codegen/cosmos/gov/v1beta1/query.js +1 -1216
- package/dist/codegen/cosmos/gov/v1beta1/tx.js +1 -578
- package/dist/codegen/cosmos/group/v1/events.js +1 -696
- package/dist/codegen/cosmos/group/v1/genesis.js +1 -190
- package/dist/codegen/cosmos/group/v1/query.js +1 -2096
- package/dist/codegen/cosmos/group/v1/tx.js +1 -2073
- package/dist/codegen/cosmos/group/v1/types.js +1 -1387
- package/dist/codegen/cosmos/mint/v1beta1/genesis.js +1 -82
- package/dist/codegen/cosmos/mint/v1beta1/mint.js +1 -211
- package/dist/codegen/cosmos/mint/v1beta1/query.js +1 -330
- package/dist/codegen/cosmos/msg/v1/msg.js +1 -2
- package/dist/codegen/cosmos/params/v1beta1/params.js +1 -171
- package/dist/codegen/cosmos/params/v1beta1/query.js +1 -327
- package/dist/codegen/cosmos/staking/v1beta1/authz.js +1 -240
- package/dist/codegen/cosmos/staking/v1beta1/genesis.js +1 -256
- package/dist/codegen/cosmos/staking/v1beta1/query.js +1 -2069
- package/dist/codegen/cosmos/staking/v1beta1/staking.js +1 -1915
- package/dist/codegen/cosmos/staking/v1beta1/tx.js +1 -968
- package/dist/codegen/cosmos/tx/signing/v1beta1/signing.js +1 -516
- package/dist/codegen/cosmos/tx/v1beta1/service.js +1 -975
- package/dist/codegen/cosmos/tx/v1beta1/tx.js +1 -1256
- package/dist/codegen/cosmos/upgrade/v1beta1/query.js +1 -592
- package/dist/codegen/cosmos/upgrade/v1beta1/tx.js +1 -228
- package/dist/codegen/cosmos/upgrade/v1beta1/upgrade.js +1 -352
- package/dist/codegen/cosmos/vesting/v1beta1/tx.js +1 -865
- package/dist/codegen/cosmos/vesting/v1beta1/vesting.js +1 -674
- package/dist/codegen/cosmos_proto/bundle.js +1 -6
- package/dist/codegen/cosmos_proto/cosmos.js +1 -208
- package/dist/codegen/gogoproto/bundle.js +1 -6
- package/dist/codegen/gogoproto/gogo.js +1 -2
- package/dist/codegen/google/api/annotations.js +1 -2
- package/dist/codegen/google/api/http.js +1 -319
- package/dist/codegen/google/bundle.js +1 -17
- package/dist/codegen/google/protobuf/any.js +1 -77
- package/dist/codegen/google/protobuf/descriptor.js +1 -3421
- package/dist/codegen/google/protobuf/duration.js +1 -79
- package/dist/codegen/google/protobuf/empty.js +1 -50
- package/dist/codegen/google/protobuf/timestamp.js +1 -79
- package/dist/codegen/helpers.js +1 -196
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/controller.js +1 -66
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/query.js +1 -243
- package/dist/codegen/ibc/applications/interchain_accounts/controller/v1/tx.js +1 -314
- package/dist/codegen/ibc/applications/interchain_accounts/genesis/v1/genesis.js +1 -503
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/host.js +1 -83
- package/dist/codegen/ibc/applications/interchain_accounts/host/v1/query.js +1 -114
- package/dist/codegen/ibc/applications/interchain_accounts/v1/account.js +1 -86
- package/dist/codegen/ibc/applications/interchain_accounts/v1/metadata.js +1 -119
- package/dist/codegen/ibc/applications/interchain_accounts/v1/packet.js +1 -190
- package/dist/codegen/ibc/applications/transfer/v1/authz.js +1 -178
- package/dist/codegen/ibc/applications/transfer/v1/genesis.js +1 -96
- package/dist/codegen/ibc/applications/transfer/v1/query.js +1 -634
- package/dist/codegen/ibc/applications/transfer/v1/transfer.js +1 -147
- package/dist/codegen/ibc/applications/transfer/v1/tx.js +1 -220
- package/dist/codegen/ibc/applications/transfer/v2/packet.js +1 -103
- package/dist/codegen/ibc/bundle.js +1 -142
- package/dist/codegen/ibc/core/channel/v1/channel.js +1 -845
- package/dist/codegen/ibc/core/channel/v1/genesis.js +1 -281
- package/dist/codegen/ibc/core/channel/v1/query.js +1 -2344
- package/dist/codegen/ibc/core/channel/v1/tx.js +1 -1745
- package/dist/codegen/ibc/core/client/v1/client.js +1 -583
- package/dist/codegen/ibc/core/client/v1/genesis.js +1 -301
- package/dist/codegen/ibc/core/client/v1/query.js +1 -1283
- package/dist/codegen/ibc/core/client/v1/tx.js +1 -587
- package/dist/codegen/ibc/core/commitment/v1/commitment.js +1 -259
- package/dist/codegen/ibc/core/connection/v1/connection.js +1 -678
- package/dist/codegen/ibc/core/connection/v1/genesis.js +1 -122
- package/dist/codegen/ibc/core/connection/v1/query.js +1 -952
- package/dist/codegen/ibc/core/connection/v1/tx.js +1 -843
- package/dist/codegen/ibc/lightclients/localhost/v1/localhost.js +1 -78
- package/dist/codegen/ibc/lightclients/solomachine/v1/solomachine.js +1 -1520
- package/dist/codegen/ibc/lightclients/solomachine/v2/solomachine.js +1 -1514
- package/dist/codegen/ibc/lightclients/tendermint/v1/tendermint.js +1 -628
- package/dist/codegen/icq/bundle.js +1 -17
- package/dist/codegen/icq/v1/genesis.js +1 -78
- package/dist/codegen/icq/v1/icq.js +1 -83
- package/dist/codegen/icq/v1/packet.js +1 -270
- package/dist/codegen/icq/v1/query.js +1 -114
- package/dist/codegen/icq/v1/tx.js +1 -124
- package/dist/codegen/ics23/bundle.js +1 -6
- package/dist/codegen/index.js +1 -23
- package/dist/codegen/json-safe.js +1 -8
- package/dist/codegen/proofs.js +1 -1436
- package/dist/codegen/stride/bundle.js +1 -71
- package/dist/codegen/stride/epochs/genesis.js +1 -227
- package/dist/codegen/stride/epochs/query.js +1 -398
- package/dist/codegen/stride/records/callbacks.js +1 -136
- package/dist/codegen/stride/records/genesis.js +1 -186
- package/dist/codegen/stride/records/params.js +1 -50
- package/dist/codegen/stride/records/query.js +1 -1552
- package/dist/codegen/stride/records/records.js +1 -939
- package/dist/codegen/stride/stakedym/genesis.js +1 -312
- package/dist/codegen/stride/stakedym/query.js +1 -887
- package/dist/codegen/stride/stakedym/stakedym.js +1 -909
- package/dist/codegen/stride/stakedym/tx.js +1 -1661
- package/dist/codegen/stride/stakeibc/address_unbonding.js +1 -135
- package/dist/codegen/stride/stakeibc/callbacks.js +1 -1191
- package/dist/codegen/stride/stakeibc/epoch_tracker.js +1 -115
- package/dist/codegen/stride/stakeibc/genesis.js +1 -135
- package/dist/codegen/stride/stakeibc/gov.js +1 -212
- package/dist/codegen/stride/stakeibc/host_zone.js +1 -544
- package/dist/codegen/stride/stakeibc/ica_account.js +1 -165
- package/dist/codegen/stride/stakeibc/packet.js +1 -113
- package/dist/codegen/stride/stakeibc/params.js +1 -317
- package/dist/codegen/stride/stakeibc/query.js +1 -1372
- package/dist/codegen/stride/stakeibc/trade_route.js +1 -377
- package/dist/codegen/stride/stakeibc/tx.js +1 -3392
- package/dist/codegen/stride/stakeibc/validator.js +1 -170
- package/dist/codegen/stride/staketia/genesis.js +1 -312
- package/dist/codegen/stride/staketia/query.js +1 -887
- package/dist/codegen/stride/staketia/staketia.js +1 -819
- package/dist/codegen/stride/staketia/tx.js +1 -1671
- package/dist/codegen/tendermint/abci/types.d.ts +264 -692
- package/dist/codegen/tendermint/abci/types.js +1 -4434
- package/dist/codegen/tendermint/abci/types.js.map +1 -1
- package/dist/codegen/tendermint/bundle.d.ts +0 -272
- package/dist/codegen/tendermint/bundle.js +1 -42
- package/dist/codegen/tendermint/crypto/keys.js +1 -85
- package/dist/codegen/tendermint/crypto/proof.js +1 -409
- package/dist/codegen/tendermint/libs/bits/types.js +1 -94
- package/dist/codegen/tendermint/p2p/types.js +1 -506
- package/dist/codegen/tendermint/types/block.js +1 -119
- package/dist/codegen/tendermint/types/evidence.js +1 -415
- package/dist/codegen/tendermint/types/params.js +1 -529
- package/dist/codegen/tendermint/types/types.js +1 -1534
- package/dist/codegen/tendermint/types/validator.js +1 -299
- package/dist/codegen/tendermint/version/types.js +1 -155
- package/dist/codegen/utf8.js +1 -138
- package/dist/codegen/varint.js +1 -409
- package/dist/helpers.js +1 -22
- package/dist/index.js +1 -6
- package/package.json +12 -10
|
@@ -1,79 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../binary.js';
|
|
3
|
-
import { isSet } from '../../helpers.js';
|
|
4
|
-
import {} from '../../json-safe.js';
|
|
5
|
-
function createBaseDuration() {
|
|
6
|
-
return {
|
|
7
|
-
seconds: BigInt(0),
|
|
8
|
-
nanos: 0,
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export const Duration = {
|
|
12
|
-
typeUrl: '/google.protobuf.Duration',
|
|
13
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
14
|
-
if (message.seconds !== BigInt(0)) {
|
|
15
|
-
writer.uint32(8).int64(message.seconds);
|
|
16
|
-
}
|
|
17
|
-
if (message.nanos !== 0) {
|
|
18
|
-
writer.uint32(16).int32(message.nanos);
|
|
19
|
-
}
|
|
20
|
-
return writer;
|
|
21
|
-
},
|
|
22
|
-
decode(input, length) {
|
|
23
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
-
const message = createBaseDuration();
|
|
26
|
-
while (reader.pos < end) {
|
|
27
|
-
const tag = reader.uint32();
|
|
28
|
-
switch (tag >>> 3) {
|
|
29
|
-
case 1:
|
|
30
|
-
message.seconds = reader.int64();
|
|
31
|
-
break;
|
|
32
|
-
case 2:
|
|
33
|
-
message.nanos = reader.int32();
|
|
34
|
-
break;
|
|
35
|
-
default:
|
|
36
|
-
reader.skipType(tag & 7);
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return message;
|
|
41
|
-
},
|
|
42
|
-
fromJSON(object) {
|
|
43
|
-
return {
|
|
44
|
-
seconds: isSet(object.seconds)
|
|
45
|
-
? BigInt(object.seconds.toString())
|
|
46
|
-
: BigInt(0),
|
|
47
|
-
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
toJSON(message) {
|
|
51
|
-
const obj = {};
|
|
52
|
-
message.seconds !== undefined &&
|
|
53
|
-
(obj.seconds = (message.seconds || BigInt(0)).toString());
|
|
54
|
-
message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
|
|
55
|
-
return obj;
|
|
56
|
-
},
|
|
57
|
-
fromPartial(object) {
|
|
58
|
-
const message = createBaseDuration();
|
|
59
|
-
message.seconds =
|
|
60
|
-
object.seconds !== undefined && object.seconds !== null
|
|
61
|
-
? BigInt(object.seconds.toString())
|
|
62
|
-
: BigInt(0);
|
|
63
|
-
message.nanos = object.nanos ?? 0;
|
|
64
|
-
return message;
|
|
65
|
-
},
|
|
66
|
-
fromProtoMsg(message) {
|
|
67
|
-
return Duration.decode(message.value);
|
|
68
|
-
},
|
|
69
|
-
toProto(message) {
|
|
70
|
-
return Duration.encode(message).finish();
|
|
71
|
-
},
|
|
72
|
-
toProtoMsg(message) {
|
|
73
|
-
return {
|
|
74
|
-
typeUrl: '/google.protobuf.Duration',
|
|
75
|
-
value: Duration.encode(message).finish(),
|
|
76
|
-
};
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=duration.js.map
|
|
1
|
+
import{BinaryReader as n,BinaryWriter as o}from"../../binary.js";import{isSet as s}from"../../helpers.js";import{}from"../../json-safe.js";function t(){return{seconds:BigInt(0),nanos:0}}export const Duration={typeUrl:"/google.protobuf.Duration",encode:(n,s=o.create())=>(n.seconds!==BigInt(0)&&s.uint32(8).int64(n.seconds),0!==n.nanos&&s.uint32(16).int32(n.nanos),s),decode(o,s){const e=o instanceof n?o:new n(o);let r=void 0===s?e.len:e.pos+s;const i=t();for(;e.pos<r;){const n=e.uint32();switch(n>>>3){case 1:i.seconds=e.int64();break;case 2:i.nanos=e.int32();break;default:e.skipType(7&n)}}return i},fromJSON:n=>({seconds:s(n.seconds)?BigInt(n.seconds.toString()):BigInt(0),nanos:s(n.nanos)?Number(n.nanos):0}),toJSON(n){const o={};return void 0!==n.seconds&&(o.seconds=(n.seconds||BigInt(0)).toString()),void 0!==n.nanos&&(o.nanos=Math.round(n.nanos)),o},fromPartial(n){const o=t();return o.seconds=void 0!==n.seconds&&null!==n.seconds?BigInt(n.seconds.toString()):BigInt(0),o.nanos=n.nanos??0,o},fromProtoMsg:n=>Duration.decode(n.value),toProto:n=>Duration.encode(n).finish(),toProtoMsg:n=>({typeUrl:"/google.protobuf.Duration",value:Duration.encode(n).finish()})};
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../binary.js';
|
|
3
|
-
import {} from '../../json-safe.js';
|
|
4
|
-
function createBaseEmpty() {
|
|
5
|
-
return {};
|
|
6
|
-
}
|
|
7
|
-
export const Empty = {
|
|
8
|
-
typeUrl: '/google.protobuf.Empty',
|
|
9
|
-
encode(_, writer = BinaryWriter.create()) {
|
|
10
|
-
return writer;
|
|
11
|
-
},
|
|
12
|
-
decode(input, length) {
|
|
13
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
14
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
15
|
-
const message = createBaseEmpty();
|
|
16
|
-
while (reader.pos < end) {
|
|
17
|
-
const tag = reader.uint32();
|
|
18
|
-
switch (tag >>> 3) {
|
|
19
|
-
default:
|
|
20
|
-
reader.skipType(tag & 7);
|
|
21
|
-
break;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return message;
|
|
25
|
-
},
|
|
26
|
-
fromJSON(_) {
|
|
27
|
-
return {};
|
|
28
|
-
},
|
|
29
|
-
toJSON(_) {
|
|
30
|
-
const obj = {};
|
|
31
|
-
return obj;
|
|
32
|
-
},
|
|
33
|
-
fromPartial(_) {
|
|
34
|
-
const message = createBaseEmpty();
|
|
35
|
-
return message;
|
|
36
|
-
},
|
|
37
|
-
fromProtoMsg(message) {
|
|
38
|
-
return Empty.decode(message.value);
|
|
39
|
-
},
|
|
40
|
-
toProto(message) {
|
|
41
|
-
return Empty.encode(message).finish();
|
|
42
|
-
},
|
|
43
|
-
toProtoMsg(message) {
|
|
44
|
-
return {
|
|
45
|
-
typeUrl: '/google.protobuf.Empty',
|
|
46
|
-
value: Empty.encode(message).finish(),
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=empty.js.map
|
|
1
|
+
import{BinaryReader as o,BinaryWriter as t}from"../../binary.js";import{}from"../../json-safe.js";export const Empty={typeUrl:"/google.protobuf.Empty",encode:(o,e=t.create())=>e,decode(t,e){const r=t instanceof o?t:new o(t);let n=void 0===e?r.len:r.pos+e;const p={};for(;r.pos<n;){const o=r.uint32();r.skipType(7&o)}return p},fromJSON:o=>({}),toJSON:o=>({}),fromPartial:o=>({}),fromProtoMsg:o=>Empty.decode(o.value),toProto:o=>Empty.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/google.protobuf.Empty",value:Empty.encode(o).finish()})};
|
|
@@ -1,79 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../binary.js';
|
|
3
|
-
import { isSet } from '../../helpers.js';
|
|
4
|
-
import {} from '../../json-safe.js';
|
|
5
|
-
function createBaseTimestamp() {
|
|
6
|
-
return {
|
|
7
|
-
seconds: BigInt(0),
|
|
8
|
-
nanos: 0,
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export const Timestamp = {
|
|
12
|
-
typeUrl: '/google.protobuf.Timestamp',
|
|
13
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
14
|
-
if (message.seconds !== BigInt(0)) {
|
|
15
|
-
writer.uint32(8).int64(message.seconds);
|
|
16
|
-
}
|
|
17
|
-
if (message.nanos !== 0) {
|
|
18
|
-
writer.uint32(16).int32(message.nanos);
|
|
19
|
-
}
|
|
20
|
-
return writer;
|
|
21
|
-
},
|
|
22
|
-
decode(input, length) {
|
|
23
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
-
const message = createBaseTimestamp();
|
|
26
|
-
while (reader.pos < end) {
|
|
27
|
-
const tag = reader.uint32();
|
|
28
|
-
switch (tag >>> 3) {
|
|
29
|
-
case 1:
|
|
30
|
-
message.seconds = reader.int64();
|
|
31
|
-
break;
|
|
32
|
-
case 2:
|
|
33
|
-
message.nanos = reader.int32();
|
|
34
|
-
break;
|
|
35
|
-
default:
|
|
36
|
-
reader.skipType(tag & 7);
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return message;
|
|
41
|
-
},
|
|
42
|
-
fromJSON(object) {
|
|
43
|
-
return {
|
|
44
|
-
seconds: isSet(object.seconds)
|
|
45
|
-
? BigInt(object.seconds.toString())
|
|
46
|
-
: BigInt(0),
|
|
47
|
-
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
toJSON(message) {
|
|
51
|
-
const obj = {};
|
|
52
|
-
message.seconds !== undefined &&
|
|
53
|
-
(obj.seconds = (message.seconds || BigInt(0)).toString());
|
|
54
|
-
message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
|
|
55
|
-
return obj;
|
|
56
|
-
},
|
|
57
|
-
fromPartial(object) {
|
|
58
|
-
const message = createBaseTimestamp();
|
|
59
|
-
message.seconds =
|
|
60
|
-
object.seconds !== undefined && object.seconds !== null
|
|
61
|
-
? BigInt(object.seconds.toString())
|
|
62
|
-
: BigInt(0);
|
|
63
|
-
message.nanos = object.nanos ?? 0;
|
|
64
|
-
return message;
|
|
65
|
-
},
|
|
66
|
-
fromProtoMsg(message) {
|
|
67
|
-
return Timestamp.decode(message.value);
|
|
68
|
-
},
|
|
69
|
-
toProto(message) {
|
|
70
|
-
return Timestamp.encode(message).finish();
|
|
71
|
-
},
|
|
72
|
-
toProtoMsg(message) {
|
|
73
|
-
return {
|
|
74
|
-
typeUrl: '/google.protobuf.Timestamp',
|
|
75
|
-
value: Timestamp.encode(message).finish(),
|
|
76
|
-
};
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=timestamp.js.map
|
|
1
|
+
import{BinaryReader as n,BinaryWriter as o}from"../../binary.js";import{isSet as s}from"../../helpers.js";import{}from"../../json-safe.js";function t(){return{seconds:BigInt(0),nanos:0}}export const Timestamp={typeUrl:"/google.protobuf.Timestamp",encode:(n,s=o.create())=>(n.seconds!==BigInt(0)&&s.uint32(8).int64(n.seconds),0!==n.nanos&&s.uint32(16).int32(n.nanos),s),decode(o,s){const e=o instanceof n?o:new n(o);let i=void 0===s?e.len:e.pos+s;const r=t();for(;e.pos<i;){const n=e.uint32();switch(n>>>3){case 1:r.seconds=e.int64();break;case 2:r.nanos=e.int32();break;default:e.skipType(7&n)}}return r},fromJSON:n=>({seconds:s(n.seconds)?BigInt(n.seconds.toString()):BigInt(0),nanos:s(n.nanos)?Number(n.nanos):0}),toJSON(n){const o={};return void 0!==n.seconds&&(o.seconds=(n.seconds||BigInt(0)).toString()),void 0!==n.nanos&&(o.nanos=Math.round(n.nanos)),o},fromPartial(n){const o=t();return o.seconds=void 0!==n.seconds&&null!==n.seconds?BigInt(n.seconds.toString()):BigInt(0),o.nanos=n.nanos??0,o},fromProtoMsg:n=>Timestamp.decode(n.value),toProto:n=>Timestamp.encode(n).finish(),toProtoMsg:n=>({typeUrl:"/google.protobuf.Timestamp",value:Timestamp.encode(n).finish()})};
|
package/dist/codegen/helpers.js
CHANGED
|
@@ -1,196 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3
|
|
4
|
-
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
5
|
-
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
6
|
-
*/
|
|
7
|
-
import { encodeBase64, decodeBase64 } from '@endo/base64';
|
|
8
|
-
// use Endo for broader compatibility
|
|
9
|
-
export const bytesFromBase64 = decodeBase64;
|
|
10
|
-
export const base64FromBytes = encodeBase64;
|
|
11
|
-
export function omitDefault(input) {
|
|
12
|
-
if (typeof input === 'string') {
|
|
13
|
-
return input === '' ? undefined : input;
|
|
14
|
-
}
|
|
15
|
-
if (typeof input === 'number') {
|
|
16
|
-
return input === 0 ? undefined : input;
|
|
17
|
-
}
|
|
18
|
-
if (typeof input === 'boolean') {
|
|
19
|
-
return input === false ? undefined : input;
|
|
20
|
-
}
|
|
21
|
-
if (typeof input === 'bigint') {
|
|
22
|
-
return input === BigInt(0) ? undefined : input;
|
|
23
|
-
}
|
|
24
|
-
throw new Error(`Got unsupported type ${typeof input}`);
|
|
25
|
-
}
|
|
26
|
-
export function toDuration(duration) {
|
|
27
|
-
return {
|
|
28
|
-
seconds: BigInt(Math.floor(parseInt(duration) / 1000000000)),
|
|
29
|
-
nanos: parseInt(duration) % 1000000000,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export function fromDuration(duration) {
|
|
33
|
-
return (parseInt(duration.seconds.toString()) * 1000000000 +
|
|
34
|
-
duration.nanos).toString();
|
|
35
|
-
}
|
|
36
|
-
export function isSet(value) {
|
|
37
|
-
return value !== null && value !== undefined;
|
|
38
|
-
}
|
|
39
|
-
export function isObject(value) {
|
|
40
|
-
return typeof value === 'object' && value !== null;
|
|
41
|
-
}
|
|
42
|
-
export const setPaginationParams = (options, pagination) => {
|
|
43
|
-
if (!pagination) {
|
|
44
|
-
return options;
|
|
45
|
-
}
|
|
46
|
-
if (typeof pagination?.countTotal !== 'undefined') {
|
|
47
|
-
options.params['pagination.count_total'] = pagination.countTotal;
|
|
48
|
-
}
|
|
49
|
-
if (typeof pagination?.key !== 'undefined') {
|
|
50
|
-
// String to Uint8Array
|
|
51
|
-
// let uint8arr = new Uint8Array(Buffer.from(data,'base64'));
|
|
52
|
-
// Uint8Array to String
|
|
53
|
-
options.params['pagination.key'] = Buffer.from(pagination.key).toString('base64');
|
|
54
|
-
}
|
|
55
|
-
if (typeof pagination?.limit !== 'undefined') {
|
|
56
|
-
options.params['pagination.limit'] = pagination.limit.toString();
|
|
57
|
-
}
|
|
58
|
-
if (typeof pagination?.offset !== 'undefined') {
|
|
59
|
-
options.params['pagination.offset'] = pagination.offset.toString();
|
|
60
|
-
}
|
|
61
|
-
if (typeof pagination?.reverse !== 'undefined') {
|
|
62
|
-
options.params['pagination.reverse'] = pagination.reverse;
|
|
63
|
-
}
|
|
64
|
-
return options;
|
|
65
|
-
};
|
|
66
|
-
export function toTimestamp(date) {
|
|
67
|
-
const seconds = numberToLong(date.getTime() / 1_000);
|
|
68
|
-
const nanos = (date.getTime() % 1000) * 1000000;
|
|
69
|
-
return {
|
|
70
|
-
seconds,
|
|
71
|
-
nanos,
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export function fromTimestamp(t) {
|
|
75
|
-
let millis = Number(t.seconds) * 1000;
|
|
76
|
-
millis += t.nanos / 1000000;
|
|
77
|
-
return new Date(millis);
|
|
78
|
-
}
|
|
79
|
-
const timestampFromJSON = (object) => {
|
|
80
|
-
return {
|
|
81
|
-
seconds: isSet(object.seconds)
|
|
82
|
-
? BigInt(object.seconds.toString())
|
|
83
|
-
: BigInt(0),
|
|
84
|
-
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
export function fromJsonTimestamp(o) {
|
|
88
|
-
if (o instanceof Date) {
|
|
89
|
-
return toTimestamp(o);
|
|
90
|
-
}
|
|
91
|
-
else if (typeof o === 'string') {
|
|
92
|
-
return toTimestamp(new Date(o));
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
return timestampFromJSON(o);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function numberToLong(number) {
|
|
99
|
-
return BigInt(Math.trunc(number));
|
|
100
|
-
}
|
|
101
|
-
// START agoric-sdk patch
|
|
102
|
-
// The largest value we need is 18 (Ether).
|
|
103
|
-
const maxFractionalDigits = 30;
|
|
104
|
-
/**
|
|
105
|
-
* A type for arbitrary precision, non-negative decimals.
|
|
106
|
-
*
|
|
107
|
-
* Instances of this class are immutable.
|
|
108
|
-
*/
|
|
109
|
-
export class Decimal {
|
|
110
|
-
static fromUserInput(input, fractionalDigits) {
|
|
111
|
-
Decimal.verifyFractionalDigits(fractionalDigits);
|
|
112
|
-
const badCharacter = input.match(/[^0-9.]/);
|
|
113
|
-
if (badCharacter) {
|
|
114
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
115
|
-
throw new Error(`Invalid character at position ${badCharacter.index + 1}`);
|
|
116
|
-
}
|
|
117
|
-
let whole;
|
|
118
|
-
let fractional;
|
|
119
|
-
if (input === '') {
|
|
120
|
-
whole = '0';
|
|
121
|
-
fractional = '';
|
|
122
|
-
}
|
|
123
|
-
else if (input.search(/\./) === -1) {
|
|
124
|
-
// integer format, no separator
|
|
125
|
-
whole = input;
|
|
126
|
-
fractional = '';
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
const parts = input.split('.');
|
|
130
|
-
switch (parts.length) {
|
|
131
|
-
case 0:
|
|
132
|
-
case 1:
|
|
133
|
-
throw new Error('Fewer than two elements in split result. This must not happen here.');
|
|
134
|
-
case 2:
|
|
135
|
-
if (!parts[1])
|
|
136
|
-
throw new Error('Fractional part missing');
|
|
137
|
-
whole = parts[0];
|
|
138
|
-
fractional = parts[1].replace(/0+$/, '');
|
|
139
|
-
break;
|
|
140
|
-
default:
|
|
141
|
-
throw new Error('More than one separator found');
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (fractional.length > fractionalDigits) {
|
|
145
|
-
throw new Error('Got more fractional digits than supported');
|
|
146
|
-
}
|
|
147
|
-
const quantity = `${whole}${fractional.padEnd(fractionalDigits, '0')}`;
|
|
148
|
-
return new Decimal(quantity, fractionalDigits);
|
|
149
|
-
}
|
|
150
|
-
static fromAtomics(atomics, fractionalDigits) {
|
|
151
|
-
Decimal.verifyFractionalDigits(fractionalDigits);
|
|
152
|
-
return new Decimal(atomics, fractionalDigits);
|
|
153
|
-
}
|
|
154
|
-
static verifyFractionalDigits(fractionalDigits) {
|
|
155
|
-
if (!Number.isInteger(fractionalDigits))
|
|
156
|
-
throw new Error('Fractional digits is not an integer');
|
|
157
|
-
if (fractionalDigits < 0)
|
|
158
|
-
throw new Error('Fractional digits must not be negative');
|
|
159
|
-
if (fractionalDigits > maxFractionalDigits) {
|
|
160
|
-
throw new Error(`Fractional digits must not exceed ${maxFractionalDigits}`);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
get atomics() {
|
|
164
|
-
return this.data.atomics.toString();
|
|
165
|
-
}
|
|
166
|
-
get fractionalDigits() {
|
|
167
|
-
return this.data.fractionalDigits;
|
|
168
|
-
}
|
|
169
|
-
data;
|
|
170
|
-
constructor(atomics, fractionalDigits) {
|
|
171
|
-
if (!atomics.match(/^[0-9]+$/)) {
|
|
172
|
-
throw new Error('Invalid string format. Only non-negative integers in decimal representation supported.');
|
|
173
|
-
}
|
|
174
|
-
this.data = {
|
|
175
|
-
atomics: BigInt(atomics),
|
|
176
|
-
fractionalDigits: fractionalDigits,
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
toString() {
|
|
180
|
-
const factor = BigInt(10) ** BigInt(this.data.fractionalDigits);
|
|
181
|
-
const whole = this.data.atomics / factor;
|
|
182
|
-
const fractional = this.data.atomics % factor;
|
|
183
|
-
if (fractional === 0n) {
|
|
184
|
-
return whole.toString();
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
const fullFractionalPart = fractional
|
|
188
|
-
.toString()
|
|
189
|
-
.padStart(this.data.fractionalDigits, '0');
|
|
190
|
-
const trimmedFractionalPart = fullFractionalPart.replace(/0+$/, '');
|
|
191
|
-
return `${whole.toString()}.${trimmedFractionalPart}`;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
// END agoric-sdk patch
|
|
196
|
-
//# sourceMappingURL=helpers.js.map
|
|
1
|
+
import{encodeBase64 as t,decodeBase64 as e}from"@endo/base64";export const bytesFromBase64=e;export const base64FromBytes=t;export function omitDefault(t){if("string"==typeof t)return""===t?void 0:t;if("number"==typeof t)return 0===t?void 0:t;if("boolean"==typeof t)return!1===t?void 0:t;if("bigint"==typeof t)return t===BigInt(0)?void 0:t;throw new Error("Got unsupported type "+typeof t)}export function toDuration(t){return{seconds:BigInt(Math.floor(parseInt(t)/1e9)),nanos:parseInt(t)%1e9}}export function fromDuration(t){return(1e9*parseInt(t.seconds.toString())+t.nanos).toString()}export function isSet(t){return null!=t}export function isObject(t){return"object"==typeof t&&null!==t}export const setPaginationParams=(t,e)=>e?(void 0!==e?.countTotal&&(t.params["pagination.count_total"]=e.countTotal),void 0!==e?.key&&(t.params["pagination.key"]=Buffer.from(e.key).toString("base64")),void 0!==e?.limit&&(t.params["pagination.limit"]=e.limit.toString()),void 0!==e?.offset&&(t.params["pagination.offset"]=e.offset.toString()),void 0!==e?.reverse&&(t.params["pagination.reverse"]=e.reverse),t):t;export function toTimestamp(t){var e;return{seconds:(e=t.getTime()/1e3,BigInt(Math.trunc(e))),nanos:t.getTime()%1e3*1e6}}export function fromTimestamp(t){let e=1e3*Number(t.seconds);return e+=t.nanos/1e6,new Date(e)}export function fromJsonTimestamp(t){return t instanceof Date?toTimestamp(t):"string"==typeof t?toTimestamp(new Date(t)):{seconds:isSet((e=t).seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:isSet(e.nanos)?Number(e.nanos):0};var e}export class Decimal{static fromUserInput(t,e){Decimal.verifyFractionalDigits(e);const r=t.match(/[^0-9.]/);if(r)throw new Error(`Invalid character at position ${r.index+1}`);let n,i;if(""===t)n="0",i="";else if(-1===t.search(/\./))n=t,i="";else{const e=t.split(".");switch(e.length){case 0:case 1:throw new Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!e[1])throw new Error("Fractional part missing");n=e[0],i=e[1].replace(/0+$/,"");break;default:throw new Error("More than one separator found")}}if(i.length>e)throw new Error("Got more fractional digits than supported");const o=`${n}${i.padEnd(e,"0")}`;return new Decimal(o,e)}static fromAtomics(t,e){return Decimal.verifyFractionalDigits(e),new Decimal(t,e)}static verifyFractionalDigits(t){if(!Number.isInteger(t))throw new Error("Fractional digits is not an integer");if(t<0)throw new Error("Fractional digits must not be negative");if(t>30)throw new Error("Fractional digits must not exceed 30")}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}data;constructor(t,e){if(!t.match(/^[0-9]+$/))throw new Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:BigInt(t),fractionalDigits:e}}toString(){const t=BigInt(10)**BigInt(this.data.fractionalDigits),e=this.data.atomics/t,r=this.data.atomics%t;if(0n===r)return e.toString();{const t=r.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return`${e.toString()}.${t}`}}}
|
|
@@ -1,66 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { BinaryReader, BinaryWriter } from '../../../../../binary.js';
|
|
3
|
-
import { isSet } from '../../../../../helpers.js';
|
|
4
|
-
import {} from '../../../../../json-safe.js';
|
|
5
|
-
function createBaseParams() {
|
|
6
|
-
return {
|
|
7
|
-
controllerEnabled: false,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export const Params = {
|
|
11
|
-
typeUrl: '/ibc.applications.interchain_accounts.controller.v1.Params',
|
|
12
|
-
encode(message, writer = BinaryWriter.create()) {
|
|
13
|
-
if (message.controllerEnabled === true) {
|
|
14
|
-
writer.uint32(8).bool(message.controllerEnabled);
|
|
15
|
-
}
|
|
16
|
-
return writer;
|
|
17
|
-
},
|
|
18
|
-
decode(input, length) {
|
|
19
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
20
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
21
|
-
const message = createBaseParams();
|
|
22
|
-
while (reader.pos < end) {
|
|
23
|
-
const tag = reader.uint32();
|
|
24
|
-
switch (tag >>> 3) {
|
|
25
|
-
case 1:
|
|
26
|
-
message.controllerEnabled = reader.bool();
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
reader.skipType(tag & 7);
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return message;
|
|
34
|
-
},
|
|
35
|
-
fromJSON(object) {
|
|
36
|
-
return {
|
|
37
|
-
controllerEnabled: isSet(object.controllerEnabled)
|
|
38
|
-
? Boolean(object.controllerEnabled)
|
|
39
|
-
: false,
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
toJSON(message) {
|
|
43
|
-
const obj = {};
|
|
44
|
-
message.controllerEnabled !== undefined &&
|
|
45
|
-
(obj.controllerEnabled = message.controllerEnabled);
|
|
46
|
-
return obj;
|
|
47
|
-
},
|
|
48
|
-
fromPartial(object) {
|
|
49
|
-
const message = createBaseParams();
|
|
50
|
-
message.controllerEnabled = object.controllerEnabled ?? false;
|
|
51
|
-
return message;
|
|
52
|
-
},
|
|
53
|
-
fromProtoMsg(message) {
|
|
54
|
-
return Params.decode(message.value);
|
|
55
|
-
},
|
|
56
|
-
toProto(message) {
|
|
57
|
-
return Params.encode(message).finish();
|
|
58
|
-
},
|
|
59
|
-
toProtoMsg(message) {
|
|
60
|
-
return {
|
|
61
|
-
typeUrl: '/ibc.applications.interchain_accounts.controller.v1.Params',
|
|
62
|
-
value: Params.encode(message).finish(),
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=controller.js.map
|
|
1
|
+
import{BinaryReader as o,BinaryWriter as r}from"../../../../../binary.js";import{isSet as e}from"../../../../../helpers.js";import{}from"../../../../../json-safe.js";export const Params={typeUrl:"/ibc.applications.interchain_accounts.controller.v1.Params",encode:(o,e=r.create())=>(!0===o.controllerEnabled&&e.uint32(8).bool(o.controllerEnabled),e),decode(r,e){const n=r instanceof o?r:new o(r);let l=void 0===e?n.len:n.pos+e;const t={controllerEnabled:!1};for(;n.pos<l;){const o=n.uint32();if(o>>>3==1)t.controllerEnabled=n.bool();else n.skipType(7&o)}return t},fromJSON:o=>({controllerEnabled:!!e(o.controllerEnabled)&&Boolean(o.controllerEnabled)}),toJSON(o){const r={};return void 0!==o.controllerEnabled&&(r.controllerEnabled=o.controllerEnabled),r},fromPartial(o){const r={controllerEnabled:!1};return r.controllerEnabled=o.controllerEnabled??!1,r},fromProtoMsg:o=>Params.decode(o.value),toProto:o=>Params.encode(o).finish(),toProtoMsg:o=>({typeUrl:"/ibc.applications.interchain_accounts.controller.v1.Params",value:Params.encode(o).finish()})};
|