Conversation
|
I may be wrong, but I'd expect this to result in a type for the DidUpdate where you cannot actually set any keys or services when selecting // We need to specify the two variants of the generic DidFragmentUpdateAction separately
DidFragmentUpdateAction_DidVerificationKey: {
_enum: {
Ignore: "Null",
Change: "DidVerificationKey",
Delete: "Null",
},
},
DidFragmentUpdateAction_ServiceEndPoints: {
_enum: {
Ignore: "Null",
Change: "ServiceEndPoints",
Delete: "Null",
},
},
...
DidUpdateDetails: {
newAuthenticationKey: "Option<DidVerificationKey>",
newKeyAgreementKeys: "BTreeSet<DidEncryptionKey>",
attestationKeyUpdate: "DidFragmentUpdateAction_DidVerificationKey",
delegationKeyUpdate: "DidFragmentUpdateAction_DidVerificationKey",
publicKeysToRemove: "BTreeSet<KeyIdOf>",
serviceEndpointsUpdate: "DidFragmentUpdateAction_ServiceEndpoints",
}, |
I tried to find a solution with generics but nothing worked. I pushed your suggestion for now. Could you do a review @rflechtner? I would like to do a runtime upgrade on Peregrine Stg and Prod tomorrow but need the types to be published before. |
rflechtner
left a comment
There was a problem hiding this comment.
There is a typo, and I noticed we are missing a type for DelegationStorageVersion.
src/index.ts
Outdated
| contentType: "ContentType", | ||
| }, | ||
| DidFragmentUpdateAction: { | ||
| DidFragmentUpdateAction_ServicEndpoints: { |
There was a problem hiding this comment.
Good catch. StakingStorageVersion was also missing 🥲 Fixed in fa98fac.


Mashnet node companion