@ticketrust/contracts-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.15 • Public • Published

Ticketrust SDK

Overview

Ticketrust SDK is a powerful and easy-to-use Node.js module for interacting with Ticketrust smart contracts. It provides a simplified interface to the Ethereum blockchain for event ticketing, leveraging smart contracts for event management and NFT-based ticketing.

Installation

npm install ticketrust-sdk

Importing

import { TicketrustInstance } from 'ticketrust-sdk';

Key Features

  • Create and manage events using Ethereum smart contracts
  • Mint tickets with various payment methods: ETH, fiat, or other tokens
  • Advanced ticketing options, such as minting with exact ETH or tokens
  • Retrieve event information and payee details
  • Offchain URI support for event data
  • Extensive event handling capabilities

Getting Started

  1. Initialize the Ticketrust Instance

    import { ethers } from "ethers";
    import { TicketrustInstance } from 'ticketrust-sdk';
    
    const provider = new ethers.providers.JsonRpcProvider('RPC_URL');
    const wallet = new ethers.Wallet('PRIVATE_KEY', provider);
    const ticketrust = new TicketrustInstance(wallet);
  2. Create an Event

    const eventParams = {
        // Event parameters
    };
    await ticketrust.createEvent(eventParams);
  3. Mint Tickets Various minting functions are available depending on the payment method:

    • mintWithETH
    • mintWithToken
    • mintWithTokenForExactETH
    • mintWithETHForExactTokens
    • mintWithFiat
    • mintBatchWithFiat
  4. Retrieve Event Information

    const eventInfo = await ticketrust.getEventInfo(eventId);

API Reference

Please refer to the API documentation for detailed information about each function.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

Readme

Keywords

none

Package Sidebar

Install

npm i @ticketrust/contracts-sdk

Weekly Downloads

2

Version

0.0.15

License

ISC

Unpacked Size

112 kB

Total Files

21

Last publish

Collaborators

  • burslf