# Address

The commands where under this section are used for address and balance actions.

Read more about\
[Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)

## Create New Address

> This endpoint is used to create a PIRI address. The successful result of a query includes the following information:\
> \
> \- \*\*pri\*\*: Private Key. This information is the most crucial for the privacy of the PIRI address. The basic security of the address depends on this information. Transactions related to the address, scenario creation, data sending and decryption, token creation, and more, require this information or the signature generated with it.\
> \
> \- \*\*pub\*\*: The PIRI address information in base58 format. It consists of 43 characters. It starts with PRTM and is followed by one of the letters P, Q, or R, totaling 43 characters. It is case-sensitive and is required for all address-based operations in the PIRI network. This information is public.\
> \
> \- \*\*words\*\*: A text sequence consisting of 24 words. Just like the Private Key information, it requires privacy. Additionally, this information can provide access to the Private Key information. It should be stored with high confidentiality.\
> \
> \- \*\*publicKey\*\*: This is a general and public information associated with the PIRI address. It is commonly used, especially in shared key generation stages.\
> \
> In addition, during the address creation process, if the "isCommercial" parameter is used and set to true:\
> \
> \- \*\*isCommercial\*\*: It returns true. This information represents whether a PIRI address is of commercial nature. Additionally, it is possible to convert a non-commercial PIRI address into a commercial address, but this can only be done once and in a one-way manner.\
> \
> &#x20;To get more information about PIRI Wallet Structure, please visit \[Pirichain Wallet Structure]\(<https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure>) page on whitepaper.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/createNewAddress":{"post":{"tags":["Address"],"summary":"Create New Address","description":"This endpoint is used to create a PIRI address. The successful result of a query includes the following information:\n\n- **pri**: Private Key. This information is the most crucial for the privacy of the PIRI address. The basic security of the address depends on this information. Transactions related to the address, scenario creation, data sending and decryption, token creation, and more, require this information or the signature generated with it.\n\n- **pub**: The PIRI address information in base58 format. It consists of 43 characters. It starts with PRTM and is followed by one of the letters P, Q, or R, totaling 43 characters. It is case-sensitive and is required for all address-based operations in the PIRI network. This information is public.\n\n- **words**: A text sequence consisting of 24 words. Just like the Private Key information, it requires privacy. Additionally, this information can provide access to the Private Key information. It should be stored with high confidentiality.\n\n- **publicKey**: This is a general and public information associated with the PIRI address. It is commonly used, especially in shared key generation stages.\n\nIn addition, during the address creation process, if the \"isCommercial\" parameter is used and set to true:\n\n- **isCommercial**: It returns true. This information represents whether a PIRI address is of commercial nature. Additionally, it is possible to convert a non-commercial PIRI address into a commercial address, but this can only be done once and in a one-way manner.\n\n To get more information about PIRI Wallet Structure, please visit [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure) page on whitepaper.","operationId":"createNewAddress","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"language":{"type":"string","description":"It can be used to specify in which language the secret words to be created will be.","enum":["english","french","korean","spanish","portuguese","italian","japanese","chinese_traditional"],"nullable":true,"default":"english"}}}}},"required":false},"responses":{"200":{"description":"OK | Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createNewAddress"}}}}},"deprecated":false}}},"components":{"schemas":{"createNewAddress":{"title":"createNewAddress","required":["pri","pub","words","publicKey"],"type":"object","properties":{"pri":{"type":"string"},"pub":{"type":"string"},"words":{"type":"string"},"publicKey":{"type":"string"},"isCommercial":{"type":"boolean","description":"Returns true if the created address is a commercial address. This field is only present for commercial addresses."}}}}}}
```

## Convert To Commercial Address (TestNET)

> This endpoint converts a PIRI address (individual wallet) that has not been previously converted to a commercial wallet into a commercial wallet. This operation is unidirectional, and it is not possible to convert a PIRI address that has been converted to a commercial wallet back into an individual wallet.\
> \
> Especially in the context of Dynamic Settlement, this conversion, which is useful for commercial purposes, also automatically carries the Public Key information associated with the address.\
> \
> \*\*One important point to be especially mindful of is that there is no possibility of transferring or sending data between these two different wallet types. In other words, it is not possible to transfer to or send data to an individual address from a commercial address, and vice versa. Individual and commercial addresses can only perform transfers and data exchange within their own types.\*\*

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"description":"Pirichain TestNet Environment","url":"https://testnet.pirichain.com"}],"paths":{"/convertToCommercialWallet":{"post":{"tags":["Address"],"summary":"Convert To Commercial Address (TestNET)","description":"This endpoint converts a PIRI address (individual wallet) that has not been previously converted to a commercial wallet into a commercial wallet. This operation is unidirectional, and it is not possible to convert a PIRI address that has been converted to a commercial wallet back into an individual wallet.\n\nEspecially in the context of Dynamic Settlement, this conversion, which is useful for commercial purposes, also automatically carries the Public Key information associated with the address.\n\n**One important point to be especially mindful of is that there is no possibility of transferring or sending data between these two different wallet types. In other words, it is not possible to transfer to or send data to an individual address from a commercial address, and vice versa. Individual and commercial addresses can only perform transfers and data exchange within their own types.**","operationId":"convertToCommercialWallet","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","privateKey","alias"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"},"privateKey":{"type":"string","description":"Private Key"},"alias":{"type":"string","maxLength":64,"description":"Commercial Alias of Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/sendToken"}}}}},"deprecated":false}}},"components":{"schemas":{"sendToken":{"required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error status code. 0 indicates success, non-zero indicates an error."},"tx":{"type":"string","description":"The transaction hash identifier for the completed token transfer transaction."},"sign":{"type":"string","description":"The cryptographic signature of the transaction, ensuring its authenticity and integrity."},"timeStamp":{"type":"integer","format":"int64","description":"The Unix timestamp (in milliseconds) when the transaction was processed."}}}}}}
```

## Rescue Private Key from Mnemonic Words

> This endpoint is used to retrieve the Private Key information associated with a PIRI address. The PIRI address system uses a set of 24 words from the bip39 library. The words are case-sensitive and should be sent with spaces between them.\
> \
> If the sent words are complete and arranged to represent a PIRI address as per the following schema, information will be returned.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/rescuePrivateKey":{"post":{"tags":["Address"],"summary":"Rescue Private Key from Mnemonic Words","description":"This endpoint is used to retrieve the Private Key information associated with a PIRI address. The PIRI address system uses a set of 24 words from the bip39 library. The words are case-sensitive and should be sent with spaces between them.\n\nIf the sent words are complete and arranged to represent a PIRI address as per the following schema, information will be returned.","operationId":"rescuePrivateKey","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["words"],"type":"object","properties":{"words":{"type":"string","description":"A string of 24 words with a space between them"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/rescuePrivateKey"}}}}},"deprecated":false}}},"components":{"schemas":{"rescuePrivateKey":{"title":"rescuePrivateKey","required":["pri","base58"],"type":"object","properties":{"pri":{"type":"string"},"base58":{"$ref":"#/components/schemas/Base58"}}},"Base58":{"title":"Base58","required":["pub","base58"],"type":"object","properties":{"pub":{"type":"string"},"base58":{"type":"string"}}}}}}
```

## Get Mnemonic Words from Private Key

> This endpoint is used to retrieve 24 words that compose a PIRI address. It takes the Private Key information related to the PIRI address as a parameter and returns a result based on the following schema.\
> \
> Additionally, this endpoint also accepts the "language" parameter as optional. While its default value is set to "english," one of the language choices listed in the table can also be sent as the parameter value.\
> \
> For more detailed information about transaction tables related to the bip39 library, you can visit \[Bip39 Explanation]\(<https://learnmeabitcoin.com/technical/mnemonic>) page

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getMnemonic":{"post":{"tags":["Address"],"summary":"Get Mnemonic Words from Private Key","description":"This endpoint is used to retrieve 24 words that compose a PIRI address. It takes the Private Key information related to the PIRI address as a parameter and returns a result based on the following schema.\n\nAdditionally, this endpoint also accepts the \"language\" parameter as optional. While its default value is set to \"english,\" one of the language choices listed in the table can also be sent as the parameter value.\n\nFor more detailed information about transaction tables related to the bip39 library, you can visit [Bip39 Explanation](https://learnmeabitcoin.com/technical/mnemonic) page","operationId":"getMnemonic","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["privateKey"],"type":"object","properties":{"privateKey":{"type":"string","description":"Private Key of PIRI Address"},"language":{"type":"string","description":"It can be used to indicate in which language the words to be retrieved will be.","enum":["english","french","korean","spanish","portuguese","italian","japanese","chinese_traditional"],"nullable":true,"default":"english"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getMnemonic"}}}}},"deprecated":false}}},"components":{"schemas":{"getMnemonic":{"title":"getMnemonic","required":["error","mnemonic"],"type":"object","properties":{"error":{"type":"integer","format":"int32"},"mnemonic":{"type":"string"}}}}}}
```

## Get Balance for an Address

> This endpoint returns the quantity of a specific asset associated with a PIRI address. The type of this asset is provided through the assetID parameter. In different systems, this information is also referred to as the contract address for the asset type. In the PIRI network, there is no contract address for an asset; instead, the assetID value is used.\
> \
> For the PIRI asset, this value is -1. For other assets (Tokens), the relevant values can be seen through the listTokens endpoint.\
> \
> A successful query will result in the following schema, as shown below.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getBalance":{"post":{"tags":["Address"],"summary":"Get Balance for an Address","description":"This endpoint returns the quantity of a specific asset associated with a PIRI address. The type of this asset is provided through the assetID parameter. In different systems, this information is also referred to as the contract address for the asset type. In the PIRI network, there is no contract address for an asset; instead, the assetID value is used.\n\nFor the PIRI asset, this value is -1. For other assets (Tokens), the relevant values can be seen through the listTokens endpoint.\n\nA successful query will result in the following schema, as shown below.","operationId":"getBalance","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","assetID"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"},"assetID":{"type":"number","description":"ID of asset | -1 should be sent for PIRI asset"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getBalance"}}}}},"deprecated":false}}},"components":{"schemas":{"getBalance":{"title":"getBalance","required":["error","name","symbol","logo","assetID","address","frozen","balance"],"type":"object","properties":{"error":{"type":"integer","format":"int32"},"name":{"type":"string"},"symbol":{"type":"string"},"logo":{"type":"string","description":"Asset logo URL or base64 encoded image data"},"assetID":{"type":"integer","format":"int32"},"address":{"type":"string"},"frozen":{"type":"array","items":{"type":"string"},"description":"List of frozen amounts or details"},"balance":{"type":"string","format":"decimal"}}}}}}
```

## Get Asset List for an Address

> This endpoint will provide a list of all assets belonging to a PIRI address.\
> \
> A successful query result will look like the schema below.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getBalanceList":{"post":{"tags":["Address"],"summary":"Get Asset List for an Address","description":"This endpoint will provide a list of all assets belonging to a PIRI address.\n\nA successful query result will look like the schema below.","operationId":"getBalanceList","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/getBalance"}}}}}},"deprecated":false}}},"components":{"schemas":{"getBalance":{"title":"getBalance","required":["error","name","symbol","logo","assetID","address","frozen","balance"],"type":"object","properties":{"error":{"type":"integer","format":"int32"},"name":{"type":"string"},"symbol":{"type":"string"},"logo":{"type":"string","description":"Asset logo URL or base64 encoded image data"},"assetID":{"type":"integer","format":"int32"},"address":{"type":"string"},"frozen":{"type":"array","items":{"type":"string"},"description":"List of frozen amounts or details"},"balance":{"type":"string","format":"decimal"}}}}}}
```

## Get public key for an address

> Get the public key associated with a specific address.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getPubKey":{"post":{"tags":["Address"],"summary":"Get public key for an address","description":"Get the public key associated with a specific address.","operationId":"getPubKey","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"The address to get the public key for"}}}}}},"responses":{"200":{"description":"Response with public key information or an error message.","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getPubKey"}}}}}}}},"components":{"schemas":{"getPubKey":{"title":"getPubKeyResponse","type":"object","required":["error","data"],"properties":{"error":{"type":"integer","description":"Error code: 0 for success, 1 for not found.","enum":[0,1]},"data":{"type":"string","description":"Public key as a hex string when found, or an error message when not found."}}}}}}
```

## Validate PIRI Address

> This endpoint validates whether a given address is a valid PIRI address format.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/isValidAddress":{"post":{"tags":["Address"],"summary":"Validate PIRI Address","description":"This endpoint validates whether a given address is a valid PIRI address format.","operationId":"isValidAddress","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address to validate"}}}}},"required":true},"responses":{"200":{"description":"Address validation result","content":{"application/json":{"schema":{"type":"boolean","description":"True if address is valid, false if invalid"}}}}},"deprecated":false}}}}
```

## Get detailed address information

