DXABlockchain
Developers

Integrate DXA Blockchain (L3)

A signature-gated attestation hub on Base Sepolia. Anchor tamper-proof proofs, verify, and revoke — for Trustway, your apps, or partners.

On-chain contracts (Base Sepolia)

DXAGovernanceSigners
0xBAE41b8711A7C19355Ad217231c439119137D215 ↗

Authorizes signer keys per payloadType.

DXAAttestationRegistry
0x133BCb88E038595994ab1Ee0c498A90e454882B8 ↗

verifyAndAnchor · getRecord · revokeAttestation.

REST API

POST/api/anchor

Hash data fields, sign (EIP-191) and anchor via the registry.

{ "scenario": "academic_credential", "payloadId": "XAI-2024-0001", "dataFields": { "f0": "Nguyễn Văn An", "f4": "Giỏi" } }
POST/api/verify

Re-hash and look up the ledger: existence + status + integrity.

{ "dataFields": { "f0": "Nguyễn Văn An", "f4": "Giỏi" }, "sealCode": "0x…" }
POST/api/revoke

Revoke an attestation (original issuer only).

{ "sealCode": "0x…bytes32" }
POST/api/trustway

Trustway gateway: AI payload → secure payload → hash → sign → anchor.

{ "score": 785, "payloadId": "DOC-1", "anchor": true }

Authentication model (3 layers)

  1. API layer: API key / JWT (DXA Developer + Identity) — identify, rate-limit, meter.
  2. Signing layer: issuer key signs EIP-191 over keccak256(dataHash, payloadType, nonce).
  3. On-chain gate: governance authorizes the signer per payloadType — the immutable trust anchor.

API keys only open the gate; forging a record still requires a governance-authorized signature. Binding payloadType + nonce blocks cross-type relabeling and replay.

Self-custody signing (Node / ethers v6)

import { Wallet, AbiCoder, keccak256, getBytes, Signature } from "ethers";

const wallet  = new Wallet(ISSUER_PRIVATE_KEY);          // khóa của bạn
const digest  = keccak256(AbiCoder.defaultAbiCoder()
  .encode(["bytes32","string","uint256"], [dataHash, payloadType, nonce]));
const sig     = Signature.from(await wallet.signMessage(getBytes(digest)));
// → gửi { dataHash, payloadType, nonce, v: sig.v, r: sig.r, s: sig.s }
//    tới registry.verifyAndAnchor(...) (relayer trả gas)
Sandbox notice: Base Sepolia testnet; in this demo the relayer also acts as the authorized signer. Do not anchor real or sensitive data.