Skip to content

Commit 4336821

Browse files
committed
feat: add getTransactionMerkleProof method for Transaction wrapper
1 parent 562894c commit 4336821

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/classes/Transactions.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import axios from 'axios'
2-
import { AddressTransaction, SDKConfig } from '../types'
2+
import { AddressTransaction, SDKConfig, TransactionMerkelProof } from '../types'
33

44
export class Transaction {
55
private apiV1URL: string
@@ -23,8 +23,10 @@ export class Transaction {
2323
* @param txHash
2424
* getTransactonMerkelProof fetches the MerkelProof of a transaction
2525
*/
26-
public getTransactonMerkelProof(txHash: string) {
27-
26+
public async getTransactonMerkelProof(txHash: string) {
27+
const url = `${this.apiV1URL}/transaction/merkle_proof/${txHash}`
28+
const data = await this._get(url)
29+
return data as TransactionMerkelProof
2830
}
2931

3032
/// BEGIN PRIVATE METHODS

0 commit comments

Comments
 (0)