-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Describe the bug
The secretvaults-ts throws an error if you try to .findData() for a collection where queries exist.
How to reproduce
- Clone blind-module-examples repo
git clone https://github.com/NillionNetwork/blind-module-examples.git
- Navigate into
sdk-exampleshttps://github.com/NillionNetwork/blind-module-examples/tree/main/nildb/secretvaults-ts/sdk-examples and run the string query example - this creates a collection, creates queries, and runs queries successfully
npm run example:query-string
- Add this code above the
CLEANUP_AFTER_EXAMPLEblock to try to read all records in collection
// this will fail to read records / find data because queries exist
const readRecords = await builderClient.findData({
collection: collectionId,
filter: {}, // Empty filter returns all records
});
console.log('📋 Read records:', JSON.stringify(readRecords.data, null, 2));
- Re-run run
npm run example:query-stringand see error from secretvaults-ts library:
TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
Expected behavior
.findData() should return records even if queries exist
Metadata
Metadata
Assignees
Labels
No labels