atlas.js-protos 0.1.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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/filetree/index.d.ts +2 -0
- package/dist/filetree/index.js +8 -0
- package/dist/filetree/index.mjs +3 -0
- package/dist/filetree/query.d.ts +1 -0
- package/dist/filetree/query.js +13 -0
- package/dist/filetree/query.mjs +2 -0
- package/dist/filetree/tx.d.ts +1 -0
- package/dist/filetree/tx.js +11 -0
- package/dist/filetree/tx.mjs +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/dist/index.mjs +1 -0
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/index.js +16 -0
- package/dist/storage/index.mjs +6 -0
- package/dist/storage/query.d.ts +1 -0
- package/dist/storage/query.js +27 -0
- package/dist/storage/query.mjs +2 -0
- package/dist/storage/tx.d.ts +1 -0
- package/dist/storage/tx.js +21 -0
- package/dist/storage/tx.mjs +2 -0
- package/dist/types/amino/amino.d.ts +1 -0
- package/dist/types/amino/amino.js +2 -0
- package/dist/types/amino/amino.mjs +1 -0
- package/dist/types/amino/bundle.d.ts +1 -0
- package/dist/types/amino/bundle.js +41 -0
- package/dist/types/amino/bundle.mjs +5 -0
- package/dist/types/atlas/bundle.d.ts +905 -0
- package/dist/types/atlas/bundle.js +98 -0
- package/dist/types/atlas/bundle.mjs +62 -0
- package/dist/types/atlas/filetree/v1/genesis.d.ts +45 -0
- package/dist/types/atlas/filetree/v1/genesis.js +107 -0
- package/dist/types/atlas/filetree/v1/genesis.mjs +71 -0
- package/dist/types/atlas/filetree/v1/params.d.ts +40 -0
- package/dist/types/atlas/filetree/v1/params.js +94 -0
- package/dist/types/atlas/filetree/v1/params.mjs +58 -0
- package/dist/types/atlas/filetree/v1/query.d.ts +330 -0
- package/dist/types/atlas/filetree/v1/query.js +567 -0
- package/dist/types/atlas/filetree/v1/query.mjs +531 -0
- package/dist/types/atlas/filetree/v1/query.rpc.Query.d.ts +28 -0
- package/dist/types/atlas/filetree/v1/query.rpc.Query.js +89 -0
- package/dist/types/atlas/filetree/v1/query.rpc.Query.mjs +51 -0
- package/dist/types/atlas/filetree/v1/query.rpc.func.d.ts +29 -0
- package/dist/types/atlas/filetree/v1/query.rpc.func.js +58 -0
- package/dist/types/atlas/filetree/v1/query.rpc.func.mjs +55 -0
- package/dist/types/atlas/filetree/v1/tree.d.ts +44 -0
- package/dist/types/atlas/filetree/v1/tree.js +124 -0
- package/dist/types/atlas/filetree/v1/tree.mjs +88 -0
- package/dist/types/atlas/filetree/v1/tx.d.ts +260 -0
- package/dist/types/atlas/filetree/v1/tx.js +449 -0
- package/dist/types/atlas/filetree/v1/tx.mjs +413 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.func.d.ts +23 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.func.js +34 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.func.mjs +31 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.msg.d.ts +22 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.msg.js +67 -0
- package/dist/types/atlas/filetree/v1/tx.rpc.msg.mjs +29 -0
- package/dist/types/atlas/rpc.query.d.ts +49 -0
- package/dist/types/atlas/rpc.query.js +59 -0
- package/dist/types/atlas/rpc.query.mjs +22 -0
- package/dist/types/atlas/rpc.tx.d.ts +18 -0
- package/dist/types/atlas/rpc.tx.js +52 -0
- package/dist/types/atlas/rpc.tx.mjs +15 -0
- package/dist/types/atlas/storage/v1/file.d.ts +59 -0
- package/dist/types/atlas/storage/v1/file.js +173 -0
- package/dist/types/atlas/storage/v1/file.mjs +137 -0
- package/dist/types/atlas/storage/v1/genesis.d.ts +45 -0
- package/dist/types/atlas/storage/v1/genesis.js +107 -0
- package/dist/types/atlas/storage/v1/genesis.mjs +71 -0
- package/dist/types/atlas/storage/v1/params.d.ts +48 -0
- package/dist/types/atlas/storage/v1/params.js +127 -0
- package/dist/types/atlas/storage/v1/params.mjs +91 -0
- package/dist/types/atlas/storage/v1/proof.d.ts +145 -0
- package/dist/types/atlas/storage/v1/proof.js +318 -0
- package/dist/types/atlas/storage/v1/proof.mjs +282 -0
- package/dist/types/atlas/storage/v1/provider.d.ts +51 -0
- package/dist/types/atlas/storage/v1/provider.js +141 -0
- package/dist/types/atlas/storage/v1/provider.mjs +105 -0
- package/dist/types/atlas/storage/v1/query.d.ts +914 -0
- package/dist/types/atlas/storage/v1/query.js +1570 -0
- package/dist/types/atlas/storage/v1/query.mjs +1534 -0
- package/dist/types/atlas/storage/v1/query.rpc.Query.d.ts +56 -0
- package/dist/types/atlas/storage/v1/query.rpc.Query.js +154 -0
- package/dist/types/atlas/storage/v1/query.rpc.Query.mjs +116 -0
- package/dist/types/atlas/storage/v1/query.rpc.func.d.ts +78 -0
- package/dist/types/atlas/storage/v1/query.rpc.func.js +149 -0
- package/dist/types/atlas/storage/v1/query.rpc.func.mjs +146 -0
- package/dist/types/atlas/storage/v1/subscription.d.ts +55 -0
- package/dist/types/atlas/storage/v1/subscription.js +159 -0
- package/dist/types/atlas/storage/v1/subscription.mjs +123 -0
- package/dist/types/atlas/storage/v1/tx.d.ts +694 -0
- package/dist/types/atlas/storage/v1/tx.js +1203 -0
- package/dist/types/atlas/storage/v1/tx.mjs +1167 -0
- package/dist/types/atlas/storage/v1/tx.rpc.func.d.ts +56 -0
- package/dist/types/atlas/storage/v1/tx.rpc.func.js +77 -0
- package/dist/types/atlas/storage/v1/tx.rpc.func.mjs +74 -0
- package/dist/types/atlas/storage/v1/tx.rpc.msg.d.ts +35 -0
- package/dist/types/atlas/storage/v1/tx.rpc.msg.js +97 -0
- package/dist/types/atlas/storage/v1/tx.rpc.msg.mjs +59 -0
- package/dist/types/cosmos/bank/v1beta1/authz.d.ts +62 -0
- package/dist/types/cosmos/bank/v1beta1/authz.js +123 -0
- package/dist/types/cosmos/bank/v1beta1/authz.mjs +87 -0
- package/dist/types/cosmos/bank/v1beta1/bank.d.ts +391 -0
- package/dist/types/cosmos/bank/v1beta1/bank.js +626 -0
- package/dist/types/cosmos/bank/v1beta1/bank.mjs +590 -0
- package/dist/types/cosmos/bank/v1beta1/genesis.d.ts +122 -0
- package/dist/types/cosmos/bank/v1beta1/genesis.js +224 -0
- package/dist/types/cosmos/bank/v1beta1/genesis.mjs +188 -0
- package/dist/types/cosmos/bank/v1beta1/query.d.ts +1377 -0
- package/dist/types/cosmos/bank/v1beta1/query.js +2038 -0
- package/dist/types/cosmos/bank/v1beta1/query.mjs +2002 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.d.ts +119 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.js +174 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.mjs +136 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.func.d.ts +129 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.func.js +212 -0
- package/dist/types/cosmos/bank/v1beta1/query.rpc.func.mjs +209 -0
- package/dist/types/cosmos/bank/v1beta1/tx.d.ts +398 -0
- package/dist/types/cosmos/bank/v1beta1/tx.js +599 -0
- package/dist/types/cosmos/bank/v1beta1/tx.mjs +563 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.d.ts +37 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.js +50 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.mjs +47 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.d.ts +34 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.js +73 -0
- package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.mjs +35 -0
- package/dist/types/cosmos/base/query/v1beta1/pagination.d.ts +163 -0
- package/dist/types/cosmos/base/query/v1beta1/pagination.js +219 -0
- package/dist/types/cosmos/base/query/v1beta1/pagination.mjs +183 -0
- package/dist/types/cosmos/base/v1beta1/coin.d.ts +193 -0
- package/dist/types/cosmos/base/v1beta1/coin.js +320 -0
- package/dist/types/cosmos/base/v1beta1/coin.mjs +284 -0
- package/dist/types/cosmos/bundle.d.ts +761 -0
- package/dist/types/cosmos/bundle.js +97 -0
- package/dist/types/cosmos/bundle.mjs +61 -0
- package/dist/types/cosmos/msg/v1/msg.d.ts +1 -0
- package/dist/types/cosmos/msg/v1/msg.js +2 -0
- package/dist/types/cosmos/msg/v1/msg.mjs +1 -0
- package/dist/types/cosmos/query/v1/query.d.ts +1 -0
- package/dist/types/cosmos/query/v1/query.js +2 -0
- package/dist/types/cosmos/query/v1/query.mjs +1 -0
- package/dist/types/cosmos/rpc.query.d.ts +24 -0
- package/dist/types/cosmos/rpc.query.js +51 -0
- package/dist/types/cosmos/rpc.query.mjs +14 -0
- package/dist/types/cosmos/rpc.tx.d.ts +10 -0
- package/dist/types/cosmos/rpc.tx.js +44 -0
- package/dist/types/cosmos/rpc.tx.mjs +7 -0
- package/dist/types/cosmos_proto/bundle.d.ts +31 -0
- package/dist/types/cosmos_proto/bundle.js +41 -0
- package/dist/types/cosmos_proto/bundle.mjs +5 -0
- package/dist/types/cosmos_proto/cosmos.d.ts +144 -0
- package/dist/types/cosmos_proto/cosmos.js +244 -0
- package/dist/types/cosmos_proto/cosmos.mjs +206 -0
- package/dist/types/extern.d.ts +11 -0
- package/dist/types/extern.js +47 -0
- package/dist/types/extern.mjs +41 -0
- package/dist/types/gogoproto/bundle.d.ts +1 -0
- package/dist/types/gogoproto/bundle.js +41 -0
- package/dist/types/gogoproto/bundle.mjs +5 -0
- package/dist/types/gogoproto/gogo.d.ts +1 -0
- package/dist/types/gogoproto/gogo.js +2 -0
- package/dist/types/gogoproto/gogo.mjs +1 -0
- package/dist/types/google/api/annotations.d.ts +1 -0
- package/dist/types/google/api/annotations.js +2 -0
- package/dist/types/google/api/annotations.mjs +1 -0
- package/dist/types/google/api/http.d.ts +1006 -0
- package/dist/types/google/api/http.js +589 -0
- package/dist/types/google/api/http.mjs +553 -0
- package/dist/types/google/bundle.d.ts +545 -0
- package/dist/types/google/bundle.js +52 -0
- package/dist/types/google/bundle.mjs +16 -0
- package/dist/types/google/protobuf/descriptor.d.ts +2755 -0
- package/dist/types/google/protobuf/descriptor.js +4612 -0
- package/dist/types/google/protobuf/descriptor.mjs +4535 -0
- package/dist/types/google/protobuf/timestamp.d.ts +319 -0
- package/dist/types/google/protobuf/timestamp.js +197 -0
- package/dist/types/google/protobuf/timestamp.mjs +161 -0
- package/dist/types/helper-func-types.d.ts +40 -0
- package/dist/types/helper-func-types.js +57 -0
- package/dist/types/helper-func-types.mjs +53 -0
- package/dist/types/helpers.d.ts +56 -0
- package/dist/types/helpers.js +161 -0
- package/dist/types/helpers.mjs +110 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +32 -0
- package/dist/types/index.mjs +16 -0
- package/dist/types/registry.d.ts +35 -0
- package/dist/types/registry.js +200 -0
- package/dist/types/registry.mjs +163 -0
- package/dist/types/types.d.ts +74 -0
- package/dist/types/types.js +8 -0
- package/dist/types/types.mjs +7 -0
- package/package.json +97 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
3
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
|
+
*/
|
|
6
|
+
import { HttpEndpoint } from "@interchainjs/types";
|
|
7
|
+
import * as _m0 from "protobufjs/minimal";
|
|
8
|
+
import { Rpc } from "./helpers";
|
|
9
|
+
import { TelescopeGeneratedCodec, DeliverTxResponse, StdFee } from "./types";
|
|
10
|
+
import { ISigningClient } from "@interchainjs/cosmos";
|
|
11
|
+
export interface QueryBuilderOptions<TReq, TRes> {
|
|
12
|
+
encode: (request: TReq, writer?: _m0.Writer) => _m0.Writer;
|
|
13
|
+
decode: (input: _m0.Reader | Uint8Array, length?: number) => TRes;
|
|
14
|
+
service: string;
|
|
15
|
+
method: string;
|
|
16
|
+
deps?: TelescopeGeneratedCodec<any, any, any>[];
|
|
17
|
+
}
|
|
18
|
+
export declare function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>): (client: EndpointOrRpc, request: TReq) => Promise<TRes>;
|
|
19
|
+
export interface ITxArgs<TMsg> {
|
|
20
|
+
signerAddress: string;
|
|
21
|
+
message: TMsg | TMsg[];
|
|
22
|
+
fee: StdFee | 'auto';
|
|
23
|
+
memo: string;
|
|
24
|
+
}
|
|
25
|
+
export interface TxBuilderOptions {
|
|
26
|
+
msg: TelescopeGeneratedCodec<any, any, any>;
|
|
27
|
+
}
|
|
28
|
+
export declare function buildTx<TMsg>(opts: TxBuilderOptions): (client: ISigningClient, signerAddress: string, message: TMsg | TMsg[], fee: StdFee | "auto", memo: string) => Promise<DeliverTxResponse>;
|
|
29
|
+
export interface Encoder {
|
|
30
|
+
typeUrl: string;
|
|
31
|
+
fromPartial: (data: any) => any;
|
|
32
|
+
encode: (data: any) => Uint8Array;
|
|
33
|
+
}
|
|
34
|
+
export interface AminoConverter {
|
|
35
|
+
typeUrl: string;
|
|
36
|
+
aminoType: string;
|
|
37
|
+
fromAmino: (data: any) => any;
|
|
38
|
+
toAmino: (data: any) => any;
|
|
39
|
+
}
|
|
40
|
+
export type EndpointOrRpc = string | HttpEndpoint | Rpc;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//@ts-nocheck
|
|
3
|
+
/**
|
|
4
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
5
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
6
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.buildQuery = buildQuery;
|
|
10
|
+
exports.buildTx = buildTx;
|
|
11
|
+
const extern_1 = require("./extern");
|
|
12
|
+
const helpers_1 = require("./helpers");
|
|
13
|
+
const cosmos_1 = require("@interchainjs/cosmos");
|
|
14
|
+
function buildQuery(opts) {
|
|
15
|
+
registerDependencies(opts.deps ?? []);
|
|
16
|
+
return async (client, request) => {
|
|
17
|
+
let rpc;
|
|
18
|
+
if ((0, helpers_1.isRpc)(client)) {
|
|
19
|
+
rpc = client;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
rpc = client ? await (0, extern_1.getRpcClient)(client) : undefined;
|
|
23
|
+
}
|
|
24
|
+
if (!rpc)
|
|
25
|
+
throw new Error("Query Rpc is not initialized");
|
|
26
|
+
const data = opts.encode(request).finish();
|
|
27
|
+
const response = await rpc.request(opts.service, opts.method, data);
|
|
28
|
+
return opts.decode(response);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function buildTx(opts) {
|
|
32
|
+
if (opts.msg) {
|
|
33
|
+
registerDependencies([opts.msg]);
|
|
34
|
+
}
|
|
35
|
+
return async (client, signerAddress, message, fee, memo) => {
|
|
36
|
+
if (!client)
|
|
37
|
+
throw new Error("SigningClient is not initialized");
|
|
38
|
+
//register all related encoders and converters
|
|
39
|
+
client.addEncoders?.((0, cosmos_1.toEncoders)(opts.msg));
|
|
40
|
+
client.addConverters?.((0, cosmos_1.toConverters)(opts.msg));
|
|
41
|
+
const data = Array.isArray(message)
|
|
42
|
+
? message.map(msg => ({
|
|
43
|
+
typeUrl: opts.msg.typeUrl,
|
|
44
|
+
value: msg,
|
|
45
|
+
}))
|
|
46
|
+
: [{
|
|
47
|
+
typeUrl: opts.msg.typeUrl,
|
|
48
|
+
value: message,
|
|
49
|
+
}];
|
|
50
|
+
return client.signAndBroadcast(signerAddress, data, fee, memo);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function registerDependencies(deps) {
|
|
54
|
+
for (const dep of deps) {
|
|
55
|
+
dep.registerTypeUrl?.();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
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 { getRpcClient } from "./extern";
|
|
8
|
+
import { isRpc } from "./helpers";
|
|
9
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
10
|
+
export function buildQuery(opts) {
|
|
11
|
+
registerDependencies(opts.deps ?? []);
|
|
12
|
+
return async (client, request) => {
|
|
13
|
+
let rpc;
|
|
14
|
+
if (isRpc(client)) {
|
|
15
|
+
rpc = client;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
rpc = client ? await getRpcClient(client) : undefined;
|
|
19
|
+
}
|
|
20
|
+
if (!rpc)
|
|
21
|
+
throw new Error("Query Rpc is not initialized");
|
|
22
|
+
const data = opts.encode(request).finish();
|
|
23
|
+
const response = await rpc.request(opts.service, opts.method, data);
|
|
24
|
+
return opts.decode(response);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export function buildTx(opts) {
|
|
28
|
+
if (opts.msg) {
|
|
29
|
+
registerDependencies([opts.msg]);
|
|
30
|
+
}
|
|
31
|
+
return async (client, signerAddress, message, fee, memo) => {
|
|
32
|
+
if (!client)
|
|
33
|
+
throw new Error("SigningClient is not initialized");
|
|
34
|
+
//register all related encoders and converters
|
|
35
|
+
client.addEncoders?.(toEncoders(opts.msg));
|
|
36
|
+
client.addConverters?.(toConverters(opts.msg));
|
|
37
|
+
const data = Array.isArray(message)
|
|
38
|
+
? message.map(msg => ({
|
|
39
|
+
typeUrl: opts.msg.typeUrl,
|
|
40
|
+
value: msg,
|
|
41
|
+
}))
|
|
42
|
+
: [{
|
|
43
|
+
typeUrl: opts.msg.typeUrl,
|
|
44
|
+
value: message,
|
|
45
|
+
}];
|
|
46
|
+
return client.signAndBroadcast(signerAddress, data, fee, memo);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function registerDependencies(deps) {
|
|
50
|
+
for (const dep of deps) {
|
|
51
|
+
dep.registerTypeUrl?.();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
3
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
|
+
*/
|
|
6
|
+
export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from '@interchainjs/encoding';
|
|
7
|
+
export interface AminoHeight {
|
|
8
|
+
readonly revision_number?: string;
|
|
9
|
+
readonly revision_height?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function omitDefault<T extends string | number | boolean>(input: T): T | undefined;
|
|
12
|
+
interface Duration {
|
|
13
|
+
seconds: number;
|
|
14
|
+
nanos: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function toDuration(duration: string): Duration;
|
|
17
|
+
export declare function fromDuration(duration: Duration): string;
|
|
18
|
+
export declare function isSet(value: any): boolean;
|
|
19
|
+
export declare function isObject(value: any): boolean;
|
|
20
|
+
export interface PageRequest {
|
|
21
|
+
key: Uint8Array;
|
|
22
|
+
offset: number;
|
|
23
|
+
limit: number;
|
|
24
|
+
countTotal: boolean;
|
|
25
|
+
reverse: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface PageRequestParams {
|
|
28
|
+
"pagination.key"?: string;
|
|
29
|
+
"pagination.offset"?: string;
|
|
30
|
+
"pagination.limit"?: string;
|
|
31
|
+
"pagination.count_total"?: boolean;
|
|
32
|
+
"pagination.reverse"?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface Params {
|
|
35
|
+
params: PageRequestParams;
|
|
36
|
+
}
|
|
37
|
+
export declare const setPaginationParams: (options: Params, pagination?: PageRequest) => Params;
|
|
38
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
39
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
40
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
41
|
+
} : Partial<T>;
|
|
42
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
43
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
44
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
45
|
+
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
|
|
46
|
+
export interface Rpc {
|
|
47
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
48
|
+
}
|
|
49
|
+
export declare function isRpc(rpc: unknown): rpc is Rpc;
|
|
50
|
+
interface Timestamp {
|
|
51
|
+
seconds: number;
|
|
52
|
+
nanos: number;
|
|
53
|
+
}
|
|
54
|
+
export declare function toTimestamp(date: Date): Timestamp;
|
|
55
|
+
export declare function fromTimestamp(t: Timestamp): Date;
|
|
56
|
+
export declare function fromJsonTimestamp(o: any): Timestamp;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//@ts-nocheck
|
|
3
|
+
/**
|
|
4
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
5
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
6
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.setPaginationParams = exports.base64FromBytes = exports.bytesFromBase64 = void 0;
|
|
46
|
+
exports.omitDefault = omitDefault;
|
|
47
|
+
exports.toDuration = toDuration;
|
|
48
|
+
exports.fromDuration = fromDuration;
|
|
49
|
+
exports.isSet = isSet;
|
|
50
|
+
exports.isObject = isObject;
|
|
51
|
+
exports.isRpc = isRpc;
|
|
52
|
+
exports.toTimestamp = toTimestamp;
|
|
53
|
+
exports.fromTimestamp = fromTimestamp;
|
|
54
|
+
exports.fromJsonTimestamp = fromJsonTimestamp;
|
|
55
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
56
|
+
const long_1 = __importDefault(require("long"));
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
if (_m0.util.Long !== long_1.default) {
|
|
59
|
+
_m0.util.Long = long_1.default;
|
|
60
|
+
_m0.configure();
|
|
61
|
+
}
|
|
62
|
+
var encoding_1 = require("@interchainjs/encoding");
|
|
63
|
+
Object.defineProperty(exports, "bytesFromBase64", { enumerable: true, get: function () { return encoding_1.fromBase64; } });
|
|
64
|
+
Object.defineProperty(exports, "base64FromBytes", { enumerable: true, get: function () { return encoding_1.toBase64; } });
|
|
65
|
+
;
|
|
66
|
+
function omitDefault(input) {
|
|
67
|
+
if (typeof input === "string") {
|
|
68
|
+
return input === "" ? undefined : input;
|
|
69
|
+
}
|
|
70
|
+
if (typeof input === "number") {
|
|
71
|
+
return input === 0 ? undefined : input;
|
|
72
|
+
}
|
|
73
|
+
if (typeof input === "boolean") {
|
|
74
|
+
return input === false ? undefined : input;
|
|
75
|
+
}
|
|
76
|
+
throw new Error(`Got unsupported type ${typeof input}`);
|
|
77
|
+
}
|
|
78
|
+
;
|
|
79
|
+
function toDuration(duration) {
|
|
80
|
+
return {
|
|
81
|
+
seconds: Math.floor(parseInt(duration) / 1000000000),
|
|
82
|
+
nanos: parseInt(duration) % 1000000000
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
;
|
|
86
|
+
function fromDuration(duration) {
|
|
87
|
+
return (duration.seconds * 1000000000 + duration.nanos).toString();
|
|
88
|
+
}
|
|
89
|
+
;
|
|
90
|
+
function isSet(value) {
|
|
91
|
+
return value !== null && value !== undefined;
|
|
92
|
+
}
|
|
93
|
+
;
|
|
94
|
+
function isObject(value) {
|
|
95
|
+
return typeof value === 'object' && value !== null;
|
|
96
|
+
}
|
|
97
|
+
;
|
|
98
|
+
;
|
|
99
|
+
;
|
|
100
|
+
;
|
|
101
|
+
const setPaginationParams = (options, pagination) => {
|
|
102
|
+
if (!pagination) {
|
|
103
|
+
return options;
|
|
104
|
+
}
|
|
105
|
+
if (typeof pagination?.countTotal !== "undefined") {
|
|
106
|
+
options.params['pagination.count_total'] = pagination.countTotal;
|
|
107
|
+
}
|
|
108
|
+
if (typeof pagination?.key !== "undefined") {
|
|
109
|
+
options.params['pagination.key'] = Buffer.from(pagination.key).toString('base64');
|
|
110
|
+
}
|
|
111
|
+
if (typeof pagination?.limit !== "undefined") {
|
|
112
|
+
options.params["pagination.limit"] = pagination.limit.toString();
|
|
113
|
+
}
|
|
114
|
+
if (typeof pagination?.offset !== "undefined") {
|
|
115
|
+
options.params["pagination.offset"] = pagination.offset.toString();
|
|
116
|
+
}
|
|
117
|
+
if (typeof pagination?.reverse !== "undefined") {
|
|
118
|
+
options.params['pagination.reverse'] = pagination.reverse;
|
|
119
|
+
}
|
|
120
|
+
return options;
|
|
121
|
+
};
|
|
122
|
+
exports.setPaginationParams = setPaginationParams;
|
|
123
|
+
;
|
|
124
|
+
function isRpc(rpc) {
|
|
125
|
+
return rpc !== null && rpc !== undefined && typeof rpc.request === 'function';
|
|
126
|
+
}
|
|
127
|
+
function toTimestamp(date) {
|
|
128
|
+
const seconds = numberToLong(date.getTime() / 1_000);
|
|
129
|
+
const nanos = date.getTime() % 1000 * 1000000;
|
|
130
|
+
return {
|
|
131
|
+
seconds,
|
|
132
|
+
nanos
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
;
|
|
136
|
+
function fromTimestamp(t) {
|
|
137
|
+
let millis = t.seconds * 1000;
|
|
138
|
+
millis += t.nanos / 1000000;
|
|
139
|
+
return new Date(millis);
|
|
140
|
+
}
|
|
141
|
+
;
|
|
142
|
+
const timestampFromJSON = (object) => {
|
|
143
|
+
return {
|
|
144
|
+
seconds: isSet(object.seconds) ? Number(object.seconds) : 0,
|
|
145
|
+
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
function fromJsonTimestamp(o) {
|
|
149
|
+
if (o instanceof Date) {
|
|
150
|
+
return toTimestamp(o);
|
|
151
|
+
}
|
|
152
|
+
else if (typeof o === "string") {
|
|
153
|
+
return toTimestamp(new Date(o));
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
return timestampFromJSON(o);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function numberToLong(number) {
|
|
160
|
+
return Math.trunc(number);
|
|
161
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
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 * as _m0 from "protobufjs/minimal";
|
|
8
|
+
import Long from 'long';
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
if (_m0.util.Long !== Long) {
|
|
11
|
+
_m0.util.Long = Long;
|
|
12
|
+
_m0.configure();
|
|
13
|
+
}
|
|
14
|
+
export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from '@interchainjs/encoding';
|
|
15
|
+
;
|
|
16
|
+
export function omitDefault(input) {
|
|
17
|
+
if (typeof input === "string") {
|
|
18
|
+
return input === "" ? undefined : input;
|
|
19
|
+
}
|
|
20
|
+
if (typeof input === "number") {
|
|
21
|
+
return input === 0 ? undefined : input;
|
|
22
|
+
}
|
|
23
|
+
if (typeof input === "boolean") {
|
|
24
|
+
return input === false ? undefined : input;
|
|
25
|
+
}
|
|
26
|
+
throw new Error(`Got unsupported type ${typeof input}`);
|
|
27
|
+
}
|
|
28
|
+
;
|
|
29
|
+
export function toDuration(duration) {
|
|
30
|
+
return {
|
|
31
|
+
seconds: Math.floor(parseInt(duration) / 1000000000),
|
|
32
|
+
nanos: parseInt(duration) % 1000000000
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
export function fromDuration(duration) {
|
|
37
|
+
return (duration.seconds * 1000000000 + duration.nanos).toString();
|
|
38
|
+
}
|
|
39
|
+
;
|
|
40
|
+
export function isSet(value) {
|
|
41
|
+
return value !== null && value !== undefined;
|
|
42
|
+
}
|
|
43
|
+
;
|
|
44
|
+
export function isObject(value) {
|
|
45
|
+
return typeof value === 'object' && value !== null;
|
|
46
|
+
}
|
|
47
|
+
;
|
|
48
|
+
;
|
|
49
|
+
;
|
|
50
|
+
;
|
|
51
|
+
export const setPaginationParams = (options, pagination) => {
|
|
52
|
+
if (!pagination) {
|
|
53
|
+
return options;
|
|
54
|
+
}
|
|
55
|
+
if (typeof pagination?.countTotal !== "undefined") {
|
|
56
|
+
options.params['pagination.count_total'] = pagination.countTotal;
|
|
57
|
+
}
|
|
58
|
+
if (typeof pagination?.key !== "undefined") {
|
|
59
|
+
options.params['pagination.key'] = Buffer.from(pagination.key).toString('base64');
|
|
60
|
+
}
|
|
61
|
+
if (typeof pagination?.limit !== "undefined") {
|
|
62
|
+
options.params["pagination.limit"] = pagination.limit.toString();
|
|
63
|
+
}
|
|
64
|
+
if (typeof pagination?.offset !== "undefined") {
|
|
65
|
+
options.params["pagination.offset"] = pagination.offset.toString();
|
|
66
|
+
}
|
|
67
|
+
if (typeof pagination?.reverse !== "undefined") {
|
|
68
|
+
options.params['pagination.reverse'] = pagination.reverse;
|
|
69
|
+
}
|
|
70
|
+
return options;
|
|
71
|
+
};
|
|
72
|
+
;
|
|
73
|
+
export function isRpc(rpc) {
|
|
74
|
+
return rpc !== null && rpc !== undefined && typeof rpc.request === 'function';
|
|
75
|
+
}
|
|
76
|
+
export function toTimestamp(date) {
|
|
77
|
+
const seconds = numberToLong(date.getTime() / 1_000);
|
|
78
|
+
const nanos = date.getTime() % 1000 * 1000000;
|
|
79
|
+
return {
|
|
80
|
+
seconds,
|
|
81
|
+
nanos
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
;
|
|
85
|
+
export function fromTimestamp(t) {
|
|
86
|
+
let millis = t.seconds * 1000;
|
|
87
|
+
millis += t.nanos / 1000000;
|
|
88
|
+
return new Date(millis);
|
|
89
|
+
}
|
|
90
|
+
;
|
|
91
|
+
const timestampFromJSON = (object) => {
|
|
92
|
+
return {
|
|
93
|
+
seconds: isSet(object.seconds) ? Number(object.seconds) : 0,
|
|
94
|
+
nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export function fromJsonTimestamp(o) {
|
|
98
|
+
if (o instanceof Date) {
|
|
99
|
+
return toTimestamp(o);
|
|
100
|
+
}
|
|
101
|
+
else if (typeof o === "string") {
|
|
102
|
+
return toTimestamp(new Date(o));
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
return timestampFromJSON(o);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function numberToLong(number) {
|
|
109
|
+
return Math.trunc(number);
|
|
110
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
3
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./amino/bundle";
|
|
7
|
+
export * from "./atlas/bundle";
|
|
8
|
+
export * from "./cosmos_proto/bundle";
|
|
9
|
+
export * from "./cosmos/bundle";
|
|
10
|
+
export * from "./gogoproto/bundle";
|
|
11
|
+
export * from "./google/bundle";
|
|
12
|
+
export * from "./extern";
|
|
13
|
+
export * from "./helper-func-types";
|
|
14
|
+
export * from "./types";
|
|
15
|
+
export * from "./registry";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//@ts-nocheck
|
|
3
|
+
/**
|
|
4
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
5
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
6
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./amino/bundle"), exports);
|
|
24
|
+
__exportStar(require("./atlas/bundle"), exports);
|
|
25
|
+
__exportStar(require("./cosmos_proto/bundle"), exports);
|
|
26
|
+
__exportStar(require("./cosmos/bundle"), exports);
|
|
27
|
+
__exportStar(require("./gogoproto/bundle"), exports);
|
|
28
|
+
__exportStar(require("./google/bundle"), exports);
|
|
29
|
+
__exportStar(require("./extern"), exports);
|
|
30
|
+
__exportStar(require("./helper-func-types"), exports);
|
|
31
|
+
__exportStar(require("./types"), exports);
|
|
32
|
+
__exportStar(require("./registry"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
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
|
+
export * from "./amino/bundle";
|
|
8
|
+
export * from "./atlas/bundle";
|
|
9
|
+
export * from "./cosmos_proto/bundle";
|
|
10
|
+
export * from "./cosmos/bundle";
|
|
11
|
+
export * from "./gogoproto/bundle";
|
|
12
|
+
export * from "./google/bundle";
|
|
13
|
+
export * from "./extern";
|
|
14
|
+
export * from "./helper-func-types";
|
|
15
|
+
export * from "./types";
|
|
16
|
+
export * from "./registry";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file and any referenced files were automatically generated by @ahm23/telescope@2.3.1
|
|
3
|
+
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
|
|
4
|
+
* and run the transpile command or npm scripts command that is used to regenerate this bundle.
|
|
5
|
+
*/
|
|
6
|
+
import * as _m0 from "protobufjs/minimal";
|
|
7
|
+
import { Any, AnyAmino } from "cosmjs-types/google/protobuf/any";
|
|
8
|
+
import { TelescopeGeneratedCodec } from "./types";
|
|
9
|
+
export declare class GlobalDecoderRegistry {
|
|
10
|
+
static registry: {
|
|
11
|
+
[key: string]: TelescopeGeneratedCodec<any, any, any>;
|
|
12
|
+
};
|
|
13
|
+
static aminoProtoMapping: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
static existingTypeUrls: string[];
|
|
17
|
+
static registerExistingTypeUrl(typeUrl: string): boolean;
|
|
18
|
+
static registerAminoProtoMapping(aminoType: string, typeUrl: string): void;
|
|
19
|
+
static register<T, SDK, Amino>(key: string, decoder: TelescopeGeneratedCodec<T, SDK, Amino>): void;
|
|
20
|
+
static getDecoder<T, SDK, Amino>(key: string): TelescopeGeneratedCodec<T, SDK, Amino>;
|
|
21
|
+
static getDecoderByInstance<T, SDK, Amino>(obj: unknown): TelescopeGeneratedCodec<T, SDK, Amino> | null;
|
|
22
|
+
static getDecoderByAminoType<T, SDK, Amino>(type: string): TelescopeGeneratedCodec<T, SDK, Amino> | null;
|
|
23
|
+
static wrapAny(obj: unknown): Any;
|
|
24
|
+
static unwrapAny<T, SDK, Amino>(input: _m0.Reader | Uint8Array | Any): any;
|
|
25
|
+
static fromJSON<T>(object: any): T;
|
|
26
|
+
static toJSON<T>(message: T): any;
|
|
27
|
+
static fromPartial<T>(object: unknown): T;
|
|
28
|
+
static fromSDK<T = unknown, SDK = unknown>(object: SDK): T;
|
|
29
|
+
static fromSDKJSON<SDK = unknown>(object: any): SDK;
|
|
30
|
+
static toSDK<T = unknown, SDK = unknown>(object: T): SDK;
|
|
31
|
+
static fromAmino<T = unknown, Amino = unknown>(object: Amino): T;
|
|
32
|
+
static fromAminoMsg<T = unknown, Amino = unknown>(object: AnyAmino): T;
|
|
33
|
+
static toAmino<T = unknown, Amino = unknown>(object: T): Amino;
|
|
34
|
+
static toAminoMsg<T = unknown, Amino = unknown>(object: T): AnyAmino;
|
|
35
|
+
}
|