Skip to content

Commit

Permalink
Implements Address/Utxo Endpoint (#10)
Browse files Browse the repository at this point in the history
* fix: adds a utxo route

* fix: implemenets esplora txs endpoint

* fix: upgrades mempool_api docker version
  • Loading branch information
nostrdev-com authored Dec 19, 2024
1 parent b4ce1bf commit 7b46072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/src/api/bitcoin/bitcoin.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class BitcoinRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'init-data', this.getInitData)
.get(config.MEMPOOL.API_URL_PREFIX + 'validate-address/:address', this.validateAddress)
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address', this.getAddress)
.get(config.MEMPOOL.API_URL_PREFIX + 'address/:address/txs', this.getAddressTransactions)
.get(config.MEMPOOL.API_URL_PREFIX + 'block-height/:height', this.getBlockHeight)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/rbf', this.getRbfHistory)
.get(config.MEMPOOL.API_URL_PREFIX + 'tx/:txId/cached', this.getCachedTx)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/api/bitcoin/esplora-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class ElectrsApi implements AbstractBitcoinApi {
}

$getAddressTransactions(address: string, txId?: string): Promise<IEsploraApi.Transaction[]> {
throw new Error('Method getAddressTransactions not implemented.');
return this.failoverRouter.$get<IEsploraApi.Transaction[]>('/address/' + address + '/txs');
}

$getScriptHash(scripthash: string): Promise<IEsploraApi.ScriptHash> {
Expand Down

0 comments on commit 7b46072

Please sign in to comment.