edge-currency-plugins 3.4.5 → 3.5.1

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.
Files changed (55) hide show
  1. package/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +50 -48
  2. package/lib/common/plugin/CurrencyPlugin.js +23 -11
  3. package/lib/common/plugin/EngineEmitter.js +27 -3
  4. package/lib/common/plugin/PluginState.js +31 -38
  5. package/lib/common/plugin/ServerScores.js +7 -0
  6. package/lib/common/plugin/types.js +5 -3
  7. package/lib/common/utxobased/db/Models/TransactionData.js +6 -0
  8. package/lib/common/utxobased/engine/UtxoEngine.js +55 -35
  9. package/lib/common/utxobased/engine/UtxoEngineProcessor.js +91 -43
  10. package/lib/common/utxobased/info/badcoin.js +3 -1
  11. package/lib/common/utxobased/info/bitcoin.js +3 -1
  12. package/lib/common/utxobased/info/bitcoincash.js +3 -1
  13. package/lib/common/utxobased/info/bitcoincashtestnet.js +3 -1
  14. package/lib/common/utxobased/info/bitcoingold.js +3 -1
  15. package/lib/common/utxobased/info/bitcoingoldtestnet.js +3 -1
  16. package/lib/common/utxobased/info/bitcoinsv.js +3 -1
  17. package/lib/common/utxobased/info/bitcointestnet.js +3 -1
  18. package/lib/common/utxobased/info/dash.js +3 -1
  19. package/lib/common/utxobased/info/digibyte.js +3 -1
  20. package/lib/common/utxobased/info/dogecoin.js +3 -1
  21. package/lib/common/utxobased/info/eboost.js +3 -1
  22. package/lib/common/utxobased/info/feathercoin.js +3 -1
  23. package/lib/common/utxobased/info/groestlcoin.js +3 -1
  24. package/lib/common/utxobased/info/litecoin.js +3 -1
  25. package/lib/common/utxobased/info/qtum.js +3 -1
  26. package/lib/common/utxobased/info/ravencoin.js +3 -1
  27. package/lib/common/utxobased/info/smartcash.js +3 -1
  28. package/lib/common/utxobased/info/ufo.js +3 -1
  29. package/lib/common/utxobased/info/vertcoin.js +3 -1
  30. package/lib/common/utxobased/info/zcoin.js +4 -2
  31. package/lib/common/utxobased/network/blockbookApi.js +1 -1
  32. package/lib/src/common/plugin/EngineEmitter.d.ts +6 -3
  33. package/lib/src/common/plugin/PluginState.d.ts +7 -4
  34. package/lib/src/common/plugin/ServerScores.d.ts +1 -0
  35. package/lib/src/common/plugin/types.d.ts +8 -4
  36. package/lib/src/common/utxobased/engine/UtxoEngineProcessor.d.ts +6 -10
  37. package/package.json +2 -2
  38. package/lib/bch.js +0 -15
  39. package/lib/bsv.js +0 -15
  40. package/lib/btc.js +0 -15
  41. package/lib/firo.js +0 -15
  42. package/lib/ftc.js +0 -15
  43. package/lib/ltc.js +0 -15
  44. package/lib/src/bch.d.ts +0 -3
  45. package/lib/src/bsv.d.ts +0 -3
  46. package/lib/src/btc.d.ts +0 -3
  47. package/lib/src/firo.d.ts +0 -3
  48. package/lib/src/ftc.d.ts +0 -3
  49. package/lib/src/ltc.d.ts +0 -3
  50. package/lib/src/tbch.d.ts +0 -3
  51. package/lib/src/tbtc.d.ts +0 -3
  52. package/lib/src/tbtg.d.ts +0 -3
  53. package/lib/tbch.js +0 -15
  54. package/lib/tbtc.js +0 -15
  55. package/lib/tbtg.js +0 -15
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
9
9
  var _commonInfo = require('./commonInfo');
10
10
 
11
11
  const currencyInfo = {
12
+ assetDisplayName: 'Firo',
13
+ chainDisplayName: 'Firo',
12
14
  currencyCode: 'FIRO',
13
15
  customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
14
- displayName: 'Firo',
15
16
  memoOptions: _commonInfo.utxoMemoOptions,
16
17
  pluginId: 'zcoin',
17
18
  walletType: 'wallet:zcoin',
@@ -31,12 +32,13 @@ var _commonInfo = require('./commonInfo');
31
32
  defaultSettings: {
32
33
  customFeeSettings: ['satPerByte'],
33
34
  blockbookServers: [
34
- 'wss://blockbook.firo.org',
35
+ // 'wss://blockbook.firo.org',
35
36
  'wss://firo-wusa1.edge.app',
36
37
  'wss://firo.nownodes.io/wss/%{nowNodesApiKey}'
37
38
  ],
38
39
  enableCustomServers: false
39
40
  },
41
+ displayName: 'Firo',
40
42
  metaTokens: []
41
43
  }; exports.currencyInfo = currencyInfo
