@xelis/sdk 0.11.39 → 0.11.41

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>;
@@ -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;
@@ -661,6 +668,11 @@ export interface GetContractBalanceResult {
661
668
  }
662
669
  export interface GetAssetSupplyResult {
663
670
  topoheight: number;
671
+ previous_topoheight?: number;
672
+ data: number;
673
+ }
674
+ export interface GetAssetSupplyAtTopoheightResult {
675
+ previous_topoheight?: number;
664
676
  data: number;
665
677
  }
666
678
  export interface TransactionResponse extends Transaction {
@@ -828,7 +840,34 @@ export interface ContractLogScheduledExecution {
828
840
  kind: "topo_height" | "block_end";
829
841
  };
830
842
  }
831
- export type ContractLog = ContractLogRefundGas | ContractLogTransfer | ContractLogTransferContract | ContractLogMint | ContractLogBurn | ContractLogNewAsset | ContractLogExitCode | ContractLogRefundDeposits | ContractLogGasInjection | ContractLogScheduledExecution;
843
+ export interface ContractLogExitPayload {
844
+ type: "exit_payload";
845
+ value: {
846
+ payload: any;
847
+ };
848
+ }
849
+ export interface ContractLogTransferPayload {
850
+ type: "transfer_payload";
851
+ value: {
852
+ contract: string;
853
+ amount: number;
854
+ asset: string;
855
+ destination: string;
856
+ payload: any;
857
+ };
858
+ }
859
+ export type ExitErrorCode = "INVALID_ENTRY_PAYLOAD_RETURN" | "UNKNOWN_HOOK" | "INVALID_ENTRY" | "MISSING_ENTRY_EXIT_CODE" | "ILLEGAL_STATE" | "DIVISION_BY_ZERO" | "ASSERTION_FAILED" | "OUT_OF_BOUNDS" | "OUT_OF_MEMORY" | "NOT_ENOUGH_GAS" | "GAS_OVERFLOW" | "RUNTIME_ERROR";
860
+ export interface ExitError {
861
+ code: ExitErrorCode;
862
+ message: string;
863
+ }
864
+ export interface ContractLogExitError {
865
+ type: "exit_error";
866
+ value: {
867
+ err: ExitError;
868
+ };
869
+ }
870
+ export type ContractLog = ContractLogRefundGas | ContractLogTransfer | ContractLogTransferContract | ContractLogMint | ContractLogBurn | ContractLogNewAsset | ContractLogExitCode | ContractLogRefundDeposits | ContractLogGasInjection | ContractLogScheduledExecution | ContractLogExitPayload | ContractLogTransferPayload | ContractLogExitError;
832
871
  export interface PredicatedBaseFeeResult {
833
872
  fee_per_kb: number;
834
873
  predicated_fee_per_kb: number;
@@ -840,6 +879,11 @@ export interface GetContractDataEntriesParams {
840
879
  skip?: number;
841
880
  maximum?: number;
842
881
  }
882
+ export interface GetBalancesAtMaximumTopoheightParams {
883
+ address: string;
884
+ assets: string[];
885
+ maximum_topoheight: number;
886
+ }
843
887
  export declare enum RPCMethod {
844
888
  GetVersion = "get_version",
845
889
  GetHeight = "get_height",
@@ -865,11 +909,13 @@ export declare enum RPCMethod {
865
909
  GetStableBalance = "get_stable_balance",
866
910
  HasBalance = "has_balance",
867
911
  GetBalanceAtTopoheight = "get_balance_at_topoheight",
912
+ GetBalancesAtMaximumTopoheight = "get_balances_at_maximum_topoheight",
868
913
  GetNonce = "get_nonce",
869
914
  HasNonce = "has_nonce",
870
915
  GetNonceAtTopoheight = "get_nonce_at_topoheight",
871
916
  GetAsset = "get_asset",
872
917
  GetAssetSupply = "get_asset_supply",
918
+ GetAssetSupplyAtTopoheight = "get_asset_supply_at_topoheight",
873
919
  GetAssets = "get_assets",
874
920
  CountAssets = "count_assets",
875
921
  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>;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.11.39",
2
+ "version": "0.11.41",
3
3
  "name": "@xelis/sdk",
4
4
  "description": "Xelis software development kit for JS",
5
5
  "exports": {