@verana-labs/verana-types 0.10.1-dev.18 → 0.10.1-dev.19
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/amino-converter/td.js +5 -4
- package/dist/amino-converter/xr.d.ts +2 -0
- package/dist/amino-converter/xr.js +42 -10
- package/dist/codec/verana/cs/v1/query.d.ts +52 -1
- package/dist/codec/verana/cs/v1/query.js +243 -1
- package/dist/codec/verana/td/v1/genesis.d.ts +10 -2
- package/dist/codec/verana/td/v1/genesis.js +129 -27
- package/dist/codec/verana/td/v1/query.d.ts +1 -1
- package/dist/codec/verana/td/v1/query.js +24 -10
- package/dist/codec/verana/td/v1/tx.d.ts +2 -2
- package/dist/codec/verana/td/v1/tx.js +10 -10
- package/dist/codec/verana/td/v1/types.d.ts +4 -2
- package/dist/codec/verana/td/v1/types.js +37 -37
- package/dist/codec/verana/xr/v1/genesis.d.ts +3 -1
- package/dist/codec/verana/xr/v1/genesis.js +20 -3
- package/dist/codec/verana/xr/v1/query.d.ts +5 -1
- package/dist/codec/verana/xr/v1/query.js +46 -4
- package/dist/codec/verana/xr/v1/tx.d.ts +96 -7
- package/dist/codec/verana/xr/v1/tx.js +416 -57
- package/dist/signing.d.ts +4 -0
- package/dist/signing.js +6 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MsgSlashTrustDepositAminoConverter = exports.MsgRepaySlashedTrustDepositAminoConverter = exports.MsgReclaimTrustDepositYieldAminoConverter = void 0;
|
|
4
4
|
const tx_1 = require("../codec/verana/td/v1/tx");
|
|
5
|
+
const helpers_1 = require("./util/helpers");
|
|
5
6
|
exports.MsgReclaimTrustDepositYieldAminoConverter = {
|
|
6
7
|
aminoType: "verana/x/td/MsgReclaimTrustDepositYield",
|
|
7
8
|
// [MOD-TD-MSG-2-1] Spec v4 draft 13: parameters are corporation + operator only.
|
|
@@ -29,16 +30,16 @@ exports.MsgRepaySlashedTrustDepositAminoConverter = {
|
|
|
29
30
|
};
|
|
30
31
|
exports.MsgSlashTrustDepositAminoConverter = {
|
|
31
32
|
aminoType: "verana/x/td/MsgSlashTrustDeposit",
|
|
32
|
-
// [MOD-TD-MSG-5
|
|
33
|
-
toAmino: ({ authority,
|
|
33
|
+
// [MOD-TD-MSG-5] v4-rc3: target corporation_id (uint64); reason mandatory.
|
|
34
|
+
toAmino: ({ authority, corporationId, deposit, reason }) => ({
|
|
34
35
|
authority,
|
|
35
|
-
|
|
36
|
+
corporation_id: (0, helpers_1.u64ToStrIfNonZero)(corporationId),
|
|
36
37
|
deposit,
|
|
37
38
|
reason,
|
|
38
39
|
}),
|
|
39
40
|
fromAmino: (value) => tx_1.MsgSlashTrustDeposit.fromPartial({
|
|
40
41
|
authority: value.authority,
|
|
41
|
-
|
|
42
|
+
corporationId: (0, helpers_1.strToU64)(value.corporation_id) != null ? Number((0, helpers_1.strToU64)(value.corporation_id).toString()) : 0,
|
|
42
43
|
deposit: value.deposit,
|
|
43
44
|
reason: value.reason,
|
|
44
45
|
}),
|
|
@@ -2,3 +2,5 @@ import type { AminoConverter } from "@cosmjs/stargate";
|
|
|
2
2
|
export declare const MsgCreateExchangeRateAminoConverter: AminoConverter;
|
|
3
3
|
export declare const MsgUpdateExchangeRateAminoConverter: AminoConverter;
|
|
4
4
|
export declare const MsgSetExchangeRateStateAminoConverter: AminoConverter;
|
|
5
|
+
export declare const MsgGrantExchangeRateAuthorizationAminoConverter: AminoConverter;
|
|
6
|
+
export declare const MsgRevokeExchangeRateAuthorizationAminoConverter: AminoConverter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MsgSetExchangeRateStateAminoConverter = exports.MsgUpdateExchangeRateAminoConverter = exports.MsgCreateExchangeRateAminoConverter = void 0;
|
|
3
|
+
exports.MsgRevokeExchangeRateAuthorizationAminoConverter = exports.MsgGrantExchangeRateAuthorizationAminoConverter = exports.MsgSetExchangeRateStateAminoConverter = exports.MsgUpdateExchangeRateAminoConverter = exports.MsgCreateExchangeRateAminoConverter = void 0;
|
|
4
4
|
const tx_1 = require("../codec/verana/xr/v1/tx");
|
|
5
5
|
const helpers_1 = require("./util/helpers");
|
|
6
6
|
exports.MsgCreateExchangeRateAminoConverter = {
|
|
@@ -37,22 +37,16 @@ exports.MsgCreateExchangeRateAminoConverter = {
|
|
|
37
37
|
exports.MsgUpdateExchangeRateAminoConverter = {
|
|
38
38
|
aminoType: "verana/x/xr/MsgUpdateExchangeRate",
|
|
39
39
|
toAmino: (m) => (0, helpers_1.clean)({
|
|
40
|
-
authority: m.authority || undefined,
|
|
41
40
|
operator: m.operator || undefined,
|
|
42
41
|
id: (0, helpers_1.u64ToStr)(m.id),
|
|
43
42
|
rate: m.rate || undefined,
|
|
44
|
-
rate_scale: m.rateScale ? (0, helpers_1.u32ToAmino)(m.rateScale) : undefined,
|
|
45
|
-
validity_duration: m.validityDuration ? (0, helpers_1.durationToAmino)(m.validityDuration) : undefined,
|
|
46
43
|
}),
|
|
47
44
|
fromAmino: (a) => {
|
|
48
|
-
var _a, _b
|
|
45
|
+
var _a, _b;
|
|
49
46
|
return tx_1.MsgUpdateExchangeRate.fromPartial({
|
|
50
|
-
|
|
51
|
-
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
47
|
+
operator: (_a = a.operator) !== null && _a !== void 0 ? _a : "",
|
|
52
48
|
id: (0, helpers_1.strToU64)(a.id) != null ? Number((0, helpers_1.strToU64)(a.id).toString()) : 0,
|
|
53
|
-
rate: (
|
|
54
|
-
rateScale: (_d = a.rate_scale) !== null && _d !== void 0 ? _d : 0,
|
|
55
|
-
validityDuration: (0, helpers_1.aminoToDuration)(a.validity_duration),
|
|
49
|
+
rate: (_b = a.rate) !== null && _b !== void 0 ? _b : "",
|
|
56
50
|
});
|
|
57
51
|
},
|
|
58
52
|
};
|
|
@@ -72,3 +66,41 @@ exports.MsgSetExchangeRateStateAminoConverter = {
|
|
|
72
66
|
});
|
|
73
67
|
},
|
|
74
68
|
};
|
|
69
|
+
exports.MsgGrantExchangeRateAuthorizationAminoConverter = {
|
|
70
|
+
aminoType: "verana/x/xr/MsgGrantXrAuthz",
|
|
71
|
+
toAmino: (m) => (0, helpers_1.clean)({
|
|
72
|
+
authority: m.authority || undefined,
|
|
73
|
+
xr_id: (0, helpers_1.u64ToStr)(m.xrId),
|
|
74
|
+
operator: m.operator || undefined,
|
|
75
|
+
expiration: (0, helpers_1.dateToIsoAmino)(m.expiration),
|
|
76
|
+
min_interval: (0, helpers_1.durationToAmino)(m.minInterval),
|
|
77
|
+
max_deviation_bps: (0, helpers_1.u32ToAmino)(m.maxDeviationBps),
|
|
78
|
+
}),
|
|
79
|
+
fromAmino: (a) => {
|
|
80
|
+
var _a, _b, _c;
|
|
81
|
+
return tx_1.MsgGrantExchangeRateAuthorization.fromPartial({
|
|
82
|
+
authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
|
|
83
|
+
xrId: (0, helpers_1.strToU64)(a.xr_id) != null ? Number((0, helpers_1.strToU64)(a.xr_id).toString()) : 0,
|
|
84
|
+
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
85
|
+
expiration: (0, helpers_1.isoToDate)(a.expiration),
|
|
86
|
+
minInterval: (0, helpers_1.aminoToDuration)(a.min_interval),
|
|
87
|
+
maxDeviationBps: (_c = a.max_deviation_bps) !== null && _c !== void 0 ? _c : 0,
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
exports.MsgRevokeExchangeRateAuthorizationAminoConverter = {
|
|
92
|
+
aminoType: "verana/x/xr/MsgRevokeXrAuthz",
|
|
93
|
+
toAmino: (m) => (0, helpers_1.clean)({
|
|
94
|
+
authority: m.authority || undefined,
|
|
95
|
+
xr_id: (0, helpers_1.u64ToStr)(m.xrId),
|
|
96
|
+
operator: m.operator || undefined,
|
|
97
|
+
}),
|
|
98
|
+
fromAmino: (a) => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
return tx_1.MsgRevokeExchangeRateAuthorization.fromPartial({
|
|
101
|
+
authority: (_a = a.authority) !== null && _a !== void 0 ? _a : "",
|
|
102
|
+
xrId: (0, helpers_1.strToU64)(a.xr_id) != null ? Number((0, helpers_1.strToU64)(a.xr_id).toString()) : 0,
|
|
103
|
+
operator: (_b = a.operator) !== null && _b !== void 0 ? _b : "",
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _m0 from "protobufjs/minimal";
|
|
2
2
|
import { Params } from "./params";
|
|
3
|
-
import { CredentialSchema, HolderOnboardingMode, IssuerOnboardingMode, VerifierOnboardingMode } from "./types";
|
|
3
|
+
import { CredentialSchema, HolderOnboardingMode, IssuerOnboardingMode, SchemaAuthorizationPolicy, SchemaAuthorizationPolicyRole, VerifierOnboardingMode } from "./types";
|
|
4
4
|
export declare const protobufPackage = "verana.cs.v1";
|
|
5
5
|
/** QueryParamsRequest is request type for the Query/Params RPC method. */
|
|
6
6
|
export interface QueryParamsRequest {
|
|
@@ -35,6 +35,19 @@ export interface QueryRenderJsonSchemaRequest {
|
|
|
35
35
|
export interface QueryRenderJsonSchemaResponse {
|
|
36
36
|
schema: string;
|
|
37
37
|
}
|
|
38
|
+
export interface QueryGetSchemaAuthorizationPolicyRequest {
|
|
39
|
+
id: number;
|
|
40
|
+
}
|
|
41
|
+
export interface QueryGetSchemaAuthorizationPolicyResponse {
|
|
42
|
+
authorizationPolicy: SchemaAuthorizationPolicy | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface QueryListSchemaAuthorizationPoliciesRequest {
|
|
45
|
+
schemaId: number;
|
|
46
|
+
role: SchemaAuthorizationPolicyRole;
|
|
47
|
+
}
|
|
48
|
+
export interface QueryListSchemaAuthorizationPoliciesResponse {
|
|
49
|
+
policies: SchemaAuthorizationPolicy[];
|
|
50
|
+
}
|
|
38
51
|
export declare const QueryParamsRequest: {
|
|
39
52
|
encode(_: QueryParamsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
40
53
|
decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest;
|
|
@@ -99,6 +112,38 @@ export declare const QueryRenderJsonSchemaResponse: {
|
|
|
99
112
|
create<I extends Exact<DeepPartial<QueryRenderJsonSchemaResponse>, I>>(base?: I): QueryRenderJsonSchemaResponse;
|
|
100
113
|
fromPartial<I extends Exact<DeepPartial<QueryRenderJsonSchemaResponse>, I>>(object: I): QueryRenderJsonSchemaResponse;
|
|
101
114
|
};
|
|
115
|
+
export declare const QueryGetSchemaAuthorizationPolicyRequest: {
|
|
116
|
+
encode(message: QueryGetSchemaAuthorizationPolicyRequest, writer?: _m0.Writer): _m0.Writer;
|
|
117
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetSchemaAuthorizationPolicyRequest;
|
|
118
|
+
fromJSON(object: any): QueryGetSchemaAuthorizationPolicyRequest;
|
|
119
|
+
toJSON(message: QueryGetSchemaAuthorizationPolicyRequest): unknown;
|
|
120
|
+
create<I extends Exact<DeepPartial<QueryGetSchemaAuthorizationPolicyRequest>, I>>(base?: I): QueryGetSchemaAuthorizationPolicyRequest;
|
|
121
|
+
fromPartial<I extends Exact<DeepPartial<QueryGetSchemaAuthorizationPolicyRequest>, I>>(object: I): QueryGetSchemaAuthorizationPolicyRequest;
|
|
122
|
+
};
|
|
123
|
+
export declare const QueryGetSchemaAuthorizationPolicyResponse: {
|
|
124
|
+
encode(message: QueryGetSchemaAuthorizationPolicyResponse, writer?: _m0.Writer): _m0.Writer;
|
|
125
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetSchemaAuthorizationPolicyResponse;
|
|
126
|
+
fromJSON(object: any): QueryGetSchemaAuthorizationPolicyResponse;
|
|
127
|
+
toJSON(message: QueryGetSchemaAuthorizationPolicyResponse): unknown;
|
|
128
|
+
create<I extends Exact<DeepPartial<QueryGetSchemaAuthorizationPolicyResponse>, I>>(base?: I): QueryGetSchemaAuthorizationPolicyResponse;
|
|
129
|
+
fromPartial<I extends Exact<DeepPartial<QueryGetSchemaAuthorizationPolicyResponse>, I>>(object: I): QueryGetSchemaAuthorizationPolicyResponse;
|
|
130
|
+
};
|
|
131
|
+
export declare const QueryListSchemaAuthorizationPoliciesRequest: {
|
|
132
|
+
encode(message: QueryListSchemaAuthorizationPoliciesRequest, writer?: _m0.Writer): _m0.Writer;
|
|
133
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryListSchemaAuthorizationPoliciesRequest;
|
|
134
|
+
fromJSON(object: any): QueryListSchemaAuthorizationPoliciesRequest;
|
|
135
|
+
toJSON(message: QueryListSchemaAuthorizationPoliciesRequest): unknown;
|
|
136
|
+
create<I extends Exact<DeepPartial<QueryListSchemaAuthorizationPoliciesRequest>, I>>(base?: I): QueryListSchemaAuthorizationPoliciesRequest;
|
|
137
|
+
fromPartial<I extends Exact<DeepPartial<QueryListSchemaAuthorizationPoliciesRequest>, I>>(object: I): QueryListSchemaAuthorizationPoliciesRequest;
|
|
138
|
+
};
|
|
139
|
+
export declare const QueryListSchemaAuthorizationPoliciesResponse: {
|
|
140
|
+
encode(message: QueryListSchemaAuthorizationPoliciesResponse, writer?: _m0.Writer): _m0.Writer;
|
|
141
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): QueryListSchemaAuthorizationPoliciesResponse;
|
|
142
|
+
fromJSON(object: any): QueryListSchemaAuthorizationPoliciesResponse;
|
|
143
|
+
toJSON(message: QueryListSchemaAuthorizationPoliciesResponse): unknown;
|
|
144
|
+
create<I extends Exact<DeepPartial<QueryListSchemaAuthorizationPoliciesResponse>, I>>(base?: I): QueryListSchemaAuthorizationPoliciesResponse;
|
|
145
|
+
fromPartial<I extends Exact<DeepPartial<QueryListSchemaAuthorizationPoliciesResponse>, I>>(object: I): QueryListSchemaAuthorizationPoliciesResponse;
|
|
146
|
+
};
|
|
102
147
|
/** Query defines the gRPC querier service. */
|
|
103
148
|
export interface Query {
|
|
104
149
|
/** Parameters queries the parameters of the module. */
|
|
@@ -109,6 +154,10 @@ export interface Query {
|
|
|
109
154
|
GetCredentialSchema(request: QueryGetCredentialSchemaRequest): Promise<QueryGetCredentialSchemaResponse>;
|
|
110
155
|
/** RenderJsonSchema returns the JSON schema definition */
|
|
111
156
|
RenderJsonSchema(request: QueryRenderJsonSchemaRequest): Promise<QueryRenderJsonSchemaResponse>;
|
|
157
|
+
/** GetSchemaAuthorizationPolicy returns a SchemaAuthorizationPolicy by id. */
|
|
158
|
+
GetSchemaAuthorizationPolicy(request: QueryGetSchemaAuthorizationPolicyRequest): Promise<QueryGetSchemaAuthorizationPolicyResponse>;
|
|
159
|
+
/** ListSchemaAuthorizationPolicies lists policies for a (schema_id, role) pair, ordered by ascending version. */
|
|
160
|
+
ListSchemaAuthorizationPolicies(request: QueryListSchemaAuthorizationPoliciesRequest): Promise<QueryListSchemaAuthorizationPoliciesResponse>;
|
|
112
161
|
}
|
|
113
162
|
export declare const QueryServiceName = "verana.cs.v1.Query";
|
|
114
163
|
export declare class QueryClientImpl implements Query {
|
|
@@ -121,6 +170,8 @@ export declare class QueryClientImpl implements Query {
|
|
|
121
170
|
ListCredentialSchemas(request: QueryListCredentialSchemasRequest): Promise<QueryListCredentialSchemasResponse>;
|
|
122
171
|
GetCredentialSchema(request: QueryGetCredentialSchemaRequest): Promise<QueryGetCredentialSchemaResponse>;
|
|
123
172
|
RenderJsonSchema(request: QueryRenderJsonSchemaRequest): Promise<QueryRenderJsonSchemaResponse>;
|
|
173
|
+
GetSchemaAuthorizationPolicy(request: QueryGetSchemaAuthorizationPolicyRequest): Promise<QueryGetSchemaAuthorizationPolicyResponse>;
|
|
174
|
+
ListSchemaAuthorizationPolicies(request: QueryListSchemaAuthorizationPoliciesRequest): Promise<QueryListSchemaAuthorizationPoliciesResponse>;
|
|
124
175
|
}
|
|
125
176
|
interface Rpc {
|
|
126
177
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
@@ -38,7 +38,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
};
|
|
39
39
|
})();
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.QueryClientImpl = exports.QueryServiceName = exports.QueryRenderJsonSchemaResponse = exports.QueryRenderJsonSchemaRequest = exports.QueryGetCredentialSchemaResponse = exports.QueryGetCredentialSchemaRequest = exports.QueryListCredentialSchemasResponse = exports.QueryListCredentialSchemasRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.protobufPackage = void 0;
|
|
41
|
+
exports.QueryClientImpl = exports.QueryServiceName = exports.QueryListSchemaAuthorizationPoliciesResponse = exports.QueryListSchemaAuthorizationPoliciesRequest = exports.QueryGetSchemaAuthorizationPolicyResponse = exports.QueryGetSchemaAuthorizationPolicyRequest = exports.QueryRenderJsonSchemaResponse = exports.QueryRenderJsonSchemaRequest = exports.QueryGetCredentialSchemaResponse = exports.QueryGetCredentialSchemaRequest = exports.QueryListCredentialSchemasResponse = exports.QueryListCredentialSchemasRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.protobufPackage = void 0;
|
|
42
42
|
/* eslint-disable */
|
|
43
43
|
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
44
44
|
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
@@ -547,6 +547,236 @@ exports.QueryRenderJsonSchemaResponse = {
|
|
|
547
547
|
return message;
|
|
548
548
|
},
|
|
549
549
|
};
|
|
550
|
+
function createBaseQueryGetSchemaAuthorizationPolicyRequest() {
|
|
551
|
+
return { id: 0 };
|
|
552
|
+
}
|
|
553
|
+
exports.QueryGetSchemaAuthorizationPolicyRequest = {
|
|
554
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
555
|
+
if (message.id !== 0) {
|
|
556
|
+
writer.uint32(8).uint64(message.id);
|
|
557
|
+
}
|
|
558
|
+
return writer;
|
|
559
|
+
},
|
|
560
|
+
decode(input, length) {
|
|
561
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
562
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
563
|
+
const message = createBaseQueryGetSchemaAuthorizationPolicyRequest();
|
|
564
|
+
while (reader.pos < end) {
|
|
565
|
+
const tag = reader.uint32();
|
|
566
|
+
switch (tag >>> 3) {
|
|
567
|
+
case 1:
|
|
568
|
+
if (tag !== 8) {
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
message.id = longToNumber(reader.uint64());
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
reader.skipType(tag & 7);
|
|
578
|
+
}
|
|
579
|
+
return message;
|
|
580
|
+
},
|
|
581
|
+
fromJSON(object) {
|
|
582
|
+
return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
|
|
583
|
+
},
|
|
584
|
+
toJSON(message) {
|
|
585
|
+
const obj = {};
|
|
586
|
+
if (message.id !== 0) {
|
|
587
|
+
obj.id = Math.round(message.id);
|
|
588
|
+
}
|
|
589
|
+
return obj;
|
|
590
|
+
},
|
|
591
|
+
create(base) {
|
|
592
|
+
return exports.QueryGetSchemaAuthorizationPolicyRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
593
|
+
},
|
|
594
|
+
fromPartial(object) {
|
|
595
|
+
var _a;
|
|
596
|
+
const message = createBaseQueryGetSchemaAuthorizationPolicyRequest();
|
|
597
|
+
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
|
|
598
|
+
return message;
|
|
599
|
+
},
|
|
600
|
+
};
|
|
601
|
+
function createBaseQueryGetSchemaAuthorizationPolicyResponse() {
|
|
602
|
+
return { authorizationPolicy: undefined };
|
|
603
|
+
}
|
|
604
|
+
exports.QueryGetSchemaAuthorizationPolicyResponse = {
|
|
605
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
606
|
+
if (message.authorizationPolicy !== undefined) {
|
|
607
|
+
types_1.SchemaAuthorizationPolicy.encode(message.authorizationPolicy, writer.uint32(10).fork()).ldelim();
|
|
608
|
+
}
|
|
609
|
+
return writer;
|
|
610
|
+
},
|
|
611
|
+
decode(input, length) {
|
|
612
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
613
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
614
|
+
const message = createBaseQueryGetSchemaAuthorizationPolicyResponse();
|
|
615
|
+
while (reader.pos < end) {
|
|
616
|
+
const tag = reader.uint32();
|
|
617
|
+
switch (tag >>> 3) {
|
|
618
|
+
case 1:
|
|
619
|
+
if (tag !== 10) {
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
message.authorizationPolicy = types_1.SchemaAuthorizationPolicy.decode(reader, reader.uint32());
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
628
|
+
reader.skipType(tag & 7);
|
|
629
|
+
}
|
|
630
|
+
return message;
|
|
631
|
+
},
|
|
632
|
+
fromJSON(object) {
|
|
633
|
+
return {
|
|
634
|
+
authorizationPolicy: isSet(object.authorizationPolicy)
|
|
635
|
+
? types_1.SchemaAuthorizationPolicy.fromJSON(object.authorizationPolicy)
|
|
636
|
+
: undefined,
|
|
637
|
+
};
|
|
638
|
+
},
|
|
639
|
+
toJSON(message) {
|
|
640
|
+
const obj = {};
|
|
641
|
+
if (message.authorizationPolicy !== undefined) {
|
|
642
|
+
obj.authorizationPolicy = types_1.SchemaAuthorizationPolicy.toJSON(message.authorizationPolicy);
|
|
643
|
+
}
|
|
644
|
+
return obj;
|
|
645
|
+
},
|
|
646
|
+
create(base) {
|
|
647
|
+
return exports.QueryGetSchemaAuthorizationPolicyResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
648
|
+
},
|
|
649
|
+
fromPartial(object) {
|
|
650
|
+
const message = createBaseQueryGetSchemaAuthorizationPolicyResponse();
|
|
651
|
+
message.authorizationPolicy = (object.authorizationPolicy !== undefined && object.authorizationPolicy !== null)
|
|
652
|
+
? types_1.SchemaAuthorizationPolicy.fromPartial(object.authorizationPolicy)
|
|
653
|
+
: undefined;
|
|
654
|
+
return message;
|
|
655
|
+
},
|
|
656
|
+
};
|
|
657
|
+
function createBaseQueryListSchemaAuthorizationPoliciesRequest() {
|
|
658
|
+
return { schemaId: 0, role: 0 };
|
|
659
|
+
}
|
|
660
|
+
exports.QueryListSchemaAuthorizationPoliciesRequest = {
|
|
661
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
662
|
+
if (message.schemaId !== 0) {
|
|
663
|
+
writer.uint32(8).uint64(message.schemaId);
|
|
664
|
+
}
|
|
665
|
+
if (message.role !== 0) {
|
|
666
|
+
writer.uint32(16).int32(message.role);
|
|
667
|
+
}
|
|
668
|
+
return writer;
|
|
669
|
+
},
|
|
670
|
+
decode(input, length) {
|
|
671
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
672
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
673
|
+
const message = createBaseQueryListSchemaAuthorizationPoliciesRequest();
|
|
674
|
+
while (reader.pos < end) {
|
|
675
|
+
const tag = reader.uint32();
|
|
676
|
+
switch (tag >>> 3) {
|
|
677
|
+
case 1:
|
|
678
|
+
if (tag !== 8) {
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
message.schemaId = longToNumber(reader.uint64());
|
|
682
|
+
continue;
|
|
683
|
+
case 2:
|
|
684
|
+
if (tag !== 16) {
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
687
|
+
message.role = reader.int32();
|
|
688
|
+
continue;
|
|
689
|
+
}
|
|
690
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
691
|
+
break;
|
|
692
|
+
}
|
|
693
|
+
reader.skipType(tag & 7);
|
|
694
|
+
}
|
|
695
|
+
return message;
|
|
696
|
+
},
|
|
697
|
+
fromJSON(object) {
|
|
698
|
+
return {
|
|
699
|
+
schemaId: isSet(object.schemaId) ? globalThis.Number(object.schemaId) : 0,
|
|
700
|
+
role: isSet(object.role) ? (0, types_1.schemaAuthorizationPolicyRoleFromJSON)(object.role) : 0,
|
|
701
|
+
};
|
|
702
|
+
},
|
|
703
|
+
toJSON(message) {
|
|
704
|
+
const obj = {};
|
|
705
|
+
if (message.schemaId !== 0) {
|
|
706
|
+
obj.schemaId = Math.round(message.schemaId);
|
|
707
|
+
}
|
|
708
|
+
if (message.role !== 0) {
|
|
709
|
+
obj.role = (0, types_1.schemaAuthorizationPolicyRoleToJSON)(message.role);
|
|
710
|
+
}
|
|
711
|
+
return obj;
|
|
712
|
+
},
|
|
713
|
+
create(base) {
|
|
714
|
+
return exports.QueryListSchemaAuthorizationPoliciesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
715
|
+
},
|
|
716
|
+
fromPartial(object) {
|
|
717
|
+
var _a, _b;
|
|
718
|
+
const message = createBaseQueryListSchemaAuthorizationPoliciesRequest();
|
|
719
|
+
message.schemaId = (_a = object.schemaId) !== null && _a !== void 0 ? _a : 0;
|
|
720
|
+
message.role = (_b = object.role) !== null && _b !== void 0 ? _b : 0;
|
|
721
|
+
return message;
|
|
722
|
+
},
|
|
723
|
+
};
|
|
724
|
+
function createBaseQueryListSchemaAuthorizationPoliciesResponse() {
|
|
725
|
+
return { policies: [] };
|
|
726
|
+
}
|
|
727
|
+
exports.QueryListSchemaAuthorizationPoliciesResponse = {
|
|
728
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
729
|
+
for (const v of message.policies) {
|
|
730
|
+
types_1.SchemaAuthorizationPolicy.encode(v, writer.uint32(10).fork()).ldelim();
|
|
731
|
+
}
|
|
732
|
+
return writer;
|
|
733
|
+
},
|
|
734
|
+
decode(input, length) {
|
|
735
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
736
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
737
|
+
const message = createBaseQueryListSchemaAuthorizationPoliciesResponse();
|
|
738
|
+
while (reader.pos < end) {
|
|
739
|
+
const tag = reader.uint32();
|
|
740
|
+
switch (tag >>> 3) {
|
|
741
|
+
case 1:
|
|
742
|
+
if (tag !== 10) {
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
message.policies.push(types_1.SchemaAuthorizationPolicy.decode(reader, reader.uint32()));
|
|
746
|
+
continue;
|
|
747
|
+
}
|
|
748
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
reader.skipType(tag & 7);
|
|
752
|
+
}
|
|
753
|
+
return message;
|
|
754
|
+
},
|
|
755
|
+
fromJSON(object) {
|
|
756
|
+
return {
|
|
757
|
+
policies: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.policies)
|
|
758
|
+
? object.policies.map((e) => types_1.SchemaAuthorizationPolicy.fromJSON(e))
|
|
759
|
+
: [],
|
|
760
|
+
};
|
|
761
|
+
},
|
|
762
|
+
toJSON(message) {
|
|
763
|
+
var _a;
|
|
764
|
+
const obj = {};
|
|
765
|
+
if ((_a = message.policies) === null || _a === void 0 ? void 0 : _a.length) {
|
|
766
|
+
obj.policies = message.policies.map((e) => types_1.SchemaAuthorizationPolicy.toJSON(e));
|
|
767
|
+
}
|
|
768
|
+
return obj;
|
|
769
|
+
},
|
|
770
|
+
create(base) {
|
|
771
|
+
return exports.QueryListSchemaAuthorizationPoliciesResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
772
|
+
},
|
|
773
|
+
fromPartial(object) {
|
|
774
|
+
var _a;
|
|
775
|
+
const message = createBaseQueryListSchemaAuthorizationPoliciesResponse();
|
|
776
|
+
message.policies = ((_a = object.policies) === null || _a === void 0 ? void 0 : _a.map((e) => types_1.SchemaAuthorizationPolicy.fromPartial(e))) || [];
|
|
777
|
+
return message;
|
|
778
|
+
},
|
|
779
|
+
};
|
|
550
780
|
exports.QueryServiceName = "verana.cs.v1.Query";
|
|
551
781
|
class QueryClientImpl {
|
|
552
782
|
constructor(rpc, opts) {
|
|
@@ -556,6 +786,8 @@ class QueryClientImpl {
|
|
|
556
786
|
this.ListCredentialSchemas = this.ListCredentialSchemas.bind(this);
|
|
557
787
|
this.GetCredentialSchema = this.GetCredentialSchema.bind(this);
|
|
558
788
|
this.RenderJsonSchema = this.RenderJsonSchema.bind(this);
|
|
789
|
+
this.GetSchemaAuthorizationPolicy = this.GetSchemaAuthorizationPolicy.bind(this);
|
|
790
|
+
this.ListSchemaAuthorizationPolicies = this.ListSchemaAuthorizationPolicies.bind(this);
|
|
559
791
|
}
|
|
560
792
|
Params(request) {
|
|
561
793
|
const data = exports.QueryParamsRequest.encode(request).finish();
|
|
@@ -577,6 +809,16 @@ class QueryClientImpl {
|
|
|
577
809
|
const promise = this.rpc.request(this.service, "RenderJsonSchema", data);
|
|
578
810
|
return promise.then((data) => exports.QueryRenderJsonSchemaResponse.decode(_m0.Reader.create(data)));
|
|
579
811
|
}
|
|
812
|
+
GetSchemaAuthorizationPolicy(request) {
|
|
813
|
+
const data = exports.QueryGetSchemaAuthorizationPolicyRequest.encode(request).finish();
|
|
814
|
+
const promise = this.rpc.request(this.service, "GetSchemaAuthorizationPolicy", data);
|
|
815
|
+
return promise.then((data) => exports.QueryGetSchemaAuthorizationPolicyResponse.decode(_m0.Reader.create(data)));
|
|
816
|
+
}
|
|
817
|
+
ListSchemaAuthorizationPolicies(request) {
|
|
818
|
+
const data = exports.QueryListSchemaAuthorizationPoliciesRequest.encode(request).finish();
|
|
819
|
+
const promise = this.rpc.request(this.service, "ListSchemaAuthorizationPolicies", data);
|
|
820
|
+
return promise.then((data) => exports.QueryListSchemaAuthorizationPoliciesResponse.decode(_m0.Reader.create(data)));
|
|
821
|
+
}
|
|
580
822
|
}
|
|
581
823
|
exports.QueryClientImpl = QueryClientImpl;
|
|
582
824
|
function toTimestamp(date) {
|
|
@@ -11,10 +11,18 @@ export interface GenesisState {
|
|
|
11
11
|
}
|
|
12
12
|
/** TrustDepositRecord defines a trust deposit entry for genesis state */
|
|
13
13
|
export interface TrustDepositRecord {
|
|
14
|
-
corporation: string;
|
|
15
14
|
share: string;
|
|
16
15
|
deposit: number;
|
|
17
|
-
|
|
16
|
+
/** corporation_id is the registered Corporation id that owns this trust deposit. */
|
|
17
|
+
corporationId: number;
|
|
18
|
+
/** refunded is the amount eligible to be recycled/reclaimed (was "claimable"). */
|
|
19
|
+
refunded: number;
|
|
20
|
+
/** cumulative slash accounting (MUST persist across genesis; gate the slash-unpaid invariant). */
|
|
21
|
+
slashedDeposit: number;
|
|
22
|
+
repaidDeposit: number;
|
|
23
|
+
lastSlashed: Date | undefined;
|
|
24
|
+
lastRepaid: Date | undefined;
|
|
25
|
+
slashCount: number;
|
|
18
26
|
}
|
|
19
27
|
export declare const GenesisState: {
|
|
20
28
|
encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
|