> Get detailed information about a specific address, such as transaction counts and deputy status.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Address","description":"The commands where under this section are used for address and balance actions.\n\n Read more about \\\n [Pirichain Wallet Structure](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.3.-pirichain-wallet-structure)"}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getDetailsOfAddress":{"post":{"tags":["Address"],"summary":"Get detailed address information","description":"Get detailed information about a specific address, such as transaction counts and deputy status.","operationId":"getDetailsOfAddress","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"The address to get details for"}}}}}},"responses":{"200":{"description":"Address details retrieved successfully","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getDetailsOfAddress"}}}}}}}},"components":{"schemas":{"getDetailsOfAddress":{"title":"getDetailsOfAddress","type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code, 0 for success"},"inOutAddr":{"type":"object","description":"Transaction counts for the address","properties":{"in":{"type":"number","description":"Total number of incoming transactions"},"out":{"type":"number","description":"Total number of outgoing transactions"}}},"isDep":{"type":"boolean","description":"Indicates if the address belongs to a deputy"},"depWebsite":{"type":"string","description":"The website of the deputy, if applicable"},"verified":{"type":"boolean","description":"Indicates if the address is verified"}}}}}}
```


# Token

All token methods are below. Detailed informations are clearified under own section.

## Get token information

> This endpoint will provide information about the token of the specified type, which is found in the PIRI network and is indicated by the assetD parameter. If this endpoint is used for a PIRI asset with (-1), the data value in the return object will come as null.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getToken":{"post":{"tags":["Token"],"summary":"Get token information","description":"This endpoint will provide information about the token of the specified type, which is found in the PIRI network and is indicated by the assetD parameter. If this endpoint is used for a PIRI asset with (-1), the data value in the return object will come as null.","operationId":"getToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["assetID"],"type":"object","properties":{"assetID":{"type":"number","description":"Asset ID"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getToken"}}}}},"deprecated":false}}},"components":{"schemas":{"getToken":{"title":"getToken","required":["error","data","count"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"data":{"$ref":"#/components/schemas/TokenData"},"count":{"$ref":"#/components/schemas/Count"}}},"TokenData":{"type":"object","properties":{"circulationToken":{"type":"number","description":"Total circulating supply of the token"},"_id":{"type":"string","description":"Database identifier"},"tokenSymbol":{"type":"string","description":"Token symbol (e.g., ALP)"},"tokenName":{"type":"string","description":"Full name of the token"},"totalSupply":{"type":"number","description":"Total supply of the token"},"creatorAddress":{"type":"string","description":"PIRI address of the token creator"},"createdDate":{"type":"string","format":"date-time","description":"Token creation timestamp"},"decimal":{"type":"integer","description":"Number of decimal places"},"logo":{"type":"string","description":"URL to token logo image"},"webSite":{"type":"string","description":"Official website URL"},"description":{"type":"string","description":"Token description"},"companyAddress":{"type":"string","description":"Company physical address"},"sector":{"type":"string","description":"Business sector"},"hasAirdrop":{"type":"boolean","description":"Whether token has airdrop campaigns"},"hasStake":{"type":"boolean","description":"Whether token supports staking"},"assetID":{"type":"integer","description":"Unique asset identifier"},"__v":{"type":"integer","description":"Version key"}}},"Count":{"title":"Count","required":["count"],"type":"object","properties":{"count":{"type":"integer","format":"int32","description":"Total count of token holders"}}}}}}
```

## List all tokens

> This endpoint will retrieve information for all tokens present in the PIRI network. It optionally takes two parameters: skip and limit. These parameters are necessary for pagination.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listTokens":{"post":{"tags":["Token"],"summary":"List all tokens","description":"This endpoint will retrieve information for all tokens present in the PIRI network. It optionally takes two parameters: skip and limit. These parameters are necessary for pagination.","operationId":"listTokens","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Number of tokens to skip for pagination"},"limit":{"type":"number","default":50,"maximum":100,"description":"Maximum number of tokens to return"}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listTokens"}}}}},"deprecated":false}}},"components":{"schemas":{"listTokens":{"title":"listTokens","required":["error","data","countOfToken"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TokenData"},"description":"Array of token information objects"},"countOfToken":{"type":"integer","format":"int32","description":"Total number of tokens in the network"}}},"TokenData":{"type":"object","properties":{"circulationToken":{"type":"number","description":"Total circulating supply of the token"},"_id":{"type":"string","description":"Database identifier"},"tokenSymbol":{"type":"string","description":"Token symbol (e.g., ALP)"},"tokenName":{"type":"string","description":"Full name of the token"},"totalSupply":{"type":"number","description":"Total supply of the token"},"creatorAddress":{"type":"string","description":"PIRI address of the token creator"},"createdDate":{"type":"string","format":"date-time","description":"Token creation timestamp"},"decimal":{"type":"integer","description":"Number of decimal places"},"logo":{"type":"string","description":"URL to token logo image"},"webSite":{"type":"string","description":"Official website URL"},"description":{"type":"string","description":"Token description"},"companyAddress":{"type":"string","description":"Company physical address"},"sector":{"type":"string","description":"Business sector"},"hasAirdrop":{"type":"boolean","description":"Whether token has airdrop campaigns"},"hasStake":{"type":"boolean","description":"Whether token supports staking"},"assetID":{"type":"integer","description":"Unique asset identifier"},"__v":{"type":"integer","description":"Version key"}}}}}}
```

## Send token

> This endpoint is used within the PIRI network to perform an asset transfer. Transactions form the core of the operations in the blockchain. When a transaction is initiated from an address, it must be confirmed and validated by all nodes. For this to happen, the existence and integrity of the PIRI address, the amount of the asset, and the assetID to be sent must be verified by the system before a transaction can be initiated.\
> \
> While the transaction structure in the PIRI network is singular, a transaction can also carry information. This is explained and exemplified in the "pushData" section.\
> \
> To perform an asset transfer from a PIRI address, the following parameters are required. For a more detailed explanation of how transaction processes work within the PIRI network, you can access information at \[Pirichain Transaction Fundamental]\(<https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.4.-creation-of-pirichain-transaction>)

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/sendToken":{"post":{"tags":["Token"],"summary":"Send token","description":"This endpoint is used within the PIRI network to perform an asset transfer. Transactions form the core of the operations in the blockchain. When a transaction is initiated from an address, it must be confirmed and validated by all nodes. For this to happen, the existence and integrity of the PIRI address, the amount of the asset, and the assetID to be sent must be verified by the system before a transaction can be initiated.\n\nWhile the transaction structure in the PIRI network is singular, a transaction can also carry information. This is explained and exemplified in the \"pushData\" section.\n\nTo perform an asset transfer from a PIRI address, the following parameters are required. For a more detailed explanation of how transaction processes work within the PIRI network, you can access information at [Pirichain Transaction Fundamental](https://whitepaper.pirichain.com/v1.0.3/pirichain-infrastructure/pirichain-infrastructure/1.4.-creation-of-pirichain-transaction)","operationId":"sendToken","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","privateKey","to","amount","assetID"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address | Sender address"},"privateKey":{"type":"string","description":"Private Key | Sender privateKey"},"to":{"type":"string","description":"PIRI Address | Recipient address"},"amount":{"type":"number","description":"Amount"},"assetID":{"type":"number","description":"Asset ID"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/sendToken"}}}}},"deprecated":false}}},"components":{"schemas":{"sendToken":{"required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error status code. 0 indicates success, non-zero indicates an error."},"tx":{"type":"string","description":"The transaction hash identifier for the completed token transfer transaction."},"sign":{"type":"string","description":"The cryptographic signature of the transaction, ensuring its authenticity and integrity."},"timeStamp":{"type":"integer","format":"int64","description":"The Unix timestamp (in milliseconds) when the transaction was processed."}}}}}}
```

## Send raw transaction

> This endpoint performs the same function as the "sendToken" endpoint, generating the same output but accepting different parameters and prepared for different security levels. sendRawTransaction has the ability to initiate a transaction with a signing method without requiring the privateKey information. The digital signature required for the transaction is provided by the sender.\
> \
> The information used to create the digital signature includes:\
> \- Sender PIRI Address\
> \- Recipient PIRI Address\
> \- Amount\
> \- Asset ID\
> \- TimeStamp\
> \
> The goal here is to enable asset transfers to the PIRI address without exposing the Private Key information to any environment, whether secure or not.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/sendRawTransaction":{"post":{"tags":["Token"],"summary":"Send raw transaction","description":"This endpoint performs the same function as the \"sendToken\" endpoint, generating the same output but accepting different parameters and prepared for different security levels. sendRawTransaction has the ability to initiate a transaction with a signing method without requiring the privateKey information. The digital signature required for the transaction is provided by the sender.\n\nThe information used to create the digital signature includes:\n- Sender PIRI Address\n- Recipient PIRI Address\n- Amount\n- Asset ID\n- TimeStamp\n\nThe goal here is to enable asset transfers to the PIRI address without exposing the Private Key information to any environment, whether secure or not.","operationId":"sendRawTransaction","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","publicKey","to","amount","assetID","timeStamp","signaturedData"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address | Sender address"},"publicKey":{"type":"string","description":"Public Key | Sender public key"},"to":{"type":"string","description":"PIRI Address | Recipient address"},"amount":{"type":"number","description":"Amount"},"assetID":{"type":"number","description":"Asset ID"},"timeStamp":{"type":"integer","description":"TimeStamp"},"signaturedData":{"type":"string","description":"Signatured Data"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/sendRawTransaction"}}}}},"deprecated":false}}},"components":{"schemas":{"sendRawTransaction":{"title":"sendRawTransaction","required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","description":"Error code (0 for success)"},"tx":{"type":"string","description":"Transaction hash of the sent transaction"},"sign":{"type":"string","description":"Digital signature of the transaction"},"timeStamp":{"type":"integer","description":"Transaction timestamp"}}}}}}
```

## Create new token

> This endpoint is used to create a Token on the PIRI network. It accepts a "createToken" multipart form data. It is advisable to ensure that the necessary environments are set up before using this endpoint, as making changes to or deleting a created Token is not possible.\
> \
> For example: Social media accounts, website links, and logos.\
> \
> Additionally, this endpoint can also be used on the <https://piriscan.com> page. The required "creatorAddress" and "privateKey" information is automatically provided during sessions on this page.\
> \
> Once a Token is created, it returns transaction information and an assetID, as shown in the schema below. The assetID contains information about the type of asset associated with the created Token (as mentioned before, it is also referred to as a contract address in different systems).

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/createToken":{"post":{"tags":["Token"],"summary":"Create new token","description":"This endpoint is used to create a Token on the PIRI network. It accepts a \"createToken\" multipart form data. It is advisable to ensure that the necessary environments are set up before using this endpoint, as making changes to or deleting a created Token is not possible.\n\nFor example: Social media accounts, website links, and logos.\n\nAdditionally, this endpoint can also be used on the https://piriscan.com page. The required \"creatorAddress\" and \"privateKey\" information is automatically provided during sessions on this page.\n\nOnce a Token is created, it returns transaction information and an assetID, as shown in the schema below. The assetID contains information about the type of asset associated with the created Token (as mentioned before, it is also referred to as a contract address in different systems).","operationId":"createToken","requestBody":{"content":{"multipart/form-data":{"encoding":{},"schema":{"required":["creatorAddress","privateKey","tokenName","tokenSymbol","totalSupply","logo","decimals","description","webSite"],"type":"object","properties":{"creatorAddress":{"type":"string","description":"PIRI Address | Owner Address of Token"},"privateKey":{"type":"string","description":"Private Key"},"tokenName":{"type":"string","minLength":3,"maxLength":15,"uniqueItems":true,"description":"Token Name"},"tokenSymbol":{"type":"string","minLength":3,"maxLength":4,"description":"Token Symbol"},"totalSupply":{"type":"integer","minimum":100,"description":"Total Supply of Token"},"logo":{"type":"string","description":"Token Logo | (jpg, png)","format":"binary"},"decimals":{"type":"integer","minimum":2,"maximum":32,"description":"Decimal places of unit amount"},"description":{"type":"string","minLength":100,"maxLength":1500,"description":"Description of Token"},"webSite":{"type":"string","maxLength":100,"description":"Web Site of Token"},"socialMediaFacebookURL":{"type":"string","description":"Token Facebook page URL"},"socialMediaTwitterURL":{"type":"string","description":"Token Twitter page URL"},"socialMediaMediumURL":{"type":"string","description":"Token Medium page URL"},"socialMediaYoutubeURL":{"type":"string","description":"Token Youtube page URL"},"socialMediaRedditURL":{"type":"string","description":"Token Reddit page URL"},"socialMediaBitcoinTalkURL":{"type":"string","description":"Token Bitcoin Talk page URL"},"socialMediaInstagramURL":{"type":"string","description":"Token Instagram page URL"},"mailAddress":{"type":"string","description":"Token responsible mail address"},"companyAddress":{"type":"string","description":"Post address"},"sector":{"type":"string","description":"Sector or Business Field"},"hasAirdrop":{"type":"boolean","default":false,"description":"Has Token AirDrop or not"},"hasStake":{"type":"boolean","default":false,"description":"Has Token Stake or not"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/createToken"}}}}},"deprecated":false}}},"components":{"schemas":{"createToken":{"title":"createToken","required":["tx","assetID"],"type":"object","properties":{"tx":{"type":"string","description":"Transaction hash of the token creation"},"assetID":{"type":"integer","format":"int32","description":"Unique asset identifier for the created token"}}}}}}
```

## Get address list by asset

> Get list of addresses that hold a specific asset/token with their balances

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getAddressListByAsset":{"post":{"tags":["Token"],"summary":"Get address list by asset","description":"Get list of addresses that hold a specific asset/token with their balances","operationId":"getAddressListByAsset","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["assetID","start","limit"],"type":"object","properties":{"assetID":{"type":"string","description":"The asset ID to search for (-1 for PIRI, positive integers for tokens)"},"start":{"type":"number","default":0,"description":"Starting position for pagination"},"limit":{"type":"number","default":10,"maximum":100,"description":"Number of results to return per page"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getAddressListByAsset"}}}}},"deprecated":false}}},"components":{"schemas":{"getAddressListByAsset":{"title":"getAddressListByAsset","required":["error","data"],"type":"object","properties":{"error":{"type":"number","description":"Error code (0 for success)"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AddressBalance"},"description":"Array of addresses with their balances"}}},"AddressBalance":{"type":"object","properties":{"address":{"type":"string","description":"PIRI address holding the asset"},"balance":{"type":"number","description":"Balance amount of the asset held by this address"}}}}}}
```

## Get new token creation fee

> Retrieve the current fee required for creating a new token on the PIRI network. This endpoint helps users understand the cost before creating a token.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/newTokenCreatingFee":{"post":{"tags":["Token"],"summary":"Get new token creation fee","description":"Retrieve the current fee required for creating a new token on the PIRI network. This endpoint helps users understand the cost before creating a token.","operationId":"newTokenCreatingFee","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/newTokenCreatingFee"}}}}},"deprecated":false}}},"components":{"schemas":{"newTokenCreatingFee":{"title":"newTokenCreatingFee","required":["status","message","result"],"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Response message"},"result":{"$ref":"#/components/schemas/TokenCreationFeeResult"}}},"TokenCreationFeeResult":{"type":"object","properties":{"fee":{"type":"number","description":"The fee amount required for creating a new token"},"currency":{"type":"string","description":"Currency of the fee (PIRI)"}}}}}}
```

## Get estimated transaction fee

> Calculate the estimated fee for a transaction on the PIRI network. This endpoint helps users understand the cost before executing transactions.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Token","description":"All token methods are below. Detailed informations are clearified under own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getEstimatedFee":{"post":{"tags":["Token"],"summary":"Get estimated transaction fee","description":"Calculate the estimated fee for a transaction on the PIRI network. This endpoint helps users understand the cost before executing transactions.","operationId":"getEstimatedFee","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getEstimatedFee"}}}}},"deprecated":false}}},"components":{"schemas":{"getEstimatedFee":{"title":"getEstimatedFee","required":["status","message","result"],"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"message":{"type":"string","description":"Response message"},"result":{"$ref":"#/components/schemas/EstimatedFeeResult"}}},"EstimatedFeeResult":{"type":"object","properties":{"estimatedFee":{"type":"number","description":"The estimated transaction fee amount"},"currency":{"type":"string","description":"Currency of the fee (PIRI)"}}}}}}
```


# Scenario

Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section.

## Get scenario

> This endpoint returns information about a scenario created on the PIRI network. It takes the scenario address as a parameter, and this address also serves as a PIRI address.\
> \
> A scenario also functions as a wallet. The scenario itself can have its own assets, and transfers of these assets can be made within the scenario based on integrated code.\
> \
> Before creating a scenario, it's advisable to refer to the relevant guidelines in the following links:\
> \- <https://piriscan.com/scenarios\\>
> \- <https://whitepaper.pirichain.com/v1.0.3/pirichain-smart-scenario/pirichain-smart-scenario\\>
> \
> Looking at the information returned by this endpoint, we have:\
> \- \*\*countOfExecution\*\*: Stores how many times this scenario has been executed.\
> \- \*\*address\*\*: The scenario's address.\
> \- \*\*ownerAddress\*\*: Information about the address that created the scenario.\
> \- \*\*name\*\*: The descriptive name of the scenario.\
> \- \*\*description\*\*: Contains descriptions related to the scenario.\
> \- \*\*tags\*\*: Tags created for the scenario.\
> \- \*\*createDate\*\*: The creation date of the scenario.\
> \- \*\*validated\*\*: Information about whether the scenario has been validated by other nodes.\
> \- \*\*scenarioText\*\*: The JavaScript code associated with the scenario.\
> \- \*\*byteCode\*\*: Bytecode equivalent of the scenarioText.\
> \
> The list of functions related to the scenario can be extracted and read from scenarioText using the JSON.parse method.\
> \
> Since the scenarios and their structures may vary from system to system, the security of scenarios should be carefully reviewed, rigorously tested, and then published.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getScenario":{"post":{"tags":["Scenario"],"summary":"Get scenario","description":"This endpoint returns information about a scenario created on the PIRI network. It takes the scenario address as a parameter, and this address also serves as a PIRI address.\n\nA scenario also functions as a wallet. The scenario itself can have its own assets, and transfers of these assets can be made within the scenario based on integrated code.\n\nBefore creating a scenario, it's advisable to refer to the relevant guidelines in the following links:\n- https://piriscan.com/scenarios\n- https://whitepaper.pirichain.com/v1.0.3/pirichain-smart-scenario/pirichain-smart-scenario\n\nLooking at the information returned by this endpoint, we have:\n- **countOfExecution**: Stores how many times this scenario has been executed.\n- **address**: The scenario's address.\n- **ownerAddress**: Information about the address that created the scenario.\n- **name**: The descriptive name of the scenario.\n- **description**: Contains descriptions related to the scenario.\n- **tags**: Tags created for the scenario.\n- **createDate**: The creation date of the scenario.\n- **validated**: Information about whether the scenario has been validated by other nodes.\n- **scenarioText**: The JavaScript code associated with the scenario.\n- **byteCode**: Bytecode equivalent of the scenarioText.\n\nThe list of functions related to the scenario can be extracted and read from scenarioText using the JSON.parse method.\n\nSince the scenarios and their structures may vary from system to system, the security of scenarios should be carefully reviewed, rigorously tested, and then published.","operationId":"getScenario","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address"],"type":"object","properties":{"address":{"type":"string","description":"Scenario Address | It is aslo a PIRI Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getScenario"}}}}},"deprecated":false}}},"components":{"schemas":{"getScenario":{"title":"getScenario","required":["error","data","byteCode"],"type":"object","properties":{"error":{"type":"integer","format":"int32"},"data":{"$ref":"#/components/schemas/ScenarioData"},"byteCode":{"type":"string"}}},"ScenarioData":{"title":"ScenarioData","required":["countOfExecution","_id","address","ownerAddress","name","description","tags","createdDate","validated","scenarioText","__v"],"type":"object","properties":{"countOfExecution":{"type":"integer","format":"int32"},"_id":{"type":"string"},"address":{"type":"string"},"ownerAddress":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"string"},"createdDate":{"type":"string"},"validated":{"type":"integer","format":"int32"},"scenarioText":{"type":"string"},"__v":{"type":"integer","format":"int32"}}}}}}
```

## Create scenario

> This endpoint allows you to create a Smart Scenario within the PIRI network. PIRIchain Smart Scenarios are permanent pieces of code that automate tasks within the system. They are immutable and cannot be modified.\
> \
> To code Smart Scenarios, you can use either JavaScript or TypeScript. For more detailed explanations and information about PIRIchain Smart Scenarios, you can access the following links:\
> \- <https://piriscan.com/scenarios\\>
> \- <https://whitepaper.pirichain.com/v1.0.3/pirichain-smart-scenario/pirichain-smart-scenario>

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/createScenario":{"post":{"tags":["Scenario"],"summary":"Create scenario","description":"This endpoint allows you to create a Smart Scenario within the PIRI network. PIRIchain Smart Scenarios are permanent pieces of code that automate tasks within the system. They are immutable and cannot be modified.\n\nTo code Smart Scenarios, you can use either JavaScript or TypeScript. For more detailed explanations and information about PIRIchain Smart Scenarios, you can access the following links:\n- https://piriscan.com/scenarios\n- https://whitepaper.pirichain.com/v1.0.3/pirichain-smart-scenario/pirichain-smart-scenario","operationId":"createScenario","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","privateKey","scenarioText","name","description","tags"],"type":"object","properties":{"address":{"type":"string","description":"Owner PIRI Address"},"privateKey":{"type":"string","description":"Private Key"},"executeOnlyByMe":{"type":"boolean","default":false,"description":"To Execution Restriction by Owner"},"scenarioText":{"type":"string","description":"Scenario Codes in Javascript | Typescript"},"name":{"type":"string","description":"Scenario name"},"description":{"type":"string","description":"Scenario description"},"tags":{"type":"string","description":"Scenario Tags"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/createScenario"}}}}},"deprecated":false}}},"components":{"schemas":{"createScenario":{"required":["countOfExecution","_id","address","ownerAddress","name","description","tags","createdDate","validated","scenarioText","__v"],"type":"object","properties":{"countOfExecution":{"type":"integer","format":"int32","description":"Number of times this scenario has been executed."},"_id":{"type":"string","description":"Unique database identifier for the created scenario."},"address":{"type":"string","description":"The blockchain address assigned to this scenario."},"ownerAddress":{"type":"string","description":"The PIRI address of the scenario owner/creator."},"name":{"type":"string","description":"The name given to the scenario."},"description":{"type":"string","description":"Description of what the scenario does."},"tags":{"type":"string","description":"Tags associated with the scenario for categorization."},"createdDate":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the scenario was created."},"validated":{"type":"integer","format":"int32","description":"Validation status of the scenario. 0 = not validated, 1 = validated."},"scenarioText":{"type":"string","description":"The actual scenario code (JavaScript/TypeScript) that was submitted."},"__v":{"type":"integer","format":"int32","description":"Version key used by MongoDB for document versioning."}}}}}}
```

## List my scenarios

> This endpoint lists the smart scenarios on the PIRI network associated with the PIRI address provided as a parameter (ownerAddress parameter). The schema returned with \*\*"getScenario"\*\* is now presented as an array within the \*\*"data"\*\* this time.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listMyScenarios":{"post":{"tags":["Scenario"],"summary":"List my scenarios","description":"This endpoint lists the smart scenarios on the PIRI network associated with the PIRI address provided as a parameter (ownerAddress parameter). The schema returned with **\"getScenario\"** is now presented as an array within the **\"data\"** this time.","operationId":"listMyScenarios","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["ownerAddress"],"type":"object","properties":{"ownerAddress":{"type":"string","description":"PIRI Address where scenarios will be listed"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listMyScenarios"}}}}},"deprecated":false}}},"components":{"schemas":{"listMyScenarios":{"title":"listMyScenarios","required":["error","data"],"type":"object","properties":{"error":{"type":"integer","format":"int32"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScenarioInfo"},"description":""}}},"ScenarioInfo":{"title":"ScenarioInfo","required":["countOfExecution","_id","address","ownerAddress","name","description","tags","createdDate","validated","scenarioText","__v"],"type":"object","properties":{"countOfExecution":{"type":"integer","format":"int32"},"_id":{"type":"string"},"address":{"type":"string"},"ownerAddress":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"string"},"createdDate":{"type":"string"},"validated":{"type":"integer","format":"int32"},"scenarioText":{"type":"string"},"__v":{"type":"integer","format":"int32"}}}}}}
```

## List scenarios

> This endpoint lists all smart scenarios in the PIRI network. It takes "skip" and "limit" as parameters. The use of these parameters is recommended for pagination.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listScenarios":{"post":{"tags":["Scenario"],"summary":"List scenarios","description":"This endpoint lists all smart scenarios in the PIRI network. It takes \"skip\" and \"limit\" as parameters. The use of these parameters is recommended for pagination.","operationId":"listScenarios","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"skip":{"type":"integer","format":"int32","description":"Number of records to skip for pagination"},"limit":{"type":"integer","format":"int32","description":"Maximum number of records to return"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listScenarios"}}}}},"deprecated":false}}},"components":{"schemas":{"listScenarios":{"title":"listScenarios","required":["error","data","count"],"type":"object","properties":{"error":{"type":"integer","format":"int32"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScenarioInfo"},"description":""},"count":{"type":"integer","format":"int32"}}},"ScenarioInfo":{"title":"ScenarioInfo","required":["countOfExecution","_id","address","ownerAddress","name","description","tags","createdDate","validated","scenarioText","__v"],"type":"object","properties":{"countOfExecution":{"type":"integer","format":"int32"},"_id":{"type":"string"},"address":{"type":"string"},"ownerAddress":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"string"},"createdDate":{"type":"string"},"validated":{"type":"integer","format":"int32"},"scenarioText":{"type":"string"},"__v":{"type":"integer","format":"int32"}}}}}}
```

## Call scenario

> Execute a read-only call to a scenario method without making changes to the blockchain

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/callScenario":{"post":{"tags":["Scenario"],"summary":"Call scenario","description":"Execute a read-only call to a scenario method without making changes to the blockchain","operationId":"callScenario","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["scenarioAddress","publicKey","address","method","params"],"type":"object","properties":{"scenarioAddress":{"type":"string","description":"The address of the scenario to call"},"publicKey":{"type":"string","description":"Public key of the caller"},"address":{"type":"string","description":"Address of the caller"},"method":{"type":"string","description":"Method name to call in the scenario"},"params":{"type":"string","description":"Parameters to pass to the method"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/callScenario"}}}}},"deprecated":false}}},"components":{"schemas":{"callScenario":{"required":["error","data"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error status code. 0 indicates success, non-zero indicates an error."},"data":{"$ref":"#/components/schemas/ScenarioCallResult"}}},"ScenarioCallResult":{"required":["result","gasUsed","executionTime"],"type":"object","properties":{"result":{"type":"string","description":"The result returned by the scenario method call."},"gasUsed":{"type":"number","description":"The amount of gas consumed during the scenario execution."},"executionTime":{"type":"number","description":"The time taken to execute the scenario method in milliseconds."}}}}}}
```

## Execute scenario

> This endpoint allows the execution of an intelligent scenario within the PIRI network. The result to be returned after the execution of the scenario may differ from the template specified below. This is because each scenario may have its own output structure.\
> \
> After running the scenario, it may not produce any output or may generate parameters for another scenario. Therefore, it is beneficial to have information about the scenario before running it. These include:\
> \- Who created the scenario?\
> \- Description of the scenario\
> \- List of functions associated with the scenario\
> \- Descriptions of the expected outputs at the end of the scenario\
> \- Whether malicious code is used within the scenario\
> \- What information the scenario carries\
> \- Whether the scenario was created by a Domain Verified PIRI Address (DVPA).

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/executeScenario":{"post":{"tags":["Scenario"],"summary":"Execute scenario","description":"This endpoint allows the execution of an intelligent scenario within the PIRI network. The result to be returned after the execution of the scenario may differ from the template specified below. This is because each scenario may have its own output structure.\n\nAfter running the scenario, it may not produce any output or may generate parameters for another scenario. Therefore, it is beneficial to have information about the scenario before running it. These include:\n- Who created the scenario?\n- Description of the scenario\n- List of functions associated with the scenario\n- Descriptions of the expected outputs at the end of the scenario\n- Whether malicious code is used within the scenario\n- What information the scenario carries\n- Whether the scenario was created by a Domain Verified PIRI Address (DVPA).","operationId":"executeScenario","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["scenarioAddress","address","privateKey","method"],"type":"object","properties":{"scenarioAddress":{"type":"string","description":"Scenario Address | It is aslo a PIRI Address"},"address":{"type":"string","description":"Executer PIRI Address"},"privateKey":{"type":"string","description":"Private Key"},"method":{"type":"string","description":"The method to be run in the scenario"},"params":{"type":"array","items":{"type":"string"},"description":"Parameters | e.g.: [\"value1\", \"value2\", ...]"},"amount":{"type":"number","description":"Amount to send Token to Scenario Address"},"assetID":{"type":"string","description":"Asset ID to send Token to Scenario Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/executeScenario"}}}}},"deprecated":false}}},"components":{"schemas":{"executeScenario":{"required":["error","returnedData"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error status code. 0 indicates success, non-zero indicates an error."},"returnedData":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object"},{"type":"boolean"}]},"description":"The data returned by the executed scenario method. Structure depends on the specific scenario implementation."}}}}}}
```

## Preview scenario

> This endpoint is built on the principle of executing before saving to the PIRI network for a scenario. Unlike the "executeScenario" endpoint, it focuses on temporarily running specified functions within the provided code.\
> \
> In other words:\
> \- It is common for scenario authors to execute it.\
> \- It may be used to execute changes on a previously saved scenario.\
> \- It can be used to test the security of a scenario.\
> \
> While alternative usage methods not covered in these examples may exist, it is advisable to refer to the "executeScenario" section for considerations before testing a scenario.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Scenario","description":"Scenario commands allows executing all modifiable actions by implementer. Before use the scenarios, please be sure than you informed and and fee results. All Scenario commands are below and also explained on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/previewScenario":{"post":{"tags":["Scenario"],"summary":"Preview scenario","description":"This endpoint is built on the principle of executing before saving to the PIRI network for a scenario. Unlike the \"executeScenario\" endpoint, it focuses on temporarily running specified functions within the provided code.\n\nIn other words:\n- It is common for scenario authors to execute it.\n- It may be used to execute changes on a previously saved scenario.\n- It can be used to test the security of a scenario.\n\nWhile alternative usage methods not covered in these examples may exist, it is advisable to refer to the \"executeScenario\" section for considerations before testing a scenario.","operationId":"previewScenario","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["scenarioText","address","privateKey","method"],"type":"object","properties":{"scenarioText":{"type":"string","description":"Scenario Text | Javascript or Typescript Code"},"address":{"type":"string","description":"Executer PIRI Address"},"privateKey":{"type":"string","description":"Private Key"},"method":{"type":"string","description":"The method to be run in the scenario"},"params":{"type":"array","items":{"type":"string"},"description":"Parameters | e.g.: [\"value1\", \"value2\", ...]"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/previewScenario"}}}}},"deprecated":false}}},"components":{"schemas":{"previewScenario":{"title":"previewScenario","required":["error","returnedData"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"returnedData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"object"},{"type":"array"},{"type":"boolean"}],"description":"Returned data from scenario execution - can be any type"}}}}}}
```


# Transaction

All transactions methods are below and detailed on their section.

## List transactions

> This endpoint lists transactions on the PIRI network based on the skip and limit parameters provided to it. The returned transactions are transactions confirmed by nodes.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Transaction","description":"All transactions methods are below and detailed on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listTransactions":{"post":{"tags":["Transaction"],"summary":"List transactions","description":"This endpoint lists transactions on the PIRI network based on the skip and limit parameters provided to it. The returned transactions are transactions confirmed by nodes.","operationId":"listTransactions","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["skip","limit"],"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":10,"maximum":100,"description":"Record count for per page"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listTransactions"}}}}},"deprecated":false}}},"components":{"schemas":{"listTransactions":{"title":"listTransactions","required":["docs","txCountTotal"],"type":"object","properties":{"docs":{"type":"array","items":{"$ref":"#/components/schemas/Doc"},"description":"Array of transaction documents"},"txCountTotal":{"type":"integer","format":"int32","description":"Total number of transactions"}}},"Doc":{"type":"object","properties":{"type":{"type":"integer","description":"Transaction type"},"isFromScenario":{"type":"boolean","description":"Indicates if transaction originated from a scenario"},"confirmed":{"type":"boolean","description":"Transaction confirmation status"},"confirmationCount":{"type":"integer","description":"Number of confirmations received"},"_id":{"type":"string","description":"Unique transaction identifier"},"transactionHash":{"type":"string","description":"Transaction hash"},"__v":{"type":"integer","description":"Version key"},"amount":{"type":"number","description":"Transaction amount"},"assetID":{"type":"integer","description":"Asset identifier (-1 for PIRI, positive for tokens)"},"blockHeight":{"type":"integer","description":"Block height where transaction was included"},"fee":{"type":"number","description":"Transaction fee"},"from":{"type":"string","description":"Sender address"},"pub":{"type":"string","description":"Public key"},"signature":{"type":"string","description":"Transaction signature"},"symbol":{"type":"string","description":"Asset symbol"},"timeStamp":{"type":"integer","description":"Transaction timestamp"},"to":{"type":"string","description":"Receiver address"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"},"description":"Array of validator nodes that confirmed the transaction"}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## List pool transactions

> This endpoint lists pending and unconfirmed transfers created in the PIRI network. The approval time for a transaction can vary depending on the approval times of the nodes. However, the time it takes for a transaction to be included in a block (once confirmed) is a maximum of 30 seconds.\
> \
> Another important point to note here is that if a transaction is confirmed but has been approved by an insufficient number of nodes for any reason, the maximum time that can pass for it to be reevaluated and approved by the nodes that did not confirm it is 6 hours. A transaction that is not confirmed within 6 hours will not undergo reconfirmation checks.\
> \
> \*\*Furthermore, in the PIRI network, if a transaction is not confirmed, it is not retained as an unconfirmed transaction in the system and is instantly disregarded.\*\*

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Transaction","description":"All transactions methods are below and detailed on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listPoolTransactions":{"post":{"tags":["Transaction"],"summary":"List pool transactions","description":"This endpoint lists pending and unconfirmed transfers created in the PIRI network. The approval time for a transaction can vary depending on the approval times of the nodes. However, the time it takes for a transaction to be included in a block (once confirmed) is a maximum of 30 seconds.\n\nAnother important point to note here is that if a transaction is confirmed but has been approved by an insufficient number of nodes for any reason, the maximum time that can pass for it to be reevaluated and approved by the nodes that did not confirm it is 6 hours. A transaction that is not confirmed within 6 hours will not undergo reconfirmation checks.\n\n**Furthermore, in the PIRI network, if a transaction is not confirmed, it is not retained as an unconfirmed transaction in the system and is instantly disregarded.**","operationId":"listPoolTransactions","responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/listPoolTransaction"}}}}}},"deprecated":false}}},"components":{"schemas":{"listPoolTransaction":{"title":"listPoolTransaction","required":["type","confirmed","confirmationCount","_id","validatorNodes","from","to","assetID","timeStamp","amount","transactionHash","fee","signature","pub","symbol","__v"],"type":"object","properties":{"type":{"type":"integer","format":"int32"},"confirmed":{"type":"boolean"},"confirmationCount":{"type":"integer","format":"int32"},"_id":{"type":"string"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"},"description":"List of validator nodes that confirmed this transaction"},"from":{"type":"string"},"to":{"type":"string"},"assetID":{"type":"integer","format":"int32"},"timeStamp":{"type":"integer","format":"int64"},"amount":{"type":"integer","format":"int32"},"transactionHash":{"type":"string"},"fee":{"type":"number"},"signature":{"type":"string"},"pub":{"type":"string"},"symbol":{"type":"string"},"__v":{"type":"integer","format":"int32"}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## List transactions by asset ID

> This endpoint returns the same result as the "listTransactions" endpoint, but specific to the specified asset type (PIRI or Token), based on the provided assetID parameter.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Transaction","description":"All transactions methods are below and detailed on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listTransactionsByAssetID":{"post":{"tags":["Transaction"],"summary":"List transactions by asset ID","description":"This endpoint returns the same result as the \"listTransactions\" endpoint, but specific to the specified asset type (PIRI or Token), based on the provided assetID parameter.","operationId":"listTransactionsByAssetID","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["skip","limit","assetID"],"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":50,"maximum":100,"description":"Record count for per page"},"assetID":{"type":"string","description":"Asset ID"},"desc":{"type":"boolean","description":"Descending order","default":false}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listTransactionsByAssetID"}}}}},"deprecated":false}}},"components":{"schemas":{"listTransactionsByAssetID":{"title":"listTransactionsByAssetID","required":["doc","count"],"type":"object","properties":{"doc":{"type":"array","items":{"$ref":"#/components/schemas/Doc"},"description":"Array of transaction documents filtered by asset ID"},"count":{"type":"integer","format":"int32","description":"Total number of transactions matching the asset ID filter"}}},"Doc":{"type":"object","properties":{"type":{"type":"integer","description":"Transaction type"},"isFromScenario":{"type":"boolean","description":"Indicates if transaction originated from a scenario"},"confirmed":{"type":"boolean","description":"Transaction confirmation status"},"confirmationCount":{"type":"integer","description":"Number of confirmations received"},"_id":{"type":"string","description":"Unique transaction identifier"},"transactionHash":{"type":"string","description":"Transaction hash"},"__v":{"type":"integer","description":"Version key"},"amount":{"type":"number","description":"Transaction amount"},"assetID":{"type":"integer","description":"Asset identifier (-1 for PIRI, positive for tokens)"},"blockHeight":{"type":"integer","description":"Block height where transaction was included"},"fee":{"type":"number","description":"Transaction fee"},"from":{"type":"string","description":"Sender address"},"pub":{"type":"string","description":"Public key"},"signature":{"type":"string","description":"Transaction signature"},"symbol":{"type":"string","description":"Asset symbol"},"timeStamp":{"type":"integer","description":"Transaction timestamp"},"to":{"type":"string","description":"Receiver address"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"},"description":"Array of validator nodes that confirmed the transaction"}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## List transactions by address

> This endpoint returns the same result as the "listTransactions" endpoint, but only specific to the provided PIRI Address, based on the specified "address" parameter.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Transaction","description":"All transactions methods are below and detailed on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listTransactionsByAddr":{"post":{"tags":["Transaction"],"summary":"List transactions by address","description":"This endpoint returns the same result as the \"listTransactions\" endpoint, but only specific to the provided PIRI Address, based on the specified \"address\" parameter.","operationId":"listTransactionsByAddr","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["skip","limit","address"],"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":50,"maximum":100,"description":"Record count for per page"},"address":{"type":"string","description":"PIRI Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listTransactionsByAddr"}}}}},"deprecated":false}}},"components":{"schemas":{"listTransactionsByAddr":{"title":"listTransactionsByAddr","required":["doc","count"],"type":"object","properties":{"doc":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"transactionHash":{"type":"string"},"amount":{"type":"number"},"assetID":{"type":"integer"},"blockHeight":{"type":"integer"},"confirmationCount":{"type":"integer"},"confirmed":{"type":"boolean"},"fee":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"symbol":{"type":"string"},"timeStamp":{"type":"integer"},"type":{"type":"integer"},"pub":{"type":"string"},"signature":{"type":"string"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"}},"customData":{"type":"array"}}},"description":"Array of transactions filtered by the specified address"},"count":{"type":"integer","format":"int32","description":"Total number of transactions for the specified address"}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get transaction details

> This endpoint returns the details of a transaction created within the PIRI network. The parameter it takes is the "tx" value, which corresponds to the hash value associated with the transaction. It is also referred to as "transactionHash" within the schemas.\
> \
> The list of validating nodes that approved the transaction is included in the returned transaction as "validatorNodes."

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Transaction","description":"All transactions methods are below and detailed on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getTransaction":{"post":{"tags":["Transaction"],"summary":"Get transaction details","description":"This endpoint returns the details of a transaction created within the PIRI network. The parameter it takes is the \"tx\" value, which corresponds to the hash value associated with the transaction. It is also referred to as \"transactionHash\" within the schemas.\n\nThe list of validating nodes that approved the transaction is included in the returned transaction as \"validatorNodes.\"","operationId":"getTransaction","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["tx"],"type":"object","properties":{"tx":{"type":"string","description":"Transaction Hash"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getTransaction"}}}}},"deprecated":false}}},"components":{"schemas":{"getTransaction":{"title":"getTransaction","required":["type","confirmed","confirmationCount","_id","transactionHash","__v","amount","assetID","blockHeight","fee","from","pub","signature","symbol","timeStamp","to","validatorNodes","customData","broadcastHex"],"type":"object","properties":{"type":{"type":"integer","format":"int32"},"confirmed":{"type":"boolean"},"confirmationCount":{"type":"integer","format":"int32"},"_id":{"type":"string"},"transactionHash":{"type":"string"},"__v":{"type":"integer","format":"int32"},"amount":{"type":"integer","format":"int32"},"assetID":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"fee":{"type":"number"},"from":{"type":"string"},"pub":{"type":"string"},"signature":{"type":"string"},"symbol":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"to":{"type":"string"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"},"description":"List of validator nodes that confirmed this transaction"},"customData":{"type":"array","items":{"type":"string"},"description":"Additional custom data associated with the transaction"},"broadcastHex":{"type":"string"}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get pool transaction details

> This endpoint, like the "getTransaction" endpoint, returns the details of a pool transaction based on the specified "tx" parameter. However, once this transaction is confirmed, even if the provided "tx" information is correct, it will no longer return a result. In other words, this endpoint's response can be retrieved just before a transaction is confirmed.\
> \
> Additionally, the returned result will have a different schema from the result that will be returned after this transaction is confirmed (e.g., information such as "blockHeight" and "validatorNodes").

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Transaction","description":"All transactions methods are below and detailed on their section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getPoolTransaction":{"post":{"tags":["Transaction"],"summary":"Get pool transaction details","description":"This endpoint, like the \"getTransaction\" endpoint, returns the details of a pool transaction based on the specified \"tx\" parameter. However, once this transaction is confirmed, even if the provided \"tx\" information is correct, it will no longer return a result. In other words, this endpoint's response can be retrieved just before a transaction is confirmed.\n\nAdditionally, the returned result will have a different schema from the result that will be returned after this transaction is confirmed (e.g., information such as \"blockHeight\" and \"validatorNodes\").","operationId":"getPoolTransaction","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["tx"],"type":"object","properties":{"tx":{"type":"string","description":"Transaction Hash"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/GetPoolTransaction"}}}}},"deprecated":false}}},"components":{"schemas":{"GetPoolTransaction":{"title":"GetPoolTransaction","required":["type","confirmed","confirmationCount","_id","validatorNodes","from","to","assetID","timeStamp","amount","transactionHash","fee","signature","pub","symbol","__v"],"type":"object","properties":{"type":{"type":"integer","format":"int32"},"confirmed":{"type":"boolean"},"confirmationCount":{"type":"integer","format":"int32"},"_id":{"type":"string"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"},"description":"List of validator nodes that confirmed this transaction"},"from":{"type":"string"},"to":{"type":"string"},"assetID":{"type":"integer","format":"int32"},"timeStamp":{"type":"integer","format":"int64"},"amount":{"type":"integer","format":"int32"},"transactionHash":{"type":"string"},"fee":{"type":"number"},"signature":{"type":"string"},"pub":{"type":"string"},"symbol":{"type":"string"},"__v":{"type":"integer","format":"int32"}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```


# Block

All block commands are below and detailed on related sections.

## Get blocks

> This endpoint lists the blocks created on the PIRI network, based on the skip and limit parameters provided to it.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getBlocks":{"post":{"tags":["Block"],"summary":"Get blocks","description":"This endpoint lists the blocks created on the PIRI network, based on the skip and limit parameters provided to it.","operationId":"getBlocks","requestBody":{"$ref":"#/components/requestBodies/pager"},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getBlocks"}}}}},"deprecated":false}}},"components":{"requestBodies":{"pager":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":10,"maximum":100,"description":"Record count for per page"}}}}},"required":false}},"schemas":{"getBlocks":{"title":"getBlocks","required":["data","count"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockInfo"},"description":"List of blocks"},"count":{"type":"integer","format":"int32","description":"Total count of blocks"}}},"BlockInfo":{"title":"BlockInfo","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v","confirmCount"],"type":"object","properties":{"confirmed":{"type":"boolean"},"_id":{"type":"string"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/Validator"}},"producerAddress":{"type":"string"},"totalFee":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"previousHash":{"type":"string"},"hash":{"type":"string"},"checkSum":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"__v":{"type":"integer","format":"int32"},"confirmCount":{"type":"integer","format":"int32"}}},"Validator":{"title":"Validator","required":["_id","dateTime","nodeName","nodeAddress","result"],"type":"object","properties":{"_id":{"type":"string"},"dateTime":{"type":"string"},"nodeName":{"type":"string"},"nodeAddress":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get blocks with transaction count

> This endpoint lists the blocks created in the PIRI network, similar to the getBlocks endpoint, but the resulting schema also includes the trxCount information for each block.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getBlocksWithTransactionCount":{"post":{"tags":["Block"],"summary":"Get blocks with transaction count","description":"This endpoint lists the blocks created in the PIRI network, similar to the getBlocks endpoint, but the resulting schema also includes the trxCount information for each block.","operationId":"getBlocksWithTransactionCount","requestBody":{"$ref":"#/components/requestBodies/pager"},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getBlocksWithTransactionCount"}}}}},"deprecated":false}}},"components":{"requestBodies":{"pager":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":10,"maximum":100,"description":"Record count for per page"}}}}},"required":false}},"schemas":{"getBlocksWithTransactionCount":{"title":"getBlocksWithTransactionCount","required":["data","count"],"type":"object","properties":{"data":{"type":"array","description":"Array of blocks with transaction count information","items":{"$ref":"#/components/schemas/BlockWithTransactionCount"}},"count":{"type":"integer","format":"int32","description":"Total number of blocks in the network"}}},"BlockWithTransactionCount":{"title":"BlockWithTransactionCount","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v","confirmCount","trxCount"],"type":"object","properties":{"confirmed":{"type":"boolean"},"_id":{"type":"string"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/Validator"},"description":""},"producerAddress":{"type":"string"},"totalFee":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"previousHash":{"type":"string"},"hash":{"type":"string"},"checkSum":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"__v":{"type":"integer","format":"int32"},"confirmCount":{"type":"integer","format":"int32"},"trxCount":{"type":"integer","format":"int32"}}},"Validator":{"title":"Validator","required":["_id","dateTime","nodeName","nodeAddress","result"],"type":"object","properties":{"_id":{"type":"string"},"dateTime":{"type":"string"},"nodeName":{"type":"string"},"nodeAddress":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get last blocks with block height

> This endpoint uses the limit & blockHeight parameters instead of the skip & limit parameters to list blocks created on the PIRI network. The purpose here is to achieve faster results when page control is provided by the application.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getLastBlocksWithBlockHeight":{"post":{"tags":["Block"],"summary":"Get last blocks with block height","description":"This endpoint uses the limit & blockHeight parameters instead of the skip & limit parameters to list blocks created on the PIRI network. The purpose here is to achieve faster results when page control is provided by the application.","operationId":"getLastBlocksWithBlockHeight","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"limit":{"type":"number","default":10,"maximum":100,"description":"Record count for per page"},"blockHeight":{"type":"number","default":5,"maximum":100,"description":"Block Height (Block Count) to start."}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getLastBlocksWithBlockHeight"}}}}},"deprecated":false}}},"components":{"schemas":{"getLastBlocksWithBlockHeight":{"title":"getLastBlocksWithBlockHeight","required":["data","count"],"type":"object","properties":{"data":{"type":"array","description":"Array of blocks starting from specified block height","items":{"$ref":"#/components/schemas/SimpleBlockInfo"}},"count":{"type":"integer","format":"int32","description":"Total number of blocks in the network"}}},"SimpleBlockInfo":{"title":"SimpleBlockInfo","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v"],"type":"object","properties":{"confirmed":{"type":"boolean"},"_id":{"type":"string"},"validators":{"type":"array"},"producerAddress":{"type":"string"},"totalFee":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"previousHash":{"type":"string"},"hash":{"type":"string"},"checkSum":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"__v":{"type":"integer","format":"int32"}}}}}}
```

## Get blocks in descending order

> This endpoint lists the blocks created in the PIRI network in reverse order, based on the skip and limit parameters provided to it. In other words, this endpoint is more convenient for listing newly created blocks.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getBlocksDesc":{"post":{"tags":["Block"],"summary":"Get blocks in descending order","description":"This endpoint lists the blocks created in the PIRI network in reverse order, based on the skip and limit parameters provided to it. In other words, this endpoint is more convenient for listing newly created blocks.","operationId":"getBlocksDesc","requestBody":{"$ref":"#/components/requestBodies/pager"},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getBlocksDesc"}}}}},"deprecated":false}}},"components":{"requestBodies":{"pager":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":10,"maximum":100,"description":"Record count for per page"}}}}},"required":false}},"schemas":{"getBlocksDesc":{"title":"getBlocksDesc","required":["data","count"],"type":"object","properties":{"data":{"type":"array","description":"Array of blocks in descending order by block height","items":{"$ref":"#/components/schemas/BlockInfo"}},"count":{"type":"integer","format":"int32","description":"Total number of blocks in the network"}}},"BlockInfo":{"title":"BlockInfo","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v","confirmCount"],"type":"object","properties":{"confirmed":{"type":"boolean"},"_id":{"type":"string"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/Validator"}},"producerAddress":{"type":"string"},"totalFee":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"previousHash":{"type":"string"},"hash":{"type":"string"},"checkSum":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"__v":{"type":"integer","format":"int32"},"confirmCount":{"type":"integer","format":"int32"}}},"Validator":{"title":"Validator","required":["_id","dateTime","nodeName","nodeAddress","result"],"type":"object","properties":{"_id":{"type":"string"},"dateTime":{"type":"string"},"nodeName":{"type":"string"},"nodeAddress":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get last blocks

> This endpoint lists the blocks created in the PIRI network based on the limit parameter provided to it. The value given to the limit parameter signifies listing the last x number of blocks.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getLastBlocks":{"post":{"tags":["Block"],"summary":"Get last blocks","description":"This endpoint lists the blocks created in the PIRI network based on the limit parameter provided to it. The value given to the limit parameter signifies listing the last x number of blocks.","operationId":"getLastBlocks","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"limit":{"type":"number","default":10,"minimum":5,"maximum":100,"description":"Record count (descending order)"}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getLastBlocks"}}}}},"deprecated":false}}},"components":{"schemas":{"getLastBlocks":{"title":"getLastBlocks","required":["data","count"],"type":"object","properties":{"data":{"type":"array","description":"Array of the most recent blocks in the network","items":{"$ref":"#/components/schemas/BlockInfo"}},"count":{"type":"integer","format":"int32","description":"Total number of blocks in the network"}}},"BlockInfo":{"title":"BlockInfo","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v","confirmCount"],"type":"object","properties":{"confirmed":{"type":"boolean"},"_id":{"type":"string"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/Validator"}},"producerAddress":{"type":"string"},"totalFee":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"previousHash":{"type":"string"},"hash":{"type":"string"},"checkSum":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"__v":{"type":"integer","format":"int32"},"confirmCount":{"type":"integer","format":"int32"}}},"Validator":{"title":"Validator","required":["_id","dateTime","nodeName","nodeAddress","result"],"type":"object","properties":{"_id":{"type":"string"},"dateTime":{"type":"string"},"nodeName":{"type":"string"},"nodeAddress":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get only blocks

> This endpoint lists the blocks created on the PIRI network, based on the skip and limit parameters provided. However, the returned result does not include validatorNodes and transaction information. This makes it suitable for quickly browsing the block list.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getOnlyBlocks":{"post":{"tags":["Block"],"summary":"Get only blocks","description":"This endpoint lists the blocks created on the PIRI network, based on the skip and limit parameters provided. However, the returned result does not include validatorNodes and transaction information. This makes it suitable for quickly browsing the block list.","operationId":"getOnlyBlocks","requestBody":{"$ref":"#/components/requestBodies/pager"},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getOnlyBlocks"}}}}},"deprecated":false}}},"components":{"requestBodies":{"pager":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"skip":{"type":"number","default":0,"description":"Page count for skip according to limit value."},"limit":{"type":"number","default":10,"maximum":100,"description":"Record count for per page"}}}}},"required":false}},"schemas":{"getOnlyBlocks":{"title":"getOnlyBlocks","required":["data","count"],"type":"object","properties":{"data":{"type":"array","description":"Array of blocks without validator nodes and transaction information for faster browsing","items":{"$ref":"#/components/schemas/BlockInfo"}},"count":{"type":"integer","format":"int32","description":"Total number of blocks in the network"}}},"BlockInfo":{"title":"BlockInfo","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v","confirmCount"],"type":"object","properties":{"confirmed":{"type":"boolean"},"_id":{"type":"string"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/Validator"}},"producerAddress":{"type":"string"},"totalFee":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"previousHash":{"type":"string"},"hash":{"type":"string"},"checkSum":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"__v":{"type":"integer","format":"int32"},"confirmCount":{"type":"integer","format":"int32"}}},"Validator":{"title":"Validator","required":["_id","dateTime","nodeName","nodeAddress","result"],"type":"object","properties":{"_id":{"type":"string"},"dateTime":{"type":"string"},"nodeName":{"type":"string"},"nodeAddress":{"type":"string"},"result":{"type":"integer","format":"int32"}}}}}}
```

## Get block

> This endpoint returns the most detailed information related to a block created on the PIRI network. The returned object may include validator nodes, transactions, and custom data information.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Block","description":"All block commands are below and detailed on related sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getBlock":{"post":{"tags":["Block"],"summary":"Get block","description":"This endpoint returns the most detailed information related to a block created on the PIRI network. The returned object may include validator nodes, transactions, and custom data information.","operationId":"getBlock","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["blockNumber"],"type":"object","properties":{"blockNumber":{"type":"number","description":"Block Number"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getBlock"}}}}},"deprecated":false}}},"components":{"schemas":{"getBlock":{"title":"getBlock","required":["confirmed","_id","validators","producerAddress","totalFee","blockHeight","previousHash","hash","checkSum","timeStamp","__v","confirmCount","lastBlock","trxs"],"type":"object","properties":{"confirmed":{"type":"boolean","description":"Block confirmation status"},"_id":{"type":"string","description":"Block ID"},"validators":{"type":"array","items":{"$ref":"#/components/schemas/Validator"},"description":"List of validator nodes"},"producerAddress":{"type":"string","description":"Block producer address"},"totalFee":{"type":"number","description":"Total transaction fees"},"blockHeight":{"type":"integer","format":"int32","description":"Block height"},"previousHash":{"type":"string","description":"Previous block hash"},"hash":{"type":"string","description":"Block hash"},"checkSum":{"type":"string","description":"Block checksum"},"timeStamp":{"type":"integer","format":"int64","description":"Block timestamp"},"__v":{"type":"integer","format":"int32","description":"Version key"},"confirmCount":{"type":"integer","format":"int32","description":"Confirmation count"},"lastBlock":{"type":"integer","format":"int32","description":"Last block height"},"trxs":{"type":"array","items":{"$ref":"#/components/schemas/Trx"},"description":"List of transactions in block"}}},"Validator":{"title":"Validator","required":["_id","dateTime","nodeName","nodeAddress","result"],"type":"object","properties":{"_id":{"type":"string"},"dateTime":{"type":"string"},"nodeName":{"type":"string"},"nodeAddress":{"type":"string"},"result":{"type":"integer","format":"int32"}}},"Trx":{"title":"Trx","required":["type","confirmed","confirmationCount","_id","transactionHash","__v","amount","assetID","blockHeight","fee","from","pub","signature","symbol","timeStamp","validatorNodes","customDocs"],"type":"object","properties":{"type":{"type":"integer","format":"int32"},"confirmed":{"type":"boolean"},"confirmationCount":{"type":"integer","format":"int32"},"_id":{"type":"string"},"transactionHash":{"type":"string"},"__v":{"type":"integer","format":"int32"},"amount":{"type":"integer","format":"int32"},"assetID":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"},"fee":{"type":"number"},"from":{"type":"string"},"pub":{"type":"string"},"signature":{"type":"string"},"symbol":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"validatorNodes":{"type":"array","items":{"$ref":"#/components/schemas/ValidatorNode"},"description":""},"customDocs":{"type":"array","items":{"$ref":"#/components/schemas/CustomDoc"},"description":""}}},"ValidatorNode":{"title":"ValidatorNode","required":["_id","nodeName","message","dateTime","result"],"type":"object","properties":{"_id":{"type":"string"},"nodeName":{"type":"string"},"message":{"type":"string"},"dateTime":{"type":"string"},"result":{"type":"integer","format":"int32"}}},"CustomDoc":{"title":"CustomDoc","required":["_id","txID","key","value","timeStamp","from","enc","__v","blockHeight"],"type":"object","properties":{"_id":{"type":"string"},"txID":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"timeStamp":{"type":"integer","format":"int64"},"from":{"type":"string"},"enc":{"type":"integer","format":"int32"},"__v":{"type":"integer","format":"int32"},"blockHeight":{"type":"integer","format":"int32"}}}}}}
```


# Data

All commands for Data section are listed below and detailed on their own sections.

## Push data

> This endpoint forms the basis for the customized usage of the PIRI network. Thanks to this feature in the PIRI network, which enables data to be included in transactions and moved, user data can be transferred from any source, address, or recipient (recipient address).\
> \
> Pirichain offers a dynamic method to facilitate the addition of data to the blockchain. Data can be added as a Key & Value pair with different security levels, denoted by "enc," which represents the encryption level. There are three different encryption types for "enc." \*\*0: Non-Encrypted\*\*, where the Key & Value pair is stored openly in the blockchain. \*\*1: Value Encrypted\*\*, where the Key value is stored openly, but the Value is encrypted. \*\*2: Key & Value Encrypted\*\*, where both values are added to the blockchain in an encrypted form.\
> \
> When data is stored encrypted in the PIRI network, two different approaches can be applied. The parameter that enables this is \*\*"to"\*\*. In other words, customData can be made shareable with another PIRI address, beyond belonging to the PIRI address that added it to the system. This is made possible through a "shared key" in the PIRI network.\
> \
> \*\*Once customData is added to the blockchain, it becomes immutable and cannot be altered or deleted, similar to a transaction. This ensures the immutability of the given data.\*\*\
> \
> Thanks to this feature, applications for data-driven web3.0 concepts can be developed without the need for external applications, and the use of this feature with Pirichain Smart Scenarios can also be facilitated.\ <br>

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Data","description":"All commands for Data section are listed below and detailed on their own sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/pushData":{"post":{"tags":["Data"],"summary":"Push data","description":"This endpoint forms the basis for the customized usage of the PIRI network. Thanks to this feature in the PIRI network, which enables data to be included in transactions and moved, user data can be transferred from any source, address, or recipient (recipient address).\n\nPirichain offers a dynamic method to facilitate the addition of data to the blockchain. Data can be added as a Key & Value pair with different security levels, denoted by \"enc,\" which represents the encryption level. There are three different encryption types for \"enc.\" **0: Non-Encrypted**, where the Key & Value pair is stored openly in the blockchain. **1: Value Encrypted**, where the Key value is stored openly, but the Value is encrypted. **2: Key & Value Encrypted**, where both values are added to the blockchain in an encrypted form.\n\nWhen data is stored encrypted in the PIRI network, two different approaches can be applied. The parameter that enables this is **\"to\"**. In other words, customData can be made shareable with another PIRI address, beyond belonging to the PIRI address that added it to the system. This is made possible through a \"shared key\" in the PIRI network.\n\n**Once customData is added to the blockchain, it becomes immutable and cannot be altered or deleted, similar to a transaction. This ensures the immutability of the given data.**\n\nThanks to this feature, applications for data-driven web3.0 concepts can be developed without the need for external applications, and the use of this feature with Pirichain Smart Scenarios can also be facilitated.\n\n","operationId":"pushData","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","privateKey","customData"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"},"privateKey":{"type":"string","description":"Private Key"},"to":{"type":"string","description":"Recipient PIRI Address"},"customData":{"type":"string","description":"Custom data [{\"key\":\"key\",\"value\":\"value\",\"enc\":<0: non-encrypted, 1: value-encrypted, 2: key&value-encrypted>}, ...]"},"indPubKey":{"type":"string","description":"Recipient Public Key"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/pushData"}}}}},"deprecated":false}}},"components":{"schemas":{"pushData":{"title":"pushData","required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"tx":{"type":"string","description":"Transaction hash"},"sign":{"type":"string","description":"Transaction signature"},"timeStamp":{"type":"integer","format":"int64","description":"Transaction timestamp"}}}}}}
```

## Decrypt

> This endpoint is created for a customData added to the PIRI network, with the intention of enabling decryption by either the data provider or the recipient. The data added with the "pushData1 endpoint" comes with different encryption levels, two of which do not require additional decryption: 1: Value Encrypted, 2: Key & Value Encrypted.\
> \
> In such a scenario, the address that added the data to the blockchain or the address that became the recipient at the time of data addition through the "to" parameter can decrypt this encrypted data or data using this endpoint.\ <br>

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Data","description":"All commands for Data section are listed below and detailed on their own sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/decrypt":{"post":{"tags":["Data"],"summary":"Decrypt","description":"This endpoint is created for a customData added to the PIRI network, with the intention of enabling decryption by either the data provider or the recipient. The data added with the \"pushData1 endpoint\" comes with different encryption levels, two of which do not require additional decryption: 1: Value Encrypted, 2: Key & Value Encrypted.\n\nIn such a scenario, the address that added the data to the blockchain or the address that became the recipient at the time of data addition through the \"to\" parameter can decrypt this encrypted data or data using this endpoint.\n\n","operationId":"decrypt","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["customID","privateKey"],"type":"object","properties":{"customID":{"type":"string","description":"Custom Data Id"},"privateKey":{"type":"string","description":"Private Key"},"receiptPub":{"type":"string","description":"Recipient Public Key"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/decrypt"}}}}},"deprecated":false}}},"components":{"schemas":{"decrypt":{"title":"decrypt","required":["error","key","value"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"key":{"type":"string","description":"Decrypted key"},"value":{"type":"string","description":"Decrypted value"}}}}}}
```

## List data

> This endpoint lists the data present in the PIRI network based on the skip and limit parameters.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Data","description":"All commands for Data section are listed below and detailed on their own sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listData":{"post":{"tags":["Data"],"summary":"List data","description":"This endpoint lists the data present in the PIRI network based on the skip and limit parameters.","operationId":"listData","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["limit"],"type":"object","properties":{"limit":{"type":"number","description":"Record count for per page"},"skip":{"type":"number","description":"Page count for skip according to limit value."}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listData"}}}}},"deprecated":false}}},"components":{"schemas":{"listData":{"title":"listData","required":["data","count"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DataEntry"},"description":"List of data entries"},"count":{"type":"integer","format":"int32","description":"Total count of data entries"}}},"DataEntry":{"title":"DataEntry","required":["_id","txID","key","value","timeStamp","from","enc","__v","blockHeight"],"type":"object","properties":{"_id":{"type":"string","description":"Data entry ID"},"txID":{"type":"string","description":"Transaction ID"},"key":{"type":"string","description":"Data key"},"value":{"type":"string","description":"Data value"},"timeStamp":{"type":"integer","format":"int64","description":"Timestamp"},"from":{"type":"string","description":"Sender address"},"enc":{"type":"integer","format":"int32","description":"Encryption level"},"__v":{"type":"integer","format":"int32","description":"Version key"},"blockHeight":{"type":"integer","format":"int32","description":"Block height"}}}}}}
```

