Support v1 transactions

Closes https://github.com/serai-dex/serai/issues/117.
This commit is contained in:
Luke Parker
2022-09-28 05:28:42 -04:00
parent 5a4eb0a076
commit f48a48ec3f
4 changed files with 55 additions and 9 deletions

View File

@@ -195,6 +195,10 @@ impl Rpc {
.collect()
}
pub async fn get_transaction(&self, tx: [u8; 32]) -> Result<Transaction, RpcError> {
self.get_transactions(&[tx]).await.map(|mut txs| txs.swap_remove(0))
}
pub async fn get_block(&self, height: usize) -> Result<Block, RpcError> {
#[derive(Deserialize, Debug)]
struct BlockResponse {