Delegation
All delegation actions commands are below and detailed on their own section.
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.
PIRI Address
Private Key
OK
POST /listMyDelegation HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 58
"delegationAddress='text'&delegationPrivateKey='text'"
OK
[
{
"_id": "62753bdeea4f5223164c4c37",
"delegationAddress": "PRTMR5pDravSYmAdohUNSoGoEgwyEg2mG8xbWuAfb47",
"nodeAddress": "PRTMQHyfM45WiYxPcL9GZtSB49GXUSufa8q2Wji4yF5",
"frozenAmount": 1000,
"frozenDateTime": "2022-05-06T15:16:46.715Z",
"txHash": "9adb25675bcb068f6834ed91b4d8f060b162ceb6a1ad0034a1e9cd560db28d8c",
"__v": 0
}
]
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.
Sender PIRI Address
Sender Private Key
Delegate Address
Amount to Freeze
OK
POST /freezeCoin HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 91
"delegationAddress='text'&delegationPrivateKey='text'&duptyAddress='text'&amount=1"
OK
{
"error": 0,
"data": {
"error": 0,
"tx": "9adb25675bcb068f6834ed91b4d8f060b162ceb6a1ad0034a1e9cd560db28d8c",
"sign": "3045022100d45ce2cfbe574cb18733924d31da4a0ff7a458655ad723b7065740e29476c3b9022002dc79fca37a61ba332502a591b93384a2beb62c704d7d91cd92f8490da17fc7",
"timeStamp": 1651850206451
},
"delegationID": "62753bdeea4f5223164c4c37"
}
This endpoint is used to retrieve the frozen PIRI asset associated with the "freezeCoin" endpoint.
Sender PIRI Address
Sender Private Key
Delegate Address
Tx used during freezing
OK
POST /unFreezeCoin HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 95
"delegationAddress='text'&delegationPrivateKey='text'&nodeAddress='text'&txHash='text'"
OK
{
"error": 0,
"tx": "8d892c39d1300a300767ed9345e4d463436c1057a9f2beb9fd92bf6bdd739906",
"sign": "3045022100d45ce2cfbe574cb18733924d31da4a0ff7a458655ad723b7065740e29476c3b9022002dc79fca37a61ba332502a591b93384a2beb62c704d7d91cd92f8490da17fc7",
"timeStamp": 1651851391178
}
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.
PIRI Address
Private Key
Deputy Alias to give
URL | Required for D.V.P.A. (Domain Verified PIRI Address)
OK
POST /joinAsDeputy HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 70
"address='text'&privateKey='text'&alias='text'&website='text'"
OK
{
"error": 0,
"data": "Your Attemption of Been Deputy Result Successful.WELCOME TO PIRI SYSTEM. You May share your address to select to you. And Make Greater Chance To Top Deputies and Earn More PIRI COIN.",
"tx": "90cfe8c0eb528d07ae6c820e883390c44a523fccf1cf967a9d7cb1ed2b1e5cb4"
}
This endpoint is used to check whether a PIRI address is delegated or not.
PIRI Address
OK
POST /checkDeputy HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18
"address='text'"
OK
true
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.
PIRI Address
OK
POST /verifyAddress HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18
"address='text'"
OK
true
This endpoint is used to list all delegates (delegated addresses) in the PIRI network.
OK
POST /listDeputies HTTP/1.1
Host: core.pirichain.com
Accept: */*
OK
[
{
"verified": false,
"_id": "6344399a401de78291c783cd",
"depAddress": "PRTMQSmLA34dDbRWdgJ992zYraKGRYDBdV1jtwHK3zu",
"depAlias": "Piri Tech&Sci Found.",
"depWebsite": null,
"frozenAmount": 593850.1,
"producedBlocks": 1088215
},
{
"verified": true,
"_id": "63a36d247f0d8ef727d57a2e",
"depAddress": "PRTMPHPPgApYGzuE55coK1hgdrgUzxAppMTT9btVGgx",
"depAlias": "Pirichain Docrypt #2",
"depWebsite": "https://pirichain.com",
"frozenAmount": 0,
"producedBlocks": 0
}
]
This endpoint returns the total earnings obtained from frozen PIRI amounts for delegates by the respective address.
PIRI Address
Private Key
OK
POST /getMyRewardQuantity HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 37
"base58='text'&privateKey='text'"
OK
{
"error": 0,
"rewardAmount": 127.63191273465246
}
This endpoint is used to collect earnings obtained from delegates for the specified address.
PIRI Address
Private Key
OK
POST /claimMyRewards HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 38
"address='text'&privateKey='text'"
OK
{
"error": 0,
"tx": "d357d39ab856bdf3f3abfad01c4cce6fa41f17e32dd2f0bbb13540b8d4d7830f",
"sign": "30450221009006eb64c124ddf557fd0e2c186c725674c04a92262717a5667820bd2fbba1130220535d99e95aae47b7c980eb593b387cabd2c49354ad636549fdf06cae1571d4e0",
"timeStamp": 1663766042014
}
This endpoint provides a list of delegates within the PIRI network who have a frozen PIRI amount of 100,000 or more.
OK
POST /listDelegationTopN HTTP/1.1
Host: core.pirichain.com
Accept: */*
OK
[
{
"_id": "PRTMQqXYnvfs7QmjaDLEFoD4AmxiZAqF8yJhZW19rfr",
"totalFrozen": 144352
}
]
Was this helpful?