@mainsail/contracts 0.0.1-alpha.6 → 0.0.1-alpha.8

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mainsail - Contracts
2
2
 
3
- ![banner](https://raw.githubusercontent.com/ArkEcosystem/mainsail/main/banner.png)
3
+ ![banner](https://raw.githubusercontent.com/ArkEcosystem/mainsail/main/banner.jpeg)
4
4
 
5
5
  ## Documentation
6
6
 
@@ -13,7 +13,7 @@ export interface ProcessableUnit {
13
13
  getCommit(): Promise<Commit>;
14
14
  }
15
15
  export interface Handler {
16
- execute(unit: ProcessableUnit): Promise<boolean>;
16
+ execute(unit: ProcessableUnit): Promise<void>;
17
17
  }
18
18
  export interface BlockProcessor {
19
19
  process(unit: ProcessableUnit): Promise<boolean>;
@@ -23,6 +23,6 @@ export interface TransactionProcessor {
23
23
  process(walletRepository: WalletRepository, transaction: Transaction): Promise<void>;
24
24
  }
25
25
  export interface Verifier {
26
- verify(unit: ProcessableUnit): Promise<boolean>;
26
+ verify(unit: ProcessableUnit): Promise<void>;
27
27
  }
28
28
  //# sourceMappingURL=processor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../source/contracts/processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,kBAAkB,IAAI,OAAO,CAAC;IAC9B,kBAAkB,IAAI,OAAO,CAAC;IAC9B,kBAAkB,CAAC,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;IACnD,QAAQ,IAAI,KAAK,CAAC;IAClB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,OAAO;IACvB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,cAAc;IAC9B,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrF;AAED,MAAM,WAAW,QAAQ;IACxB,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD"}
1
+ {"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../source/contracts/processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,kBAAkB,IAAI,OAAO,CAAC;IAC9B,kBAAkB,IAAI,OAAO,CAAC;IAC9B,kBAAkB,CAAC,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;IACnD,QAAQ,IAAI,KAAK,CAAC;IAClB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,OAAO;IACvB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,cAAc;IAC9B,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,oBAAoB;IACpC,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrF;AAED,MAAM,WAAW,QAAQ;IACxB,MAAM,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C"}
@@ -1,9 +1,4 @@
1
1
  export declare class Exception extends Error {
2
2
  constructor(message: string, code?: string);
3
3
  }
4
- export declare class UnexpectedError extends Exception {
5
- readonly error: Error;
6
- readonly path: string[];
7
- constructor(error: Error, path: string[]);
8
- }
9
4
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../source/exceptions/base.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;gBAChB,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAejD;AAED,qBAAa,eAAgB,SAAQ,SAAS;aAE5B,KAAK,EAAE,KAAK;aACZ,IAAI,EAAE,MAAM,EAAE;gBADd,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,MAAM,EAAE;CAQ/B"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../source/exceptions/base.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;gBAChB,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAejD"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnexpectedError = exports.Exception = void 0;
3
+ exports.Exception = void 0;
4
4
  class Exception extends Error {
5
5
  constructor(message, code) {
6
6
  super(message);
@@ -16,14 +16,4 @@ class Exception extends Error {
16
16
  }
17
17
  }
18
18
  exports.Exception = Exception;
19
- class UnexpectedError extends Exception {
20
- constructor(error, path) {
21
- super(path.length > 0
22
- ? `Unexpected error '${error.message}' (${error.constructor.name}) at '${path.join(".")}'`
23
- : `Unexpected error '${error.message}' (${error.constructor.name})`);
24
- this.error = error;
25
- this.path = path;
26
- }
27
- }
28
- exports.UnexpectedError = UnexpectedError;
29
19
  //# sourceMappingURL=base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../source/exceptions/base.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IACnC,YAAmB,OAAe,EAAE,IAAa;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;YACtC,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO;SAC7C,CAAC,CAAC;QAEH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YACnC,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;SAC5B,CAAC,CAAC;QAEH,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;CACD;AAhBD,8BAgBC;AAED,MAAa,eAAgB,SAAQ,SAAS;IAC7C,YACiB,KAAY,EACZ,IAAc;QAE9B,KAAK,CACJ,IAAI,CAAC,MAAM,GAAG,CAAC;YACd,CAAC,CAAC,qBAAqB,KAAK,CAAC,OAAO,MAAM,KAAK,CAAC,WAAW,CAAC,IAAI,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG;YAC1F,CAAC,CAAC,qBAAqB,KAAK,CAAC,OAAO,MAAM,KAAK,CAAC,WAAW,CAAC,IAAI,GAAG,CACpE,CAAC;QAPc,UAAK,GAAL,KAAK,CAAO;QACZ,SAAI,GAAJ,IAAI,CAAU;IAO/B,CAAC;CACD;AAXD,0CAWC"}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../source/exceptions/base.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAU,SAAQ,KAAK;IACnC,YAAmB,OAAe,EAAE,IAAa;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;YACtC,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO;SAC7C,CAAC,CAAC;QAEH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;YACnC,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;SAC5B,CAAC,CAAC;QAEH,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;CACD;AAhBD,8BAgBC"}
@@ -1,16 +1,15 @@
1
1
  export * from "./base";
2
- export * from "./cache";
3
2
  export * from "./cli";
4
3
  export * from "./config";
5
4
  export * from "./consensus";
6
5
  export * from "./container";
7
6
  export * from "./crypto";
8
7
  export * from "./filesystem";
9
- export * from "./forger";
10
8
  export * from "./logic";
11
9
  export * from "./p2p";
12
10
  export * from "./plugins";
13
11
  export * from "./pool";
12
+ export * from "./processor";
14
13
  export * from "./runtime";
15
14
  export * from "./state";
16
15
  export * from "./validation";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -15,18 +15,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./base"), exports);
18
- __exportStar(require("./cache"), exports);
19
18
  __exportStar(require("./cli"), exports);
20
19
  __exportStar(require("./config"), exports);
21
20
  __exportStar(require("./consensus"), exports);
22
21
  __exportStar(require("./container"), exports);
23
22
  __exportStar(require("./crypto"), exports);
24
23
  __exportStar(require("./filesystem"), exports);
25
- __exportStar(require("./forger"), exports);
26
24
  __exportStar(require("./logic"), exports);
27
25
  __exportStar(require("./p2p"), exports);
28
26
  __exportStar(require("./plugins"), exports);
29
27
  __exportStar(require("./pool"), exports);
28
+ __exportStar(require("./processor"), exports);
30
29
  __exportStar(require("./runtime"), exports);
31
30
  __exportStar(require("./state"), exports);
32
31
  __exportStar(require("./validation"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,0CAAwB;AACxB,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,0CAAwB;AACxB,wCAAsB;AACtB,4CAA0B;AAC1B,yCAAuB;AACvB,4CAA0B;AAC1B,0CAAwB;AACxB,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,+CAA6B;AAC7B,0CAAwB;AACxB,wCAAsB;AACtB,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,0CAAwB;AACxB,+CAA6B"}
@@ -0,0 +1,23 @@
1
+ import { Block } from "../contracts/crypto";
2
+ import { Exception } from "./base";
3
+ export declare class ValidatorException extends Exception {
4
+ }
5
+ export declare class BlockNotChained extends ValidatorException {
6
+ constructor(block: Block);
7
+ }
8
+ export declare class BlockNotVerified extends ValidatorException {
9
+ constructor(block: Block, reason: string);
10
+ }
11
+ export declare class InvalidTimestamp extends ValidatorException {
12
+ constructor(block: Block);
13
+ }
14
+ export declare class InvalidGenerator extends ValidatorException {
15
+ constructor(block: Block, expectedValidator: string);
16
+ }
17
+ export declare class IncompatibleTransactions extends ValidatorException {
18
+ constructor(block: Block);
19
+ }
20
+ export declare class InvalidNonce extends ValidatorException {
21
+ constructor(block: Block, sender: string);
22
+ }
23
+ //# sourceMappingURL=processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../source/exceptions/processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,kBAAmB,SAAQ,SAAS;CAAG;AAEpD,qBAAa,eAAgB,SAAQ,kBAAkB;gBACnC,KAAK,EAAE,KAAK;CAG/B;AAED,qBAAa,gBAAiB,SAAQ,kBAAkB;gBACpC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM;CAG/C;AAED,qBAAa,gBAAiB,SAAQ,kBAAkB;gBACpC,KAAK,EAAE,KAAK;CAG/B;AAED,qBAAa,gBAAiB,SAAQ,kBAAkB;gBACpC,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM;CAK1D;AAED,qBAAa,wBAAyB,SAAQ,kBAAkB;gBAC5C,KAAK,EAAE,KAAK;CAG/B;AAED,qBAAa,YAAa,SAAQ,kBAAkB;gBAChC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM;CAG/C"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidNonce = exports.IncompatibleTransactions = exports.InvalidGenerator = exports.InvalidTimestamp = exports.BlockNotVerified = exports.BlockNotChained = exports.ValidatorException = void 0;
4
+ const base_1 = require("./base");
5
+ class ValidatorException extends base_1.Exception {
6
+ }
7
+ exports.ValidatorException = ValidatorException;
8
+ class BlockNotChained extends ValidatorException {
9
+ constructor(block) {
10
+ super(`Block ${block.data.id} is not chained.`);
11
+ }
12
+ }
13
+ exports.BlockNotChained = BlockNotChained;
14
+ class BlockNotVerified extends ValidatorException {
15
+ constructor(block, reason) {
16
+ super(`Block ${block.data.id} is not verified, because: ${reason}.`);
17
+ }
18
+ }
19
+ exports.BlockNotVerified = BlockNotVerified;
20
+ class InvalidTimestamp extends ValidatorException {
21
+ constructor(block) {
22
+ super(`Block ${block.data.id} timestamp is too low.`);
23
+ }
24
+ }
25
+ exports.InvalidTimestamp = InvalidTimestamp;
26
+ class InvalidGenerator extends ValidatorException {
27
+ constructor(block, expectedValidator) {
28
+ super(`Block ${block.data.id} has invalid generator. Block generator is ${block.data.generatorPublicKey} instead ${expectedValidator}.`);
29
+ }
30
+ }
31
+ exports.InvalidGenerator = InvalidGenerator;
32
+ class IncompatibleTransactions extends ValidatorException {
33
+ constructor(block) {
34
+ super(`Block ${block.data.id} contains incompatible transaction.`);
35
+ }
36
+ }
37
+ exports.IncompatibleTransactions = IncompatibleTransactions;
38
+ class InvalidNonce extends ValidatorException {
39
+ constructor(block, sender) {
40
+ super(`Block ${block.data.id} contains invalid nonce for sender ${sender}.`);
41
+ }
42
+ }
43
+ exports.InvalidNonce = InvalidNonce;
44
+ //# sourceMappingURL=processor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processor.js","sourceRoot":"","sources":["../../source/exceptions/processor.ts"],"names":[],"mappings":";;;AACA,iCAAmC;AAEnC,MAAa,kBAAmB,SAAQ,gBAAS;CAAG;AAApD,gDAAoD;AAEpD,MAAa,eAAgB,SAAQ,kBAAkB;IACtD,YAAmB,KAAY;QAC9B,KAAK,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC,CAAC;IACjD,CAAC;CACD;AAJD,0CAIC;AAED,MAAa,gBAAiB,SAAQ,kBAAkB;IACvD,YAAmB,KAAY,EAAE,MAAc;QAC9C,KAAK,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAAE,8BAA8B,MAAM,GAAG,CAAC,CAAC;IACtE,CAAC;CACD;AAJD,4CAIC;AAED,MAAa,gBAAiB,SAAQ,kBAAkB;IACvD,YAAmB,KAAY;QAC9B,KAAK,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAAE,wBAAwB,CAAC,CAAC;IACvD,CAAC;CACD;AAJD,4CAIC;AAED,MAAa,gBAAiB,SAAQ,kBAAkB;IACvD,YAAmB,KAAY,EAAE,iBAAyB;QACzD,KAAK,CACJ,SAAS,KAAK,CAAC,IAAI,CAAC,EAAE,8CAA8C,KAAK,CAAC,IAAI,CAAC,kBAAkB,YAAY,iBAAiB,GAAG,CACjI,CAAC;IACH,CAAC;CACD;AAND,4CAMC;AAED,MAAa,wBAAyB,SAAQ,kBAAkB;IAC/D,YAAmB,KAAY;QAC9B,KAAK,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAAE,qCAAqC,CAAC,CAAC;IACpE,CAAC;CACD;AAJD,4DAIC;AAED,MAAa,YAAa,SAAQ,kBAAkB;IACnD,YAAmB,KAAY,EAAE,MAAc;QAC9C,KAAK,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAAE,sCAAsC,MAAM,GAAG,CAAC,CAAC;IAC9E,CAAC;CACD;AAJD,oCAIC"}
@@ -1,14 +1,6 @@
1
1
  import { Exception } from "./base";
2
2
  export declare class RuntimeException extends Exception {
3
3
  }
4
- export declare class OverflowException extends RuntimeException {
5
- }
6
- export declare class RangeException extends RuntimeException {
7
- }
8
- export declare class UnderflowException extends RuntimeException {
9
- }
10
- export declare class UnexpectedValueException extends RuntimeException {
11
- }
12
4
  export declare class NotImplemented extends RuntimeException {
13
5
  constructor(method: string, klass: string);
14
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../source/exceptions/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,gBAAiB,SAAQ,SAAS;CAAG;AAElD,qBAAa,iBAAkB,SAAQ,gBAAgB;CAAG;AAE1D,qBAAa,cAAe,SAAQ,gBAAgB;CAAG;AAEvD,qBAAa,kBAAmB,SAAQ,gBAAgB;CAAG;AAE3D,qBAAa,wBAAyB,SAAQ,gBAAgB;CAAG;AAEjE,qBAAa,cAAe,SAAQ,gBAAgB;gBAChC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAGhD;AAED,qBAAa,kBAAmB,SAAQ,gBAAgB;CAAG"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../source/exceptions/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,gBAAiB,SAAQ,SAAS;CAAG;AAElD,qBAAa,cAAe,SAAQ,gBAAgB;gBAChC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAGhD;AAED,qBAAa,kBAAmB,SAAQ,gBAAgB;CAAG"}
@@ -1,22 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssertionException = exports.NotImplemented = exports.UnexpectedValueException = exports.UnderflowException = exports.RangeException = exports.OverflowException = exports.RuntimeException = void 0;
3
+ exports.AssertionException = exports.NotImplemented = exports.RuntimeException = void 0;
4
4
  const base_1 = require("./base");
5
5
  class RuntimeException extends base_1.Exception {
6
6
  }
7
7
  exports.RuntimeException = RuntimeException;
8
- class OverflowException extends RuntimeException {
9
- }
10
- exports.OverflowException = OverflowException;
11
- class RangeException extends RuntimeException {
12
- }
13
- exports.RangeException = RangeException;
14
- class UnderflowException extends RuntimeException {
15
- }
16
- exports.UnderflowException = UnderflowException;
17
- class UnexpectedValueException extends RuntimeException {
18
- }
19
- exports.UnexpectedValueException = UnexpectedValueException;
20
8
  class NotImplemented extends RuntimeException {
21
9
  constructor(method, klass) {
22
10
  super(`Method [${method}] is not implemented in [${klass}].`);
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../source/exceptions/runtime.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAEnC,MAAa,gBAAiB,SAAQ,gBAAS;CAAG;AAAlD,4CAAkD;AAElD,MAAa,iBAAkB,SAAQ,gBAAgB;CAAG;AAA1D,8CAA0D;AAE1D,MAAa,cAAe,SAAQ,gBAAgB;CAAG;AAAvD,wCAAuD;AAEvD,MAAa,kBAAmB,SAAQ,gBAAgB;CAAG;AAA3D,gDAA2D;AAE3D,MAAa,wBAAyB,SAAQ,gBAAgB;CAAG;AAAjE,4DAAiE;AAEjE,MAAa,cAAe,SAAQ,gBAAgB;IACnD,YAAmB,MAAc,EAAE,KAAa;QAC/C,KAAK,CAAC,WAAW,MAAM,4BAA4B,KAAK,IAAI,CAAC,CAAC;IAC/D,CAAC;CACD;AAJD,wCAIC;AAED,MAAa,kBAAmB,SAAQ,gBAAgB;CAAG;AAA3D,gDAA2D"}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../source/exceptions/runtime.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAEnC,MAAa,gBAAiB,SAAQ,gBAAS;CAAG;AAAlD,4CAAkD;AAElD,MAAa,cAAe,SAAQ,gBAAgB;IACnD,YAAmB,MAAc,EAAE,KAAa;QAC/C,KAAK,CAAC,WAAW,MAAM,4BAA4B,KAAK,IAAI,CAAC,CAAC;IAC/D,CAAC;CACD;AAJD,wCAIC;AAED,MAAa,kBAAmB,SAAQ,gBAAgB;CAAG;AAA3D,gDAA2D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mainsail/contracts",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.8",
4
4
  "description": "Contracts for the Mainsail blockchain",
5
5
  "license": "GPL-3.0-only",
6
6
  "contributors": [],
@@ -16,7 +16,7 @@
16
16
  "inversify": "6.0.2",
17
17
  "reflect-metadata": "0.2.0",
18
18
  "type-fest": "4.8.3",
19
- "@mainsail/utils": "0.0.1-alpha.6"
19
+ "@mainsail/utils": "0.0.1-alpha.8"
20
20
  },
21
21
  "devDependencies": {
22
22
  "uvu": "^0.5.6"
@@ -1,6 +0,0 @@
1
- import { Exception } from "./base";
2
- export declare class CacheException extends Exception {
3
- }
4
- export declare class InvalidArgument extends CacheException {
5
- }
6
- //# sourceMappingURL=cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../source/exceptions/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,cAAe,SAAQ,SAAS;CAAG;AAEhD,qBAAa,eAAgB,SAAQ,cAAc;CAAG"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidArgument = exports.CacheException = void 0;
4
- const base_1 = require("./base");
5
- class CacheException extends base_1.Exception {
6
- }
7
- exports.CacheException = CacheException;
8
- class InvalidArgument extends CacheException {
9
- }
10
- exports.InvalidArgument = InvalidArgument;
11
- //# sourceMappingURL=cache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../source/exceptions/cache.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAEnC,MAAa,cAAe,SAAQ,gBAAS;CAAG;AAAhD,wCAAgD;AAEhD,MAAa,eAAgB,SAAQ,cAAc;CAAG;AAAtD,0CAAsD"}
@@ -1,8 +0,0 @@
1
- import { Exception } from "./base";
2
- export declare class RelayCommunicationError extends Exception {
3
- constructor(endpoint: string, message: string);
4
- }
5
- export declare class HostNoResponseError extends Exception {
6
- constructor(host: string);
7
- }
8
- //# sourceMappingURL=forger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forger.d.ts","sourceRoot":"","sources":["../../source/exceptions/forger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,uBAAwB,SAAQ,SAAS;gBAClC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAGpD;AAED,qBAAa,mBAAoB,SAAQ,SAAS;gBAC9B,IAAI,EAAE,MAAM;CAG/B"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HostNoResponseError = exports.RelayCommunicationError = void 0;
4
- const base_1 = require("./base");
5
- class RelayCommunicationError extends base_1.Exception {
6
- constructor(endpoint, message) {
7
- super(`Request to ${endpoint} failed, because of '${message}'.`);
8
- }
9
- }
10
- exports.RelayCommunicationError = RelayCommunicationError;
11
- class HostNoResponseError extends base_1.Exception {
12
- constructor(host) {
13
- super(`${host} didn't respond. Trying again later.`);
14
- }
15
- }
16
- exports.HostNoResponseError = HostNoResponseError;
17
- //# sourceMappingURL=forger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forger.js","sourceRoot":"","sources":["../../source/exceptions/forger.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAEnC,MAAa,uBAAwB,SAAQ,gBAAS;IACrD,YAAmB,QAAgB,EAAE,OAAe;QACnD,KAAK,CAAC,cAAc,QAAQ,wBAAwB,OAAO,IAAI,CAAC,CAAC;IAClE,CAAC;CACD;AAJD,0DAIC;AAED,MAAa,mBAAoB,SAAQ,gBAAS;IACjD,YAAmB,IAAY;QAC9B,KAAK,CAAC,GAAG,IAAI,sCAAsC,CAAC,CAAC;IACtD,CAAC;CACD;AAJD,kDAIC"}