@taquito/local-forging 22.0.0 → 23.0.0-RC.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/{codec-proto021.js → codec-proto022.js} +71 -23
- package/dist/lib/codec.js +87 -110
- package/dist/lib/{constants-proto021.js → constants-proto022.js} +1 -0
- package/dist/lib/constants.js +3 -0
- package/dist/lib/decoder-proto022.js +63 -0
- package/dist/lib/decoder.js +1 -0
- package/dist/lib/encoder-proto022.js +62 -0
- package/dist/lib/encoder.js +1 -0
- package/dist/lib/michelson/codec-proto022.js +283 -0
- package/dist/lib/protocols.js +2 -0
- package/dist/lib/schema/operation-proto022.js +238 -0
- package/dist/lib/schema/operation.js +11 -1
- package/dist/lib/taquito-local-forging.js +14 -8
- package/dist/lib/validator-proto022.js +56 -0
- package/dist/lib/validator.js +1 -0
- package/dist/lib/version.js +2 -2
- package/dist/taquito-local-forging.es6.js +606 -302
- package/dist/taquito-local-forging.es6.js.map +1 -1
- package/dist/taquito-local-forging.umd.js +604 -300
- package/dist/taquito-local-forging.umd.js.map +1 -1
- package/dist/types/{codec-proto021.d.ts → codec-proto022.d.ts} +3 -1
- package/dist/types/codec.d.ts +3 -3
- package/dist/types/{constants-proto021.d.ts → constants-proto022.d.ts} +1 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/{decoder-proto021.d.ts → decoder-proto022.d.ts} +1 -1
- package/dist/types/{encoder-proto021.d.ts → encoder-proto022.d.ts} +1 -1
- package/dist/types/michelson/codec-proto022.d.ts +49 -0
- package/dist/types/michelson/codec.d.ts +1 -1
- package/dist/types/protocols.d.ts +1 -0
- package/dist/types/schema/{operation-proto021.d.ts → operation-proto022.d.ts} +3 -2
- package/dist/types/schema/operation.d.ts +10 -0
- package/dist/types/taquito-local-forging.d.ts +3 -3
- package/dist/types/validator-proto022.d.ts +13 -0
- package/package.json +5 -5
- package/dist/lib/decoder-proto021.js +0 -62
- package/dist/lib/encoder-proto021.js +0 -61
- package/dist/lib/schema/operation-proto021.js +0 -237
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-local-forging.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-local-forging.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Prefix } from '@taquito/utils';
|
|
2
|
-
import { MichelsonValue } from './michelson/codec';
|
|
2
|
+
import { MichelsonValue } from './michelson/codec-proto022';
|
|
3
3
|
import { Uint8ArrayConsumer } from './uint8array-consumer';
|
|
4
4
|
export declare const prefixEncoder: (prefix: Prefix) => (str: string) => string;
|
|
5
5
|
export declare const prefixDecoder: (pre: Prefix) => (str: Uint8ArrayConsumer) => string;
|
|
@@ -59,6 +59,8 @@ export declare const burnLimitEncoder: (val: string) => string;
|
|
|
59
59
|
export declare const burnLimitDecoder: (value: Uint8ArrayConsumer) => string | undefined;
|
|
60
60
|
export declare const depositsLimitEncoder: (val: string) => string;
|
|
61
61
|
export declare const depositsLimitDecoder: (value: Uint8ArrayConsumer) => string | undefined;
|
|
62
|
+
export declare const signatureProofEncoder: (val: string) => string;
|
|
63
|
+
export declare const signatureProofDecoder: (value: Uint8ArrayConsumer) => string | undefined;
|
|
62
64
|
export declare const paddedBytesEncoder: (val: string, paddingLength?: number) => string;
|
|
63
65
|
export declare const paddedBytesDecoder: (val: Uint8ArrayConsumer) => string;
|
|
64
66
|
export declare const smartRollupMessageEncoder: (val: string[]) => string;
|
package/dist/types/codec.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PrefixV2 } from '@taquito/utils';
|
|
2
2
|
import { MichelsonValue } from './michelson/codec';
|
|
3
3
|
import { Uint8ArrayConsumer } from './uint8array-consumer';
|
|
4
|
-
export declare const prefixEncoder: (prefix:
|
|
5
|
-
export declare const prefixDecoder: (pre:
|
|
4
|
+
export declare const prefixEncoder: (prefix: PrefixV2) => (str: string) => string;
|
|
5
|
+
export declare const prefixDecoder: (pre: PrefixV2) => (str: Uint8ArrayConsumer) => string;
|
|
6
6
|
export declare const tz1Decoder: (str: Uint8ArrayConsumer) => string;
|
|
7
7
|
export declare const branchDecoder: (str: Uint8ArrayConsumer) => string;
|
|
8
8
|
export declare const publicKeyHashDecoder: (val: Uint8ArrayConsumer) => string | undefined;
|
|
@@ -43,6 +43,7 @@ export declare enum CODEC {
|
|
|
43
43
|
BURN_LIMIT = "burn_limit",
|
|
44
44
|
OP_INCREASE_PAID_STORAGE = "increase_paid_storage",
|
|
45
45
|
OP_UPDATE_CONSENSUS_KEY = "update_consensus_key",
|
|
46
|
+
SIGNATURE_PROOF = "signature_proof",
|
|
46
47
|
OP_DRAIN_DELEGATE = "drain_delegate",
|
|
47
48
|
DEPOSITS_LIMIT = "deposits_limit",
|
|
48
49
|
OP_SET_DEPOSITS_LIMIT = "set_deposits_limit",
|
|
@@ -43,6 +43,7 @@ export declare enum CODEC {
|
|
|
43
43
|
BURN_LIMIT = "burn_limit",
|
|
44
44
|
OP_INCREASE_PAID_STORAGE = "increase_paid_storage",
|
|
45
45
|
OP_UPDATE_CONSENSUS_KEY = "update_consensus_key",
|
|
46
|
+
OP_UPDATE_COMPANION_KEY = "update_companion_key",
|
|
46
47
|
SIGNATURE_PROOF = "signature_proof",
|
|
47
48
|
OP_DRAIN_DELEGATE = "drain_delegate",
|
|
48
49
|
DEPOSITS_LIMIT = "deposits_limit",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Decoder } from '../decoder-proto022';
|
|
2
|
+
import { Uint8ArrayConsumer } from '../uint8array-consumer';
|
|
3
|
+
import { Encoder } from '../encoder-proto022';
|
|
4
|
+
export type PrimValue = {
|
|
5
|
+
prim: string;
|
|
6
|
+
args?: MichelsonValue[];
|
|
7
|
+
annots?: string[];
|
|
8
|
+
};
|
|
9
|
+
export type BytesValue = {
|
|
10
|
+
bytes: string;
|
|
11
|
+
};
|
|
12
|
+
export type StringValue = {
|
|
13
|
+
string: string;
|
|
14
|
+
};
|
|
15
|
+
export type IntValue = {
|
|
16
|
+
int: string;
|
|
17
|
+
};
|
|
18
|
+
export type MichelsonValue = PrimValue | BytesValue | StringValue | IntValue | (PrimValue | BytesValue | StringValue | IntValue)[];
|
|
19
|
+
export declare const isPrim: (value: MichelsonValue) => value is PrimValue;
|
|
20
|
+
export declare const isBytes: (value: MichelsonValue) => value is BytesValue;
|
|
21
|
+
export declare const isString: (value: MichelsonValue) => value is StringValue;
|
|
22
|
+
export declare const isInt: (value: MichelsonValue) => value is IntValue;
|
|
23
|
+
export declare const scriptEncoder: Encoder<{
|
|
24
|
+
code: MichelsonValue;
|
|
25
|
+
storage: MichelsonValue;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const scriptDecoder: Decoder;
|
|
28
|
+
export declare const valueEncoder: Encoder<MichelsonValue>;
|
|
29
|
+
export declare const valueDecoder: Decoder;
|
|
30
|
+
export declare const extractRequiredLen: (value: Uint8ArrayConsumer, bytesLength?: number) => Uint8Array;
|
|
31
|
+
/**
|
|
32
|
+
* @description parse bytes into multiple items of an array
|
|
33
|
+
* @param value Uint8ArrayConsumer class of forged segment to parse
|
|
34
|
+
* @param bytesLength default 4 bytes for length of variable bytes
|
|
35
|
+
* @returns array of Uint8Array values for each array item
|
|
36
|
+
*/
|
|
37
|
+
export declare const stripLengthPrefixFromBytes: (value: Uint8ArrayConsumer, bytesLength?: number) => Uint8Array[];
|
|
38
|
+
export declare const bytesEncoder: Encoder<BytesValue>;
|
|
39
|
+
export declare const bytesDecoder: Decoder;
|
|
40
|
+
export declare const stringEncoder: Encoder<StringValue>;
|
|
41
|
+
export declare const stringDecoder: Decoder;
|
|
42
|
+
export declare const intEncoder: Encoder<IntValue>;
|
|
43
|
+
export declare const intDecoder: (value: Uint8ArrayConsumer) => IntValue;
|
|
44
|
+
export declare const primEncoder: Encoder<PrimValue>;
|
|
45
|
+
export declare const primDecoder: (value: Uint8ArrayConsumer, preamble: Uint8Array) => Partial<PrimValue>;
|
|
46
|
+
export declare const primViewDecoder: (value: Uint8ArrayConsumer, result: Partial<PrimValue>) => Partial<PrimValue>;
|
|
47
|
+
export declare const decodeCombPair: Decoder;
|
|
48
|
+
export declare const encodeAnnots: Encoder<string[]>;
|
|
49
|
+
export declare const decodeAnnots: Decoder;
|
|
@@ -20,6 +20,7 @@ export declare enum ProtocolsHash {
|
|
|
20
20
|
PsParisCZ = "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi",
|
|
21
21
|
PsQuebecn = "PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg",
|
|
22
22
|
PsRiotuma = "PsRiotumaAMotcRoDWW1bysEhQy2n1M5fy8JgRp8jjRfHGmfeA7",
|
|
23
|
+
PtSeouLou = "PtSeouLouXkxhg39oWzjxDWaCydNfR3RxCUrNe4Q9Ro8BTehcbh",
|
|
23
24
|
ProtoALpha = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"
|
|
24
25
|
}
|
|
25
26
|
export declare function ProtoInferiorTo(a: ProtocolsHash, b: ProtocolsHash): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Decoder } from '../decoder-
|
|
1
|
+
import { Decoder } from '../decoder-proto022';
|
|
2
2
|
import { Uint8ArrayConsumer } from '../uint8array-consumer';
|
|
3
|
-
import { CODEC } from '../constants-
|
|
3
|
+
import { CODEC } from '../constants-proto022';
|
|
4
4
|
export declare const ManagerOperationSchema: {
|
|
5
5
|
branch: CODEC;
|
|
6
6
|
contents: CODEC[];
|
|
@@ -110,6 +110,7 @@ export declare const UpdateConsensusKeySchema: {
|
|
|
110
110
|
gas_limit: CODEC;
|
|
111
111
|
storage_limit: CODEC;
|
|
112
112
|
pk: CODEC;
|
|
113
|
+
proof: CODEC;
|
|
113
114
|
};
|
|
114
115
|
export declare const DrainDelegateSchema: {
|
|
115
116
|
consensus_key: CODEC;
|
|
@@ -16,6 +16,7 @@ export declare const RevealSchema: {
|
|
|
16
16
|
gas_limit: CODEC;
|
|
17
17
|
storage_limit: CODEC;
|
|
18
18
|
public_key: CODEC;
|
|
19
|
+
proof: CODEC;
|
|
19
20
|
};
|
|
20
21
|
export declare const DelegationSchema: {
|
|
21
22
|
source: CODEC;
|
|
@@ -112,6 +113,15 @@ export declare const UpdateConsensusKeySchema: {
|
|
|
112
113
|
pk: CODEC;
|
|
113
114
|
proof: CODEC;
|
|
114
115
|
};
|
|
116
|
+
export declare const UpdateCompanionKeySchema: {
|
|
117
|
+
source: CODEC;
|
|
118
|
+
fee: CODEC;
|
|
119
|
+
counter: CODEC;
|
|
120
|
+
gas_limit: CODEC;
|
|
121
|
+
storage_limit: CODEC;
|
|
122
|
+
pk: CODEC;
|
|
123
|
+
proof: CODEC;
|
|
124
|
+
};
|
|
115
125
|
export declare const DrainDelegateSchema: {
|
|
116
126
|
consensus_key: CODEC;
|
|
117
127
|
delegate: CODEC;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ForgeParams, Forger } from './interface';
|
|
6
6
|
import { CODEC } from './constants';
|
|
7
|
-
import { CODEC as
|
|
7
|
+
import { CODEC as CODECPROTO022 } from './constants-proto022';
|
|
8
8
|
import { ProtocolsHash } from './protocols';
|
|
9
9
|
export { CODEC, opMapping, opMappingReverse } from './constants';
|
|
10
10
|
export * from './decoder';
|
|
@@ -13,8 +13,8 @@ export * from './uint8array-consumer';
|
|
|
13
13
|
export * from './interface';
|
|
14
14
|
export { VERSION } from './version';
|
|
15
15
|
export { ProtocolsHash } from './protocols';
|
|
16
|
-
export declare function getCodec(codec: CODEC |
|
|
17
|
-
encoder: import("./encoder-
|
|
16
|
+
export declare function getCodec(codec: CODEC | CODECPROTO022, _proto: ProtocolsHash): {
|
|
17
|
+
encoder: import("./encoder-proto022").Encoder<any>;
|
|
18
18
|
decoder: (hex: string) => any;
|
|
19
19
|
};
|
|
20
20
|
export declare class LocalForger implements Forger {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OpKind } from '@taquito/rpc';
|
|
2
|
+
import { OperationContents } from '@taquito/rpc';
|
|
3
|
+
/**
|
|
4
|
+
* @returns A boolean value to indicate whether the operation kind is valid or not
|
|
5
|
+
*/
|
|
6
|
+
export declare const validateOperationKind: (opKind: OpKind) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* returns 0 when the two array of properties are identical or the passed property
|
|
9
|
+
* does not have any missing parameters from the corresponding schema
|
|
10
|
+
*
|
|
11
|
+
* @returns array element differences if there are missing required property keys
|
|
12
|
+
*/
|
|
13
|
+
export declare const validateMissingProperty: (operationContent: OperationContents) => string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/local-forging",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0-RC.0",
|
|
4
4
|
"description": "Provide local forging functionality to be with taquito",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@taquito/core": "^
|
|
71
|
-
"@taquito/utils": "^
|
|
70
|
+
"@taquito/core": "^23.0.0-RC.0",
|
|
71
|
+
"@taquito/utils": "^23.0.0-RC.0",
|
|
72
72
|
"bignumber.js": "^9.1.2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@taquito/rpc": "^
|
|
75
|
+
"@taquito/rpc": "^23.0.0-RC.0",
|
|
76
76
|
"@types/bluebird": "^3.5.42",
|
|
77
77
|
"@types/estree": "^1.0.5",
|
|
78
78
|
"@types/jest": "^29.5.12",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"webpack": "^5.94.0",
|
|
105
105
|
"webpack-cli": "^5.1.4"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "3bdb33e97e705d1c7090dd83e1b243e6e2a4d768"
|
|
108
108
|
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodersProto021 = void 0;
|
|
4
|
-
const codec_proto021_1 = require("./codec-proto021");
|
|
5
|
-
const constants_proto021_1 = require("./constants-proto021");
|
|
6
|
-
const codec_1 = require("./michelson/codec");
|
|
7
|
-
const operation_proto021_1 = require("./schema/operation-proto021");
|
|
8
|
-
const utils_1 = require("./utils");
|
|
9
|
-
exports.decodersProto021 = {
|
|
10
|
-
[constants_proto021_1.CODEC.SECRET]: (val) => (0, utils_1.toHexString)(val.consume(20)),
|
|
11
|
-
[constants_proto021_1.CODEC.RAW]: (val) => (0, utils_1.toHexString)(val.consume(32)),
|
|
12
|
-
[constants_proto021_1.CODEC.TZ1]: codec_proto021_1.tz1Decoder,
|
|
13
|
-
[constants_proto021_1.CODEC.BRANCH]: codec_proto021_1.branchDecoder,
|
|
14
|
-
[constants_proto021_1.CODEC.ZARITH]: codec_proto021_1.zarithDecoder,
|
|
15
|
-
[constants_proto021_1.CODEC.PUBLIC_KEY]: codec_proto021_1.publicKeyDecoder,
|
|
16
|
-
[constants_proto021_1.CODEC.PKH]: codec_proto021_1.publicKeyHashDecoder,
|
|
17
|
-
[constants_proto021_1.CODEC.PKH_ARR]: codec_proto021_1.publicKeyHashesDecoder,
|
|
18
|
-
[constants_proto021_1.CODEC.DELEGATE]: codec_proto021_1.delegateDecoder,
|
|
19
|
-
[constants_proto021_1.CODEC.INT32]: codec_proto021_1.int32Decoder,
|
|
20
|
-
[constants_proto021_1.CODEC.SCRIPT]: codec_1.scriptDecoder,
|
|
21
|
-
[constants_proto021_1.CODEC.BALLOT_STATEMENT]: codec_proto021_1.ballotDecoder,
|
|
22
|
-
[constants_proto021_1.CODEC.PROPOSAL]: codec_proto021_1.proposalDecoder,
|
|
23
|
-
[constants_proto021_1.CODEC.PROPOSAL_ARR]: codec_proto021_1.proposalsDecoder,
|
|
24
|
-
[constants_proto021_1.CODEC.PARAMETERS]: codec_proto021_1.parametersDecoder,
|
|
25
|
-
[constants_proto021_1.CODEC.ADDRESS]: codec_proto021_1.addressDecoder,
|
|
26
|
-
[constants_proto021_1.CODEC.SMART_ROLLUP_ADDRESS]: codec_proto021_1.smartRollupAddressDecoder,
|
|
27
|
-
[constants_proto021_1.CODEC.SMART_CONTRACT_ADDRESS]: codec_proto021_1.smartContractAddressDecoder,
|
|
28
|
-
[constants_proto021_1.CODEC.SMART_ROLLUP_COMMITMENT_HASH]: codec_proto021_1.smartRollupCommitmentHashDecoder,
|
|
29
|
-
[constants_proto021_1.CODEC.VALUE]: codec_proto021_1.valueParameterDecoder,
|
|
30
|
-
[constants_proto021_1.CODEC.INT16]: codec_proto021_1.int16Decoder,
|
|
31
|
-
[constants_proto021_1.CODEC.BLOCK_PAYLOAD_HASH]: codec_proto021_1.blockPayloadHashDecoder,
|
|
32
|
-
[constants_proto021_1.CODEC.ENTRYPOINT]: codec_proto021_1.entrypointNameDecoder,
|
|
33
|
-
[constants_proto021_1.CODEC.BURN_LIMIT]: codec_proto021_1.burnLimitDecoder,
|
|
34
|
-
[constants_proto021_1.CODEC.DEPOSITS_LIMIT]: codec_proto021_1.depositsLimitDecoder,
|
|
35
|
-
[constants_proto021_1.CODEC.PVM_KIND]: codec_proto021_1.pvmKindDecoder,
|
|
36
|
-
[constants_proto021_1.CODEC.PADDED_BYTES]: codec_proto021_1.paddedBytesDecoder,
|
|
37
|
-
[constants_proto021_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_proto021_1.smartRollupMessageDecoder,
|
|
38
|
-
[constants_proto021_1.CODEC.SLOT_HEADER]: codec_proto021_1.slotHeaderDecoder,
|
|
39
|
-
};
|
|
40
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OPERATION] = (0, operation_proto021_1.operationDecoder)(exports.decodersProto021);
|
|
41
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.ActivationSchema)(val);
|
|
42
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_FAILING_NOOP] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.FailingNoopSchema)(val);
|
|
43
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_DELEGATION] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.DelegationSchema)(val);
|
|
44
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_TRANSACTION] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.TransactionSchema)(val);
|
|
45
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_ORIGINATION] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.OriginationSchema)(val);
|
|
46
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_BALLOT] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.BallotSchema)(val);
|
|
47
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.AttestationSchema)(val);
|
|
48
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_ATTESTATION_WITH_DAL] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.AttestationWithDalSchema)(val);
|
|
49
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.SeedNonceRevelationSchema)(val);
|
|
50
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.ProposalsSchema)(val);
|
|
51
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_REVEAL] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.RevealSchema)(val);
|
|
52
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.RegisterGlobalConstantSchema)(val);
|
|
53
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.TransferTicketSchema)(val);
|
|
54
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.IncreasePaidStorageSchema)(val);
|
|
55
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.UpdateConsensusKeySchema)(val);
|
|
56
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.DrainDelegateSchema)(val);
|
|
57
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.SmartRollupOriginateSchema)(val);
|
|
58
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.SmartRollupAddMessagesSchema)(val);
|
|
59
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.SmartRollupExecuteOutboxMessageSchema)(val);
|
|
60
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.DalPublishCommitmentSchema)(val);
|
|
61
|
-
exports.decodersProto021[constants_proto021_1.CODEC.MANAGER] = (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.ManagerOperationSchema);
|
|
62
|
-
exports.decodersProto021[constants_proto021_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => (0, operation_proto021_1.schemaDecoder)(exports.decodersProto021)(operation_proto021_1.SetDepositsLimitSchema)(val);
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodersProto021 = void 0;
|
|
4
|
-
const codec_proto021_1 = require("./codec-proto021");
|
|
5
|
-
const constants_proto021_1 = require("./constants-proto021");
|
|
6
|
-
const codec_1 = require("./michelson/codec");
|
|
7
|
-
const operation_proto021_1 = require("./schema/operation-proto021");
|
|
8
|
-
exports.encodersProto021 = {
|
|
9
|
-
[constants_proto021_1.CODEC.SECRET]: (val) => val,
|
|
10
|
-
[constants_proto021_1.CODEC.RAW]: (val) => val,
|
|
11
|
-
[constants_proto021_1.CODEC.TZ1]: codec_proto021_1.tz1Encoder,
|
|
12
|
-
[constants_proto021_1.CODEC.BRANCH]: codec_proto021_1.branchEncoder,
|
|
13
|
-
[constants_proto021_1.CODEC.ZARITH]: codec_proto021_1.zarithEncoder,
|
|
14
|
-
[constants_proto021_1.CODEC.PUBLIC_KEY]: codec_proto021_1.publicKeyEncoder,
|
|
15
|
-
[constants_proto021_1.CODEC.PKH]: codec_proto021_1.publicKeyHashEncoder,
|
|
16
|
-
[constants_proto021_1.CODEC.PKH_ARR]: codec_proto021_1.publicKeyHashesEncoder,
|
|
17
|
-
[constants_proto021_1.CODEC.DELEGATE]: codec_proto021_1.delegateEncoder,
|
|
18
|
-
[constants_proto021_1.CODEC.SCRIPT]: codec_1.scriptEncoder,
|
|
19
|
-
[constants_proto021_1.CODEC.BALLOT_STATEMENT]: codec_proto021_1.ballotEncoder,
|
|
20
|
-
[constants_proto021_1.CODEC.PROPOSAL]: codec_proto021_1.proposalEncoder,
|
|
21
|
-
[constants_proto021_1.CODEC.PROPOSAL_ARR]: codec_proto021_1.proposalsEncoder,
|
|
22
|
-
[constants_proto021_1.CODEC.INT32]: codec_proto021_1.int32Encoder,
|
|
23
|
-
[constants_proto021_1.CODEC.PARAMETERS]: codec_proto021_1.parametersEncoder,
|
|
24
|
-
[constants_proto021_1.CODEC.ADDRESS]: codec_proto021_1.addressEncoder,
|
|
25
|
-
[constants_proto021_1.CODEC.SMART_ROLLUP_ADDRESS]: codec_proto021_1.smartRollupAddressEncoder,
|
|
26
|
-
[constants_proto021_1.CODEC.SMART_CONTRACT_ADDRESS]: codec_proto021_1.smartContractAddressEncoder,
|
|
27
|
-
[constants_proto021_1.CODEC.SMART_ROLLUP_COMMITMENT_HASH]: codec_proto021_1.smartRollupCommitmentHashEncoder,
|
|
28
|
-
[constants_proto021_1.CODEC.VALUE]: codec_proto021_1.valueParameterEncoder,
|
|
29
|
-
[constants_proto021_1.CODEC.INT16]: codec_proto021_1.int16Encoder,
|
|
30
|
-
[constants_proto021_1.CODEC.BLOCK_PAYLOAD_HASH]: codec_proto021_1.blockPayloadHashEncoder,
|
|
31
|
-
[constants_proto021_1.CODEC.ENTRYPOINT]: codec_proto021_1.entrypointNameEncoder,
|
|
32
|
-
[constants_proto021_1.CODEC.BURN_LIMIT]: codec_proto021_1.burnLimitEncoder,
|
|
33
|
-
[constants_proto021_1.CODEC.DEPOSITS_LIMIT]: codec_proto021_1.depositsLimitEncoder,
|
|
34
|
-
[constants_proto021_1.CODEC.PVM_KIND]: codec_proto021_1.pvmKindEncoder,
|
|
35
|
-
[constants_proto021_1.CODEC.PADDED_BYTES]: codec_proto021_1.paddedBytesEncoder,
|
|
36
|
-
[constants_proto021_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_proto021_1.smartRollupMessageEncoder,
|
|
37
|
-
[constants_proto021_1.CODEC.SLOT_HEADER]: codec_proto021_1.slotHeaderEncoder,
|
|
38
|
-
};
|
|
39
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OPERATION] = (0, operation_proto021_1.operationEncoder)(exports.encodersProto021);
|
|
40
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.ActivationSchema)(val);
|
|
41
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_DELEGATION] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.DelegationSchema)(val);
|
|
42
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_TRANSACTION] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.TransactionSchema)(val);
|
|
43
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_ORIGINATION] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.OriginationSchema)(val);
|
|
44
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_BALLOT] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.BallotSchema)(val);
|
|
45
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.AttestationSchema)(val);
|
|
46
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_ATTESTATION_WITH_DAL] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.AttestationWithDalSchema)(val);
|
|
47
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.SeedNonceRevelationSchema)(val);
|
|
48
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.ProposalsSchema)(val);
|
|
49
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_REVEAL] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.RevealSchema)(val);
|
|
50
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.RegisterGlobalConstantSchema)(val);
|
|
51
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.TransferTicketSchema)(val);
|
|
52
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.IncreasePaidStorageSchema)(val);
|
|
53
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.UpdateConsensusKeySchema)(val);
|
|
54
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.DrainDelegateSchema)(val);
|
|
55
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.SmartRollupOriginateSchema)(val);
|
|
56
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.SmartRollupAddMessagesSchema)(val);
|
|
57
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.SmartRollupExecuteOutboxMessageSchema)(val);
|
|
58
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.DalPublishCommitmentSchema)(val);
|
|
59
|
-
exports.encodersProto021[constants_proto021_1.CODEC.MANAGER] = (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.ManagerOperationSchema);
|
|
60
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.SetDepositsLimitSchema)(val);
|
|
61
|
-
exports.encodersProto021[constants_proto021_1.CODEC.OP_FAILING_NOOP] = (val) => (0, operation_proto021_1.schemaEncoder)(exports.encodersProto021)(operation_proto021_1.FailingNoopSchema)(val);
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.schemaDecoder = exports.schemaEncoder = exports.operationDecoder = exports.operationEncoder = exports.FailingNoopSchema = exports.DalPublishCommitmentSchema = exports.SmartRollupExecuteOutboxMessageSchema = exports.SmartRollupAddMessagesSchema = exports.SmartRollupOriginateSchema = exports.SetDepositsLimitSchema = exports.DrainDelegateSchema = exports.UpdateConsensusKeySchema = exports.IncreasePaidStorageSchema = exports.TransferTicketSchema = exports.RegisterGlobalConstantSchema = exports.ProposalsSchema = exports.SeedNonceRevelationSchema = exports.AttestationWithDalSchema = exports.AttestationSchema = exports.BallotSchema = exports.OriginationSchema = exports.TransactionSchema = exports.DelegationSchema = exports.RevealSchema = exports.ActivationSchema = exports.ManagerOperationSchema = void 0;
|
|
4
|
-
const constants_proto021_1 = require("../constants-proto021");
|
|
5
|
-
const core_1 = require("@taquito/core");
|
|
6
|
-
const errors_1 = require("../errors");
|
|
7
|
-
exports.ManagerOperationSchema = {
|
|
8
|
-
branch: constants_proto021_1.CODEC.BRANCH,
|
|
9
|
-
contents: [constants_proto021_1.CODEC.OPERATION],
|
|
10
|
-
};
|
|
11
|
-
exports.ActivationSchema = {
|
|
12
|
-
pkh: constants_proto021_1.CODEC.TZ1,
|
|
13
|
-
secret: constants_proto021_1.CODEC.SECRET,
|
|
14
|
-
};
|
|
15
|
-
exports.RevealSchema = {
|
|
16
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
17
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
18
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
19
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
20
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
21
|
-
public_key: constants_proto021_1.CODEC.PUBLIC_KEY,
|
|
22
|
-
};
|
|
23
|
-
exports.DelegationSchema = {
|
|
24
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
25
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
26
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
27
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
28
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
29
|
-
delegate: constants_proto021_1.CODEC.DELEGATE,
|
|
30
|
-
};
|
|
31
|
-
exports.TransactionSchema = {
|
|
32
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
33
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
34
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
35
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
36
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
37
|
-
amount: constants_proto021_1.CODEC.ZARITH,
|
|
38
|
-
destination: constants_proto021_1.CODEC.ADDRESS,
|
|
39
|
-
parameters: constants_proto021_1.CODEC.PARAMETERS,
|
|
40
|
-
};
|
|
41
|
-
exports.OriginationSchema = {
|
|
42
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
43
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
44
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
45
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
46
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
47
|
-
balance: constants_proto021_1.CODEC.ZARITH,
|
|
48
|
-
delegate: constants_proto021_1.CODEC.DELEGATE,
|
|
49
|
-
script: constants_proto021_1.CODEC.SCRIPT,
|
|
50
|
-
};
|
|
51
|
-
exports.BallotSchema = {
|
|
52
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
53
|
-
period: constants_proto021_1.CODEC.INT32,
|
|
54
|
-
proposal: constants_proto021_1.CODEC.PROPOSAL,
|
|
55
|
-
ballot: constants_proto021_1.CODEC.BALLOT_STATEMENT,
|
|
56
|
-
};
|
|
57
|
-
exports.AttestationSchema = {
|
|
58
|
-
slot: constants_proto021_1.CODEC.INT16,
|
|
59
|
-
level: constants_proto021_1.CODEC.INT32,
|
|
60
|
-
round: constants_proto021_1.CODEC.INT32,
|
|
61
|
-
block_payload_hash: constants_proto021_1.CODEC.BLOCK_PAYLOAD_HASH,
|
|
62
|
-
};
|
|
63
|
-
exports.AttestationWithDalSchema = {
|
|
64
|
-
slot: constants_proto021_1.CODEC.INT16,
|
|
65
|
-
level: constants_proto021_1.CODEC.INT32,
|
|
66
|
-
round: constants_proto021_1.CODEC.INT32,
|
|
67
|
-
block_payload_hash: constants_proto021_1.CODEC.BLOCK_PAYLOAD_HASH,
|
|
68
|
-
dal_attestation: constants_proto021_1.CODEC.ZARITH,
|
|
69
|
-
};
|
|
70
|
-
exports.SeedNonceRevelationSchema = {
|
|
71
|
-
level: constants_proto021_1.CODEC.INT32,
|
|
72
|
-
nonce: constants_proto021_1.CODEC.RAW,
|
|
73
|
-
};
|
|
74
|
-
exports.ProposalsSchema = {
|
|
75
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
76
|
-
period: constants_proto021_1.CODEC.INT32,
|
|
77
|
-
proposals: constants_proto021_1.CODEC.PROPOSAL_ARR,
|
|
78
|
-
};
|
|
79
|
-
exports.RegisterGlobalConstantSchema = {
|
|
80
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
81
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
82
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
83
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
84
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
85
|
-
value: constants_proto021_1.CODEC.VALUE,
|
|
86
|
-
};
|
|
87
|
-
exports.TransferTicketSchema = {
|
|
88
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
89
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
90
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
91
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
92
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
93
|
-
ticket_contents: constants_proto021_1.CODEC.VALUE,
|
|
94
|
-
ticket_ty: constants_proto021_1.CODEC.VALUE,
|
|
95
|
-
ticket_ticketer: constants_proto021_1.CODEC.ADDRESS,
|
|
96
|
-
ticket_amount: constants_proto021_1.CODEC.ZARITH,
|
|
97
|
-
destination: constants_proto021_1.CODEC.ADDRESS,
|
|
98
|
-
entrypoint: constants_proto021_1.CODEC.ENTRYPOINT,
|
|
99
|
-
};
|
|
100
|
-
exports.IncreasePaidStorageSchema = {
|
|
101
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
102
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
103
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
104
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
105
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
106
|
-
amount: constants_proto021_1.CODEC.ZARITH,
|
|
107
|
-
destination: constants_proto021_1.CODEC.SMART_CONTRACT_ADDRESS,
|
|
108
|
-
};
|
|
109
|
-
exports.UpdateConsensusKeySchema = {
|
|
110
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
111
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
112
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
113
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
114
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
115
|
-
pk: constants_proto021_1.CODEC.PUBLIC_KEY,
|
|
116
|
-
};
|
|
117
|
-
exports.DrainDelegateSchema = {
|
|
118
|
-
consensus_key: constants_proto021_1.CODEC.PKH,
|
|
119
|
-
delegate: constants_proto021_1.CODEC.PKH,
|
|
120
|
-
destination: constants_proto021_1.CODEC.PKH,
|
|
121
|
-
};
|
|
122
|
-
exports.SetDepositsLimitSchema = {
|
|
123
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
124
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
125
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
126
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
127
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
128
|
-
limit: constants_proto021_1.CODEC.DEPOSITS_LIMIT,
|
|
129
|
-
};
|
|
130
|
-
exports.SmartRollupOriginateSchema = {
|
|
131
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
132
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
133
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
134
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
135
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
136
|
-
pvm_kind: constants_proto021_1.CODEC.PVM_KIND,
|
|
137
|
-
kernel: constants_proto021_1.CODEC.PADDED_BYTES,
|
|
138
|
-
parameters_ty: constants_proto021_1.CODEC.VALUE,
|
|
139
|
-
whitelist: constants_proto021_1.CODEC.PKH_ARR,
|
|
140
|
-
};
|
|
141
|
-
exports.SmartRollupAddMessagesSchema = {
|
|
142
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
143
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
144
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
145
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
146
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
147
|
-
message: constants_proto021_1.CODEC.SMART_ROLLUP_MESSAGE,
|
|
148
|
-
};
|
|
149
|
-
exports.SmartRollupExecuteOutboxMessageSchema = {
|
|
150
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
151
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
152
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
153
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
154
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
155
|
-
rollup: constants_proto021_1.CODEC.SMART_ROLLUP_ADDRESS,
|
|
156
|
-
cemented_commitment: constants_proto021_1.CODEC.SMART_ROLLUP_COMMITMENT_HASH,
|
|
157
|
-
output_proof: constants_proto021_1.CODEC.PADDED_BYTES,
|
|
158
|
-
};
|
|
159
|
-
exports.DalPublishCommitmentSchema = {
|
|
160
|
-
source: constants_proto021_1.CODEC.PKH,
|
|
161
|
-
fee: constants_proto021_1.CODEC.ZARITH,
|
|
162
|
-
counter: constants_proto021_1.CODEC.ZARITH,
|
|
163
|
-
gas_limit: constants_proto021_1.CODEC.ZARITH,
|
|
164
|
-
storage_limit: constants_proto021_1.CODEC.ZARITH,
|
|
165
|
-
slot_header: constants_proto021_1.CODEC.SLOT_HEADER,
|
|
166
|
-
};
|
|
167
|
-
exports.FailingNoopSchema = {
|
|
168
|
-
arbitrary: constants_proto021_1.CODEC.PADDED_BYTES,
|
|
169
|
-
};
|
|
170
|
-
const operationEncoder = (encoders) => (operation) => {
|
|
171
|
-
if (!(operation.kind in encoders) || !(operation.kind in constants_proto021_1.kindMappingReverse)) {
|
|
172
|
-
throw new core_1.InvalidOperationKindError(operation.kind);
|
|
173
|
-
}
|
|
174
|
-
return constants_proto021_1.kindMappingReverse[operation.kind] + encoders[operation.kind](operation);
|
|
175
|
-
};
|
|
176
|
-
exports.operationEncoder = operationEncoder;
|
|
177
|
-
const operationDecoder = (decoders) => (value) => {
|
|
178
|
-
const op = value.consume(1);
|
|
179
|
-
const operationName = constants_proto021_1.kindMapping[op[0]];
|
|
180
|
-
if (operationName === undefined) {
|
|
181
|
-
throw new errors_1.UnsupportedOperationError(op[0].toString());
|
|
182
|
-
}
|
|
183
|
-
const decodedObj = decoders[operationName](value);
|
|
184
|
-
if (typeof decodedObj !== 'object') {
|
|
185
|
-
throw new errors_1.OperationDecodingError('Invalid operation, cannot be decoded.');
|
|
186
|
-
}
|
|
187
|
-
return Object.assign({ kind: operationName }, decodedObj);
|
|
188
|
-
};
|
|
189
|
-
exports.operationDecoder = operationDecoder;
|
|
190
|
-
const schemaEncoder = (encoders) => (schema) => (value) => {
|
|
191
|
-
const keys = Object.keys(schema);
|
|
192
|
-
return keys.reduce((prev, key) => {
|
|
193
|
-
const valueToEncode = schema[key];
|
|
194
|
-
if (value && Array.isArray(valueToEncode)) {
|
|
195
|
-
const encoder = encoders[valueToEncode[0]];
|
|
196
|
-
const values = value[key];
|
|
197
|
-
if (!Array.isArray(values)) {
|
|
198
|
-
throw new errors_1.OperationEncodingError(`Invalid operation value "${JSON.stringify(values)}" of key "${key}, expected value to be Array.`);
|
|
199
|
-
}
|
|
200
|
-
return (prev + values.reduce((prevBytes, current) => prevBytes + encoder(current), ''));
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
const encoder = encoders[valueToEncode];
|
|
204
|
-
return prev + encoder(value[key]);
|
|
205
|
-
}
|
|
206
|
-
}, '');
|
|
207
|
-
};
|
|
208
|
-
exports.schemaEncoder = schemaEncoder;
|
|
209
|
-
const schemaDecoder = (decoders) => (schema) => (value) => {
|
|
210
|
-
const keys = Object.keys(schema);
|
|
211
|
-
return keys.reduce((prev, key) => {
|
|
212
|
-
const valueToEncode = schema[key];
|
|
213
|
-
if (Array.isArray(valueToEncode)) {
|
|
214
|
-
const decoder = decoders[valueToEncode[0]];
|
|
215
|
-
const decoded = [];
|
|
216
|
-
const lastLength = value.length();
|
|
217
|
-
while (value.length() > 0) {
|
|
218
|
-
decoded.push(decoder(value));
|
|
219
|
-
if (lastLength === value.length()) {
|
|
220
|
-
throw new errors_1.OperationDecodingError('Unable to decode value');
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return Object.assign(Object.assign({}, prev), { [key]: decoded });
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
const decoder = decoders[valueToEncode];
|
|
227
|
-
const result = decoder(value);
|
|
228
|
-
if (typeof result !== 'undefined') {
|
|
229
|
-
return Object.assign(Object.assign({}, prev), { [key]: result });
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
return Object.assign({}, prev);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}, {});
|
|
236
|
-
};
|
|
237
|
-
exports.schemaDecoder = schemaDecoder;
|