diff --git a/package.json b/package.json index 8f3ec40..26da608 100644 --- a/package.json +++ b/package.json @@ -19,5 +19,5 @@ "@polkadot/types": "^3.11.1", "typescript": "^3.9.7" }, - "version": "0.1.12" + "version": "0.1.13" } diff --git a/src/index.ts b/src/index.ts index 2edf281..38b2f0f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -546,6 +546,64 @@ export const types18: RegistryTypes = { }, }; +export const types19: RegistryTypes = { + ...types18, + + // Remove old types + DidVerificationKeyUpdateAction: undefined, + + // New types + ServiceEndpoints: { + contentHash: "Hash", + urls: "Vec", + contentType: "ContentType", + }, + DidFragmentUpdateAction: { + _enum: { + Ignore: "Null", + Change: { + _enum: ["DidVerificationKey", "ServiceEndPoints"], + }, + Delete: "Null", + } + }, + ContentType: { + _enum: [ + "ApplicationJson", + "ApplicationJsonLd" + ] + }, + + // Updated types + DidCreationDetails: { + did: "DidIdentifierOf", + newKeyAgreementKeys: "BTreeSet", + newAttestationKey: "Option", + newDelegationKey: "Option", + newServiceEndpoints: "Option", + }, + DidUpdateDetails: { + newAuthenticationKey: "Option", + newKeyAgreementKeys: "BTreeSet", + attestationKeyUpdate: "DidFragmentUpdateAction", + delegationKeyUpdate: "DidFragmentUpdateAction", + publicKeysToRemove: "BTreeSet", + serviceEndpointsUpdate: "DidFragmentUpdateAction", + }, + DidDetails: { + authenticationKey: "KeyIdOf", + keyAgreementKeys: "BTreeSet", + delegationKey: "Option", + attestationKey: "Option", + publicKeys: "BTreeMap", + serviceEndpoints: "Option", + lastTxCounter: "u64", + }, + DidStorageVersion: { + _enum: ["V1", "V2"] + }, +}; + export const typeBundleForPolkadot: OverrideBundleDefinition = { types: [ { @@ -569,8 +627,12 @@ export const typeBundleForPolkadot: OverrideBundleDefinition = { types: types17, }, { - minmax: [18, undefined], + minmax: [18, 18], types: types18, }, + { + minmax: [19, undefined], + types: types19, + }, ], };