This repository has been archived on 2023-08-31. You can view files and clone it, but cannot push or open issues or pull requests.
2022-12-30 09:40:14 +00:00
|
|
|
export interface SignedRegistryEntry {
|
|
|
|
pk: Uint8Array;
|
|
|
|
|
|
|
|
// revision number of this entry, maximum is (256^8)-1
|
|
|
|
revision: number;
|
|
|
|
|
|
|
|
// data stored in this entry, can have a maximum length of 48 bytes
|
|
|
|
data: Uint8Array;
|
|
|
|
|
|
|
|
// signature of this registry entry
|
|
|
|
signature?: Uint8Array;
|
|
|
|
}
|
2023-01-06 01:31:14 +00:00
|
|
|
|
|
|
|
export type RegistryStorageConstructor = new (opts?: any) => RegistryStorage;
|
|
|
|
|
|
|
|
export interface RegistryStorage {
|
|
|
|
get(key: string): Promise<boolean | SignedRegistryEntry>;
|
|
|
|
set(key: string, value: SignedRegistryEntry): Promise<boolean>;
|
|
|
|
}
|