Skip to content

phantom/blinks

This branch is 4 commits ahead of, 149 commits behind dialectlabs/blinks:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

369fbd4 · Jul 11, 2024

History

57 Commits
Jul 11, 2024
Jul 5, 2024
Jun 17, 2024
Jun 3, 2024
Jun 5, 2024
Jun 3, 2024
Jul 10, 2024
Jun 28, 2024
Jul 11, 2024
Jun 3, 2024
Jun 3, 2024
Jun 18, 2024
Jun 5, 2024
Jun 5, 2024
Jul 5, 2024

Repository files navigation

@dialectlabs/blinks — the Actions Interface

Usage

Chrome Extension

Package provides an entrypoint function with styled for X Blink components

// contentScript.ts
import { setupTwitterObserver } from "@dialectlabs/blinks/ext/twitter";
import { ActionConfig } from "@dialectlabs/blinks";

// your RPC_URL is used to create a connection to confirm the transaction after action execution
setupTwitterObserver(new ActionConfig(RPC_URL, {
  signTransaction: async (tx: string) => { ... },
  connect: async () => { ... }
}))

// or

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:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.0%
  • JavaScript 1.9%
  • CSS 0.1%