a16z / farcaster-py

A Python SDK for the Farcaster network
https://a16z.github.io/farcaster-py/
MIT License
123 stars 29 forks source link

Can devs create new Farcaster accounts via SDK? #211

Closed jfornear closed 1 year ago

jfornear commented 1 year ago
# To use the Farcaster API you need to have a Farcaster account. 
# Next, save your Farcaster mnemonic or private key to a .env file.
# Now you can initialize the client, and automatically connect to the Farcaster API!

import os
from farcaster import MerkleApiClient
from dotenv import load_dotenv

load_dotenv()

client = MerkleApiClient(mnemonic=os.environ.get("<MNEMONIC_ENV_VAR>"))

print(client.get_healthcheck())

Compare to Nostr which allows generating new keys:

from nostr.key import PrivateKey

private_key = PrivateKey()
public_key = private_key.public_key
print(f"Private key: {private_key.bech32()}")
print(f"Public key: {public_key.bech32()}")
emlazzarin commented 1 year ago

Farcaster is limiting sign-ups as the protocol and clients are developed. Eventually, the sign-up process will be similar to what you've described there. The Farcaster namespace (fids) will be on Ethereum mainnet or similar.

The protocol specification page, linked here, outlines how developers are thinking about it so far. Permissionlessness is a clear design goal. Some more documentation links here.