Skip to content

Commit

Permalink
feat(ref-imp): #781 - make rest api json for SIP2
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacJChen committed Oct 8, 2020
1 parent b072d86 commit 8af58e1
Show file tree
Hide file tree
Showing 23 changed files with 355 additions and 100 deletions.
2 changes: 1 addition & 1 deletion lib/core/versions/latest/AnchorFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default class AnchorFile {

const createOperations = createOperationArray.map(operation => {
return {
suffix_data: operation.encodedSuffixData
suffix_data: { delta_hash: operation.suffixData.deltaHash, recovery_commitment: operation.suffixData.recoveryCommitment }
};
});

Expand Down
1 change: 1 addition & 0 deletions lib/core/versions/latest/ChunkFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class ChunkFile {
}

private static validateDeltasProperty (deltas: any) {
// TODO: SIP 2 #781 change this
// Make sure deltas is an array.
if (!(deltas instanceof Array)) {
throw new SidetreeError(ErrorCode.ChunkFileDeltasPropertyNotArray, 'Invalid chunk file, deltas property is not an array.');
Expand Down
2 changes: 1 addition & 1 deletion lib/core/versions/latest/CreateOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class CreateOperation implements OperationModel {
public static async parseOperationFromAnchorFile (input: any): Promise<CreateOperation> {
// Issue #442 - Replace `operationBuffer` in `OperationModel` and `AnchoredOperationModel` with actual operation request
const operationBuffer = Buffer.from(JSON.stringify(input));
const operation = await CreateOperation.parseObject(input, operationBuffer, true);
const operation = await CreateOperation.parseJcsObject(input, operationBuffer, true);
return operation;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/core/versions/latest/Operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Operation {
const isAnchorFileMode = false;

if (operationType === OperationType.Create) {
return CreateOperation.parseObject(operationObject, operationBuffer, isAnchorFileMode);
return CreateOperation.parseJcsObject(operationObject, operationBuffer, isAnchorFileMode);
} else if (operationType === OperationType.Update) {
return UpdateOperation.parseObject(operationObject, operationBuffer, isAnchorFileMode);
} else if (operationType === OperationType.Recover) {
Expand Down
16 changes: 11 additions & 5 deletions lib/core/versions/latest/RecoverOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Operation from './Operation';
import OperationModel from './models/OperationModel';
import OperationType from '../../enums/OperationType';
import SidetreeError from '../../../common/SidetreeError';
import JsonCanonicalizer from './util/JsonCanonicalizer';

interface SignedDataModel {
deltaHash: string;
Expand Down Expand Up @@ -82,6 +83,7 @@ export default class RecoverOperation implements OperationModel {
return recoverOperation;
}


/**
* Parses the given operation object as a `RecoverOperation`.
* The `operationBuffer` given is assumed to be valid and is assigned to the `operationBuffer` directly.
Expand Down Expand Up @@ -115,14 +117,18 @@ export default class RecoverOperation implements OperationModel {
throw new SidetreeError(ErrorCode.RecoverOperationTypeIncorrect);
}

encodedDelta = operationObject.delta;
try {
delta = await Operation.parseDelta(operationObject.delta);
Operation.validateDelta(operationObject.delta);
delta = {
patches: operationObject.delta.patches,
updateCommitment: operationObject.delta.update_commitment
};
} catch {
// For compatibility with data pruning, we have to assume that delta may be unavailable,
// thus an operation with invalid delta needs to be processed as an operation with unavailable delta,
// so here we let delta be `undefined`.
// For compatibility with data pruning, we have to assume that `delta` may be unavailable,
// thus an operation with invalid `delta` needs to be processed as an operation with unavailable `delta`,
// so here we let `delta` be `undefined`.
}
encodedDelta = Encoder.encode(JsonCanonicalizer.canonicalizeAsBuffer(operationObject.delta));
}

return new RecoverOperation(
Expand Down
2 changes: 1 addition & 1 deletion lib/core/versions/latest/RequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class RequestHandler implements IRequestHandler {
if (operationRequest.type === OperationType.Create ||
operationRequest.type === OperationType.Recover ||
operationRequest.type === OperationType.Update) {
Delta.validateEncodedDeltaSize(operationRequest.delta);
Delta.validateDeltaSize(operationRequest.delta);
}

operationModel = await Operation.parse(request);
Expand Down
10 changes: 7 additions & 3 deletions lib/core/versions/latest/UpdateOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Operation from './Operation';
import OperationModel from './models/OperationModel';
import OperationType from '../../enums/OperationType';
import SidetreeError from '../../../common/SidetreeError';
import JsonCanonicalizer from './util/JsonCanonicalizer';

interface SignedDataModel {
deltaHash: string;
Expand Down Expand Up @@ -112,9 +113,12 @@ export default class UpdateOperation implements OperationModel {
if (operationObject.type !== OperationType.Update) {
throw new SidetreeError(ErrorCode.UpdateOperationTypeIncorrect);
}

encodedDelta = operationObject.delta;
delta = await Operation.parseDelta(encodedDelta);
Operation.validateDelta(operationObject.delta);
delta = {
patches: operationObject.delta.patches,
updateCommitment: operationObject.delta.update_commitment
};
encodedDelta = Encoder.encode(JsonCanonicalizer.canonicalizeAsBuffer(operationObject.delta));
}

return new UpdateOperation(operationBuffer, operationObject.did_suffix, signedData, signedDataModel, encodedDelta, delta);
Expand Down
5 changes: 4 additions & 1 deletion lib/core/versions/latest/models/AnchorFileModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export default interface AnchorFileModel {
map_file_uri: string;
operations: {
create?: {
suffix_data: string;
suffix_data: {
delta_hash: string;
recovery_commitment: string;
};
}[],
recover?: {
did_suffix: string;
Expand Down
8 changes: 6 additions & 2 deletions tests/core/AnchorFile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ describe('AnchorFile', async () => {
const anchorFileModel = await AnchorFile.createModel(undefined, mapFileUri, [createOperation], [recoverOperation], [deactivateOperation]);

expect(anchorFileModel.map_file_uri).toEqual(mapFileUri);
expect(anchorFileModel.operations.create![0].suffix_data).toEqual(createOperation.encodedSuffixData);
expect(anchorFileModel.operations.create![0].suffix_data).toEqual({
delta_hash: createOperation.suffixData.deltaHash, recovery_commitment: createOperation.suffixData.recoveryCommitment
});

// Verify recover operation.
const recoveryOperationInAnchorFile = anchorFileModel.operations.recover![0];
Expand All @@ -298,7 +300,9 @@ describe('AnchorFile', async () => {
const anchorFile = await AnchorFile.parse(anchorFileBuffer);

expect(anchorFile.model.map_file_uri).toEqual(mapFileHash);
expect(anchorFile.model.operations.create![0].suffix_data).toEqual(createOperation.encodedSuffixData);
expect(anchorFile.model.operations.create![0].suffix_data).toEqual({
delta_hash: createOperation.suffixData.deltaHash, recovery_commitment: createOperation.suffixData.recoveryCommitment
});
});
});
});
36 changes: 6 additions & 30 deletions tests/core/Did.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,6 @@ describe('DID', async () => {
expect(did.uniqueSuffix).toEqual(uniqueSuffix);
});

it('should create a long-form DID successfully.', async () => {
// Create a long-form DID string.
const createOperationData = await OperationGenerator.generateCreateOperation();
const didMethodName = 'sidetree';
const didUniqueSuffix = createOperationData.createOperation.didUniqueSuffix;
const shortFormDid = `did:${didMethodName}:${didUniqueSuffix}`;
const encodedSuffixData = createOperationData.createOperation.encodedSuffixData;
const encodedDelta = createOperationData.createOperation.encodedDelta;
const longFormDid = `${shortFormDid}?-sidetree-initial-state=${encodedSuffixData}.${encodedDelta}`;

const did = await Did.create(longFormDid, didMethodName);
expect(did.isShortForm).toBeFalsy();
expect(did.didMethodName).toEqual(didMethodName);
expect(did.shortForm).toEqual(shortFormDid);
expect(did.uniqueSuffix).toEqual(didUniqueSuffix);
expect(did.createOperation).toEqual(createOperationData.createOperation);
});

it('should create a long-form DID with suffix data and delta successfully.', async () => {
// Create a long-form DID string.

Expand All @@ -82,22 +64,16 @@ describe('DID', async () => {
expect(did.uniqueSuffix).toEqual(generatedLongFormDidData.didUniqueSuffix);
});

it('should create a testnet long-form DID successfully.', async () => {
it('should create a testnet long-form DID with suffix data and delta successfully.', async () => {
// Create a long-form DID string.
const createOperationData = await OperationGenerator.generateCreateOperation();
const didMethodName = 'sidetree:testnet'; // A method name with network ID.
const didUniqueSuffix = createOperationData.createOperation.didUniqueSuffix;
const shortFormDid = `did:${didMethodName}:${didUniqueSuffix}`;
const encodedSuffixData = createOperationData.createOperation.encodedSuffixData;
const encodedDelta = createOperationData.createOperation.encodedDelta;
const longFormDid = `${shortFormDid}?-sidetree-initial-state=${encodedSuffixData}.${encodedDelta}`;
const generatedLongFormDidData = await OperationGenerator.generateLongFormDid(undefined, undefined, undefined, undefined, 'testnet');
const didMethodName = 'sidetree:testnet';

const did = await Did.create(longFormDid, didMethodName);
const did = await Did.create(generatedLongFormDidData.longFormDid, didMethodName);
expect(did.isShortForm).toBeFalsy();
expect(did.didMethodName).toEqual(didMethodName);
expect(did.shortForm).toEqual(shortFormDid);
expect(did.uniqueSuffix).toEqual(didUniqueSuffix);
expect(did.createOperation).toEqual(createOperationData.createOperation);
expect(did.shortForm).toEqual(generatedLongFormDidData.shortFormDid);
expect(did.uniqueSuffix).toEqual(generatedLongFormDidData.didUniqueSuffix);
});

it('should throw error if more than one query param is provided', async () => {
Expand Down
14 changes: 12 additions & 2 deletions tests/core/RequestHandler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Did from '../../lib/core/versions/latest/Did';
import DidState from '../../lib/core/models/DidState';
import Compressor from '../../lib/core/versions/latest/util/Compressor';
import Config from '../../lib/core/models/Config';
import Encoder from '../../lib/core/versions/latest/Encoder';
import ErrorCode from '../../lib/core/versions/latest/ErrorCode';
import ICas from '../../lib/core/interfaces/ICas';
import IOperationStore from '../../lib/core/interfaces/IOperationStore';
Expand Down Expand Up @@ -138,6 +137,14 @@ describe('RequestHandler', () => {
await batchScheduler.writeOperationBatch();
});

it('should resolve LEGACY long form did from test vectors correctly', async () => {
// TODO: SIP2 #781 delete this test when legacy format is deprecated
const longFormFixture = fs.readFileSync('./tests/fixtures/longFormDid/longFormDid.txt', 'utf8');
const response = await requestHandler.handleResolveRequest(longFormFixture);
expect(response.status).toEqual(ResponseStatus.Succeeded);
expect(response).toEqual(longFormResultingDocument as any);
});

it('should resolve long form did from test vectors correctly', async () => {
const longFormFixture = fs.readFileSync('./tests/fixtures/longFormDid/longFormDid.txt', 'utf8');
const response = await requestHandler.handleResolveRequest(longFormFixture);
Expand Down Expand Up @@ -194,7 +201,10 @@ describe('RequestHandler', () => {
const createOperationRequest = createOperationData.operationRequest;
const getRandomBytesAsync = util.promisify(crypto.randomBytes);
const largeBuffer = await getRandomBytesAsync(4000);
createOperationRequest.delta = Encoder.encode(largeBuffer);
createOperationRequest.delta = {
update_commitment: largeBuffer.toString(),
patches: []
}

const createOperationBuffer = Buffer.from(JSON.stringify(createOperationRequest));
const response = await requestHandler.handleOperationRequest(createOperationBuffer);
Expand Down
39 changes: 37 additions & 2 deletions tests/fixtures/create/create.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
{
"type": "create",
"suffix_data": "eyJkZWx0YV9oYXNoIjoiRWlDTW5jb0xrODlIeWpUYzhRbUU0VVVoNFpzMlhiOGlGTWxBak51WFlDbjZCdyIsInJlY292ZXJ5X2NvbW1pdG1lbnQiOiJFaUF5VklubUZfbnpwYWVmeVdqNkJvTkdkWV85RlJOZWYtV0kzY3JySzZ2SXlBIn0",
"delta": "eyJ1cGRhdGVfY29tbWl0bWVudCI6IkVpQ2prREdERE9udVpxNEtpdzJpY3VkSU45NWJvRE1yR2RZeDRwejhiQnQyYnciLCJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljX2tleXMiOlt7ImlkIjoic2lnbmluZ0tleSIsInR5cGUiOiJFY2RzYVNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTkiLCJqd2siOnsia3R5IjoiRUMiLCJjcnYiOiJzZWNwMjU2azEiLCJ4IjoiSk5PMVhsRGVRNDhxUHhrNkFNbjZFNjMzcWJYdTVXS19uX05rZjBvNWtXYyIsInkiOiJRd1BwQkp1NXRQWkhpMml5VzlZbXRtWWl0YzdiS29ObmNCazhSYWc2RVNRIn0sInB1cnBvc2UiOlsiYXV0aCIsImdlbmVyYWwiXX1dLCJzZXJ2aWNlX2VuZHBvaW50cyI6W3siaWQiOiJzZXJ2aWNlRW5kcG9pbnRJZDEyMyIsInR5cGUiOiJzb21lVHlwZSIsImVuZHBvaW50IjoiaHR0cHM6Ly93d3cudXJsLmNvbSJ9XX19XX0"
"suffix_data": {
"delta_hash": "EiCU610_CcYVE-2o4R9zI6EPDjMDVLZ-wOnqqYnUTOevyQ",
"recovery_commitment": "EiAzN_y4WBLpZsjRXg8GbpRtXAhddATz-vmq3AxMOV2Huw"
},
"delta": {
"update_commitment": "EiDYsJIQG1zJUDmud_hBA4tSg6jfRYXnm9E5Mo4rLfbSTA",
"patches": [
{
"action": "replace",
"document": {
"public_keys": [
{
"id": "signingKey",
"type": "EcdsaSecp256k1VerificationKey2019",
"jwk": {
"kty": "EC",
"crv": "secp256k1",
"x": "rNTDcwHYaCdf7JWuaNnKA-Vw2Na6ZKneRPdg0ADIPjM",
"y": "d40NCILv5q7C0-6aSKA59-6J2iR0q-znGKpcJilr8-w"
},
"purpose": [
"auth",
"general"
]
}
],
"service_endpoints": [
{
"id": "serviceEndpointId123",
"type": "someType",
"endpoint": "https://www.url.com"
}
]
}
}
]
}
}
12 changes: 6 additions & 6 deletions tests/fixtures/create/resultingDocument.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"@context": "https://www.w3.org/ns/did-resolution/v1",
"didDocument": {
"id": "did:sidetree:EiBbDEkbYF5XUBraDOv92wSLaZfetEJETtWvboqFngyAGw",
"id": "did:sidetree:EiCv_jz1Xa3JFPt4ctQ2nr_gf0Xm1hQ_3WWnQq7gh89HxA",
"@context": [
"https://www.w3.org/ns/did/v1",
{
"@base": "did:sidetree:EiBbDEkbYF5XUBraDOv92wSLaZfetEJETtWvboqFngyAGw"
"@base": "did:sidetree:EiCv_jz1Xa3JFPt4ctQ2nr_gf0Xm1hQ_3WWnQq7gh89HxA"
}
],
"service": [
Expand All @@ -23,8 +23,8 @@
"publicKeyJwk": {
"kty": "EC",
"crv": "secp256k1",
"x": "JNO1XlDeQ48qPxk6AMn6E633qbXu5WK_n_Nkf0o5kWc",
"y": "QwPpBJu5tPZHi2iyW9YmtmYitc7bKoNncBk8Rag6ESQ"
"x": "rNTDcwHYaCdf7JWuaNnKA-Vw2Na6ZKneRPdg0ADIPjM",
"y": "d40NCILv5q7C0-6aSKA59-6J2iR0q-znGKpcJilr8-w"
}
}
],
Expand All @@ -34,7 +34,7 @@
},
"methodMetadata": {
"published": true,
"recoveryCommitment": "EiAyVInmF_nzpaefyWj6BoNGdY_9FRNef-WI3crrK6vIyA",
"updateCommitment": "EiCjkDGDDOnuZq4Kiw2icudIN95boDMrGdYx4pz8bBt2bw"
"recoveryCommitment": "EiAzN_y4WBLpZsjRXg8GbpRtXAhddATz-vmq3AxMOV2Huw",
"updateCommitment": "EiDYsJIQG1zJUDmud_hBA4tSg6jfRYXnm9E5Mo4rLfbSTA"
}
}
1 change: 1 addition & 0 deletions tests/fixtures/legacyLongFormDid/longFormDid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
did:sidetree:EiC5-1uBg-YC2DvQRbI6eihDvk7DOYaQ08OB0I3jCe9Ydg?-ion-initial-state=eyJkZWx0YV9oYXNoIjoiRWlBbExNMC1qem1DWi1FcElVZ0laQ2piWk5yMDFfVVBMbnd5MHdfT3I0Rks0dyIsInJlY292ZXJ5X2NvbW1pdG1lbnQiOiJFaUJDNGhTMVVHeVNnTmYzbWFMdnNKRUpxX05aQUlKa0pndTNKMTJMeGNESE93In0.eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljX2tleXMiOlt7ImlkIjoiYW55U2lnbmluZ0tleUlkIiwiandrIjp7ImNydiI6InNlY3AyNTZrMSIsImt0eSI6IkVDIiwieCI6ImFHc01HMHU5Rlg2STU0cGVJS3FZb2tqblFQR2hMVVlUT1FOYzNuT3ZFMVEiLCJ5IjoiZmppbHFoZVdRWWtITkU3MHNoTVJ5TURyWnA4RUdDZkVfYUwzaC15Sm1RQSJ9LCJwdXJwb3NlIjpbImF1dGgiLCJnZW5lcmFsIl0sInR5cGUiOiJFY2RzYVNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTkifV0sInNlcnZpY2VfZW5kcG9pbnRzIjpbeyJlbmRwb2ludCI6Imh0dHA6Ly9hbnkuZW5kcG9pbnQiLCJpZCI6ImFueVNlcnZpY2VFbmRwb2ludElkIiwidHlwZSI6ImFueVR5cGUifV19fV0sInVwZGF0ZV9jb21taXRtZW50IjoiRWlERkM2RE9Ed0JNeG5kX19oMTFSeDRObjFlOHpubFlPUjJhLVBqeUNva2NGZyJ9
40 changes: 40 additions & 0 deletions tests/fixtures/legacyLongFormDid/resultingDocument.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"@context": "https://www.w3.org/ns/did-resolution/v1",
"didDocument": {
"id": "did:ion:EiC5-1uBg-YC2DvQRbI6eihDvk7DOYaQ08OB0I3jCe9Ydg?-ion-initial-state=eyJkZWx0YV9oYXNoIjoiRWlBbExNMC1qem1DWi1FcElVZ0laQ2piWk5yMDFfVVBMbnd5MHdfT3I0Rks0dyIsInJlY292ZXJ5X2NvbW1pdG1lbnQiOiJFaUJDNGhTMVVHeVNnTmYzbWFMdnNKRUpxX05aQUlKa0pndTNKMTJMeGNESE93In0.eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljX2tleXMiOlt7ImlkIjoiYW55U2lnbmluZ0tleUlkIiwiandrIjp7ImNydiI6InNlY3AyNTZrMSIsImt0eSI6IkVDIiwieCI6ImFHc01HMHU5Rlg2STU0cGVJS3FZb2tqblFQR2hMVVlUT1FOYzNuT3ZFMVEiLCJ5IjoiZmppbHFoZVdRWWtITkU3MHNoTVJ5TURyWnA4RUdDZkVfYUwzaC15Sm1RQSJ9LCJwdXJwb3NlIjpbImF1dGgiLCJnZW5lcmFsIl0sInR5cGUiOiJFY2RzYVNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTkifV0sInNlcnZpY2VfZW5kcG9pbnRzIjpbeyJlbmRwb2ludCI6Imh0dHA6Ly9hbnkuZW5kcG9pbnQiLCJpZCI6ImFueVNlcnZpY2VFbmRwb2ludElkIiwidHlwZSI6ImFueVR5cGUifV19fV0sInVwZGF0ZV9jb21taXRtZW50IjoiRWlERkM2RE9Ed0JNeG5kX19oMTFSeDRObjFlOHpubFlPUjJhLVBqeUNva2NGZyJ9",
"@context": [
"https://www.w3.org/ns/did/v1",
{
"@base": "did:ion:EiC5-1uBg-YC2DvQRbI6eihDvk7DOYaQ08OB0I3jCe9Ydg?-ion-initial-state=eyJkZWx0YV9oYXNoIjoiRWlBbExNMC1qem1DWi1FcElVZ0laQ2piWk5yMDFfVVBMbnd5MHdfT3I0Rks0dyIsInJlY292ZXJ5X2NvbW1pdG1lbnQiOiJFaUJDNGhTMVVHeVNnTmYzbWFMdnNKRUpxX05aQUlKa0pndTNKMTJMeGNESE93In0.eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljX2tleXMiOlt7ImlkIjoiYW55U2lnbmluZ0tleUlkIiwiandrIjp7ImNydiI6InNlY3AyNTZrMSIsImt0eSI6IkVDIiwieCI6ImFHc01HMHU5Rlg2STU0cGVJS3FZb2tqblFQR2hMVVlUT1FOYzNuT3ZFMVEiLCJ5IjoiZmppbHFoZVdRWWtITkU3MHNoTVJ5TURyWnA4RUdDZkVfYUwzaC15Sm1RQSJ9LCJwdXJwb3NlIjpbImF1dGgiLCJnZW5lcmFsIl0sInR5cGUiOiJFY2RzYVNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTkifV0sInNlcnZpY2VfZW5kcG9pbnRzIjpbeyJlbmRwb2ludCI6Imh0dHA6Ly9hbnkuZW5kcG9pbnQiLCJpZCI6ImFueVNlcnZpY2VFbmRwb2ludElkIiwidHlwZSI6ImFueVR5cGUifV19fV0sInVwZGF0ZV9jb21taXRtZW50IjoiRWlERkM2RE9Ed0JNeG5kX19oMTFSeDRObjFlOHpubFlPUjJhLVBqeUNva2NGZyJ9"
}
],
"service": [
{
"id": "#anyServiceEndpointId",
"type": "anyType",
"serviceEndpoint": "http://any.endpoint"
}
],
"publicKey": [
{
"id": "#anySigningKeyId",
"controller": "",
"type": "EcdsaSecp256k1VerificationKey2019",
"publicKeyJwk": {
"crv": "secp256k1",
"kty": "EC",
"x": "aGsMG0u9FX6I54peIKqYokjnQPGhLUYTOQNc3nOvE1Q",
"y": "fjilqheWQYkHNE70shMRyMDrZp8EGCfE_aL3h-yJmQA"
}
}
],
"authentication": [
"#anySigningKeyId"
]
},
"methodMetadata": {
"published": false,
"recoveryCommitment": "EiBC4hS1UGySgNf3maLvsJEJq_NZAIJkJgu3J12LxcDHOw",
"updateCommitment": "EiDFC6DODwBMxnd__h11Rx4Nn1e8znlYOR2a-PjyCokcFg"
}
}
Loading

0 comments on commit 8af58e1

Please sign in to comment.