@xelis/sdk 0.5.5 → 0.5.6
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/daemon/rpc.d.ts +2 -2
- package/daemon/types.d.ts +3 -6
- package/daemon/websocket.d.ts +2 -2
- package/package.json +1 -1
package/daemon/rpc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Balance, Block, TopoHeightRangeParams, GetInfoResult, HeightRangeParams, GetLastBalanceResult, P2PStatusResult, Transaction, GetLastBalanceParams, GetBalanceAtTopoHeightParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceResult, GetNonceParams, GetAccountHistoryParams,
|
|
1
|
+
import { Balance, Block, TopoHeightRangeParams, GetInfoResult, HeightRangeParams, GetLastBalanceResult, P2PStatusResult, Transaction, GetLastBalanceParams, GetBalanceAtTopoHeightParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceResult, GetNonceParams, GetAccountHistoryParams, AccounHistory } from './types';
|
|
2
2
|
import { RPC as BaseRPC } from '../lib/rpc';
|
|
3
3
|
declare class RPC extends BaseRPC {
|
|
4
4
|
getVersion(): Promise<import("../lib/types").RPCResponse<string>>;
|
|
@@ -29,7 +29,7 @@ declare class RPC extends BaseRPC {
|
|
|
29
29
|
getAccounts(params: GetAccountsParams): Promise<import("../lib/types").RPCResponse<string[]>>;
|
|
30
30
|
submitBlock(blockTemplate: string): Promise<import("../lib/types").RPCResponse<boolean>>;
|
|
31
31
|
submitTransaction(hexData: string): Promise<import("../lib/types").RPCResponse<boolean>>;
|
|
32
|
-
getAccountHistory(params: GetAccountHistoryParams): Promise<import("../lib/types").RPCResponse<
|
|
32
|
+
getAccountHistory(params: GetAccountHistoryParams): Promise<import("../lib/types").RPCResponse<AccounHistory[]>>;
|
|
33
33
|
getAccountAssets(address: string): Promise<import("../lib/types").RPCResponse<string[]>>;
|
|
34
34
|
}
|
|
35
35
|
export default RPC;
|
package/daemon/types.d.ts
CHANGED
|
@@ -19,18 +19,15 @@ export interface Block {
|
|
|
19
19
|
extra_nonce: string;
|
|
20
20
|
hash: string;
|
|
21
21
|
height: number;
|
|
22
|
-
miner_tx: {
|
|
23
|
-
owner: string;
|
|
24
|
-
signature: null;
|
|
25
|
-
variant: string;
|
|
26
|
-
};
|
|
27
22
|
miner: string;
|
|
28
23
|
nonce: number;
|
|
29
24
|
tips: string[];
|
|
30
25
|
topoheight: number;
|
|
31
26
|
total_fees: number;
|
|
32
27
|
total_size_in_bytes: number;
|
|
28
|
+
transactions?: Transaction[];
|
|
33
29
|
txs_hashes: string[];
|
|
30
|
+
version: number;
|
|
34
31
|
}
|
|
35
32
|
export interface GetLastBalanceParams {
|
|
36
33
|
address: string;
|
|
@@ -135,7 +132,7 @@ export interface GetAccountHistoryParams {
|
|
|
135
132
|
minimum_topoheight?: number;
|
|
136
133
|
maximum_topoheight?: number;
|
|
137
134
|
}
|
|
138
|
-
export interface
|
|
135
|
+
export interface AccounHistory {
|
|
139
136
|
topoheight: number;
|
|
140
137
|
block_timestamp: number;
|
|
141
138
|
hash: string;
|
package/daemon/websocket.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageEvent } from 'ws';
|
|
2
|
-
import { Block, GetInfoResult, RPCEventResult, Transaction, TopoHeightRangeParams, P2PStatusResult, Balance, GetBalanceAtTopoHeightParams, GetLastBalanceResult, HeightRangeParams, BlockOrdered, GetLastBalanceParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceParams, GetNonceResult, GetAccountHistoryParams,
|
|
2
|
+
import { Block, GetInfoResult, RPCEventResult, Transaction, TopoHeightRangeParams, P2PStatusResult, Balance, GetBalanceAtTopoHeightParams, GetLastBalanceResult, HeightRangeParams, BlockOrdered, GetLastBalanceParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceParams, GetNonceResult, GetAccountHistoryParams, AccounHistory } from './types';
|
|
3
3
|
import { WS as BaseWS } from '../lib/websocket';
|
|
4
4
|
declare class WS extends BaseWS {
|
|
5
5
|
onNewBlock(onData: (msgEvent: MessageEvent, data?: Block & RPCEventResult, err?: Error) => void): Promise<() => Promise<void>>;
|
|
@@ -33,7 +33,7 @@ declare class WS extends BaseWS {
|
|
|
33
33
|
submitBlock(blockTemplate: string): Promise<boolean>;
|
|
34
34
|
submitTransaction(hexData: string): Promise<boolean>;
|
|
35
35
|
countAccounts(): Promise<number>;
|
|
36
|
-
getAccountHistory(params: GetAccountHistoryParams): Promise<
|
|
36
|
+
getAccountHistory(params: GetAccountHistoryParams): Promise<AccounHistory[]>;
|
|
37
37
|
getAccountAssets(address: string): Promise<string[]>;
|
|
38
38
|
}
|
|
39
39
|
export default WS;
|
package/package.json
CHANGED