## List data by address

> This endpoint lists the data associated with the PIRI address specified in the \*\*"address"\*\* parameter on the PIRI network, depending on the skip and limit parameters.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Data","description":"All commands for Data section are listed below and detailed on their own sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listDataByAddress":{"post":{"tags":["Data"],"summary":"List data by address","description":"This endpoint lists the data associated with the PIRI address specified in the **\"address\"** parameter on the PIRI network, depending on the skip and limit parameters.","operationId":"listDataByAddress","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","limit"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"},"limit":{"type":"number","description":"Record count for per page"},"skip":{"type":"number","description":"Page count for skip according to limit value."}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listDataByAddress"}}}}},"deprecated":false}}},"components":{"schemas":{"listDataByAddress":{"title":"listDataByAddress","required":["data","count"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DataEntry"},"description":"List of data entries by address"},"count":{"type":"integer","format":"int32","description":"Total count of data entries"}}},"DataEntry":{"title":"DataEntry","required":["_id","txID","key","value","timeStamp","from","enc","__v","blockHeight"],"type":"object","properties":{"_id":{"type":"string","description":"Data entry ID"},"txID":{"type":"string","description":"Transaction ID"},"key":{"type":"string","description":"Data key"},"value":{"type":"string","description":"Data value"},"timeStamp":{"type":"integer","format":"int64","description":"Timestamp"},"from":{"type":"string","description":"Sender address"},"enc":{"type":"integer","format":"int32","description":"Encryption level"},"__v":{"type":"integer","format":"int32","description":"Version key"},"blockHeight":{"type":"integer","format":"int32","description":"Block height"}}}}}}
```

## List data by addresses

> List data entries between specific addresses

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Data","description":"All commands for Data section are listed below and detailed on their own sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listDataByAddresses":{"post":{"tags":["Data"],"summary":"List data by addresses","description":"List data entries between specific addresses","operationId":"listDataByAddresses","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["from","to","limit"],"type":"object","properties":{"from":{"type":"string","description":"From address"},"to":{"type":"string","description":"To address"},"limit":{"type":"number","description":"Number of results to return"},"skip":{"type":"number","description":"Number of results to skip"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/listDataByAddresses"}}}}},"deprecated":false}}},"components":{"schemas":{"listDataByAddresses":{"title":"listDataByAddresses","required":["error","data"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataEntryWithRecipient"},"description":"List of data entries between addresses"}}},"DataEntryWithRecipient":{"title":"DataEntryWithRecipient","required":["_id","txID","key","value","timeStamp","from","to","enc","__v","blockHeight"],"type":"object","properties":{"_id":{"type":"string","description":"Data entry ID"},"txID":{"type":"string","description":"Transaction ID"},"key":{"type":"string","description":"Data key"},"value":{"type":"string","description":"Data value"},"timeStamp":{"type":"integer","format":"int64","description":"Timestamp"},"from":{"type":"string","description":"Sender address"},"to":{"type":"string","description":"Recipient address"},"enc":{"type":"integer","format":"int32","description":"Encryption level"},"__v":{"type":"integer","format":"int32","description":"Version key"},"blockHeight":{"type":"integer","format":"int32","description":"Block height"}}}}}}
```

## Push data raw transaction

> Push data to blockchain using raw transaction format

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Data","description":"All commands for Data section are listed below and detailed on their own sections."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/pushDataRawTransaction":{"post":{"tags":["Data"],"summary":"Push data raw transaction","description":"Push data to blockchain using raw transaction format","operationId":"pushDataRawTransaction","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","pubKey","signature","timeStamp","to"],"type":"object","properties":{"address":{"type":"string","description":"Sender address"},"pubKey":{"type":"string","description":"Public key"},"signature":{"type":"string","description":"Transaction signature"},"timeStamp":{"type":"string","description":"Transaction timestamp"},"to":{"type":"string","description":"Recipient address"},"customData":{"type":"string","description":"Custom data array in JSON format"},"indPubKey":{"type":"string","description":"Individual public key"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/pushDataRawTransaction"}}}}},"deprecated":false}}},"components":{"schemas":{"pushDataRawTransaction":{"title":"pushDataRawTransaction","required":["error","txHash"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"txHash":{"type":"string","description":"Transaction hash"}}}}}}
```


# Delegation

All delegation actions commands are below and detailed on their own section.

## List my delegation

> This endpoint is used to list the delegates voted for by the relevant PIRI address in the PIRI network. This process is also known as the staking mechanism in other networks. \
> \
> \*\*The reason for requesting the Private Key information for this endpoint is to ensure that only the owner of the relevant address can see the amount of frozen PIRI assets and which delegates the freezing process was performed for.\*\*

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listMyDelegation":{"post":{"tags":["Delegation"],"summary":"List my delegation","description":"This endpoint is used to list the delegates voted for by the relevant PIRI address in the PIRI network. This process is also known as the staking mechanism in other networks. \n\n**The reason for requesting the Private Key information for this endpoint is to ensure that only the owner of the relevant address can see the amount of frozen PIRI assets and which delegates the freezing process was performed for.**","operationId":"listMyDelegation","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["delegationAddress","delegationPrivateKey"],"type":"object","properties":{"delegationAddress":{"type":"string","description":"PIRI Address"},"delegationPrivateKey":{"type":"string","description":"Private Key"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/listMyDelegation"}}}}}},"deprecated":false}}},"components":{"schemas":{"listMyDelegation":{"title":"listMyDelegation","required":["_id","delegationAddress","nodeAddress","frozenAmount","frozenDateTime","txHash","__v"],"type":"object","properties":{"_id":{"type":"string","description":"Delegation ID"},"delegationAddress":{"type":"string","description":"Delegator address"},"nodeAddress":{"type":"string","description":"Deputy node address"},"frozenAmount":{"type":"integer","format":"int32","description":"Frozen amount"},"frozenDateTime":{"type":"string","format":"date-time","description":"Frozen date and time"},"txHash":{"type":"string","description":"Transaction hash"},"__v":{"type":"integer","format":"int32","description":"Version key"}}}}}}
```

## Freeze coin

> This endpoint is used to vote for delegates on the PIRI network and to freeze the PIRIs in your wallet. Frozen PIRIs are non-transferable, but the freezing process can be canceled, and through the frozen PIRIs, daily PIRI rewards can be obtained from delegates.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/freezeCoin":{"post":{"tags":["Delegation"],"summary":"Freeze coin","description":"This endpoint is used to vote for delegates on the PIRI network and to freeze the PIRIs in your wallet. Frozen PIRIs are non-transferable, but the freezing process can be canceled, and through the frozen PIRIs, daily PIRI rewards can be obtained from delegates.","operationId":"freezeCoin","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["delegationAddress","delegationPrivateKey","duptyAddress","amount"],"type":"object","properties":{"delegationAddress":{"type":"string","description":"Sender PIRI Address"},"delegationPrivateKey":{"type":"string","description":"Sender Private Key"},"duptyAddress":{"type":"string","description":"Delegate Address"},"amount":{"type":"number","description":"Amount to Freeze"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/freezeCoin"}}}}},"deprecated":false}}},"components":{"schemas":{"freezeCoin":{"title":"freezeCoin","required":["error","data","delegationID"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"data":{"$ref":"#/components/schemas/TransactionResponse"},"delegationID":{"type":"string","description":"Delegation ID"}}},"TransactionResponse":{"title":"TransactionResponse","required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"tx":{"type":"string","description":"Transaction hash"},"sign":{"type":"string","description":"Transaction signature"},"timeStamp":{"type":"integer","format":"int64","description":"Transaction timestamp"}}}}}}
```

## Unfreeze coin

> This endpoint is used to retrieve the frozen PIRI asset associated with the "freezeCoin" endpoint.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/unFreezeCoin":{"post":{"tags":["Delegation"],"summary":"Unfreeze coin","description":"This endpoint is used to retrieve the frozen PIRI asset associated with the \"freezeCoin\" endpoint.","operationId":"unFreezeCoin","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["delegationAddress","delegationPrivateKey","nodeAddress","txHash"],"type":"object","properties":{"delegationAddress":{"type":"string","description":"Sender PIRI Address"},"delegationPrivateKey":{"type":"string","description":"Sender Private Key"},"nodeAddress":{"type":"string","description":"Delegate Address"},"txHash":{"type":"string","description":"Tx used during freezing"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/unFreezeCoin"}}}}},"deprecated":false}}},"components":{"schemas":{"unFreezeCoin":{"title":"unFreezeCoin","required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"tx":{"type":"string","description":"Transaction hash"},"sign":{"type":"string","description":"Transaction signature"},"timeStamp":{"type":"integer","format":"int64","description":"Transaction timestamp"}}}}}}
```

## Join as deputy

> This endpoint is used to become a delegate on the PIRI network. There are some advantages to becoming a delegate, but there are also some points to be aware of.\
> \
> Before becoming a delegate, you need to:\
> \- Define the purpose of delegation and have knowledge about the delegation process.\
> \- Remember that delegation is a one-way process.\
> \- Ensure that you have the necessary information for delegation.\
> \- Make sure there is a balance of 11,000 PIRI or more in your wallet for delegation, excluding the commission fee.\
> \
> A delegated address gains the right to be selected. This means that different address owners can vote for this delegate and freeze PIRI for this delegate through the "freezeCoin" endpoint. A delegate with a freeze of 100,000 PIRI or more also assumes the role of a Producer Address. This information can be verified on the <https://piriscan.com/deputies> page.\
> \
> Another advantage of being a delegate is having a DVPA. DVPA stands for Domain Verified PIRI Address, which is a mechanism that allows an address to be associated with a domain. It facilitates a permanent and secure verification method, especially for commercial businesses, institutions, and government entities.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/joinAsDeputy":{"post":{"tags":["Delegation"],"summary":"Join as deputy","description":"This endpoint is used to become a delegate on the PIRI network. There are some advantages to becoming a delegate, but there are also some points to be aware of.\n\nBefore becoming a delegate, you need to:\n- Define the purpose of delegation and have knowledge about the delegation process.\n- Remember that delegation is a one-way process.\n- Ensure that you have the necessary information for delegation.\n- Make sure there is a balance of 11,000 PIRI or more in your wallet for delegation, excluding the commission fee.\n\nA delegated address gains the right to be selected. This means that different address owners can vote for this delegate and freeze PIRI for this delegate through the \"freezeCoin\" endpoint. A delegate with a freeze of 100,000 PIRI or more also assumes the role of a Producer Address. This information can be verified on the https://piriscan.com/deputies page.\n\nAnother advantage of being a delegate is having a DVPA. DVPA stands for Domain Verified PIRI Address, which is a mechanism that allows an address to be associated with a domain. It facilitates a permanent and secure verification method, especially for commercial businesses, institutions, and government entities.","operationId":"joinAsDeputy","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","privateKey"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"},"privateKey":{"type":"string","description":"Private Key"},"alias":{"type":"string","description":"Deputy Alias to give"},"website":{"type":"string","description":"**URL | Required for D.V.P.A. (Domain Verified PIRI Address)**"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/joinAsDeputy"}}}}},"deprecated":false}}},"components":{"schemas":{"joinAsDeputy":{"title":"joinAsDeputy","required":["error","data","tx"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"data":{"type":"string","description":"Success message"},"tx":{"type":"string","description":"Transaction hash"}}}}}}
```

## Check deputy

> This endpoint is used to check whether a PIRI address is delegated or not.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/checkDeputy":{"post":{"tags":["Delegation"],"summary":"Check deputy","description":"This endpoint is used to check whether a PIRI address is delegated or not.","operationId":"checkDeputy","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"boolean"}}}}},"deprecated":false}}}}
```

## Verify address

> This endpoint is used to perform the DVPA (Domain Verified PIRI Address) verification for a delegated application address. It is important to note that when delegating an address, the "website" information must be provided. Otherwise, this endpoint will not be able to perform the necessary verification.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/verifyAddress":{"post":{"tags":["Delegation"],"summary":"Verify address","description":"This endpoint is used to perform the DVPA (Domain Verified PIRI Address) verification for a delegated application address. It is important to note that when delegating an address, the \"website\" information must be provided. Otherwise, this endpoint will not be able to perform the necessary verification.","operationId":"verifyAddress","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"boolean"}}}}},"deprecated":false}}}}
```

## List deputies

> This endpoint is used to list all delegates (delegated addresses) in the PIRI network.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listDeputies":{"post":{"tags":["Delegation"],"summary":"List deputies","description":"This endpoint is used to list all delegates (delegated addresses) in the PIRI network.","operationId":"listDeputies","responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/listDeputies"}}}}}},"deprecated":false}}},"components":{"schemas":{"listDeputies":{"title":"listDeputies","required":["verified","_id","depAddress","depAlias","depWebsite","frozenAmount","producedBlocks"],"type":"object","properties":{"verified":{"type":"boolean","description":"DVPA verification status"},"_id":{"type":"string","description":"Deputy ID"},"depAddress":{"type":"string","description":"Deputy address"},"depAlias":{"type":"string","description":"Deputy alias"},"depWebsite":{"type":"string","nullable":true,"description":"Deputy website"},"frozenAmount":{"type":"number","description":"Total frozen amount"},"producedBlocks":{"type":"number","description":"Number of produced blocks"}}}}}}
```

