carbon-js-sdk 0.11.3-beta.1 → 0.11.3
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/Switcheo/carbon/bank/export.d.ts +2 -1
- package/lib/codec/Switcheo/carbon/bank/export.js +10 -1
- package/lib/codec/Switcheo/carbon/bank/genesis.d.ts +5 -4
- package/lib/codec/Switcheo/carbon/bank/genesis.js +22 -5
- package/lib/codec/Switcheo/carbon/bank/query.d.ts +45 -0
- package/lib/codec/Switcheo/carbon/bank/query.js +185 -1
- package/lib/codec/Switcheo/carbon/bank/tx.d.ts +63 -0
- package/lib/codec/Switcheo/carbon/bank/tx.js +210 -0
- package/lib/codec/Switcheo/carbon/cdp/query.d.ts +7 -4
- package/lib/codec/Switcheo/carbon/cdp/query.js +58 -4
- package/lib/codec/Switcheo/carbon/evmcontract/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/evmcontract/export.js +3 -1
- package/lib/codec/Switcheo/carbon/evmcontract/query.d.ts +37 -8
- package/lib/codec/Switcheo/carbon/evmcontract/query.js +201 -13
- package/lib/codec/Switcheo/carbon/fee/export.d.ts +0 -1
- package/lib/codec/Switcheo/carbon/fee/export.js +1 -6
- package/lib/codec/Switcheo/carbon/market/market.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/market/market.js +30 -2
- package/lib/codec/Switcheo/carbon/market/params.d.ts +2 -0
- package/lib/codec/Switcheo/carbon/market/params.js +32 -2
- package/lib/codec/Switcheo/carbon/market/query.d.ts +12 -8
- package/lib/codec/Switcheo/carbon/market/query.js +80 -8
- package/lib/codec/Switcheo/carbon/oracle/export.d.ts +1 -2
- package/lib/codec/Switcheo/carbon/oracle/export.js +4 -6
- package/lib/codec/Switcheo/carbon/oracle/tx.d.ts +23 -24
- package/lib/codec/Switcheo/carbon/oracle/tx.js +113 -129
- package/lib/codec/Switcheo/carbon/position/event.d.ts +11 -1
- package/lib/codec/Switcheo/carbon/position/event.js +51 -1
- package/lib/codec/Switcheo/carbon/position/export.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/position/export.js +7 -1
- package/lib/codec/Switcheo/carbon/position/position.d.ts +11 -0
- package/lib/codec/Switcheo/carbon/position/position.js +59 -1
- package/lib/codec/Switcheo/carbon/position/query.d.ts +44 -1
- package/lib/codec/Switcheo/carbon/position/query.js +189 -1
- package/lib/codec/Switcheo/carbon/pricing/export.d.ts +0 -1
- package/lib/codec/Switcheo/carbon/pricing/export.js +1 -4
- package/lib/codec/Switcheo/carbon/sequence/query.d.ts +7 -4
- package/lib/codec/Switcheo/carbon/sequence/query.js +41 -4
- package/lib/codec/index.d.ts +6 -8
- package/lib/codec/index.js +484 -402
- package/lib/constant/ibc.js +6 -0
- package/lib/modules/admin.d.ts +0 -5
- package/lib/modules/admin.js +1 -8
- package/lib/modules/oracle.d.ts +0 -7
- package/lib/modules/oracle.js +0 -27
- package/lib/provider/amino/types/gov.js +98 -66
- package/lib/provider/amino/types/oracle.js +1 -39
- package/lib/provider/keplr/KeplrAccount.js +6 -11
- package/lib/provider/leap/LeapAccount.js +2 -50
- package/lib/util/ethermint.d.ts +0 -1
- package/lib/util/ethermint.js +1 -45
- package/lib/util/gov.js +0 -30
- package/lib/util/tx.d.ts +6 -8
- package/lib/util/tx.js +0 -1
- package/package.json +2 -2
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { CoinSpent, CoinReceived, CoinSent, CoinMint, CoinBurn } from "./event";
|
|
2
|
-
export { InternalTransfer, Coin, QueryInternalTransfersRequest, QueryInternalTransfersResponse } from "./query";
|
|
2
|
+
export { InternalTransfer, Coin, QueryInternalTransfersRequest, QueryInternalTransfersResponse, QueryBlacklistRequest, QueryBlacklistResponse, QueryBlacklistAllRequest, QueryBlacklistAllResponse } from "./query";
|
|
3
|
+
export { MsgBlacklistAddress, MsgBlacklistAddressResponse, MsgUnblacklistAddress, MsgUnblacklistAddressResponse } from "./tx";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.Coin = exports.InternalTransfer = exports.CoinBurn = exports.CoinMint = exports.CoinSent = exports.CoinReceived = exports.CoinSpent = void 0;
|
|
3
|
+
exports.MsgUnblacklistAddressResponse = exports.MsgUnblacklistAddress = exports.MsgBlacklistAddressResponse = exports.MsgBlacklistAddress = exports.QueryBlacklistAllResponse = exports.QueryBlacklistAllRequest = exports.QueryBlacklistResponse = exports.QueryBlacklistRequest = exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.Coin = exports.InternalTransfer = exports.CoinBurn = exports.CoinMint = exports.CoinSent = exports.CoinReceived = exports.CoinSpent = void 0;
|
|
4
4
|
var event_1 = require("./event");
|
|
5
5
|
Object.defineProperty(exports, "CoinSpent", { enumerable: true, get: function () { return event_1.CoinSpent; } });
|
|
6
6
|
Object.defineProperty(exports, "CoinReceived", { enumerable: true, get: function () { return event_1.CoinReceived; } });
|
|
@@ -12,3 +12,12 @@ Object.defineProperty(exports, "InternalTransfer", { enumerable: true, get: func
|
|
|
12
12
|
Object.defineProperty(exports, "Coin", { enumerable: true, get: function () { return query_1.Coin; } });
|
|
13
13
|
Object.defineProperty(exports, "QueryInternalTransfersRequest", { enumerable: true, get: function () { return query_1.QueryInternalTransfersRequest; } });
|
|
14
14
|
Object.defineProperty(exports, "QueryInternalTransfersResponse", { enumerable: true, get: function () { return query_1.QueryInternalTransfersResponse; } });
|
|
15
|
+
Object.defineProperty(exports, "QueryBlacklistRequest", { enumerable: true, get: function () { return query_1.QueryBlacklistRequest; } });
|
|
16
|
+
Object.defineProperty(exports, "QueryBlacklistResponse", { enumerable: true, get: function () { return query_1.QueryBlacklistResponse; } });
|
|
17
|
+
Object.defineProperty(exports, "QueryBlacklistAllRequest", { enumerable: true, get: function () { return query_1.QueryBlacklistAllRequest; } });
|
|
18
|
+
Object.defineProperty(exports, "QueryBlacklistAllResponse", { enumerable: true, get: function () { return query_1.QueryBlacklistAllResponse; } });
|
|
19
|
+
var tx_1 = require("./tx");
|
|
20
|
+
Object.defineProperty(exports, "MsgBlacklistAddress", { enumerable: true, get: function () { return tx_1.MsgBlacklistAddress; } });
|
|
21
|
+
Object.defineProperty(exports, "MsgBlacklistAddressResponse", { enumerable: true, get: function () { return tx_1.MsgBlacklistAddressResponse; } });
|
|
22
|
+
Object.defineProperty(exports, "MsgUnblacklistAddress", { enumerable: true, get: function () { return tx_1.MsgUnblacklistAddress; } });
|
|
23
|
+
Object.defineProperty(exports, "MsgUnblacklistAddressResponse", { enumerable: true, get: function () { return tx_1.MsgUnblacklistAddressResponse; } });
|
|
@@ -3,13 +3,14 @@ import _m0 from "protobufjs/minimal";
|
|
|
3
3
|
export declare const protobufPackage = "Switcheo.carbon.bank";
|
|
4
4
|
/** GenesisState defines the bank module's genesis state. */
|
|
5
5
|
export interface GenesisState {
|
|
6
|
+
blacklistedAddresses: string[];
|
|
6
7
|
}
|
|
7
8
|
export declare const GenesisState: {
|
|
8
|
-
encode(
|
|
9
|
+
encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
|
|
9
10
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GenesisState;
|
|
10
|
-
fromJSON(
|
|
11
|
-
toJSON(
|
|
12
|
-
fromPartial(
|
|
11
|
+
fromJSON(object: any): GenesisState;
|
|
12
|
+
toJSON(message: GenesisState): unknown;
|
|
13
|
+
fromPartial(object: DeepPartial<GenesisState>): GenesisState;
|
|
13
14
|
};
|
|
14
15
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
15
16
|
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 {} ? {
|
|
@@ -8,18 +8,25 @@ exports.GenesisState = exports.protobufPackage = void 0;
|
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
exports.protobufPackage = "Switcheo.carbon.bank";
|
|
11
|
-
const baseGenesisState = {};
|
|
11
|
+
const baseGenesisState = { blacklistedAddresses: "" };
|
|
12
12
|
exports.GenesisState = {
|
|
13
|
-
encode(
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
for (const v of message.blacklistedAddresses) {
|
|
15
|
+
writer.uint32(10).string(v);
|
|
16
|
+
}
|
|
14
17
|
return writer;
|
|
15
18
|
},
|
|
16
19
|
decode(input, length) {
|
|
17
20
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
18
21
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
19
22
|
const message = Object.assign({}, baseGenesisState);
|
|
23
|
+
message.blacklistedAddresses = [];
|
|
20
24
|
while (reader.pos < end) {
|
|
21
25
|
const tag = reader.uint32();
|
|
22
26
|
switch (tag >>> 3) {
|
|
27
|
+
case 1:
|
|
28
|
+
message.blacklistedAddresses.push(reader.string());
|
|
29
|
+
break;
|
|
23
30
|
default:
|
|
24
31
|
reader.skipType(tag & 7);
|
|
25
32
|
break;
|
|
@@ -27,16 +34,26 @@ exports.GenesisState = {
|
|
|
27
34
|
}
|
|
28
35
|
return message;
|
|
29
36
|
},
|
|
30
|
-
fromJSON(
|
|
37
|
+
fromJSON(object) {
|
|
38
|
+
var _a;
|
|
31
39
|
const message = Object.assign({}, baseGenesisState);
|
|
40
|
+
message.blacklistedAddresses = ((_a = object.blacklistedAddresses) !== null && _a !== void 0 ? _a : []).map((e) => String(e));
|
|
32
41
|
return message;
|
|
33
42
|
},
|
|
34
|
-
toJSON(
|
|
43
|
+
toJSON(message) {
|
|
35
44
|
const obj = {};
|
|
45
|
+
if (message.blacklistedAddresses) {
|
|
46
|
+
obj.blacklistedAddresses = message.blacklistedAddresses.map((e) => e);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
obj.blacklistedAddresses = [];
|
|
50
|
+
}
|
|
36
51
|
return obj;
|
|
37
52
|
},
|
|
38
|
-
fromPartial(
|
|
53
|
+
fromPartial(object) {
|
|
54
|
+
var _a;
|
|
39
55
|
const message = Object.assign({}, baseGenesisState);
|
|
56
|
+
message.blacklistedAddresses = ((_a = object.blacklistedAddresses) !== null && _a !== void 0 ? _a : []).map((e) => e);
|
|
40
57
|
return message;
|
|
41
58
|
},
|
|
42
59
|
};
|
|
@@ -29,6 +29,17 @@ export interface QueryInternalTransfersResponse {
|
|
|
29
29
|
internalTransfers: InternalTransfer[];
|
|
30
30
|
pagination?: PageResponse;
|
|
31
31
|
}
|
|
32
|
+
export interface QueryBlacklistRequest {
|
|
33
|
+
address: string;
|
|
34
|
+
}
|
|
35
|
+
export interface QueryBlacklistResponse {
|
|
36
|
+
isBlacklisted: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface QueryBlacklistAllRequest {
|
|
39
|
+
}
|
|
40
|
+
export interface QueryBlacklistAllResponse {
|
|
41
|
+
address: string[];
|
|
42
|
+
}
|
|
32
43
|
export declare const InternalTransfer: {
|
|
33
44
|
encode(message: InternalTransfer, writer?: _m0.Writer): _m0.Writer;
|
|
34
45
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InternalTransfer;
|
|
@@ -57,15 +68,49 @@ export declare const QueryInternalTransfersResponse: {
|
|
|
57
68
|
toJSON(message: QueryInternalTransfersResponse): unknown;
|
|
58
69
|
fromPartial(object: DeepPartial<QueryInternalTransfersResponse>): QueryInternalTransfersResponse;
|
|
59
70
|
};
|
|
71
|
+
export declare const QueryBlacklistRequest: {
|
|
72
|
+
encode(message: QueryBlacklistRequest, writer?: _m0.Writer): _m0.Writer;
|
|
73
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistRequest;
|
|
74
|
+
fromJSON(object: any): QueryBlacklistRequest;
|
|
75
|
+
toJSON(message: QueryBlacklistRequest): unknown;
|
|
76
|
+
fromPartial(object: DeepPartial<QueryBlacklistRequest>): QueryBlacklistRequest;
|
|
77
|
+
};
|
|
78
|
+
export declare const QueryBlacklistResponse: {
|
|
79
|
+
encode(message: QueryBlacklistResponse, writer?: _m0.Writer): _m0.Writer;
|
|
80
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistResponse;
|
|
81
|
+
fromJSON(object: any): QueryBlacklistResponse;
|
|
82
|
+
toJSON(message: QueryBlacklistResponse): unknown;
|
|
83
|
+
fromPartial(object: DeepPartial<QueryBlacklistResponse>): QueryBlacklistResponse;
|
|
84
|
+
};
|
|
85
|
+
export declare const QueryBlacklistAllRequest: {
|
|
86
|
+
encode(_: QueryBlacklistAllRequest, writer?: _m0.Writer): _m0.Writer;
|
|
87
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistAllRequest;
|
|
88
|
+
fromJSON(_: any): QueryBlacklistAllRequest;
|
|
89
|
+
toJSON(_: QueryBlacklistAllRequest): unknown;
|
|
90
|
+
fromPartial(_: DeepPartial<QueryBlacklistAllRequest>): QueryBlacklistAllRequest;
|
|
91
|
+
};
|
|
92
|
+
export declare const QueryBlacklistAllResponse: {
|
|
93
|
+
encode(message: QueryBlacklistAllResponse, writer?: _m0.Writer): _m0.Writer;
|
|
94
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryBlacklistAllResponse;
|
|
95
|
+
fromJSON(object: any): QueryBlacklistAllResponse;
|
|
96
|
+
toJSON(message: QueryBlacklistAllResponse): unknown;
|
|
97
|
+
fromPartial(object: DeepPartial<QueryBlacklistAllResponse>): QueryBlacklistAllResponse;
|
|
98
|
+
};
|
|
60
99
|
/** Query defines the gRPC querier service. */
|
|
61
100
|
export interface Query {
|
|
62
101
|
/** this line is used by starport scaffolding # 2 */
|
|
63
102
|
InternalTransfers(request: QueryInternalTransfersRequest): Promise<QueryInternalTransfersResponse>;
|
|
103
|
+
/** Get whether a specific address is blacklisted. */
|
|
104
|
+
Blacklist(request: QueryBlacklistRequest): Promise<QueryBlacklistResponse>;
|
|
105
|
+
/** Queries a list of blacklist items. */
|
|
106
|
+
BlacklistAll(request: QueryBlacklistAllRequest): Promise<QueryBlacklistAllResponse>;
|
|
64
107
|
}
|
|
65
108
|
export declare class QueryClientImpl implements Query {
|
|
66
109
|
private readonly rpc;
|
|
67
110
|
constructor(rpc: Rpc);
|
|
68
111
|
InternalTransfers(request: QueryInternalTransfersRequest): Promise<QueryInternalTransfersResponse>;
|
|
112
|
+
Blacklist(request: QueryBlacklistRequest): Promise<QueryBlacklistResponse>;
|
|
113
|
+
BlacklistAll(request: QueryBlacklistAllRequest): Promise<QueryBlacklistAllResponse>;
|
|
69
114
|
}
|
|
70
115
|
interface Rpc {
|
|
71
116
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.QueryClientImpl = exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.Coin = exports.InternalTransfer = exports.protobufPackage = void 0;
|
|
6
|
+
exports.QueryClientImpl = exports.QueryBlacklistAllResponse = exports.QueryBlacklistAllRequest = exports.QueryBlacklistResponse = exports.QueryBlacklistRequest = exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.Coin = exports.InternalTransfer = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -417,16 +417,200 @@ exports.QueryInternalTransfersResponse = {
|
|
|
417
417
|
return message;
|
|
418
418
|
},
|
|
419
419
|
};
|
|
420
|
+
const baseQueryBlacklistRequest = { address: "" };
|
|
421
|
+
exports.QueryBlacklistRequest = {
|
|
422
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
423
|
+
if (message.address !== "") {
|
|
424
|
+
writer.uint32(10).string(message.address);
|
|
425
|
+
}
|
|
426
|
+
return writer;
|
|
427
|
+
},
|
|
428
|
+
decode(input, length) {
|
|
429
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
430
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
431
|
+
const message = Object.assign({}, baseQueryBlacklistRequest);
|
|
432
|
+
while (reader.pos < end) {
|
|
433
|
+
const tag = reader.uint32();
|
|
434
|
+
switch (tag >>> 3) {
|
|
435
|
+
case 1:
|
|
436
|
+
message.address = reader.string();
|
|
437
|
+
break;
|
|
438
|
+
default:
|
|
439
|
+
reader.skipType(tag & 7);
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return message;
|
|
444
|
+
},
|
|
445
|
+
fromJSON(object) {
|
|
446
|
+
const message = Object.assign({}, baseQueryBlacklistRequest);
|
|
447
|
+
message.address =
|
|
448
|
+
object.address !== undefined && object.address !== null
|
|
449
|
+
? String(object.address)
|
|
450
|
+
: "";
|
|
451
|
+
return message;
|
|
452
|
+
},
|
|
453
|
+
toJSON(message) {
|
|
454
|
+
const obj = {};
|
|
455
|
+
message.address !== undefined && (obj.address = message.address);
|
|
456
|
+
return obj;
|
|
457
|
+
},
|
|
458
|
+
fromPartial(object) {
|
|
459
|
+
var _a;
|
|
460
|
+
const message = Object.assign({}, baseQueryBlacklistRequest);
|
|
461
|
+
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
|
|
462
|
+
return message;
|
|
463
|
+
},
|
|
464
|
+
};
|
|
465
|
+
const baseQueryBlacklistResponse = { isBlacklisted: false };
|
|
466
|
+
exports.QueryBlacklistResponse = {
|
|
467
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
468
|
+
if (message.isBlacklisted === true) {
|
|
469
|
+
writer.uint32(8).bool(message.isBlacklisted);
|
|
470
|
+
}
|
|
471
|
+
return writer;
|
|
472
|
+
},
|
|
473
|
+
decode(input, length) {
|
|
474
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
475
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
476
|
+
const message = Object.assign({}, baseQueryBlacklistResponse);
|
|
477
|
+
while (reader.pos < end) {
|
|
478
|
+
const tag = reader.uint32();
|
|
479
|
+
switch (tag >>> 3) {
|
|
480
|
+
case 1:
|
|
481
|
+
message.isBlacklisted = reader.bool();
|
|
482
|
+
break;
|
|
483
|
+
default:
|
|
484
|
+
reader.skipType(tag & 7);
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return message;
|
|
489
|
+
},
|
|
490
|
+
fromJSON(object) {
|
|
491
|
+
const message = Object.assign({}, baseQueryBlacklistResponse);
|
|
492
|
+
message.isBlacklisted =
|
|
493
|
+
object.isBlacklisted !== undefined && object.isBlacklisted !== null
|
|
494
|
+
? Boolean(object.isBlacklisted)
|
|
495
|
+
: false;
|
|
496
|
+
return message;
|
|
497
|
+
},
|
|
498
|
+
toJSON(message) {
|
|
499
|
+
const obj = {};
|
|
500
|
+
message.isBlacklisted !== undefined &&
|
|
501
|
+
(obj.isBlacklisted = message.isBlacklisted);
|
|
502
|
+
return obj;
|
|
503
|
+
},
|
|
504
|
+
fromPartial(object) {
|
|
505
|
+
var _a;
|
|
506
|
+
const message = Object.assign({}, baseQueryBlacklistResponse);
|
|
507
|
+
message.isBlacklisted = (_a = object.isBlacklisted) !== null && _a !== void 0 ? _a : false;
|
|
508
|
+
return message;
|
|
509
|
+
},
|
|
510
|
+
};
|
|
511
|
+
const baseQueryBlacklistAllRequest = {};
|
|
512
|
+
exports.QueryBlacklistAllRequest = {
|
|
513
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
514
|
+
return writer;
|
|
515
|
+
},
|
|
516
|
+
decode(input, length) {
|
|
517
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
518
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
519
|
+
const message = Object.assign({}, baseQueryBlacklistAllRequest);
|
|
520
|
+
while (reader.pos < end) {
|
|
521
|
+
const tag = reader.uint32();
|
|
522
|
+
switch (tag >>> 3) {
|
|
523
|
+
default:
|
|
524
|
+
reader.skipType(tag & 7);
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return message;
|
|
529
|
+
},
|
|
530
|
+
fromJSON(_) {
|
|
531
|
+
const message = Object.assign({}, baseQueryBlacklistAllRequest);
|
|
532
|
+
return message;
|
|
533
|
+
},
|
|
534
|
+
toJSON(_) {
|
|
535
|
+
const obj = {};
|
|
536
|
+
return obj;
|
|
537
|
+
},
|
|
538
|
+
fromPartial(_) {
|
|
539
|
+
const message = Object.assign({}, baseQueryBlacklistAllRequest);
|
|
540
|
+
return message;
|
|
541
|
+
},
|
|
542
|
+
};
|
|
543
|
+
const baseQueryBlacklistAllResponse = { address: "" };
|
|
544
|
+
exports.QueryBlacklistAllResponse = {
|
|
545
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
546
|
+
for (const v of message.address) {
|
|
547
|
+
writer.uint32(10).string(v);
|
|
548
|
+
}
|
|
549
|
+
return writer;
|
|
550
|
+
},
|
|
551
|
+
decode(input, length) {
|
|
552
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
553
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
554
|
+
const message = Object.assign({}, baseQueryBlacklistAllResponse);
|
|
555
|
+
message.address = [];
|
|
556
|
+
while (reader.pos < end) {
|
|
557
|
+
const tag = reader.uint32();
|
|
558
|
+
switch (tag >>> 3) {
|
|
559
|
+
case 1:
|
|
560
|
+
message.address.push(reader.string());
|
|
561
|
+
break;
|
|
562
|
+
default:
|
|
563
|
+
reader.skipType(tag & 7);
|
|
564
|
+
break;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return message;
|
|
568
|
+
},
|
|
569
|
+
fromJSON(object) {
|
|
570
|
+
var _a;
|
|
571
|
+
const message = Object.assign({}, baseQueryBlacklistAllResponse);
|
|
572
|
+
message.address = ((_a = object.address) !== null && _a !== void 0 ? _a : []).map((e) => String(e));
|
|
573
|
+
return message;
|
|
574
|
+
},
|
|
575
|
+
toJSON(message) {
|
|
576
|
+
const obj = {};
|
|
577
|
+
if (message.address) {
|
|
578
|
+
obj.address = message.address.map((e) => e);
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
obj.address = [];
|
|
582
|
+
}
|
|
583
|
+
return obj;
|
|
584
|
+
},
|
|
585
|
+
fromPartial(object) {
|
|
586
|
+
var _a;
|
|
587
|
+
const message = Object.assign({}, baseQueryBlacklistAllResponse);
|
|
588
|
+
message.address = ((_a = object.address) !== null && _a !== void 0 ? _a : []).map((e) => e);
|
|
589
|
+
return message;
|
|
590
|
+
},
|
|
591
|
+
};
|
|
420
592
|
class QueryClientImpl {
|
|
421
593
|
constructor(rpc) {
|
|
422
594
|
this.rpc = rpc;
|
|
423
595
|
this.InternalTransfers = this.InternalTransfers.bind(this);
|
|
596
|
+
this.Blacklist = this.Blacklist.bind(this);
|
|
597
|
+
this.BlacklistAll = this.BlacklistAll.bind(this);
|
|
424
598
|
}
|
|
425
599
|
InternalTransfers(request) {
|
|
426
600
|
const data = exports.QueryInternalTransfersRequest.encode(request).finish();
|
|
427
601
|
const promise = this.rpc.request("Switcheo.carbon.bank.Query", "InternalTransfers", data);
|
|
428
602
|
return promise.then((data) => exports.QueryInternalTransfersResponse.decode(new minimal_1.default.Reader(data)));
|
|
429
603
|
}
|
|
604
|
+
Blacklist(request) {
|
|
605
|
+
const data = exports.QueryBlacklistRequest.encode(request).finish();
|
|
606
|
+
const promise = this.rpc.request("Switcheo.carbon.bank.Query", "Blacklist", data);
|
|
607
|
+
return promise.then((data) => exports.QueryBlacklistResponse.decode(new minimal_1.default.Reader(data)));
|
|
608
|
+
}
|
|
609
|
+
BlacklistAll(request) {
|
|
610
|
+
const data = exports.QueryBlacklistAllRequest.encode(request).finish();
|
|
611
|
+
const promise = this.rpc.request("Switcheo.carbon.bank.Query", "BlacklistAll", data);
|
|
612
|
+
return promise.then((data) => exports.QueryBlacklistAllResponse.decode(new minimal_1.default.Reader(data)));
|
|
613
|
+
}
|
|
430
614
|
}
|
|
431
615
|
exports.QueryClientImpl = QueryClientImpl;
|
|
432
616
|
function toTimestamp(date) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
export declare const protobufPackage = "Switcheo.carbon.bank";
|
|
4
|
+
export interface MsgBlacklistAddress {
|
|
5
|
+
authority: string;
|
|
6
|
+
address: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MsgBlacklistAddressResponse {
|
|
9
|
+
}
|
|
10
|
+
export interface MsgUnblacklistAddress {
|
|
11
|
+
authority: string;
|
|
12
|
+
address: string;
|
|
13
|
+
}
|
|
14
|
+
export interface MsgUnblacklistAddressResponse {
|
|
15
|
+
}
|
|
16
|
+
export declare const MsgBlacklistAddress: {
|
|
17
|
+
encode(message: MsgBlacklistAddress, writer?: _m0.Writer): _m0.Writer;
|
|
18
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgBlacklistAddress;
|
|
19
|
+
fromJSON(object: any): MsgBlacklistAddress;
|
|
20
|
+
toJSON(message: MsgBlacklistAddress): unknown;
|
|
21
|
+
fromPartial(object: DeepPartial<MsgBlacklistAddress>): MsgBlacklistAddress;
|
|
22
|
+
};
|
|
23
|
+
export declare const MsgBlacklistAddressResponse: {
|
|
24
|
+
encode(_: MsgBlacklistAddressResponse, writer?: _m0.Writer): _m0.Writer;
|
|
25
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgBlacklistAddressResponse;
|
|
26
|
+
fromJSON(_: any): MsgBlacklistAddressResponse;
|
|
27
|
+
toJSON(_: MsgBlacklistAddressResponse): unknown;
|
|
28
|
+
fromPartial(_: DeepPartial<MsgBlacklistAddressResponse>): MsgBlacklistAddressResponse;
|
|
29
|
+
};
|
|
30
|
+
export declare const MsgUnblacklistAddress: {
|
|
31
|
+
encode(message: MsgUnblacklistAddress, writer?: _m0.Writer): _m0.Writer;
|
|
32
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgUnblacklistAddress;
|
|
33
|
+
fromJSON(object: any): MsgUnblacklistAddress;
|
|
34
|
+
toJSON(message: MsgUnblacklistAddress): unknown;
|
|
35
|
+
fromPartial(object: DeepPartial<MsgUnblacklistAddress>): MsgUnblacklistAddress;
|
|
36
|
+
};
|
|
37
|
+
export declare const MsgUnblacklistAddressResponse: {
|
|
38
|
+
encode(_: MsgUnblacklistAddressResponse, writer?: _m0.Writer): _m0.Writer;
|
|
39
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgUnblacklistAddressResponse;
|
|
40
|
+
fromJSON(_: any): MsgUnblacklistAddressResponse;
|
|
41
|
+
toJSON(_: MsgUnblacklistAddressResponse): unknown;
|
|
42
|
+
fromPartial(_: DeepPartial<MsgUnblacklistAddressResponse>): MsgUnblacklistAddressResponse;
|
|
43
|
+
};
|
|
44
|
+
/** Msg defines the Msg service. */
|
|
45
|
+
export interface Msg {
|
|
46
|
+
BlacklistAddress(request: MsgBlacklistAddress): Promise<MsgBlacklistAddressResponse>;
|
|
47
|
+
/** this line is used by starport scaffolding # proto/tx/rpc */
|
|
48
|
+
UnblacklistAddress(request: MsgUnblacklistAddress): Promise<MsgUnblacklistAddressResponse>;
|
|
49
|
+
}
|
|
50
|
+
export declare class MsgClientImpl implements Msg {
|
|
51
|
+
private readonly rpc;
|
|
52
|
+
constructor(rpc: Rpc);
|
|
53
|
+
BlacklistAddress(request: MsgBlacklistAddress): Promise<MsgBlacklistAddressResponse>;
|
|
54
|
+
UnblacklistAddress(request: MsgUnblacklistAddress): Promise<MsgUnblacklistAddressResponse>;
|
|
55
|
+
}
|
|
56
|
+
interface Rpc {
|
|
57
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
58
|
+
}
|
|
59
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
60
|
+
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 {} ? {
|
|
61
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
62
|
+
} : Partial<T>;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,210 @@
|
|
|
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.MsgClientImpl = exports.MsgUnblacklistAddressResponse = exports.MsgUnblacklistAddress = exports.MsgBlacklistAddressResponse = exports.MsgBlacklistAddress = 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 = "Switcheo.carbon.bank";
|
|
11
|
+
const baseMsgBlacklistAddress = { authority: "", address: "" };
|
|
12
|
+
exports.MsgBlacklistAddress = {
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
if (message.authority !== "") {
|
|
15
|
+
writer.uint32(10).string(message.authority);
|
|
16
|
+
}
|
|
17
|
+
if (message.address !== "") {
|
|
18
|
+
writer.uint32(18).string(message.address);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = Object.assign({}, baseMsgBlacklistAddress);
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1:
|
|
30
|
+
message.authority = reader.string();
|
|
31
|
+
break;
|
|
32
|
+
case 2:
|
|
33
|
+
message.address = reader.string();
|
|
34
|
+
break;
|
|
35
|
+
default:
|
|
36
|
+
reader.skipType(tag & 7);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return message;
|
|
41
|
+
},
|
|
42
|
+
fromJSON(object) {
|
|
43
|
+
const message = Object.assign({}, baseMsgBlacklistAddress);
|
|
44
|
+
message.authority =
|
|
45
|
+
object.authority !== undefined && object.authority !== null
|
|
46
|
+
? String(object.authority)
|
|
47
|
+
: "";
|
|
48
|
+
message.address =
|
|
49
|
+
object.address !== undefined && object.address !== null
|
|
50
|
+
? String(object.address)
|
|
51
|
+
: "";
|
|
52
|
+
return message;
|
|
53
|
+
},
|
|
54
|
+
toJSON(message) {
|
|
55
|
+
const obj = {};
|
|
56
|
+
message.authority !== undefined && (obj.authority = message.authority);
|
|
57
|
+
message.address !== undefined && (obj.address = message.address);
|
|
58
|
+
return obj;
|
|
59
|
+
},
|
|
60
|
+
fromPartial(object) {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
const message = Object.assign({}, baseMsgBlacklistAddress);
|
|
63
|
+
message.authority = (_a = object.authority) !== null && _a !== void 0 ? _a : "";
|
|
64
|
+
message.address = (_b = object.address) !== null && _b !== void 0 ? _b : "";
|
|
65
|
+
return message;
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
const baseMsgBlacklistAddressResponse = {};
|
|
69
|
+
exports.MsgBlacklistAddressResponse = {
|
|
70
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
71
|
+
return writer;
|
|
72
|
+
},
|
|
73
|
+
decode(input, length) {
|
|
74
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
75
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
76
|
+
const message = Object.assign({}, baseMsgBlacklistAddressResponse);
|
|
77
|
+
while (reader.pos < end) {
|
|
78
|
+
const tag = reader.uint32();
|
|
79
|
+
switch (tag >>> 3) {
|
|
80
|
+
default:
|
|
81
|
+
reader.skipType(tag & 7);
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return message;
|
|
86
|
+
},
|
|
87
|
+
fromJSON(_) {
|
|
88
|
+
const message = Object.assign({}, baseMsgBlacklistAddressResponse);
|
|
89
|
+
return message;
|
|
90
|
+
},
|
|
91
|
+
toJSON(_) {
|
|
92
|
+
const obj = {};
|
|
93
|
+
return obj;
|
|
94
|
+
},
|
|
95
|
+
fromPartial(_) {
|
|
96
|
+
const message = Object.assign({}, baseMsgBlacklistAddressResponse);
|
|
97
|
+
return message;
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
const baseMsgUnblacklistAddress = { authority: "", address: "" };
|
|
101
|
+
exports.MsgUnblacklistAddress = {
|
|
102
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
103
|
+
if (message.authority !== "") {
|
|
104
|
+
writer.uint32(10).string(message.authority);
|
|
105
|
+
}
|
|
106
|
+
if (message.address !== "") {
|
|
107
|
+
writer.uint32(18).string(message.address);
|
|
108
|
+
}
|
|
109
|
+
return writer;
|
|
110
|
+
},
|
|
111
|
+
decode(input, length) {
|
|
112
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
113
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
114
|
+
const message = Object.assign({}, baseMsgUnblacklistAddress);
|
|
115
|
+
while (reader.pos < end) {
|
|
116
|
+
const tag = reader.uint32();
|
|
117
|
+
switch (tag >>> 3) {
|
|
118
|
+
case 1:
|
|
119
|
+
message.authority = reader.string();
|
|
120
|
+
break;
|
|
121
|
+
case 2:
|
|
122
|
+
message.address = reader.string();
|
|
123
|
+
break;
|
|
124
|
+
default:
|
|
125
|
+
reader.skipType(tag & 7);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return message;
|
|
130
|
+
},
|
|
131
|
+
fromJSON(object) {
|
|
132
|
+
const message = Object.assign({}, baseMsgUnblacklistAddress);
|
|
133
|
+
message.authority =
|
|
134
|
+
object.authority !== undefined && object.authority !== null
|
|
135
|
+
? String(object.authority)
|
|
136
|
+
: "";
|
|
137
|
+
message.address =
|
|
138
|
+
object.address !== undefined && object.address !== null
|
|
139
|
+
? String(object.address)
|
|
140
|
+
: "";
|
|
141
|
+
return message;
|
|
142
|
+
},
|
|
143
|
+
toJSON(message) {
|
|
144
|
+
const obj = {};
|
|
145
|
+
message.authority !== undefined && (obj.authority = message.authority);
|
|
146
|
+
message.address !== undefined && (obj.address = message.address);
|
|
147
|
+
return obj;
|
|
148
|
+
},
|
|
149
|
+
fromPartial(object) {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
const message = Object.assign({}, baseMsgUnblacklistAddress);
|
|
152
|
+
message.authority = (_a = object.authority) !== null && _a !== void 0 ? _a : "";
|
|
153
|
+
message.address = (_b = object.address) !== null && _b !== void 0 ? _b : "";
|
|
154
|
+
return message;
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
const baseMsgUnblacklistAddressResponse = {};
|
|
158
|
+
exports.MsgUnblacklistAddressResponse = {
|
|
159
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
160
|
+
return writer;
|
|
161
|
+
},
|
|
162
|
+
decode(input, length) {
|
|
163
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
164
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
165
|
+
const message = Object.assign({}, baseMsgUnblacklistAddressResponse);
|
|
166
|
+
while (reader.pos < end) {
|
|
167
|
+
const tag = reader.uint32();
|
|
168
|
+
switch (tag >>> 3) {
|
|
169
|
+
default:
|
|
170
|
+
reader.skipType(tag & 7);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return message;
|
|
175
|
+
},
|
|
176
|
+
fromJSON(_) {
|
|
177
|
+
const message = Object.assign({}, baseMsgUnblacklistAddressResponse);
|
|
178
|
+
return message;
|
|
179
|
+
},
|
|
180
|
+
toJSON(_) {
|
|
181
|
+
const obj = {};
|
|
182
|
+
return obj;
|
|
183
|
+
},
|
|
184
|
+
fromPartial(_) {
|
|
185
|
+
const message = Object.assign({}, baseMsgUnblacklistAddressResponse);
|
|
186
|
+
return message;
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
class MsgClientImpl {
|
|
190
|
+
constructor(rpc) {
|
|
191
|
+
this.rpc = rpc;
|
|
192
|
+
this.BlacklistAddress = this.BlacklistAddress.bind(this);
|
|
193
|
+
this.UnblacklistAddress = this.UnblacklistAddress.bind(this);
|
|
194
|
+
}
|
|
195
|
+
BlacklistAddress(request) {
|
|
196
|
+
const data = exports.MsgBlacklistAddress.encode(request).finish();
|
|
197
|
+
const promise = this.rpc.request("Switcheo.carbon.bank.Msg", "BlacklistAddress", data);
|
|
198
|
+
return promise.then((data) => exports.MsgBlacklistAddressResponse.decode(new minimal_1.default.Reader(data)));
|
|
199
|
+
}
|
|
200
|
+
UnblacklistAddress(request) {
|
|
201
|
+
const data = exports.MsgUnblacklistAddress.encode(request).finish();
|
|
202
|
+
const promise = this.rpc.request("Switcheo.carbon.bank.Msg", "UnblacklistAddress", data);
|
|
203
|
+
return promise.then((data) => exports.MsgUnblacklistAddressResponse.decode(new minimal_1.default.Reader(data)));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
exports.MsgClientImpl = MsgClientImpl;
|
|
207
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
208
|
+
minimal_1.default.util.Long = long_1.default;
|
|
209
|
+
minimal_1.default.configure();
|
|
210
|
+
}
|