> For the complete documentation index, see [llms.txt](https://docs.play.cronos.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.play.cronos.org/readme-1/namespaces/namespacecom_1_1crypto_1_1game__sdk.md).

# com::crypto::game\_sdk

## Classes

|        | Name                                                                                                                                                                                                                                                                                      |
| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_crypto_com_payment_response.md"><strong>com::crypto::game\_sdk::CryptoComPaymentResponse</strong></a><br>the subset of payment object from <a href="https://pay-docs.crypto.com"><https://pay-docs.crypto.com></a></p> |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_image_url.md"><strong>com::crypto::game\_sdk::ImageUrl</strong></a><br>The icon URLs.</p>                                                                                                                              |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_optional_arguments.md"><strong>com::crypto::game\_sdk::OptionalArguments</strong></a><br>optional arguments for creating a payment on Crypto.com Pay</p>                                                               |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_token_result.md"><strong>com::crypto::game\_sdk::RawTokenResult</strong></a><br>Token ownership result detail from BlockScout API.</p>                                                                             |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_tx_detail.md"><strong>com::crypto::game\_sdk::RawTxDetail</strong></a><br>Raw transaction details (extracted from Cronoscan/Etherscan or BlockScout API)</p>                                                       |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_token_holder_detail.md"><strong>com::crypto::game\_sdk::TokenHolderDetail</strong></a><br>Token holder detail from BlockScout API.</p>                                                                                 |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_address.md"><strong>com::crypto::game\_sdk::WalletConnectAddress</strong></a><br>cronos address info</p>                                                                                                |
| class  | [**com::crypto::game\_sdk::WalletConnectCallback**](/readme-1/classes/classcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_callback.md)                                                                                                                                                     |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_walletconnect_client.md"><strong>com::crypto::game\_sdk::WalletconnectClient</strong></a><br>WallnetConnect API.</p>                                                                                                   |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_ensure_session_result.md"><strong>com::crypto::game\_sdk::WalletConnectEnsureSessionResult</strong></a><br>walletconnect ensure-session result</p>                                                      |
| struct | [**com::crypto::game\_sdk::WalletConnectErc1155Approve**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc1155_approve.md)                                                                                                                                       |
| struct | [**com::crypto::game\_sdk::WalletConnectErc1155Batch**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc1155_batch.md)                                                                                                                                           |
| struct | [**com::crypto::game\_sdk::WalletConnectErc1155Transfer**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc1155_transfer.md)                                                                                                                                     |
| struct | [**com::crypto::game\_sdk::WalletConnectErc20Approve**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc20_approve.md)                                                                                                                                           |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc20_transfer.md"><strong>com::crypto::game\_sdk::WalletConnectErc20Transfer</strong></a><br>wallet connect cronos(eth) erc20-tx signing info</p>                                                      |
| struct | [**com::crypto::game\_sdk::WalletConnectErc721Approve**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc721_approve.md)                                                                                                                                         |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_erc721_transfer.md"><strong>com::crypto::game\_sdk::WalletConnectErc721Transfer</strong></a><br>wallet connect cronos(eth) erc721-tx signing info</p>                                                   |
| class  | [**com::crypto::game\_sdk::WalletConnectSessionInfo**](/readme-1/classes/classcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_session_info.md)                                                                                                                                              |
| struct | [**com::crypto::game\_sdk::WalletConnectTransactionReceiptRaw**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_transaction_receipt_raw.md)                                                                                                                        |
| struct | [**com::crypto::game\_sdk::WalletConnectTxCommon**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_tx_common.md)                                                                                                                                                   |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_tx_eip155.md"><strong>com::crypto::game\_sdk::WalletConnectTxEip155</strong></a><br>wallet connect cronos(eth) eip155-tx signing info</p>                                                               |
| struct | <p><a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_entry.md"><strong>com::crypto::game\_sdk::WalletEntry</strong></a><br>The wallet registry entry.</p>                                                                                                            |
| struct | [**com::crypto::game\_sdk::WalletQrcode**](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_qrcode.md)                                                                                                                                                                       |

## Types

|                                                                                                                                                  | Name                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enum class ::std::uint8\_t                                                                                                                       | <p><a href="#enum-platform"><strong>Platform</strong></a> { Android = 0, Ios = 1, Linux = 2, Mac = 3, Windows = 4, Browser = 5}<br>The target platform.</p> |
| enum class ::std::uint8\_t                                                                                                                       | [**QueryOption**](#enum-queryoption) { ByContract = 0, ByAddressAndContract = 1, ByAddress = 2}                                                             |
| using ::[com::crypto::game\_sdk::WalletConnectCallback](/readme-1/classes/classcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_callback.md)        | [**WalletConnectCallback**](#using-walletconnectcallback)                                                                                                   |
| using ::[com::crypto::game\_sdk::WalletConnectSessionInfo](/readme-1/classes/classcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_session_info.md) | [**WalletConnectSessionInfo**](#using-walletconnectsessioninfo)                                                                                             |
| using ::[com::crypto::game\_sdk::OptionalArguments](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_optional_arguments.md)                | [**OptionalArguments**](#using-optionalarguments)                                                                                                           |

## Functions

|                                                                                                                                                                                                       | Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::WalletEntry](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_entry.md) >                 | <p><a href="#function-filter-wallets"><strong>filter\_wallets</strong></a>(bool cached, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> registry\_local\_path, ::<a href="#enum-platform">com::crypto::game\_sdk::Platform</a> platform)<br>filter wallets by platform (registry\_local\_path can be empty string if it is not needed to store the cached registry result)</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::WalletEntry](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_entry.md) >                 | <p><a href="#function-get-all-wallets"><strong>get\_all\_wallets</strong></a>(bool cached, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> registry\_local\_path)<br>get all possible wallets (registry\_local\_path can be empty string if it is not needed to store the cached registry result)</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ::[com::crypto::game\_sdk::WalletQrcode](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_wallet_qrcode.md)                                                                                     | [**generate\_qrcode**](#function-generate-qrcode)(::[rust::String](/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md) qrcodestring)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ::[rust::Box](/readme-1/classes/classrust_1_1cxxbridge1_1_1_box.md)<::[com::crypto::game\_sdk::WalletconnectClient](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_walletconnect_client.md) > | <p><a href="#function-walletconnect-restore-client"><strong>walletconnect\_restore\_client</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> session\_info)<br>restore walletconnect-session from string</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ::[rust::Box](/readme-1/classes/classrust_1_1cxxbridge1_1_1_box.md)<::[com::crypto::game\_sdk::WalletconnectClient](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_walletconnect_client.md) > | <p><a href="#function-walletconnect-new-client"><strong>walletconnect\_new\_client</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> description, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> url, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md">rust::Vec</a><::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> > icon\_urls, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> name, ::std::uint64\_t chain\_id)<br>create walletconnect-session the chain id (if 0, retrived and decided by wallet, if > 0, decided by the client)</p>                                                                                                                                          |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::RawTxDetail](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_tx_detail.md) >                | <p><a href="#function-get-transaction-history-blocking"><strong>get\_transaction\_history\_blocking</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> api\_key)<br>returns the transactions of a given address.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::RawTxDetail](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_tx_detail.md) >                | <p><a href="#function-get-erc20-transfer-history-blocking"><strong>get\_erc20\_transfer\_history\_blocking</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> contract\_address, ::<a href="#enum-queryoption">com::crypto::game\_sdk::QueryOption</a> option, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> api\_key)<br>returns the ERC20 transfers of a given address of a given contract.</p>                                                                                                                                                                                                                                                                                |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::RawTxDetail](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_tx_detail.md) >                | <p><a href="#function-get-erc721-transfer-history-blocking"><strong>get\_erc721\_transfer\_history\_blocking</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> contract\_address, ::<a href="#enum-queryoption">com::crypto::game\_sdk::QueryOption</a> option, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> api\_key)<br>returns the ERC721 transfers of a given address of a given contract.</p>                                                                                                                                                                                                                                                                             |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::RawTokenResult](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_token_result.md) >          | <p><a href="#function-get-tokens-blocking"><strong>get\_tokens\_blocking</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> blockscout\_base\_url, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> account\_address)<br>given the BlockScout REST API base url and the account address (hexadecimal), it will return the list of all owned tokens (ref: <a href="https://cronos.org/explorer/testnet3/api-docs"><https://cronos.org/explorer/testnet3/api-docs></a>)</p>                                                                                                                                                                                                                                                                                                         |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::RawTxDetail](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_raw_tx_detail.md) >                | <p><a href="#function-get-token-transfers-blocking"><strong>get\_token\_transfers\_blocking</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> blockscout\_base\_url, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> address, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> contract\_address, ::<a href="#enum-queryoption">com::crypto::game\_sdk::QueryOption</a> option)<br>given the BlockScout REST API base url and the account address (hexadecimal; required) and optional contract address (hexadecimal; optional – it can be empty if the option is ByAddress), it will return all the token transfers (ERC20, ERC721...</p>                                                                                                  |
| ::[rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)<::[com::crypto::game\_sdk::TokenHolderDetail](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_token_holder_detail.md) >    | <p><a href="#function-get-token-holders"><strong>get\_token\_holders</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> blockscout\_base\_url, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> contract\_address, ::std::uint64\_t page, ::std::uint64\_t offset)<br>given the BlockScout REST API base url and the contract address (hexadecimal),</p>                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ::[com::crypto::game\_sdk::CryptoComPaymentResponse](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_crypto_com_payment_response.md)                                                           | <p><a href="#function-create-payment"><strong>create\_payment</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> secret\_or\_publishable\_api\_key, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> base\_unit\_amount, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> currency, ::<a href="/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_optional_arguments.md">com::crypto::game\_sdk::OptionalArguments</a> const & optional\_args)<br>it creates the payment object <a href="https://pay-docs.crypto.com/#api-reference-resources-payments-create-a-payment"><https://pay-docs.crypto.com/#api-reference-resources-payments-create-a-payment></a> This API can be called using either your Secret Key or Publishable Key.</p> |
| ::[com::crypto::game\_sdk::CryptoComPaymentResponse](/readme-1/classes/structcom_1_1crypto_1_1game__sdk_1_1_crypto_com_payment_response.md)                                                           | <p><a href="#function-get-payment"><strong>get\_payment</strong></a>(::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> secret\_or\_publishable\_api\_key, ::<a href="/readme-1/classes/classrust_1_1cxxbridge1_1_1_string.md">rust::String</a> payment\_id)<br>it returns the payment object by id <a href="https://pay-docs.crypto.com/#api-reference-resources-payments-get-payment-by-id"><https://pay-docs.crypto.com/#api-reference-resources-payments-get-payment-by-id></a> This API can be called using either your Secret Key or Publishable Key.</p>                                                                                                                                                                                                                                                                    |
| std::unique\_ptr< [WalletConnectSessionInfo](/readme-1/classes/classcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_session_info.md) >                                                                  | [**new\_walletconnect\_sessioninfo**](#function-new-walletconnect-sessioninfo)()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| std::unique\_ptr< [WalletConnectCallback](/readme-1/classes/classcom_1_1crypto_1_1game__sdk_1_1_wallet_connect_callback.md) >                                                                         | [**new\_walletconnect\_callback**](#function-new-walletconnect-callback)()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

## Types Documentation

### enum Platform

| Enumerator | Value | Description |
| ---------- | ----- | ----------- |
| Android    | 0     |             |
| Ios        | 1     |             |
| Linux      | 2     |             |
| Mac        | 3     |             |
| Windows    | 4     |             |
| Browser    | 5     |             |

The target platform.

### enum QueryOption

| Enumerator           | Value | Description |
| -------------------- | ----- | ----------- |
| ByContract           | 0     |             |
| ByAddressAndContract | 1     |             |
| ByAddress            | 2     |             |

### using WalletConnectCallback

```cpp
using com::crypto::game_sdk::WalletConnectCallback = typedef ::com::crypto::game_sdk::WalletConnectCallback;
```

### using WalletConnectSessionInfo

```cpp
using com::crypto::game_sdk::WalletConnectSessionInfo = typedef ::com::crypto::game_sdk::WalletConnectSessionInfo;
```

### using OptionalArguments

```cpp
using com::crypto::game_sdk::OptionalArguments = typedef ::com::crypto::game_sdk::OptionalArguments;
```

## Functions Documentation

### function filter\_wallets

```cpp
::rust::Vec<::com::crypto::game_sdk::WalletEntry > filter_wallets(
    bool cached,
    ::rust::String registry_local_path,
    ::com::crypto::game_sdk::Platform platform
)
```

filter wallets by platform (registry\_local\_path can be empty string if it is not needed to store the cached registry result)

### function get\_all\_wallets

```cpp
::rust::Vec<::com::crypto::game_sdk::WalletEntry > get_all_wallets(
    bool cached,
    ::rust::String registry_local_path
)
```

get all possible wallets (registry\_local\_path can be empty string if it is not needed to store the cached registry result)

### function generate\_qrcode

```cpp
::com::crypto::game_sdk::WalletQrcode generate_qrcode(
    ::rust::String qrcodestring
)
```

### function walletconnect\_restore\_client

```cpp
::rust::Box<::com::crypto::game_sdk::WalletconnectClient > walletconnect_restore_client(
    ::rust::String session_info
)
```

restore walletconnect-session from string

### function walletconnect\_new\_client

```cpp
::rust::Box<::com::crypto::game_sdk::WalletconnectClient > walletconnect_new_client(
    ::rust::String description,
    ::rust::String url,
    ::rust::Vec<::rust::String > icon_urls,
    ::rust::String name,
    ::std::uint64_t chain_id
)
```

create walletconnect-session the chain id (if 0, retrived and decided by wallet, if > 0, decided by the client)

### function get\_transaction\_history\_blocking

```cpp
::rust::Vec<::com::crypto::game_sdk::RawTxDetail > get_transaction_history_blocking(
    ::rust::String address,
    ::rust::String api_key
)
```

returns the transactions of a given address.

The API key can be obtained from <https://cronoscan.com>

### function get\_erc20\_transfer\_history\_blocking

```cpp
::rust::Vec<::com::crypto::game_sdk::RawTxDetail > get_erc20_transfer_history_blocking(
    ::rust::String address,
    ::rust::String contract_address,
    ::com::crypto::game_sdk::QueryOption option,
    ::rust::String api_key
)
```

returns the ERC20 transfers of a given address of a given contract.

(address can be empty if option is ByContract) default option is by address The API key can be obtained from <https://cronoscan.com>

### function get\_erc721\_transfer\_history\_blocking

```cpp
::rust::Vec<::com::crypto::game_sdk::RawTxDetail > get_erc721_transfer_history_blocking(
    ::rust::String address,
    ::rust::String contract_address,
    ::com::crypto::game_sdk::QueryOption option,
    ::rust::String api_key
)
```

returns the ERC721 transfers of a given address of a given contract.

(address can be empty if option is ByContract) default option is by address The API key can be obtained from <https://cronoscan.com>

### function get\_tokens\_blocking

```cpp
::rust::Vec<::com::crypto::game_sdk::RawTokenResult > get_tokens_blocking(
    ::rust::String blockscout_base_url,
    ::rust::String account_address
)
```

given the BlockScout REST API base url and the account address (hexadecimal), it will return the list of all owned tokens (ref: <https://cronos.org/explorer/testnet3/api-docs>)

### function get\_token\_transfers\_blocking

```cpp
::rust::Vec<::com::crypto::game_sdk::RawTxDetail > get_token_transfers_blocking(
    ::rust::String blockscout_base_url,
    ::rust::String address,
    ::rust::String contract_address,
    ::com::crypto::game_sdk::QueryOption option
)
```

given the BlockScout REST API base url and the account address (hexadecimal; required) and optional contract address (hexadecimal; optional – it can be empty if the option is ByAddress), it will return all the token transfers (ERC20, ERC721...

in the newer BlockScout releases, also ERC1155) (ref: <https://cronos.org/explorer/testnet3/api-docs>) NOTE: QueryOption::ByContract is not supported by BlockScout

### function get\_token\_holders

```cpp
::rust::Vec<::com::crypto::game_sdk::TokenHolderDetail > get_token_holders(
    ::rust::String blockscout_base_url,
    ::rust::String contract_address,
    ::std::uint64_t page,
    ::std::uint64_t offset
)
```

given the BlockScout REST API base url and the contract address (hexadecimal),

page: A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset: A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

it will return the list of owners and balances (sorting from largest to smallest), but no token ids.

(ref: <https://cronos.org/explorer/api-docs#token>)

::TIPS:: Use another functions to get more token/owner details, e.g. `get_tokens_blocking` to get owned tokens by account\_address

### function create\_payment

```cpp
::com::crypto::game_sdk::CryptoComPaymentResponse create_payment(
    ::rust::String secret_or_publishable_api_key,
    ::rust::String base_unit_amount,
    ::rust::String currency,
    ::com::crypto::game_sdk::OptionalArguments const & optional_args
)
```

it creates the payment object <https://pay-docs.crypto.com/#api-reference-resources-payments-create-a-payment> This API can be called using either your Secret Key or Publishable Key.

The amount should be given in base units (e.g. for USD, the base unit is cents 1 USD == 100 cents).

### function get\_payment

```cpp
::com::crypto::game_sdk::CryptoComPaymentResponse get_payment(
    ::rust::String secret_or_publishable_api_key,
    ::rust::String payment_id
)
```

it returns the payment object by id <https://pay-docs.crypto.com/#api-reference-resources-payments-get-payment-by-id> This API can be called using either your Secret Key or Publishable Key.

### function new\_walletconnect\_sessioninfo

```cpp
std::unique_ptr< WalletConnectSessionInfo > new_walletconnect_sessioninfo()
```

### function new\_walletconnect\_callback

```cpp
std::unique_ptr< WalletConnectCallback > new_walletconnect_callback()
```

***

Updated on 2023-01-11 at 18:25:18 +0800
