We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The signature for signed deals is built on top of the SCALE encoded deal proposal (more or less like so):
fn sign(deal_proposal: DealProposal) -> SignedDealProposal { return sign(deal_proposal.to_scale())
Currently, we send the proposal to the SP to encode, which is far from ideal:
delia/src/components/storage-deal/StorageDealFlow.jsx
Lines 213 to 217 in cded5af
The SCALE library is no_std compatible and so is serde, so we can probably get a WASM function for the encoding working.
Maybe we won't need the WASM — https://github.com/polkadot-js/api/tree/f96e8c42a06b934d7e512c6427b81a995faa417a/packages/types-codec
The text was updated successfully, but these errors were encountered:
I did some additional research and we should be able to copy the Rust structs to TS using the types-codec and it's friends.
types-codec
https://grep.app/search?q=%40polkadot/types-codec
The following guide should be helpful:
Seems to me that the approach revolves around using the type registry to create the types:
import { TypeRegistry } from '@polkadot/types'; const registry = new TypeRegistry(); registry.register(...); registry.createType("DealProposal", ...);
However, I don't understand Typescript enough to understand the source of CodecClass
CodecClass
Sorry, something went wrong.
No branches or pull requests
The signature for signed deals is built on top of the SCALE encoded deal proposal (more or less like so):
Currently, we send the proposal to the SP to encode, which is far from ideal:
delia/src/components/storage-deal/StorageDealFlow.jsx
Lines 213 to 217 in cded5af
The SCALE library is no_std compatible and so is serde, so we can probably get a WASM function for the encoding working.
Maybe we won't need the WASM — https://github.com/polkadot-js/api/tree/f96e8c42a06b934d7e512c6427b81a995faa417a/packages/types-codec
The text was updated successfully, but these errors were encountered: