Open lemoustachiste opened 2 years ago
Actually it looks like it's not available at all. In a former version of the package I was using keyUtils
as follows:
function retrieveIssuingAddress (verificationMethodPublicKey: IDidDocumentPublicKey, chain: IBlockchainObject): string {
const publicKey = keyUtils.publicKeyUInt8ArrayFromJwk(verificationMethodPublicKey.publicKeyJwk as keyUtils.ISecp256k1PublicKeyJwk);
const address = bitcoin.payments.p2pkh({ pubkey: publicKey, network: bitcoin.networks[chain.code] }).address;
return address;
}
And on my issuing side:
function jwkFrom (key: Buffer, isPrivate: boolean = false): any /* @trust/keyto */ {
const keyToHexString = key.toString('hex');
if (isPrivate) {
return keyUtils.privateKeyJwkFromPrivateKeyHex(keyToHexString);
}
return keyUtils.publicKeyJwkFromPublicKeyHex(keyToHexString);
}
Are those still available for consumption?
Similarly to this error: https://github.com/transmute-industries/verifiable-data/issues/73, I am also encountering a build issue with
did-key-secp256k1
: