diff --git a/package.json b/package.json index 255fdfb..0611099 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "dependencies": { "@aries-framework/askar": "0.4.2", "@aries-framework/core": "0.4.2", - "@ayanworks/polygon-did-registrar": "0.0.16-alpha.7", - "@ayanworks/polygon-did-resolver": "0.0.16-alpha.8", + "@ayanworks/polygon-did-registrar": "0.0.16-alpha.10", + "@ayanworks/polygon-did-resolver": "0.0.16-alpha.10", "@ayanworks/polygon-schema-manager": "0.0.2-alpha.2", "@sphereon/pex": "^2.2.2", "@sphereon/pex-models": "^2.1.2", diff --git a/patches/@aries-framework+core+0.4.2.patch b/patches/@aries-framework+core+0.4.2.patch index 75b938d..ad1cbbe 100644 --- a/patches/@aries-framework+core+0.4.2.patch +++ b/patches/@aries-framework+core+0.4.2.patch @@ -47,6 +47,39 @@ index 766ca70..6ea2ae3 100644 \ No newline at end of file +{"version":3,"file":"AgentModules.js","sourceRoot":"","sources":["../../src/agent/AgentModules.ts"],"names":[],"mappings":";;;AAIA,8DAA+D;AAC/D,4CAA8C;AAC9C,wDAA0D;AAC1D,wDAA0D;AAC1D,0CAA4C;AAC5C,oFAAoF;AACpF,oEAAqE;AACrE,gEAAiE;AACjE,mEAA+D;AAC/D,wCAAgD;AAChD,8CAAgD;AAChD,gDAA6E;AAC7E,sCAAoD;AACpD,sCAAwC;AAiGxC;;;GAGG;AACH,SAAS,sBAAsB;IAC7B,OAAO;QACL,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,+BAAiB,EAAE;QAC1C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,+BAAiB,EAAE;QAC1C,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAY,EAAE;QAChC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,wBAAc,EAAE;QACpC,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI,kCAAwB,EAAE;QACxD,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,oCAAmB,EAAE;QAC9C,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,oCAAmB,EAAE;QAC9C,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,sCAAoB,EAAE;QAChD,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,0CAAsB,EAAE;QAC7C,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAU,EAAE;QAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAY,EAAE;QAChC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,qBAAe,EAAE;QAChC,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI,yBAAoB,EAAE;QAChD,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,mBAAW,EAAE;QAC9B,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,yDAA6B,EAAE;KACtC,CAAA;AACZ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,+BAA+B,CAC7C,OAAsB;IAEtB,MAAM,eAAe,qBAAgC,OAAO,CAAE,CAAA;IAC9D,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAA;IAEpD,sDAAsD;IACtD,KAAK,MAAM,CAAC,SAAS,EAAE,mBAAmB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE;QAClF,uDAAuD;QACvD,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,CAAC;YAAE,SAAQ;QAE3C,eAAe,CAAC,SAAS,CAAC,GAAG,mBAAmB,EAAE,CAAA;KACnD;IAED,OAAO,eAAqD,CAAA;AAC9D,CAAC;AAfD,0EAeC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,SAAgB,WAAW,CACzB,iBAAoC,EACpC,eAA0B,EAAE;IAE5B,yFAAyF;IACzF,oCAAoC;IACpC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE;QAClG,oBAAoB;QACpB,IAAI,CAAC,MAAM,CAAC,GAAG;YAAE,OAAO,GAAG,CAAA;QAE3B,MAAM,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAEzD,kBAAkB;QAClB,IAAI,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,GAAG,CAAA;QAClD,uCAAY,GAAG,KAAE,CAAC,SAAS,CAAC,EAAE,WAAW,IAAE;IAC7C,CAAC,EAAE,EAAE,CAA2B,CAAA;IAEhC,OAAO,GAAG,CAAA;AACZ,CAAC;AAlBD,kCAkBC"} \ No newline at end of file +diff --git a/node_modules/@aries-framework/core/build/constants.d.ts b/node_modules/@aries-framework/core/build/constants.d.ts +index b33a121..48ef47a 100644 +--- a/node_modules/@aries-framework/core/build/constants.d.ts ++++ b/node_modules/@aries-framework/core/build/constants.d.ts +@@ -7,5 +7,6 @@ export declare const InjectionSymbols: { + Stop$: symbol; + FileSystem: symbol; + Wallet: symbol; ++ DifPresentationExchangeService: symbol; + }; + export declare const DID_COMM_TRANSPORT_QUEUE = "didcomm:transport/queue"; +diff --git a/node_modules/@aries-framework/core/build/constants.js b/node_modules/@aries-framework/core/build/constants.js +index c028c7a..cc4651f 100644 +--- a/node_modules/@aries-framework/core/build/constants.js ++++ b/node_modules/@aries-framework/core/build/constants.js +@@ -10,6 +10,7 @@ exports.InjectionSymbols = { + Stop$: Symbol('Stop$'), + FileSystem: Symbol('FileSystem'), + Wallet: Symbol('Wallet'), ++ DifPresentationExchangeService: Symbol('DifPresentationExchangeService'), + }; + exports.DID_COMM_TRANSPORT_QUEUE = 'didcomm:transport/queue'; + //# sourceMappingURL=constants.js.map +\ No newline at end of file +diff --git a/node_modules/@aries-framework/core/build/constants.js.map b/node_modules/@aries-framework/core/build/constants.js.map +index 9ef98cf..e22430d 100644 +--- a/node_modules/@aries-framework/core/build/constants.js.map ++++ b/node_modules/@aries-framework/core/build/constants.js.map +@@ -1 +1 @@ +-{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,cAAc,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;CACzB,CAAA;AAEY,QAAA,wBAAwB,GAAG,yBAAyB,CAAA"} +\ No newline at end of file ++{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,cAAc,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC;IACxB,8BAA8B,EAAE,MAAM,CAAC,gCAAgC,CAAC;CACzE,CAAA;AAEY,QAAA,wBAAwB,GAAG,yBAAyB,CAAA"} +\ No newline at end of file diff --git a/node_modules/@aries-framework/core/build/crypto/KeyType.d.ts b/node_modules/@aries-framework/core/build/crypto/KeyType.d.ts index d1369ea..337d40e 100644 --- a/node_modules/@aries-framework/core/build/crypto/KeyType.d.ts @@ -125,6 +158,27 @@ index 56f0cc0..9bff8f9 100644 \ No newline at end of file +{"version":3,"file":"keyUtils.js","sourceRoot":"","sources":["../../src/crypto/keyUtils.ts"],"names":[],"mappings":"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"} \ No newline at end of file +diff --git a/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js b/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js +index 3124287..686dbaa 100644 +--- a/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js ++++ b/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js +@@ -12,6 +12,7 @@ const multiCodecPrefixMap = { + 4608: KeyType_1.KeyType.P256, + 4609: KeyType_1.KeyType.P384, + 4610: KeyType_1.KeyType.P521, ++ 231: KeyType_1.KeyType.K256, + }; + function getKeyTypeByMultiCodecPrefix(multiCodecPrefix) { + const keyType = multiCodecPrefixMap[multiCodecPrefix]; +diff --git a/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js.map b/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js.map +index 96a01e5..9cc6970 100644 +--- a/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js.map ++++ b/node_modules/@aries-framework/core/build/crypto/multiCodecKey.js.map +@@ -1 +1 @@ +-{"version":3,"file":"multiCodecKey.js","sourceRoot":"","sources":["../../src/crypto/multiCodecKey.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,4EAA4E;AAC5E,MAAM,mBAAmB,GAA4B;IACnD,GAAG,EAAE,iBAAO,CAAC,UAAU;IACvB,GAAG,EAAE,iBAAO,CAAC,UAAU;IACvB,GAAG,EAAE,iBAAO,CAAC,MAAM;IACnB,GAAG,EAAE,iBAAO,CAAC,OAAO;IACpB,GAAG,EAAE,iBAAO,CAAC,YAAY;IACzB,IAAI,EAAE,iBAAO,CAAC,IAAI;IAClB,IAAI,EAAE,iBAAO,CAAC,IAAI;IAClB,IAAI,EAAE,iBAAO,CAAC,IAAI;CACnB,CAAA;AAED,SAAgB,4BAA4B,CAAC,gBAAwB;IACnE,MAAM,OAAO,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;IAErD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,8CAA8C,gBAAgB,GAAG,CAAC,CAAA;KACnF;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AARD,oEAQC;AAED,SAAgB,4BAA4B,CAAC,OAAgB;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,CAAA;IAEtE,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,kDAAkD,OAAO,GAAG,CAAC,CAAA;KAC9E;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;AACrB,CAAC;AATD,oEASC"} +\ No newline at end of file ++{"version":3,"file":"multiCodecKey.js","sourceRoot":"","sources":["../../src/crypto/multiCodecKey.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,4EAA4E;AAC5E,MAAM,mBAAmB,GAA4B;IACnD,GAAG,EAAE,iBAAO,CAAC,UAAU;IACvB,GAAG,EAAE,iBAAO,CAAC,UAAU;IACvB,GAAG,EAAE,iBAAO,CAAC,MAAM;IACnB,GAAG,EAAE,iBAAO,CAAC,OAAO;IACpB,GAAG,EAAE,iBAAO,CAAC,YAAY;IACzB,IAAI,EAAE,iBAAO,CAAC,IAAI;IAClB,IAAI,EAAE,iBAAO,CAAC,IAAI;IAClB,IAAI,EAAE,iBAAO,CAAC,IAAI;IAClB,GAAG,EAAE,iBAAO,CAAC,IAAI;CAClB,CAAA;AAED,SAAgB,4BAA4B,CAAC,gBAAwB;IACnE,MAAM,OAAO,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;IAErD,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,8CAA8C,gBAAgB,GAAG,CAAC,CAAA;KACnF;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AARD,oEAQC;AAED,SAAgB,4BAA4B,CAAC,OAAgB;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,CAAA;IAEtE,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,kDAAkD,OAAO,GAAG,CAAC,CAAA;KAC9E;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,CAAA;AACrB,CAAC;AATD,oEASC"} +\ No newline at end of file diff --git a/node_modules/@aries-framework/core/build/decorators/attachment/Attachment.d.ts b/node_modules/@aries-framework/core/build/decorators/attachment/Attachment.d.ts index 8e10c7e..0605939 100644 --- a/node_modules/@aries-framework/core/build/decorators/attachment/Attachment.d.ts @@ -201,10 +255,10 @@ index 0000000..2d10f87 +export declare const keyDidSecp256k1: KeyDidMapping; diff --git a/node_modules/@aries-framework/core/build/modules/dids/domain/key-type/secp256k1.js b/node_modules/@aries-framework/core/build/modules/dids/domain/key-type/secp256k1.js new file mode 100644 -index 0000000..48e5a9b +index 0000000..991e946 --- /dev/null +++ b/node_modules/@aries-framework/core/build/modules/dids/domain/key-type/secp256k1.js -@@ -0,0 +1,19 @@ +@@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.keyDidSecp256k1 = void 0; @@ -212,14 +266,18 @@ index 0000000..48e5a9b +const error_1 = require("../../../../error"); +const verificationMethod_1 = require("../verificationMethod"); +exports.keyDidSecp256k1 = { -+ supportedVerificationMethodTypes: [verificationMethod_1.VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019], -+ getVerificationMethods: (did, key) => [ -+ (0, verificationMethod_1.getEcdsaSecp256k1VerificationKey2019)({ id: `${did}#key-1`, key, controller: did }), ++ supportedVerificationMethodTypes: [ ++ verificationMethod_1.VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, ++ verificationMethod_1.VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020, + ], ++ getVerificationMethods: (did, key) => [(0, verificationMethod_1.getJsonWebKey2020)({ did, key })], + getKeyFromVerificationMethod: (verificationMethod) => { + if ((0, verificationMethod_1.isEcdsaSecp256k1VerificationKey2019)(verificationMethod)) { + return (0, verificationMethod_1.getKeyFromEcdsaSecp256k1VerificationKey2019)(verificationMethod); + } ++ if ((0, verificationMethod_1.isJsonWebKey2020)(verificationMethod)) { ++ return (0, verificationMethod_1.getKeyFromJsonWebKey2020)(verificationMethod); ++ } + throw new error_1.AriesFrameworkError(`Verification method with type '${verificationMethod.type}' not supported for key type '${KeyType_1.KeyType.K256}'`); + }, +}; @@ -227,11 +285,11 @@ index 0000000..48e5a9b \ No newline at end of file diff --git a/node_modules/@aries-framework/core/build/modules/dids/domain/key-type/secp256k1.js.map b/node_modules/@aries-framework/core/build/modules/dids/domain/key-type/secp256k1.js.map new file mode 100644 -index 0000000..b469b40 +index 0000000..41acac0 --- /dev/null +++ b/node_modules/@aries-framework/core/build/modules/dids/domain/key-type/secp256k1.js.map @@ -0,0 +1 @@ -+{"version":3,"file":"secp256k1.js","sourceRoot":"","sources":["../../../../../src/modules/dids/domain/key-type/secp256k1.ts"],"names":[],"mappings":";;;AAGA,wDAAoD;AACpD,6CAAuD;AACvD,8DAK8B;AAEjB,QAAA,eAAe,GAAkB;IAC5C,gCAAgC,EAAE,CAAC,mFAA8D,CAAC;IAClG,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACpC,IAAA,yDAAoC,EAAC,EAAE,EAAE,EAAE,GAAG,GAAG,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;KACnF;IACD,4BAA4B,EAAE,CAAC,kBAAsC,EAAE,EAAE;QACvE,IAAI,IAAA,wDAAmC,EAAC,kBAAkB,CAAC,EAAE;YAC3D,OAAO,IAAA,gEAA2C,EAAC,kBAAkB,CAAC,CAAA;SACvE;QAED,MAAM,IAAI,2BAAmB,CAC3B,kCAAkC,kBAAkB,CAAC,IAAI,iCAAiC,iBAAO,CAAC,IAAI,GAAG,CAC1G,CAAA;IACH,CAAC;CACF,CAAA"} ++{"version":3,"file":"secp256k1.js","sourceRoot":"","sources":["../../../../../src/modules/dids/domain/key-type/secp256k1.ts"],"names":[],"mappings":";;;AAGA,wDAAoD;AACpD,6CAAuD;AACvD,8DAQ8B;AAEjB,QAAA,eAAe,GAAkB;IAC5C,gCAAgC,EAAE;QAChC,mFAA8D;QAC9D,+DAA0C;KAC3C;IACD,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAA,sCAAiB,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IACvE,4BAA4B,EAAE,CAAC,kBAAsC,EAAE,EAAE;QACvE,IAAI,IAAA,wDAAmC,EAAC,kBAAkB,CAAC,EAAE;YAC3D,OAAO,IAAA,gEAA2C,EAAC,kBAAkB,CAAC,CAAA;SACvE;QAED,IAAI,IAAA,qCAAgB,EAAC,kBAAkB,CAAC,EAAE;YACxC,OAAO,IAAA,6CAAwB,EAAC,kBAAkB,CAAC,CAAA;SACpD;QAED,MAAM,IAAI,2BAAmB,CAC3B,kCAAkC,kBAAkB,CAAC,IAAI,iCAAiC,iBAAO,CAAC,IAAI,GAAG,CAC1G,CAAA;IACH,CAAC;CACF,CAAA"} \ No newline at end of file diff --git a/node_modules/@aries-framework/core/build/modules/dids/domain/keyDidDocument.js b/node_modules/@aries-framework/core/build/modules/dids/domain/keyDidDocument.js index efafb05..bead61c 100644 @@ -2027,33 +2085,3 @@ index 91e4a29..9782198 100644 \ No newline at end of file +{"version":3,"file":"W3cPresentation.js","sourceRoot":"","sources":["../../../../../src/modules/vc/models/presentation/W3cPresentation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,yDAA0C;AAC1C,qDAAsF;AAEtF,6CAAmD;AAEnD,6DAAkF;AAClF,+CAA0F;AAC1F,6GAAyG;AACzG,wFAAoF;AACpF,iDAA4D;AAC5D,mFAA0F;AAE1F,2CAA0E;AAU1E,MAAa,eAAe;IAC1B,YAAmB,OAA+B;;QAChD,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAA;YACpB,IAAI,CAAC,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,CAAC,sCAA0B,CAAC,CAAA;YAC9D,IAAI,CAAC,IAAI,GAAG,MAAA,OAAO,CAAC,IAAI,mCAAI,CAAC,wCAA4B,CAAC,CAAA;YAC1D,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAA;YAExD,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,IAAI,CAAC,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,qBAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;aAClG;SACF;IACH,CAAC;IAuBD,IAAW,QAAQ;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAA;QAE7B,OAAO,IAAI,CAAC,MAAM,YAAY,qBAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;IACxE,CAAC;IAEM,MAAM;QACX,OAAO,uBAAe,CAAC,MAAM,CAAC,IAAI,CAAwB,CAAA;IAC5D,CAAC;CACF;AA9BC;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,IAAA,sCAAyB,GAAE;8BACX,KAAK;gDAAqB;AAE3C;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,kBAAK,GAAE;;2CACU;AAElB;IAAC,4BAA4B,EAAE;8BACjB,KAAK;6CAAQ;AAE3B;IAAC,IAAA,gCAAoB,GAAE;IACtB,IAAA,uBAAW,GAAE;IACb,IAAA,4BAAU,GAAE;;+CACqB;AAElC;IAAC,IAAA,4DAAkC,GAAE;IACpC,IAAA,yCAA4B,EAAC,EAAE,SAAS,EAAE,CAAC,6DAA6B,EAAE,uDAA0B,CAAC,EAAE,CAAC;IACxG,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;6DACqC;AAjCtE,0CA4CC;AAED,oBAAoB;AAEpB,SAAgB,4BAA4B,CAAC,iBAAqC;IAChF,OAAO,IAAA,4BAAU,EACf;QACE,IAAI,EAAE,8BAA8B;QACpC,SAAS,EAAE;YACT,QAAQ,EAAE,CAAC,KAAK,EAAW,EAAE;gBAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,wCAA4B,CAAC,CAAA;iBACpD;gBACD,OAAO,KAAK,CAAA;YACd,CAAC;YACD,cAAc,EAAE,IAAA,8BAAY,EAC1B,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+EAA+E,EAC5G,iBAAiB,CAClB;SACF;KACF,EACD,iBAAiB,CAClB,CAAA;AACH,CAAC;AAnBD,oEAmBC"} \ No newline at end of file -diff --git a/node_modules/@aries-framework/core/package.json b/node_modules/@aries-framework/core/package.json -index bd33ae9..09a01cb 100644 ---- a/node_modules/@aries-framework/core/package.json -+++ b/node_modules/@aries-framework/core/package.json -@@ -30,6 +30,9 @@ - "@stablelib/ed25519": "^1.0.2", - "@stablelib/random": "^1.0.1", - "@stablelib/sha256": "^1.0.1", -+ "@sphereon/pex": "^2.2.2", -+ "@sphereon/pex-models": "^2.1.2", -+ "@sphereon/ssi-types": "^0.17.5", - "@types/node-fetch": "2.6.2", - "@types/ws": "^8.5.4", - "abort-controller": "^3.0.0", -@@ -39,6 +42,7 @@ - "class-transformer": "0.5.1", - "class-validator": "0.14.0", - "did-resolver": "^4.1.0", -+ "jsonpath": "^1.1.1", - "lru_map": "^0.4.1", - "luxon": "^3.3.0", - "make-error": "^1.3.6", -@@ -53,6 +57,7 @@ - }, - "devDependencies": { - "@types/events": "^3.0.0", -+ "@types/jsonpath": "^0.2.4", - "@types/luxon": "^3.2.0", - "@types/object-inspect": "^1.8.0", - "@types/uuid": "^9.0.1", diff --git a/src/dids/PolygonDidRegistrar.ts b/src/dids/PolygonDidRegistrar.ts index 91e6fb8..83665db 100644 --- a/src/dids/PolygonDidRegistrar.ts +++ b/src/dids/PolygonDidRegistrar.ts @@ -10,7 +10,6 @@ import type { Buffer, Wallet, } from '@aries-framework/core' -import type { ResolverRegistry } from 'did-resolver' import { AskarWallet } from '@aries-framework/askar' import { @@ -22,6 +21,9 @@ import { DidDocument, AriesFrameworkError, WalletError, + isValidPrivateKey, + getEcdsaSecp256k1VerificationKey2019, + DidDocumentBuilder, } from '@aries-framework/core' import { getResolver } from '@ayanworks/polygon-did-resolver' import { Resolver } from 'did-resolver' @@ -29,11 +31,11 @@ import { SigningKey } from 'ethers' import { PolygonLedgerService } from '../ledger' -import { buildDid, validateSpecCompliantPayload } from './didPolygonUtil' +import { buildDid, getSecp256k1DidDoc, validateSpecCompliantPayload } from './didPolygonUtil' export class PolygonDidRegistrar implements DidRegistrar { public readonly supportedMethods = ['polygon'] - private resolver = new Resolver(getResolver() as ResolverRegistry) + private resolver = new Resolver(getResolver()) public async create(agentContext: AgentContext, options: PolygonDidCreateOptions): Promise { const ledgerService = agentContext.dependencyManager.resolve(PolygonLedgerService) @@ -53,11 +55,10 @@ export class PolygonDidRegistrar implements DidRegistrar { const didRegistry = ledgerService.createDidRegistryInstance(signingKey) - const response = await didRegistry.create({ - did, - publicKeyBase58: key.publicKeyBase58, - serviceEndpoint: options.options.endpoint, - }) + // Create did document + const secpDidDoc = getSecp256k1DidDoc(did, key, options.options.endpoint) + + const response = await didRegistry.create(did, secpDidDoc) agentContext.config.logger.info(`Published did on ledger: ${did}`) @@ -111,8 +112,7 @@ export class PolygonDidRegistrar implements DidRegistrar { didDocument = options.didDocument const resolvedDocument = await this.resolver.resolve(didDocument.id) didRecord = await didRepository.findCreatedDid(agentContext, didDocument.id) - // TODO: Add condition to check if did is deactivated - if (!resolvedDocument.didDocument || !didRecord) { + if (!resolvedDocument.didDocument || resolvedDocument.didDocumentMetadata.deactivated || !didRecord) { return { didDocumentMetadata: {}, didRegistrationMetadata: {}, @@ -122,6 +122,35 @@ export class PolygonDidRegistrar implements DidRegistrar { }, } } + + if (options?.secret?.privateKey) { + const privateKey = options?.secret?.privateKey + if (privateKey && !isValidPrivateKey(privateKey, KeyType.K256)) { + return { + didDocumentMetadata: {}, + didRegistrationMetadata: {}, + didState: { + state: 'failed', + reason: 'Invalid private key provided', + }, + } + } + + const key = await agentContext.wallet.createKey({ + keyType: KeyType.K256, + privateKey: privateKey, + }) + + const verificationMethodCount = didDocument?.verificationMethod?.length ?? 0 + + const verificationMethod = getEcdsaSecp256k1VerificationKey2019({ + id: `${didDocument.id}#key-${verificationMethodCount + 1}`, + key, + controller: didDocument.id, + }) + + didDocument.verificationMethod = [...(didDocument?.verificationMethod ?? []), verificationMethod] + } } else { return { didDocumentMetadata: {}, @@ -134,7 +163,14 @@ export class PolygonDidRegistrar implements DidRegistrar { } if (!didRecord) { - throw new AriesFrameworkError('') + return { + didDocumentMetadata: {}, + didRegistrationMetadata: {}, + didState: { + state: 'failed', + reason: 'DidRecord not found in wallet', + }, + } } const publicKeyBase58 = await this.getPublicKeyFromDid(agentContext, options.did) @@ -180,9 +216,71 @@ export class PolygonDidRegistrar implements DidRegistrar { } } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public async deactivate(agentContext: AgentContext, options: DidDeactivateOptions): Promise { - throw new Error('Method not implemented.') + const didRepository = agentContext.dependencyManager.resolve(DidRepository) + const ledgerService = agentContext.dependencyManager.resolve(PolygonLedgerService) + + const did = options.did + + try { + const { didDocument, didDocumentMetadata } = await this.resolver.resolve(did) + + const didRecord = await didRepository.findCreatedDid(agentContext, did) + if (!didDocument || didDocumentMetadata.deactivated || !didRecord) { + return { + didDocumentMetadata: {}, + didRegistrationMetadata: {}, + didState: { + state: 'failed', + reason: 'Did not found', + }, + } + } + + const publicKeyBase58 = await this.getPublicKeyFromDid(agentContext, options.did) + + if (!publicKeyBase58) { + throw new AriesFrameworkError('Public Key not found in wallet') + } + + const signingKey = await this.getSigningKey(agentContext.wallet, publicKeyBase58) + + const didRegistry = ledgerService.createDidRegistryInstance(signingKey) + + const updatedDidDocument = new DidDocumentBuilder(options.did).addContext('https://www.w3.org/ns/did/v1').build() + + const response = await didRegistry.update(didDocument.id, updatedDidDocument) + + if (!response) { + throw new AriesFrameworkError(`Unable to deactivate did document for did : ${did}`) + } + + await didRepository.update(agentContext, didRecord) + + return { + didDocumentMetadata: { + deactivated: true, + }, + didRegistrationMetadata: {}, + didState: { + state: 'finished', + did: didDocument.id, + didDocument: JsonTransformer.fromJSON(didDocument, DidDocument), + secret: options.secret, + }, + } + } catch (error) { + const errorMessage = error instanceof Error ? error.message : 'Unknown error' + agentContext.config.logger.error(`Error deactivating DID ${errorMessage}`) + return { + didDocumentMetadata: {}, + didRegistrationMetadata: {}, + didState: { + state: 'failed', + reason: `unknownError: ${errorMessage}`, + }, + } + } } private async getSigningKey(wallet: Wallet, publicKeyBase58: string): Promise { @@ -237,4 +335,7 @@ export interface PolygonDidUpdateOptions extends DidUpdateOptions { method: 'polygon' did: string didDocument: DidDocument + secret?: { + privateKey: Buffer + } } diff --git a/src/dids/didPolygonUtil.ts b/src/dids/didPolygonUtil.ts index 9f6bcbd..e0451fc 100644 --- a/src/dids/didPolygonUtil.ts +++ b/src/dids/didPolygonUtil.ts @@ -1,8 +1,15 @@ -import type { DidCreateResult, DidDocument } from '@aries-framework/core' - +import type { DidCreateResult, DidDocument, Key } from '@aries-framework/core' + +import { + AriesFrameworkError, + DidDocumentBuilder, + DidDocumentService, + VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, + getEcdsaSecp256k1VerificationKey2019, +} from '@aries-framework/core' import { computeAddress } from 'ethers' -export const VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019 = 'EcdsaSecp256k1VerificationKey2019' +import { SECURITY_CONTEXT_SECP256k1_URL } from '../signature-suites/EcdsaSecp256k1Signature2019' export const polygonDidRegex = new RegExp(/^did:polygon(:testnet)?:0x[0-9a-fA-F]{40}$/) @@ -29,6 +36,45 @@ export function failedResult(reason: string): DidCreateResult { } } +export function getSecp256k1DidDoc(did: string, key: Key, serviceEndpoint?: string): DidDocument { + const verificationMethod = getEcdsaSecp256k1VerificationKey2019({ + id: `${did}#key-1`, + key, + controller: did, + }) + + const didDocumentBuilder = new DidDocumentBuilder(did) + didDocumentBuilder.addContext(SECURITY_CONTEXT_SECP256k1_URL).addVerificationMethod(verificationMethod) + + if (serviceEndpoint) { + const service = new DidDocumentService({ + id: `${did}#linked-domain`, + serviceEndpoint, + type: 'LinkedDomains', + }) + + didDocumentBuilder.addService(service) + } + + if (!key.supportsEncrypting && !key.supportsSigning) { + throw new AriesFrameworkError('Key must support at least signing or encrypting') + } + + if (key.supportsSigning) { + didDocumentBuilder + .addAuthentication(verificationMethod.id) + .addAssertionMethod(verificationMethod.id) + .addCapabilityDelegation(verificationMethod.id) + .addCapabilityInvocation(verificationMethod.id) + } + + if (key.supportsEncrypting) { + didDocumentBuilder.addKeyAgreement(verificationMethod.id) + } + + return didDocumentBuilder.build() +} + export function validateSpecCompliantPayload(didDocument: DidDocument): string | null { // id is required, validated on both compile and runtime if (!didDocument.id && !didDocument.id.startsWith('did:polygon:')) return 'id is required' diff --git a/src/dids/index.ts b/src/dids/index.ts index 1f8e416..a1554a5 100644 --- a/src/dids/index.ts +++ b/src/dids/index.ts @@ -1,2 +1,3 @@ -export { PolygonDidResolver } from './PolygonDidResolver' -export { PolygonDidRegistrar } from './PolygonDidRegistrar' +export * from './PolygonDidRegistrar' +export * from './PolygonDidResolver' +export * from './didPolygonUtil' diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 2ae272d..0a28e44 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,6 +1,6 @@ import { PolygonDID } from '@ayanworks/polygon-did-registrar' export const generateSecp256k1KeyPair = async () => { - const { privateKey, publicKeyBase58, address } = await PolygonDID.createKeyPair() + const { privateKey, publicKeyBase58, address } = await PolygonDID.createKeyPair('testnet') return { privateKey, publicKeyBase58, address } } diff --git a/tests/fixtures.ts b/tests/fixtures.ts index a7ae3e1..116eb13 100644 --- a/tests/fixtures.ts +++ b/tests/fixtures.ts @@ -180,39 +180,26 @@ export const EcdsaSecp256k1Signature2019Fixtures = { export const PolygonDIDFixtures = { VALID_DID_DOCUMENT: { '@context': ['https://w3id.org/did/v1', 'https://w3id.org/security/suites/secp256k1-2019/v1'], - id: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771', + id: 'did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72', verificationMethod: [ { - id: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771#key-1', + id: 'did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#$key-1', type: 'EcdsaSecp256k1VerificationKey2019', - controller: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771', - publicKeyBase58: 'ygG9PXu9eooJHivLv192iyY1mNQyU7nqeUqDpw6vwWum', - }, - ], - authentication: [ - 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771', - { - id: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771#key-1', - type: 'EcdsaSecp256k1VerificationKey2019', - controller: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771', - publicKeyBase58: 'ygG9PXu9eooJHivLv192iyY1mNQyU7nqeUqDpw6vwWum', - }, - ], - assertionMethod: [ - 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771', - { - id: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771#key-1', - type: 'EcdsaSecp256k1VerificationKey2019', - controller: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771', - publicKeyBase58: 'ygG9PXu9eooJHivLv192iyY1mNQyU7nqeUqDpw6vwWum', + controller: 'did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72', + publicKeyBase58: 'uWa49bYNSW9JSdcYJbXRjYw2a5nFW8MLusUYjWKjKoay', }, ], service: [ { - id: 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771#linked-domain', - type: 'LinkedDomains', + id: 'did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#linked-domain', serviceEndpoint: 'https://example.com', + type: 'LinkedDomains', }, ], + authentication: ['did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#$key-1'], + assertionMethod: ['did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#$key-1'], + keyAgreement: ['did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#$key-1'], + capabilityInvocation: ['did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#$key-1'], + capabilityDelegation: ['did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72#$key-1'], }, } diff --git a/tests/polygon-did.e2e.test.ts b/tests/polygon-did.e2e.test.ts index 085f0eb..8e4472b 100644 --- a/tests/polygon-did.e2e.test.ts +++ b/tests/polygon-did.e2e.test.ts @@ -1,17 +1,7 @@ import type { EncryptedMessage } from '@aries-framework/core' import { AskarModule } from '@aries-framework/askar' -import { - Agent, - ConsoleLogger, - DidDocument, - DidsModule, - JsonTransformer, - KeyType, - LogLevel, - TypedArrayEncoder, - utils, -} from '@aries-framework/core' +import { Agent, ConsoleLogger, DidsModule, KeyType, LogLevel, TypedArrayEncoder, utils } from '@aries-framework/core' import { agentDependencies } from '@aries-framework/node' import { ariesAskar } from '@hyperledger/aries-askar-nodejs' import { Subject } from 'rxjs' @@ -27,7 +17,7 @@ const logger = new ConsoleLogger(LogLevel.info) export type SubjectMessage = { message: EncryptedMessage; replySubject?: Subject } -const did = 'did:polygon:testnet:0x50e775B5c3050e8B2Cfa404C3dE95ab97E43e771' +const did = 'did:polygon:testnet:0x186f462430f90fee2b58609Dcf0539F08c400A72' describe('Polygon Module did resolver', () => { let aliceAgent: Agent<{ askar: AskarModule; polygon: PolygonModule; dids: DidsModule }> @@ -142,27 +132,5 @@ describe('Polygon Module did resolver', () => { expect(result.didDocument).toEqual(null) expect(result.didResolutionMetadata.error).toEqual('notFound') }) - - it('should update the DID doc when new DIDDoc is passed', async () => { - const didDocument = JsonTransformer.fromJSON(PolygonDIDFixtures.VALID_DID_DOCUMENT, DidDocument) - - const response = await aliceAgent.dids.update({ - did, - didDocument, - secret: { - privateKey: TypedArrayEncoder.fromHex('393a414a50885766089b0d33ddc22276e141a71a6a1dded4f224e67a0a43cc99'), - }, - }) - - expect(response).toEqual({ - didDocumentMetadata: {}, - didRegistrationMetadata: {}, - didState: { - state: 'finished', - did: didDocument.id, - didDocument, - }, - }) - }) }) }) diff --git a/tests/utils.ts b/tests/utils.ts index c3a70e2..c6a9572 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -10,7 +10,6 @@ import { DidsModule, InjectionSymbols, LogLevel, - TypedArrayEncoder, utils, } from '@aries-framework/core' import { agentDependencies } from '@aries-framework/node' @@ -60,7 +59,6 @@ export function getAgentConfig( polygon: new PolygonModule({ rpcUrl: 'https://rpc-mumbai.maticvigil.com/', didContractAddress: '0x12513116875BB3E4F098Ce74624739Ee51bAf023', - privateKey: TypedArrayEncoder.fromHex('7229440234c231c8dc067ef2425bc694f202514779a02876c1d273b00adf66fb'), fileServerToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6IjdmYjRmN2I3LWQ5ZWUtNDYxOC04OTE4LWZiMmIzYzY1M2EyYiJ9.x-kHeTVqX4w19ibSAspCYgIL-JFVss8yZ0CT21QVRYM', schemaManagerContractAddress: '0x67e8223D80aEcb337FE8D90dD41845A0DA31B4b0', diff --git a/yarn.lock b/yarn.lock index c267aa8..657ad9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -85,16 +85,18 @@ dependencies: static-eval "2.0.2" -"@ayanworks/polygon-did-registrar@0.0.16-alpha.7": - version "0.0.16-alpha.7" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registrar/-/polygon-did-registrar-0.0.16-alpha.7.tgz#10a675ff307fda69ced2b6ffe12dad5bfb6f5878" - integrity sha512-n2BwxQgU5ibPe6u1tK7Gos8Yydc6xcqIOJ+qQRPktFbTgeeU3rpljxHuRsavlHMl0QvjtQbhdwGggIXyCal/lQ== +"@ayanworks/polygon-did-registrar@0.0.16-alpha.10": + version "0.0.16-alpha.10" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registrar/-/polygon-did-registrar-0.0.16-alpha.10.tgz#780755b037e21d7122cb708d3a03f746ff663357" + integrity sha512-XOPt5aAFhLFZsoThgaWf0AtVxwP5MSbZgJgCWioj7GWYEbp88z4tlB+h+R71Ec0vSbFOU4fgyroXGrfMNH/ttg== dependencies: "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.3" + "@ayanworks/polygon-did-resolver" "^0.0.16-alpha.10" "@ethersproject/basex" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" "@ethersproject/transactions" "^5.7.0" "@ethersproject/wallet" "^5.7.0" + did-resolver "^4.1.0" ethers "^6.9.0" uuid "^9.0.1" @@ -103,10 +105,10 @@ resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-registry-contract/-/polygon-did-registry-contract-2.0.1-alpha.3.tgz#7bb932b712a4c48df857682f27adfb08154c4358" integrity sha512-8FZZVAmzXZn0pjZasuxdRblL0obK91JoaoXzpM4oZ7hD5VRUbiWf7BTh17WsWc6Oaf6XtafT4csuBo11fZiUoQ== -"@ayanworks/polygon-did-resolver@0.0.16-alpha.8": - version "0.0.16-alpha.8" - resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-resolver/-/polygon-did-resolver-0.0.16-alpha.8.tgz#bea0d7343a2079cc849a3f7f2e358ed58fefd6f1" - integrity sha512-rTubdjbwGtvIoSpR3OWp/7SseShCZNzJ41Rd5yL/Y/xYlX8PJr2zWUM0pcUouReVQzgeAYuUphHAV0QpqWRoSQ== +"@ayanworks/polygon-did-resolver@0.0.16-alpha.10", "@ayanworks/polygon-did-resolver@^0.0.16-alpha.10": + version "0.0.16-alpha.10" + resolved "https://registry.yarnpkg.com/@ayanworks/polygon-did-resolver/-/polygon-did-resolver-0.0.16-alpha.10.tgz#85eb53f2f6dd53c5e6342e9d6d0c70bb560fa281" + integrity sha512-RfxDr+bggYcLsdN6nK+VKwjVLZzy3AqGULSsYT2bU+4n8obptufVIDg1cjbI4zi0eQIVmtkUeaHcJMlaR6wvvA== dependencies: "@ayanworks/polygon-did-registry-contract" "2.0.1-alpha.3" did-resolver "^4.1.0"