Skip to content

Ticketrust/contracts-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Node.js module for interacting with Ticketrust smart contracts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published