For the complete documentation index, see llms.txt. This page is also available as Markdown.

Crypto Wallet

This endpoint is used to perform various blockchain transactions, such as token and NFT transactions, to and from the game and users' crypto wallets.

URL

https://api.idosgames.com/api/{titleTemplateId}/{titleId}/Client/CryptoWallet/Transaction  

Method

  • POST

Route Parameters

  • titleTemplateId (string): The template ID of the title.

  • titleId (string): The ID of the title.

Request Body (JSON)

{  
    "WebAppLink": "string",  
    "UsageTime": "int",  
    "ClientSessionTicket": "string",  
    "EntityToken": "string",  
    "UserID": "string",  
    "TransactionType": "string",  
    "TransactionDirection": "string",  
    "ChainID": "string",  
    "TransactionHash": "string",  
    "VirtualCurrencyID": "string",  
    "Amount": "string",  
    "WalletAddress": "string",  
    "SkinID": "string"  
}  

Responses

  • 200 OK: Successful operation. Returns the transaction status.

  • 400 Bad Request: Incorrect request parameters or validation error. Possible messages:

    • INVALID_REQUEST_ARGS

    • TITLEID_INCORRECT

    • INCORRECT_CHAIN_ID

    • INCORRECT_TRANSACTION_TYPE

    • INCORRECT_TRANSACTION_DIRECTION

MakeTokenTransactionToGame

Description: This action handles the transfer of tokens to the game from the user's wallet.

  • Route: /Transaction

  • Method: POST

Request Parameters:

Responses

  • 200 OK: Transaction successful. Returns a success message with the transaction hash.

  • 400 Bad Request: Incorrect request parameters. Possible errors include INVALID_REQUEST_ARGS, INCORRECT_HASH, INCORRECT_TRANSACTION, TRANSACTION_HASH_ALREADY_USED, INCORRECT_TOKEN_ID, and FAILED_TO_SAVE_TO_DATABASE.

Example Usage:


MakeTokenTransactionToUsersCryptoWallet

Description: This action handles the transfer of tokens to the user's wallet from the game.

  • Route: /Transaction

  • Method: POST

Request Parameters:

Responses

  • 200 OK: Transaction successful. Returns a success message with the transaction hash.

  • 400 Bad Request: Incorrect request parameters. Possible errors include INVALID_REQUEST_ARGS, INCORRECT_VIRTUAL_CURRENCY_ID, INCORRECT_AMOUNT, INCORRECT_WALLET_ADDRESS, FAILED_TO_MODIFY_VIRTUAL_CURRENCY, NOT_ENOUGH_FUNDS, ALL_RESOURCES_ARE_BUSY, and FAILED_TO_SAVE_TO_DATABASE.

Example Usage:


MakeNFTTransactionToGame

Description: This action handles the transfer of NFTs to the game from the user's wallet.

  • Route: /Transaction

  • Method: POST

Request Parameters:

Responses

  • 200 OK: Transaction successful. Returns a success message with the transaction hash.

  • 400 Bad Request: Incorrect request parameters. Possible errors include INVALID_REQUEST_ARGS, INCORRECT_HASH, INCORRECT_TRANSACTION, TRANSACTION_HASH_ALREADY_USED, INCORRECT_NFT_ID, FAILED_TO_SAVE_TO_DATABASE, and FAILED_TO_GRANT_ITEMS.

Example Usage:


MakeNFTTransactionToUsersCryptoWallet

Description: This action handles the transfer of NFTs to the user's wallet from the game.

  • Route: /Transaction

  • Method: POST

Request Parameters:

Responses

  • 200 OK: Transaction successful. Returns a success message with the transaction hash.

  • 400 Bad Request: Incorrect request parameters. Possible errors include INVALID_REQUEST_ARGS, INCORRECT_SKIN_ID, INCORRECT_AMOUNT, INCORRECT_WALLET_ADDRESS, FAILED_TO_CONSUME_ITEMS, FAILED_TO_MODIFY_VIRTUAL_CURRENCY, NOT_ENOUGH_FUNDS, ALL_RESOURCES_ARE_BUSY, and FAILED_TO_SAVE_TO_DATABASE.

Example Usage:


Last updated