commit dae04d51f73a827e90457a09a8c164d1b23f7fe5 Author: defiQUG Date: Sat Feb 21 15:21:16 2026 -0800 Initial commit: Fireblocks Web3 integration for Chain 138 Co-authored-by: Cursor diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..7c023d0 --- /dev/null +++ b/.env.example @@ -0,0 +1,18 @@ +# Fireblocks Web3 — Chain 138 dedicated RPC +# Copy to .env and set in Fireblocks Console / SDK. + +# Public HTTPS/WSS (use in Console and for external clients) +RPC_URL_138_FIREBLOCKS=https://rpc-fireblocks.d-bis.org +WS_URL_138_FIREBLOCKS=wss://ws.rpc-fireblocks.d-bis.org + +# Chain ID (D-BIS / Defi Oracle Meta Mainnet) +CHAIN_ID_138=138 + +# Optional: LAN-only (when running from same network as RPC node) +# RPC_URL_138_FIREBLOCKS=http://192.168.11.232:8545 +# WS_URL_138_FIREBLOCKS=ws://192.168.11.232:8546 + +# Fireblocks API (set in your app; do not commit .env with real keys) +# FIREBLOCKS_API_PRIVATE_KEY_PATH= +# FIREBLOCKS_API_KEY= +# FIREBLOCKS_VAULT_ACCOUNT_IDS= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3968f63 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +node_modules/ +*.log +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..156d81a --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# Fireblocks Web3 Integration — Chain 138 + +Dedicated RPC and documentation for **Fireblocks** Web3 integrations on **Chain 138** (D-BIS / Defi Oracle Meta Mainnet). + +This repository is a **submodule** of the [proxmox](https://gitea.d-bis.org/d-bis/proxmox) infrastructure repo. It holds Fireblocks-specific docs and config references. + +--- + +## Quick reference + +| Use | URL | +|-----|-----| +| **HTTP RPC (public)** | `https://rpc-fireblocks.d-bis.org` | +| **WebSocket RPC (public)** | `wss://ws.rpc-fireblocks.d-bis.org` | +| **Chain ID** | `138` | + +**Verify:** +```bash +curl -s -X POST https://rpc-fireblocks.d-bis.org \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' +# Expected: "result":"0x8a" +``` + +--- + +## Contents + +- **[docs/FIREBLOCKS_WEB3_INTEGRATION.md](docs/FIREBLOCKS_WEB3_INTEGRATION.md)** — Full integration guide: Console custom network, Web3 Provider (SDK), REST API, hosting/DNS/SSL, verification. +- **.env.example** — Recommended env vars for `RPC_URL_138_FIREBLOCKS` and `WS_URL_138_FIREBLOCKS`. + +--- + +## Parent repo + +Infrastructure (NPMplus proxy hosts, DNS, SSL, RPC node VMID 2301) is managed in the **proxmox** repo: + +- RPC endpoints master: `docs/04-configuration/RPC_ENDPOINTS_MASTER.md` +- RPC node types: `docs/05-network/RPC_NODE_TYPES_ARCHITECTURE.md` + +--- + +## License + +Same as parent (proxmox) unless stated otherwise. diff --git a/docs/FIREBLOCKS_WEB3_INTEGRATION.md b/docs/FIREBLOCKS_WEB3_INTEGRATION.md new file mode 100644 index 0000000..7336b6d --- /dev/null +++ b/docs/FIREBLOCKS_WEB3_INTEGRATION.md @@ -0,0 +1,104 @@ +# Fireblocks Web3 Integration — Chain 138 + +**Last Updated:** 2026-02-21 +**Status:** Active ✅ (DNS + SSL + NPMplus complete) +**RPC Node:** VMID 2301 (192.168.11.232) — dedicated for Fireblocks + +--- + +## Overview + +One RPC node is **dedicated for Fireblocks** Web3 integrations: VMID **2301** (`besu-rpc-private-1`, IP **192.168.11.232**). Use it for Fireblocks Console custom network, API, and SDK so Fireblocks traffic is isolated from public and other tenant RPCs. + +**Canonical URLs** (parent repo: proxmox `docs/04-configuration/RPC_ENDPOINTS_MASTER.md`): + +| Use | URL | +|-----|-----| +| **HTTP RPC (public)** | `https://rpc-fireblocks.d-bis.org` | +| **WebSocket RPC (public)** | `wss://ws.rpc-fireblocks.d-bis.org` | +| **HTTP RPC (LAN)** | `http://192.168.11.232:8545` | +| **WebSocket RPC (LAN)** | `ws://192.168.11.232:8546` | + +**Env vars** (see [.env.example](../.env.example)): + +- `RPC_URL_138_FIREBLOCKS` = `http://192.168.11.232:8545` +- `WS_URL_138_FIREBLOCKS` = `ws://192.168.11.232:8546` + +--- + +## 1. Fireblocks Console — Add Chain 138 (Custom Network) + +1. In **Fireblocks Console** go to **Settings → Network Connections → Web3** (or **API** → custom networks). +2. **Add custom network** (or “Add chain” / “Custom RPC” depending on UI). +3. Use: + - **Network name:** e.g. `Chain 138` or `D-BIS 138` + - **RPC URL:** `https://rpc-fireblocks.d-bis.org` + - **Chain ID:** `138` + - **WebSocket URL (optional):** `wss://ws.rpc-fireblocks.d-bis.org` +4. Save. Fireblocks will use this RPC for Chain 138 for API and (where supported) Web3 provider. + +--- + +## 2. Fireblocks Web3 Provider (SDK) — Custom RPC + +Use the dedicated RPC URL when instantiating the Fireblocks Web3 provider so all Chain 138 traffic goes to the Fireblocks-dedicated node. + +**Example (Node.js / ethers):** + +```js +import { FireblocksWeb3Provider } from "@fireblocks/fireblocks-web3-provider"; + +const eip1193Provider = new FireblocksWeb3Provider({ + privateKey: process.env.FIREBLOCKS_API_PRIVATE_KEY_PATH, + apiKey: process.env.FIREBLOCKS_API_KEY, + vaultAccountIds: process.env.FIREBLOCKS_VAULT_ACCOUNT_IDS, + rpcUrl: process.env.RPC_URL_138_FIREBLOCKS || "https://rpc-fireblocks.d-bis.org", +}); +// Chain ID is inferred from RPC (138). Use with ethers.js / web3.js. +``` + +**Environment variable (recommended):** see [.env.example](../.env.example). + +--- + +## 3. Fireblocks REST API — Custom Chain + +For **Create Transaction** and other REST calls that require a chain/network, use Chain ID **138** and ensure the Fireblocks backend is configured to use the custom RPC for 138 (via Console custom network above). No extra code change is needed once the custom network is set in the Console. + +--- + +## 4. Hosting (Operator) + +The Fireblocks-dedicated RPC is exposed via NPMplus (VMID 10233) with WebSocket support. DNS and SSL are managed in the **proxmox** repo. + +| NPMplus Proxy Host | Forward To | WebSocket | +|--------------------|------------|-----------| +| `rpc-fireblocks.d-bis.org` | `http://192.168.11.232:8545` | Yes | +| `ws.rpc-fireblocks.d-bis.org` | `http://192.168.11.232:8546` | Yes | + +Operator steps (run from proxmox repo): NPMplus proxy update, SSL request (`CERT_DOMAINS_FILTER=rpc-fireblocks`), Cloudflare A records. See parent `docs/04-configuration/FIREBLOCKS_WEB3_INTEGRATION.md` for full operator steps. + +--- + +## 5. Verify RPC and Chain ID + +```bash +curl -s -X POST https://rpc-fireblocks.d-bis.org \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' +# Expected: {"jsonrpc":"2.0","id":1,"result":"0x8a"} +``` + +--- + +## 6. Optional: IP Allowlisting + +If you use **Fireblocks Network Link / Provider Connectivity** and need to allowlist Fireblocks egress IPs, restrict access to the Fireblocks-dedicated node (2301) only. See [Fireblocks Network Link Integration](https://developers.fireblocks.com/docs/network-link-integration-guide-for-provider-connectivity). + +--- + +## Related + +- **Parent (proxmox):** `docs/04-configuration/RPC_ENDPOINTS_MASTER.md`, `docs/05-network/RPC_NODE_TYPES_ARCHITECTURE.md` +- [Fireblocks Web3 Provider](https://www.npmjs.com/package/@fireblocks/fireblocks-web3-provider) — npm +- [Fireblocks Create Web3 Connection](https://developers.fireblocks.com/reference/create) — API