XO Wallet Integration Part IV
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { BaseBlockchain } from './base-blockchain.js';
|
||||
import {
|
||||
type AddressStatusPayload,
|
||||
type BlockHeightPayload,
|
||||
type BlockchainCallback,
|
||||
type BlockchainTransaction,
|
||||
type BlockchainUTXO,
|
||||
@@ -54,16 +56,6 @@ export type BlockchainElectrumParams = {
|
||||
opts?: Partial<BlockchainElectrumOpts>;
|
||||
};
|
||||
|
||||
export type AddressStatusPayload = {
|
||||
type: 'address-status';
|
||||
status: string | null;
|
||||
};
|
||||
|
||||
export type BlockHeightPayload = {
|
||||
type: 'block-height';
|
||||
height: number | null;
|
||||
};
|
||||
|
||||
export class BlockchainElectrum extends BaseBlockchain<
|
||||
AddressStatusPayload,
|
||||
BlockHeightPayload
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
// NOTE: Do not export specific providers in this file.
|
||||
// Do this in the parent index.ts file instead (otherwise, we mingle interfaces and providers, which can create circular dependencies)..
|
||||
// The exception to this rule is with the InMemory and Composite providers.
|
||||
// These are considered built-ins and do not have any other interface dependencies.
|
||||
export * from './base-blockchain.js';
|
||||
export * from './blockchain-electrum.js';
|
||||
export * from './blockchain-inmemory.js';
|
||||
export * from './traits.js';
|
||||
export * from './types.js';
|
||||
|
||||
@@ -32,3 +32,14 @@ export type BlockchainUTXO = {
|
||||
|
||||
// NOTE: To minimize refactors later, use this name elsewhere; not the `ExtMap<Type>` form.
|
||||
export type BlockchainUTXOs = ExtMap<BlockchainUTXO>;
|
||||
|
||||
// NOTE: These payloads are used by Electrum.
|
||||
export type AddressStatusPayload = {
|
||||
type: 'address-status';
|
||||
status: string | null;
|
||||
};
|
||||
|
||||
export type BlockHeightPayload = {
|
||||
type: 'block-height';
|
||||
height: number | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user