@xelis/sdk 0.11.19 → 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.
@@ -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
  }
@@ -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
  }
@@ -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
  }
@@ -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.GetContractBalanceParams): Promise<string[]>;
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>;
@@ -482,6 +482,11 @@ export interface GetContractBalanceAtTopoheightParams {
482
482
  asset: string;
483
483
  topoheight: number;
484
484
  }
485
+ export interface GetContractBalancesParams {
486
+ contract: string;
487
+ skip?: number;
488
+ maximum?: number;
489
+ }
485
490
  export interface Chunk {
486
491
  instructions: number[];
487
492
  }
@@ -508,10 +513,14 @@ export interface GetContractBalanceAtTopoheightResult {
508
513
  previous_topoheight: number | null;
509
514
  }
510
515
  export interface GetContractBalanceResult {
516
+ data: number;
511
517
  topoheight: number;
512
- amount: number;
513
518
  previous_topoheight: number | null;
514
519
  }
520
+ export interface GetAssetSupplyResult {
521
+ topoheight: number;
522
+ data: number;
523
+ }
515
524
  export interface TransactionResponse extends Transaction {
516
525
  in_mempool: boolean;
517
526
  blocks?: string[];
@@ -690,6 +699,7 @@ export declare enum RPCMethod {
690
699
  HasNonce = "has_nonce",
691
700
  GetNonceAtTopoheight = "get_nonce_at_topoheight",
692
701
  GetAsset = "get_asset",
702
+ GetAssetSupply = "get_asset_supply",
693
703
  GetAssets = "get_assets",
694
704
  CountAssets = "count_assets",
695
705
  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.GetContractBalanceParams): Promise<string[]>;
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.11.19",
2
+ "version": "0.11.20",
3
3
  "name": "@xelis/sdk",
4
4
  "description": "Xelis software development kit for JS",
5
5
  "exports": {