## Get my reward quantity

> This endpoint returns the total earnings obtained from frozen PIRI amounts for delegates by the respective address.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getMyRewardQuantity":{"post":{"tags":["Delegation"],"summary":"Get my reward quantity","description":"This endpoint returns the total earnings obtained from frozen PIRI amounts for delegates by the respective address.","operationId":"getMyRewardQuantity","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["base58","privateKey"],"type":"object","properties":{"base58":{"type":"string","description":"PIRI Address"},"privateKey":{"type":"string","description":"Private Key"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getMyRewardQuantity"}}}}},"deprecated":false}}},"components":{"schemas":{"getMyRewardQuantity":{"title":"getMyRewardQuantity","required":["error","rewardAmount"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"rewardAmount":{"type":"number","description":"Total reward amount"}}}}}}
```

## Claim my rewards

> This endpoint is used to collect earnings obtained from delegates for the specified address.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/claimMyRewards":{"post":{"tags":["Delegation"],"summary":"Claim my rewards","description":"This endpoint is used to collect earnings obtained from delegates for the specified address.","operationId":"claimMyRewards","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["address","privateKey"],"type":"object","properties":{"address":{"type":"string","description":"PIRI Address"},"privateKey":{"type":"string","description":"Private Key"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/claimMyRewards"}}}}},"deprecated":false}}},"components":{"schemas":{"claimMyRewards":{"title":"claimMyRewards","required":["error","tx","sign","timeStamp"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code (0 for success)"},"tx":{"type":"string","description":"Transaction hash"},"sign":{"type":"string","description":"Transaction signature"},"timeStamp":{"type":"integer","format":"int64","description":"Transaction timestamp"}}}}}}
```

## List delegation top N

> This endpoint provides a list of delegates within the PIRI network who have a frozen PIRI amount of 100,000 or more.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Delegation","description":"All delegation actions commands are below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/listDelegationTopN":{"post":{"tags":["Delegation"],"summary":"List delegation top N","description":"This endpoint provides a list of delegates within the PIRI network who have a frozen PIRI amount of 100,000 or more.","operationId":"listDelegationTopN","responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/listDelegationTopN"}}}}}},"deprecated":false}}},"components":{"schemas":{"listDelegationTopN":{"title":"listDelegationTopN","required":["_id","totalFrozen"],"type":"object","properties":{"_id":{"type":"string","description":"Deputy address"},"totalFrozen":{"type":"integer","format":"int32","description":"Total frozen amount"}}}}}}
```


# Utility

All commands are listed below and detailed on their own section.

## Search for transactions, addresses or tokens

> This endpoint searches for one of the following with the given "value" parameter in the PIRI network:\
> \- Token\
> \- Address\
> \- Transaction

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Utility","description":"All commands are listed below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/search":{"post":{"tags":["Utility"],"summary":"Search for transactions, addresses or tokens","description":"This endpoint searches for one of the following with the given \"value\" parameter in the PIRI network:\n- Token\n- Address\n- Transaction","operationId":"Search","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["value"],"type":"object","properties":{"value":{"type":"string","description":"Search content | Address, Token Name, Transaction ID"}}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/search"}}}}}},"deprecated":false}}},"components":{"schemas":{"search":{"title":"search","required":["type","data"],"type":"object","properties":{"type":{"type":"string"},"data":{"$ref":"#/components/schemas/TokenInfo"}}},"TokenInfo":{"title":"TokenInfo","required":["_id","tokenSymbol","tokenName","logo","assetID"],"type":"object","properties":{"_id":{"type":"string"},"tokenSymbol":{"type":"string"},"tokenName":{"type":"string"},"logo":{"type":"string"},"assetID":{"type":"integer","format":"int32"}}}}}}
```

## Get test PIRI tokens

> Get test PIRI tokens for development purposes. This endpoint is typically used on testnet environments for testing purposes.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Utility","description":"All commands are listed below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/givemePiri":{"post":{"tags":["Utility"],"summary":"Get test PIRI tokens","description":"Get test PIRI tokens for development purposes. This endpoint is typically used on testnet environments for testing purposes.","operationId":"givemePiri","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"PIRI address to receive test tokens"}}}}}},"responses":{"200":{"description":"Test PIRI sent successfully","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/givemePiri"}}}}},"deprecated":false}}},"components":{"schemas":{"givemePiri":{"title":"givemePiri","type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error code, 0 for success"},"message":{"type":"string","description":"Response message indicating the result"},"txHash":{"type":"string","description":"Transaction hash of the test PIRI transfer"}}}}}}
```

## Reload network configuration settings

> This endpoint allows reloading of network configuration settings on the blockchain network. By providing the hanOwnerSHA3 parameter (which is the SHA3 hash obtained during the blockchain network setup), the network settings can be reloaded and refreshed.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Utility","description":"All commands are listed below and detailed on their own section."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/reloadSetting":{"post":{"tags":["Utility"],"summary":"Reload network configuration settings","description":"This endpoint allows reloading of network configuration settings on the blockchain network. By providing the hanOwnerSHA3 parameter (which is the SHA3 hash obtained during the blockchain network setup), the network settings can be reloaded and refreshed.","operationId":"reloadSetting","requestBody":{"required":false,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"hanOwnerSHA3":{"type":"string","description":"SHA3 hash obtained during blockchain network setup, required for authentication to reload network settings"}}}}}},"responses":{"200":{"description":"Response from reload settings operation","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/reloadSetting"}}}}},"deprecated":false}}},"components":{"schemas":{"reloadSetting":{"title":"reloadSetting","type":"object","required":["error"],"properties":{"error":{"type":"integer","format":"int32","description":"Error code: 0 for success, 1 for failure","enum":[0,1]},"data":{"type":"string","description":"Error message when operation fails (only present when error is 1)"}}}}}}
```


# Stats

These commands return statistical information from Piri system.

## Get rich list

> This endpoint is used on the PIRI network to access a list of wallets that hold the most of the given "assetID" asset type. Skip and limit parameters can be used for pagination.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Stats","description":"These commands return statistical information from Piri system."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getRichList":{"post":{"tags":["Stats"],"summary":"Get rich list","description":"This endpoint is used on the PIRI network to access a list of wallets that hold the most of the given \"assetID\" asset type. Skip and limit parameters can be used for pagination.","operationId":"getRichList","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["assetID","limit"],"type":"object","properties":{"assetID":{"type":"string","description":"Asset ID"},"limit":{"type":"number","description":"Record count for per page"},"skip":{"type":"number","description":"Page count for skip according to limit value."}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getRichList"}}}}},"deprecated":false}}},"components":{"schemas":{"getRichList":{"required":["error","count","data"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error status code. 0 indicates success, non-zero indicates an error."},"count":{"type":"integer","format":"int32","description":"Total number of rich wallets found for the specified asset."},"data":{"type":"array","items":{"$ref":"#/components/schemas/RichListEntry"},"description":"Array of wallet entries ordered by balance amount (highest to lowest)."}}},"RichListEntry":{"required":["_id","address","assetID","balance"],"type":"object","properties":{"_id":{"type":"string","description":"Unique database identifier for this wallet entry."},"address":{"type":"string","description":"The PIRI wallet address holding the asset."},"assetID":{"type":"integer","format":"int32","description":"The asset identifier. -1 represents native PIRI tokens."},"balance":{"type":"number","description":"The current balance amount of the specified asset in this wallet."}}}}}}
```

## Get detailed statistics

> This endpoint returns the total transaction count for the last 10 processed days on the PIRI network in the form of a statistical series.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Stats","description":"These commands return statistical information from Piri system."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getDetailStats":{"post":{"tags":["Stats"],"summary":"Get detailed statistics","description":"This endpoint returns the total transaction count for the last 10 processed days on the PIRI network in the form of a statistical series.","operationId":"getDetailStats","requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"type":"object","properties":{"assetID":{"type":"string","description":"Asset ID"}}}}},"required":false},"responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/getDetailStat"},"description":"Array of daily transaction statistics for the last 10 processed days"}}}}},"deprecated":false}}},"components":{"schemas":{"getDetailStat":{"required":["_id","count"],"type":"object","properties":{"_id":{"type":"string","description":"The date identifier in YYYY-MM-DD format representing the day for which statistics are reported."},"count":{"type":"integer","format":"int32","description":"The total number of transactions processed on this specific date."}}}}}}
```

## Get statistics

> This endpoint is used to display summary information related to the PIRI network.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Stats","description":"These commands return statistical information from Piri system."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getStats":{"post":{"tags":["Stats"],"summary":"Get statistics","description":"This endpoint is used to display summary information related to the PIRI network.","operationId":"getStats","responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getStats"}}}}},"deprecated":false}}},"components":{"schemas":{"getStats":{"required":["blockCount","transactionCount","poolTransactionCount","tokenCount","addressCount","customDataSize","totalBurnedPiri","deputyCount","totalFrozenData"],"type":"object","properties":{"blockCount":{"type":"integer","format":"int32","description":"Total number of blocks processed in the PIRI network."},"transactionCount":{"type":"integer","format":"int32","description":"Total number of transactions completed in the network."},"poolTransactionCount":{"type":"integer","format":"int32","description":"Number of transactions currently waiting in the transaction pool."},"tokenCount":{"type":"integer","format":"int32","description":"Total number of tokens created on the PIRI network."},"addressCount":{"type":"integer","format":"int32","description":"Total number of unique addresses that have been active on the network."},"customDataSize":{"type":"string","description":"Total size of custom data stored on the blockchain, displayed in human-readable format."},"totalBurnedPiri":{"type":"array","items":{"$ref":"#/components/schemas/TotalBurnedPiri"},"description":"Array containing information about total PIRI tokens that have been burned."},"deputyCount":{"type":"integer","format":"int32","description":"Current number of deputy nodes participating in the network consensus."},"totalFrozenData":{"type":"array","items":{"$ref":"#/components/schemas/TotalFrozenData"},"description":"Array containing information about total frozen PIRI tokens in the network."}}},"TotalBurnedPiri":{"required":["_id","total"],"type":"object","properties":{"_id":{"type":"string","nullable":true,"description":"Identifier for the burned tokens aggregation (typically null for total sum)."},"total":{"type":"number","description":"Total amount of PIRI tokens that have been permanently burned."}}},"TotalFrozenData":{"required":["_id","totalFrozen"],"type":"object","properties":{"_id":{"type":"string","nullable":true,"description":"Identifier for the frozen tokens aggregation (typically null for total sum)."},"totalFrozen":{"type":"number","description":"Total amount of PIRI tokens that are currently frozen in delegation."}}}}}}
```

## Get circulation

> This endpoint provides the total amount of PIRI circulating in the PIRI network.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Stats","description":"These commands return statistical information from Piri system."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getCirculation":{"post":{"tags":["Stats"],"summary":"Get circulation","description":"This endpoint provides the total amount of PIRI circulating in the PIRI network.","operationId":"getCirculation","responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/getCirculation"}}}}},"deprecated":false}}},"components":{"schemas":{"getCirculation":{"required":["error","amount"],"type":"object","properties":{"error":{"type":"integer","format":"int32","description":"Error status code. 0 indicates success, non-zero indicates an error."},"amount":{"type":"integer","format":"int32","description":"The total amount of PIRI tokens currently circulating in the network."}}}}}}
```

## Get total burned PIRI

> This endpoint is used to list the amount of PIRI burned in the PIRI network in the last 10 days.

```json
{"openapi":"3.0.3","info":{"title":"Pirichain API","version":"1.1.0"},"tags":[{"name":"Stats","description":"These commands return statistical information from Piri system."}],"servers":[{"url":"https://core.pirichain.com","description":"Pirichain MainNet","variables":{}},{"url":"https://testnet.pirichain.com","description":"Pirichain TestNet","variables":{}},{"url":"https://{URL}","description":"You can only use https protocol for your custom environment.","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}},{"url":"http://{URL}","description":"Custom HTTP endpoint for development environment (not recommended for production).","variables":{"URL":{"default":"custom.network","description":"You can enter your custom endpoint which belong to Pirichain Network"}}}],"paths":{"/getTotalBurnedPiri":{"post":{"tags":["Stats"],"summary":"Get total burned PIRI","description":"This endpoint is used to list the amount of PIRI burned in the PIRI network in the last 10 days.","operationId":"getTotalBurnedPiri","responses":{"200":{"description":"OK","content":{"application/json; charset=utf-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BurnedPiriEntry"}}}}}},"deprecated":true}}},"components":{"schemas":{"BurnedPiriEntry":{"required":["_id","count"],"type":"object","properties":{"_id":{"type":"string","description":"The date identifier in YYYY-MM-DD format representing the day for which burned PIRI statistics are reported."},"count":{"type":"number","description":"The total amount of PIRI tokens burned on this specific date."}}}}}}
```


