@shapeshiftoss/unchained-client 0.1.3 → 0.2.0
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/generated/ethereum/api.d.ts +554 -0
- package/dist/generated/ethereum/api.d.ts.map +1 -0
- package/dist/generated/ethereum/api.js +465 -0
- package/dist/generated/ethereum/api.js.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/base.d.ts +0 -0
- package/dist/generated/ethereum/base.d.ts.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/base.js +0 -0
- package/dist/generated/ethereum/base.js.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/common.d.ts +0 -0
- package/dist/generated/ethereum/common.d.ts.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/common.js +0 -0
- package/dist/generated/ethereum/common.js.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/configuration.d.ts +0 -0
- package/dist/generated/ethereum/configuration.d.ts.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/configuration.js +0 -0
- package/dist/generated/ethereum/configuration.js.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/index.d.ts +0 -0
- package/dist/generated/ethereum/index.d.ts.map +1 -0
- package/dist/{packages/client/src/generated → generated}/ethereum/index.js +0 -0
- package/dist/generated/ethereum/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/{packages/client/src/index.js → index.js} +0 -4
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +21 -547
- package/package.json +1 -1
- package/dist/coinstacks/common/api/src/index.d.ts +0 -121
- package/dist/coinstacks/common/api/src/index.d.ts.map +0 -1
- package/dist/coinstacks/common/api/src/index.js +0 -63
- package/dist/coinstacks/common/api/src/index.js.map +0 -1
- package/dist/coinstacks/common/api/src/middleware.d.ts +0 -4
- package/dist/coinstacks/common/api/src/middleware.d.ts.map +0 -1
- package/dist/coinstacks/common/api/src/middleware.js +0 -39
- package/dist/coinstacks/common/api/src/middleware.js.map +0 -1
- package/dist/coinstacks/common/api/src/models.d.ts +0 -191
- package/dist/coinstacks/common/api/src/models.d.ts.map +0 -1
- package/dist/coinstacks/common/api/src/models.js +0 -3
- package/dist/coinstacks/common/api/src/models.js.map +0 -1
- package/dist/packages/client/src/generated/ethereum/api.d.ts +0 -1074
- package/dist/packages/client/src/generated/ethereum/api.d.ts.map +0 -1
- package/dist/packages/client/src/generated/ethereum/api.js +0 -806
- package/dist/packages/client/src/generated/ethereum/api.js.map +0 -1
- package/dist/packages/client/src/generated/ethereum/base.d.ts.map +0 -1
- package/dist/packages/client/src/generated/ethereum/base.js.map +0 -1
- package/dist/packages/client/src/generated/ethereum/common.d.ts.map +0 -1
- package/dist/packages/client/src/generated/ethereum/common.js.map +0 -1
- package/dist/packages/client/src/generated/ethereum/configuration.d.ts.map +0 -1
- package/dist/packages/client/src/generated/ethereum/configuration.js.map +0 -1
- package/dist/packages/client/src/generated/ethereum/index.d.ts.map +0 -1
- package/dist/packages/client/src/generated/ethereum/index.js.map +0 -1
- package/dist/packages/client/src/index.d.ts +0 -3
- package/dist/packages/client/src/index.d.ts.map +0 -1
- package/dist/packages/client/src/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { Controller } from 'tsoa';
|
|
2
|
-
import { RegistryDocument } from '@shapeshiftoss/common-mongo';
|
|
3
|
-
import { Balance, BalanceChange, Block, RawTx, Tx, TxHistory, TxReceipt, Utxo } from './models';
|
|
4
|
-
export * from './models';
|
|
5
|
-
export * as middleware from './middleware';
|
|
6
|
-
export declare type Interval = 'weekly' | 'daily' | 'hourly' | '30min' | '15min' | '10min' | '5min' | '1min';
|
|
7
|
-
export declare const intervals: {
|
|
8
|
-
weekly: number;
|
|
9
|
-
daily: number;
|
|
10
|
-
hourly: number;
|
|
11
|
-
'30min': number;
|
|
12
|
-
'15min': number;
|
|
13
|
-
'10min': number;
|
|
14
|
-
'5min': number;
|
|
15
|
-
'1min': number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Generic api error for handling failed requests
|
|
19
|
-
*/
|
|
20
|
-
export declare class ApiError extends Error {
|
|
21
|
-
statusCode: number;
|
|
22
|
-
constructor(name: string, statusCode: number, message?: string);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Common API implementation which all coinstack OpenAPI Controllers must conform to.
|
|
26
|
-
*
|
|
27
|
-
* The route path is described in the comment before each api function.
|
|
28
|
-
*
|
|
29
|
-
* Typescript is unable to enforce decorators on abstract functions and also will not enforce more than the first argument for each function. Please ensure these match when adding a new coinstack api, or update all coinstack api implementations on any changes to the abstract class.
|
|
30
|
-
*/
|
|
31
|
-
export declare abstract class CommonAPI extends Controller {
|
|
32
|
-
/**
|
|
33
|
-
* Get balance returns the balance of an address
|
|
34
|
-
*
|
|
35
|
-
* @param {string} address account address
|
|
36
|
-
*
|
|
37
|
-
* @returns {Promise<Balance>} account balance
|
|
38
|
-
*/
|
|
39
|
-
abstract getBalance(address: string): Promise<Balance>;
|
|
40
|
-
/**
|
|
41
|
-
* Get balance history returns the balance history of an address
|
|
42
|
-
*
|
|
43
|
-
* @param {string} address account address
|
|
44
|
-
* @param {Interval} interval range to group by
|
|
45
|
-
* @param {number} [start] start date as unix timestamp
|
|
46
|
-
* @param {number} [end] end date as unix timestamp
|
|
47
|
-
*
|
|
48
|
-
* @returns {Promise<Array<BalanceChange>>} balance change history
|
|
49
|
-
*/
|
|
50
|
-
abstract getBalanceHistory(address: string, interval: Interval, from?: number, to?: number): Promise<Array<BalanceChange>>;
|
|
51
|
-
/**
|
|
52
|
-
* Get block returns data about a block
|
|
53
|
-
*
|
|
54
|
-
* @param {(number|string)} block height or hash
|
|
55
|
-
*
|
|
56
|
-
* @returns {Promise<Block>} block data
|
|
57
|
-
*/
|
|
58
|
-
abstract getBlock(block: number | string): Promise<Block>;
|
|
59
|
-
/**
|
|
60
|
-
* Get transaction returns data about a transaction
|
|
61
|
-
*
|
|
62
|
-
* @param {string} txid transaction id
|
|
63
|
-
*
|
|
64
|
-
* @returns {Promise<Tx>} transaction data
|
|
65
|
-
*/
|
|
66
|
-
abstract getTx(txid: string): Promise<Tx>;
|
|
67
|
-
/**
|
|
68
|
-
* Get the current fee price (ex. gas price, sats/byte) from the network node.
|
|
69
|
-
*
|
|
70
|
-
* @returns {Promise<string>} current fee price for chain for next block confirmation
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
abstract getFeePrice(): Promise<string>;
|
|
74
|
-
/**
|
|
75
|
-
* Get transaction history returns the transaction history of an address
|
|
76
|
-
*
|
|
77
|
-
* @param {string} address account address
|
|
78
|
-
* @param {number} [page] page number
|
|
79
|
-
* @param {number} [pageSize] page number
|
|
80
|
-
* @param {string} [contract] filter by contract address (only supported by coins which support contracts)
|
|
81
|
-
*
|
|
82
|
-
* @returns {Promise<TxHistory>} transaction history
|
|
83
|
-
*/
|
|
84
|
-
abstract getTxHistory(address: string, page?: number, pageSize?: number, contract?: string): Promise<TxHistory>;
|
|
85
|
-
/**
|
|
86
|
-
* Register addresses for tracking incoming pending transactions and newly confirmed transactions
|
|
87
|
-
*
|
|
88
|
-
* @param {RegistryDocument} document Contains a list of addresses to register for a client id
|
|
89
|
-
*
|
|
90
|
-
* @returns {Promise<void>}
|
|
91
|
-
*/
|
|
92
|
-
abstract register(document: RegistryDocument): Promise<void>;
|
|
93
|
-
/**
|
|
94
|
-
* Unregister addresses to stop tracking incoming pending transactions and newly confirmed transactions
|
|
95
|
-
*
|
|
96
|
-
* @param {RegistryDocument} document Contains a list of addresses to unregister for a client id. If no addresses are provided, all addresses will be unregistered.
|
|
97
|
-
*
|
|
98
|
-
* @returns {Promise<void>}
|
|
99
|
-
*/
|
|
100
|
-
abstract unregister(document: RegistryDocument): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Sends raw transaction to be broadcast to the node.
|
|
103
|
-
*
|
|
104
|
-
* @param {RawTx} rawTx serialized raw transaction hex
|
|
105
|
-
*
|
|
106
|
-
* @returns {Promise<TxReceipt>} transaction receipt
|
|
107
|
-
*/
|
|
108
|
-
abstract sendTx(rawTx: RawTx): Promise<TxReceipt>;
|
|
109
|
-
}
|
|
110
|
-
export declare abstract class UtxoCommonAPI extends CommonAPI {
|
|
111
|
-
/**
|
|
112
|
-
* Get Utxo returns an array of unspent transaction outputs of address or xpub.
|
|
113
|
-
*
|
|
114
|
-
* @param {string} account address or xpub
|
|
115
|
-
* @param {boolean} confirmed return confirmed and/or unconfirmed transactions
|
|
116
|
-
*
|
|
117
|
-
* @returns {Promise<Array<Utxo>>} utxo list
|
|
118
|
-
*/
|
|
119
|
-
abstract getUtxo(account: string): Promise<Array<Utxo>>;
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../coinstacks/common/api/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/F,cAAc,UAAU,CAAA;AACxB,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAE1C,oBAAY,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAEpG,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAA;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,UAAU,EAAE,MAAM,CAAA;gBACN,IAAI,EAAE,MAAM,EAAE,UAAU,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;OAOG;IAEH,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;CACxD"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.UtxoCommonAPI = exports.CommonAPI = exports.ApiError = exports.intervals = exports.middleware = void 0;
|
|
26
|
-
const tsoa_1 = require("tsoa");
|
|
27
|
-
__exportStar(require("./models"), exports);
|
|
28
|
-
exports.middleware = __importStar(require("./middleware"));
|
|
29
|
-
exports.intervals = {
|
|
30
|
-
weekly: 60 * 60 * 24 * 7,
|
|
31
|
-
daily: 60 * 60 * 24,
|
|
32
|
-
hourly: 60 * 60,
|
|
33
|
-
'30min': 60 * 30,
|
|
34
|
-
'15min': 60 * 15,
|
|
35
|
-
'10min': 60 * 10,
|
|
36
|
-
'5min': 60 * 5,
|
|
37
|
-
'1min': 60 * 1,
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Generic api error for handling failed requests
|
|
41
|
-
*/
|
|
42
|
-
class ApiError extends Error {
|
|
43
|
-
constructor(name, statusCode, message) {
|
|
44
|
-
super(message);
|
|
45
|
-
this.name = name;
|
|
46
|
-
this.statusCode = statusCode;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.ApiError = ApiError;
|
|
50
|
-
/**
|
|
51
|
-
* Common API implementation which all coinstack OpenAPI Controllers must conform to.
|
|
52
|
-
*
|
|
53
|
-
* The route path is described in the comment before each api function.
|
|
54
|
-
*
|
|
55
|
-
* Typescript is unable to enforce decorators on abstract functions and also will not enforce more than the first argument for each function. Please ensure these match when adding a new coinstack api, or update all coinstack api implementations on any changes to the abstract class.
|
|
56
|
-
*/
|
|
57
|
-
class CommonAPI extends tsoa_1.Controller {
|
|
58
|
-
}
|
|
59
|
-
exports.CommonAPI = CommonAPI;
|
|
60
|
-
class UtxoCommonAPI extends CommonAPI {
|
|
61
|
-
}
|
|
62
|
-
exports.UtxoCommonAPI = UtxoCommonAPI;
|
|
63
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../coinstacks/common/api/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AAIjC,2CAAwB;AACxB,2DAA0C;AAI7B,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACxB,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;IACnB,MAAM,EAAE,EAAE,GAAG,EAAE;IACf,OAAO,EAAE,EAAE,GAAG,EAAE;IAChB,OAAO,EAAE,EAAE,GAAG,EAAE;IAChB,OAAO,EAAE,EAAE,GAAG,EAAE;IAChB,MAAM,EAAE,EAAE,GAAG,CAAC;IACd,MAAM,EAAE,EAAE,GAAG,CAAC;CACf,CAAA;AAED;;GAEG;AACH,MAAa,QAAS,SAAQ,KAAK;IAEjC,YAAY,IAAY,EAAE,UAAkB,EAAE,OAAgB;QAC5D,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;CACF;AAPD,4BAOC;AAED;;;;;;GAMG;AACH,MAAsB,SAAU,SAAQ,iBAAU;CAmGjD;AAnGD,8BAmGC;AAED,MAAsB,aAAc,SAAQ,SAAS;CAWpD;AAXD,sCAWC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { NextFunction, Response, Request } from 'express';
|
|
2
|
-
export declare function errorHandler(err: Error, req: Request, res: Response, next: NextFunction): Response | void;
|
|
3
|
-
export declare function notFoundHandler(_req: Request, res: Response): void;
|
|
4
|
-
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../../../../../coinstacks/common/api/src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAIzD,wBAAgB,YAAY,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,QAAQ,GAAG,IAAI,CA+BzG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAMlE"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.notFoundHandler = exports.errorHandler = void 0;
|
|
4
|
-
const tsoa_1 = require("tsoa");
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
function errorHandler(err, req, res, next) {
|
|
7
|
-
if (err.constructor.name === tsoa_1.ValidateError.prototype.constructor.name) {
|
|
8
|
-
const e = err;
|
|
9
|
-
console.warn(`Caught Validation Error for ${req.path}:`, e.fields);
|
|
10
|
-
return res.status(422).json({
|
|
11
|
-
message: 'Validation Failed',
|
|
12
|
-
details: e.fields,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
if (err instanceof _1.ApiError) {
|
|
16
|
-
return res.status(err.statusCode).json(JSON.parse(err.message));
|
|
17
|
-
}
|
|
18
|
-
if (err instanceof SyntaxError) {
|
|
19
|
-
return res.status(400).json({
|
|
20
|
-
message: err.message,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
if (err instanceof Error) {
|
|
24
|
-
console.error(err);
|
|
25
|
-
return res.status(500).json({
|
|
26
|
-
message: 'Internal Server Error',
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
next();
|
|
30
|
-
}
|
|
31
|
-
exports.errorHandler = errorHandler;
|
|
32
|
-
function notFoundHandler(_req, res) {
|
|
33
|
-
const err = {
|
|
34
|
-
message: 'Not Found',
|
|
35
|
-
};
|
|
36
|
-
res.status(404).send(err);
|
|
37
|
-
}
|
|
38
|
-
exports.notFoundHandler = notFoundHandler;
|
|
39
|
-
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../../../../../coinstacks/common/api/src/middleware.ts"],"names":[],"mappings":";;;AACA,+BAAoC;AACpC,wBAA2C;AAE3C,SAAgB,YAAY,CAAC,GAAU,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB;I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|
|
2
|
-
* Contains info about a 400 Bad Request response
|
|
3
|
-
*/
|
|
4
|
-
export interface BadRequestError {
|
|
5
|
-
error: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Contains info about a 404 Not Found response
|
|
9
|
-
*/
|
|
10
|
-
export interface NotFoundError {
|
|
11
|
-
message: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Contains info about a 422 Validation Error response
|
|
15
|
-
*/
|
|
16
|
-
export interface ValidationError {
|
|
17
|
-
message: 'Validation failed';
|
|
18
|
-
details: {
|
|
19
|
-
[name: string]: unknown;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Contains info about a 500 Internal Server Error response
|
|
24
|
-
*/
|
|
25
|
-
export interface InternalServerError {
|
|
26
|
-
message: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Contains token info from a given address
|
|
30
|
-
*/
|
|
31
|
-
export interface Token {
|
|
32
|
-
type: string;
|
|
33
|
-
name: string;
|
|
34
|
-
path?: string;
|
|
35
|
-
contract?: string;
|
|
36
|
-
transfers: number;
|
|
37
|
-
symbol?: string;
|
|
38
|
-
decimals?: number;
|
|
39
|
-
balance?: string;
|
|
40
|
-
totalReceived?: string;
|
|
41
|
-
totalSent?: string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Contains info about an addresses balance
|
|
45
|
-
*/
|
|
46
|
-
export interface Balance {
|
|
47
|
-
network: string;
|
|
48
|
-
symbol: string;
|
|
49
|
-
address: string;
|
|
50
|
-
balance: string;
|
|
51
|
-
totalReceived?: string;
|
|
52
|
-
totalSent?: string;
|
|
53
|
-
unconfirmedBalance: string;
|
|
54
|
-
unconfirmedTxs: number;
|
|
55
|
-
txs: number;
|
|
56
|
-
tokens: Token[];
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Contains info about a balance change
|
|
60
|
-
*/
|
|
61
|
-
export interface BalanceChange {
|
|
62
|
-
timestamp: number;
|
|
63
|
-
amount: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Contains info about a block
|
|
67
|
-
*/
|
|
68
|
-
export interface Block {
|
|
69
|
-
network: string;
|
|
70
|
-
hash: string;
|
|
71
|
-
prevHash?: string;
|
|
72
|
-
nextHash?: string;
|
|
73
|
-
height: number;
|
|
74
|
-
confirmations: number;
|
|
75
|
-
timestamp?: number;
|
|
76
|
-
txs: number;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Contains ethereum specific transaction data
|
|
80
|
-
*/
|
|
81
|
-
export interface EthereumSpecific {
|
|
82
|
-
status: number;
|
|
83
|
-
nonce: number;
|
|
84
|
-
gasLimit: number;
|
|
85
|
-
gasUsed: number;
|
|
86
|
-
gasPrice: string;
|
|
87
|
-
data?: string;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Contains info for pagination
|
|
91
|
-
*/
|
|
92
|
-
export interface Pagination {
|
|
93
|
-
page: number;
|
|
94
|
-
totalPages: number;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Contains the serialized raw transaction hex
|
|
98
|
-
*/
|
|
99
|
-
export interface RawTx {
|
|
100
|
-
hex: string;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Contains info about a token transfer done in a transaction
|
|
104
|
-
*/
|
|
105
|
-
export interface TokenTransfer {
|
|
106
|
-
type: string;
|
|
107
|
-
from: string;
|
|
108
|
-
to: string;
|
|
109
|
-
token: string;
|
|
110
|
-
name: string;
|
|
111
|
-
symbol: string;
|
|
112
|
-
decimals: number;
|
|
113
|
-
value: string;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Contains info about a transaction
|
|
117
|
-
*/
|
|
118
|
-
export interface Tx {
|
|
119
|
-
network: string;
|
|
120
|
-
symbol: string;
|
|
121
|
-
txid: string;
|
|
122
|
-
status: string;
|
|
123
|
-
blockHash?: string;
|
|
124
|
-
blockHeight?: number;
|
|
125
|
-
confirmations?: number;
|
|
126
|
-
timestamp?: number;
|
|
127
|
-
from: string;
|
|
128
|
-
to?: string;
|
|
129
|
-
value: string;
|
|
130
|
-
fee: string;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Contains paginated transaction history
|
|
134
|
-
*/
|
|
135
|
-
export interface TxHistory extends Pagination {
|
|
136
|
-
txs: number;
|
|
137
|
-
transactions: Array<Tx>;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Contains info about a successfully sent transaction
|
|
141
|
-
*/
|
|
142
|
-
export interface TxReceipt {
|
|
143
|
-
network: string;
|
|
144
|
-
txid: string;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Contains info about an unspent transaction output
|
|
148
|
-
*/
|
|
149
|
-
export interface Utxo {
|
|
150
|
-
txid: string;
|
|
151
|
-
vout: number;
|
|
152
|
-
value: string;
|
|
153
|
-
height?: number;
|
|
154
|
-
confirmations: number;
|
|
155
|
-
address?: string;
|
|
156
|
-
path?: string;
|
|
157
|
-
locktime?: number;
|
|
158
|
-
coinbase?: boolean;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Contains info about single transaction input
|
|
162
|
-
*/
|
|
163
|
-
export interface Vin {
|
|
164
|
-
txid?: string;
|
|
165
|
-
vout?: number;
|
|
166
|
-
sequence?: number;
|
|
167
|
-
n: number;
|
|
168
|
-
addresses?: Array<string>;
|
|
169
|
-
isAddress: boolean;
|
|
170
|
-
value?: string;
|
|
171
|
-
hex?: string;
|
|
172
|
-
asm?: string;
|
|
173
|
-
coinbase?: string;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Contains info about single transaction output
|
|
177
|
-
*/
|
|
178
|
-
export interface Vout {
|
|
179
|
-
value?: string;
|
|
180
|
-
n: number;
|
|
181
|
-
spent?: boolean;
|
|
182
|
-
spentTxId?: string;
|
|
183
|
-
spentIndex?: number;
|
|
184
|
-
spentHeight?: number;
|
|
185
|
-
hex?: string;
|
|
186
|
-
asm?: string;
|
|
187
|
-
addresses: Array<string>;
|
|
188
|
-
isAddress: boolean;
|
|
189
|
-
type?: string;
|
|
190
|
-
}
|
|
191
|
-
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../../coinstacks/common/api/src/models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,mBAAmB,CAAA;IAC5B,OAAO,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SA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