@ngraveio/ur-blockchain-commons
Version:
A JS implementation of Uniform Resources(UR) Registry specification from Blockchain Commons.
36 lines (35 loc) • 1.4 kB
TypeScript
import { ECKey } from './ECKey';
import { HDKey } from './HDKey';
import { Address } from './Address';
interface IOutputDescriptorInput {
source: string;
keys?: (HDKey | ECKey | Address)[];
name?: string;
note?: string;
}
declare const OutputDescriptor_base: import("@ngraveio/bc-ur").RegistryItemClass<import("@ngraveio/bc-ur").RegistryItemBase>;
export declare class OutputDescriptor extends OutputDescriptor_base {
data: IOutputDescriptorInput;
constructor(input: IOutputDescriptorInput);
}
export {};
/**
* TODO:
* Should be able to parse output descriptor string and convert included values to corresponding classeses (HDKey, ECKey, Address)
* And then inject placeholder replacement values like this key to
* ```
* wsh(
* sortedmulti(
* 2,
* [dc567276/48'/0'/0'/2']xpub6DiYrfRwNnjeX4vHsWMajJVFKrbEEnu8gAW9vDuQzgTWEsEHE16sGWeXXUV1LBWQE1yCTmeprSNcqZ3W74hqVdgDbtYHUv3eM4W2TEUhpan/<0;1>/*,
* [f245ae38/48'/0'/0'/2']xpub6DnT4E1fT8VxuAZW29avMjr5i99aYTHBp9d7fiLnpL5t4JEprQqPMbTw7k7rh5tZZ2F5g8PJpssqrZoebzBChaiJrmEvWwUTEMAbHsY39Ge/<0;1>/*,
* [c5d87297/48'/0'/0'/2']xpub6DjrnfAyuonMaboEb3ZQZzhQ2ZEgaKV2r64BFmqymZqJqviLTe1JzMr2X2RfQF892RH7MyYUbcy77R7pPu1P71xoj8cDUMNhAMGYzKR4noZ/<0;1>/*
* )
* )
* ```
* to
* ```
* wsh(sortedmulti(2,@0,@1,@2))
* ```
* And determine type of key (HDKey, ECKey, Address) based on the string
*/