@spindl-xyz/attribution-lite
Version:
Web3 Attribution SDK
17 lines (16 loc) • 483 B
TypeScript
import { Metadata, Primitive } from "./metadata";
import { Sdk } from "./sdk";
export type Beacon = ReturnType<typeof createBeaconPlugin>;
export interface BeaconOptions {
type: string;
data: {
sourceUrl: string;
referrer: string;
[key: string]: Primitive;
};
}
export declare function createBeaconPlugin(sdk: Sdk, metadata: Metadata): {
sendBeacon: <T extends {
type: string;
} = BeaconOptions>(beacon: T) => Promise<boolean>;
};