@dialectlabs/blinks — the Actions Interface
Usage
Chrome Extension
Package provides an entrypoint function with styled for X Blink components
import { setupTwitterObserver } from "@dialectlabs/blinks/ext/twitter";
import { ActionConfig } from "@dialectlabs/blinks";
setupTwitterObserver(new ActionConfig(RPC_URL, {
signTransaction: async (tx: string) => { ... },
connect: async () => { ... }
}))
import { type ActionAdapter } from "@dialectlabs/blinks";
class MyActionAdapter implements ActionAdapter {
async signTransaction(tx: string) { ... }
async connect() { ... }
async confirmTransaction(sig: string) { ... }
}
setupTwitterObserver(new MyActionAdapter());
Learn More: