dfinity / dfinity/candid

As a JS user, I want to be able to pass Array<Number>, Blob, or ArrayBuffer for blobs

Open
#308 0 comments 0 reactions 1 assignee View on GitHub

@chenyan-dfinity is already working on this.

Since Jan 5, 2022.

enhancement JavaScript
Dominant language
Rust
Stars
301
Forks
85
Avg merge
1h 4m
Merged PRs (30d)
4

Description

We currently type the blob type as specifically an Array of numbers, which feels silly in contexts where we are working with Blobs and ArrayBuffers.

Instead, the types allowed should include Blob and ArrayBuffer, and we should add support in the JS Agent for accepting those compatible values and encoding them appropriately.

Acceptance criteria:

  • Blobs can accept Array<Number> | Blob | ArrayBuffer in TS Codegen

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.