Skip to content

SyndicateProtocol/syndicate-node

Repository files navigation

Syndicate Node.js SDK

Documentation · Website

npm shield

Syndicate

Syndicate’s modular end-to-end infrastructure abstracts the complexity of sending onchain transactions and decreases development time — making it easier, cheaper and faster for developers to build, launch and grow onchain products at any scale.

At the core of Syndicate’s infrastructure is the Transaction Cloud. Syndicate’s Transaction Cloud offers a complete, end-to-end service that provides Transaction Broadcasting, Dynamic NFT Metadata, Signing & Attestations, Webhooks and Managed Gas - completely abstracting the complexity of managing transactions, wallets, permissioning, and more through simple REST APIs for developers. Our Transaction Cloud supports all EVM chains and can handle up to 5K+ RPS.

Learn more about our Transaction Cloud.

Documentation & Getting Started

Our Node.js library provides access to a selection of endpoints to the Syndicate API. For full functionality of our API please view docs.syndicate.io.

  1. Create an organization for free via our dashboard
  2. Create a project
  3. Add funds to your transaction wallet
  4. Use the SDK to send a transaction

For more detailed instructions, please follow our quickstart guide.

Installation

npm i @syndicateio/syndicate-node
# or
yarn add @syndicateio/syndicate-node

Usage

Open in StackBlitz

Send a transaction

import { SyndicateClient } from "@syndicateio/syndicate-node";
import { waitForHash } from '@syndicateio/syndicate-node/utils';


const syndicate = new SyndicateClient({ token: "YOUR_ACCESS_TOKEN" })

const tx = await syndicate.transact.sendTransaction({
  projectId: "YOUR_PROJECT_ID",
  contractAddress: "0x52962dd492dDDef76d4eFb2bB7E505aeAE4554A1",
  chainId: 84532,
  functionSignature: "mint(address account)",
  args: {
    account: "0x8A05fA58d533a6e40C4381E3247Cf4c68ca61cdc"
  }
})
const hash = await waitForHash(syn, { projectId, transactionId })
console.log(`Transaction ID: ${tx.transactionId} was broadcast with hash: ${hash}`)

Beta status

This SDK is in beta, and there may be breaking changes between versions without a major version update. To use the API directly, please view the API documentation.