Hierarchy

  • SoarProgram

Properties

program: Program<Soar>
provider: AnchorProvider
utils: Utils

Methods

  • Add a fungible token reward for unlocking an achievement.

    Parameters

    • authority: PublicKey
    • newReward: PublicKey
    • achievement: PublicKey
    • amountPerUser: BN
    • availableRewards: BN
    • initialDelegation: BN
    • mint: PublicKey
    • sourceTokenAccount: PublicKey
    • tokenAccountOwner: PublicKey

    Returns Promise<AddReward>

  • Add a new achievement for a Game.

    Parameters

    • gameAddress: PublicKey
    • authority: PublicKey
    • title: string
    • description: string
    • nftMeta: PublicKey

    Returns Promise<AddGameAchievement>

  • Add a new leaderboard for a Game.

    Parameters

    • gameAddress: PublicKey
    • authority: PublicKey
    • description: string
    • nftMeta: PublicKey
    • scoresToRetain: number
    • scoresOrder: boolean
    • Optional decimals: number
    • Optional minScore: BN
    • Optional maxScore: BN

    Returns Promise<AddLeaderBoard>

  • Add a non-fungible token reward for unlocking an achievement.

    Parameters

    • authority: PublicKey
    • newReward: PublicKey
    • achievement: PublicKey
    • availableRewards: BN
    • uri: string
    • name: string
    • symbol: string
    • Optional collectionMint: PublicKey
    • Optional collectionUpdateAuthority: PublicKey

    Returns Promise<AddReward>

  • Claim a fungible-token reward as a result for unlocking an achievement.

    Parameters

    • authority: PublicKey
    • achievement: PublicKey
    • user: PublicKey

    Returns Promise<ClaimFtReward>

  • Claim an non-fungible token reward as a result of unlocking an achievement.

    Parameters

    • authority: PublicKey
    • achievement: PublicKey
    • mint: PublicKey
    • user: PublicKey

    Returns Promise<ClaimNftReward>

  • Parameters

    • address: PublicKey

    Returns Promise<AchievementAccount>

  • Parameters

    • Optional memcmp: Buffer | GetProgramAccountsFilter[]

    Returns Promise<AchievementAccount[]>

  • Parameters

    • Optional memcmp: Buffer | GetProgramAccountsFilter[]

    Returns Promise<GameAccount[]>

  • Parameters

    • Optional memcmp: Buffer | GetProgramAccountsFilter[]

    Returns Promise<LeaderBoardAccount[]>

  • Parameters

    • Optional memcmp: Buffer | GetProgramAccountsFilter[]

    Returns Promise<PlayerAccount[]>

  • Parameters

    • address: PublicKey

    Returns Promise<GameAccount>

  • Parameters

    • genre: string

    Returns Promise<GameAccount[]>

  • Parameters

    • address: PublicKey

    Returns Promise<LeaderBoardAccount>

  • Parameters

    • address: PublicKey

    Returns Promise<TopEntriesAccount>

  • Parameters

    • address: PublicKey

    Returns Promise<MergedAccount>

  • Parameters

    • address: PublicKey

    Returns Promise<PlayerAccount>

  • Parameters

    • address: PublicKey

    Returns Promise<PlayerAchievementAccount>

  • Parameters

    • user: PublicKey

    Returns Promise<PlayerAchievementAccount[]>

  • Parameters

    • address: PublicKey

    Returns Promise<PlayerScoresListAccount>

  • Parameters

    • address: PublicKey

    Returns Promise<RewardAccount>

  • Initialize a new Game account with the set parameters.

    Parameters

    • newGame: PublicKey
    • title: string
    • description: string
    • genre: Genre
    • gameType: GameType
    • nftMeta: PublicKey
    • authorities: PublicKey[]

    Returns Promise<InitializeGame>

  • Initialize a player account required to perform game-related actions.

    Parameters

    • user: PublicKey
    • username: string
    • nftMeta: PublicKey

    Returns Promise<InitializePlayer>

  • Initiate an action to merge multiple player-accounts as belonging to a single user.

    Parameters

    • user: PublicKey
    • newMergeAccount: PublicKey
    • playerAccountKeys: PublicKey[]

    Returns Promise<InitiateMerge>

  • Mark approval for a merge action.

    Parameters

    • user: PublicKey
    • mergeAccount: PublicKey

    Returns Promise<RegisterMergeApproval>

  • Register a player to a particular leaderboard.

    Parameters

    • user: PublicKey
    • leaderboard: PublicKey

    Returns Promise<RegisterPlayerEntry>

  • Parameters

    • transaction: Transaction
    • Optional signers: Signer[]
    • Optional opts: ConfirmOptions

    Returns Promise<string>

  • Parameters

    • transactions: Transaction[]
    • signers: Signer[][] = []
    • Optional opts: ConfirmOptions

    Returns Promise<string[]>

  • Submit a player's score to a leaderboard they're registered to.

    Parameters

    • user: PublicKey
    • authority: PublicKey
    • leaderboard: PublicKey
    • score: BN

    Returns Promise<SubmitScore>

  • Unlock an achievement for a player.

    Parameters

    • user: PublicKey
    • authority: PublicKey
    • achievement: PublicKey
    • leaderboard: PublicKey
    • Optional game: PublicKey

    Returns Promise<UnlockPlayerAchievement>

  • Update a game's attributes.

    Parameters

    • game: PublicKey
    • authority: PublicKey
    • Optional newMeta: GameAttributes
    • Optional newAuths: PublicKey[]

    Returns Promise<UpdateGame>

  • Update an achievement's details.

    Parameters

    • authority: PublicKey
    • achievement: PublicKey
    • Optional newTitle: string
    • Optional newDescription: string
    • Optional newNftMeta: PublicKey

    Returns Promise<UpdateAchievement>

  • Update a leaderboard.

    Parameters

    • authority: PublicKey
    • leaderboard: PublicKey
    • Optional newDescription: string
    • Optional newNftMeta: PublicKey

    Returns Promise<UpdateLeaderboard>

  • Update a player account's attributes.

    Parameters

    • user: PublicKey
    • Optional newUsername: string
    • Optional newNftMeta: PublicKey

    Returns Promise<UpdatePlayer>

  • Verify a minted NFT reward as part of the set collection.

    Parameters

    • user: PublicKey
    • achievement: PublicKey
    • mint: PublicKey

    Returns Promise<VerifyReward>

Generated using TypeDoc