# README
Starknetid.go
Starknetid.go is a Go library to interact with the Starknet.id protocol. The implementation is inspired by the official Javascript library Starknetid.js.
Starknetid.go is powered by Starknet.go.
Getting Started
Step 1: Install the module
go get github.com/metacube-games/starknetid.go
Step 2: Initialize the StarknetId provider
// 1. Create a new RPC provider client
client, err := rpc.NewProvider(RPC_URL) // github.com/NethermindEth/starknet.go/rpc
if err != nil {
panic(err)
}
// 2. Create a new Starknet.id provider
provider, err := provider.NewProvider(client, constants.SN_MAIN, nil)
if err != nil {
panic(err)
}
Step 3: Use the provider to interact with the Starknet.id protocol
// Example: Get address from Stark name
address, err := provider.GetAddressFromStarkName(context.Background(), "metacube.stark")
if err != nil {
panic(err)
}
fmt.Printf("Address of metacube.stark: %s", address)
Please refer to the examples for more usage examples.
Documentation
The library is documented using GoDoc, you can find the documentation here. Moreover, you can also refer to the documentation on the starknet.id doc website where there are code examples for each methods.
Features
Method | Implemented |
---|---|
GetAddressFromStarkName | ✅ |
GetStarkName | ✅ |
GetStarkNames | ✅ |
GetStarknetId | ✅ |
GetUserData | ✅ |
GetExtendedUserData | ✅ |
GetUnboundedUserData | ✅ |
GetVerifierData | ✅ |
GetExtendedVerifierData | ✅ |
GetUnboundedVerifierData | ✅ |
GetPfpVerifierData | ✅ |
GetProfileData | ✅ |
GetStarkProfiles | ✅ |
Contribute
Contributions are welcome! Please refer to the contribution guidelines for more information.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributors
Thanks goes to these wonderful people (emoji key):
Bastien Faivre 💻 📖 💡 🚧 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!