해당 SDK는 farcaster onchain 제어를 목적으로합니다.
$ npm i @namulabsdev/farcaster-sdk
or
$ yarn add @namulabsdev/farcaster-sdk
-
registry fid
-
add activity key
-
remove activity key
-
storage rent
-
recovery
-
transfer
- ethers@5.7.2
import { Farcaster } from '@namulabsdev/farcaster-sdk';
const PRIVATE_KEY = 'PRIVATE_KEY';
const provider = new ethers.providers.JsonRpcProvider("http://localhost:8545");
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
const contracts = {
STORAGE_REGISTRY_ADDRESS: "0xe09ec2a7577fa557c16167ad08ae42c743f785c3",
ID_REGISTRY_ADDRESS: "0x2e6bb0cfca31949032dfbead0e35d8d3481eeb63",
ID_GATEWAY_ADDRESS: "0x7a889cecd3165b32e394e36cc90b203050889718",
KEY_REGISTRY_ADDRESS: "0xf8ce9186abd669bc9ff7de7dbcb783f13fb808fd",
KEY_GATEWAY_ADDRESS: "0xc1cc9b3b017bb8cb19214d19817e07de0f15c25d",
SIGNED_KEY_REQUEST_VALIDATOR_ADDRESS: "0xe565f4f285d7318bede674e503bced1faa4e1bdf",
BUNDLER_ADDRESS: "0x8f5ef5fada19cfa9f09ed9b45c2692d8b5088ede",
RECOVERY_PROXY_ADDRESS: "0x0386afdf47d45becde81bd1cd1d1744199321851",
}
const farcaster = new Farcaster(
contracts,
provider,
);
transfer: custody addrss를 다른 주소로 변경한다.
recovery: recovery address를 custory address로 승격한다. (recovery를 수행하면 custody와 recovery가 동일해진다.)
recovery change: recovery address를 다른 주소로 변경한다.
FID의 custody, recovery address 조회
added signer(activity) key, removed signer(activity) key 조회(ED25519)