[Task] Improve Account::attach/detach_method_relationship
#654
Labels
Enhancement
New feature or improvement to an existing feature
Milestone
Description
Modify
Account::attach_method_relationship
andAccount::detach_method_relationship
:Account
, i.e.attach_method_relationships
anddetach_method_relationships
.Current behaviour:
Desired behaviour:
The
.relationships
implementation can either take a slice, vec, or arbitraryIntoIter
generic depending on which we find is most convenient for developers to use.We should also think about making attaching/detaching relationships easier for developers, since it is currently restricted to non-embedded methods. That is, trying to attach/detach an embedded method always causes an error, we could instead move the method to be a
verificationMethod
.Motivation
Porting the
Account
for the Wasm bindings in #574 demonstrated that using the builder pattern to add/remove multiple method relationships is cumbersome due to ownership/borrowing rules on intermediate structs. This issue is an attempt to make these specific methods more user-friendly and to reduce differences with the Wasm bindings.E.g. current code needed to add relationships from a list, which is definitely not ergonomic:
To-do list
Account::attach_method_relationship
toattach_method_relationships
Account::detach_method_relationship
todetach_method_relationships
Account::attach_method_relationships
to specify multiple relationships at once.Account::detach_method_relationships
to specify multiple relationships at once.Change checklist
Add an
x
to the boxes that are relevant to your changes, and delete any items that are not.The text was updated successfully, but these errors were encountered: