-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
As per dashpay/dips#134 (comment).
DashHd.toIdBytes = async function (hdkey) {
let xpubBytes = await DashHd.toXPubBytes(hdkey);
let hashBytes = await crypto.subtle.digest("SHA-256", xpubBytes)
let idBytes = hashBytes.slice(0, 8);
return idBytes;
}
let hdkey = await DashHd.fromXKey(xkey);
let idBytes = DashHd.toIdBytes(hdkey);
let id = bytesToBase64Url(idBytes);
let idBase32Crock = base32crockford.encode(idBytes);
let idHex = DashKeys.utils.bytesToHex(idBytes);
let idInt64 = BigInt(`0x${idHex}`);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels