LogoLogo
  • Venn Network
    • Introduction to Venn
    • Getting Started
      • Protocols & Developers
        • Installation
        • Testnet Guide
        • Venn CLI
        • Venn DApp SDK
        • How It Works
        • Roles
      • Node Operators
        • Installation
        • Configuration
        • Testnet Guide
      • Security Teams
        • Build Custom Detector
        • API Reference
        • Security Sandbox
      • Venn Safe Guard
        • Transaction Validation API
        • Bypass Mechanism
      • Venn Wallet RPC
        • Custom RPC in MetaMask
    • Explorer
    • Playground
    • Use Cases
    • Roadmap
    • Consensus Model
    • Litepaper
    • FAQ
    • Community
    • Audit Reports
Powered by GitBook
On this page
  • API
  • Request
  • Response
  • Code Example

Was this helpful?

  1. Venn Network
  2. Getting Started
  3. Venn Safe Guard

Transaction Validation API

The Venn Guard Transaction Validation API enables automatic transaction validation through Venn’s decentralized security network. It accepts standard user transactions and returns a JSON that is ready for upload to any Safe UI.

API

v1.0.4 [STABLE]

Request

URL

METHOD

Body

{
    chainId: number,
    safeAddress: string,
    transactions: [
      {
        to: string
        value: string
        data: string
      }
    ]
}

Response

If all of the transactions passed validation, the API will respond with a new Safe Transaction Batch that can be uploaded into any Safe UI.

If one or more of the transactions fail validation, the API will respond with an error.

In both cases, the STATUS of the response is 200 OK

Success

{
    requestId: string,
    data: {
        version: string,
        chainId: string,
        createdAt: number,
        meta: {
            name: string,
            description: string,
            txBuilderVersion: string,
            createdFromSafeAddress: string,
            createdFromOwnerAddress: string,
            checksum: string
        },

        transactions: [
            // Venn Signature Transaction
            {
                to: string,
                value: string,
                data: string
            },


            // Original User Transactions
            {
                to: string,
                value: string,
                data: string
            }
        ]
    },
    status: string
}

Error

{
    requestId: string,
    isError: boolean,
    message: string,
    status: string
}

Code Example

import axios from "axios";

// Your Safe Address
const SAFE_ADDRESS = "0x..." 

// 1st transaction in the batch
const userTransaction1 = {
    to: "0x...",
    value: "0",
    data: "0x...",
    safeAddress: SAFE_ADDRESS,
};

// 2nd transaction in the batch
const userTransaction2 = {
    to: "0x...",
    value: "0",
    data: "0x...",
    safeAddress: SAFE_ADDRESS,
};

// Validating and signing the transactions with Venn
const response = await axios.post(
    "https://operator1-signer.venn.build/batch/sign",
    {
       transactions [userTransaction1, userTransaction2],
       safeAddress: SAFE_ADDRESS
    }
);

console.log(response.data):
// Transaction Batch JSON
// {
//    ...
//    transactions: [
//       <Venn's Approving Signature Tx>,
//       <User Tx 1>,
//       <User Tx 2>,
//    ]
// }

PreviousVenn Safe GuardNextBypass Mechanism

Last updated 9 days ago

Was this helpful?

https://operator1-signer.venn.build/batch/sign
POST