Skip to content

Commit

Permalink
cardano transfer: narrow credential relation filter (#332)
Browse files Browse the repository at this point in the history
* cardano transfer: narrow credential relation filter

* Trigger transfer primitive for any witness

---------

Co-authored-by: Sebastien Guillemot <[email protected]>
  • Loading branch information
ecioppettini and SebastienGllmt authored Mar 31, 2024
1 parent 0e713e5 commit 7929811
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/engine/paima-funnel/src/cde/cardanoTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Routes, query } from '@dcspark/carp-client';
import type { TxAndBlockInfo } from '@dcspark/carp-client';
import { Transaction } from '@dcspark/cardano-multiplatform-lib-nodejs';
import type { BlockTxPair } from '@dcspark/carp-client';
import { RelationFilterType } from '@dcspark/carp-client';

export default async function getCdeData(
url: string,
Expand All @@ -24,10 +25,12 @@ export default async function getCdeData(
): Promise<CdeCardanoTransferDatum[]> {
let result = [] as CdeCardanoTransferDatum[];

const relationFilter = RelationFilterType.Output | RelationFilterType.Witness;

while (true) {
const event = await timeout(
query(url, Routes.transactionHistory, {
// TODO: maybe it should be Output
relationFilter,
addresses: [extension.credential],
slotLimits: {
from: fromAbsoluteSlot,
Expand Down

0 comments on commit 7929811

Please sign in to comment.