txq
Version:
TXQ: Bitcoin Transaction Storage Queue Service
27 lines (23 loc) • 661 B
text/typescript
import { Service, Inject } from 'typedi';
import { UseCase } from '../UseCase';
import { UseCaseOutcome } from '../UseCaseOutcome';
('getTxsByChannel')
export default class GetTxsDlq extends UseCase {
constructor(
('txmetaService') private txmetaService,
('logger') private logger) {
super();
}
public async run(params: {
channel: string | undefined | null,
id: any,
limit: any,
rawtx: boolean
}): Promise<UseCaseOutcome> {
let txs = await this.txmetaService.getTxsByChannel(params.channel, params.id, params.limit, params.rawtx);
return {
success: true,
result: txs
};
}
}