@injectivelabs/sdk-ts 1.12.0-beta.69 → 1.12.0-beta.70
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/cjs/client/chain/grpc/ChainGrpcAuthApi.d.ts +3 -3
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthZApi.d.ts +42 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthZApi.d.ts.map +1 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthZApi.js +129 -0
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthZApi.js.map +1 -0
- package/dist/cjs/client/chain/grpc/index.d.ts +1 -0
- package/dist/cjs/client/chain/grpc/index.d.ts.map +1 -1
- package/dist/cjs/client/chain/grpc/index.js +3 -1
- package/dist/cjs/client/chain/grpc/index.js.map +1 -1
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthZTransformer.d.ts +42 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthZTransformer.d.ts.map +1 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthZTransformer.js +54 -0
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthZTransformer.js.map +1 -0
- package/dist/cjs/client/chain/transformers/index.d.ts +2 -0
- package/dist/cjs/client/chain/transformers/index.d.ts.map +1 -1
- package/dist/cjs/client/chain/transformers/index.js +2 -0
- package/dist/cjs/client/chain/transformers/index.js.map +1 -1
- package/dist/cjs/client/chain/types/auth.d.ts +2 -2
- package/dist/cjs/client/chain/types/auth.d.ts.map +1 -1
- package/dist/cjs/client/chain/types/authZ.d.ts +14 -0
- package/dist/cjs/client/chain/types/authZ.d.ts.map +1 -0
- package/dist/cjs/client/chain/types/authZ.js +3 -0
- package/dist/cjs/client/chain/types/authZ.js.map +1 -0
- package/dist/cjs/client/chain/types/index.d.ts +2 -0
- package/dist/cjs/client/chain/types/index.d.ts.map +1 -1
- package/dist/cjs/client/chain/types/index.js +2 -0
- package/dist/cjs/client/chain/types/index.js.map +1 -1
- package/dist/cjs/client/indexer/grpc/IndexerGrpcTradingApi.d.ts +6 -1
- package/dist/cjs/client/indexer/grpc/IndexerGrpcTradingApi.d.ts.map +1 -1
- package/dist/cjs/client/indexer/grpc/IndexerGrpcTradingApi.js +13 -1
- package/dist/cjs/client/indexer/grpc/IndexerGrpcTradingApi.js.map +1 -1
- package/dist/cjs/client/indexer/grpc/index.d.ts +1 -0
- package/dist/cjs/client/indexer/grpc/index.d.ts.map +1 -1
- package/dist/cjs/client/indexer/grpc/index.js +3 -1
- package/dist/cjs/client/indexer/grpc/index.js.map +1 -1
- package/dist/cjs/core/modules/authz/msgs/MsgGrant.d.ts +7 -2
- package/dist/cjs/core/modules/authz/msgs/MsgGrant.d.ts.map +1 -1
- package/dist/cjs/core/modules/authz/msgs/MsgGrant.js +15 -3
- package/dist/cjs/core/modules/authz/msgs/MsgGrant.js.map +1 -1
- package/dist/cjs/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.d.ts +30 -0
- package/dist/cjs/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.d.ts.map +1 -0
- package/dist/cjs/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.js +28 -0
- package/dist/cjs/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.js.map +1 -0
- package/dist/cjs/core/modules/wasm/exec-args.d.ts +2 -1
- package/dist/cjs/core/modules/wasm/exec-args.d.ts.map +1 -1
- package/dist/cjs/core/modules/wasm/index.d.ts +2 -1
- package/dist/cjs/core/modules/wasm/index.d.ts.map +1 -1
- package/dist/cjs/core/modules/wasm/index.js +3 -1
- package/dist/cjs/core/modules/wasm/index.js.map +1 -1
- package/dist/esm/client/chain/grpc/ChainGrpcAuthApi.d.ts +3 -3
- package/dist/esm/client/chain/grpc/ChainGrpcAuthZApi.d.ts +42 -0
- package/dist/esm/client/chain/grpc/ChainGrpcAuthZApi.d.ts.map +1 -0
- package/dist/esm/client/chain/grpc/ChainGrpcAuthZApi.js +108 -0
- package/dist/esm/client/chain/grpc/ChainGrpcAuthZApi.js.map +1 -0
- package/dist/esm/client/chain/grpc/index.d.ts +1 -0
- package/dist/esm/client/chain/grpc/index.d.ts.map +1 -1
- package/dist/esm/client/chain/grpc/index.js +1 -0
- package/dist/esm/client/chain/grpc/index.js.map +1 -1
- package/dist/esm/client/chain/transformers/ChainGrpcAuthZTransformer.d.ts +42 -0
- package/dist/esm/client/chain/transformers/ChainGrpcAuthZTransformer.d.ts.map +1 -0
- package/dist/esm/client/chain/transformers/ChainGrpcAuthZTransformer.js +50 -0
- package/dist/esm/client/chain/transformers/ChainGrpcAuthZTransformer.js.map +1 -0
- package/dist/esm/client/chain/transformers/index.d.ts +2 -0
- package/dist/esm/client/chain/transformers/index.d.ts.map +1 -1
- package/dist/esm/client/chain/transformers/index.js +2 -0
- package/dist/esm/client/chain/transformers/index.js.map +1 -1
- package/dist/esm/client/chain/types/auth.d.ts +2 -2
- package/dist/esm/client/chain/types/auth.d.ts.map +1 -1
- package/dist/esm/client/chain/types/authZ.d.ts +14 -0
- package/dist/esm/client/chain/types/authZ.d.ts.map +1 -0
- package/dist/esm/client/chain/types/authZ.js +2 -0
- package/dist/esm/client/chain/types/authZ.js.map +1 -0
- package/dist/esm/client/chain/types/index.d.ts +2 -0
- package/dist/esm/client/chain/types/index.d.ts.map +1 -1
- package/dist/esm/client/chain/types/index.js +2 -0
- package/dist/esm/client/chain/types/index.js.map +1 -1
- package/dist/esm/client/indexer/grpc/IndexerGrpcTradingApi.d.ts +6 -1
- package/dist/esm/client/indexer/grpc/IndexerGrpcTradingApi.d.ts.map +1 -1
- package/dist/esm/client/indexer/grpc/IndexerGrpcTradingApi.js +13 -1
- package/dist/esm/client/indexer/grpc/IndexerGrpcTradingApi.js.map +1 -1
- package/dist/esm/client/indexer/grpc/index.d.ts +1 -0
- package/dist/esm/client/indexer/grpc/index.d.ts.map +1 -1
- package/dist/esm/client/indexer/grpc/index.js +1 -0
- package/dist/esm/client/indexer/grpc/index.js.map +1 -1
- package/dist/esm/core/modules/authz/msgs/MsgGrant.d.ts +7 -2
- package/dist/esm/core/modules/authz/msgs/MsgGrant.d.ts.map +1 -1
- package/dist/esm/core/modules/authz/msgs/MsgGrant.js +15 -3
- package/dist/esm/core/modules/authz/msgs/MsgGrant.js.map +1 -1
- package/dist/esm/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.d.ts +30 -0
- package/dist/esm/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.d.ts.map +1 -0
- package/dist/esm/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.js +25 -0
- package/dist/esm/core/modules/wasm/exec-args/ExecArgCreateSpotGridStrategy.js.map +1 -0
- package/dist/esm/core/modules/wasm/exec-args.d.ts +2 -1
- package/dist/esm/core/modules/wasm/exec-args.d.ts.map +1 -1
- package/dist/esm/core/modules/wasm/index.d.ts +2 -1
- package/dist/esm/core/modules/wasm/index.d.ts.map +1 -1
- package/dist/esm/core/modules/wasm/index.js +2 -1
- package/dist/esm/core/modules/wasm/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthzApi.d.ts +0 -19
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthzApi.d.ts.map +0 -1
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthzApi.js +0 -60
- package/dist/cjs/client/chain/grpc/ChainGrpcAuthzApi.js.map +0 -1
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthzTransformer.d.ts +0 -18
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthzTransformer.d.ts.map +0 -1
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthzTransformer.js +0 -25
- package/dist/cjs/client/chain/transformers/ChainGrpcAuthzTransformer.js.map +0 -1
- package/dist/esm/client/chain/grpc/ChainGrpcAuthzApi.d.ts +0 -19
- package/dist/esm/client/chain/grpc/ChainGrpcAuthzApi.d.ts.map +0 -1
- package/dist/esm/client/chain/grpc/ChainGrpcAuthzApi.js +0 -43
- package/dist/esm/client/chain/grpc/ChainGrpcAuthzApi.js.map +0 -1
- package/dist/esm/client/chain/transformers/ChainGrpcAuthzTransformer.d.ts +0 -18
- package/dist/esm/client/chain/transformers/ChainGrpcAuthzTransformer.d.ts.map +0 -1
- package/dist/esm/client/chain/transformers/ChainGrpcAuthzTransformer.js +0 -21
- package/dist/esm/client/chain/transformers/ChainGrpcAuthzTransformer.js.map +0 -1
|
@@ -8,11 +8,11 @@ export declare class ChainGrpcAuthApi extends BaseGrpcConsumer {
|
|
|
8
8
|
protected module: string;
|
|
9
9
|
protected client: CosmosAuthV1Beta1Query.QueryClientImpl;
|
|
10
10
|
constructor(endpoint: string);
|
|
11
|
-
fetchModuleParams(): Promise<import("../types
|
|
12
|
-
fetchAccount(address: string): Promise<import("../types
|
|
11
|
+
fetchModuleParams(): Promise<import("../types").AuthModuleParams>;
|
|
12
|
+
fetchAccount(address: string): Promise<import("../types").Account>;
|
|
13
13
|
fetchAccounts(pagination?: PaginationOption): Promise<{
|
|
14
14
|
pagination: import("../../../types/pagination").Pagination;
|
|
15
|
-
accounts: import("../types
|
|
15
|
+
accounts: import("../types").Account[];
|
|
16
16
|
}>;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=ChainGrpcAuthApi.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CosmosAuthzV1Beta1Query } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
import BaseGrpcConsumer from '../../BaseGrpcConsumer';
|
|
3
|
+
import { PaginationOption } from '../../../types/pagination';
|
|
4
|
+
/**
|
|
5
|
+
* @category Chain Grpc API
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChainGrpcAuthZApi extends BaseGrpcConsumer {
|
|
8
|
+
protected module: string;
|
|
9
|
+
protected client: CosmosAuthzV1Beta1Query.QueryClientImpl;
|
|
10
|
+
constructor(endpoint: string);
|
|
11
|
+
fetchGrants({ pagination, granter, grantee, msgTypeUrl, }: {
|
|
12
|
+
pagination?: PaginationOption;
|
|
13
|
+
granter: string;
|
|
14
|
+
grantee: string;
|
|
15
|
+
msgTypeUrl?: string;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
pagination: import("../../../types/pagination").Pagination;
|
|
18
|
+
grants: {
|
|
19
|
+
authorization: string;
|
|
20
|
+
expiration: Date | undefined;
|
|
21
|
+
}[];
|
|
22
|
+
}>;
|
|
23
|
+
fetchGranterGrants(granter: string, pagination?: PaginationOption): Promise<{
|
|
24
|
+
pagination: import("../../../types/pagination").Pagination;
|
|
25
|
+
grants: {
|
|
26
|
+
granter: string;
|
|
27
|
+
grantee: string;
|
|
28
|
+
authorization: string;
|
|
29
|
+
expiration: Date | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
}>;
|
|
32
|
+
fetchGranteeGrants(grantee: string, pagination?: PaginationOption): Promise<{
|
|
33
|
+
pagination: import("../../../types/pagination").Pagination;
|
|
34
|
+
grants: {
|
|
35
|
+
granter: string;
|
|
36
|
+
grantee: string;
|
|
37
|
+
authorization: string;
|
|
38
|
+
expiration: Date | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ChainGrpcAuthZApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainGrpcAuthZApi.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/grpc/ChainGrpcAuthZApi.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,gBAAgB,MAAM,wBAAwB,CAAA;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAI5D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAoB;IAE5C,SAAS,CAAC,MAAM,EAAE,uBAAuB,CAAC,eAAe,CAAA;gBAE7C,QAAQ,EAAE,MAAM;IAQtB,WAAW,CAAC,EAChB,UAAU,EACV,OAAO,EACP,OAAO,EACP,UAAU,GACX,EAAE;QACD,UAAU,CAAC,EAAE,gBAAgB,CAAA;QAC7B,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB;;;;;;;IA6CK,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,gBAAgB;;;;;;;;;IAuCjE,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,gBAAgB;;;;;;;;;CAsCxE"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ChainGrpcAuthZApi = void 0;
|
|
16
|
+
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
17
|
+
const core_proto_ts_1 = require("@injectivelabs/core-proto-ts");
|
|
18
|
+
const BaseGrpcConsumer_1 = __importDefault(require("../../BaseGrpcConsumer"));
|
|
19
|
+
const types_1 = require("../types");
|
|
20
|
+
const pagination_1 = require("../../../utils/pagination");
|
|
21
|
+
const ChainGrpcAuthZTransformer_1 = require("../transformers/ChainGrpcAuthZTransformer");
|
|
22
|
+
/**
|
|
23
|
+
* @category Chain Grpc API
|
|
24
|
+
*/
|
|
25
|
+
class ChainGrpcAuthZApi extends BaseGrpcConsumer_1.default {
|
|
26
|
+
constructor(endpoint) {
|
|
27
|
+
super(endpoint);
|
|
28
|
+
this.module = types_1.ChainModule.Authz;
|
|
29
|
+
this.client = new core_proto_ts_1.CosmosAuthzV1Beta1Query.QueryClientImpl(this.getGrpcWebImpl(endpoint));
|
|
30
|
+
}
|
|
31
|
+
fetchGrants({ pagination, granter, grantee, msgTypeUrl, }) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const request = core_proto_ts_1.CosmosAuthzV1Beta1Query.QueryGrantsRequest.create();
|
|
34
|
+
if (granter) {
|
|
35
|
+
request.granter = granter;
|
|
36
|
+
}
|
|
37
|
+
if (grantee) {
|
|
38
|
+
request.grantee = grantee;
|
|
39
|
+
}
|
|
40
|
+
if (msgTypeUrl) {
|
|
41
|
+
request.msgTypeUrl = msgTypeUrl;
|
|
42
|
+
}
|
|
43
|
+
const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
|
|
44
|
+
if (paginationForRequest) {
|
|
45
|
+
request.pagination = paginationForRequest;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const response = yield this.retry(() => this.client.Grants(request));
|
|
49
|
+
return ChainGrpcAuthZTransformer_1.ChainGrpcAuthZTransformer.grpcGrantsToGrants(response);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
if (e instanceof core_proto_ts_1.CosmosAuthzV1Beta1Query.GrpcWebError) {
|
|
53
|
+
throw new exceptions_1.GrpcUnaryRequestException(new Error(e.toString()), {
|
|
54
|
+
code: e.code,
|
|
55
|
+
context: 'Grants',
|
|
56
|
+
contextModule: this.module,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
60
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
61
|
+
context: 'Grants',
|
|
62
|
+
contextModule: this.module,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
fetchGranterGrants(granter, pagination) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const request = core_proto_ts_1.CosmosAuthzV1Beta1Query.QueryGranterGrantsRequest.create();
|
|
70
|
+
if (granter) {
|
|
71
|
+
request.granter = granter;
|
|
72
|
+
}
|
|
73
|
+
const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
|
|
74
|
+
if (paginationForRequest) {
|
|
75
|
+
request.pagination = paginationForRequest;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
const response = yield this.retry(() => this.client.GranterGrants(request));
|
|
79
|
+
return ChainGrpcAuthZTransformer_1.ChainGrpcAuthZTransformer.grpcGranterGrantsToGranterGrants(response);
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
if (e instanceof core_proto_ts_1.CosmosAuthzV1Beta1Query.GrpcWebError) {
|
|
83
|
+
throw new exceptions_1.GrpcUnaryRequestException(new Error(e.toString()), {
|
|
84
|
+
code: e.code,
|
|
85
|
+
context: 'GranterGrants',
|
|
86
|
+
contextModule: this.module,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
90
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
91
|
+
context: 'GranterGrants',
|
|
92
|
+
contextModule: this.module,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
fetchGranteeGrants(grantee, pagination) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const request = core_proto_ts_1.CosmosAuthzV1Beta1Query.QueryGranteeGrantsRequest.create();
|
|
100
|
+
if (grantee) {
|
|
101
|
+
request.grantee = grantee;
|
|
102
|
+
}
|
|
103
|
+
const paginationForRequest = (0, pagination_1.paginationRequestFromPagination)(pagination);
|
|
104
|
+
if (paginationForRequest) {
|
|
105
|
+
request.pagination = paginationForRequest;
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
const response = yield this.retry(() => this.client.GranteeGrants(request));
|
|
109
|
+
return ChainGrpcAuthZTransformer_1.ChainGrpcAuthZTransformer.grpcGranteeGrantsToGranteeGrants(response);
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
if (e instanceof core_proto_ts_1.CosmosAuthzV1Beta1Query.GrpcWebError) {
|
|
113
|
+
throw new exceptions_1.GrpcUnaryRequestException(new Error(e.toString()), {
|
|
114
|
+
code: e.code,
|
|
115
|
+
context: 'GranteeGrants',
|
|
116
|
+
contextModule: this.module,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
throw new exceptions_1.GrpcUnaryRequestException(e, {
|
|
120
|
+
code: exceptions_1.UnspecifiedErrorCode,
|
|
121
|
+
context: 'GranteeGrants',
|
|
122
|
+
contextModule: this.module,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.ChainGrpcAuthZApi = ChainGrpcAuthZApi;
|
|
129
|
+
//# sourceMappingURL=ChainGrpcAuthZApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainGrpcAuthZApi.js","sourceRoot":"","sources":["../../../../../src/client/chain/grpc/ChainGrpcAuthZApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAGkC;AAClC,gEAAsE;AACtE,8EAAqD;AACrD,oCAAsC;AAEtC,0DAA2E;AAC3E,yFAAqF;AAErF;;GAEG;AACH,MAAa,iBAAkB,SAAQ,0BAAgB;IAKrD,YAAY,QAAgB;QAC1B,KAAK,CA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CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAA;YAE1E,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,OAAO,GAAG,OAAO,CAAA;aAC1B;YAED,MAAM,oBAAoB,GAAG,IAAA,4CAA+B,EAAC,UAAU,CAAC,CAAA;YAExE,IAAI,oBAAoB,EAAE;gBACxB,OAAO,CAAC,UAAU,GAAG,oBAAoB,CAAA;aAC1C;YAED,IAAI;gBACF,MAAM,QAAQ,GACZ,MAAM,IAAI,CAAC,KAAK,CACd,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CACzC,CAAA;gBAEH,OAAO,qDAAyB,CAAC,gCAAgC,CAC/D,QAAQ,CACT,CAAA;aACF;YAAC,OAAO,CAAU,EAAE;gBACnB,IAAI,CAAC,YAAY,uCAAuB,CAAC,YAAY,EAAE;oBACrD,MAAM,IAAI,sCAAyB,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE;wBAC3D,IAAI,EAAE,CAAC,CAAC,IAAI;wBACZ,OAAO,EAAE,eAAe;wBACxB,aAAa,EAAE,IAAI,CAAC,MAAM;qBAC3B,CAAC,CAAA;iBACH;gBAED,MAAM,IAAI,sCAAyB,CAAC,CAAU,EAAE;oBAC9C,IAAI,EAAE,iCAAoB;oBAC1B,OAAO,EAAE,eAAe;oBACxB,aAAa,EAAE,IAAI,CAAC,MAAM;iBAC3B,CAAC,CAAA;aACH;QACH,CAAC;KAAA;CACF;AAjJD,8CAiJC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ChainGrpcAuctionApi } from './ChainGrpcAuctionApi';
|
|
2
2
|
export { ChainGrpcAuthApi } from './ChainGrpcAuthApi';
|
|
3
|
+
export { ChainGrpcAuthZApi } from './ChainGrpcAuthZApi';
|
|
3
4
|
export { ChainGrpcBankApi } from './ChainGrpcBankApi';
|
|
4
5
|
export { ChainGrpcDistributionApi } from './ChainGrpcDistributionApi';
|
|
5
6
|
export { ChainGrpcExchangeApi } from './ChainGrpcExchangeApi';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/grpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/grpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChainGrpcWasmXApi = exports.ChainGrpcWasmApi = exports.ChainGrpcStakingApi = exports.ChainGrpcPeggyApi = exports.ChainGrpcOracleApi = exports.ChainGrpcMintApi = exports.ChainGrpcInsuranceFundApi = exports.ChainGrpcIbcApi = exports.ChainGrpcGovApi = exports.ChainGrpcExchangeApi = exports.ChainGrpcDistributionApi = exports.ChainGrpcBankApi = exports.ChainGrpcAuthApi = exports.ChainGrpcAuctionApi = void 0;
|
|
3
|
+
exports.ChainGrpcWasmXApi = exports.ChainGrpcWasmApi = exports.ChainGrpcStakingApi = exports.ChainGrpcPeggyApi = exports.ChainGrpcOracleApi = exports.ChainGrpcMintApi = exports.ChainGrpcInsuranceFundApi = exports.ChainGrpcIbcApi = exports.ChainGrpcGovApi = exports.ChainGrpcExchangeApi = exports.ChainGrpcDistributionApi = exports.ChainGrpcBankApi = exports.ChainGrpcAuthZApi = exports.ChainGrpcAuthApi = exports.ChainGrpcAuctionApi = void 0;
|
|
4
4
|
var ChainGrpcAuctionApi_1 = require("./ChainGrpcAuctionApi");
|
|
5
5
|
Object.defineProperty(exports, "ChainGrpcAuctionApi", { enumerable: true, get: function () { return ChainGrpcAuctionApi_1.ChainGrpcAuctionApi; } });
|
|
6
6
|
var ChainGrpcAuthApi_1 = require("./ChainGrpcAuthApi");
|
|
7
7
|
Object.defineProperty(exports, "ChainGrpcAuthApi", { enumerable: true, get: function () { return ChainGrpcAuthApi_1.ChainGrpcAuthApi; } });
|
|
8
|
+
var ChainGrpcAuthZApi_1 = require("./ChainGrpcAuthZApi");
|
|
9
|
+
Object.defineProperty(exports, "ChainGrpcAuthZApi", { enumerable: true, get: function () { return ChainGrpcAuthZApi_1.ChainGrpcAuthZApi; } });
|
|
8
10
|
var ChainGrpcBankApi_1 = require("./ChainGrpcBankApi");
|
|
9
11
|
Object.defineProperty(exports, "ChainGrpcBankApi", { enumerable: true, get: function () { return ChainGrpcBankApi_1.ChainGrpcBankApi; } });
|
|
10
12
|
var ChainGrpcDistributionApi_1 = require("./ChainGrpcDistributionApi");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/chain/grpc/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAClC,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/chain/grpc/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,uEAAqE;AAA5D,oIAAA,wBAAwB,OAAA;AACjC,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAClC,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA;AAC5B,uDAAqD;AAA5C,oHAAA,gBAAgB,OAAA;AACzB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CosmosAuthzV1Beta1Authz, CosmosAuthzV1Beta1Query } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
/**
|
|
3
|
+
* @category Chain Grpc Transformer
|
|
4
|
+
*/
|
|
5
|
+
export declare class ChainGrpcAuthZTransformer {
|
|
6
|
+
static grpcGrantToGrant(grant: CosmosAuthzV1Beta1Authz.Grant): {
|
|
7
|
+
authorization: string;
|
|
8
|
+
expiration: Date | undefined;
|
|
9
|
+
};
|
|
10
|
+
static grpcGrantAuthorizationToGrantAuthorization(grant: CosmosAuthzV1Beta1Authz.GrantAuthorization): {
|
|
11
|
+
granter: string;
|
|
12
|
+
grantee: string;
|
|
13
|
+
authorization: string;
|
|
14
|
+
expiration: Date | undefined;
|
|
15
|
+
};
|
|
16
|
+
static grpcGrantsToGrants(response: CosmosAuthzV1Beta1Query.QueryGrantsResponse): {
|
|
17
|
+
pagination: import("../../..").Pagination;
|
|
18
|
+
grants: {
|
|
19
|
+
authorization: string;
|
|
20
|
+
expiration: Date | undefined;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
static grpcGranteeGrantsToGranteeGrants(response: CosmosAuthzV1Beta1Query.QueryGranteeGrantsResponse): {
|
|
24
|
+
pagination: import("../../..").Pagination;
|
|
25
|
+
grants: {
|
|
26
|
+
granter: string;
|
|
27
|
+
grantee: string;
|
|
28
|
+
authorization: string;
|
|
29
|
+
expiration: Date | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
static grpcGranterGrantsToGranterGrants(response: CosmosAuthzV1Beta1Query.QueryGranterGrantsResponse): {
|
|
33
|
+
pagination: import("../../..").Pagination;
|
|
34
|
+
grants: {
|
|
35
|
+
granter: string;
|
|
36
|
+
grantee: string;
|
|
37
|
+
authorization: string;
|
|
38
|
+
expiration: Date | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ChainGrpcAuthZTransformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainGrpcAuthZTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/transformers/ChainGrpcAuthZTransformer.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,8BAA8B,CAAA;AAErC;;GAEG;AACH,qBAAa,yBAAyB;IACpC,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,uBAAuB,CAAC,KAAK;;;;IAO5D,MAAM,CAAC,0CAA0C,CAC/C,KAAK,EAAE,uBAAuB,CAAC,kBAAkB;;;;;;IAUnD,MAAM,CAAC,kBAAkB,CACvB,QAAQ,EAAE,uBAAuB,CAAC,mBAAmB;;;;;;;IAQvD,MAAM,CAAC,gCAAgC,CACrC,QAAQ,EAAE,uBAAuB,CAAC,0BAA0B;;;;;;;;;IAU9D,MAAM,CAAC,gCAAgC,CACrC,QAAQ,EAAE,uBAAuB,CAAC,0BAA0B;;;;;;;;;CAS/D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChainGrpcAuthZTransformer = void 0;
|
|
4
|
+
const pagination_1 = require("../../../utils/pagination");
|
|
5
|
+
/**
|
|
6
|
+
* @category Chain Grpc Transformer
|
|
7
|
+
*/
|
|
8
|
+
class ChainGrpcAuthZTransformer {
|
|
9
|
+
static grpcGrantToGrant(grant) {
|
|
10
|
+
return {
|
|
11
|
+
authorization: decodeAuthorization(grant.authorization),
|
|
12
|
+
expiration: grant.expiration,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
static grpcGrantAuthorizationToGrantAuthorization(grant) {
|
|
16
|
+
return {
|
|
17
|
+
granter: grant.granter,
|
|
18
|
+
grantee: grant.grantee,
|
|
19
|
+
authorization: decodeAuthorization(grant.authorization),
|
|
20
|
+
expiration: grant.expiration,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static grpcGrantsToGrants(response) {
|
|
24
|
+
return {
|
|
25
|
+
pagination: (0, pagination_1.grpcPaginationToPagination)(response.pagination),
|
|
26
|
+
grants: response.grants.map(ChainGrpcAuthZTransformer.grpcGrantToGrant),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static grpcGranteeGrantsToGranteeGrants(response) {
|
|
30
|
+
return {
|
|
31
|
+
pagination: (0, pagination_1.grpcPaginationToPagination)(response.pagination),
|
|
32
|
+
grants: response.grants.map(ChainGrpcAuthZTransformer.grpcGrantAuthorizationToGrantAuthorization),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static grpcGranterGrantsToGranterGrants(response) {
|
|
36
|
+
return {
|
|
37
|
+
pagination: (0, pagination_1.grpcPaginationToPagination)(response.pagination),
|
|
38
|
+
grants: response.grants.map(ChainGrpcAuthZTransformer.grpcGrantAuthorizationToGrantAuthorization),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ChainGrpcAuthZTransformer = ChainGrpcAuthZTransformer;
|
|
43
|
+
const decodeAuthorization = (authorization) => {
|
|
44
|
+
if (!authorization) {
|
|
45
|
+
return '';
|
|
46
|
+
}
|
|
47
|
+
switch (authorization.typeUrl) {
|
|
48
|
+
case '/cosmos.authz.v1beta1.GenericAuthorization':
|
|
49
|
+
return Buffer.from(authorization.value).toString('utf-8');
|
|
50
|
+
default:
|
|
51
|
+
return Buffer.from(authorization.value).toString('utf-8');
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=ChainGrpcAuthZTransformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainGrpcAuthZTransformer.js","sourceRoot":"","sources":["../../../../../src/client/chain/transformers/ChainGrpcAuthZTransformer.ts"],"names":[],"mappings":";;;AAAA,0DAAsE;AAOtE;;GAEG;AACH,MAAa,yBAAyB;IACpC,MAAM,CAAC,gBAAgB,CAAC,KAAoC;QAC1D,OAAO;YACL,aAAa,EAAE,mBAAmB,CAAC,KAAK,CAAC,aAAa,CAAC;YACvD,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAA;IACH,CAAC;IAED,MAAM,CAAC,0CAA0C,CAC/C,KAAiD;QAEjD,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,aAAa,EAAE,mBAAm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former';
|
|
2
|
+
export * from './ChainGrpcAuthTransformer';
|
|
3
|
+
export * from './ChainGrpcAuthZTransformer';
|
|
2
4
|
export * from './ChainGrpcBankTransformer';
|
|
3
5
|
export * from './ChainGrpcDistributionTransformer';
|
|
4
6
|
export * from './ChainGrpcExchangeTransformer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/transformers/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/transformers/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA"}
|
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ChainGrpcAuctionTransformer"), exports);
|
|
18
|
+
__exportStar(require("./ChainGrpcAuthTransformer"), exports);
|
|
19
|
+
__exportStar(require("./ChainGrpcAuthZTransformer"), exports);
|
|
18
20
|
__exportStar(require("./ChainGrpcBankTransformer"), exports);
|
|
19
21
|
__exportStar(require("./ChainGrpcDistributionTransformer"), exports);
|
|
20
22
|
__exportStar(require("./ChainGrpcExchangeTransformer"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/chain/transformers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C;AAC7C,6DAA0C;AAC1C,qEAAkD;AAClD,iEAA8C;AAC9C,iEAA8C;AAC9C,4DAAyC;AACzC,sEAAmD;AACnD,6DAA0C;AAC1C,8DAA2C;AAC3C,gEAA6C;AAC7C,6DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/chain/transformers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C;AAC7C,6DAA0C;AAC1C,8DAA2C;AAC3C,6DAA0C;AAC1C,qEAAkD;AAClD,iEAA8C;AAC9C,iEAA8C;AAC9C,4DAAyC;AACzC,sEAAmD;AACnD,6DAA0C;AAC1C,8DAA2C;AAC3C,gEAA6C;AAC7C,6DAA0C"}
|
|
@@ -10,7 +10,7 @@ export interface PubKey {
|
|
|
10
10
|
key: string;
|
|
11
11
|
typeUrl: string;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface AuthBaseAccount {
|
|
14
14
|
address: string;
|
|
15
15
|
pubKey?: PubKey;
|
|
16
16
|
accountNumber: number;
|
|
@@ -18,7 +18,7 @@ export interface BaseAccount {
|
|
|
18
18
|
}
|
|
19
19
|
export interface Account {
|
|
20
20
|
codeHash: string;
|
|
21
|
-
baseAccount:
|
|
21
|
+
baseAccount: AuthBaseAccount;
|
|
22
22
|
}
|
|
23
23
|
export type EthAccount = InjectiveTypesV1Beta1Account.EthAccount;
|
|
24
24
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/types/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAA;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,sBAAsB,EAAE,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/types/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAA;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,MAAM,CAAA;IACzB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,sBAAsB,EAAE,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,eAAe,CAAA;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG,4BAA4B,CAAC,UAAU,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CosmosAuthzV1Beta1Authz, InjectiveExchangeV1Beta1Authz } from '@injectivelabs/core-proto-ts';
|
|
2
|
+
export type Grant = CosmosAuthzV1Beta1Authz.Grant;
|
|
3
|
+
export type GrantAuthorization = CosmosAuthzV1Beta1Authz.GrantAuthorization;
|
|
4
|
+
export type CreateSpotLimitOrderAuthz = InjectiveExchangeV1Beta1Authz.CreateSpotLimitOrderAuthz;
|
|
5
|
+
export type CreateSpotMarketOrderAuthz = InjectiveExchangeV1Beta1Authz.CreateSpotMarketOrderAuthz;
|
|
6
|
+
export type BatchCreateSpotLimitOrdersAuthz = InjectiveExchangeV1Beta1Authz.BatchCreateSpotLimitOrdersAuthz;
|
|
7
|
+
export type CancelSpotOrderAuthz = InjectiveExchangeV1Beta1Authz.CancelSpotOrderAuthz;
|
|
8
|
+
export type BatchCancelSpotOrdersAuthz = InjectiveExchangeV1Beta1Authz.BatchCancelSpotOrdersAuthz;
|
|
9
|
+
export type CreateDerivativeLimitOrderAuthz = InjectiveExchangeV1Beta1Authz.CreateDerivativeLimitOrderAuthz;
|
|
10
|
+
export type CreateDerivativeMarketOrderAuthz = InjectiveExchangeV1Beta1Authz.CreateDerivativeMarketOrderAuthz;
|
|
11
|
+
export type BatchCreateDerivativeLimitOrdersAuthz = InjectiveExchangeV1Beta1Authz.BatchCreateDerivativeLimitOrdersAuthz;
|
|
12
|
+
export type CancelDerivativeOrderAuthz = InjectiveExchangeV1Beta1Authz.CancelDerivativeOrderAuthz;
|
|
13
|
+
export type BatchCancelDerivativeOrdersAuthz = InjectiveExchangeV1Beta1Authz.BatchCancelDerivativeOrdersAuthz;
|
|
14
|
+
//# sourceMappingURL=authZ.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authZ.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/types/authZ.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,8BAA8B,CAAA;AAErC,MAAM,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAA;AACjD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC,kBAAkB,CAAA;AAE3E,MAAM,MAAM,yBAAyB,GACnC,6BAA6B,CAAC,yBAAyB,CAAA;AACzD,MAAM,MAAM,0BAA0B,GACpC,6BAA6B,CAAC,0BAA0B,CAAA;AAC1D,MAAM,MAAM,+BAA+B,GACzC,6BAA6B,CAAC,+BAA+B,CAAA;AAC/D,MAAM,MAAM,oBAAoB,GAC9B,6BAA6B,CAAC,oBAAoB,CAAA;AACpD,MAAM,MAAM,0BAA0B,GACpC,6BAA6B,CAAC,0BAA0B,CAAA;AAE1D,MAAM,MAAM,+BAA+B,GACzC,6BAA6B,CAAC,+BAA+B,CAAA;AAC/D,MAAM,MAAM,gCAAgC,GAC1C,6BAA6B,CAAC,gCAAgC,CAAA;AAChE,MAAM,MAAM,qCAAqC,GAC/C,6BAA6B,CAAC,qCAAqC,CAAA;AACrE,MAAM,MAAM,0BAA0B,GACpC,6BAA6B,CAAC,0BAA0B,CAAA;AAC1D,MAAM,MAAM,gCAAgC,GAC1C,6BAA6B,CAAC,gCAAgC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authZ.js","sourceRoot":"","sources":["../../../../../src/client/chain/types/authZ.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AAEtB,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAA;CACR;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/chain/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AAEtB,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAA;CACR;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAA0B,CAAA"}
|
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.ChainModule = void 0;
|
|
18
18
|
const exceptions_1 = require("@injectivelabs/exceptions");
|
|
19
|
+
__exportStar(require("./auth"), exports);
|
|
20
|
+
__exportStar(require("./authZ"), exports);
|
|
19
21
|
__exportStar(require("./auction"), exports);
|
|
20
22
|
__exportStar(require("./auth-rest"), exports);
|
|
21
23
|
__exportStar(require("./bank-rest"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/chain/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0DAA4D;AAE5D,4CAAyB;AACzB,8CAA2B;AAC3B,8CAA2B;AAC3B,oDAAiC;AACjC,yCAAsB;AACtB,iDAA8B;AAC9B,6CAA0B;AAC1B,wCAAqB;AACrB,8CAA2B;AAC3B,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,4CAAyB;AACzB,yCAAsB;AAMT,QAAA,WAAW,qBAAQ,6BAAgB,EAAE"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/chain/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0DAA4D;AAE5D,yCAAsB;AACtB,0CAAuB;AACvB,4CAAyB;AACzB,8CAA2B;AAC3B,8CAA2B;AAC3B,oDAAiC;AACjC,yCAAsB;AACtB,iDAA8B;AAC9B,6CAA0B;AAC1B,wCAAqB;AACrB,8CAA2B;AAC3B,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,4CAAyB;AACzB,yCAAsB;AAMT,QAAA,WAAW,qBAAQ,6BAAgB,EAAE"}
|
|
@@ -7,6 +7,11 @@ export declare class IndexerGrpcTradingApi extends BaseGrpcConsumer {
|
|
|
7
7
|
protected module: string;
|
|
8
8
|
protected client: InjectiveTradingRpc.InjectiveTradingRPCClientImpl;
|
|
9
9
|
constructor(endpoint: string);
|
|
10
|
-
fetchGridStrategies(
|
|
10
|
+
fetchGridStrategies({ accountAddress, subaccountId, state, marketId, }: {
|
|
11
|
+
accountAddress?: string;
|
|
12
|
+
subaccountId?: string;
|
|
13
|
+
state?: string;
|
|
14
|
+
marketId?: string;
|
|
15
|
+
}): Promise<InjectiveTradingRpc.ListTradingStrategiesResponse>;
|
|
11
16
|
}
|
|
12
17
|
//# sourceMappingURL=IndexerGrpcTradingApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexerGrpcTradingApi.d.ts","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/IndexerGrpcTradingApi.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,gBAAgB,MAAM,wBAAwB,CAAA;AAGrD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAwB;IAEhD,SAAS,CAAC,MAAM,EAAE,mBAAmB,CAAC,6BAA6B,CAAA;gBAEvD,QAAQ,EAAE,MAAM;IAQtB,mBAAmB;
|
|
1
|
+
{"version":3,"file":"IndexerGrpcTradingApi.d.ts","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/IndexerGrpcTradingApi.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,gBAAgB,MAAM,wBAAwB,CAAA;AAGrD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAwB;IAEhD,SAAS,CAAC,MAAM,EAAE,mBAAmB,CAAC,6BAA6B,CAAA;gBAEvD,QAAQ,EAAE,MAAM;IAQtB,mBAAmB,CAAC,EACxB,cAAc,EACd,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE;QACD,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB;CA0CF"}
|
|
@@ -26,9 +26,21 @@ class IndexerGrpcTradingApi extends BaseGrpcConsumer_1.default {
|
|
|
26
26
|
this.module = types_1.IndexerModule.Trading;
|
|
27
27
|
this.client = new indexer_proto_ts_1.InjectiveTradingRpc.InjectiveTradingRPCClientImpl(this.getGrpcWebImpl(endpoint));
|
|
28
28
|
}
|
|
29
|
-
fetchGridStrategies() {
|
|
29
|
+
fetchGridStrategies({ accountAddress, subaccountId, state, marketId, }) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const request = indexer_proto_ts_1.InjectiveTradingRpc.ListTradingStrategiesRequest.create();
|
|
32
|
+
if (accountAddress) {
|
|
33
|
+
request.accountAddress = accountAddress;
|
|
34
|
+
}
|
|
35
|
+
if (subaccountId) {
|
|
36
|
+
request.subaccountId = subaccountId;
|
|
37
|
+
}
|
|
38
|
+
if (state) {
|
|
39
|
+
request.state = state;
|
|
40
|
+
}
|
|
41
|
+
if (marketId) {
|
|
42
|
+
request.marketId = marketId;
|
|
43
|
+
}
|
|
32
44
|
try {
|
|
33
45
|
const response = yield this.retry(() => this.client.ListTradingStrategies(request));
|
|
34
46
|
return response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexerGrpcTradingApi.js","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/IndexerGrpcTradingApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAGkC;AAClC,sEAAqE;AACrE,8EAAqD;AACrD,oCAAwC;AAExC;;GAEG;AACH,MAAa,qBAAsB,SAAQ,0BAAgB;IAKzD,YAAY,QAAgB;QAC1B,KAAK,CAAC,QAAQ,CAAC,CAAA;QALP,WAAM,GAAW,qBAAa,CAAC,OAAO,CAAA;QAO9C,IAAI,CAAC,MAAM,GAAG,IAAI,sCAAmB,CAAC,6BAA6B,CACjE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAC9B,CAAA;IACH,CAAC;IAEK,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"IndexerGrpcTradingApi.js","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/IndexerGrpcTrading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a,EAAE,IAAI,CAAC,MAAM;qBAC3B,CAAC,CAAA;iBACH;gBAED,MAAM,IAAI,sCAAyB,CAAC,CAAU,EAAE;oBAC9C,IAAI,EAAE,iCAAoB;oBAC1B,OAAO,EAAE,gBAAgB;oBACzB,aAAa,EAAE,IAAI,CAAC,MAAM;iBAC3B,CAAC,CAAA;aACH;QACH,CAAC;KAAA;CACF;AAjED,sDAiEC"}
|
|
@@ -9,4 +9,5 @@ export { IndexerGrpcInsuranceFundApi } from './IndexerGrpcInsuranceFundApi';
|
|
|
9
9
|
export { IndexerGrpcDerivativesApi } from './IndexerGrpcDerivativesApi';
|
|
10
10
|
export { IndexerGrpcSpotApi } from './IndexerGrpcSpotApi';
|
|
11
11
|
export { IndexerGrpcTransactionApi } from './IndexerGrpcTransactionApi';
|
|
12
|
+
export { IndexerGrpcTradingApi } from './IndexerGrpcTradingApi';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IndexerGrpcTransactionApi = exports.IndexerGrpcSpotApi = exports.IndexerGrpcDerivativesApi = exports.IndexerGrpcInsuranceFundApi = exports.IndexerGrpcOracleApi = exports.IndexerGrpcMetaApi = exports.IndexerGrpcMitoApi = exports.IndexerGrpcExplorerApi = exports.IndexerGrpcAuctionApi = exports.IndexerGrpcAccountPortfolioApi = exports.IndexerGrpcAccountApi = void 0;
|
|
3
|
+
exports.IndexerGrpcTradingApi = exports.IndexerGrpcTransactionApi = exports.IndexerGrpcSpotApi = exports.IndexerGrpcDerivativesApi = exports.IndexerGrpcInsuranceFundApi = exports.IndexerGrpcOracleApi = exports.IndexerGrpcMetaApi = exports.IndexerGrpcMitoApi = exports.IndexerGrpcExplorerApi = exports.IndexerGrpcAuctionApi = exports.IndexerGrpcAccountPortfolioApi = exports.IndexerGrpcAccountApi = void 0;
|
|
4
4
|
var IndexerGrpcAccountApi_1 = require("./IndexerGrpcAccountApi");
|
|
5
5
|
Object.defineProperty(exports, "IndexerGrpcAccountApi", { enumerable: true, get: function () { return IndexerGrpcAccountApi_1.IndexerGrpcAccountApi; } });
|
|
6
6
|
var IndexerGrpcPortfolioApi_1 = require("./IndexerGrpcPortfolioApi");
|
|
@@ -23,4 +23,6 @@ var IndexerGrpcSpotApi_1 = require("./IndexerGrpcSpotApi");
|
|
|
23
23
|
Object.defineProperty(exports, "IndexerGrpcSpotApi", { enumerable: true, get: function () { return IndexerGrpcSpotApi_1.IndexerGrpcSpotApi; } });
|
|
24
24
|
var IndexerGrpcTransactionApi_1 = require("./IndexerGrpcTransactionApi");
|
|
25
25
|
Object.defineProperty(exports, "IndexerGrpcTransactionApi", { enumerable: true, get: function () { return IndexerGrpcTransactionApi_1.IndexerGrpcTransactionApi; } });
|
|
26
|
+
var IndexerGrpcTradingApi_1 = require("./IndexerGrpcTradingApi");
|
|
27
|
+
Object.defineProperty(exports, "IndexerGrpcTradingApi", { enumerable: true, get: function () { return IndexerGrpcTradingApi_1.IndexerGrpcTradingApi; } });
|
|
26
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/index.ts"],"names":[],"mappings":";;;AAAA,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,qEAA0E;AAAjE,yIAAA,8BAA8B,OAAA;AACvC,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAClC,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/client/indexer/grpc/index.ts"],"names":[],"mappings":";;;AAAA,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,qEAA0E;AAAjE,yIAAA,8BAA8B,OAAA;AACvC,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,mEAAiE;AAAxD,gIAAA,sBAAsB,OAAA;AAC/B,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,+DAA6D;AAApD,4HAAA,oBAAoB,OAAA;AAC7B,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA;AACpC,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAClC,2DAAyD;AAAhD,wHAAA,kBAAkB,OAAA;AAC3B,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAClC,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA"}
|
|
@@ -37,8 +37,13 @@ export default class MsgGrant extends MsgBase<MsgGrant.Params, MsgGrant.Proto> {
|
|
|
37
37
|
toWeb3(): {
|
|
38
38
|
granter: string;
|
|
39
39
|
grantee: string;
|
|
40
|
-
grant:
|
|
41
|
-
|
|
40
|
+
grant: {
|
|
41
|
+
authorization: {
|
|
42
|
+
'@type': string;
|
|
43
|
+
msg: string;
|
|
44
|
+
};
|
|
45
|
+
expiration: Date;
|
|
46
|
+
};
|
|
42
47
|
'@type': string;
|
|
43
48
|
};
|
|
44
49
|
private getTimestamp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MsgGrant.d.ts","sourceRoot":"","sources":["../../../../../../src/core/modules/authz/msgs/MsgGrant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAEL,oBAAoB,EACpB,uBAAuB,EAExB,MAAM,8BAA8B,CAAA;AAIrC,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,UAAiB,MAAM;QACrB,WAAW,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB;IAED,KAAY,KAAK,GAAG,oBAAoB,CAAC,QAAQ,CAAA;IAEjD,KAAY,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG;QACjE,IAAI,EAAE,GAAG,CAAA;KACV,CAAA;CACF;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC5E,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,QAAQ;IAI3C,OAAO;IA4BP,MAAM;;;;;;IASN,OAAO;;;;IAyBP,YAAY;;;;IASZ,MAAM
|
|
1
|
+
{"version":3,"file":"MsgGrant.d.ts","sourceRoot":"","sources":["../../../../../../src/core/modules/authz/msgs/MsgGrant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAEL,oBAAoB,EACpB,uBAAuB,EAExB,MAAM,8BAA8B,CAAA;AAIrC,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,UAAiB,MAAM;QACrB,WAAW,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,eAAe,CAAC,EAAE,MAAM,CAAA;KACzB;IAED,KAAY,KAAK,GAAG,oBAAoB,CAAC,QAAQ,CAAA;IAEjD,KAAY,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG;QACjE,IAAI,EAAE,GAAG,CAAA;KACV,CAAA;CACF;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC5E,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,QAAQ;IAI3C,OAAO;IA4BP,MAAM;;;;;;IASN,OAAO;;;;IAyBP,YAAY;;;;IASZ,MAAM;;;;;;;;;;;;IAuBb,OAAO,CAAC,YAAY;IA8Bb,QAAQ,IAAI,UAAU;CAG9B"}
|
|
@@ -41,7 +41,7 @@ class MsgGrant extends MsgBase_1.MsgBase {
|
|
|
41
41
|
const timestamp = this.getTimestamp();
|
|
42
42
|
const message = proto;
|
|
43
43
|
const messageWithAuthorizationType = (0, snakecase_keys_1.default)(Object.assign(Object.assign({}, message), { grant: Object.assign(Object.assign({}, message.grant), { authorization: {
|
|
44
|
-
|
|
44
|
+
type: 'cosmos-sdk/GenericAuthorization',
|
|
45
45
|
value: { msg: params.messageType },
|
|
46
46
|
}, expiration: new Date(Number(timestamp.seconds) * 1000) }) }));
|
|
47
47
|
return {
|
|
@@ -57,9 +57,21 @@ class MsgGrant extends MsgBase_1.MsgBase {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
toWeb3() {
|
|
60
|
+
const { params } = this;
|
|
60
61
|
const amino = this.toAmino();
|
|
61
|
-
const
|
|
62
|
-
|
|
62
|
+
const timestamp = this.getTimestamp();
|
|
63
|
+
const messageWithAuthorizationType = {
|
|
64
|
+
granter: amino.value.granter,
|
|
65
|
+
grantee: amino.value.grantee,
|
|
66
|
+
grant: {
|
|
67
|
+
authorization: {
|
|
68
|
+
'@type': '/cosmos.authz.v1beta1.GenericAuthorization',
|
|
69
|
+
msg: params.messageType,
|
|
70
|
+
},
|
|
71
|
+
expiration: new Date(Number(timestamp.seconds) * 1000),
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
return Object.assign({ '@type': '/cosmos.authz.v1beta1.MsgGrant' }, messageWithAuthorizationType);
|
|
63
75
|
}
|
|
64
76
|
getTimestamp() {
|
|
65
77
|
const { params } = this;
|