dwallet-labs / dwallet-network

dWallet Network, a composable modular signature network that is the home of dWallets. A dWallet is a noncollusive and massively decentralized signing mechanism, used as a building block by builders on other networks to add native multi-chain interoperability to any smart contract.
https://docs.dwallet.io
Other
39 stars 34 forks source link

TS Interfaces for signature-mpc #254

Open fl0ydj opened 2 months ago

fl0ydj commented 2 months ago

Hey! We have been starting to migrate our code to the new interfaces on sign-ia-wasm branch but honestly working with the TS interfaces is super tedious and not ready for production. Right now we ended up copying the whole folder and patching every function. I think there are good solutions to the issues we have been having.

Issues

Suggested solutions

Transactions

Utilize the Transactionblock class for all common flows or introduce a wrapper around it:

Wasm

Introduce a wasm interface which is used as an abstraction layer for the wasm calls

Happy to also contribute to implementing this @ycscaly @omersadika

fl0ydj commented 2 months ago

Also, on the onchain interfaces, it would be great if functions which create a shared object could returns its ID/related data so that commands can be chained together in a ptb. E.g. if register_encryption_key would return the ID of the key, and set_active_encryption_key would take ID and key_owner_address instead of the whole object, both could be called in the same ptb.