@bitgo/utxo-lib
Version:
Client-side Bitcoin JavaScript library
27 lines • 1.4 kB
TypeScript
import { PsbtInput, PsbtOutput } from 'bip174/src/lib/interfaces';
import { ProprietaryKey } from 'bip174/src/lib/proprietaryKeyVal';
import { Psbt } from '../';
/**
* Psbt proprietary keydata object search fields.
* <compact size uint identifier length> <bytes identifier> <compact size uint subtype> <bytes subkeydata>
*/
export interface ProprietaryKeySearch {
identifier: string;
subtype?: number;
keydata?: Buffer;
identifierEncoding?: BufferEncoding;
}
/**
* Psbt proprietary keydata object.
* <compact size uint identifier length> <bytes identifier> <compact size uint subtype> <bytes subkeydata>
* => <bytes valuedata>
*/
export interface ProprietaryKeyValue {
key: ProprietaryKey;
value: Buffer;
}
export declare function getProprietaryKeyValuesFromUnknownKeyValues(psbtField: PsbtInput | PsbtOutput, keySearch?: ProprietaryKeySearch): ProprietaryKeyValue[];
export declare function deleteProprietaryKeyValuesFromUnknownKeyValues(psbtField: PsbtInput | PsbtOutput, keysToDelete?: ProprietaryKeySearch): void;
export declare function updateProprietaryKeyValuesFromUnknownKeyValues(keyValueData: ProprietaryKeyValue, psbtField: PsbtInput | PsbtOutput): void;
export declare function addProprietaryKeyValuesFromUnknownKeyValues(psbt: Psbt, entry: string, index: number, keyValueData: ProprietaryKeyValue): void;
//# sourceMappingURL=ProprietaryKeyValUtils.d.ts.map