@spindl-xyz/attribution-lite
Version:
Web3 Attribution SDK
15 lines (14 loc) • 572 B
TypeScript
export type Primitive = undefined | string | number | boolean | bigint;
type Values = Primitive | Primitive[];
export type Tuple<Value extends Values = Values> = {
[key: string]: Value;
};
export interface MetadataFactory<Value extends Values> {
getValue(): Tuple<Value> | Promise<Tuple<Value>>;
}
export type MetadataPlugin<Value extends Values = Values> = () => MetadataFactory<Value>;
export interface Metadata {
getMetadata(): Promise<Record<string, Values>>;
}
export declare function createMetadataPlugin(plugins: MetadataPlugin[]): Metadata;
export {};