GameFiBase is a parent for every implementation of GameFi. Game engine specific implementations like Phaser only needs to define its own create and createConnectButton methods.

Hierarchy (view full)

Constructors

Properties

assetsSdk: AssetsSDK
merchant?: Merchant
sender: Sender
walletConnector: TonConnectUI

Accessors

Methods

  • Call connectWallet programmatically in case you are not going to use TonConnectUI provided UI or game engine provided button and you draw your own UI.

    Parameters

    Returns Promise<void>

  • Call connectWallet programmatically in case you draw your own UI.

    Returns Promise<void>

  • Watch weather wallet was connected or disconnected. Use the method to reflect it on the UI state.

    Parameters

    • Rest ...params: [callback: ((wallet) => void), errorsHandler?: ((err) => void)]

    Returns (() => void)

      • (): void
      • Returns void

  • Open Jetton Wallet contract.

    Parameters

    Returns OpenedContract<JettonWallet>

  • Open NFT collection contract.

    Parameters

    Returns OpenedContract<NftCollection>

  • Get NFT item from collection using its index.

    Parameters

    • collectionAddress: Address
    • itemIndex: bigint

    Returns Promise<OpenedContract<NftItem>>

  • Open SBT collection contract.

    Parameters

    Returns OpenedContract<SbtCollection>

Generated using TypeDoc