Lewati ke isi

Private Testnet — Partner Onboarding

Invite-only network untuk tim Garuda Prime dan partner terpilih (Chain ID 8845).

Spesifikasi

Parameter Nilai
Chain ID 8845 (0x2285)
Validators 5 (IBFT 2.0)
Block time 2 detik
Token GAT
RPC Gateway http://localhost:8540 (dev)
Auth Header X-API-Key

1. Start Network (Internal Dev)

npm run private:up
npm run private:monitor

2. Deploy Contracts

cp .env.private-testnet .env
npm run contracts:deploy:private

Registry: chain/deployments/private-testnet.json

3. API Keys

Default keys ( ganti sebelum production ):

Key Team Permissions
garuda-private-dev-key-change-in-production Garuda Prime Dev rpc, faucet, explorer
garuda-partner-qa-key-change-in-production Partner QA rpc, explorer

RPC Request

curl -X POST http://localhost:8540 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

4. Allowlist Wallet (Faucet)

Edit chain/config/private-testnet/allowlist.json — tambah address partner.

5. MetaMask

{
  "chainId": "0x2285",
  "chainName": "Garuda Chain Private Testnet",
  "nativeCurrency": {
    "name": "Garuda Asset Token",
    "symbol": "GAT",
    "decimals": 18
  },
  "rpcUrls": ["http://localhost:8540"],
  "blockExplorerUrls": ["http://localhost:3000"]
}

Gunakan custom RPC proxy dengan header X-API-Key, atau RPC internal :8545 untuk dev lokal.

6. SDK

npm run sdk:build
npx tsx packages/sdk/examples/wallet-connect.ts
import { createGarudaClient } from "@garuda-chain/sdk";

const client = createGarudaClient("private-testnet");
const block = await client.getBlockNumber();

7. REST API & Faucet

npm run dev:api      # :4000
npm run dev:faucet   # :4001

Faucet claim (private — allowlist / rate limit):

curl -X POST http://localhost:4001/claim \
  -H "Content-Type: application/json" \
  -d '{"address":"0xYourAddress","website":""}'

Field website harus kosong (honeypot bot).

8. Verification

npm run phase2:verify

Support