decentralcardgame-cardchain-client-ts 0.0.5 → 0.0.6
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/DecentralCardGame.cardchain.cardchain/module.js +311 -309
- package/DecentralCardGame.cardchain.cardchain/module.ts +469 -467
- package/DecentralCardGame.cardchain.cardchain/registry.js +58 -58
- package/DecentralCardGame.cardchain.cardchain/registry.ts +58 -58
- package/DecentralCardGame.cardchain.cardchain/rest.ts +3 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.js +41 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/card.ts +51 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.js +14 -1
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/genesis.ts +16 -2
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.js +10 -0
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/cardchain/query.ts +11 -0
- package/DecentralCardGame.cardchain.cardchain/types.js +2 -1
- package/DecentralCardGame.cardchain.cardchain/types.ts +2 -0
- package/client.js +1 -2
- package/package.json +1 -1
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/card.js +0 -491
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/card.ts +0 -556
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection.js +0 -365
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection.ts +0 -416
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection_proposal.js +0 -93
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/collection_proposal.ts +0 -124
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/copyright_proposal.js +0 -102
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/copyright_proposal.ts +0 -134
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/council.js +0 -350
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/council.ts +0 -409
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/genesis.js +0 -241
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/genesis.ts +0 -267
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/image.js +0 -88
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/image.ts +0 -115
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/match.js +0 -210
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/match.ts +0 -255
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/match_reporter_proposal.js +0 -67
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/match_reporter_proposal.ts +0 -92
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/num.js +0 -73
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/num.ts +0 -102
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.js +0 -275
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/params.ts +0 -324
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/query.js +0 -1970
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/query.ts +0 -2366
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/running_average.js +0 -85
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/running_average.ts +0 -111
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/sell_offer.js +0 -148
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/sell_offer.ts +0 -183
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/server.js +0 -93
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/server.ts +0 -124
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.js +0 -4137
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/tx.ts +0 -5125
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/user.js +0 -496
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/user.ts +0 -556
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/vote_right.js +0 -84
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/vote_right.ts +0 -114
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_result.js +0 -127
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_result.ts +0 -161
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_results.js +0 -148
- package/DecentralCardGame.cardchain.cardchain/types/cardchain/voting_results.ts +0 -182
- package/cosmos.authz.v1beta1/types/cosmos/base/abci/v1beta1/abci.js +0 -773
- package/cosmos.authz.v1beta1/types/cosmos/base/abci/v1beta1/abci.ts +0 -989
- package/cosmos.authz.v1beta1/types/google/protobuf/duration.js +0 -84
- package/cosmos.authz.v1beta1/types/google/protobuf/duration.ts +0 -187
- package/cosmos.authz.v1beta1/types/tendermint/abci/types.js +0 -3447
- package/cosmos.authz.v1beta1/types/tendermint/abci/types.ts +0 -4107
- package/cosmos.authz.v1beta1/types/tendermint/crypto/keys.js +0 -100
- package/cosmos.authz.v1beta1/types/tendermint/crypto/keys.ts +0 -129
- package/cosmos.authz.v1beta1/types/tendermint/crypto/proof.js +0 -356
- package/cosmos.authz.v1beta1/types/tendermint/crypto/proof.ts +0 -439
- package/cosmos.authz.v1beta1/types/tendermint/types/params.js +0 -378
- package/cosmos.authz.v1beta1/types/tendermint/types/params.ts +0 -514
- package/cosmos.authz.v1beta1/types/tendermint/types/types.js +0 -1207
- package/cosmos.authz.v1beta1/types/tendermint/types/types.ts +0 -1452
- package/cosmos.authz.v1beta1/types/tendermint/types/validator.js +0 -254
- package/cosmos.authz.v1beta1/types/tendermint/types/validator.ts +0 -308
- package/cosmos.authz.v1beta1/types/tendermint/version/types.js +0 -133
- package/cosmos.authz.v1beta1/types/tendermint/version/types.ts +0 -184
- package/ibc.core.connection.v1/types/confio/proofs.js +0 -1120
- package/ibc.core.connection.v1/types/confio/proofs.ts +0 -1402
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
export const protobufPackage = "tendermint.crypto";
|
|
4
|
-
function createBasePublicKey() {
|
|
5
|
-
return { ed25519: undefined, secp256k1: undefined };
|
|
6
|
-
}
|
|
7
|
-
export const PublicKey = {
|
|
8
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
9
|
-
if (message.ed25519 !== undefined) {
|
|
10
|
-
writer.uint32(10).bytes(message.ed25519);
|
|
11
|
-
}
|
|
12
|
-
if (message.secp256k1 !== undefined) {
|
|
13
|
-
writer.uint32(18).bytes(message.secp256k1);
|
|
14
|
-
}
|
|
15
|
-
return writer;
|
|
16
|
-
},
|
|
17
|
-
decode(input, length) {
|
|
18
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
19
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
20
|
-
const message = createBasePublicKey();
|
|
21
|
-
while (reader.pos < end) {
|
|
22
|
-
const tag = reader.uint32();
|
|
23
|
-
switch (tag >>> 3) {
|
|
24
|
-
case 1:
|
|
25
|
-
message.ed25519 = reader.bytes();
|
|
26
|
-
break;
|
|
27
|
-
case 2:
|
|
28
|
-
message.secp256k1 = reader.bytes();
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
reader.skipType(tag & 7);
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return message;
|
|
36
|
-
},
|
|
37
|
-
fromJSON(object) {
|
|
38
|
-
return {
|
|
39
|
-
ed25519: isSet(object.ed25519) ? bytesFromBase64(object.ed25519) : undefined,
|
|
40
|
-
secp256k1: isSet(object.secp256k1) ? bytesFromBase64(object.secp256k1) : undefined,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
toJSON(message) {
|
|
44
|
-
const obj = {};
|
|
45
|
-
message.ed25519 !== undefined
|
|
46
|
-
&& (obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
|
|
47
|
-
message.secp256k1 !== undefined
|
|
48
|
-
&& (obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
|
|
49
|
-
return obj;
|
|
50
|
-
},
|
|
51
|
-
fromPartial(object) {
|
|
52
|
-
const message = createBasePublicKey();
|
|
53
|
-
message.ed25519 = object.ed25519 ?? undefined;
|
|
54
|
-
message.secp256k1 = object.secp256k1 ?? undefined;
|
|
55
|
-
return message;
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
var globalThis = (() => {
|
|
59
|
-
if (typeof globalThis !== "undefined") {
|
|
60
|
-
return globalThis;
|
|
61
|
-
}
|
|
62
|
-
if (typeof self !== "undefined") {
|
|
63
|
-
return self;
|
|
64
|
-
}
|
|
65
|
-
if (typeof window !== "undefined") {
|
|
66
|
-
return window;
|
|
67
|
-
}
|
|
68
|
-
if (typeof global !== "undefined") {
|
|
69
|
-
return global;
|
|
70
|
-
}
|
|
71
|
-
throw "Unable to locate global object";
|
|
72
|
-
})();
|
|
73
|
-
function bytesFromBase64(b64) {
|
|
74
|
-
if (globalThis.Buffer) {
|
|
75
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
const bin = globalThis.atob(b64);
|
|
79
|
-
const arr = new Uint8Array(bin.length);
|
|
80
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
81
|
-
arr[i] = bin.charCodeAt(i);
|
|
82
|
-
}
|
|
83
|
-
return arr;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function base64FromBytes(arr) {
|
|
87
|
-
if (globalThis.Buffer) {
|
|
88
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
const bin = [];
|
|
92
|
-
arr.forEach((byte) => {
|
|
93
|
-
bin.push(String.fromCharCode(byte));
|
|
94
|
-
});
|
|
95
|
-
return globalThis.btoa(bin.join(""));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
function isSet(value) {
|
|
99
|
-
return value !== null && value !== undefined;
|
|
100
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
|
|
4
|
-
export const protobufPackage = "tendermint.crypto";
|
|
5
|
-
|
|
6
|
-
/** PublicKey defines the keys available for use with Tendermint Validators */
|
|
7
|
-
export interface PublicKey {
|
|
8
|
-
ed25519: Uint8Array | undefined;
|
|
9
|
-
secp256k1: Uint8Array | undefined;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function createBasePublicKey(): PublicKey {
|
|
13
|
-
return { ed25519: undefined, secp256k1: undefined };
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const PublicKey = {
|
|
17
|
-
encode(message: PublicKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
18
|
-
if (message.ed25519 !== undefined) {
|
|
19
|
-
writer.uint32(10).bytes(message.ed25519);
|
|
20
|
-
}
|
|
21
|
-
if (message.secp256k1 !== undefined) {
|
|
22
|
-
writer.uint32(18).bytes(message.secp256k1);
|
|
23
|
-
}
|
|
24
|
-
return writer;
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): PublicKey {
|
|
28
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
29
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
30
|
-
const message = createBasePublicKey();
|
|
31
|
-
while (reader.pos < end) {
|
|
32
|
-
const tag = reader.uint32();
|
|
33
|
-
switch (tag >>> 3) {
|
|
34
|
-
case 1:
|
|
35
|
-
message.ed25519 = reader.bytes();
|
|
36
|
-
break;
|
|
37
|
-
case 2:
|
|
38
|
-
message.secp256k1 = reader.bytes();
|
|
39
|
-
break;
|
|
40
|
-
default:
|
|
41
|
-
reader.skipType(tag & 7);
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return message;
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
fromJSON(object: any): PublicKey {
|
|
49
|
-
return {
|
|
50
|
-
ed25519: isSet(object.ed25519) ? bytesFromBase64(object.ed25519) : undefined,
|
|
51
|
-
secp256k1: isSet(object.secp256k1) ? bytesFromBase64(object.secp256k1) : undefined,
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
toJSON(message: PublicKey): unknown {
|
|
56
|
-
const obj: any = {};
|
|
57
|
-
message.ed25519 !== undefined
|
|
58
|
-
&& (obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
|
|
59
|
-
message.secp256k1 !== undefined
|
|
60
|
-
&& (obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
|
|
61
|
-
return obj;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
fromPartial<I extends Exact<DeepPartial<PublicKey>, I>>(object: I): PublicKey {
|
|
65
|
-
const message = createBasePublicKey();
|
|
66
|
-
message.ed25519 = object.ed25519 ?? undefined;
|
|
67
|
-
message.secp256k1 = object.secp256k1 ?? undefined;
|
|
68
|
-
return message;
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
declare var self: any | undefined;
|
|
73
|
-
declare var window: any | undefined;
|
|
74
|
-
declare var global: any | undefined;
|
|
75
|
-
var globalThis: any = (() => {
|
|
76
|
-
if (typeof globalThis !== "undefined") {
|
|
77
|
-
return globalThis;
|
|
78
|
-
}
|
|
79
|
-
if (typeof self !== "undefined") {
|
|
80
|
-
return self;
|
|
81
|
-
}
|
|
82
|
-
if (typeof window !== "undefined") {
|
|
83
|
-
return window;
|
|
84
|
-
}
|
|
85
|
-
if (typeof global !== "undefined") {
|
|
86
|
-
return global;
|
|
87
|
-
}
|
|
88
|
-
throw "Unable to locate global object";
|
|
89
|
-
})();
|
|
90
|
-
|
|
91
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
92
|
-
if (globalThis.Buffer) {
|
|
93
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
94
|
-
} else {
|
|
95
|
-
const bin = globalThis.atob(b64);
|
|
96
|
-
const arr = new Uint8Array(bin.length);
|
|
97
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
98
|
-
arr[i] = bin.charCodeAt(i);
|
|
99
|
-
}
|
|
100
|
-
return arr;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
105
|
-
if (globalThis.Buffer) {
|
|
106
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
107
|
-
} else {
|
|
108
|
-
const bin: string[] = [];
|
|
109
|
-
arr.forEach((byte) => {
|
|
110
|
-
bin.push(String.fromCharCode(byte));
|
|
111
|
-
});
|
|
112
|
-
return globalThis.btoa(bin.join(""));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
117
|
-
|
|
118
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
119
|
-
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
120
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
121
|
-
: Partial<T>;
|
|
122
|
-
|
|
123
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
124
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
125
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
126
|
-
|
|
127
|
-
function isSet(value: any): boolean {
|
|
128
|
-
return value !== null && value !== undefined;
|
|
129
|
-
}
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import Long from "long";
|
|
3
|
-
import _m0 from "protobufjs/minimal";
|
|
4
|
-
export const protobufPackage = "tendermint.crypto";
|
|
5
|
-
function createBaseProof() {
|
|
6
|
-
return { total: 0, index: 0, leafHash: new Uint8Array(), aunts: [] };
|
|
7
|
-
}
|
|
8
|
-
export const Proof = {
|
|
9
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
10
|
-
if (message.total !== 0) {
|
|
11
|
-
writer.uint32(8).int64(message.total);
|
|
12
|
-
}
|
|
13
|
-
if (message.index !== 0) {
|
|
14
|
-
writer.uint32(16).int64(message.index);
|
|
15
|
-
}
|
|
16
|
-
if (message.leafHash.length !== 0) {
|
|
17
|
-
writer.uint32(26).bytes(message.leafHash);
|
|
18
|
-
}
|
|
19
|
-
for (const v of message.aunts) {
|
|
20
|
-
writer.uint32(34).bytes(v);
|
|
21
|
-
}
|
|
22
|
-
return writer;
|
|
23
|
-
},
|
|
24
|
-
decode(input, length) {
|
|
25
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
26
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
27
|
-
const message = createBaseProof();
|
|
28
|
-
while (reader.pos < end) {
|
|
29
|
-
const tag = reader.uint32();
|
|
30
|
-
switch (tag >>> 3) {
|
|
31
|
-
case 1:
|
|
32
|
-
message.total = longToNumber(reader.int64());
|
|
33
|
-
break;
|
|
34
|
-
case 2:
|
|
35
|
-
message.index = longToNumber(reader.int64());
|
|
36
|
-
break;
|
|
37
|
-
case 3:
|
|
38
|
-
message.leafHash = reader.bytes();
|
|
39
|
-
break;
|
|
40
|
-
case 4:
|
|
41
|
-
message.aunts.push(reader.bytes());
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
reader.skipType(tag & 7);
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return message;
|
|
49
|
-
},
|
|
50
|
-
fromJSON(object) {
|
|
51
|
-
return {
|
|
52
|
-
total: isSet(object.total) ? Number(object.total) : 0,
|
|
53
|
-
index: isSet(object.index) ? Number(object.index) : 0,
|
|
54
|
-
leafHash: isSet(object.leafHash) ? bytesFromBase64(object.leafHash) : new Uint8Array(),
|
|
55
|
-
aunts: Array.isArray(object?.aunts) ? object.aunts.map((e) => bytesFromBase64(e)) : [],
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
toJSON(message) {
|
|
59
|
-
const obj = {};
|
|
60
|
-
message.total !== undefined && (obj.total = Math.round(message.total));
|
|
61
|
-
message.index !== undefined && (obj.index = Math.round(message.index));
|
|
62
|
-
message.leafHash !== undefined
|
|
63
|
-
&& (obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array()));
|
|
64
|
-
if (message.aunts) {
|
|
65
|
-
obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
obj.aunts = [];
|
|
69
|
-
}
|
|
70
|
-
return obj;
|
|
71
|
-
},
|
|
72
|
-
fromPartial(object) {
|
|
73
|
-
const message = createBaseProof();
|
|
74
|
-
message.total = object.total ?? 0;
|
|
75
|
-
message.index = object.index ?? 0;
|
|
76
|
-
message.leafHash = object.leafHash ?? new Uint8Array();
|
|
77
|
-
message.aunts = object.aunts?.map((e) => e) || [];
|
|
78
|
-
return message;
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
function createBaseValueOp() {
|
|
82
|
-
return { key: new Uint8Array(), proof: undefined };
|
|
83
|
-
}
|
|
84
|
-
export const ValueOp = {
|
|
85
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
86
|
-
if (message.key.length !== 0) {
|
|
87
|
-
writer.uint32(10).bytes(message.key);
|
|
88
|
-
}
|
|
89
|
-
if (message.proof !== undefined) {
|
|
90
|
-
Proof.encode(message.proof, writer.uint32(18).fork()).ldelim();
|
|
91
|
-
}
|
|
92
|
-
return writer;
|
|
93
|
-
},
|
|
94
|
-
decode(input, length) {
|
|
95
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
96
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
97
|
-
const message = createBaseValueOp();
|
|
98
|
-
while (reader.pos < end) {
|
|
99
|
-
const tag = reader.uint32();
|
|
100
|
-
switch (tag >>> 3) {
|
|
101
|
-
case 1:
|
|
102
|
-
message.key = reader.bytes();
|
|
103
|
-
break;
|
|
104
|
-
case 2:
|
|
105
|
-
message.proof = Proof.decode(reader, reader.uint32());
|
|
106
|
-
break;
|
|
107
|
-
default:
|
|
108
|
-
reader.skipType(tag & 7);
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return message;
|
|
113
|
-
},
|
|
114
|
-
fromJSON(object) {
|
|
115
|
-
return {
|
|
116
|
-
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
|
|
117
|
-
proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : undefined,
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
toJSON(message) {
|
|
121
|
-
const obj = {};
|
|
122
|
-
message.key !== undefined
|
|
123
|
-
&& (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
|
124
|
-
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
|
125
|
-
return obj;
|
|
126
|
-
},
|
|
127
|
-
fromPartial(object) {
|
|
128
|
-
const message = createBaseValueOp();
|
|
129
|
-
message.key = object.key ?? new Uint8Array();
|
|
130
|
-
message.proof = (object.proof !== undefined && object.proof !== null) ? Proof.fromPartial(object.proof) : undefined;
|
|
131
|
-
return message;
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
function createBaseDominoOp() {
|
|
135
|
-
return { key: "", input: "", output: "" };
|
|
136
|
-
}
|
|
137
|
-
export const DominoOp = {
|
|
138
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
139
|
-
if (message.key !== "") {
|
|
140
|
-
writer.uint32(10).string(message.key);
|
|
141
|
-
}
|
|
142
|
-
if (message.input !== "") {
|
|
143
|
-
writer.uint32(18).string(message.input);
|
|
144
|
-
}
|
|
145
|
-
if (message.output !== "") {
|
|
146
|
-
writer.uint32(26).string(message.output);
|
|
147
|
-
}
|
|
148
|
-
return writer;
|
|
149
|
-
},
|
|
150
|
-
decode(input, length) {
|
|
151
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
152
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
153
|
-
const message = createBaseDominoOp();
|
|
154
|
-
while (reader.pos < end) {
|
|
155
|
-
const tag = reader.uint32();
|
|
156
|
-
switch (tag >>> 3) {
|
|
157
|
-
case 1:
|
|
158
|
-
message.key = reader.string();
|
|
159
|
-
break;
|
|
160
|
-
case 2:
|
|
161
|
-
message.input = reader.string();
|
|
162
|
-
break;
|
|
163
|
-
case 3:
|
|
164
|
-
message.output = reader.string();
|
|
165
|
-
break;
|
|
166
|
-
default:
|
|
167
|
-
reader.skipType(tag & 7);
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return message;
|
|
172
|
-
},
|
|
173
|
-
fromJSON(object) {
|
|
174
|
-
return {
|
|
175
|
-
key: isSet(object.key) ? String(object.key) : "",
|
|
176
|
-
input: isSet(object.input) ? String(object.input) : "",
|
|
177
|
-
output: isSet(object.output) ? String(object.output) : "",
|
|
178
|
-
};
|
|
179
|
-
},
|
|
180
|
-
toJSON(message) {
|
|
181
|
-
const obj = {};
|
|
182
|
-
message.key !== undefined && (obj.key = message.key);
|
|
183
|
-
message.input !== undefined && (obj.input = message.input);
|
|
184
|
-
message.output !== undefined && (obj.output = message.output);
|
|
185
|
-
return obj;
|
|
186
|
-
},
|
|
187
|
-
fromPartial(object) {
|
|
188
|
-
const message = createBaseDominoOp();
|
|
189
|
-
message.key = object.key ?? "";
|
|
190
|
-
message.input = object.input ?? "";
|
|
191
|
-
message.output = object.output ?? "";
|
|
192
|
-
return message;
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
function createBaseProofOp() {
|
|
196
|
-
return { type: "", key: new Uint8Array(), data: new Uint8Array() };
|
|
197
|
-
}
|
|
198
|
-
export const ProofOp = {
|
|
199
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
200
|
-
if (message.type !== "") {
|
|
201
|
-
writer.uint32(10).string(message.type);
|
|
202
|
-
}
|
|
203
|
-
if (message.key.length !== 0) {
|
|
204
|
-
writer.uint32(18).bytes(message.key);
|
|
205
|
-
}
|
|
206
|
-
if (message.data.length !== 0) {
|
|
207
|
-
writer.uint32(26).bytes(message.data);
|
|
208
|
-
}
|
|
209
|
-
return writer;
|
|
210
|
-
},
|
|
211
|
-
decode(input, length) {
|
|
212
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
213
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
214
|
-
const message = createBaseProofOp();
|
|
215
|
-
while (reader.pos < end) {
|
|
216
|
-
const tag = reader.uint32();
|
|
217
|
-
switch (tag >>> 3) {
|
|
218
|
-
case 1:
|
|
219
|
-
message.type = reader.string();
|
|
220
|
-
break;
|
|
221
|
-
case 2:
|
|
222
|
-
message.key = reader.bytes();
|
|
223
|
-
break;
|
|
224
|
-
case 3:
|
|
225
|
-
message.data = reader.bytes();
|
|
226
|
-
break;
|
|
227
|
-
default:
|
|
228
|
-
reader.skipType(tag & 7);
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
return message;
|
|
233
|
-
},
|
|
234
|
-
fromJSON(object) {
|
|
235
|
-
return {
|
|
236
|
-
type: isSet(object.type) ? String(object.type) : "",
|
|
237
|
-
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
|
|
238
|
-
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(),
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
toJSON(message) {
|
|
242
|
-
const obj = {};
|
|
243
|
-
message.type !== undefined && (obj.type = message.type);
|
|
244
|
-
message.key !== undefined
|
|
245
|
-
&& (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
|
246
|
-
message.data !== undefined
|
|
247
|
-
&& (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
|
248
|
-
return obj;
|
|
249
|
-
},
|
|
250
|
-
fromPartial(object) {
|
|
251
|
-
const message = createBaseProofOp();
|
|
252
|
-
message.type = object.type ?? "";
|
|
253
|
-
message.key = object.key ?? new Uint8Array();
|
|
254
|
-
message.data = object.data ?? new Uint8Array();
|
|
255
|
-
return message;
|
|
256
|
-
},
|
|
257
|
-
};
|
|
258
|
-
function createBaseProofOps() {
|
|
259
|
-
return { ops: [] };
|
|
260
|
-
}
|
|
261
|
-
export const ProofOps = {
|
|
262
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
263
|
-
for (const v of message.ops) {
|
|
264
|
-
ProofOp.encode(v, writer.uint32(10).fork()).ldelim();
|
|
265
|
-
}
|
|
266
|
-
return writer;
|
|
267
|
-
},
|
|
268
|
-
decode(input, length) {
|
|
269
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
270
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
271
|
-
const message = createBaseProofOps();
|
|
272
|
-
while (reader.pos < end) {
|
|
273
|
-
const tag = reader.uint32();
|
|
274
|
-
switch (tag >>> 3) {
|
|
275
|
-
case 1:
|
|
276
|
-
message.ops.push(ProofOp.decode(reader, reader.uint32()));
|
|
277
|
-
break;
|
|
278
|
-
default:
|
|
279
|
-
reader.skipType(tag & 7);
|
|
280
|
-
break;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return message;
|
|
284
|
-
},
|
|
285
|
-
fromJSON(object) {
|
|
286
|
-
return { ops: Array.isArray(object?.ops) ? object.ops.map((e) => ProofOp.fromJSON(e)) : [] };
|
|
287
|
-
},
|
|
288
|
-
toJSON(message) {
|
|
289
|
-
const obj = {};
|
|
290
|
-
if (message.ops) {
|
|
291
|
-
obj.ops = message.ops.map((e) => e ? ProofOp.toJSON(e) : undefined);
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
obj.ops = [];
|
|
295
|
-
}
|
|
296
|
-
return obj;
|
|
297
|
-
},
|
|
298
|
-
fromPartial(object) {
|
|
299
|
-
const message = createBaseProofOps();
|
|
300
|
-
message.ops = object.ops?.map((e) => ProofOp.fromPartial(e)) || [];
|
|
301
|
-
return message;
|
|
302
|
-
},
|
|
303
|
-
};
|
|
304
|
-
var globalThis = (() => {
|
|
305
|
-
if (typeof globalThis !== "undefined") {
|
|
306
|
-
return globalThis;
|
|
307
|
-
}
|
|
308
|
-
if (typeof self !== "undefined") {
|
|
309
|
-
return self;
|
|
310
|
-
}
|
|
311
|
-
if (typeof window !== "undefined") {
|
|
312
|
-
return window;
|
|
313
|
-
}
|
|
314
|
-
if (typeof global !== "undefined") {
|
|
315
|
-
return global;
|
|
316
|
-
}
|
|
317
|
-
throw "Unable to locate global object";
|
|
318
|
-
})();
|
|
319
|
-
function bytesFromBase64(b64) {
|
|
320
|
-
if (globalThis.Buffer) {
|
|
321
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
324
|
-
const bin = globalThis.atob(b64);
|
|
325
|
-
const arr = new Uint8Array(bin.length);
|
|
326
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
327
|
-
arr[i] = bin.charCodeAt(i);
|
|
328
|
-
}
|
|
329
|
-
return arr;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
function base64FromBytes(arr) {
|
|
333
|
-
if (globalThis.Buffer) {
|
|
334
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
const bin = [];
|
|
338
|
-
arr.forEach((byte) => {
|
|
339
|
-
bin.push(String.fromCharCode(byte));
|
|
340
|
-
});
|
|
341
|
-
return globalThis.btoa(bin.join(""));
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
function longToNumber(long) {
|
|
345
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
346
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
347
|
-
}
|
|
348
|
-
return long.toNumber();
|
|
349
|
-
}
|
|
350
|
-
if (_m0.util.Long !== Long) {
|
|
351
|
-
_m0.util.Long = Long;
|
|
352
|
-
_m0.configure();
|
|
353
|
-
}
|
|
354
|
-
function isSet(value) {
|
|
355
|
-
return value !== null && value !== undefined;
|
|
356
|
-
}
|