@xelis/sdk 0.11.19 → 0.11.21
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 +23 -1
- package/dist/types/daemon/websocket.d.ts +2 -1
- 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>;
|
|
@@ -28,6 +28,7 @@ export interface Block {
|
|
|
28
28
|
miner_reward?: number;
|
|
29
29
|
cumulative_difficulty: string;
|
|
30
30
|
total_fees?: number;
|
|
31
|
+
total_fees_burned?: number;
|
|
31
32
|
total_size_in_bytes: number;
|
|
32
33
|
version: number;
|
|
33
34
|
tips: string[];
|
|
@@ -482,6 +483,11 @@ export interface GetContractBalanceAtTopoheightParams {
|
|
|
482
483
|
asset: string;
|
|
483
484
|
topoheight: number;
|
|
484
485
|
}
|
|
486
|
+
export interface GetContractBalancesParams {
|
|
487
|
+
contract: string;
|
|
488
|
+
skip?: number;
|
|
489
|
+
maximum?: number;
|
|
490
|
+
}
|
|
485
491
|
export interface Chunk {
|
|
486
492
|
instructions: number[];
|
|
487
493
|
}
|
|
@@ -508,10 +514,14 @@ export interface GetContractBalanceAtTopoheightResult {
|
|
|
508
514
|
previous_topoheight: number | null;
|
|
509
515
|
}
|
|
510
516
|
export interface GetContractBalanceResult {
|
|
517
|
+
data: number;
|
|
511
518
|
topoheight: number;
|
|
512
|
-
amount: number;
|
|
513
519
|
previous_topoheight: number | null;
|
|
514
520
|
}
|
|
521
|
+
export interface GetAssetSupplyResult {
|
|
522
|
+
topoheight: number;
|
|
523
|
+
data: number;
|
|
524
|
+
}
|
|
515
525
|
export interface TransactionResponse extends Transaction {
|
|
516
526
|
in_mempool: boolean;
|
|
517
527
|
blocks?: string[];
|
|
@@ -573,8 +583,19 @@ export interface ContractTransfer {
|
|
|
573
583
|
block_hash: string;
|
|
574
584
|
topoheight: number;
|
|
575
585
|
}
|
|
586
|
+
export interface ContractEventSource {
|
|
587
|
+
contract: string;
|
|
588
|
+
id: number;
|
|
589
|
+
}
|
|
590
|
+
export interface ContractEventMetadata {
|
|
591
|
+
block_hash: string;
|
|
592
|
+
topoheight: number;
|
|
593
|
+
}
|
|
576
594
|
export interface ContractEvent {
|
|
577
595
|
data: any;
|
|
596
|
+
meta: ContractEventMetadata;
|
|
597
|
+
contract_event: ContractEventSource;
|
|
598
|
+
raw: any;
|
|
578
599
|
}
|
|
579
600
|
export interface GetContractLogsParams {
|
|
580
601
|
caller: string;
|
|
@@ -690,6 +711,7 @@ export declare enum RPCMethod {
|
|
|
690
711
|
HasNonce = "has_nonce",
|
|
691
712
|
GetNonceAtTopoheight = "get_nonce_at_topoheight",
|
|
692
713
|
GetAsset = "get_asset",
|
|
714
|
+
GetAssetSupply = "get_asset_supply",
|
|
693
715
|
GetAssets = "get_assets",
|
|
694
716
|
CountAssets = "count_assets",
|
|
695
717
|
CountAccounts = "count_accounts",
|
|
@@ -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