feat: parse rpc full block from hex to binary representation
This commit is contained in:
		
							parent
							
								
									46e63ca6cf
								
							
						
					
					
						commit
						a9248a5f13
					
				| @ -77,7 +77,8 @@ class BitcoinApi implements AbstractBitcoinApi { | ||||
|   } | ||||
| 
 | ||||
|   $getRawBlock(hash: string): Promise<string> { | ||||
|     return this.bitcoindClient.getBlock(hash, 0); | ||||
|     return this.bitcoindClient.getBlock(hash, 0) | ||||
|       .then((raw: string) => Buffer.from(raw, "hex")); | ||||
|   } | ||||
| 
 | ||||
|   $getBlockHash(height: number): Promise<string> { | ||||
|  | ||||
| @ -2070,7 +2070,7 @@ export const restApiDocsData = [ | ||||
|     fragment: "get-block-raw", | ||||
|     title: "GET Block Raw", | ||||
|     description: { | ||||
|       default: "Returns the raw block representation in binary for Esplora backend, or hex for Bitcoin Core RPC backend." | ||||
|       default: "Returns the raw block representation in binary." | ||||
|     }, | ||||
|     urlString: "/block/:hash/raw", | ||||
|     showConditions: bitcoinNetworks.concat(liquidNetworks), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user