UNPKG

810 BJavaScriptView Raw
1/**
2 * Coin utility
3 * This is the base abstract class, instanciate via AmonLib.coins only
4 */
5class CoinHelper {
6
7 /**
8 *
9 * @param opts
10 */
11 constructor(opts) {
12 this.opts = opts;
13 }
14
15 /**
16 * get uri prefix
17 * @return str prefix
18 */
19 getURIPrefix() {
20 throw new Error('not implemented');
21 }
22 /**
23 * Validate blockchain address
24 * @return bool valid
25 */
26 validAddress(address) {
27 throw new Error('not implemented');
28 }
29
30 /**
31 * Get URL of block explorer for an address
32 * @return string URL
33 */
34 addressExplorerUrl(address) {
35 throw new Error('not implemented');
36 }
37
38 /**
39 * Get URL of block explorer for a transaction
40 * @return string URL
41 */
42 txExplorerUrl(txId) {
43 throw new Error('not implemented');
44 }
45
46}
47
48module.exports = CoinHelper;