-
Notifications
You must be signed in to change notification settings - Fork 87
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
Prepare public Identity interface for future wasm-bindings #1429
base: feat/identity-rebased
Are you sure you want to change the base?
Prepare public Identity interface for future wasm-bindings #1429
Conversation
@chrisgitiota the only problem I see here is with
|
Regarding the |
Would it be an option to use a BCS serialization of the ProgrammableTransaction for the publicly available Internally, in our platform agnostic code, we need to use the BCS representation for a ProgrammableTransaction too, as this type is not compilable for WASM32 (hopefully this will change soon). |
Sure no problem |
…repare-wasm32-bindings # Conflicts: # identity_iota_core/packages/identity_iota/Move.lock
All of the issues addressed in the 'Important questions' section above, should be manageable using adapters converting internally used platform agnostic types ( Therefore the interface of the types listed in the 'Important questions' section can remain unchanged. |
This can also be handled using an internal adapter converting the The interface of the IdentityClient::execute_transaction() function can remain unchanged. |
This PR introduces minor changes to prepare the public Identity interface for future wasm-bindings.
Important questions:
impl Transaction for ProgrammableTransaction
Will be replaced with
impl Transaction for ProgrammableTransactionBcs
Can this cause any Problems?
fn parse_tx_effects(tx_response: &IotaTransactionBlockResponse)
IotaTransactionBlockResponse
will be replaced withdyn IotaTransactionBlockResponseT object
Can this cause any Problems?
If yes see below (IotaTransactionBlockResponse)
Do we need to warn library users in the documentation?
Are these types/functions only used internal but can not be made
pup(crate)
?F: FnOnce(&mut Ptb, &HashMap<ObjectID, (Argument, IotaObjectData)>)
F: FnOnce(&mut Ptb, &HashMap<ObjectID, (Argument, IotaObjectData)>) + Send + 'static
F: FnOnce(&mut Ptb, &HashMap<ObjectID, (Argument, IotaObjectData)>)
F: FnOnce(&mut Ptb, &HashMap<ObjectID, (Argument, IotaObjectData)>) + Send
pub(crate) IntentFn = Box<dyn FnOnce(&mut Ptb, &HashMap<ObjectID, (Argument, IotaObjectData)>) + Send>
Ptb
needds to be replaced withProgrammableTransactionBcs
Effects for library users is unclear
This type will be replaced internaly with a
dyn IotaTransactionBlockResponseT
object. As the library users should not be aware of our internal type, we could use a BCS serealization here. The users would need to de-serialize the IotaTransactionBlockResponseBcs in their code.pub response: IotaTransactionBlockResponse
Other Questions:
As they are are
pub(crate)
this will not effect our library users, right?pub(crate)
otherwise?):No changes in Trait definition needed but implementation changed
dyn TxBuilder object instead of ProgrammableTransactionBuilder
but this is not needed anymore
Informational:
There will be target compile switches for IdentityClientReadOnly constructors:
become non public and are called by target switched new constructor functions
There are no "pub fun" in the move_calls folder, so our library users can not use
them (there are no public re-exports through a pub use directive).