@railgun-community/shared-models 7.0.0 → 7.0.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="../types/global" />
|
|
2
2
|
import { TXIDVersion } from './engine';
|
|
3
3
|
import { ChainType, CommitmentCiphertextV2, CommitmentCiphertextV3, PreTransactionPOIsPerTxidLeafPerList } from './response-types';
|
|
4
|
-
export type
|
|
4
|
+
export type BroadcasterFeeMessageData = {
|
|
5
5
|
fees: MapType<string>;
|
|
6
6
|
feeExpiration: number;
|
|
7
7
|
feesID: string;
|
|
@@ -12,43 +12,43 @@ export type RelayerFeeMessageData = {
|
|
|
12
12
|
relayAdapt: string;
|
|
13
13
|
requiredPOIListKeys: string[];
|
|
14
14
|
};
|
|
15
|
-
export type
|
|
15
|
+
export type BroadcasterFeeMessage = {
|
|
16
16
|
data: string;
|
|
17
17
|
signature: string;
|
|
18
18
|
};
|
|
19
19
|
type EncryptedData = [string, string];
|
|
20
|
-
export type
|
|
20
|
+
export type BroadcasterEncryptedMethodParams = {
|
|
21
21
|
pubkey: string;
|
|
22
22
|
encryptedData: EncryptedData;
|
|
23
23
|
};
|
|
24
|
-
type
|
|
24
|
+
type BroadcasterRawParamsShared = {
|
|
25
25
|
txidVersion: TXIDVersion;
|
|
26
26
|
chainID: number;
|
|
27
27
|
chainType: ChainType;
|
|
28
28
|
feesID: string;
|
|
29
|
-
|
|
29
|
+
broadcasterViewingKey: string;
|
|
30
30
|
devLog: boolean;
|
|
31
31
|
minVersion: string;
|
|
32
32
|
maxVersion: string;
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
34
|
+
export type BroadcasterRawParamsTransact = BroadcasterRawParamsShared & {
|
|
35
35
|
to: string;
|
|
36
36
|
data: string;
|
|
37
37
|
minGasPrice: string;
|
|
38
38
|
useRelayAdapt: boolean;
|
|
39
39
|
preTransactionPOIsPerTxidLeafPerList: PreTransactionPOIsPerTxidLeafPerList;
|
|
40
40
|
};
|
|
41
|
-
export type
|
|
41
|
+
export type BroadcasterRawParamsPreAuthorize = BroadcasterRawParamsShared & {
|
|
42
42
|
gasLimit: string;
|
|
43
43
|
commitmentCiphertext: CommitmentCiphertextV2 | CommitmentCiphertextV3;
|
|
44
44
|
commitmentHash: string;
|
|
45
45
|
};
|
|
46
|
-
export type
|
|
46
|
+
export type BroadcasterPreAuthorization = {
|
|
47
47
|
gasLimit: string;
|
|
48
48
|
commitmentHash: string;
|
|
49
49
|
expiration: number;
|
|
50
50
|
};
|
|
51
|
-
export type
|
|
51
|
+
export type BroadcasterSignedPreAuthorization = BroadcasterPreAuthorization & {
|
|
52
52
|
signature: string;
|
|
53
53
|
};
|
|
54
54
|
export type CachedTokenFee = {
|
|
@@ -58,12 +58,12 @@ export type CachedTokenFee = {
|
|
|
58
58
|
availableWallets: number;
|
|
59
59
|
relayAdapt: string;
|
|
60
60
|
};
|
|
61
|
-
export type
|
|
61
|
+
export type SelectedBroadcaster = {
|
|
62
62
|
railgunAddress: string;
|
|
63
63
|
tokenAddress: string;
|
|
64
64
|
tokenFee: CachedTokenFee;
|
|
65
65
|
};
|
|
66
|
-
export declare enum
|
|
66
|
+
export declare enum BroadcasterConnectionStatus {
|
|
67
67
|
Error = "Error",
|
|
68
68
|
Searching = "Searching",
|
|
69
69
|
Connected = "Connected",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})(
|
|
3
|
+
exports.BroadcasterConnectionStatus = void 0;
|
|
4
|
+
var BroadcasterConnectionStatus;
|
|
5
|
+
(function (BroadcasterConnectionStatus) {
|
|
6
|
+
BroadcasterConnectionStatus["Error"] = "Error";
|
|
7
|
+
BroadcasterConnectionStatus["Searching"] = "Searching";
|
|
8
|
+
BroadcasterConnectionStatus["Connected"] = "Connected";
|
|
9
|
+
BroadcasterConnectionStatus["Disconnected"] = "Disconnected";
|
|
10
|
+
BroadcasterConnectionStatus["AllUnavailable"] = "AllUnavailable";
|
|
11
|
+
})(BroadcasterConnectionStatus || (exports.BroadcasterConnectionStatus = BroadcasterConnectionStatus = {}));
|
|
12
12
|
//# sourceMappingURL=broadcaster.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcaster.js","sourceRoot":"","sources":["../../src/models/broadcaster.ts"],"names":[],"mappings":";;;AAiFA,IAAY,
|
|
1
|
+
{"version":3,"file":"broadcaster.js","sourceRoot":"","sources":["../../src/models/broadcaster.ts"],"names":[],"mappings":";;;AAiFA,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,8CAAe,CAAA;IACf,sDAAuB,CAAA;IACvB,sDAAuB,CAAA;IACvB,4DAA6B,CAAA;IAC7B,gEAAiC,CAAA;AACnC,CAAC,EANW,2BAA2B,2CAA3B,2BAA2B,QAMtC","sourcesContent":["import { TXIDVersion } from './engine';\nimport {\n ChainType,\n CommitmentCiphertextV2,\n CommitmentCiphertextV3,\n PreTransactionPOIsPerTxidLeafPerList,\n} from './response-types';\n\nexport type BroadcasterFeeMessageData = {\n fees: MapType<string>;\n feeExpiration: number;\n feesID: string;\n railgunAddress: string;\n identifier: Optional<string>;\n availableWallets: number;\n version: string;\n relayAdapt: string;\n requiredPOIListKeys: string[];\n};\n\nexport type BroadcasterFeeMessage = {\n data: string; // hex-encoded FeeMessageData\n signature: string; // hex-encoded signature\n};\n\ntype EncryptedData = [string, string];\n\nexport type BroadcasterEncryptedMethodParams = {\n pubkey: string;\n encryptedData: EncryptedData;\n};\n\ntype BroadcasterRawParamsShared = {\n txidVersion: TXIDVersion;\n chainID: number;\n chainType: ChainType;\n feesID: string;\n broadcasterViewingKey: string;\n devLog: boolean;\n minVersion: string;\n maxVersion: string;\n};\n\nexport type BroadcasterRawParamsTransact = BroadcasterRawParamsShared & {\n to: string;\n data: string;\n minGasPrice: string;\n useRelayAdapt: boolean;\n preTransactionPOIsPerTxidLeafPerList: PreTransactionPOIsPerTxidLeafPerList;\n};\n\nexport type BroadcasterRawParamsPreAuthorize = BroadcasterRawParamsShared & {\n gasLimit: string;\n commitmentCiphertext: CommitmentCiphertextV2 | CommitmentCiphertextV3;\n commitmentHash: string;\n};\n\nexport type BroadcasterPreAuthorization = {\n gasLimit: string;\n commitmentHash: string;\n expiration: number;\n};\n\nexport type BroadcasterSignedPreAuthorization = BroadcasterPreAuthorization & {\n signature: string;\n};\n\nexport type CachedTokenFee = {\n feePerUnitGas: string;\n expiration: number;\n feesID: string;\n availableWallets: number;\n relayAdapt: string;\n};\n\nexport type SelectedBroadcaster = {\n railgunAddress: string;\n tokenAddress: string;\n tokenFee: CachedTokenFee;\n};\n\nexport enum BroadcasterConnectionStatus {\n Error = 'Error',\n Searching = 'Searching',\n Connected = 'Connected',\n Disconnected = 'Disconnected',\n AllUnavailable = 'AllUnavailable',\n}\n"]}
|