@portal-hq/utils 0.3.1 → 0.3.2
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
package/src/index.ts
CHANGED
|
@@ -22,9 +22,10 @@ export { HttpRequester } from './requesters'
|
|
|
22
22
|
|
|
23
23
|
export {
|
|
24
24
|
type ClientWithCustodianData,
|
|
25
|
-
type
|
|
25
|
+
type Address,
|
|
26
26
|
type Dapp,
|
|
27
27
|
type DappImage,
|
|
28
|
+
type DappOnNetwork,
|
|
28
29
|
type DkgData,
|
|
29
30
|
type HttpOptions,
|
|
30
31
|
type HttpRequesterOptions,
|
package/types.d.ts
CHANGED
|
@@ -19,17 +19,27 @@ export interface ClientWithCustodianData {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export interface
|
|
22
|
+
export interface Address {
|
|
23
23
|
id: string
|
|
24
|
-
contractAddress: string
|
|
25
|
-
clientUrl: string
|
|
26
24
|
network: Network
|
|
25
|
+
value: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface DappOnNetwork {
|
|
29
|
+
clientUrl?: string
|
|
30
|
+
dapp: Dapp
|
|
31
|
+
dappId: string
|
|
32
|
+
id: string
|
|
33
|
+
network: Network
|
|
34
|
+
networkId: string
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
export interface Dapp {
|
|
30
38
|
id: string
|
|
31
|
-
contracts: Contract[]
|
|
32
39
|
name: string
|
|
40
|
+
|
|
41
|
+
addresses: Address[]
|
|
42
|
+
dappOnNetworks: DappOnNetwork[]
|
|
33
43
|
image: DappImage
|
|
34
44
|
}
|
|
35
45
|
|
|
@@ -110,7 +120,7 @@ export interface Pubkey {
|
|
|
110
120
|
Y: string
|
|
111
121
|
}
|
|
112
122
|
|
|
113
|
-
export interface RequesterOptions {
|
|
123
|
+
export interface RequesterOptions {}
|
|
114
124
|
|
|
115
125
|
export interface RpcErrorDefinition {
|
|
116
126
|
description: string
|