@ngraveio/ur-blockchain-commons
Version:
A JS implementation of Uniform Resources(UR) Registry specification from Blockchain Commons.
40 lines (36 loc) • 1.24 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountDescriptor = void 0;
const bc_ur_1 = require("@ngraveio/bc-ur");
class AccountDescriptor extends (0, bc_ur_1.registryItemFactory)({
tag: 40311,
URType: 'account-descriptor',
keyMap: {
masterFingerprint: 1,
outputDescriptors: 2,
},
CDDL: `
; Output descriptors here are restricted to HD keys at account level key derivations only (no 0/* or 1/* children keypaths)
output-exp = #6.40308(output-descriptor)
tagged-account = #6.40311(account)
account = {
master-fingerprint: uint32, ; Master fingerprint (fingerprint for the master public key as per BIP32)
output-descriptors: [+ output-exp] ; Output descriptors for various script types for this account
}
master-fingerprint = 1
output-descriptors = 2
`,
}) {
constructor(input) {
super(input);
this.data = input;
}
getMasterFingerprint() {
return this.data.masterFingerprint;
}
getOutputDescriptors() {
return this.data.outputDescriptors;
}
}
exports.AccountDescriptor = AccountDescriptor;
//# sourceMappingURL=AccountDescriptor.js.map