Attendify is an utility library for the Proof of Attendance infrastructure on the XRPL.

Hierarchy

  • Attendify

Constructors

Properties

maxTickets: number
networkConfigs: NetworkConfig[]
nextEventId: number
ready: boolean

Methods

  • Add a single participant to an existing event

    Parameters

    • eventId: number

      event identifier

    • walletAddress: string

      wallet address of the new participant

    • createOffer: boolean

      immediately create an NFT sell offer

    • checkIsManaged: boolean

      validate whether the event is managed, restrict access accordingly

    Returns Promise<Record<string, any>>

  • Add several participants to an existing event

    Parameters

    • eventId: number

      event identifier

    • walletAddress: string

      event owner wallet address

    • attendeeWalletAddresses: string[]

      list of wallet addresses of new participants

    • createOffer: boolean

      immediately create an NFT sell offer

    Returns Promise<void>

  • Calculate the deposit value in drops for an event

    Parameters

    Returns Promise<[bigint, bigint]>

    deposit requirements

  • Cancel an event

    Parameters

    • eventId: number

      event identifier

    Returns Promise<void>

  • Check if an account exists on a particular network

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      account wallet address

    Returns Promise<boolean>

    true, if the ledger account exists

  • Check if an account has set the platform as authorized minter

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      account wallet address

    Returns Promise<boolean>

    true, if the minter is configured correctly

  • Check in the ledger if an account owns an NFT of an event

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      account wallet address

    • ownerWalletAddress: string

      issuer wallet address

    • eventId: number

      event identifier (NFT taxon)

    Returns Promise<boolean>

    true, if the account is a legit participant

  • Check if the vault account has enough balance to create N ledger objects

    Parameters

    Returns Promise<[bigint, bigint, boolean]>

    reserve and balance info

  • Verify an event deposit transaction

    Parameters

    Returns Promise<boolean>

    true, if the payment was successful

  • Check if an NFT sell offer exists on chain

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • tokenId: string

      NFT identifier

    • offerIndex: string

      NFT sell offer index

    Returns Promise<boolean>

    true, if sell offer exists

  • Create a new event

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      event owner wallet address

    • metadata: Metadata

      event information/details

    • isManaged: boolean

      event signup permissions

    Returns Promise<number>

    new event id

  • Create a sell offer for an NFT

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • eventId: number

      event identifier

    • walletAddress: string

      recipient wallet address (offer can only be accepted by this account)

    • tokenId: string

      NFT identifier

    Returns Promise<[string, bigint]>

    sell offer index and tx fee costs

  • Find all NFTs owned by a particular account

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      request wallet address

    • Optional taxon: number

      optional filter

    Returns Promise<string[]>

    array of token identifier

  • Fetch an NFT offer for a specific event from the database

    Parameters

    • walletAddress: string

      request wallet address

    • eventId: number

      event identifier

    Returns Promise<null | Record<string, any>>

    offer json object

  • Fetch a specific event from the database

    Parameters

    • eventId: number

      event identifier

    • wasMasked: boolean

      whether the request used a masked id

    • Optional walletAddress: string

      optional request wallet address to filter results depending on access level

    Returns Promise<undefined | Record<string, any>>

    event json object (details depend on access level)

  • Fetch all events from the database

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • limit: number = 100

      maximum number of returned results

    Returns Promise<Record<string, any>[]>

    list of event json objects

  • Fetch active events that have ended (used by daemon)

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • Optional walletAddress: string

      optionally filter by owner wallet address

    Returns Promise<Record<string, any>[]>

    list of event json objects

  • Fetch specific events (used by daemon)

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • Optional status: EventStatus

      optionally filter by status

    • Optional walletAddress: string

      optionally filter by owner wallet address

    Returns Promise<Record<string, any>[]>

    list of event json objects

  • Fetch user owned events from the database

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      wallet address of the user

    • limit: number = 100

      maximum number of returned results

    Returns Promise<Record<string, any>[]>

    list of event json objects

  • Fetch authorized minter status for an account

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      account wallet address

    Returns Promise<[string, boolean]>

    status info

  • Get the configuration for a specific network

    Parameters

    Returns [Client, Wallet]

    fresh wallet and client instance for a network

  • Fetch NFT offers associated with a user from the database

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • walletAddress: string

      wallet address of the user

    • limit: number = 100

      maximum number of returned results

    Returns Promise<Record<string, any>[]>

    list of offer json objects (including associated event info)

  • Fetch a list of all organizers

    Parameters

    Returns Promise<Record<string, any>[]>

    list of user json objects

  • Fetch a specific user from the database

    Parameters

    • walletAddress: string

      wallet address of the user

    • includeEvents: boolean

      include a list of events the user is attending

    • allowCreation: boolean

      create new user, if it doesn't exist

    • isOrganizer: boolean

      when creating a new user, add organizer permissions

    Returns Promise<undefined | Record<string, any>>

    • user json object
  • Fetch a list of all users

    Parameters

    Returns Promise<Record<string, any>[]>

    list of user json objects

  • Initializes a new instance of the Attendify class. This MUST be called before using the library.

    Returns Promise<void>

  • Pre-mint NFTs for a pending event

    Parameters

    • eventId: number

      event identifier

    Returns Promise<void>

  • Prepare ledger Ticket objects for NFT batch minting

    Parameters

    • networkId: NetworkIdentifier

      network identifier

    • target: number

      number of tickets that should be set up

    Returns Promise<[number[], bigint]>

    array of at least target ticket sequence numbers and tx fee costs

  • Refund event deposit

    Parameters

    • eventId: number

      event identifier

    Returns Promise<null | string>

    tx hash

  • Scan vault account history for payment transactions (used by daemon)

    Parameters

    Returns Promise<void>

  • Update a specific user in the database

    Parameters

    • walletAddress: string

      wallet address of the user

    • firstName: null | string

      optional first name

    • lastName: null | string

      optional last name

    • email: null | string

      optional email address

    Returns Promise<void>

Generated using TypeDoc