UNPKG

tickethead-sdk

Version:

SDK for the Tickethead API

21 lines 1.01 kB
import { BlockchainFunctionParams, InvalidateTicket, TickedIds } from './types'; /** * Extracts IDs from the format E(someNumber)TC(someNumber)T(someNumber) */ export declare function parseTicketId(ticketId: string): TickedIds; /** * Construct the payload for the ticket invalidation from the ticket ID found in the QR code * * @param ticketId string in the format E(someNumber)TC(someNumber)T(someNumber) * @param invalidationTime the point in time at which the ticket was scanned * @returns args for the blockchain function */ export declare function createInvalidatePayload(ticketId: string, invalidationTime: Date): InvalidateTicket; /** * Function which returns the function call for ticket invalidation * * @param payload acquired through the `createInvalidatePayload` function * @returns function call to be sent to the blockchain */ export declare function createInvalidateCall(payload: InvalidateTicket): BlockchainFunctionParams<InvalidateTicket>; //# sourceMappingURL=utils.d.ts.map