0.0.15 • Published 5 months ago

@ticketrust/contracts-sdk v0.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

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.

0.0.13

5 months ago

0.0.14

5 months ago

0.0.15

5 months ago

0.0.10

5 months ago

0.0.11

5 months ago

0.0.12

5 months ago

0.0.3

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.2

6 months ago

0.0.1

6 months ago