-
Notifications
You must be signed in to change notification settings - Fork 27
chore: update bundle test #892
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
const vmTransactionResult = await Kilt.DidHelpers.setVerificationMethod({ | ||
api, | ||
didDocument, | ||
signers: [...signers, assertionKeyPair], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, technically you don't need to extend the signers, since the authentication key is the only one required for this operation, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it would help to have cases where the same key is not added to both the signers and in the publicKey
argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah but the signers variable for the next operations will lack the needed keys, I would say we keep it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but the signers
variable is anyway re-initialized below with vmTransactionResult.asConfirmed
, so this is not needed. But this was my suggestion. Feel free to disregard it and resolve the conversation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the rationale was that adding the key here would transform it to a signer and adds it to the signers
array. This way you avoid having a mixed type. Providing DID signers for your DID is one of the two things the asConfirmed
getter does for you (the other is returning the didDocument)
} | ||
|
||
// TODO: Should we at least be able to load an existing CType from the chain? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rflechtner why is this not possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do so via importing the CTypeLoader from @kiltprotocol/credentials
. But the bundle only has sdk-js functions available.
@rflechtner we still need to add testing for credentials.