42
44
 
@@ -200,7 +200,7 @@ var _cleaners = require('cleaners');
200
200
  bestHash: _cleaners.asString,
201
201
  block0Hash: _cleaners.asString,
202
202
  testnet: _cleaners.asBoolean,
203
- backend: _cleaners.asOptional.call(void 0,
203
+ backend: _cleaners.asMaybe.call(void 0,
204
204
  _cleaners.asObject.call(void 0, {
205
205
  version: _cleaners.asString,
206
206
  subversion: _cleaners.asString
@@ -1,13 +1,13 @@
1
1
  /// <reference types="node" />
2
- import { EdgeCurrencyEngineCallbacks, EdgeTransaction, EdgeTxidMap } from 'edge-core-js/types';
2
+ import { EdgeCurrencyEngineCallbacks, EdgeTransaction, EdgeTransactionEvent, EdgeTxidMap } from 'edge-core-js/types';
3
3
  import { EventEmitter } from 'events';
4
4
  import { SubscribeAddressResponse } from '../utxobased/network/blockbookApi';
5
5
  export declare interface EngineEmitter {
6
- emit: ((event: EngineEvent.TRANSACTIONS_CHANGED, transactions: EdgeTransaction[]) => boolean) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, currencyCode: string, addressBalanceChanges: Array<{
6
+ emit: ((event: EngineEvent.SEEN_TX_CHECKPOINT, checkpoint: string) => boolean) & ((event: EngineEvent.TRANSACTIONS, transactionEvents: EdgeTransactionEvent[]) => boolean) & ((event: EngineEvent.TRANSACTIONS_CHANGED, transactions: EdgeTransaction[]) => boolean) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, currencyCode: string, addressBalanceChanges: Array<{
7
7
  scriptPubkey: string;
8
8
  balance: string;
9
9
  }>) => boolean) & ((event: EngineEvent.WALLET_BALANCE_CHANGED, currencyCode: string, nativeBalance: string) => boolean) & ((event: EngineEvent.BLOCK_HEIGHT_CHANGED, uri: string, blockHeight: number) => boolean) & ((event: EngineEvent.NEW_ADDRESS_TRANSACTION, uri: string, newTx: SubscribeAddressResponse) => boolean) & ((event: EngineEvent.ADDRESSES_CHECKED, progressRatio: number) => boolean) & ((event: EngineEvent.TXIDS_CHANGED, txids: EdgeTxidMap) => boolean);
10
- on: ((event: EngineEvent.TRANSACTIONS_CHANGED, listener: (transactions: EdgeTransaction[]) => Promise<void> | void) => this) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, listener: (currencyCode: string, addressBalanceChanges: Array<{
10
+ on: ((event: EngineEvent.SEEN_TX_CHECKPOINT, listener: (checkpoint: string) => Promise<void> | void) => this) & ((event: EngineEvent.TRANSACTIONS, listener: (transactionEvents: EdgeTransactionEvent[]) => Promise<void> | void) => boolean) & ((event: EngineEvent.TRANSACTIONS_CHANGED, listener: (transactions: EdgeTransaction[]) => Promise<void> | void) => this) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, listener: (currencyCode: string, addressBalanceChanges: Array<{
11
11
  scriptPubkey: string;
12
12
  balance: string;
13
13
  }>) => Promise<void> | void) => this) & ((event: EngineEvent.WALLET_BALANCE_CHANGED, listener: (currencyCode: string, nativeBalance: string) => Promise<void> | void) => this) & ((event: EngineEvent.BLOCK_HEIGHT_CHANGED, listener: (uri: string, blockHeight: number) => Promise<void> | void) => this) & ((event: EngineEvent.NEW_ADDRESS_TRANSACTION, listener: (uri: string, newTx: SubscribeAddressResponse) => Promise<void> | void) => this) & ((event: EngineEvent.ADDRESSES_CHECKED, listener: (progressRatio: number) => Promise<void> | void) => this) & ((event: EngineEvent.TXIDS_CHANGED, listener: (txids: EdgeTxidMap) => Promise<void> | void) => this);
@@ -15,6 +15,9 @@ export declare interface EngineEmitter {
15
15
  export declare class EngineEmitter extends EventEmitter {
16
16
  }
17
17
  export declare enum EngineEvent {
18
+ SEEN_TX_CHECKPOINT = "seen:tx:checkpoint",
19
+ TRANSACTIONS = "transactions",
20
+ /** @deprecated Use TRANSACTIONS */
18
21
  TRANSACTIONS_CHANGED = "transactions:changed",
19
22
  WALLET_BALANCE_CHANGED = "wallet:balance:changed",
20
23
  ADDRESS_BALANCE_CHANGED = "address:balance:changed",
@@ -2,6 +2,7 @@ import { Disklet } from 'disklet';
2
2
  import { EdgeIo, EdgeLog } from 'edge-core-js/types';
3
3
  import { UtxoUserSettings } from '../utxobased/engine/types';
4
4
  import { UtxoEngineProcessor } from '../utxobased/engine/UtxoEngineProcessor';
5
+ import { InfoPayload } from './types';
5
6
  /** A JSON object (as opposed to an array or primitive). */
6
7
  interface JsonObject {
7
8
  [name: string]: unknown;
@@ -11,14 +12,16 @@ interface JsonObject {
11
12
  * Engine plugins are responsible for keeping it up to date.
12
13
  */
13
14
  export interface PluginStateSettings {
14
- io: EdgeIo;
15
- defaultSettings: UtxoUserSettings;
16
15
  currencyCode: string;
17
- pluginId: string;
18
- pluginDisklet: Disklet;
16
+ defaultSettings: UtxoUserSettings;
17
+ infoPayload: InfoPayload | undefined;
18
+ io: EdgeIo;
19
19
  log: EdgeLog;
20
+ pluginDisklet: Disklet;
21
+ pluginId: string;
20
22
  }
21
23
  export interface PluginState {
24
+ infoPayload: InfoPayload | undefined;
22
25
  addEngine: (engineProcessor: UtxoEngineProcessor) => void;
23
26
  removeEngine: (engineProcessor: UtxoEngineProcessor) => void;
24
27
  dumpData: () => JsonObject;
@@ -58,5 +58,6 @@ export declare class ServerScores {
58
58
  serverScoreDown(servers: ServerList, serverUrl: string, changeScore?: number): void;
59
59
  setResponseTime(servers: ServerList, serverUrl: string, responseTimeMilliseconds: number): void;
60
60
  getServers(servers: ServerList, numServersWanted: number, includePatterns?: Array<string | RegExp>): string[];
61
+ removeServers(servers: ServerList, serverUrls: string[]): void;
61
62
  }
62
63
  export {};
@@ -268,14 +268,12 @@ export interface EngineConfig {
268
268
  pluginInfo: PluginInfo;
269
269
  pluginDisklet: Disklet;
270
270
  currencyTools: EdgeCurrencyTools;
271
- options: EngineOptions;
271
+ engineOptions: EdgeCurrencyEngineOptions;
272
+ emitter: EngineEmitter;
272
273
  initOptions: UtxoInitOptions;
273
274
  io: EdgeIo;
274
275
  pluginState: PluginState;
275
276
  }
276
- export interface EngineOptions extends EdgeCurrencyEngineOptions {
277
- emitter: EngineEmitter;
278
- }
279
277
  export declare type LocalWalletMetadata = ReturnType<typeof asLocalWalletMetadata>;
280
278
  export declare const asLocalWalletMetadata: import("cleaners").ObjectCleaner<{
281
279
  balance: string;
@@ -284,4 +282,10 @@ export declare const asLocalWalletMetadata: import("cleaners").ObjectCleaner<{
284
282
  };
285
283
  lastSeenBlockHeight: number;
286
284
  }>;
285
+ export declare const asInfoPayload: import("cleaners").ObjectCleaner<{
286
+ blockbookServers: {
287
+ [keys: string]: boolean;
288
+ };
289
+ }>;
290
+ export declare type InfoPayload = ReturnType<typeof asInfoPayload>;
287
291
  export {};
@@ -2,7 +2,7 @@ import { EdgeFreshAddress, EdgeIo, EdgeLog, EdgeTransaction } from 'edge-core-js
2
2
  import { EngineEmitter } from '../../plugin/EngineEmitter';
3
3
  import { ChangePath, CurrencyFormat, EngineConfig, PluginInfo } from '../../plugin/types';
4
4
  import { DataLayer } from '../db/DataLayer';
5
- import { AddressData, TransactionData, UtxoData } from '../db/types';
5
+ import { AddressData, UtxoData } from '../db/types';
6
6
  import { SafeWalletInfo } from '../keymanager/cleaners';
7
7
  import { AddressResponse, AddressUtxosResponse, BlockbookAccountUtxo, TransactionResponse } from '../network/blockbookApi';
8
8
  import { WsTask } from '../network/Socket';
@@ -27,9 +27,10 @@ export interface UtxoEngineProcessor {
27
27
  processUtxos: (utxos: UtxoData[]) => Promise<void>;
28
28
  }
29
29
  export interface UtxoEngineProcessorConfig extends EngineConfig {
30
+ dataLayer: DataLayer;
31
+ seenTxCheckpoint: (value?: string) => string | undefined;
30
32
  walletTools: UtxoWalletTools;
31
33
  walletInfo: SafeWalletInfo;
32
- dataLayer: DataLayer;
33
34
  }
34
35
  export declare function makeUtxoEngineProcessor(config: UtxoEngineProcessorConfig): UtxoEngineProcessor;
35
36
  interface CommonParams {
@@ -40,8 +41,11 @@ interface CommonParams {
40
41
  emitter: EngineEmitter;
41
42
  taskCache: TaskCache;
42
43
  updateProgressRatio: () => void;
44
+ updateSeenTxCheckpoint: () => void;
43
45
  io: EdgeIo;
44
46
  log: EdgeLog;
47
+ maxSeenTxBlockHeight: number;
48
+ seenTxCheckpoint: (value?: string) => string | undefined;
45
49
  serverStates: ServerStates;
46
50
  walletFormats: CurrencyFormat[];
47
51
  lock: AwaitLock;
@@ -102,14 +106,6 @@ interface TransactionUpdateCache {
102
106
  processing: boolean;
103
107
  };
104
108
  }
105
- export declare const transactionChanged: (args: {
106
- dataLayer: DataLayer;
107
- emitter: EngineEmitter;
108
- pluginInfo: PluginInfo;
109
- tx: TransactionData;
110
- walletTools: UtxoWalletTools;
111
- walletId: string;
112
- }) => Promise<void>;
113
109
  /**
114
110
  * The pickNextTask generator is responsible for selecting the next WsTask
115
111
  * to be done by the network layer. It will yield WsTasks or booleans for early
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-currency-plugins",
3
- "version": "3.4.5",
3
+ "version": "3.5.1",
4
4
  "description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
5
5
  "homepage": "https://edge.app/",
6
6
  "repository": "https://github.com/EdgeApp/edge-currency-plugins",
@@ -87,7 +87,7 @@
87
87
  "base-x": "^4.0.0",
88
88
  "chai": "^4.2.0",
89
89
  "chai-as-promised": "^7.1.1",
90
- "edge-core-js": "^2.7.0",
90
+ "edge-core-js": "^2.24.0",
91
91
  "esbuild-loader": "^4.1.0",
92
92
  "eslint": "^7.14.0",
93
93
  "eslint-config-standard-kit": "0.15.1",
package/lib/bch.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _bitcoincash = require('./common/utxobased/info/bitcoincash');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoincash.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_bitcoincash.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/bsv.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _bitcoinsv = require('./common/utxobased/info/bitcoinsv');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoinsv.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_bitcoinsv.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/btc.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _bitcoin = require('./common/utxobased/info/bitcoin');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoin.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_bitcoin.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/firo.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _zcoin = require('./common/utxobased/info/zcoin');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _zcoin.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_zcoin.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/ftc.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _feathercoin = require('./common/utxobased/info/feathercoin');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _feathercoin.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_feathercoin.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/ltc.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _litecoin = require('./common/utxobased/info/litecoin');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _litecoin.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_litecoin.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/src/bch.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/bsv.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/btc.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/firo.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/ftc.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/ltc.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/tbch.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/tbtc.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/src/tbtg.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { EdgeCorePluginOptions, EdgeCurrencyPlugin } from 'edge-core-js/types';
2
- declare const plugin: (options: EdgeCorePluginOptions) => EdgeCurrencyPlugin;
3
- export default plugin;
package/lib/tbch.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _bitcoincashtestnet = require('./common/utxobased/info/bitcoincashtestnet');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoincashtestnet.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_bitcoincashtestnet.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/tbtc.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _bitcointestnet = require('./common/utxobased/info/bitcointestnet');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcointestnet.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_bitcointestnet.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin
package/lib/tbtg.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
- var _bitcoingoldtestnet = require('./common/utxobased/info/bitcoingoldtestnet');
5
-
6
- const plugin = (options) =>
7
- _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoingoldtestnet.info)
8
-
9
- if (typeof window !== 'undefined') {
10
- _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
11
- [_bitcoingoldtestnet.info.currencyInfo.pluginId]: plugin
12
- })])
13
- }
14
-
15
- exports. default = plugin