https://github.com/gonative-cc/relayer
Relayer for Native <-> Sui <-> Bitcoin
https://github.com/gonative-cc/relayer
Last synced: 11 months ago
JSON representation
Relayer for Native <-> Sui <-> Bitcoin
- Host: GitHub
- URL: https://github.com/gonative-cc/relayer
- Owner: gonative-cc
- License: mpl-2.0
- Created: 2024-09-06T12:53:15.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T21:53:54.000Z (about 1 year ago)
- Last Synced: 2025-04-07T22:33:46.015Z (about 1 year ago)
- Language: Go
- Homepage: https://www.gonative.cc/
- Size: 664 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# NATIVE Relayer
[](https://www.repostatus.org/#wip)
[](https://godoc.org/github.com/gonative-cc/relayer)
[](https://goreportcard.com/report/github.com/gonative-cc/relayer)
[](https://github.com/gonative-cc/relayer)
[](https://github.com/gonative-cc/relayer/blob/main/LICENSE)
[](https://github.com/gonative-cc/contributig/blob/master/CODE_OF_CONDUCT.md)
## Summary
A software that monitors and relayers:
- CometBFT blocks to update Native light client on Ika
- Bitcoin blocks to update Bitcoin light client on Native
- Bitcoin SPV proofs to verify dWallet holdings
- Native -> Bitcoin transaction relayer
### Status
Status scheme:
```text
Mock -> WIP -> alpha -> beta -> production
```
| Service | status |
| :--------------- | :----- |
| Native-\>Ika | WIP |
| Native-\>Bitcoin | WIP |
| Native-\>Bitcoin | :x: |
| Bitcoin SPV | |
## Documentation
1. Database
- [interacitons](docs/db.md)
- [schema diagram](docs/schema.md)
2. [Flow diagram](docs/flow.md)
## Contributing
Participating in open source is often a highly collaborative experience. We’re encouraged to create in public view, and we’re incentivized to welcome contributions of all kinds from people around the world.
Check out [contributing repo](https://github.com/gonative-cc/contributig) for our guidelines & policies for how to contribute. Note: we require DCO! Thank you to all those who have contributed!
After cloning the repository, make sure to run `make setup-hooks`.
### Security
Check out [SECURITY.md](./SECURITY.md) for security concerns.
## Setup
1. Make sure you have `go`, `make` installed
2. Copy and update your env file: `cp .env.example .env`
3. Build the project: `make build`
To build and start you can run: `make build start`
In order to run Native -> Bitcoin relayer PoC:
1. Copy and update .env.example file to .env `cp env.example .env`
2. Run script with path of transaction file as command line argument: `go run main.go transaction.txt`
### Development
1. Run `make setup` (will setup git hooks)
2. Install and make sure it is in your PATH:
- [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2)
- [revive](https://github.com/mgechev/revive)
### Coding notes
1. Use `env.Init()` to setup logger and load ENV variables.
1. Use `zerolog.log` logger, eg:
```go
import "github.com/rs/zerolog/log"
//...
log.Info().Int("block", minimumBlockHeight).Msg("Start relaying msgs")
```
## Talk to us
- Follow the Native team's activities on the [Native X/Twitter account](https://x.com/NativeNetwork).
- Join the conversation on [Native Discord](https://discord.gg/gonative).