@taquito/michelson-encoder 11.0.0 → 11.1.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/schema/error.js +22 -0
- package/dist/lib/schema/error.js.map +1 -0
- package/dist/lib/schema/storage.js +1 -0
- package/dist/lib/schema/storage.js.map +1 -1
- package/dist/lib/schema/view-schema.js +84 -0
- package/dist/lib/schema/view-schema.js.map +1 -0
- package/dist/lib/taquito-michelson-encoder.js +5 -1
- package/dist/lib/taquito-michelson-encoder.js.map +1 -1
- package/dist/lib/tokens/comparable/timestamp.js +4 -1
- package/dist/lib/tokens/comparable/timestamp.js.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-michelson-encoder.es5.js +103 -4
- package/dist/taquito-michelson-encoder.es5.js.map +1 -1
- package/dist/taquito-michelson-encoder.umd.js +106 -3
- package/dist/taquito-michelson-encoder.umd.js.map +1 -1
- package/dist/types/schema/error.d.ts +12 -0
- package/dist/types/schema/storage.d.ts +1 -0
- package/dist/types/schema/view-schema.d.ts +48 -0
- package/dist/types/taquito-michelson-encoder.d.ts +3 -0
- package/package.json +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ViewEncodingError implements Error {
|
|
2
|
+
smartContractViewName: string;
|
|
3
|
+
originalError: any;
|
|
4
|
+
name: string;
|
|
5
|
+
message: string;
|
|
6
|
+
constructor(smartContractViewName: string, originalError: any);
|
|
7
|
+
}
|
|
8
|
+
export declare class InvalidScriptError implements Error {
|
|
9
|
+
message: string;
|
|
10
|
+
name: string;
|
|
11
|
+
constructor(message: string);
|
|
12
|
+
}
|
|
@@ -6,6 +6,7 @@ declare const schemaTypeSymbol: unique symbol;
|
|
|
6
6
|
* @warn Our current smart contract abstraction feature is currently in preview. It's API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Schema {
|
|
9
|
+
readonly val: MichelsonV1Expression;
|
|
9
10
|
private root;
|
|
10
11
|
[schemaTypeSymbol]: boolean;
|
|
11
12
|
static isSchema(obj: any): obj is Schema;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MichelsonV1Expression, MichelsonV1ExpressionExtended, ScriptResponse } from "@taquito/rpc";
|
|
2
|
+
import { Semantic } from "../tokens/token";
|
|
3
|
+
export declare class ViewSchema {
|
|
4
|
+
readonly viewName: string;
|
|
5
|
+
readonly viewArgsType: MichelsonV1ExpressionExtended;
|
|
6
|
+
readonly viewReturnType: MichelsonV1ExpressionExtended;
|
|
7
|
+
readonly instructions: MichelsonV1ExpressionExtended[];
|
|
8
|
+
private rootArgsType;
|
|
9
|
+
private rootReturnType;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @description Create an instance of ViewSchema for each view in a script
|
|
13
|
+
*
|
|
14
|
+
* @param val contract script obtained from the RPC
|
|
15
|
+
* @returns array of ViewSchema or empty array if there is no view in the contract
|
|
16
|
+
*/
|
|
17
|
+
static fromRPCResponse(val: {
|
|
18
|
+
script: ScriptResponse;
|
|
19
|
+
}): ViewSchema[];
|
|
20
|
+
constructor(val: MichelsonV1Expression[]);
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @description Transform the view parameter into Michelson
|
|
24
|
+
*
|
|
25
|
+
* @param args parameter of the view in js format
|
|
26
|
+
* @returns parameter of the view in Michelson
|
|
27
|
+
*/
|
|
28
|
+
encodeViewArgs(args: any): any;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @description Transform the view result from Michelson to readable data
|
|
32
|
+
*
|
|
33
|
+
* @param val result of the view in JSON Michelson
|
|
34
|
+
* @param semantics optional semantics to override the default decoding behavior
|
|
35
|
+
* @returns result of the view in a readable format
|
|
36
|
+
*/
|
|
37
|
+
decodeViewResult(val: any, semantics?: Semantic): any;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @description Return the signature of the view parameter
|
|
41
|
+
*/
|
|
42
|
+
extractArgsSchema(): any;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @description Return the format of the view result
|
|
46
|
+
*/
|
|
47
|
+
extractResultSchema(): any;
|
|
48
|
+
}
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export * from './schema/storage';
|
|
6
6
|
export * from './schema/parameter';
|
|
7
|
+
export * from './schema/view-schema';
|
|
8
|
+
export * from './schema/error';
|
|
7
9
|
export { Semantic, BigMapKeyType } from './tokens/token';
|
|
8
10
|
export * from './errors';
|
|
9
11
|
export declare const UnitValue: unique symbol;
|
|
10
12
|
export declare const SaplingStateValue: {};
|
|
11
13
|
export * from './michelson-map';
|
|
12
14
|
export { VERSION } from './version';
|
|
15
|
+
export { Token } from './tokens/token';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/michelson-encoder",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "converts michelson data and types into convenient JS/TS objects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@taquito/rpc": "^11.
|
|
72
|
-
"@taquito/utils": "^11.
|
|
71
|
+
"@taquito/rpc": "^11.1.0",
|
|
72
|
+
"@taquito/utils": "^11.1.0",
|
|
73
73
|
"bignumber.js": "^9.0.1",
|
|
74
74
|
"fast-json-stable-stringify": "^2.1.0"
|
|
75
75
|
},
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"typedoc": "^0.20.36",
|
|
104
104
|
"typescript": "~4.1.5"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "b45707bca75a6a5163b6ef20c80db5975b02e894"
|
|
107
107
|
}
|