@ngraveio/ur-uuid
Version:
Provides BC UR type for uuid.
25 lines (24 loc) • 747 B
TypeScript
import { RegistryItemClass } from '@ngraveio/bc-ur';
/**
* Encodes as bytes and decodes to UUID.
*
* Tag: 37
* Data item: byte string
* Semantics: Binary UUID (RFC 4122 section 4.1.2)
* Point of contact: Lucas Clemente <lucas@clemente.io>
* Description of semantics: https://github.com/lucas-clemente/cbor-specs/blob/master/uuid.md
*/
type UUIDInput = string | Uint8Array | UUID;
declare const UUIDBase: RegistryItemClass;
export declare class UUID extends UUIDBase {
data: Uint8Array;
constructor(data: UUIDInput);
static generate(): UUID;
verifyInput(input: UUIDInput): {
valid: boolean;
reasons?: Error[];
};
toString: () => string;
getBuffer: () => Uint8Array<ArrayBufferLike>;
}
export {};