VRFCall is a lightweight client application for interacting with the VRFChain blockchain to generate and verify verifiable random numbers.
- Go 1.22+
- VRFChain node running (Tendermint RPC:
http://localhost:26657, REST API:http://localhost:1317)
git clone https://github.com/aakash4dev/vrfcall.git
cd vrfcall
go mod downloadgo run main.goThe application will:
- Check/create admin account
- Verify account balance (needs ≥3 tokens)
- Generate verifiable random number
- Retrieve and verify the random number
vrfcall/
├── main.go # Application entry point
├── chain/ # Blockchain interaction functions
│ ├── checkBalance.chain.go
│ ├── createAccount.chain.go
│ ├── PostGeneratePsudoRandomNumber.go
│ ├── GetPsudoRandomNumber.go
│ └── GetVerifyRandomNumber.go
├── config/ # Configuration and connection setup
│ └── chain.go
├── accounts/ # Keyring and account data (auto-generated)
└── docs/ # Additional documentation
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
└── SECURITY.md
Default connection settings (in config/chain.go):
- Tendermint RPC:
http://localhost:26657 - REST API:
http://localhost:1317 - Address Prefix:
cosmos - Gas Limit:
70000000
To modify, edit config/chain.go.
The client sends MsgCreateVerifiableRandomNumber with:
| Parameter | Description |
|---|---|
Creator |
Sender's blockchain address |
Shaseed |
SHA256 hash of seed data (32 bytes) |
Publickey |
ECDSA public key (JSON-marshaled) |
R, S |
ECDSA signature components (64 bytes) |
Maxrange |
Maximum range for random number |
Seed Data includes: LatestPod, StationID, NumberOfPodSubmitters, LatestStationBlockNumber, LatestStationBlockHash, Sender.
- POST
MsgCreateVerifiableRandomNumber- Generate random number - GET
/aakash4dev/verifiablerandomnumber/vrf/getpsudorandomnumber- Get random number - GET
/aakash4dev/verifiablerandomnumber/vrf/verify_random_number/{shaSeed}/{maxRange}- Verify number
- docs/CONTRIBUTING.md - Contribution guidelines
- docs/CODE_OF_CONDUCT.md - Code of conduct
- docs/SECURITY.md - Security policy
- LICENSE - MIT License
Aakash
🌐 aakash4dev.com • X • LinkedIn
Licensed under the MIT License.