A class for constructing more-tailored and specific instructions.

Hierarchy

  • InstructionBuilder

Constructors

Properties

accounts: AccountsBuilder
instructions: TransactionInstruction[]
program: Program<Soar>
signers: Signer[]
utils: Utils

Methods

  • Parameters

    • args: AddAchievementArgs
    • game: PublicKey
    • authority: PublicKey
    • Optional nextAchievement: PublicKey

    Returns Promise<[InstructionBuilder, {
        authority: PublicKey;
        game: PublicKey;
        newAchievement: PublicKey;
        payer: PublicKey;
        systemProgram: PublicKey;
    }]>

  • Parameters

    • args: AddFtRewardArgs
    • authority: PublicKey
    • newReward: PublicKey
    • achievement: PublicKey
    • sourceTokenAccount: PublicKey
    • tokenAccountOwner: PublicKey
    • mint: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        authority: PublicKey;
        delegateFromTokenAccount: PublicKey;
        game: PublicKey;
        newReward: PublicKey;
        payer: PublicKey;
        rewardTokenMint: PublicKey;
        systemProgram: PublicKey;
        tokenAccountOwner: PublicKey;
        tokenProgram: PublicKey;
    }]>

  • Parameters

    • args: AddLeaderBoardArgs
    • gameAddress: PublicKey
    • authority: PublicKey
    • Optional nextLeaderboard: PublicKey

    Returns Promise<[InstructionBuilder, {
        authority: PublicKey;
        game: PublicKey;
        leaderboard: PublicKey;
        payer: PublicKey;
        systemProgram: PublicKey;
        topEntries: null | PublicKey;
    }]>

  • Parameters

    • args: AddNftRewardArgs
    • authority: PublicKey
    • newReward: PublicKey
    • achievement: PublicKey
    • Optional collectionMint: PublicKey
    • Optional collectionUpdateAuthority: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        authority: PublicKey;
        collectionMetadata: null | PublicKey;
        collectionUpdateAuth: null | PublicKey;
        game: PublicKey;
        newReward: PublicKey;
        payer: PublicKey;
        rewardCollectionMint: null | PublicKey;
        systemProgram: PublicKey;
        tokenMetadataProgram: null | PublicKey;
    }]>

  • Parameters

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

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        authority: PublicKey;
        game: PublicKey;
        mint: PublicKey;
        playerAccount: PublicKey;
        playerAchievement: PublicKey;
        reward: PublicKey;
        sourceTokenAccount: PublicKey;
        tokenProgram: PublicKey;
        user: PublicKey;
        userTokenAccount: PublicKey;
    }]>

  • Parameters

    • authority: PublicKey
    • achievement: PublicKey
    • mint: PublicKey
    • user: PublicKey
    • Optional reward: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        associatedTokenProgram: PublicKey;
        authority: PublicKey;
        claim: PublicKey;
        game: PublicKey;
        mintTo: PublicKey;
        newMasterEdition: PublicKey;
        newMetadata: PublicKey;
        newMint: PublicKey;
        payer: PublicKey;
        playerAccount: PublicKey;
        playerAchievement: PublicKey;
        rent: PublicKey;
        reward: PublicKey;
        systemProgram: PublicKey;
        tokenMetadataProgram: PublicKey;
        tokenProgram: PublicKey;
        user: PublicKey;
    }]>

  • Send and confirm the bundled transaction.

    Parameters

    • Optional opts: ConfirmOptions

    Returns Promise<string>

  • Parameters

    • args: InitializeGameArgs
    • newGame: PublicKey

    Returns Promise<[InstructionBuilder, {
        creator: PublicKey;
        game: PublicKey;
        systemProgram: PublicKey;
    }]>

  • Parameters

    • args: InitMergeArgs
    • user: PublicKey
    • newMergeAccount: PublicKey

    Returns Promise<[InstructionBuilder, {
        mergeAccount: PublicKey;
        payer: PublicKey;
        playerAccount: PublicKey;
        systemProgram: PublicKey;
        user: PublicKey;
    }]>

  • Parameters

    • args: InitializePlayerArgs
    • user: PublicKey

    Returns Promise<[InstructionBuilder, {
        payer: PublicKey;
        playerAccount: PublicKey;
        systemProgram: PublicKey;
        user: PublicKey;
    }]>

  • Parameters

    • user: PublicKey
    • mergeAccount: PublicKey

    Returns Promise<[InstructionBuilder, {
        mergeAccount: PublicKey;
        playerAccount: PublicKey;
        user: PublicKey;
    }]>

  • Parameters

    • user: PublicKey
    • leaderboard: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        game: PublicKey;
        leaderboard: PublicKey;
        newList: PublicKey;
        payer: PublicKey;
        playerAccount: PublicKey;
        systemProgram: PublicKey;
        user: PublicKey;
    }]>

  • Parameters

    • args: SubmitScoreArgs
    • user: PublicKey
    • authority: PublicKey
    • leaderboard: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        authority: PublicKey;
        game: PublicKey;
        leaderboard: PublicKey;
        payer: PublicKey;
        playerAccount: PublicKey;
        playerScores: PublicKey;
        systemProgram: PublicKey;
        topEntries: null | PublicKey;
    }]>

  • Parameters

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

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        authority: PublicKey;
        game: PublicKey;
        payer: PublicKey;
        playerAccount: PublicKey;
        playerAchievement: PublicKey;
        playerScores: PublicKey;
    }]>

  • Parameters

    • args: UpdateAchievementArgs
    • authority: PublicKey
    • achievement: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        authority: PublicKey;
        game: PublicKey;
    }]>

  • Parameters

    • args: UpdateGameArgs
    • game: PublicKey
    • authority: PublicKey

    Returns Promise<[InstructionBuilder, {
        authority: PublicKey;
        game: PublicKey;
        payer: PublicKey;
        systemProgram: PublicKey;
    }]>

  • Parameters

    • args: UpdateLeaderboardArgs
    • authority: PublicKey
    • leaderboard: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        authority: PublicKey;
        game: PublicKey;
        leaderboard: PublicKey;
    }]>

  • Parameters

    • user: PublicKey
    • achievement: PublicKey
    • mint: PublicKey
    • Optional reward: PublicKey
    • Optional game: PublicKey

    Returns Promise<[InstructionBuilder, {
        achievement: PublicKey;
        claim: PublicKey;
        collectionEdition: PublicKey;
        collectionMetadata: PublicKey;
        collectionMint: PublicKey;
        game: PublicKey;
        metadataToVerify: PublicKey;
        mint: PublicKey;
        payer: PublicKey;
        playerAccount: PublicKey;
        playerAchievement: PublicKey;
        reward: PublicKey;
        tokenMetadataProgram: PublicKey;
        user: PublicKey;
    }]>

Generated using TypeDoc