XO Wallet Integration Part IV

This commit is contained in:
Jim Hamill
2025-05-27 23:17:41 +00:00
parent 25b58853a3
commit 2bfeed8587
15 changed files with 249 additions and 123 deletions
@@ -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
+4 -1
View File
@@ -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';
+11
View File
@@ -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;
};