Skip to main content

Cip30Handle

Convenience type for browser plugin wallets supporting the CIP 30 dApp connector standard (eg. Eternl, Nami, ...).

This is useful in Typescript projects to avoid type errors when accessing the handles in window.cardano.

// refer to this file in the 'typeRoots' list in tsconfig.json or jsconfig.json
import { Cip30Handle } from "@helios-lang/tx-utils"

declare global {
interface Window {
cardano: {
[walletName: string]: Cip30Handle
};
}
}
export interface Cip30Handle {
  enable(): Promise<Cip30FullHandle>
  icon: string
  isEnabled(): boolean
  name: string
}

Properties

enable

cip30Handle.enable satisfies () => Promise<Cip30FullHandle>

icon

cip30Handle.icon satisfies string

isEnabled

cip30Handle.isEnabled satisfies () => boolean

name

cip30Handle.name satisfies string