carbon-js-sdk 0.3.51 → 0.3.53
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/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +18 -0
- package/lib/codec/cosmos/app/module/v1alpha1/module.js +46 -0
- package/lib/codec/cosmos/app/v1alpha1/config.d.ts +57 -0
- package/lib/codec/cosmos/app/v1alpha1/config.js +125 -0
- package/lib/codec/cosmos/app/v1alpha1/export.d.ts +3 -0
- package/lib/codec/cosmos/app/v1alpha1/export.js +13 -0
- package/lib/codec/cosmos/app/v1alpha1/module.d.ts +109 -0
- package/lib/codec/cosmos/app/v1alpha1/module.js +192 -0
- package/lib/codec/cosmos/app/v1alpha1/query.d.ts +44 -0
- package/lib/codec/cosmos/app/v1alpha1/query.js +107 -0
- package/lib/codec/cosmos/authz/v1beta1/export.d.ts +4 -0
- package/lib/codec/cosmos/authz/v1beta1/export.js +25 -0
- package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +42 -0
- package/lib/codec/cosmos/base/node/v1beta1/query.js +104 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +67 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/types.js +423 -0
- package/lib/codec/cosmos/capability/v1beta1/export.d.ts +2 -0
- package/lib/codec/cosmos/capability/v1beta1/export.js +9 -0
- package/lib/codec/cosmos/crisis/v1beta1/export.d.ts +1 -0
- package/lib/codec/cosmos/crisis/v1beta1/export.js +6 -0
- package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +32 -0
- package/lib/codec/cosmos/crypto/hd/v1/hd.js +114 -0
- package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +78 -0
- package/lib/codec/cosmos/crypto/keyring/v1/record.js +309 -0
- package/lib/codec/cosmos/evidence/v1beta1/export.d.ts +3 -0
- package/lib/codec/cosmos/evidence/v1beta1/export.js +13 -0
- package/lib/codec/cosmos/feegrant/v1beta1/export.d.ts +3 -0
- package/lib/codec/cosmos/feegrant/v1beta1/export.js +20 -0
- package/lib/codec/cosmos/gov/v1/export.d.ts +3 -0
- package/lib/codec/cosmos/gov/v1/export.js +46 -0
- package/lib/codec/cosmos/gov/v1/genesis.d.ts +34 -0
- package/lib/codec/cosmos/gov/v1/genesis.js +166 -0
- package/lib/codec/cosmos/gov/v1/gov.d.ts +198 -0
- package/lib/codec/cosmos/gov/v1/gov.js +855 -0
- package/lib/codec/cosmos/gov/v1/query.d.ts +264 -0
- package/lib/codec/cosmos/gov/v1/query.js +1045 -0
- package/lib/codec/cosmos/gov/v1/tx.d.ts +167 -0
- package/lib/codec/cosmos/gov/v1/tx.js +639 -0
- package/lib/codec/cosmos/group/v1/events.d.ts +124 -0
- package/lib/codec/cosmos/group/v1/events.js +480 -0
- package/lib/codec/cosmos/group/v1/export.d.ts +4 -0
- package/lib/codec/cosmos/group/v1/export.js +94 -0
- package/lib/codec/cosmos/group/v1/genesis.d.ts +45 -0
- package/lib/codec/cosmos/group/v1/genesis.js +176 -0
- package/lib/codec/cosmos/group/v1/query.d.ts +412 -0
- package/lib/codec/cosmos/group/v1/query.js +1648 -0
- package/lib/codec/cosmos/group/v1/tx.d.ts +483 -0
- package/lib/codec/cosmos/group/v1/tx.js +1840 -0
- package/lib/codec/cosmos/group/v1/types.d.ts +356 -0
- package/lib/codec/cosmos/group/v1/types.js +1306 -0
- package/lib/codec/cosmos/msg/v1/msg.d.ts +1 -0
- package/lib/codec/cosmos/msg/v1/msg.js +14 -0
- package/lib/codec/cosmos/nft/v1beta1/event.d.ts +48 -0
- package/lib/codec/cosmos/nft/v1beta1/event.js +227 -0
- package/lib/codec/cosmos/nft/v1beta1/export.d.ts +5 -0
- package/lib/codec/cosmos/nft/v1beta1/export.js +30 -0
- package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +36 -0
- package/lib/codec/cosmos/nft/v1beta1/genesis.js +140 -0
- package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +53 -0
- package/lib/codec/cosmos/nft/v1beta1/nft.js +233 -0
- package/lib/codec/cosmos/nft/v1beta1/query.d.ts +206 -0
- package/lib/codec/cosmos/nft/v1beta1/query.js +817 -0
- package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +49 -0
- package/lib/codec/cosmos/nft/v1beta1/tx.js +137 -0
- package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +22 -0
- package/lib/codec/cosmos/orm/module/v1alpha1/module.js +46 -0
- package/lib/codec/cosmos/orm/v1/export.d.ts +1 -0
- package/lib/codec/cosmos/orm/v1/export.js +8 -0
- package/lib/codec/cosmos/orm/v1/orm.d.ts +123 -0
- package/lib/codec/cosmos/orm/v1/orm.js +263 -0
- package/lib/codec/cosmos/orm/v1alpha1/export.d.ts +1 -0
- package/lib/codec/cosmos/orm/v1alpha1/export.js +9 -0
- package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +96 -0
- package/lib/codec/cosmos/orm/v1alpha1/schema.js +265 -0
- package/lib/codec/cosmos/upgrade/v1beta1/export.d.ts +3 -0
- package/lib/codec/cosmos/upgrade/v1beta1/export.js +24 -0
- package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +97 -0
- package/lib/codec/cosmos/upgrade/v1beta1/tx.js +203 -0
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +24 -0
- package/lib/codec/ibc/applications/fee/v1/ack.js +125 -0
- package/lib/codec/ibc/applications/fee/v1/export.d.ts +6 -0
- package/lib/codec/ibc/applications/fee/v1/export.js +47 -0
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +68 -0
- package/lib/codec/ibc/applications/fee/v1/fee.js +289 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +93 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.js +390 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +25 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.js +71 -0
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +312 -0
- package/lib/codec/ibc/applications/fee/v1/query.js +1187 -0
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +171 -0
- package/lib/codec/ibc/applications/fee/v1/tx.js +524 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +78 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +296 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +80 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +439 -0
- package/lib/insights/competition.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
export declare const protobufPackage = "cosmos.app.module.v1alpha1";
|
|
4
|
+
/** Module is the module config object for the cosmos.app v1 app module. */
|
|
5
|
+
export interface Module {
|
|
6
|
+
}
|
|
7
|
+
export declare const Module: {
|
|
8
|
+
encode(_: Module, writer?: _m0.Writer): _m0.Writer;
|
|
9
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Module;
|
|
10
|
+
fromJSON(_: any): Module;
|
|
11
|
+
toJSON(_: Module): unknown;
|
|
12
|
+
fromPartial(_: DeepPartial<Module>): Module;
|
|
13
|
+
};
|
|
14
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
15
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
16
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
17
|
+
} : Partial<T>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Module = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
exports.protobufPackage = "cosmos.app.module.v1alpha1";
|
|
11
|
+
const baseModule = {};
|
|
12
|
+
exports.Module = {
|
|
13
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
return writer;
|
|
15
|
+
},
|
|
16
|
+
decode(input, length) {
|
|
17
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
18
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
19
|
+
const message = Object.assign({}, baseModule);
|
|
20
|
+
while (reader.pos < end) {
|
|
21
|
+
const tag = reader.uint32();
|
|
22
|
+
switch (tag >>> 3) {
|
|
23
|
+
default:
|
|
24
|
+
reader.skipType(tag & 7);
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return message;
|
|
29
|
+
},
|
|
30
|
+
fromJSON(_) {
|
|
31
|
+
const message = Object.assign({}, baseModule);
|
|
32
|
+
return message;
|
|
33
|
+
},
|
|
34
|
+
toJSON(_) {
|
|
35
|
+
const obj = {};
|
|
36
|
+
return obj;
|
|
37
|
+
},
|
|
38
|
+
fromPartial(_) {
|
|
39
|
+
const message = Object.assign({}, baseModule);
|
|
40
|
+
return message;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
44
|
+
minimal_1.default.util.Long = long_1.default;
|
|
45
|
+
minimal_1.default.configure();
|
|
46
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Any } from "../../../google/protobuf/any";
|
|
4
|
+
export declare const protobufPackage = "cosmos.app.v1alpha1";
|
|
5
|
+
/**
|
|
6
|
+
* Config represents the configuration for a Cosmos SDK ABCI app.
|
|
7
|
+
* It is intended that all state machine logic including the version of
|
|
8
|
+
* baseapp and tx handlers (and possibly even Tendermint) that an app needs
|
|
9
|
+
* can be described in a config object. For compatibility, the framework should
|
|
10
|
+
* allow a mixture of declarative and imperative app wiring, however, apps
|
|
11
|
+
* that strive for the maximum ease of maintainability should be able to describe
|
|
12
|
+
* their state machine with a config object alone.
|
|
13
|
+
*/
|
|
14
|
+
export interface Config {
|
|
15
|
+
/** modules are the module configurations for the app. */
|
|
16
|
+
modules: ModuleConfig[];
|
|
17
|
+
}
|
|
18
|
+
/** ModuleConfig is a module configuration for an app. */
|
|
19
|
+
export interface ModuleConfig {
|
|
20
|
+
/**
|
|
21
|
+
* name is the unique name of the module within the app. It should be a name
|
|
22
|
+
* that persists between different versions of a module so that modules
|
|
23
|
+
* can be smoothly upgraded to new versions.
|
|
24
|
+
*
|
|
25
|
+
* For example, for the module cosmos.bank.module.v1.Module, we may chose
|
|
26
|
+
* to simply name the module "bank" in the app. When we upgrade to
|
|
27
|
+
* cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same
|
|
28
|
+
* and the framework knows that the v2 module should receive all the same state
|
|
29
|
+
* that the v1 module had. Note: modules should provide info on which versions
|
|
30
|
+
* they can migrate from in the ModuleDescriptor.can_migration_from field.
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* config is the config object for the module. Module config messages should
|
|
35
|
+
* define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension.
|
|
36
|
+
*/
|
|
37
|
+
config?: Any;
|
|
38
|
+
}
|
|
39
|
+
export declare const Config: {
|
|
40
|
+
encode(message: Config, writer?: _m0.Writer): _m0.Writer;
|
|
41
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Config;
|
|
42
|
+
fromJSON(object: any): Config;
|
|
43
|
+
toJSON(message: Config): unknown;
|
|
44
|
+
fromPartial(object: DeepPartial<Config>): Config;
|
|
45
|
+
};
|
|
46
|
+
export declare const ModuleConfig: {
|
|
47
|
+
encode(message: ModuleConfig, writer?: _m0.Writer): _m0.Writer;
|
|
48
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ModuleConfig;
|
|
49
|
+
fromJSON(object: any): ModuleConfig;
|
|
50
|
+
toJSON(message: ModuleConfig): unknown;
|
|
51
|
+
fromPartial(object: DeepPartial<ModuleConfig>): ModuleConfig;
|
|
52
|
+
};
|
|
53
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
54
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
55
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
56
|
+
} : Partial<T>;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ModuleConfig = exports.Config = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
const any_1 = require("../../../google/protobuf/any");
|
|
11
|
+
exports.protobufPackage = "cosmos.app.v1alpha1";
|
|
12
|
+
const baseConfig = {};
|
|
13
|
+
exports.Config = {
|
|
14
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
15
|
+
for (const v of message.modules) {
|
|
16
|
+
exports.ModuleConfig.encode(v, writer.uint32(10).fork()).ldelim();
|
|
17
|
+
}
|
|
18
|
+
return writer;
|
|
19
|
+
},
|
|
20
|
+
decode(input, length) {
|
|
21
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
22
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
23
|
+
const message = Object.assign({}, baseConfig);
|
|
24
|
+
message.modules = [];
|
|
25
|
+
while (reader.pos < end) {
|
|
26
|
+
const tag = reader.uint32();
|
|
27
|
+
switch (tag >>> 3) {
|
|
28
|
+
case 1:
|
|
29
|
+
message.modules.push(exports.ModuleConfig.decode(reader, reader.uint32()));
|
|
30
|
+
break;
|
|
31
|
+
default:
|
|
32
|
+
reader.skipType(tag & 7);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return message;
|
|
37
|
+
},
|
|
38
|
+
fromJSON(object) {
|
|
39
|
+
var _a;
|
|
40
|
+
const message = Object.assign({}, baseConfig);
|
|
41
|
+
message.modules = ((_a = object.modules) !== null && _a !== void 0 ? _a : []).map((e) => exports.ModuleConfig.fromJSON(e));
|
|
42
|
+
return message;
|
|
43
|
+
},
|
|
44
|
+
toJSON(message) {
|
|
45
|
+
const obj = {};
|
|
46
|
+
if (message.modules) {
|
|
47
|
+
obj.modules = message.modules.map((e) => e ? exports.ModuleConfig.toJSON(e) : undefined);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
obj.modules = [];
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
},
|
|
54
|
+
fromPartial(object) {
|
|
55
|
+
var _a;
|
|
56
|
+
const message = Object.assign({}, baseConfig);
|
|
57
|
+
message.modules = ((_a = object.modules) !== null && _a !== void 0 ? _a : []).map((e) => exports.ModuleConfig.fromPartial(e));
|
|
58
|
+
return message;
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
const baseModuleConfig = { name: "" };
|
|
62
|
+
exports.ModuleConfig = {
|
|
63
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
64
|
+
if (message.name !== "") {
|
|
65
|
+
writer.uint32(10).string(message.name);
|
|
66
|
+
}
|
|
67
|
+
if (message.config !== undefined) {
|
|
68
|
+
any_1.Any.encode(message.config, writer.uint32(18).fork()).ldelim();
|
|
69
|
+
}
|
|
70
|
+
return writer;
|
|
71
|
+
},
|
|
72
|
+
decode(input, length) {
|
|
73
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
74
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
75
|
+
const message = Object.assign({}, baseModuleConfig);
|
|
76
|
+
while (reader.pos < end) {
|
|
77
|
+
const tag = reader.uint32();
|
|
78
|
+
switch (tag >>> 3) {
|
|
79
|
+
case 1:
|
|
80
|
+
message.name = reader.string();
|
|
81
|
+
break;
|
|
82
|
+
case 2:
|
|
83
|
+
message.config = any_1.Any.decode(reader, reader.uint32());
|
|
84
|
+
break;
|
|
85
|
+
default:
|
|
86
|
+
reader.skipType(tag & 7);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return message;
|
|
91
|
+
},
|
|
92
|
+
fromJSON(object) {
|
|
93
|
+
const message = Object.assign({}, baseModuleConfig);
|
|
94
|
+
message.name =
|
|
95
|
+
object.name !== undefined && object.name !== null
|
|
96
|
+
? String(object.name)
|
|
97
|
+
: "";
|
|
98
|
+
message.config =
|
|
99
|
+
object.config !== undefined && object.config !== null
|
|
100
|
+
? any_1.Any.fromJSON(object.config)
|
|
101
|
+
: undefined;
|
|
102
|
+
return message;
|
|
103
|
+
},
|
|
104
|
+
toJSON(message) {
|
|
105
|
+
const obj = {};
|
|
106
|
+
message.name !== undefined && (obj.name = message.name);
|
|
107
|
+
message.config !== undefined &&
|
|
108
|
+
(obj.config = message.config ? any_1.Any.toJSON(message.config) : undefined);
|
|
109
|
+
return obj;
|
|
110
|
+
},
|
|
111
|
+
fromPartial(object) {
|
|
112
|
+
var _a;
|
|
113
|
+
const message = Object.assign({}, baseModuleConfig);
|
|
114
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
115
|
+
message.config =
|
|
116
|
+
object.config !== undefined && object.config !== null
|
|
117
|
+
? any_1.Any.fromPartial(object.config)
|
|
118
|
+
: undefined;
|
|
119
|
+
return message;
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
123
|
+
minimal_1.default.util.Long = long_1.default;
|
|
124
|
+
minimal_1.default.configure();
|
|
125
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QueryConfigResponse = exports.QueryConfigRequest = exports.MigrateFromInfo = exports.PackageReference = exports.ModuleDescriptor = exports.ModuleConfig = exports.Config = void 0;
|
|
4
|
+
var config_1 = require("./config");
|
|
5
|
+
Object.defineProperty(exports, "Config", { enumerable: true, get: function () { return config_1.Config; } });
|
|
6
|
+
Object.defineProperty(exports, "ModuleConfig", { enumerable: true, get: function () { return config_1.ModuleConfig; } });
|
|
7
|
+
var module_1 = require("./module");
|
|
8
|
+
Object.defineProperty(exports, "ModuleDescriptor", { enumerable: true, get: function () { return module_1.ModuleDescriptor; } });
|
|
9
|
+
Object.defineProperty(exports, "PackageReference", { enumerable: true, get: function () { return module_1.PackageReference; } });
|
|
10
|
+
Object.defineProperty(exports, "MigrateFromInfo", { enumerable: true, get: function () { return module_1.MigrateFromInfo; } });
|
|
11
|
+
var query_1 = require("./query");
|
|
12
|
+
Object.defineProperty(exports, "QueryConfigRequest", { enumerable: true, get: function () { return query_1.QueryConfigRequest; } });
|
|
13
|
+
Object.defineProperty(exports, "QueryConfigResponse", { enumerable: true, get: function () { return query_1.QueryConfigResponse; } });
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
export declare const protobufPackage = "cosmos.app.v1alpha1";
|
|
4
|
+
/** ModuleDescriptor describes an app module. */
|
|
5
|
+
export interface ModuleDescriptor {
|
|
6
|
+
/**
|
|
7
|
+
* go_import names the package that should be imported by an app to load the
|
|
8
|
+
* module in the runtime module registry. It is required to make debugging
|
|
9
|
+
* of configuration errors easier for users.
|
|
10
|
+
*/
|
|
11
|
+
goImport: string;
|
|
12
|
+
/**
|
|
13
|
+
* use_package refers to a protobuf package that this module
|
|
14
|
+
* uses and exposes to the world. In an app, only one module should "use"
|
|
15
|
+
* or own a single protobuf package. It is assumed that the module uses
|
|
16
|
+
* all of the .proto files in a single package.
|
|
17
|
+
*/
|
|
18
|
+
usePackage: PackageReference[];
|
|
19
|
+
/**
|
|
20
|
+
* can_migrate_from defines which module versions this module can migrate
|
|
21
|
+
* state from. The framework will check that one module version is able to
|
|
22
|
+
* migrate from a previous module version before attempting to update its
|
|
23
|
+
* config. It is assumed that modules can transitively migrate from earlier
|
|
24
|
+
* versions. For instance if v3 declares it can migrate from v2, and v2
|
|
25
|
+
* declares it can migrate from v1, the framework knows how to migrate
|
|
26
|
+
* from v1 to v3, assuming all 3 module versions are registered at runtime.
|
|
27
|
+
*/
|
|
28
|
+
canMigrateFrom: MigrateFromInfo[];
|
|
29
|
+
}
|
|
30
|
+
/** PackageReference is a reference to a protobuf package used by a module. */
|
|
31
|
+
export interface PackageReference {
|
|
32
|
+
/** name is the fully-qualified name of the package. */
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* revision is the optional revision of the package that is being used.
|
|
36
|
+
* Protobuf packages used in Cosmos should generally have a major version
|
|
37
|
+
* as the last part of the package name, ex. foo.bar.baz.v1.
|
|
38
|
+
* The revision of a package can be thought of as the minor version of a
|
|
39
|
+
* package which has additional backwards compatible definitions that weren't
|
|
40
|
+
* present in a previous version.
|
|
41
|
+
*
|
|
42
|
+
* A package should indicate its revision with a source code comment
|
|
43
|
+
* above the package declaration in one of its files containing the
|
|
44
|
+
* text "Revision N" where N is an integer revision. All packages start
|
|
45
|
+
* at revision 0 the first time they are released in a module.
|
|
46
|
+
*
|
|
47
|
+
* When a new version of a module is released and items are added to existing
|
|
48
|
+
* .proto files, these definitions should contain comments of the form
|
|
49
|
+
* "Since Revision N" where N is an integer revision.
|
|
50
|
+
*
|
|
51
|
+
* When the module runtime starts up, it will check the pinned proto
|
|
52
|
+
* image and panic if there are runtime protobuf definitions that are not
|
|
53
|
+
* in the pinned descriptor which do not have
|
|
54
|
+
* a "Since Revision N" comment or have a "Since Revision N" comment where
|
|
55
|
+
* N is <= to the revision specified here. This indicates that the protobuf
|
|
56
|
+
* files have been updated, but the pinned file descriptor hasn't.
|
|
57
|
+
*
|
|
58
|
+
* If there are items in the pinned file descriptor with a revision
|
|
59
|
+
* greater than the value indicated here, this will also cause a panic
|
|
60
|
+
* as it may mean that the pinned descriptor for a legacy module has been
|
|
61
|
+
* improperly updated or that there is some other versioning discrepancy.
|
|
62
|
+
* Runtime protobuf definitions will also be checked for compatibility
|
|
63
|
+
* with pinned file descriptors to make sure there are no incompatible changes.
|
|
64
|
+
*
|
|
65
|
+
* This behavior ensures that:
|
|
66
|
+
* * pinned proto images are up-to-date
|
|
67
|
+
* * protobuf files are carefully annotated with revision comments which
|
|
68
|
+
* are important good client UX
|
|
69
|
+
* * protobuf files are changed in backwards and forwards compatible ways
|
|
70
|
+
*/
|
|
71
|
+
revision: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* MigrateFromInfo is information on a module version that a newer module
|
|
75
|
+
* can migrate from.
|
|
76
|
+
*/
|
|
77
|
+
export interface MigrateFromInfo {
|
|
78
|
+
/**
|
|
79
|
+
* module is the fully-qualified protobuf name of the module config object
|
|
80
|
+
* for the previous module version, ex: "cosmos.group.module.v1.Module".
|
|
81
|
+
*/
|
|
82
|
+
module: string;
|
|
83
|
+
}
|
|
84
|
+
export declare const ModuleDescriptor: {
|
|
85
|
+
encode(message: ModuleDescriptor, writer?: _m0.Writer): _m0.Writer;
|
|
86
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ModuleDescriptor;
|
|
87
|
+
fromJSON(object: any): ModuleDescriptor;
|
|
88
|
+
toJSON(message: ModuleDescriptor): unknown;
|
|
89
|
+
fromPartial(object: DeepPartial<ModuleDescriptor>): ModuleDescriptor;
|
|
90
|
+
};
|
|
91
|
+
export declare const PackageReference: {
|
|
92
|
+
encode(message: PackageReference, writer?: _m0.Writer): _m0.Writer;
|
|
93
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PackageReference;
|
|
94
|
+
fromJSON(object: any): PackageReference;
|
|
95
|
+
toJSON(message: PackageReference): unknown;
|
|
96
|
+
fromPartial(object: DeepPartial<PackageReference>): PackageReference;
|
|
97
|
+
};
|
|
98
|
+
export declare const MigrateFromInfo: {
|
|
99
|
+
encode(message: MigrateFromInfo, writer?: _m0.Writer): _m0.Writer;
|
|
100
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MigrateFromInfo;
|
|
101
|
+
fromJSON(object: any): MigrateFromInfo;
|
|
102
|
+
toJSON(message: MigrateFromInfo): unknown;
|
|
103
|
+
fromPartial(object: DeepPartial<MigrateFromInfo>): MigrateFromInfo;
|
|
104
|
+
};
|
|
105
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
106
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
107
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
108
|
+
} : Partial<T>;
|
|
109
|
+
export {};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MigrateFromInfo = exports.PackageReference = exports.ModuleDescriptor = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
exports.protobufPackage = "cosmos.app.v1alpha1";
|
|
11
|
+
const baseModuleDescriptor = { goImport: "" };
|
|
12
|
+
exports.ModuleDescriptor = {
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
if (message.goImport !== "") {
|
|
15
|
+
writer.uint32(10).string(message.goImport);
|
|
16
|
+
}
|
|
17
|
+
for (const v of message.usePackage) {
|
|
18
|
+
exports.PackageReference.encode(v, writer.uint32(18).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
for (const v of message.canMigrateFrom) {
|
|
21
|
+
exports.MigrateFromInfo.encode(v, writer.uint32(26).fork()).ldelim();
|
|
22
|
+
}
|
|
23
|
+
return writer;
|
|
24
|
+
},
|
|
25
|
+
decode(input, length) {
|
|
26
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
27
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
+
const message = Object.assign({}, baseModuleDescriptor);
|
|
29
|
+
message.usePackage = [];
|
|
30
|
+
message.canMigrateFrom = [];
|
|
31
|
+
while (reader.pos < end) {
|
|
32
|
+
const tag = reader.uint32();
|
|
33
|
+
switch (tag >>> 3) {
|
|
34
|
+
case 1:
|
|
35
|
+
message.goImport = reader.string();
|
|
36
|
+
break;
|
|
37
|
+
case 2:
|
|
38
|
+
message.usePackage.push(exports.PackageReference.decode(reader, reader.uint32()));
|
|
39
|
+
break;
|
|
40
|
+
case 3:
|
|
41
|
+
message.canMigrateFrom.push(exports.MigrateFromInfo.decode(reader, reader.uint32()));
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
reader.skipType(tag & 7);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return message;
|
|
49
|
+
},
|
|
50
|
+
fromJSON(object) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
const message = Object.assign({}, baseModuleDescriptor);
|
|
53
|
+
message.goImport =
|
|
54
|
+
object.goImport !== undefined && object.goImport !== null
|
|
55
|
+
? String(object.goImport)
|
|
56
|
+
: "";
|
|
57
|
+
message.usePackage = ((_a = object.usePackage) !== null && _a !== void 0 ? _a : []).map((e) => exports.PackageReference.fromJSON(e));
|
|
58
|
+
message.canMigrateFrom = ((_b = object.canMigrateFrom) !== null && _b !== void 0 ? _b : []).map((e) => exports.MigrateFromInfo.fromJSON(e));
|
|
59
|
+
return message;
|
|
60
|
+
},
|
|
61
|
+
toJSON(message) {
|
|
62
|
+
const obj = {};
|
|
63
|
+
message.goImport !== undefined && (obj.goImport = message.goImport);
|
|
64
|
+
if (message.usePackage) {
|
|
65
|
+
obj.usePackage = message.usePackage.map((e) => e ? exports.PackageReference.toJSON(e) : undefined);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
obj.usePackage = [];
|
|
69
|
+
}
|
|
70
|
+
if (message.canMigrateFrom) {
|
|
71
|
+
obj.canMigrateFrom = message.canMigrateFrom.map((e) => e ? exports.MigrateFromInfo.toJSON(e) : undefined);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
obj.canMigrateFrom = [];
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
},
|
|
78
|
+
fromPartial(object) {
|
|
79
|
+
var _a, _b, _c;
|
|
80
|
+
const message = Object.assign({}, baseModuleDescriptor);
|
|
81
|
+
message.goImport = (_a = object.goImport) !== null && _a !== void 0 ? _a : "";
|
|
82
|
+
message.usePackage = ((_b = object.usePackage) !== null && _b !== void 0 ? _b : []).map((e) => exports.PackageReference.fromPartial(e));
|
|
83
|
+
message.canMigrateFrom = ((_c = object.canMigrateFrom) !== null && _c !== void 0 ? _c : []).map((e) => exports.MigrateFromInfo.fromPartial(e));
|
|
84
|
+
return message;
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
const basePackageReference = { name: "", revision: 0 };
|
|
88
|
+
exports.PackageReference = {
|
|
89
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
90
|
+
if (message.name !== "") {
|
|
91
|
+
writer.uint32(10).string(message.name);
|
|
92
|
+
}
|
|
93
|
+
if (message.revision !== 0) {
|
|
94
|
+
writer.uint32(16).uint32(message.revision);
|
|
95
|
+
}
|
|
96
|
+
return writer;
|
|
97
|
+
},
|
|
98
|
+
decode(input, length) {
|
|
99
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
100
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
101
|
+
const message = Object.assign({}, basePackageReference);
|
|
102
|
+
while (reader.pos < end) {
|
|
103
|
+
const tag = reader.uint32();
|
|
104
|
+
switch (tag >>> 3) {
|
|
105
|
+
case 1:
|
|
106
|
+
message.name = reader.string();
|
|
107
|
+
break;
|
|
108
|
+
case 2:
|
|
109
|
+
message.revision = reader.uint32();
|
|
110
|
+
break;
|
|
111
|
+
default:
|
|
112
|
+
reader.skipType(tag & 7);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return message;
|
|
117
|
+
},
|
|
118
|
+
fromJSON(object) {
|
|
119
|
+
const message = Object.assign({}, basePackageReference);
|
|
120
|
+
message.name =
|
|
121
|
+
object.name !== undefined && object.name !== null
|
|
122
|
+
? String(object.name)
|
|
123
|
+
: "";
|
|
124
|
+
message.revision =
|
|
125
|
+
object.revision !== undefined && object.revision !== null
|
|
126
|
+
? Number(object.revision)
|
|
127
|
+
: 0;
|
|
128
|
+
return message;
|
|
129
|
+
},
|
|
130
|
+
toJSON(message) {
|
|
131
|
+
const obj = {};
|
|
132
|
+
message.name !== undefined && (obj.name = message.name);
|
|
133
|
+
message.revision !== undefined && (obj.revision = message.revision);
|
|
134
|
+
return obj;
|
|
135
|
+
},
|
|
136
|
+
fromPartial(object) {
|
|
137
|
+
var _a, _b;
|
|
138
|
+
const message = Object.assign({}, basePackageReference);
|
|
139
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
140
|
+
message.revision = (_b = object.revision) !== null && _b !== void 0 ? _b : 0;
|
|
141
|
+
return message;
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
const baseMigrateFromInfo = { module: "" };
|
|
145
|
+
exports.MigrateFromInfo = {
|
|
146
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
147
|
+
if (message.module !== "") {
|
|
148
|
+
writer.uint32(10).string(message.module);
|
|
149
|
+
}
|
|
150
|
+
return writer;
|
|
151
|
+
},
|
|
152
|
+
decode(input, length) {
|
|
153
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
154
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
155
|
+
const message = Object.assign({}, baseMigrateFromInfo);
|
|
156
|
+
while (reader.pos < end) {
|
|
157
|
+
const tag = reader.uint32();
|
|
158
|
+
switch (tag >>> 3) {
|
|
159
|
+
case 1:
|
|
160
|
+
message.module = reader.string();
|
|
161
|
+
break;
|
|
162
|
+
default:
|
|
163
|
+
reader.skipType(tag & 7);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return message;
|
|
168
|
+
},
|
|
169
|
+
fromJSON(object) {
|
|
170
|
+
const message = Object.assign({}, baseMigrateFromInfo);
|
|
171
|
+
message.module =
|
|
172
|
+
object.module !== undefined && object.module !== null
|
|
173
|
+
? String(object.module)
|
|
174
|
+
: "";
|
|
175
|
+
return message;
|
|
176
|
+
},
|
|
177
|
+
toJSON(message) {
|
|
178
|
+
const obj = {};
|
|
179
|
+
message.module !== undefined && (obj.module = message.module);
|
|
180
|
+
return obj;
|
|
181
|
+
},
|
|
182
|
+
fromPartial(object) {
|
|
183
|
+
var _a;
|
|
184
|
+
const message = Object.assign({}, baseMigrateFromInfo);
|
|
185
|
+
message.module = (_a = object.module) !== null && _a !== void 0 ? _a : "";
|
|
186
|
+
return message;
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
190
|
+
minimal_1.default.util.Long = long_1.default;
|
|
191
|
+
minimal_1.default.configure();
|
|
192
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Config } from "./config";
|
|
4
|
+
export declare const protobufPackage = "cosmos.app.v1alpha1";
|
|
5
|
+
/** QueryConfigRequest is the Query/Config request type. */
|
|
6
|
+
export interface QueryConfigRequest {
|
|
7
|
+
}
|
|
8
|
+
/** QueryConfigRequest is the Query/Config response type. */
|
|
9
|
+
export interface QueryConfigResponse {
|
|
10
|
+
/** config is the current app config. */
|
|
11
|
+
config?: Config;
|
|
12
|
+
}
|
|
13
|
+
export declare const QueryConfigRequest: {
|
|
14
|
+
encode(_: QueryConfigRequest, writer?: _m0.Writer): _m0.Writer;
|
|
15
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryConfigRequest;
|
|
16
|
+
fromJSON(_: any): QueryConfigRequest;
|
|
17
|
+
toJSON(_: QueryConfigRequest): unknown;
|
|
18
|
+
fromPartial(_: DeepPartial<QueryConfigRequest>): QueryConfigRequest;
|
|
19
|
+
};
|
|
20
|
+
export declare const QueryConfigResponse: {
|
|
21
|
+
encode(message: QueryConfigResponse, writer?: _m0.Writer): _m0.Writer;
|
|
22
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryConfigResponse;
|
|
23
|
+
fromJSON(object: any): QueryConfigResponse;
|
|
24
|
+
toJSON(message: QueryConfigResponse): unknown;
|
|
25
|
+
fromPartial(object: DeepPartial<QueryConfigResponse>): QueryConfigResponse;
|
|
26
|
+
};
|
|
27
|
+
/** Query is the app module query service. */
|
|
28
|
+
export interface Query {
|
|
29
|
+
/** Config returns the current app config. */
|
|
30
|
+
Config(request: QueryConfigRequest): Promise<QueryConfigResponse>;
|
|
31
|
+
}
|
|
32
|
+
export declare class QueryClientImpl implements Query {
|
|
33
|
+
private readonly rpc;
|
|
34
|
+
constructor(rpc: Rpc);
|
|
35
|
+
Config(request: QueryConfigRequest): Promise<QueryConfigResponse>;
|
|
36
|
+
}
|
|
37
|
+
interface Rpc {
|
|
38
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
39
|
+
}
|
|
40
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
41
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
42
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
43
|
+
} : Partial<T>;
|
|
44
|
+
export {};
|