diff --git a/package.json b/package.json index 4f75eed..54c0421 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ }, "homepage": "https://github.com/utxorpc/node-sdk#readme", "devDependencies": { - "tsup": "^8.2.4", - "tsx": "4.19.0", - "typescript": "5.5.4", - "@types/node": "22.10.2", - "vitest": "^2.1.8" + "@types/node": "22.15.33", + "tsup": "^8.5.0", + "tsx": "^4.20.3", + "typescript": "^5.8.3", + "vitest": "^3.2.4" }, "dependencies": { "@connectrpc/connect": "1.4", diff --git a/src/cardano.ts b/src/cardano.ts index 4c4c759..fa02ed8 100644 --- a/src/cardano.ts +++ b/src/cardano.ts @@ -194,7 +194,7 @@ export class QueryClient { } async readUtxosByOutputRef( - refs: { txHash: Uint8Array; outputIndex: number }[] + refs: { txHash: Uint8Array; outputIndex: number }[] ): Promise { const searchResponse = await this.inner.readUtxos({ keys: refs.map((ref) => { @@ -220,7 +220,7 @@ export class QueryClient { return searchResponse.items.map(anyUtxoToChain); } - async searchUtxosByAddress(address: Uint8Array): Promise { + async searchUtxosByAddress(address: Uint8Array): Promise { return this.searchUtxosByMatch({ address: { exactAddress: address, @@ -228,7 +228,7 @@ export class QueryClient { }); } - async searchUtxosByPaymentPart(paymentPart: Uint8Array): Promise { + async searchUtxosByPaymentPart(paymentPart: Uint8Array): Promise { return this.searchUtxosByMatch({ address: { paymentPart: paymentPart, @@ -237,7 +237,7 @@ export class QueryClient { } async searchUtxosByDelegationPart( - delegationPart: Uint8Array + delegationPart: Uint8Array ): Promise { return this.searchUtxosByMatch({ address: { @@ -247,8 +247,8 @@ export class QueryClient { } async searchUtxosByAsset( - policyId?: Uint8Array, - name?: Uint8Array + policyId?: Uint8Array, + name?: Uint8Array ): Promise { return this.searchUtxosByMatch({ asset: (policyId && name) ? { policyId: policyId, assetName: name } : policyId ? { policyId } : { assetName: name }, @@ -256,9 +256,9 @@ export class QueryClient { } async searchUtxosByAddressWithAsset( - address: Uint8Array, - policyId?: Uint8Array, - name?: Uint8Array + address: Uint8Array, + policyId?: Uint8Array, + name?: Uint8Array ): Promise { return this.searchUtxosByMatch({ address: { @@ -269,9 +269,9 @@ export class QueryClient { } async searchUtxosByPaymentPartWithAsset( - paymentPart: Uint8Array, - policyId?: Uint8Array, - name?: Uint8Array + paymentPart: Uint8Array, + policyId?: Uint8Array, + name?: Uint8Array ): Promise { return this.searchUtxosByMatch({ address: { @@ -282,9 +282,9 @@ export class QueryClient { } async searchUtxosByDelegationPartWithAsset( - delegationPart: Uint8Array, - policyId?: Uint8Array, - name?: Uint8Array + delegationPart: Uint8Array, + policyId?: Uint8Array, + name?: Uint8Array ): Promise { return this.searchUtxosByMatch({ address: { @@ -357,7 +357,7 @@ export class SubmitClient { } async *watchMempoolForAddress( - address: Uint8Array + address: Uint8Array ): AsyncIterable { yield* this.watchMempoolByMatch({ hasAddress: { exactAddress: address }, @@ -365,7 +365,7 @@ export class SubmitClient { } async *watchMempoolForPaymentPart( - paymentPart: Uint8Array + paymentPart: Uint8Array ): AsyncIterable { yield* this.watchMempoolByMatch({ hasAddress: { paymentPart: paymentPart }, @@ -373,7 +373,7 @@ export class SubmitClient { } async *watchMempoolForDelegationPart( - delegationPart: Uint8Array + delegationPart: Uint8Array ): AsyncIterable { yield* this.watchMempoolByMatch({ hasAddress: { delegationPart: delegationPart }, @@ -381,8 +381,8 @@ export class SubmitClient { } async *watchMempoolForAsset( - policyId?: Uint8Array, - assetName?: Uint8Array + policyId?: Uint8Array, + assetName?: Uint8Array ): AsyncIterable { yield* this.watchMempoolByMatch({ movesAsset: policyId ? { policyId } : { assetName }, @@ -442,7 +442,7 @@ export class WatchClient { } async *watchTxForAddress( - address: Uint8Array, + address: Uint8Array, intersect?: ChainPoint[] ): AsyncIterable { const pattern = { hasAddress: { exactAddress: address } }; @@ -450,7 +450,7 @@ export class WatchClient { } async *watchTxForPaymentPart( - paymentPart: Uint8Array, + paymentPart: Uint8Array, intersect?: ChainPoint[] ): AsyncIterable { const pattern = { hasAddress: { paymentPart } }; @@ -458,7 +458,7 @@ export class WatchClient { } async *watchTxForDelegationPart( - delegationPart: Uint8Array, + delegationPart: Uint8Array, intersect?: ChainPoint[] ): AsyncIterable { const pattern = { hasAddress: { delegationPart } }; @@ -466,8 +466,8 @@ export class WatchClient { } async *watchTxForAsset( - policyId?: Uint8Array, - assetName?: Uint8Array, + policyId?: Uint8Array, + assetName?: Uint8Array, intersect?: ChainPoint[] ): AsyncIterable { const pattern = policyId diff --git a/src/common.ts b/src/common.ts index a7b0fed..9a167b2 100644 --- a/src/common.ts +++ b/src/common.ts @@ -25,15 +25,15 @@ export type GenericTxEvent = export type GenericTxInMempoolEvent = { stage: submit.Stage; - txoRef: Uint8Array; - nativeBytes: Uint8Array; + txoRef: Uint8Array; + nativeBytes: Uint8Array; Tx: Tx | undefined; }; export type GenericUtxo = { txoRef: Ref; parsedValued: Parsed | undefined; - nativeBytes: Uint8Array | undefined; + nativeBytes: Uint8Array | undefined; }; export type ClientBuilderOptions = {