-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data.to Data.from #276
Comments
They should be still available, nothing changed in that regard. If you have an example where it doesn't work let me know. |
im using vite, express, and the @jsr/spacebudz__lucid@^0.20.6. first i was trying to use metadataOf on a cip68 nft but i kept getting a 404 from this. this function used to work also but i haven't been able to get it to work since i upgraded lucid. so then i decided to make the fetches to blockfrost directly for the cip68 metadata then i used Data.from and Data.toJson to convert the metadata, but when i tried i get this Property 'from' does not exist on type '{ readonly Bytes: (options?: number | { minLength?: number | undefined; maxLength?: number | undefined; enum?: string[] | undefined; } | undefined) => string; readonly Integer: () => bigint; ... 8 more ...; readonly void: () => string; }'.ts(2339) Property 'toJson' does not exist on type '{ readonly Bytes: (options?: number | { minLength?: number | undefined; maxLength?: number | undefined; enum?: string[] | undefined; } | undefined) => string; readonly Integer: () => bigint; ... 8 more ...; readonly void: () => string; }'.ts(2339) const datumData = await datumResponse.json(); |
could you let me know which asset/unit you try to get metadata from? The query itself should work.
There's indeed a bug with the npm version of lucid. The TypeScript definition is off and doesn't expose Data.from/to, but the functions are technically there. I'll fix that. You could try in the meantime with
This function does no longer exist. it's now |
PolicyId: 7f38ccbe720cecbf652d73f06354690382bb0c943f0a0edc190cac40 the metadataOf seems to stop working after or around lucid 10.7 i have just been using data.to and from since then |
That's odd. I just tried querying that asset with metadataOf and it works fine. With Deno and NPM version. You say you are using vite? Have you added the vite wasm plugin to the vite config? If not this might cause the issues |
Are these no longer available or was this broken in a recent update?
The text was updated successfully, but these errors were encountered: