Code Monkey home page Code Monkey logo

farcaster-sdk's Introduction

farcaster SDK

해당 SDK는 farcaster onchain 제어를 목적으로합니다.

install

$ npm i @namulabsdev/farcaster-sdk

or 

$ yarn add @namulabsdev/farcaster-sdk

on chain features

  • registry fid

  • add activity key

  • remove activity key

  • storage rent

  • recovery

  • transfer

dependencies

define

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,
);

registry fid

activitikey management

fid management

transfer: custody addrss를 다른 주소로 변경한다.

recovery: recovery address를 custory address로 승격한다. (recovery를 수행하면 custody와 recovery가 동일해진다.)

recovery change: recovery address를 다른 주소로 변경한다.

storage

fid information

FID의 custody, recovery address 조회

added signer(activity) key, removed signer(activity) key 조회(ED25519)

farcaster-sdk's People

Watchers

Lucian avatar soulhammer avatar  avatar Daewoo Koh avatar Sun Tae, Kim avatar

farcaster-sdk's Issues

fid register 구현

현재 bundler를 통해 fid register -> storage rent를 한 번에 처리되도록 구현이 되어있음

오직 fid register 실행을 위해 IdGateway.registerFor, IdGateway.register 구현 필요

registerFor: for AA
register: for EOA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.