Quick exampleTypeScript
// npm install @scope-connect/appkit
import { AppKit } from "@scope-connect/appkit";
// 1) AppKit 인스턴스를 만들고 초기화합니다. 허용 네트워크는 init()에 넘기지 않고
// 프로젝트 콘솔 설정을 가져오는 loadConfig()로 로드합니다.
// clientId(콘솔 발급 공개 앱 키)만 필수입니다. userHash(불투명 텔레메트리 신원)는 선택이며,
// 사용자 단위 조회·집계가 필요할 때만 getOrCreateUserHash() 등으로 전달합니다.
const appKit = new AppKit({
clientId: "ck_public_example",
});
appKit.init();
// 2) 지갑을 id로 연결하고 WalletConnection을 받습니다.
const connection = await appKit.selectWallet("metamask", {
chainId: "eip155:11155111",
});
// 3) 연결된 지갑에 서명을 요청합니다.
const signature = await appKit.request<string>({
method: "personal_sign",
params: ["{MESSAGE}", connection.accounts[0]],
});