@xelis/sdk 0.11.1 → 0.11.3
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.
|
@@ -92,7 +92,8 @@ var WSRPC = /** @class */ (function () {
|
|
|
92
92
|
if (eventData && typeof msgEvent.data === "string") {
|
|
93
93
|
try {
|
|
94
94
|
var data_1 = (0, parse_json_1.parseJSON)(msgEvent.data);
|
|
95
|
-
|
|
95
|
+
// event result will contain an event parameter with the event name defined
|
|
96
|
+
if (data_1.result["event"] === event && data_1.id === idRefObject_1.id) {
|
|
96
97
|
eventData.listeners.forEach(function (listener) {
|
|
97
98
|
if (data_1.error) {
|
|
98
99
|
listener(undefined, new Error(data_1.error.message));
|
|
@@ -86,7 +86,8 @@ var WSRPC = /** @class */ (function () {
|
|
|
86
86
|
if (eventData && typeof msgEvent.data === "string") {
|
|
87
87
|
try {
|
|
88
88
|
var data_1 = parseJSON(msgEvent.data);
|
|
89
|
-
|
|
89
|
+
// event result will contain an event parameter with the event name defined
|
|
90
|
+
if (data_1.result["event"] === event && data_1.id === idRefObject_1.id) {
|
|
90
91
|
eventData.listeners.forEach(function (listener) {
|
|
91
92
|
if (data_1.error) {
|
|
92
93
|
listener(undefined, new Error(data_1.error.message));
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { RPCEvent
|
|
1
|
+
import { RPCEvent } from './types';
|
|
2
2
|
import * as types from './types';
|
|
3
3
|
import { WSRPC } from '../rpc/websocket';
|
|
4
4
|
export interface DaemonEventsData {
|
|
5
|
-
[RPCEvent.NewBlock]: types.Block
|
|
6
|
-
[RPCEvent.BlockOrdered]: types.BlockOrdered
|
|
7
|
-
[RPCEvent.BlockOrphaned]: types.BlockOrphaned
|
|
8
|
-
[RPCEvent.StableHeightChanged]: types.StableHeightChanged
|
|
9
|
-
[RPCEvent.StableTopoHeightChanged]: types.StableTopoHeightChanged
|
|
10
|
-
[RPCEvent.TransactionOrphaned]: types.TransactionResponse
|
|
11
|
-
[RPCEvent.TransactionAddedInMempool]: types.MempoolTransactionSummary
|
|
12
|
-
[RPCEvent.TransactionExecuted]: types.TransactionExecuted
|
|
13
|
-
[RPCEvent.InvokeContract]: types.InvokeContract
|
|
14
|
-
[RPCEvent.ContractTransfer]: types.ContractTransfer
|
|
15
|
-
[RPCEvent.ContractEvent]: types.ContractEvent
|
|
16
|
-
[RPCEvent.DeployContract]: types.NewContract
|
|
17
|
-
[RPCEvent.NewAsset]: types.AssetWithData
|
|
18
|
-
[RPCEvent.PeerConnected]: types.Peer
|
|
19
|
-
[RPCEvent.PeerDisconnected]: number
|
|
20
|
-
[RPCEvent.PeerStateUpdated]: types.Peer
|
|
21
|
-
[RPCEvent.PeerPeerListUpdated]: types.PeerPeerListUpdated
|
|
22
|
-
[RPCEvent.PeerPeerDisconnected]: types.PeerPeerDisconnected
|
|
23
|
-
[RPCEvent.NewBlockTemplate]: types.GetBlockTemplateResult
|
|
5
|
+
[RPCEvent.NewBlock]: types.Block;
|
|
6
|
+
[RPCEvent.BlockOrdered]: types.BlockOrdered;
|
|
7
|
+
[RPCEvent.BlockOrphaned]: types.BlockOrphaned;
|
|
8
|
+
[RPCEvent.StableHeightChanged]: types.StableHeightChanged;
|
|
9
|
+
[RPCEvent.StableTopoHeightChanged]: types.StableTopoHeightChanged;
|
|
10
|
+
[RPCEvent.TransactionOrphaned]: types.TransactionResponse;
|
|
11
|
+
[RPCEvent.TransactionAddedInMempool]: types.MempoolTransactionSummary;
|
|
12
|
+
[RPCEvent.TransactionExecuted]: types.TransactionExecuted;
|
|
13
|
+
[RPCEvent.InvokeContract]: types.InvokeContract;
|
|
14
|
+
[RPCEvent.ContractTransfer]: types.ContractTransfer;
|
|
15
|
+
[RPCEvent.ContractEvent]: types.ContractEvent;
|
|
16
|
+
[RPCEvent.DeployContract]: types.NewContract;
|
|
17
|
+
[RPCEvent.NewAsset]: types.AssetWithData;
|
|
18
|
+
[RPCEvent.PeerConnected]: types.Peer;
|
|
19
|
+
[RPCEvent.PeerDisconnected]: number;
|
|
20
|
+
[RPCEvent.PeerStateUpdated]: types.Peer;
|
|
21
|
+
[RPCEvent.PeerPeerListUpdated]: types.PeerPeerListUpdated;
|
|
22
|
+
[RPCEvent.PeerPeerDisconnected]: types.PeerPeerDisconnected;
|
|
23
|
+
[RPCEvent.NewBlockTemplate]: types.GetBlockTemplateResult;
|
|
24
24
|
}
|
|
25
25
|
export declare class DaemonMethods {
|
|
26
26
|
ws: WSRPC;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { WSRPC } from '../rpc/websocket';
|
|
2
|
-
import { RPCEventResult } from '../daemon/types';
|
|
3
2
|
import * as daemonTypes from '../daemon/types';
|
|
4
3
|
import { RPCEvent } from './types';
|
|
5
4
|
import * as types from './types';
|
|
6
5
|
import { Element } from '../data/element';
|
|
7
6
|
export interface WalletEventsData {
|
|
8
|
-
[RPCEvent.NewTopoheight]: types.NewTopoheightResult
|
|
9
|
-
[RPCEvent.NewAsset]: daemonTypes.AssetWithData
|
|
10
|
-
[RPCEvent.NewTransaction]: types.TransactionEntry
|
|
11
|
-
[RPCEvent.BalanceChanged]: types.BalanceChangedResult
|
|
12
|
-
[RPCEvent.Rescan]: types.RescanResult
|
|
13
|
-
[RPCEvent.HistorySynced]: types.HistorySyncedResult
|
|
14
|
-
[RPCEvent.Online]:
|
|
15
|
-
[RPCEvent.Offline]:
|
|
7
|
+
[RPCEvent.NewTopoheight]: types.NewTopoheightResult;
|
|
8
|
+
[RPCEvent.NewAsset]: daemonTypes.AssetWithData;
|
|
9
|
+
[RPCEvent.NewTransaction]: types.TransactionEntry;
|
|
10
|
+
[RPCEvent.BalanceChanged]: types.BalanceChangedResult;
|
|
11
|
+
[RPCEvent.Rescan]: types.RescanResult;
|
|
12
|
+
[RPCEvent.HistorySynced]: types.HistorySyncedResult;
|
|
13
|
+
[RPCEvent.Online]: void;
|
|
14
|
+
[RPCEvent.Offline]: void;
|
|
16
15
|
}
|
|
17
16
|
export declare class WalletMethods {
|
|
18
17
|
ws: WSRPC;
|
package/package.json
CHANGED