@xelis/sdk 0.11.18 → 0.11.20
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/dist/cjs/daemon/rpc.js +3 -0
- package/dist/cjs/daemon/types.js +1 -0
- package/dist/cjs/daemon/websocket.js +3 -0
- package/dist/esm/daemon/rpc.js +3 -0
- package/dist/esm/daemon/types.js +1 -0
- package/dist/esm/daemon/websocket.js +3 -0
- package/dist/types/daemon/rpc.d.ts +2 -1
- package/dist/types/daemon/types.d.ts +13 -1
- package/dist/types/daemon/websocket.d.ts +3 -2
- package/package.json +1 -1
package/dist/cjs/daemon/rpc.js
CHANGED
|
@@ -76,6 +76,9 @@ class RPC extends http_1.HttpRPC {
|
|
|
76
76
|
getAsset(params) {
|
|
77
77
|
return this.request(types_1.RPCMethod.GetAsset, params);
|
|
78
78
|
}
|
|
79
|
+
getAssetSupply(params) {
|
|
80
|
+
return this.request(types_1.RPCMethod.GetAssetSupply, params);
|
|
81
|
+
}
|
|
79
82
|
getAssets(params) {
|
|
80
83
|
return this.request(types_1.RPCMethod.GetAssets, params);
|
|
81
84
|
}
|
package/dist/cjs/daemon/types.js
CHANGED
|
@@ -40,6 +40,7 @@ var RPCMethod;
|
|
|
40
40
|
RPCMethod["HasNonce"] = "has_nonce";
|
|
41
41
|
RPCMethod["GetNonceAtTopoheight"] = "get_nonce_at_topoheight";
|
|
42
42
|
RPCMethod["GetAsset"] = "get_asset";
|
|
43
|
+
RPCMethod["GetAssetSupply"] = "get_asset_supply";
|
|
43
44
|
RPCMethod["GetAssets"] = "get_assets";
|
|
44
45
|
RPCMethod["CountAssets"] = "count_assets";
|
|
45
46
|
RPCMethod["CountAccounts"] = "count_accounts";
|
|
@@ -89,6 +89,9 @@ class DaemonMethods {
|
|
|
89
89
|
getAsset(params) {
|
|
90
90
|
return this.dataCall(types_1.RPCMethod.GetAsset, params);
|
|
91
91
|
}
|
|
92
|
+
getAssetSupply(params) {
|
|
93
|
+
return this.dataCall(types_1.RPCMethod.GetAssetSupply, params);
|
|
94
|
+
}
|
|
92
95
|
getAssets(params) {
|
|
93
96
|
return this.dataCall(types_1.RPCMethod.GetAssets, params);
|
|
94
97
|
}
|
package/dist/esm/daemon/rpc.js
CHANGED
|
@@ -73,6 +73,9 @@ export class RPC extends HttpRPC {
|
|
|
73
73
|
getAsset(params) {
|
|
74
74
|
return this.request(RPCMethod.GetAsset, params);
|
|
75
75
|
}
|
|
76
|
+
getAssetSupply(params) {
|
|
77
|
+
return this.request(RPCMethod.GetAssetSupply, params);
|
|
78
|
+
}
|
|
76
79
|
getAssets(params) {
|
|
77
80
|
return this.request(RPCMethod.GetAssets, params);
|
|
78
81
|
}
|
package/dist/esm/daemon/types.js
CHANGED
|
@@ -37,6 +37,7 @@ export var RPCMethod;
|
|
|
37
37
|
RPCMethod["HasNonce"] = "has_nonce";
|
|
38
38
|
RPCMethod["GetNonceAtTopoheight"] = "get_nonce_at_topoheight";
|
|
39
39
|
RPCMethod["GetAsset"] = "get_asset";
|
|
40
|
+
RPCMethod["GetAssetSupply"] = "get_asset_supply";
|
|
40
41
|
RPCMethod["GetAssets"] = "get_assets";
|
|
41
42
|
RPCMethod["CountAssets"] = "count_assets";
|
|
42
43
|
RPCMethod["CountAccounts"] = "count_accounts";
|
|
@@ -86,6 +86,9 @@ export class DaemonMethods {
|
|
|
86
86
|
getAsset(params) {
|
|
87
87
|
return this.dataCall(RPCMethod.GetAsset, params);
|
|
88
88
|
}
|
|
89
|
+
getAssetSupply(params) {
|
|
90
|
+
return this.dataCall(RPCMethod.GetAssetSupply, params);
|
|
91
|
+
}
|
|
89
92
|
getAssets(params) {
|
|
90
93
|
return this.dataCall(RPCMethod.GetAssets, params);
|
|
91
94
|
}
|
|
@@ -25,6 +25,7 @@ export declare class RPC extends HttpRPC {
|
|
|
25
25
|
hasNonce(params: types.HasNonceParams): Promise<types.HasNonceResult>;
|
|
26
26
|
getNonceAtTopoheight(params: types.GetNonceAtTopoheightParams): Promise<types.VersionedNonce>;
|
|
27
27
|
getAsset(params: types.GetAssetParams): Promise<types.AssetData>;
|
|
28
|
+
getAssetSupply(params: types.GetAssetParams): Promise<types.GetAssetSupplyResult>;
|
|
28
29
|
getAssets(params: types.GetAssetsParams): Promise<string[]>;
|
|
29
30
|
countAssets(): Promise<number>;
|
|
30
31
|
countTransactions(): Promise<number>;
|
|
@@ -67,7 +68,7 @@ export declare class RPC extends HttpRPC {
|
|
|
67
68
|
getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<unknown>;
|
|
68
69
|
getContractBalance(params: types.GetContractBalanceParams): Promise<types.GetContractBalanceResult>;
|
|
69
70
|
getContractBalanceAtTopoheight(params: types.GetContractBalanceAtTopoheightParams): Promise<types.GetContractBalanceAtTopoheightResult>;
|
|
70
|
-
getContractAssets(params: types.
|
|
71
|
+
getContractAssets(params: types.GetContractBalancesParams): Promise<string[]>;
|
|
71
72
|
getP2PBlockPropagation(params: types.GetP2pBlockPropagationParams): Promise<types.P2pBlockPropagationResult>;
|
|
72
73
|
getBlockTemplate(address: string): Promise<types.GetBlockTemplateResult>;
|
|
73
74
|
getMinerWork(params: types.GetMinerWorkParams): Promise<types.GetMinerWorkResult>;
|
|
@@ -132,6 +132,8 @@ export interface Peer {
|
|
|
132
132
|
};
|
|
133
133
|
cumulative_difficulty: string;
|
|
134
134
|
connected_on: number;
|
|
135
|
+
bytes_sent: number;
|
|
136
|
+
bytes_recv: number;
|
|
135
137
|
}
|
|
136
138
|
export interface BlockOrdered {
|
|
137
139
|
topoheight: number;
|
|
@@ -480,6 +482,11 @@ export interface GetContractBalanceAtTopoheightParams {
|
|
|
480
482
|
asset: string;
|
|
481
483
|
topoheight: number;
|
|
482
484
|
}
|
|
485
|
+
export interface GetContractBalancesParams {
|
|
486
|
+
contract: string;
|
|
487
|
+
skip?: number;
|
|
488
|
+
maximum?: number;
|
|
489
|
+
}
|
|
483
490
|
export interface Chunk {
|
|
484
491
|
instructions: number[];
|
|
485
492
|
}
|
|
@@ -506,10 +513,14 @@ export interface GetContractBalanceAtTopoheightResult {
|
|
|
506
513
|
previous_topoheight: number | null;
|
|
507
514
|
}
|
|
508
515
|
export interface GetContractBalanceResult {
|
|
516
|
+
data: number;
|
|
509
517
|
topoheight: number;
|
|
510
|
-
amount: number;
|
|
511
518
|
previous_topoheight: number | null;
|
|
512
519
|
}
|
|
520
|
+
export interface GetAssetSupplyResult {
|
|
521
|
+
topoheight: number;
|
|
522
|
+
data: number;
|
|
523
|
+
}
|
|
513
524
|
export interface TransactionResponse extends Transaction {
|
|
514
525
|
in_mempool: boolean;
|
|
515
526
|
blocks?: string[];
|
|
@@ -688,6 +699,7 @@ export declare enum RPCMethod {
|
|
|
688
699
|
HasNonce = "has_nonce",
|
|
689
700
|
GetNonceAtTopoheight = "get_nonce_at_topoheight",
|
|
690
701
|
GetAsset = "get_asset",
|
|
702
|
+
GetAssetSupply = "get_asset_supply",
|
|
691
703
|
GetAssets = "get_assets",
|
|
692
704
|
CountAssets = "count_assets",
|
|
693
705
|
CountAccounts = "count_accounts",
|
|
@@ -16,7 +16,7 @@ export interface DaemonEventsData {
|
|
|
16
16
|
[RPCEvent.DeployContract]: types.NewContract;
|
|
17
17
|
[RPCEvent.NewAsset]: types.AssetWithData;
|
|
18
18
|
[RPCEvent.PeerConnected]: types.Peer;
|
|
19
|
-
[RPCEvent.PeerDisconnected]:
|
|
19
|
+
[RPCEvent.PeerDisconnected]: types.Peer;
|
|
20
20
|
[RPCEvent.PeerStateUpdated]: types.Peer;
|
|
21
21
|
[RPCEvent.PeerPeerListUpdated]: types.PeerPeerListUpdated;
|
|
22
22
|
[RPCEvent.PeerPeerDisconnected]: types.PeerPeerDisconnected;
|
|
@@ -53,6 +53,7 @@ export declare class DaemonMethods {
|
|
|
53
53
|
hasNonce(params: types.HasNonceParams): Promise<types.HasNonceResult>;
|
|
54
54
|
getNonceAtTopoheight(params: types.GetNonceAtTopoheightParams): Promise<types.VersionedNonce>;
|
|
55
55
|
getAsset(params: types.GetAssetParams): Promise<types.AssetData>;
|
|
56
|
+
getAssetSupply(params: types.GetAssetParams): Promise<types.GetAssetSupplyResult>;
|
|
56
57
|
getAssets(params?: types.GetAssetsParams): Promise<string[]>;
|
|
57
58
|
countAssets(): Promise<number>;
|
|
58
59
|
countTransactions(): Promise<number>;
|
|
@@ -95,7 +96,7 @@ export declare class DaemonMethods {
|
|
|
95
96
|
getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<unknown>;
|
|
96
97
|
getContractBalance(params: types.GetContractBalanceParams): Promise<types.GetContractBalanceResult>;
|
|
97
98
|
getContractBalanceAtTopoheight(params: types.GetContractBalanceAtTopoheightParams): Promise<types.GetContractBalanceAtTopoheightResult>;
|
|
98
|
-
getContractAssets(params: types.
|
|
99
|
+
getContractAssets(params: types.GetContractBalancesParams): Promise<string[]>;
|
|
99
100
|
getP2PBlockPropagation(params: types.GetP2pBlockPropagationParams): Promise<types.P2pBlockPropagationResult>;
|
|
100
101
|
getBlockTemplate(address: string): Promise<string>;
|
|
101
102
|
getMinerWork(params: types.GetMinerWorkParams): Promise<types.GetMinerWorkResult>;
|
package/package.json
CHANGED