Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@egabee/actions

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egabee/actions

Egabee web3 actions

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

@egabee/actions

Trigger Egabee Actions from blockchain indexers, i.e Subsquid, Subgraph, Subquery.

npm i @egabee/actions
pnpm i @egabee/actions
yarn add @egabee/actions
import axios from 'axios'
import { ActionRun } from '@egabee/actions'

const myAction = {
  chainId: '1',
  triggerSource: 'Subsquid'
  eventType: 'Block'
  payload: { blockNumber: 119756183 }
}

// Replace YOUR_ACCESS_TOKEN with your actual Egabee API token
const API_KEY = '9ec43feacc7ea9e4249d544b7092c9972f620a95297ffafcdcaa9428a14d38c3'
// Replace it with your project id
const PROJECT_ID = 'e2206c00-13b5-4dcb-8fe0-96cb28221e42'
const EGABEE_API_URL = `https://api.egabee.com/api/0/web3-actions/${PROJECT_ID}/actions/runs/`

const requestConfig = {
    headers: {
        'Authorization': `Bearer ${API_KEY}`,
        'Content-Type': 'application/json'
    }
}

// Trigger the action with a post request
const { data } = await axios.post(url, myAction, requestConfig)
console.log(data.success)

FAQs

Package last updated on 25 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts