@taquito/michel-codec 12.0.2 → 12.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.
@@ -1,3 +1,21 @@
1
+ /**
2
+ * @category Error
3
+ * @description Error that indicates a failure when decoding a base58 encoding
4
+ */
5
+ export declare class Base58DecodingError extends Error {
6
+ message: string;
7
+ name: string;
8
+ constructor(message: string);
9
+ }
10
+ /**
11
+ * @category Error
12
+ * @description
13
+ */
14
+ export declare class InvalidMessageError extends Error {
15
+ message: string;
16
+ name: string;
17
+ constructor(message: string);
18
+ }
1
19
  export declare function decodeBase58(src: string): number[];
2
20
  export declare function encodeBase58(src: number[] | Uint8Array): string;
3
21
  export declare function decodeBase58Check(src: string): number[];
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @category Error
3
+ * @description Error that indicates an invalid contract being passed or used
4
+ */
5
+ export declare class InvalidContractError extends Error {
6
+ message: string;
7
+ name: string;
8
+ constructor(message: string);
9
+ }
10
+ /**
11
+ * @category Error
12
+ * @description Error that indicates an invalid type expression being passed or used
13
+ */
14
+ export declare class InvalidTypeExpressionError extends Error {
15
+ message: string;
16
+ name: string;
17
+ constructor(message: string);
18
+ }
19
+ /**
20
+ * @category Error
21
+ * @description Error that indicates an invalid data expression being passed or used
22
+ */
23
+ export declare class InvalidDataExpressionError extends Error {
24
+ message: string;
25
+ name: string;
26
+ constructor(message: string);
27
+ }
28
+ /**
29
+ * @category Error
30
+ * @description Error that indicates an invalid contract entrypoint being referenced or passed
31
+ */
32
+ export declare class InvalidEntrypointError extends Error {
33
+ entrypoint?: string | undefined;
34
+ name: string;
35
+ constructor(entrypoint?: string | undefined);
36
+ }
37
+ /**
38
+ * @category Error
39
+ * @description Error that indicates a failure happening when trying to encode Tezos ID
40
+ */
41
+ export declare class TezosIdEncodeError extends Error {
42
+ message: string;
43
+ name: string;
44
+ constructor(message: string);
45
+ }
46
+ /**
47
+ * @category Error
48
+ * @description Error that indicates a general error happening when trying to create a LongInteger
49
+ */
50
+ export declare class LongIntegerError extends Error {
51
+ message: string;
52
+ name: string;
53
+ constructor(message: string);
54
+ }
55
+ /**
56
+ * @category Error
57
+ * @description Error that indicates a failure occurring when trying to parse a hex byte
58
+ */
59
+ export declare class HexParseError extends Error {
60
+ hexByte: string;
61
+ name: string;
62
+ constructor(hexByte: string);
63
+ }
@@ -1,5 +1,9 @@
1
1
  import { Prim, Expr } from './micheline';
2
2
  import { ProtocolOptions } from './michelson-types';
3
+ /**
4
+ * @category Error
5
+ * @description Indicates that an error has occurred preventing macros from being expanded in a plain Michelson input
6
+ */
3
7
  export declare class MacroError extends Error {
4
8
  prim: Prim;
5
9
  constructor(prim: Prim, message?: string);
@@ -1,6 +1,10 @@
1
1
  import { Token } from './scan';
2
2
  import { Expr } from './micheline';
3
3
  import { ProtocolOptions } from './michelson-types';
4
+ /**
5
+ * @category Error
6
+ * @description Error indicating a failure when parsing Micheline expressions
7
+ */
4
8
  export declare class MichelineParseError extends Error {
5
9
  token: Token | null;
6
10
  /**
@@ -9,6 +13,10 @@ export declare class MichelineParseError extends Error {
9
13
  */
10
14
  constructor(token: Token | null, message?: string);
11
15
  }
16
+ /**
17
+ * @category Error
18
+ * @description Error that inidicates a failure when parsing Micheline JSON
19
+ */
12
20
  export declare class JSONParseError extends Error {
13
21
  node: unknown;
14
22
  /**
@@ -116,6 +116,7 @@ export declare enum Protocol {
116
116
  PtHangz2 = "PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx",
117
117
  PsiThaCa = "PsiThaCaT47Zboaw71QWScM8sXeMM7bbQFncK9FLqYc6EKdpjVP",
118
118
  Psithaca2 = "Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A",
119
+ PtJakarta = "PtJakartaiDz69SfDDLXJSiuZqTSeSKRDbKVZC8MNzJnvRjvnGw",
119
120
  ProtoALpha = "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK"
120
121
  }
121
122
  export declare const DefaultProtocol = Protocol.Psithaca2;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @category Error
3
+ * @description Error that indicates a failure when performing the scan step when parsing Michelson
4
+ */
1
5
  export declare class ScanError extends Error {
2
6
  src: string;
3
7
  idx: number;
@@ -11,6 +11,10 @@ export declare type NoAnnots<T extends Prim> = OmitProp<T, 'annots'>;
11
11
  export declare type Nullable<T> = {
12
12
  [P in keyof T]: T[P] | null;
13
13
  };
14
+ /**
15
+ * @category Error
16
+ * @description Error that indicates a Michelson failure occurring
17
+ */
14
18
  export declare class MichelsonError<T extends Expr = Expr> extends Error {
15
19
  val: T;
16
20
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/michel-codec",
3
- "version": "12.0.2",
3
+ "version": "12.1.0",
4
4
  "description": "Michelson parser/validator/formatter",
5
5
  "keywords": [
6
6
  "tezos",
@@ -90,5 +90,5 @@
90
90
  "typedoc": "^0.20.36",
91
91
  "typescript": "~4.1.5"
92
92
  },
93
- "gitHead": "a224127fe138d46674af2f9605e5bb452b2e4d74"
93
+ "gitHead": "8e044472d87e92bfa748e8193ba84a7ee57d659f"
94
94
  }