edge-currency-plugins 2.5.4 → 2.6.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 (74) hide show
  1. package/lib/bch.js +2 -2
  2. package/lib/bsv.js +2 -2
  3. package/lib/btc.js +2 -2
  4. package/lib/common/plugin/{makeCurrencyPlugin.js → CurrencyPlugin.js} +13 -9
  5. package/lib/common/plugin/{makeMetadata.js → Metadata.js} +4 -4
  6. package/lib/common/plugin/{pluginState.js → PluginState.js} +6 -6
  7. package/lib/common/plugin/{serverScores.js → ServerScores.js} +8 -1
  8. package/lib/common/plugin/types.js +8 -0
  9. package/lib/common/utxobased/db/{makeProcessor.js → Processor.js} +63 -29
  10. package/lib/common/utxobased/engine/{makeServerStates.js → ServerStates.js} +140 -45
  11. package/lib/common/utxobased/engine/{makeUtxoEngine.js → UtxoEngine.js} +18 -18
  12. package/lib/common/utxobased/engine/{makeUtxoEngineState.js → UtxoEngineState.js} +27 -22
  13. package/lib/common/utxobased/engine/types.js +5 -0
  14. package/lib/common/utxobased/info/bitcoin.js +6 -0
  15. package/lib/common/utxobased/info/bitcoincash.js +6 -0
  16. package/lib/common/utxobased/info/dash.js +6 -0
  17. package/lib/common/utxobased/info/digibyte.js +6 -0
  18. package/lib/common/utxobased/info/dogecoin.js +6 -0
  19. package/lib/common/utxobased/info/groestlcoin.js +6 -0
  20. package/lib/common/utxobased/info/litecoin.js +6 -0
  21. package/lib/common/utxobased/network/{BlockBook.js → Blockbook.js} +28 -24
  22. package/lib/common/utxobased/network/Socket.js +4 -4
  23. package/lib/firo.js +2 -2
  24. package/lib/ftc.js +2 -2
  25. package/lib/index.js +2 -2
  26. package/lib/ltc.js +2 -2
  27. package/lib/src/common/plugin/{makeEngineEmitter.d.ts → EngineEmitter.d.ts} +1 -1
  28. package/lib/src/common/plugin/{makeMetadata.d.ts → Metadata.d.ts} +1 -1
  29. package/lib/src/common/plugin/{pluginState.d.ts → PluginState.d.ts} +2 -2
  30. package/lib/src/common/plugin/{serverScores.d.ts → ServerScores.d.ts} +1 -1
  31. package/lib/src/common/plugin/types.d.ts +9 -2
  32. package/lib/src/common/utxobased/db/Models/ProcessorTransaction.d.ts +3 -3
  33. package/lib/src/common/utxobased/db/util/utxo.d.ts +1 -1
  34. package/lib/src/common/utxobased/engine/{makeServerStates.d.ts → ServerStates.d.ts} +8 -5
  35. package/lib/src/common/utxobased/engine/{makeUtxoEngineState.d.ts → UtxoEngineState.d.ts} +9 -9
  36. package/lib/src/common/utxobased/engine/{makeUtxoWalletTools.d.ts → UtxoWalletTools.d.ts} +2 -2
  37. package/lib/src/common/utxobased/engine/types.d.ts +4 -0
  38. package/lib/src/common/utxobased/engine/util/getOwnUtxosFromTx.d.ts +1 -1
  39. package/lib/src/common/utxobased/network/{BlockBook.d.ts → Blockbook.d.ts} +10 -10
  40. package/lib/src/common/utxobased/network/Socket.d.ts +1 -1
  41. package/lib/tbch.js +2 -2
  42. package/lib/tbtc.js +2 -2
  43. package/lib/tbtg.js +2 -2
  44. package/package.json +3 -3
  45. /package/lib/common/plugin/{makeCurrencyTools.js → CurrencyTools.js} +0 -0
  46. /package/lib/common/plugin/{makeEngineEmitter.js → EngineEmitter.js} +0 -0
  47. /package/lib/common/utxobased/db/{makeBaselets.js → Baselets.js} +0 -0
  48. /package/lib/common/utxobased/db/{makeMutex.js → Mutex.js} +0 -0
  49. /package/lib/common/utxobased/engine/{makeUtxoWalletTools.js → UtxoWalletTools.js} +0 -0
  50. /package/lib/common/utxobased/network/{MakeSocketEmitter.js → SocketEmitter.js} +0 -0
  51. /package/lib/common/utxobased/network/{BlockBookAPI.js → blockbookApi.js} +0 -0
  52. /package/lib/src/common/plugin/{makeCurrencyPlugin.d.ts → CurrencyPlugin.d.ts} +0 -0
  53. /package/lib/src/common/plugin/{makeCurrencyTools.d.ts → CurrencyTools.d.ts} +0 -0
  54. /package/lib/src/common/utxobased/db/{makeBaselets.d.ts → Baselets.d.ts} +0 -0
  55. /package/lib/src/common/utxobased/db/{makeMutex.d.ts → Mutex.d.ts} +0 -0
  56. /package/lib/src/common/utxobased/db/{makeProcessor.d.ts → Processor.d.ts} +0 -0
  57. /package/lib/src/common/utxobased/engine/{makeUtxoEngine.d.ts → UtxoEngine.d.ts} +0 -0
  58. /package/lib/src/common/utxobased/network/{MakeSocketEmitter.d.ts → SocketEmitter.d.ts} +0 -0
  59. /package/lib/src/common/utxobased/network/{BlockBookAPI.d.ts → blockbookApi.d.ts} +0 -0
  60. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/common.d.ts +0 -0
  61. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/bitcoin.d.ts +0 -0
  62. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/bitcoincash.d.ts +0 -0
  63. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/bitcoinsv.d.ts +0 -0
  64. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/digibyte.d.ts +0 -0
  65. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/feathercoin.d.ts +0 -0
  66. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/groestlcoin.d.ts +0 -0
  67. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/litecoin.d.ts +0 -0
  68. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/smartcash.d.ts +0 -0
  69. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/currencies/zcoin.d.ts +0 -0
  70. /package/lib/test/common/plugin/{currencyPlugin.fixtures → CurrencyPlugin.fixtures}/index.d.ts +0 -0
  71. /package/lib/test/common/plugin/{currencyPlugin.spec.d.ts → CurrencyPlugin.spec.d.ts} +0 -0
  72. /package/lib/test/common/plugin/{makeMetadata.spec.d.ts → Metadata.spec.d.ts} +0 -0
  73. /package/lib/test/common/plugin/{serverScores.spec.d.ts → ServerScores.spec.d.ts} +0 -0
  74. /package/lib/test/common/utxobased/network/{BlockBook.spec.d.ts → Blockbook.spec.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { Disklet } from 'disklet';
2
2
  import { EdgeLog } from 'edge-core-js/types';
3
- import { EngineEmitter } from './makeEngineEmitter';
3
+ import { EngineEmitter } from './EngineEmitter';
4
4
  import { LocalWalletMetadata } from './types';
5
5
  interface MetadataConfig {
6
6
  disklet: Disklet;
@@ -1,7 +1,7 @@
1
1
  import { Disklet } from 'disklet';
2
2
  import { EdgeIo, EdgeLog } from 'edge-core-js/types';
3
- import { UtxoEngineState } from '../utxobased/engine/makeUtxoEngineState';
4
3
  import { UtxoUserSettings } from '../utxobased/engine/types';
4
+ import { UtxoEngineState } from '../utxobased/engine/UtxoEngineState';
5
5
  /** A JSON object (as opposed to an array or primitive). */
6
6
  interface JsonObject {
7
7
  [name: string]: unknown;
@@ -26,7 +26,7 @@ export interface PluginState {
26
26
  serverScoreDown: (uri: string) => void;
27
27
  serverScoreUp: (uri: string, score: number) => void;
28
28
  clearCache: () => Promise<void>;
29
- getLocalServers: (numServersWanted: number, includePatterns: string[]) => string[];
29
+ getLocalServers: (numServersWanted: number, includePatterns?: Array<string | RegExp>) => string[];
30
30
  refreshServers: () => Promise<void>;
31
31
  updateServers: (settings: UtxoUserSettings) => Promise<void>;
32
32
  }
@@ -56,6 +56,6 @@ export declare class ServerScores {
56
56
  serverScoreUp(servers: ServerList, serverUrl: string, responseTimeMilliseconds: number, changeScore?: number): void;
57
57
  serverScoreDown(servers: ServerList, serverUrl: string, changeScore?: number): void;
58
58
  setResponseTime(servers: ServerList, serverUrl: string, responseTimeMilliseconds: number): void;
59
- getServers(servers: ServerList, numServersWanted: number, includePatterns?: string[]): string[];
59
+ getServers(servers: ServerList, numServersWanted: number, includePatterns?: Array<string | RegExp>): string[];
60
60
  }
61
61
  export {};
@@ -6,10 +6,11 @@ import { Disklet } from 'disklet';
6
6
  import { EdgeCurrencyEngineOptions, EdgeCurrencyInfo, EdgeCurrencyTools, EdgeIo, EdgeParsedUri, EdgeWalletInfo } from 'edge-core-js/types';
7
7
  import * as wif from 'wif';
8
8
  import { IProcessorTransaction, IUTXO } from '../utxobased/db/types';
9
+ import { UtxoInitOptions } from '../utxobased/engine/types';
9
10
  import { ScriptTemplates } from '../utxobased/info/scriptTemplates/types';
10
11
  import { UtxoPicker } from '../utxobased/keymanager/utxopicker';
11
- import { EngineEmitter } from './makeEngineEmitter';
12
- import { PluginState } from './pluginState';
12
+ import { EngineEmitter } from './EngineEmitter';
13
+ import { PluginState } from './PluginState';
13
14
  export declare type CurrencyFormat = ReturnType<typeof asCurrencyFormat>;
14
15
  export declare const asCurrencyFormat: Cleaner<"bip32" | "bip44" | "bip49" | "bip84">;
15
16
  export interface ChangePath {
@@ -42,9 +43,14 @@ export interface EngineInfo {
42
43
  mempoolSpaceFeeInfoServer?: string;
43
44
  defaultFeeInfo: FeeInfo;
44
45
  scriptTemplates?: ScriptTemplates;
46
+ serverConfigs?: ServerConfig[];
45
47
  asBlockbookAddress?: Cleaner<string>;
46
48
  txSpecificHandling?: (tx: IProcessorTransaction, specialTx: unknown) => IProcessorTransaction;
47
49
  }
50
+ export interface ServerConfig {
51
+ type: 'blockbook-nownode';
52
+ uris: string[];
53
+ }
48
54
  /**
49
55
  * Coin Info
50
56
  */
@@ -124,6 +130,7 @@ export interface EngineConfig {
124
130
  pluginDisklet: Disklet;
125
131
  currencyTools: EdgeCurrencyTools;
126
132
  options: EngineOptions;
133
+ initOptions: UtxoInitOptions;
127
134
  io: EdgeIo;
128
135
  pluginState: PluginState;
129
136
  }
@@ -1,13 +1,13 @@
1
1
  import { EdgeTransaction } from 'edge-core-js/types';
2
2
  import { PluginInfo } from '../../../plugin/types';
3
- import { UTXOPluginWalletTools } from '../../engine/makeUtxoWalletTools';
4
- import { Processor } from '../makeProcessor';
3
+ import { UtxoWalletTools } from '../../engine/UtxoWalletTools';
4
+ import { Processor } from '../Processor';
5
5
  import { IProcessorTransaction } from '../types';
6
6
  export declare const fromEdgeTransaction: (tx: EdgeTransaction) => IProcessorTransaction;
7
7
  interface ToEdgeTransactionArgs {
8
8
  walletId: string;
9
9
  tx: IProcessorTransaction;
10
- walletTools: UTXOPluginWalletTools;
10
+ walletTools: UtxoWalletTools;
11
11
  processor: Processor;
12
12
  pluginInfo: PluginInfo;
13
13
  }
@@ -1,3 +1,3 @@
1
- import { Processor } from '../makeProcessor';
1
+ import { Processor } from '../Processor';
2
2
  import { IProcessorTransaction, IUTXO } from '../types';
3
3
  export declare const utxoFromProcessorTransactionInput: (processor: Processor, processorTransaction: IProcessorTransaction, inputIndex: number) => Promise<IUTXO>;
@@ -1,13 +1,14 @@
1
- import { EdgeLog, EdgeTransaction } from 'edge-core-js/types';
2
- import { EngineEmitter } from '../../plugin/makeEngineEmitter';
3
- import { PluginState } from '../../plugin/pluginState';
1
+ import { EdgeIo, EdgeLog, EdgeTransaction } from 'edge-core-js/types';
2
+ import { EngineEmitter } from '../../plugin/EngineEmitter';
3
+ import { PluginState } from '../../plugin/PluginState';
4
4
  import { PluginInfo } from '../../plugin/types';
5
5
  import { SafeWalletInfo } from '../keymanager/cleaners';
6
- import { BlockBook } from '../network/BlockBook';
6
+ import { Blockbook } from '../network/Blockbook';
7
7
  import Deferred from '../network/Deferred';
8
8
  import { WsTask } from '../network/Socket';
9
+ import { UtxoInitOptions } from './types';
9
10
  interface ServerState {
10
- blockbook: BlockBook;
11
+ blockbook: Blockbook;
11
12
  blockSubscriptionStatus: 'unsubscribed' | 'subscribing' | 'subscribed';
12
13
  blockHeight: number;
13
14
  txids: Set<string>;
@@ -15,6 +16,8 @@ interface ServerState {
15
16
  }
16
17
  interface ServerStateConfig {
17
18
  engineEmitter: EngineEmitter;
19
+ initOptions: UtxoInitOptions;
20
+ io: EdgeIo;
18
21
  log: EdgeLog;
19
22
  pluginInfo: PluginInfo;
20
23
  pluginState: PluginState;
@@ -1,15 +1,15 @@
1
1
  import { EdgeFreshAddress, EdgeIo, EdgeLog, EdgeTransaction } from 'edge-core-js/types';
2
- import { EngineEmitter } from '../../plugin/makeEngineEmitter';
3
- import { PluginState } from '../../plugin/pluginState';
2
+ import { EngineEmitter } from '../../plugin/EngineEmitter';
3
+ import { PluginState } from '../../plugin/PluginState';
4
4
  import { ChangePath, CurrencyFormat, EngineConfig, PluginInfo } from '../../plugin/types';
5
- import { Processor } from '../db/makeProcessor';
5
+ import { Processor } from '../db/Processor';
6
6
  import { IAddress, IProcessorTransaction, IUTXO } from '../db/types';
7
7
  import { SafeWalletInfo } from '../keymanager/cleaners';
8
- import { BlockbookAccountUtxo } from '../network/BlockBookAPI';
8
+ import { BlockbookAccountUtxo } from '../network/blockbookApi';
9
9
  import { WsTask } from '../network/Socket';
10
10
  import AwaitLock from './await-lock';
11
- import { ServerStates } from './makeServerStates';
12
- import { UTXOPluginWalletTools } from './makeUtxoWalletTools';
11
+ import { ServerStates } from './ServerStates';
12
+ import { UtxoWalletTools } from './UtxoWalletTools';
13
13
  export interface UtxoEngineState {
14
14
  processedPercent: number;
15
15
  start: () => Promise<void>;
@@ -28,7 +28,7 @@ export interface UtxoEngineState {
28
28
  processUtxos: (utxos: IUTXO[]) => Promise<void>;
29
29
  }
30
30
  export interface UtxoEngineStateConfig extends EngineConfig {
31
- walletTools: UTXOPluginWalletTools;
31
+ walletTools: UtxoWalletTools;
32
32
  walletInfo: SafeWalletInfo;
33
33
  processor: Processor;
34
34
  }
@@ -36,7 +36,7 @@ export declare function makeUtxoEngineState(config: UtxoEngineStateConfig): Utxo
36
36
  interface CommonArgs {
37
37
  pluginInfo: PluginInfo;
38
38
  walletInfo: SafeWalletInfo;
39
- walletTools: UTXOPluginWalletTools;
39
+ walletTools: UtxoWalletTools;
40
40
  processor: Processor;
41
41
  emitter: EngineEmitter;
42
42
  taskCache: TaskCache;
@@ -109,7 +109,7 @@ interface TransactionChangedArgs {
109
109
  walletId: string;
110
110
  tx: IProcessorTransaction;
111
111
  emitter: EngineEmitter;
112
- walletTools: UTXOPluginWalletTools;
112
+ walletTools: UtxoWalletTools;
113
113
  pluginInfo: PluginInfo;
114
114
  processor: Processor;
115
115
  }
@@ -7,7 +7,7 @@ export interface WalletToolsConfig {
7
7
  pluginInfo: PluginInfo;
8
8
  publicKey: PublicKey;
9
9
  }
10
- export interface UTXOPluginWalletTools {
10
+ export interface UtxoWalletTools {
11
11
  getPubkey: (args: AddressPath) => string;
12
12
  getScriptPubkey: (args: AddressPath) => ScriptPubkeyReturn;
13
13
  getScriptPubkeyFromWif: (wif: string, format: CurrencyFormat) => ScriptPubkeyReturn;
@@ -49,5 +49,5 @@ interface SignMessageArgs {
49
49
  message: string;
50
50
  xprivKeys: CurrencyFormatKeys;
51
51
  }
52
- export declare function makeUtxoWalletTools(config: WalletToolsConfig): UTXOPluginWalletTools;
52
+ export declare function makeUtxoWalletTools(config: WalletToolsConfig): UtxoWalletTools;
53
53
  export {};
@@ -1,5 +1,9 @@
1
1
  import { EdgeSpendInfo } from 'edge-core-js/types';
2
2
  import { Input, Output } from '../keymanager/utxopicker/types';
3
+ export declare type UtxoInitOptions = ReturnType<typeof asUtxoInitOptions>;
4
+ export declare const asUtxoInitOptions: import("cleaners").ObjectCleaner<{
5
+ nowNodeApiKey: string | undefined;
6
+ }>;
3
7
  export declare const asUtxoUserSettings: import("cleaners").ObjectCleaner<{
4
8
  blockbookServers: string[];
5
9
  enableCustomServers: boolean;
@@ -1,4 +1,4 @@
1
1
  import { EngineInfo } from '../../../plugin/types';
2
- import { Processor } from '../../db/makeProcessor';
2
+ import { Processor } from '../../db/Processor';
3
3
  import { IProcessorTransaction, IUTXO } from '../../db/types';
4
4
  export declare const getOwnUtxosFromTx: (engineInfo: EngineInfo, processor: Processor, tx: IProcessorTransaction) => Promise<IUTXO[]>;
@@ -1,13 +1,13 @@
1
1
  import { Cleaner } from 'cleaners';
2
2
  import { EdgeLog, EdgeTransaction } from 'edge-core-js/types';
3
- import { EngineEmitter } from '../../plugin/makeEngineEmitter';
4
- import { AddressResponse, AddresssMessageParams, AddressUtxosResponse, BroadcastTxResponse, InfoResponse, SubscribeAddressResponse, TransactionResponse } from './BlockBookAPI';
3
+ import { EngineEmitter } from '../../plugin/EngineEmitter';
4
+ import { AddressResponse, AddresssMessageParams, AddressUtxosResponse, BroadcastTxResponse, InfoResponse, SubscribeAddressResponse, TransactionResponse } from './blockbookApi';
5
5
  import Deferred from './Deferred';
6
- import { SocketEmitter } from './MakeSocketEmitter';
7
6
  import { OnQueueSpaceCB } from './Socket';
7
+ import { SocketEmitter } from './SocketEmitter';
8
8
  export declare type WatchAddressesCB = (response: SubscribeAddressResponse) => void | Promise<void>;
9
9
  export declare type WatchBlocksCB = () => void | Promise<void>;
10
- export interface BlockBook {
10
+ export interface Blockbook {
11
11
  isConnected: boolean;
12
12
  connect: () => Promise<void>;
13
13
  disconnect: () => Promise<void>;
@@ -20,14 +20,14 @@ export interface BlockBook {
20
20
  fetchTransaction: (hash: string) => Promise<TransactionResponse>;
21
21
  broadcastTx: (transaction: EdgeTransaction) => Promise<BroadcastTxResponse>;
22
22
  }
23
- interface BlockBookConfig {
24
- socketEmitter: SocketEmitter;
23
+ interface BlockbookConfig {
24
+ asAddress?: Cleaner<string>;
25
+ connectionUri: string;
25
26
  engineEmitter: EngineEmitter;
26
- wsAddress: string;
27
27
  log: EdgeLog;
28
- walletId: string;
29
28
  onQueueSpaceCB: OnQueueSpaceCB;
30
- asAddress?: Cleaner<string>;
29
+ socketEmitter: SocketEmitter;
30
+ walletId: string;
31
31
  }
32
- export declare function makeBlockBook(config: BlockBookConfig): BlockBook;
32
+ export declare function makeBlockbook(config: BlockbookConfig): Blockbook;
33
33
  export {};
@@ -1,7 +1,7 @@
1
1
  import { Cleaner } from 'cleaners';
2
2
  import { EdgeLog } from 'edge-core-js/types';
3
3
  import Deferred from './Deferred';
4
- import { SocketEmitter } from './MakeSocketEmitter';
4
+ import { SocketEmitter } from './SocketEmitter';
5
5
  import { ReadyState } from './types';
6
6
  export declare type OnFailHandler = (error: Error) => void;
7
7
  export interface WsTask<T> {
package/lib/tbch.js CHANGED
@@ -1,10 +1,10 @@
1
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
2
 
3
- var _makeCurrencyPlugin = require('./common/plugin/makeCurrencyPlugin');
3
+ var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
4
  var _bitcoincashtestnet = require('./common/utxobased/info/bitcoincashtestnet');
5
5
 
6
6
  const plugin = (options) =>
7
- _makeCurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoincashtestnet.info)
7
+ _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoincashtestnet.info)
8
8
 
9
9
  if (typeof window !== 'undefined') {
10
10
  _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
package/lib/tbtc.js CHANGED
@@ -1,10 +1,10 @@
1
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
2
 
3
- var _makeCurrencyPlugin = require('./common/plugin/makeCurrencyPlugin');
3
+ var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
4
  var _bitcointestnet = require('./common/utxobased/info/bitcointestnet');
5
5
 
6
6
  const plugin = (options) =>
7
- _makeCurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcointestnet.info)
7
+ _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcointestnet.info)
8
8
 
9
9
  if (typeof window !== 'undefined') {
10
10
  _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
package/lib/tbtg.js CHANGED
@@ -1,10 +1,10 @@
1
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
2
 
3
- var _makeCurrencyPlugin = require('./common/plugin/makeCurrencyPlugin');
3
+ var _CurrencyPlugin = require('./common/plugin/CurrencyPlugin');
4
4
  var _bitcoingoldtestnet = require('./common/utxobased/info/bitcoingoldtestnet');
5
5
 
6
6
  const plugin = (options) =>
7
- _makeCurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoingoldtestnet.info)
7
+ _CurrencyPlugin.makeCurrencyPlugin.call(void 0, options, _bitcoingoldtestnet.info)
8
8
 
9
9
  if (typeof window !== 'undefined') {
10
10
  _optionalChain([window, 'access', _ => _.addEdgeCorePlugins, 'optionalCall', _2 => _2({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-currency-plugins",
3
- "version": "2.5.4",
3
+ "version": "2.6.1",
4
4
  "description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
5
5
  "repository": "https://github.com/EdgeApp/edge-currency-plugins",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3",
37
37
  "altcoin-js": "^1.0.0",
38
38
  "async-mutex": "^0.2.6",
39
- "baselet": "^0.2.4",
39
+ "baselet": "^0.3.0",
40
40
  "biggystring": "^4.1.3",
41
41
  "bip32": "^2.0.5",
42
42
  "bip32grs": "^2.0.5",
@@ -107,4 +107,4 @@
107
107
  "typescript": "^4.1.2",
108
108
  "wif": "^2.0.6"
109
109
  }
110
- }
110
+ }