From 9ba6a825fe94e400db2a68d2998edf6e640a62e3 Mon Sep 17 00:00:00 2001 From: johnquinnvictaboada Date: Thu, 26 Sep 2024 04:22:18 +0800 Subject: [PATCH] feat: added search utxo by parts of address with unit --- src/cardano.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/cardano.ts b/src/cardano.ts index e765140..18e7a4e 100644 --- a/src/cardano.ts +++ b/src/cardano.ts @@ -216,6 +216,32 @@ export class QueryClient { asset: policyId ? { policyId } : { assetName: name }, }); } + + async searchUtxosByPaymentPartWithAsset( + paymentPart: Uint8Array, + policyId?: Uint8Array, + name?: Uint8Array + ): Promise { + return this.searchUtxosByMatch({ + address: { + paymentPart: paymentPart, + }, + asset: policyId ? { policyId } : { assetName: name }, + }); + } + + async searchUtxosByDelegationPartWithAsset( + delegationPart: Uint8Array, + policyId?: Uint8Array, + name?: Uint8Array + ): Promise { + return this.searchUtxosByMatch({ + address: { + delegationPart: delegationPart, + }, + asset: policyId ? { policyId } : { assetName: name }, + }); + } } export class SubmitClient {