Rename fetchTransactions to fetchAddressHistory
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import { BlockchainElectrum, encodeExtendedJson, Transaction } from '@xocash/stack';
|
||||
import {
|
||||
BlockchainElectrum,
|
||||
encodeExtendedJson,
|
||||
Transaction,
|
||||
} from '@xocash/stack';
|
||||
|
||||
export const electrumClient = {
|
||||
from: [
|
||||
{
|
||||
label: 'From Servers',
|
||||
inputs: ['Servers'],
|
||||
models: ['bch.imaginary.cash, cashnode.bch.ninja, electrum.imaginary.cash'],
|
||||
models: [
|
||||
'bch.imaginary.cash, cashnode.bch.ninja, electrum.imaginary.cash',
|
||||
],
|
||||
callback: async (args: [string]) => {
|
||||
const electrum = await BlockchainElectrum.from({
|
||||
opts: {
|
||||
@@ -39,11 +45,11 @@ export const electrumClient = {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Fetch Transactions',
|
||||
label: 'Fetch Address History',
|
||||
inputs: ['Address'],
|
||||
models: ['Address'],
|
||||
callback: async (electrum: BlockchainElectrum, args: [string]) => {
|
||||
const transactions = await electrum.fetchTransactions(args[0]);
|
||||
const transactions = await electrum.fetchAddressHistory(args[0]);
|
||||
return encodeExtendedJson(transactions.toArray(), 2);
|
||||
},
|
||||
},
|
||||
@@ -57,4 +63,4 @@ export const electrumClient = {
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user