@xelis/sdk 0.9.9 → 0.9.11

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.
@@ -164,6 +164,9 @@ var RPC = /** @class */ (function (_super) {
164
164
  RPC.prototype.getMinerWork = function (params) {
165
165
  return this.post(types_1.RPCMethod.GetMinerWork, params);
166
166
  };
167
+ RPC.prototype.splitAddress = function (params) {
168
+ return this.post(types_1.RPCMethod.SplitAddress, params);
169
+ };
167
170
  return RPC;
168
171
  }(rpc_1.RPC));
169
172
  exports.RPC = RPC;
@@ -63,6 +63,7 @@ var RPCMethod;
63
63
  RPCMethod["ValidateAddress"] = "validate_address";
64
64
  RPCMethod["ExtractKeyFromAddress"] = "extract_key_from_address";
65
65
  RPCMethod["GetMinerWork"] = "get_miner_work";
66
+ RPCMethod["SplitAddress"] = "split_address";
66
67
  })(RPCMethod = exports.RPCMethod || (exports.RPCMethod = {}));
67
68
  var RPCEvent;
68
69
  (function (RPCEvent) {
@@ -115,7 +115,7 @@ var DaemonMethods = /** @class */ (function () {
115
115
  DaemonMethods.prototype.getHeight = function () {
116
116
  return this.dataCall(types_1.RPCMethod.GetHeight);
117
117
  };
118
- DaemonMethods.prototype.getTopoHeight = function () {
118
+ DaemonMethods.prototype.getTopoheight = function () {
119
119
  return this.dataCall(types_1.RPCMethod.GetTopoheight);
120
120
  };
121
121
  DaemonMethods.prototype.getStableHeight = function () {
@@ -130,7 +130,7 @@ var DaemonMethods = /** @class */ (function () {
130
130
  DaemonMethods.prototype.getBlockTemplate = function (address) {
131
131
  return this.dataCall(types_1.RPCMethod.GetBlockTemplate, { address: address });
132
132
  };
133
- DaemonMethods.prototype.getBlockAtTopoHeight = function (params) {
133
+ DaemonMethods.prototype.getBlockAtTopoheight = function (params) {
134
134
  return this.dataCall(types_1.RPCMethod.GetBlockAtTopoheight, params);
135
135
  };
136
136
  DaemonMethods.prototype.getBlocksAtHeight = function (params) {
@@ -151,7 +151,7 @@ var DaemonMethods = /** @class */ (function () {
151
151
  DaemonMethods.prototype.hasBalance = function (params) {
152
152
  return this.dataCall(types_1.RPCMethod.HasBalance, params);
153
153
  };
154
- DaemonMethods.prototype.getBalanceAtTopoHeight = function (params) {
154
+ DaemonMethods.prototype.getBalanceAtTopoheight = function (params) {
155
155
  return this.dataCall(types_1.RPCMethod.GetBalanceAtTopoheight, params);
156
156
  };
157
157
  DaemonMethods.prototype.getInfo = function () {
@@ -247,6 +247,9 @@ var DaemonMethods = /** @class */ (function () {
247
247
  DaemonMethods.prototype.getMinerWork = function (params) {
248
248
  return this.dataCall(types_1.RPCMethod.GetMinerWork, params);
249
249
  };
250
+ DaemonMethods.prototype.splitAddress = function (params) {
251
+ return this.dataCall(types_1.RPCMethod.SplitAddress, params);
252
+ };
250
253
  return DaemonMethods;
251
254
  }());
252
255
  exports.DaemonMethods = DaemonMethods;
@@ -161,6 +161,9 @@ var RPC = /** @class */ (function (_super) {
161
161
  RPC.prototype.getMinerWork = function (params) {
162
162
  return this.post(RPCMethod.GetMinerWork, params);
163
163
  };
164
+ RPC.prototype.splitAddress = function (params) {
165
+ return this.post(RPCMethod.SplitAddress, params);
166
+ };
164
167
  return RPC;
165
168
  }(BaseRPC));
166
169
  export { RPC };
@@ -60,6 +60,7 @@ export var RPCMethod;
60
60
  RPCMethod["ValidateAddress"] = "validate_address";
61
61
  RPCMethod["ExtractKeyFromAddress"] = "extract_key_from_address";
62
62
  RPCMethod["GetMinerWork"] = "get_miner_work";
63
+ RPCMethod["SplitAddress"] = "split_address";
63
64
  })(RPCMethod || (RPCMethod = {}));
64
65
  export var RPCEvent;
65
66
  (function (RPCEvent) {
@@ -112,7 +112,7 @@ var DaemonMethods = /** @class */ (function () {
112
112
  DaemonMethods.prototype.getHeight = function () {
113
113
  return this.dataCall(RPCMethod.GetHeight);
114
114
  };
115
- DaemonMethods.prototype.getTopoHeight = function () {
115
+ DaemonMethods.prototype.getTopoheight = function () {
116
116
  return this.dataCall(RPCMethod.GetTopoheight);
117
117
  };
118
118
  DaemonMethods.prototype.getStableHeight = function () {
@@ -127,7 +127,7 @@ var DaemonMethods = /** @class */ (function () {
127
127
  DaemonMethods.prototype.getBlockTemplate = function (address) {
128
128
  return this.dataCall(RPCMethod.GetBlockTemplate, { address: address });
129
129
  };
130
- DaemonMethods.prototype.getBlockAtTopoHeight = function (params) {
130
+ DaemonMethods.prototype.getBlockAtTopoheight = function (params) {
131
131
  return this.dataCall(RPCMethod.GetBlockAtTopoheight, params);
132
132
  };
133
133
  DaemonMethods.prototype.getBlocksAtHeight = function (params) {
@@ -148,7 +148,7 @@ var DaemonMethods = /** @class */ (function () {
148
148
  DaemonMethods.prototype.hasBalance = function (params) {
149
149
  return this.dataCall(RPCMethod.HasBalance, params);
150
150
  };
151
- DaemonMethods.prototype.getBalanceAtTopoHeight = function (params) {
151
+ DaemonMethods.prototype.getBalanceAtTopoheight = function (params) {
152
152
  return this.dataCall(RPCMethod.GetBalanceAtTopoheight, params);
153
153
  };
154
154
  DaemonMethods.prototype.getInfo = function () {
@@ -244,6 +244,9 @@ var DaemonMethods = /** @class */ (function () {
244
244
  DaemonMethods.prototype.getMinerWork = function (params) {
245
245
  return this.dataCall(RPCMethod.GetMinerWork, params);
246
246
  };
247
+ DaemonMethods.prototype.splitAddress = function (params) {
248
+ return this.dataCall(RPCMethod.SplitAddress, params);
249
+ };
247
250
  return DaemonMethods;
248
251
  }());
249
252
  export { DaemonMethods };
@@ -1,4 +1,4 @@
1
- import { Block, TopoHeightRangeParams, GetInfoResult, HeightRangeParams, GetBalanceResult, P2PStatusResult, GetBalanceParams, GetBalanceAtTopoHeightParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceResult, GetNonceParams, GetAccountHistoryParams, AccounHistory, DevFee, DiskSize, HasBalanceParams, HasBalanceResult, AssetData, IsTxExecutedInBlockParams, GetAssetParams, GetPeersResult, GetBlockTemplateResult, VersionedBalance, VersionedNonce, GetNonceAtTopoheightParams, HasNonceParams, HasNonceResult, TransactionResponse, IsAccountRegisteredParams, GetMempoolCacheResult, GetDifficultyResult, ValidateAddressParams, ExtractKeyFromAddressParams, SubmitBlockParams, GetMinerWorkParams, GetMinerWorkResult, ValidateAddressResult, GetStableBalanceResult, GetAssetsParams } from './types';
1
+ import { Block, TopoheightRangeParams, GetInfoResult, HeightRangeParams, GetBalanceResult, P2PStatusResult, GetBalanceParams, GetBalanceAtTopoheightParams, GetAccountsParams, GetBlockAtTopoheightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceResult, GetNonceParams, GetAccountHistoryParams, AccounHistory, DevFee, DiskSize, HasBalanceParams, HasBalanceResult, AssetData, IsTxExecutedInBlockParams, GetAssetParams, GetPeersResult, GetBlockTemplateResult, VersionedBalance, VersionedNonce, GetNonceAtTopoheightParams, HasNonceParams, HasNonceResult, TransactionResponse, IsAccountRegisteredParams, GetMempoolCacheResult, GetDifficultyResult, ValidateAddressParams, ExtractKeyFromAddressParams, SubmitBlockParams, GetMinerWorkParams, GetMinerWorkResult, ValidateAddressResult, GetStableBalanceResult, GetAssetsParams, SplitAddressParams, SplitAddressResult } from './types';
2
2
  import { RPC as BaseRPC } from '../lib/rpc';
3
3
  export declare class RPC extends BaseRPC {
4
4
  getVersion(): Promise<import("../lib/types").RPCResponse<string>>;
@@ -8,14 +8,14 @@ export declare class RPC extends BaseRPC {
8
8
  getStableTopoheight(): Promise<import("../lib/types").RPCResponse<number>>;
9
9
  getStableBalance(params: GetBalanceParams): Promise<import("../lib/types").RPCResponse<GetStableBalanceResult>>;
10
10
  getBlockTemplate(address: string): Promise<import("../lib/types").RPCResponse<GetBlockTemplateResult>>;
11
- getBlockAtTopoheight(params: GetBlockAtTopoHeightParams): Promise<import("../lib/types").RPCResponse<Block>>;
11
+ getBlockAtTopoheight(params: GetBlockAtTopoheightParams): Promise<import("../lib/types").RPCResponse<Block>>;
12
12
  getBlocksAtHeight(params: GetBlocksAtHeightParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
13
13
  getBlockByHash(params: GetBlockByHashParams): Promise<import("../lib/types").RPCResponse<Block>>;
14
14
  getTopBlock(params?: GetTopBlockParams): Promise<import("../lib/types").RPCResponse<Block>>;
15
15
  submitBlock(params: SubmitBlockParams): Promise<import("../lib/types").RPCResponse<boolean>>;
16
16
  getBalance(params: GetBalanceParams): Promise<import("../lib/types").RPCResponse<GetBalanceResult>>;
17
17
  hasBalance(params: HasBalanceParams): Promise<import("../lib/types").RPCResponse<HasBalanceResult>>;
18
- getBalanceAtTopoheight(params: GetBalanceAtTopoHeightParams): Promise<import("../lib/types").RPCResponse<VersionedBalance>>;
18
+ getBalanceAtTopoheight(params: GetBalanceAtTopoheightParams): Promise<import("../lib/types").RPCResponse<VersionedBalance>>;
19
19
  getInfo(): Promise<import("../lib/types").RPCResponse<GetInfoResult>>;
20
20
  getNonce(params: GetNonceParams): Promise<import("../lib/types").RPCResponse<GetNonceResult>>;
21
21
  hasNonce(params: HasNonceParams): Promise<import("../lib/types").RPCResponse<HasNonceResult>>;
@@ -31,8 +31,8 @@ export declare class RPC extends BaseRPC {
31
31
  getPeers(): Promise<import("../lib/types").RPCResponse<GetPeersResult>>;
32
32
  getMemPool(): Promise<import("../lib/types").RPCResponse<TransactionResponse[]>>;
33
33
  getTips(): Promise<import("../lib/types").RPCResponse<string[]>>;
34
- getDAGOrder(params?: TopoHeightRangeParams): Promise<import("../lib/types").RPCResponse<string[]>>;
35
- getBlocksRangeByTopoheight(params: TopoHeightRangeParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
34
+ getDAGOrder(params?: TopoheightRangeParams): Promise<import("../lib/types").RPCResponse<string[]>>;
35
+ getBlocksRangeByTopoheight(params: TopoheightRangeParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
36
36
  getBlocksRangeByHeight(params: HeightRangeParams): Promise<import("../lib/types").RPCResponse<Block[]>>;
37
37
  getTransactions(txHashes: string[]): Promise<import("../lib/types").RPCResponse<TransactionResponse[]>>;
38
38
  getAccountHistory(params: GetAccountHistoryParams): Promise<import("../lib/types").RPCResponse<AccounHistory[]>>;
@@ -48,5 +48,6 @@ export declare class RPC extends BaseRPC {
48
48
  validateAddress(params: ValidateAddressParams): Promise<import("../lib/types").RPCResponse<ValidateAddressResult>>;
49
49
  extractKeyFromAddress(params: ExtractKeyFromAddressParams): Promise<import("../lib/types").RPCResponse<string | number[]>>;
50
50
  getMinerWork(params: GetMinerWorkParams): Promise<import("../lib/types").RPCResponse<GetMinerWorkResult>>;
51
+ splitAddress(params: SplitAddressParams): Promise<import("../lib/types").RPCResponse<SplitAddressResult>>;
51
52
  }
52
53
  export default RPC;
@@ -40,7 +40,7 @@ export interface GetBalanceParams {
40
40
  address: string;
41
41
  asset: string;
42
42
  }
43
- export interface GetBalanceAtTopoHeightParams {
43
+ export interface GetBalanceAtTopoheightParams {
44
44
  address: string;
45
45
  asset: string;
46
46
  topoheight: number;
@@ -93,7 +93,7 @@ export interface P2PStatusResult {
93
93
  median_topoheight: number;
94
94
  max_peers: number;
95
95
  }
96
- export interface TopoHeightRangeParams {
96
+ export interface TopoheightRangeParams {
97
97
  start_topoheight?: number;
98
98
  end_topoheight?: number;
99
99
  }
@@ -209,7 +209,7 @@ export interface GetAccountsParams {
209
209
  minimum_topoheight?: number;
210
210
  maximum_topoheight?: number;
211
211
  }
212
- export interface GetBlockAtTopoHeightParams {
212
+ export interface GetBlockAtTopoheightParams {
213
213
  topoheight: number;
214
214
  include_txs?: boolean;
215
215
  }
@@ -353,6 +353,13 @@ export interface GetMinerWorkResult {
353
353
  difficulty: string;
354
354
  topoheight: number;
355
355
  }
356
+ export interface SplitAddressParams {
357
+ address: string;
358
+ }
359
+ export interface SplitAddressResult {
360
+ address: string;
361
+ integrated_data: string;
362
+ }
356
363
  export declare enum RPCMethod {
357
364
  GetVersion = "get_version",
358
365
  GetInfo = "get_info",
@@ -400,7 +407,8 @@ export declare enum RPCMethod {
400
407
  GetDifficulty = "get_difficulty",
401
408
  ValidateAddress = "validate_address",
402
409
  ExtractKeyFromAddress = "extract_key_from_address",
403
- GetMinerWork = "get_miner_work"
410
+ GetMinerWork = "get_miner_work",
411
+ SplitAddress = "split_address"
404
412
  }
405
413
  export declare enum RPCEvent {
406
414
  NewBlock = "new_block",
@@ -1,5 +1,5 @@
1
1
  import { MessageEvent } from 'ws';
2
- import { Block, GetInfoResult, GetPeersResult, RPCEventResult, TopoHeightRangeParams, P2PStatusResult, GetBalanceAtTopoHeightParams, GetBalanceResult, HeightRangeParams, BlockOrdered, GetBalanceParams, GetAccountsParams, GetBlockAtTopoHeightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceParams, GetNonceResult, GetAccountHistoryParams, AccounHistory, Peer, PeerPeerListUpdated, PeerPeerDisconnected, DevFee, DiskSize, AssetWithData, AssetData, GetAssetParams, HasBalanceParams, HasBalanceResult, IsTxExecutedInBlockParams, BlockOrphaned, VersionedBalance, StableHeightChanged, HasNonceResult, HasNonceParams, TransactionResponse, IsAccountRegisteredParams, GetMempoolCacheResult, GetDifficultyResult, ValidateAddressParams, ExtractKeyFromAddressParams, SubmitBlockParams, GetMinerWorkParams, GetMinerWorkResult, ValidateAddressResult, TransactionExecuted, GetStableBalanceResult, GetAssetsParams } from './types';
2
+ import { Block, GetInfoResult, GetPeersResult, RPCEventResult, TopoheightRangeParams, P2PStatusResult, GetBalanceAtTopoheightParams, GetBalanceResult, HeightRangeParams, BlockOrdered, GetBalanceParams, GetAccountsParams, GetBlockAtTopoheightParams, GetBlockByHashParams, GetBlocksAtHeightParams, GetTopBlockParams, GetNonceParams, GetNonceResult, GetAccountHistoryParams, AccounHistory, Peer, PeerPeerListUpdated, PeerPeerDisconnected, DevFee, DiskSize, AssetWithData, AssetData, GetAssetParams, HasBalanceParams, HasBalanceResult, IsTxExecutedInBlockParams, BlockOrphaned, VersionedBalance, StableHeightChanged, HasNonceResult, HasNonceParams, TransactionResponse, IsAccountRegisteredParams, GetMempoolCacheResult, GetDifficultyResult, ValidateAddressParams, ExtractKeyFromAddressParams, SubmitBlockParams, GetMinerWorkParams, GetMinerWorkResult, ValidateAddressResult, TransactionExecuted, GetStableBalanceResult, GetAssetsParams, SplitAddressParams, SplitAddressResult } from './types';
3
3
  import { WS as BaseWS } from '../lib/websocket';
4
4
  export declare class DaemonMethods {
5
5
  ws: BaseWS;
@@ -22,19 +22,19 @@ export declare class DaemonMethods {
22
22
  onStableHeightChanged(onData: (msgEvent: MessageEvent, data?: StableHeightChanged & RPCEventResult, err?: Error) => void): Promise<() => Promise<void>>;
23
23
  getVersion(): Promise<string>;
24
24
  getHeight(): Promise<number>;
25
- getTopoHeight(): Promise<number>;
25
+ getTopoheight(): Promise<number>;
26
26
  getStableHeight(): Promise<number>;
27
27
  getStableTopoheight(): Promise<number>;
28
28
  getStableBalance(params: GetBalanceParams): Promise<GetStableBalanceResult>;
29
29
  getBlockTemplate(address: string): Promise<string>;
30
- getBlockAtTopoHeight(params: GetBlockAtTopoHeightParams): Promise<Block>;
30
+ getBlockAtTopoheight(params: GetBlockAtTopoheightParams): Promise<Block>;
31
31
  getBlocksAtHeight(params: GetBlocksAtHeightParams): Promise<Block[]>;
32
32
  getBlockByHash(params: GetBlockByHashParams): Promise<Block>;
33
33
  getTopBlock(params: GetTopBlockParams): Promise<Block>;
34
34
  submitBlock(params: SubmitBlockParams): Promise<boolean>;
35
35
  getBalance(params: GetBalanceParams): Promise<GetBalanceResult>;
36
36
  hasBalance(params: HasBalanceParams): Promise<HasBalanceResult>;
37
- getBalanceAtTopoHeight(params: GetBalanceAtTopoHeightParams): Promise<VersionedBalance>;
37
+ getBalanceAtTopoheight(params: GetBalanceAtTopoheightParams): Promise<VersionedBalance>;
38
38
  getInfo(): Promise<GetInfoResult>;
39
39
  getNonce(params: GetNonceParams): Promise<GetNonceResult>;
40
40
  hasNonce(params: HasNonceParams): Promise<HasNonceResult>;
@@ -49,8 +49,8 @@ export declare class DaemonMethods {
49
49
  getPeers(): Promise<GetPeersResult>;
50
50
  getMemPool(): Promise<TransactionResponse[]>;
51
51
  getTips(): Promise<string[]>;
52
- getDAGOrder(params: TopoHeightRangeParams): Promise<string[]>;
53
- getBlocksRangeByTopoheight(params: TopoHeightRangeParams): Promise<Block[]>;
52
+ getDAGOrder(params: TopoheightRangeParams): Promise<string[]>;
53
+ getBlocksRangeByTopoheight(params: TopoheightRangeParams): Promise<Block[]>;
54
54
  getBlocksRangeByHeight(params: HeightRangeParams): Promise<Block[]>;
55
55
  getTransactions(txHashes: string[]): Promise<TransactionResponse[]>;
56
56
  getAccountHistory(params: GetAccountHistoryParams): Promise<AccounHistory[]>;
@@ -66,6 +66,7 @@ export declare class DaemonMethods {
66
66
  validateAddress(params: ValidateAddressParams): Promise<ValidateAddressResult>;
67
67
  extractKeyFromAddress(params: ExtractKeyFromAddressParams): Promise<string | number[]>;
68
68
  getMinerWork(params: GetMinerWorkParams): Promise<GetMinerWorkResult>;
69
+ splitAddress(params: SplitAddressParams): Promise<SplitAddressResult>;
69
70
  }
70
71
  export declare class WS extends BaseWS {
71
72
  methods: DaemonMethods;
@@ -1,5 +1,5 @@
1
- import { GetAssetParams, HasBalanceResult } from '../daemon/types';
2
- import { GetAddressParams, SplitAddressParams, SplitAddressResult, BuildTransactionParams, BuildTransactionResult, ListTransactionParams, Signature, TransactionEntry, RescanParams, SetOnlineModeParams, EstimateFeesParams } from './types';
1
+ import { GetAssetParams, HasBalanceResult, SplitAddressParams, SplitAddressResult } from '../daemon/types';
2
+ import { GetAddressParams, BuildTransactionParams, BuildTransactionResult, ListTransactionParams, Signature, TransactionEntry, RescanParams, SetOnlineModeParams, EstimateFeesParams } from './types';
3
3
  import { RPC as BaseRPC } from '../lib/rpc';
4
4
  import { RPCResponse } from '../lib/types';
5
5
  export declare class RPC extends BaseRPC {
@@ -2,13 +2,6 @@ import { Transaction } from '../daemon/types';
2
2
  export interface GetAddressParams {
3
3
  integrated_data?: string;
4
4
  }
5
- export interface SplitAddressParams {
6
- address: string;
7
- }
8
- export interface SplitAddressResult {
9
- address: string;
10
- integrated_data: string;
11
- }
12
5
  export interface FeeBuilder {
13
6
  multiplier?: number;
14
7
  value?: number;
@@ -1,7 +1,7 @@
1
1
  import { WS as BaseWS } from '../lib/websocket';
2
2
  import { MessageEvent } from 'ws';
3
- import { AssetWithData, GetAssetParams, RPCEventResult } from '../daemon/types';
4
- import { BuildTransactionParams, BuildTransactionResult, GetAddressParams, ListTransactionParams, SplitAddressParams, SplitAddressResult, Signature, RescanParams, SetOnlineModeParams, EstimateFeesParams, TransactionEntry, BalanceChangedResult, NewTopoheightResult, RescanResult } from './types';
3
+ import { AssetWithData, GetAssetParams, RPCEventResult, SplitAddressParams, SplitAddressResult } from '../daemon/types';
4
+ import { BuildTransactionParams, BuildTransactionResult, GetAddressParams, ListTransactionParams, Signature, RescanParams, SetOnlineModeParams, EstimateFeesParams, TransactionEntry, BalanceChangedResult, NewTopoheightResult, RescanResult } from './types';
5
5
  export declare class WalletMethods {
6
6
  ws: BaseWS;
7
7
  prefix: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.9.9",
2
+ "version": "0.9.11",
3
3
  "name": "@xelis/sdk",
4
4
  "description": "Xelis software development kit for JS",
5
5
  "exports": {