@portal-hq/utils 0.2.32 → 0.3.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.
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class InvalidRpcConfigError extends Error {
4
+ constructor() {
5
+ super('[Portal] A valid RPC configuration was not provided.');
6
+ // Set the prototype explicitly.
7
+ Object.setPrototypeOf(this, InvalidRpcConfigError.prototype);
8
+ }
9
+ }
10
+ exports.default = InvalidRpcConfigError;
@@ -0,0 +1,26 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var InvalidRpcConfigError = /** @class */ (function (_super) {
17
+ __extends(InvalidRpcConfigError, _super);
18
+ function InvalidRpcConfigError() {
19
+ var _this = _super.call(this, '[Portal] A valid RPC configuration was not provided.') || this;
20
+ // Set the prototype explicitly.
21
+ Object.setPrototypeOf(_this, InvalidRpcConfigError.prototype);
22
+ return _this;
23
+ }
24
+ return InvalidRpcConfigError;
25
+ }(Error));
26
+ export default InvalidRpcConfigError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/utils",
3
- "version": "0.2.32",
3
+ "version": "0.3.0",
4
4
  "main": "lib/commonjs/index",
5
5
  "module": "lib/esm/index",
6
6
  "source": "src/index",
package/types.d.ts CHANGED
@@ -45,6 +45,24 @@ export interface DkgData {
45
45
  bks: Bk[]
46
46
  }
47
47
 
48
+ export interface DkgDataV1 {
49
+ share: string
50
+ ssid: string
51
+ pubkey: Pubkey
52
+ partialPubKey: Pubkey[]
53
+ allY: Pubkey[]
54
+ p: string
55
+ q: string
56
+ pederson: PedersonParams[]
57
+ bks: Bk[]
58
+ }
59
+
60
+ export interface PedersonParams {
61
+ n: string
62
+ s: string
63
+ t: string
64
+ }
65
+
48
66
  export interface HttpErrorOptions {
49
67
  message: string
50
68
  status: number
@@ -92,7 +110,7 @@ export interface Pubkey {
92
110
  Y: string
93
111
  }
94
112
 
95
- export interface RequesterOptions {}
113
+ export interface RequesterOptions { }
96
114
 
97
115
  export interface RpcErrorDefinition {
98
116
  description: string