@xelis/sdk 0.11.40 → 0.11.42

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
  getBalanceAtTopoheight(params) {
77
77
  return this.request(types_1.RPCMethod.GetBalanceAtTopoheight, params);
78
78
  }
79
+ getBalancesAtMaximumTopoheight(params) {
80
+ return this.request(types_1.RPCMethod.GetBalancesAtMaximumTopoheight, params);
81
+ }
79
82
  getNonce(params) {
80
83
  return this.request(types_1.RPCMethod.GetNonce, params);
81
84
  }
@@ -91,6 +94,9 @@ class RPC extends http_1.HttpRPC {
91
94
  getAssetSupply(params) {
92
95
  return this.request(types_1.RPCMethod.GetAssetSupply, params);
93
96
  }
97
+ getAssetSupplyAtTopoheight(params) {
98
+ return this.request(types_1.RPCMethod.GetAssetSupplyAtTopoheight, params);
99
+ }
94
100
  getAssets(params) {
95
101
  return this.request(types_1.RPCMethod.GetAssets, params);
96
102
  }
@@ -45,11 +45,13 @@ var RPCMethod;
45
45
  RPCMethod["GetStableBalance"] = "get_stable_balance";
46
46
  RPCMethod["HasBalance"] = "has_balance";
47
47
  RPCMethod["GetBalanceAtTopoheight"] = "get_balance_at_topoheight";
48
+ RPCMethod["GetBalancesAtMaximumTopoheight"] = "get_balances_at_maximum_topoheight";
48
49
  RPCMethod["GetNonce"] = "get_nonce";
49
50
  RPCMethod["HasNonce"] = "has_nonce";
50
51
  RPCMethod["GetNonceAtTopoheight"] = "get_nonce_at_topoheight";
51
52
  RPCMethod["GetAsset"] = "get_asset";
52
53
  RPCMethod["GetAssetSupply"] = "get_asset_supply";
54
+ RPCMethod["GetAssetSupplyAtTopoheight"] = "get_asset_supply_at_topoheight";
53
55
  RPCMethod["GetAssets"] = "get_assets";
54
56
  RPCMethod["CountAssets"] = "count_assets";
55
57
  RPCMethod["CountAccounts"] = "count_accounts";
@@ -95,6 +95,9 @@ class DaemonMethods {
95
95
  getBalanceAtTopoheight(params) {
96
96
  return this.dataCall(types_1.RPCMethod.GetBalanceAtTopoheight, params);
97
97
  }
98
+ getBalancesAtMaximumTopoheight(params) {
99
+ return this.dataCall(types_1.RPCMethod.GetBalancesAtMaximumTopoheight, params);
100
+ }
98
101
  getNonce(params) {
99
102
  return this.dataCall(types_1.RPCMethod.GetNonce, params);
100
103
  }
@@ -110,6 +113,9 @@ class DaemonMethods {
110
113
  getAssetSupply(params) {
111
114
  return this.dataCall(types_1.RPCMethod.GetAssetSupply, params);
112
115
  }
116
+ getAssetSupplyAtTopoheight(params) {
117
+ return this.dataCall(types_1.RPCMethod.GetAssetSupplyAtTopoheight, params);
118
+ }
113
119
  getAssets(params) {
114
120
  return this.dataCall(types_1.RPCMethod.GetAssets, params);
115
121
  }
@@ -73,6 +73,9 @@ export class RPC extends HttpRPC {
73
73
  getBalanceAtTopoheight(params) {
74
74
  return this.request(RPCMethod.GetBalanceAtTopoheight, params);
75
75
  }
76
+ getBalancesAtMaximumTopoheight(params) {
77
+ return this.request(RPCMethod.GetBalancesAtMaximumTopoheight, params);
78
+ }
76
79
  getNonce(params) {
77
80
  return this.request(RPCMethod.GetNonce, params);
78
81
  }
@@ -88,6 +91,9 @@ export class RPC extends HttpRPC {
88
91
  getAssetSupply(params) {
89
92
  return this.request(RPCMethod.GetAssetSupply, params);
90
93
  }
94
+ getAssetSupplyAtTopoheight(params) {
95
+ return this.request(RPCMethod.GetAssetSupplyAtTopoheight, params);
96
+ }
91
97
  getAssets(params) {
92
98
  return this.request(RPCMethod.GetAssets, params);
93
99
  }
@@ -42,11 +42,13 @@ export var RPCMethod;
42
42
  RPCMethod["GetStableBalance"] = "get_stable_balance";
43
43
  RPCMethod["HasBalance"] = "has_balance";
44
44
  RPCMethod["GetBalanceAtTopoheight"] = "get_balance_at_topoheight";
45
+ RPCMethod["GetBalancesAtMaximumTopoheight"] = "get_balances_at_maximum_topoheight";
45
46
  RPCMethod["GetNonce"] = "get_nonce";
46
47
  RPCMethod["HasNonce"] = "has_nonce";
47
48
  RPCMethod["GetNonceAtTopoheight"] = "get_nonce_at_topoheight";
48
49
  RPCMethod["GetAsset"] = "get_asset";
49
50
  RPCMethod["GetAssetSupply"] = "get_asset_supply";
51
+ RPCMethod["GetAssetSupplyAtTopoheight"] = "get_asset_supply_at_topoheight";
50
52
  RPCMethod["GetAssets"] = "get_assets";
51
53
  RPCMethod["CountAssets"] = "count_assets";
52
54
  RPCMethod["CountAccounts"] = "count_accounts";
@@ -92,6 +92,9 @@ export class DaemonMethods {
92
92
  getBalanceAtTopoheight(params) {
93
93
  return this.dataCall(RPCMethod.GetBalanceAtTopoheight, params);
94
94
  }
95
+ getBalancesAtMaximumTopoheight(params) {
96
+ return this.dataCall(RPCMethod.GetBalancesAtMaximumTopoheight, params);
97
+ }
95
98
  getNonce(params) {
96
99
  return this.dataCall(RPCMethod.GetNonce, params);
97
100
  }
@@ -107,6 +110,9 @@ export class DaemonMethods {
107
110
  getAssetSupply(params) {
108
111
  return this.dataCall(RPCMethod.GetAssetSupply, params);
109
112
  }
113
+ getAssetSupplyAtTopoheight(params) {
114
+ return this.dataCall(RPCMethod.GetAssetSupplyAtTopoheight, params);
115
+ }
110
116
  getAssets(params) {
111
117
  return this.dataCall(RPCMethod.GetAssets, params);
112
118
  }
@@ -25,11 +25,13 @@ export declare class RPC extends HttpRPC {
25
25
  getStableBalance(params: types.GetBalanceParams): Promise<types.GetStableBalanceResult>;
26
26
  hasBalance(params: types.HasBalanceParams): Promise<types.HasBalanceResult>;
27
27
  getBalanceAtTopoheight(params: types.GetBalanceAtTopoheightParams): Promise<types.VersionedBalance>;
28
+ getBalancesAtMaximumTopoheight(params: types.GetBalancesAtMaximumTopoheightParams): Promise<types.VersionedBalance[]>;
28
29
  getNonce(params: types.GetNonceParams): Promise<types.GetNonceResult>;
29
30
  hasNonce(params: types.HasNonceParams): Promise<types.HasNonceResult>;
30
31
  getNonceAtTopoheight(params: types.GetNonceAtTopoheightParams): Promise<types.VersionedNonce>;
31
32
  getAsset(params: types.GetAssetParams): Promise<types.AssetData>;
32
- getAssetSupply(params: types.GetAssetParams): Promise<types.GetAssetSupplyResult>;
33
+ getAssetSupply(params: types.GetAssetSupplyParams): Promise<types.GetAssetSupplyResult>;
34
+ getAssetSupplyAtTopoheight(params: types.GetAssetSupplyAtTopoheightParams): Promise<types.GetAssetSupplyAtTopoheightResult>;
33
35
  getAssets(params: types.GetAssetsParams): Promise<types.AssetWithData[]>;
34
36
  countAssets(): Promise<number>;
35
37
  countTransactions(): Promise<number>;
@@ -71,8 +73,8 @@ export declare class RPC extends HttpRPC {
71
73
  getContractRegisteredExecutionsAtTopoheight(params: types.GetContractScheduledExecutionsAtTopoheightParams): Promise<[number, string][]>;
72
74
  getContractsOutputs(params: types.GetContractOutputsParams): Promise<types.GetContractsOutputsResult>;
73
75
  getContractModule(params: types.GetContractModuleParams): Promise<types.GetContractModuleResult>;
74
- getContractData(params: types.GetContractDataParams): Promise<unknown>;
75
- getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<unknown>;
76
+ getContractData(params: types.GetContractDataParams): Promise<types.GetContractDataResult>;
77
+ getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<types.GetContractDataAtTopoHeightResult>;
76
78
  getContractBalance(params: types.GetContractBalanceParams): Promise<types.GetContractBalanceResult>;
77
79
  getContractBalanceAtTopoheight(params: types.GetContractBalanceAtTopoheightParams): Promise<types.GetContractBalanceAtTopoheightResult>;
78
80
  getContractAssets(params: types.GetContractBalancesParams): Promise<string[]>;
@@ -481,6 +481,13 @@ export interface IsTxExecutedInBlockParams {
481
481
  export interface GetAssetParams {
482
482
  asset: string;
483
483
  }
484
+ export interface GetAssetSupplyParams {
485
+ asset: string;
486
+ }
487
+ export interface GetAssetSupplyAtTopoheightParams {
488
+ asset: string;
489
+ topoheight: number;
490
+ }
484
491
  export interface GetPeersResult {
485
492
  peers: Peer[];
486
493
  total_peers: number;
@@ -647,6 +654,11 @@ export interface GetContractModuleResult {
647
654
  };
648
655
  }
649
656
  export interface GetContractDataResult {
657
+ previous_topoheight: number | null;
658
+ topoheight: number;
659
+ data: any | null;
660
+ }
661
+ export interface GetContractDataAtTopoHeightResult {
650
662
  previous_topoheight: number | null;
651
663
  data: any | null;
652
664
  }
@@ -661,6 +673,11 @@ export interface GetContractBalanceResult {
661
673
  }
662
674
  export interface GetAssetSupplyResult {
663
675
  topoheight: number;
676
+ previous_topoheight?: number;
677
+ data: number;
678
+ }
679
+ export interface GetAssetSupplyAtTopoheightResult {
680
+ previous_topoheight?: number;
664
681
  data: number;
665
682
  }
666
683
  export interface TransactionResponse extends Transaction {
@@ -867,6 +884,11 @@ export interface GetContractDataEntriesParams {
867
884
  skip?: number;
868
885
  maximum?: number;
869
886
  }
887
+ export interface GetBalancesAtMaximumTopoheightParams {
888
+ address: string;
889
+ assets: string[];
890
+ maximum_topoheight: number;
891
+ }
870
892
  export declare enum RPCMethod {
871
893
  GetVersion = "get_version",
872
894
  GetHeight = "get_height",
@@ -892,11 +914,13 @@ export declare enum RPCMethod {
892
914
  GetStableBalance = "get_stable_balance",
893
915
  HasBalance = "has_balance",
894
916
  GetBalanceAtTopoheight = "get_balance_at_topoheight",
917
+ GetBalancesAtMaximumTopoheight = "get_balances_at_maximum_topoheight",
895
918
  GetNonce = "get_nonce",
896
919
  HasNonce = "has_nonce",
897
920
  GetNonceAtTopoheight = "get_nonce_at_topoheight",
898
921
  GetAsset = "get_asset",
899
922
  GetAssetSupply = "get_asset_supply",
923
+ GetAssetSupplyAtTopoheight = "get_asset_supply_at_topoheight",
900
924
  GetAssets = "get_assets",
901
925
  CountAssets = "count_assets",
902
926
  CountAccounts = "count_accounts",
@@ -123,11 +123,13 @@ export declare class DaemonMethods {
123
123
  getStableBalance(params: types.GetBalanceParams): Promise<types.GetStableBalanceResult>;
124
124
  hasBalance(params: types.HasBalanceParams): Promise<types.HasBalanceResult>;
125
125
  getBalanceAtTopoheight(params: types.GetBalanceAtTopoheightParams): Promise<types.VersionedBalance>;
126
+ getBalancesAtMaximumTopoheight(params: types.GetBalancesAtMaximumTopoheightParams): Promise<types.VersionedBalance[]>;
126
127
  getNonce(params: types.GetNonceParams): Promise<types.GetNonceResult>;
127
128
  hasNonce(params: types.HasNonceParams): Promise<types.HasNonceResult>;
128
129
  getNonceAtTopoheight(params: types.GetNonceAtTopoheightParams): Promise<types.VersionedNonce>;
129
130
  getAsset(params: types.GetAssetParams): Promise<types.AssetData>;
130
- getAssetSupply(params: types.GetAssetParams): Promise<types.GetAssetSupplyResult>;
131
+ getAssetSupply(params: types.GetAssetSupplyParams): Promise<types.GetAssetSupplyResult>;
132
+ getAssetSupplyAtTopoheight(params: types.GetAssetSupplyAtTopoheightParams): Promise<types.GetAssetSupplyAtTopoheightResult>;
131
133
  getAssets(params?: types.GetAssetsParams): Promise<types.AssetWithData[]>;
132
134
  countAssets(): Promise<number>;
133
135
  countTransactions(): Promise<number>;
@@ -169,8 +171,8 @@ export declare class DaemonMethods {
169
171
  getContractRegisteredExecutionsAtTopoheight(params: types.GetContractScheduledExecutionsAtTopoheightParams): Promise<[number, string][]>;
170
172
  getContractsOutputs(params: types.GetContractOutputsParams): Promise<types.GetContractsOutputsResult>;
171
173
  getContractModule(params: types.GetContractModuleParams): Promise<types.GetContractModuleResult>;
172
- getContractData(params: types.GetContractDataParams): Promise<unknown>;
173
- getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<unknown>;
174
+ getContractData(params: types.GetContractDataParams): Promise<types.GetContractDataResult>;
175
+ getContractDataAtTopoheight(params: types.GetContractDataAtTopoheightParams): Promise<types.GetContractDataAtTopoHeightResult>;
174
176
  getContractBalance(params: types.GetContractBalanceParams): Promise<types.GetContractBalanceResult>;
175
177
  getContractBalanceAtTopoheight(params: types.GetContractBalanceAtTopoheightParams): Promise<types.GetContractBalanceAtTopoheightResult>;
176
178
  getContractAssets(params: types.GetContractBalancesParams): Promise<string[]>;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.11.40",
2
+ "version": "0.11.42",
3
3
  "name": "@xelis/sdk",
4
4
  "description": "Xelis software development kit for JS",
5
5
  "exports": {