# Tanssi Developer Documentation (LLMS Format) This file contains documentation for Tanssi (https://docs.tanssi.network). Tanssi is a decentralized infrastructure protocol designed to enable the rapid deployment of sovereign appchains. It is intended for use with large language models (LLMs) to support developers working with Tanssi. The content includes selected pages from the official docs, organized by section. This file includes documentation related to the category: Reference ## List of doc pages: Doc-Page: https://raw.githubusercontent.com/moondance-labs/tanssi-docs/refs/heads/main/builders/tanssi-network/endpoints.md [type: builders] Doc-Page: https://raw.githubusercontent.com/moondance-labs/tanssi-docs/refs/heads/main/builders/toolkit/ethereum-api/rpc.md [type: builders] Doc-Page: https://raw.githubusercontent.com/moondance-labs/tanssi-docs/refs/heads/main/pt/builders/tanssi-network/endpoints.md [type: builders] Doc-Page: https://raw.githubusercontent.com/moondance-labs/tanssi-docs/refs/heads/main/pt/builders/toolkit/ethereum-api/rpc.md [type: builders] ## Full content for each doc page Doc-Content: https://docs.tanssi.network/builders/tanssi-network/endpoints/ --- BEGIN CONTENT --- --- title: Network Endpoints description: Tanssi networks have two endpoints available for users to connect to, one for HTTPS and one for WSS. This page has the RPC endpoints you need to get started. icon: octicons-share-android-24 categories: Reference --- ## Network Endpoints Tanssi networks have two endpoints available for users to connect to: one for HTTPS and one for WSS. ## Tanssi MainNet The Tanssi Network MainNet HTTPS and WSS endpoints are as follows: === "HTTPS" ```text https://{{ networks.mainnet.dns_name }} ``` === "WSS" ```text wss://{{ networks.mainnet.dns_name }} ``` ## Dancelight The Tanssi TestNet HTTPS and WSS endpoints are as follows: === "HTTPS" ```text https://{{ networks.dancelight.dns_name }} ``` === "WSS" ```text wss://{{ networks.dancelight.dns_name }} ``` ### Demo EVM Network The demo EVM network HTTPS and WSS endpoints are as follows: === "HTTPS" ```text {{ networks.dancelight.demo_evm_rpc_url }} ``` === "WSS" ```text {{ networks.dancelight.demo_evm_rpc_wss_url }} ``` --- END CONTENT --- Doc-Content: https://docs.tanssi.network/builders/toolkit/ethereum-api/rpc/ --- BEGIN CONTENT --- --- title: JSON-RPC API Methods description: Learn about the supported JSON-RPC API methods for querying your Tanssi EVM network, including standard Ethereum methods and custom methods unique to Tanssi. icon: material-code-json categories: Reference --- # JSON-RPC API Methods ## Standard Ethereum JSON-RPC Methods {: #standard-rpc-methods } As Tanssi's EVM Compatibility is derived from [Frontier](https://github.com/polkadot-evm/frontier){target=\_blank} and closely modeled after Moonbeam's Ethereum compatibility, Tanssi nodes support a wide variety of standard supported Ethereum JSON-RPC methods. Nevertheless, not all Ethereum JSON-RPC methods are supported; some of those supported return default values (those related to Ethereum's PoW consensus mechanism in particular). This guide provides a comprehensive list of supported Ethereum JSON-RPC methods on Tanssi. Developers can quickly reference this list to understand the available functionality for interfacing with Tanssi EVM networks. The basic JSON-RPC methods from the Ethereum API supported by Tanssi are: - **[eth_protocolVersion](https://ethereum.org/developers/docs/apis/json-rpc/#eth_protocolversion){target=\_blank}** — returns `1` by default - **[eth_syncing](https://ethereum.org/developers/docs/apis/json-rpc/#eth_syncing){target=\_blank}** — returns an object with data about the sync status or `false` - **[eth_hashrate](https://ethereum.org/developers/docs/apis/json-rpc/#eth_hashrate){target=\_blank}** — returns `"0x0"` by default - **[eth_coinbase](https://ethereum.org/developers/docs/apis/json-rpc/#eth_coinbase){target=\_blank}** — returns the latest block author. Not necessarily a finalized block - **[eth_mining](https://ethereum.org/developers/docs/apis/json-rpc/#eth_mining){target=\_blank}** — returns `false` by default - **[eth_chainId](https://ethereum.org/developers/docs/apis/json-rpc/#eth_chainid){target=\_blank}** — returns the chain ID used for signing at the current block - **[eth_gasPrice](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gasprice){target=\_blank}** — returns the base fee per unit of gas used. This is currently the minimum gas price for each network - **[eth_accounts](https://ethereum.org/developers/docs/apis/json-rpc/#eth_accounts){target=\_blank}** — returns a list of addresses owned by the client - **[eth_blockNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_blocknumber){target=\_blank}** — returns the highest available block number - **[eth_getBalance](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getbalance){target=\_blank}** — returns the balance of the given address - **[eth_getStorageAt](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getstorageat){target=\_blank}** — returns the content of the storage at a given address - **[eth_getBlockByHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblockbyhash){target=\_blank}** — returns information about the block of the given hash, including `baseFeePerGas` on post-London blocks - **[eth_getBlockByNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblockbynumber){target=\_blank}** — returns information about the block specified by block number, including `baseFeePerGas` on post-London blocks - **[eth_getBlockReceipts](https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-receipts){target=\_blank}** — returns all transaction receipts for a given block - **[eth_getTransactionCount](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactioncount){target=\_blank}** — returns the number of transactions sent from the given address (nonce) - **[eth_getBlockTransactionCountByHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash){target=\_blank}** — returns the number of transactions in a block with a given block hash - **[eth_getBlockTransactionCountByNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber){target=\_blank}** — returns the number of transactions in a block with a given block number - **[eth_getUncleCountByBlockHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclecountbyblockhash){target=\_blank}** — returns `"0x0"` by default - **[eth_getUncleCountByBlockNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclecountbyblocknumber){target=\_blank}** — returns `"0x0"` by default - **[eth_getCode](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getcode){target=\_blank}** — returns the code at the given address at the given block number - **[eth_sendTransaction](https://ethereum.org/developers/docs/apis/json-rpc/#eth_sendtransaction){target=\_blank}** — creates a new message call transaction or a contract creation, if the data field contains code. Returns the transaction hash or the zero hash if the transaction is not yet available - **[eth_sendRawTransaction](https://ethereum.org/developers/docs/apis/json-rpc/#eth_sendrawtransaction){target=\_blank}** — creates a new message call transaction or a contract creation for signed transactions. Returns the transaction hash or the zero hash if the transaction is not yet available - **[eth_call](https://ethereum.org/developers/docs/apis/json-rpc/#eth_call){target=\_blank}** — executes a new message call immediately without creating a transaction on the blockchain, returning the value of the executed call - **[eth_estimateGas](https://ethereum.org/developers/docs/apis/json-rpc/#eth_estimategas){target=\_blank}** — returns an estimated amount of gas necessary for a given transaction to succeed. You can optionally specify a `gasPrice` or `maxFeePerGas` and `maxPriorityFeePerGas` - **[eth_feeHistory](https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-fee-history){target=\_blank}** — returns `baseFeePerGas`, `gasUsedRatio`, `oldestBlock`, and `reward` for a specified range of up to 1024 blocks - **[eth_getTransactionByHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionbyhash){target=\_blank}** — returns the information about a transaction with a given hash. EIP-1559 transactions have `maxPriorityFeePerGas` and `maxFeePerGas` fields - **[eth_getTransactionByBlockHashAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionbyblockhashandindex){target=\_blank}** — returns information about a transaction at a given block hash and a given index position. EIP-1559 transactions have `maxPriorityFeePerGas` and `maxFeePerGas` fields - **[eth_getTransactionByBlockNumberAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionbyblocknumberandindex){target=\_blank}** — returns information about a transaction at a given block number and a given index position. EIP-1559 transactions have `maxPriorityFeePerGas` and `maxFeePerGas` fields - **[eth_getTransactionReceipt](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionreceipt){target=\_blank}** — returns the transaction receipt of a given transaction hash - **[eth_getUncleByBlockHashAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclebyblockhashandindex){target=\_blank}** — returns `null` by default - **[eth_getUncleByBlockNumberAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclebyblocknumberandindex){target=\_blank}** — returns `null` by default - **[eth_getLogs](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getlogs){target=\_blank}** — returns an array of all logs matching a given filter object - **[eth_newFilter](https://ethereum.org/developers/docs/apis/json-rpc/#eth_newfilter){target=\_blank}** — creates a filter object based on the input provided. Returns a filter ID - **[eth_newBlockFilter](https://ethereum.org/developers/docs/apis/json-rpc/#eth_newblockfilter){target=\_blank}** — creates a filter in the node to notify when a new block arrives. Returns a filter ID - **[eth_getFilterChanges](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getfilterchanges){target=\_blank}** — polling method for filters (see methods above). Returns an array of logs that occurred since the last poll - **[eth_getFilterLogs](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getfilterlogs){target=\_blank}** — returns an array of all the logs matching the filter with a given ID - **[eth_uninstallFilter](https://ethereum.org/developers/docs/apis/json-rpc/#eth_uninstallfilter){target=\_blank}** — uninstall a filter with a given ID. It should be used when polling is no longer needed. Filters timeout when they are not requested using `eth_getFilterChanges` after some time ## Custom JSON-RPC Methods {: #custom-json-rpc-methods } Tanssi nodes support two custom JSON-RPC endpoints: `frnt_isBlockFinalized` and `frnt_isTxFinalized`. Tanssi features deterministic finality (as opposed to probabilistic like Bitcoin's finality), which means that at any point of time, the answer to whether a block or transaction is finalized or not can be answered with a definitive yes or no. Tanssi has built these two custom endpoints to provide valuable functionality for checking the finality of on-chain events. ???+ function "frnt_isBlockFinalized - checks for the finality of the block given by its block hash" === "Parameters" - `block_hash` ++"string"++ - the hash of the block, accepts either Substrate-style or Ethereum-style block hash as its input === "Returns" ++"boolean"++ - `true` if the block is finalized, `false` if the block is not finalized or not found === "Example" ```bash curl -H "Content-Type: application/json" -X POST --data '{ "jsonrpc": "2.0", "id": "1", "method": "frnt_isBlockFinalized", "params": ["INSERT_BLOCK_HASH"] }' {{ networks.dancelight.demo_evm_rpc_url }} ``` ???+ function "frnt_isTxFinalized - checks for the finality of a transaction given its EVM transaction hash" === "Parameters" - `tx_hash` ++"string"++ - the EVM transaction hash of the transaction === "Returns" ++"boolean"++ - `true` if the transaction is finalized, `false` if the transaction is not finalized or not found === "Example" ```bash curl -H "Content-Type: application/json" -X POST --data '{ "jsonrpc": "2.0", "id": "1", "method": "frnt_isTxFinalized", "params": ["INSERT_TRANSACTION_HASH"] }' {{ networks.dancelight.demo_evm_rpc_url }} ``` --- END CONTENT --- Doc-Content: https://docs.tanssi.network/pt/builders/tanssi-network/endpoints/ --- BEGIN CONTENT --- --- title: Endpoints da Rede description: As redes Tanssi têm dois endpoints disponíveis para os usuários se conectarem, um para HTTPS e outro para WSS. Esta página traz os endpoints RPC de que você precisa para começar. icon: octicons-share-android-24 categories: Reference --- ## Pontos Finais da Rede As redes Tanssi têm dois pontos finais disponíveis para os utilizadores se conectarem: um para HTTPS e outro para WSS. ## MainNet Tanssi Os pontos finais HTTPS e WSS da Tanssi Network MainNet são os seguintes: === "HTTPS" ```text https://{{ networks.mainnet.dns_name }} ``` === "WSS" ```text wss://{{ networks.mainnet.dns_name }} ``` ## Dancelight Os pontos finais HTTPS e WSS da Tanssi TestNet são os seguintes: === "HTTPS" ```text https://{{ networks.dancelight.dns_name }} ``` === "WSS" ```text wss://{{ networks.dancelight.dns_name }} ``` ### Rede Demo EVM Os pontos finais HTTPS e WSS da rede Demo EVM são os seguintes: === "HTTPS" ```text {{ networks.dancelight.demo_evm_rpc_url }} ``` === "WSS" ```text {{ networks.dancelight.demo_evm_rpc_wss_url }} ``` --- END CONTENT --- Doc-Content: https://docs.tanssi.network/pt/builders/toolkit/ethereum-api/rpc/ --- BEGIN CONTENT --- --- title: Métodos da API JSON-RPC description: Saiba quais métodos JSON-RPC são suportados para consultar sua rede EVM da Tanssi, incluindo métodos Ethereum padrão e métodos personalizados da Tanssi. icon: material-code-json categories: Reference --- # Métodos da API JSON-RPC ## Métodos Ethereum Padrão {: #standard-rpc-methods } A compatibilidade EVM da Tanssi é derivada do [Frontier](https://github.com/polkadot-evm/frontier){target=\_blank} e segue de perto a compatibilidade Ethereum do Moonbeam. Os nós da Tanssi suportam uma ampla variedade de métodos JSON-RPC padrão do Ethereum. Nem todos os métodos são suportados; alguns retornam valores padrão (especialmente os ligados ao PoW). Abaixo está a lista dos métodos Ethereum JSON-RPC suportados na Tanssi para que os desenvolvedores saibam o que está disponível ao interagir com redes EVM da Tanssi. Métodos básicos da API Ethereum suportados: - **[eth_protocolVersion](https://ethereum.org/developers/docs/apis/json-rpc/#eth_protocolversion){target=\_blank}** — retorna `1` por padrão - **[eth_syncing](https://ethereum.org/developers/docs/apis/json-rpc/#eth_syncing){target=\_blank}** — retorna um objeto com o status de sincronização ou `false` - **[eth_hashrate](https://ethereum.org/developers/docs/apis/json-rpc/#eth_hashrate){target=\_blank}** — retorna `"0x0"` por padrão - **[eth_coinbase](https://ethereum.org/developers/docs/apis/json-rpc/#eth_coinbase){target=\_blank}** — retorna o autor do último bloco (não necessariamente finalizado) - **[eth_mining](https://ethereum.org/developers/docs/apis/json-rpc/#eth_mining){target=\_blank}** — retorna `false` por padrão - **[eth_chainId](https://ethereum.org/developers/docs/apis/json-rpc/#eth_chainid){target=\_blank}** — retorna o chain ID usado para assinar no bloco atual - **[eth_gasPrice](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gasprice){target=\_blank}** — retorna a base fee por unidade de gas. Atualmente é o gas price mínimo da rede - **[eth_accounts](https://ethereum.org/developers/docs/apis/json-rpc/#eth_accounts){target=\_blank}** — lista de endereços do cliente - **[eth_blockNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_blocknumber){target=\_blank}** — maior número de bloco disponível - **[eth_getBalance](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getbalance){target=\_blank}** — saldo do endereço fornecido - **[eth_getStorageAt](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getstorageat){target=\_blank}** — conteúdo do storage em um endereço - **[eth_getBlockByHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblockbyhash){target=\_blank}** — informações do bloco por hash, incluindo `baseFeePerGas` em blocos pós-London - **[eth_getBlockByNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblockbynumber){target=\_blank}** — informações do bloco por número, incluindo `baseFeePerGas` em blocos pós-London - **[eth_getBlockReceipts](https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-receipts){target=\_blank}** — todos os receipts de transações de um bloco. - **[eth_getTransactionCount](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactioncount){target=\_blank}** — número de transações (nonce) enviadas pelo endereço - **[eth_getBlockTransactionCountByHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash){target=\_blank}** — número de transações em um bloco por hash - **[eth_getBlockTransactionCountByNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber){target=\_blank}** — número de transações em um bloco por número - **[eth_getUncleCountByBlockHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclecountbyblockhash){target=\_blank}** — retorna `"0x0"` por padrão - **[eth_getUncleCountByBlockNumber](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclecountbyblocknumber){target=\_blank}** — retorna `"0x0"` por padrão - **[eth_getCode](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getcode){target=\_blank}** — código no endereço informado e bloco informado - **[eth_sendTransaction](https://ethereum.org/developers/docs/apis/json-rpc/#eth_sendtransaction){target=\_blank}** — cria transação de chamada ou criação de contrato (se houver código em `data`). Retorna o hash da transação ou zero hash se ainda não disponível - **[eth_sendRawTransaction](https://ethereum.org/developers/docs/apis/json-rpc/#eth_sendrawtransaction){target=\_blank}** — cria transação de chamada ou criação para transações assinadas. Retorna hash ou zero hash se ainda não disponível - **[eth_call](https://ethereum.org/developers/docs/apis/json-rpc/#eth_call){target=\_blank}** — executa chamada sem criar transação, retornando o valor da execução - **[eth_estimateGas](https://ethereum.org/developers/docs/apis/json-rpc/#eth_estimategas){target=\_blank}** — estima o gas necessário para uma transação. Pode receber `gasPrice` ou `maxFeePerGas` e `maxPriorityFeePerGas` - **[eth_feeHistory](https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-fee-history){target=\_blank}** — retorna `baseFeePerGas`, `gasUsedRatio`, `oldestBlock` e `reward` para um intervalo de até 1024 blocos - **[eth_getTransactionByHash](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionbyhash){target=\_blank}** — informações de uma transação por hash; transações EIP-1559 incluem `maxPriorityFeePerGas` e `maxFeePerGas` - **[eth_getTransactionByBlockHashAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionbyblockhashandindex){target=\_blank}** — informações de uma transação por hash do bloco e índice; inclui campos EIP-1559 - **[eth_getTransactionByBlockNumberAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionbyblocknumberandindex){target=\_blank}** — informações de uma transação por número do bloco e índice; inclui campos EIP-1559 - **[eth_getTransactionReceipt](https://ethereum.org/developers/docs/apis/json-rpc/#eth_gettransactionreceipt){target=\_blank}** — receipt de uma transação por hash - **[eth_getUncleByBlockHashAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclebyblockhashandindex){target=\_blank}** — retorna `null` por padrão - **[eth_getUncleByBlockNumberAndIndex](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getunclebyblocknumberandindex){target=\_blank}** — retorna `null` por padrão - **[eth_getLogs](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getlogs){target=\_blank}** — array de logs que correspondem ao filtro - **[eth_newFilter](https://ethereum.org/developers/docs/apis/json-rpc/#eth_newfilter){target=\_blank}** — cria filtro com base nos parâmetros fornecidos; retorna o ID do filtro - **[eth_newBlockFilter](https://ethereum.org/developers/docs/apis/json-rpc/#eth_newblockfilter){target=\_blank}** — cria filtro para avisar quando chegar um novo bloco; retorna ID - **[eth_getFilterChanges](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getfilterchanges){target=\_blank}** — método de polling para filtros; retorna logs desde o último poll - **[eth_getFilterLogs](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getfilterlogs){target=\_blank}** — array de logs que correspondem ao filtro com ID fornecido - **[eth_uninstallFilter](https://ethereum.org/developers/docs/apis/json-rpc/#eth_uninstallfilter){target=\_blank}** — remove um filtro pelo ID; use quando o polling não for mais necessário (filtros expiram se não forem consultados) ## Métodos JSON-RPC Personalizados {: #custom-json-rpc-methods } Os nós da Tanssi expõem dois endpoints personalizados: `frnt_isBlockFinalized` e `frnt_isTxFinalized`. Como a Tanssi tem finalização determinística, é possível saber com certeza se um bloco ou transação está finalizado ou não. Esses endpoints ajudam a verificar a finalização de eventos on-chain. ???+ function "frnt_isBlockFinalized - verifica a finalização do bloco pelo hash" === "Parâmetros" - `block_hash` ++"string"++ - hash do bloco (aceita hash estilo Substrate ou Ethereum) === "Retorno" ++"boolean"++ - `true` se o bloco estiver finalizado; `false` se não estiver finalizado ou não encontrado === "Exemplo" ```bash curl -H "Content-Type: application/json" -X POST --data '{ "jsonrpc": "2.0", "id": "1", "method": "frnt_isBlockFinalized", "params": ["INSERT_BLOCK_HASH"] }' {{ networks.dancelight.demo_evm_rpc_url }} ``` ???+ function "frnt_isTxFinalized - verifica a finalização de uma transação pelo hash EVM" === "Parâmetros" - `tx_hash` ++"string"++ - hash EVM da transação === "Retorno" ++"boolean"++ - `true` se a transação estiver finalizada; `false` se não estiver finalizada ou não encontrada === "Exemplo" ```bash curl -H "Content-Type: application/json" -X POST --data '{ "jsonrpc": "2.0", "id": "1", "method": "frnt_isTxFinalized", "params": ["INSERT_TRANSACTION_HASH"] }' {{ networks.dancelight.demo_evm_rpc_url }} ``` --- END CONTENT ---