@thirdweb-dev/engine
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Insight TypeScript SDK

This package is a thin openAPI wrapper for insight, our in-house indexer.

Configuration

import { configure } from "@thirdweb-dev/engine";

// call this once at the startup of your application
configure({
  secretKey: "<PROJECT_SECRET_KEY>",
});

Example Usage

import { writeContract } from "@thirdweb-dev/engine";

const result = await writeContract({
  headers: {
    "x-vault-access-token": "<VAULT_ACCESS_TOKEN>",
  },
  body: {
    executionOptions: {
      from: "0x1234567891234567891234567891234567891234",
      chainId: "1",
    },
    params: [
      {
        contractAddress: "0x1234567890123456789012345678901234567890",
        method: "function transfer(address to, uint256 amount)",
        params: [
          "0x1234567890123456789012345678901234567890",
          "1000000000000000000",
        ],
      },
    ],
  },
});

This package was autogenerated from the Insight openAPI spec using @hey-api/openapi-ts

Readme

Keywords

none

Package Sidebar

Install

npm i @thirdweb-dev/engine

Weekly Downloads

6,910

Version

3.0.1

License

Apache-2.0

Unpacked Size

133 kB

Total Files

47

Last publish

Collaborators

  • yash90
  • furqantw
  • jnsdls
  • joaquim-verges
  • jakeloo
  • thirdweb-bot