rpc: /ext/ -> /v1/ on our own hosts

luxd serves /v1/*; /ext/* 404s. Third-party chains keep their own paths.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-03 21:15:23 -07:00
co-authored by Hanzo Dev
parent 230fbb3fe0
commit 3e9fd77e98
4 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -83,15 +83,15 @@ jobs:
include:
- net: mainnet
manifest: dexvm/registry/manifests/assets.mainnet.json
evm_rpc: https://api.lux.network/ext/bc/C/rpc
evm_rpc: https://api.lux.network/v1/bc/C/rpc
api_base: https://api.lux.network
- net: testnet
manifest: dexvm/registry/manifests/assets.testnet.json
evm_rpc: https://api.lux-test.network/ext/bc/C/rpc
evm_rpc: https://api.lux-test.network/v1/bc/C/rpc
api_base: https://api.lux-test.network
- net: devnet
manifest: dexvm/registry/manifests/assets.devnet.json
evm_rpc: https://api.lux-dev.network/ext/bc/C/rpc
evm_rpc: https://api.lux-dev.network/v1/bc/C/rpc
api_base: https://api.lux-dev.network
steps:
- uses: actions/checkout@v4
+1 -1
View File
@@ -20,7 +20,7 @@ import (
// - Permissionless bridge settlement
// (EstimateFee, SubmitRequest, GetStatus, CancelRequest, …)
//
// Any client that can reach /ext/bc/B/rpc has equal authority — the
// Any client that can reach /v1/bc/B/rpc has equal authority — the
// daemon at cmd/bridge is one such client. There are no privileged
// methods on this surface; rate-limiting and auth (when desired) are
// applied at the ingress layer.
+3 -3
View File
@@ -22,7 +22,7 @@
//
// dex-assets-validate \
// -manifest dexvm/registry/manifests/assets.mainnet.json \
// -evm-rpc https://api.lux.network/ext/bc/C/rpc \
// -evm-rpc https://api.lux.network/v1/bc/C/rpc \
// -api-base https://api.lux.network \
// [-native-decimals 18]
package main
@@ -42,8 +42,8 @@ import (
func main() {
var (
manifestPath = flag.String("manifest", "", "path to the per-network asset manifest JSON")
evmRPC = flag.String("evm-rpc", "", "C-Chain EVM RPC URL (…/ext/bc/C/rpc)")
apiBase = flag.String("api-base", "", "node API base (… root; used for /ext/P and /ext/bc/X)")
evmRPC = flag.String("evm-rpc", "", "C-Chain EVM RPC URL (…/v1/bc/C/rpc)")
apiBase = flag.String("api-base", "", "node API base (… root; used for /ext/P and /v1/bc/X)")
nativeDec = flag.Uint("native-decimals", 18, "C-Chain native coin decimals")
timeout = flag.Duration("timeout", 2*time.Minute, "overall validation timeout")
)
+3 -3
View File
@@ -42,8 +42,8 @@ type Verifier struct {
}
// New dials the C-Chain EVM RPC and records the node API base for P/X queries.
// evmRPC is the full C-Chain RPC URL (…/ext/bc/C/rpc); apiBase is the node root
// (…) used to reach /ext/P and /ext/bc/X. nativeDecimals is the C-Chain native
// evmRPC is the full C-Chain RPC URL (…/v1/bc/C/rpc); apiBase is the node root
// (…) used to reach /ext/P and /v1/bc/X. nativeDecimals is the C-Chain native
// coin's decimals (18 for LUX).
func New(ctx context.Context, evmRPC, apiBase string, nativeDecimals uint8) (*Verifier, error) {
ec, err := ethclient.DialContext(ctx, evmRPC)
@@ -128,7 +128,7 @@ func (v *Verifier) VerifyUTXOAsset(_ uint32, _ ids.ID, assetID ids.ID) (uint8, e
} `json:"result"`
Error *rpcError `json:"error"`
}
if err := v.jsonRPC(ctx, "/ext/bc/X", "avm.getAssetDescription",
if err := v.jsonRPC(ctx, "/v1/bc/X", "avm.getAssetDescription",
map[string]any{"assetID": assetID.String()}, &out); err != nil {
return 0, err
}