Delegation

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

List my delegation

post

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.

Body
delegationAddressstringRequired

PIRI Address

delegationPrivateKeystringRequired

Private Key

Responses
200

OK

application/json; charset=utf-8
post
POST /listMyDelegation HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 58

"delegationAddress='text'&delegationPrivateKey='text'"
200

OK

[
  {
    "_id": "62753bdeea4f5223164c4c37",
    "delegationAddress": "PRTMR5pDravSYmAdohUNSoGoEgwyEg2mG8xbWuAfb47",
    "nodeAddress": "PRTMQHyfM45WiYxPcL9GZtSB49GXUSufa8q2Wji4yF5",
    "frozenAmount": 1000,
    "frozenDateTime": "2022-05-06T15:16:46.715Z",
    "txHash": "9adb25675bcb068f6834ed91b4d8f060b162ceb6a1ad0034a1e9cd560db28d8c",
    "__v": 0
  }
]

Freeze coin

post

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.

Body
delegationAddressstringRequired

Sender PIRI Address

delegationPrivateKeystringRequired

Sender Private Key

duptyAddressstringRequired

Delegate Address

amountnumberRequired

Amount to Freeze

Responses
200

OK

application/json; charset=utf-8
post
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"
200

OK

{
  "error": 0,
  "data": {
    "error": 0,
    "tx": "9adb25675bcb068f6834ed91b4d8f060b162ceb6a1ad0034a1e9cd560db28d8c",
    "sign": "3045022100d45ce2cfbe574cb18733924d31da4a0ff7a458655ad723b7065740e29476c3b9022002dc79fca37a61ba332502a591b93384a2beb62c704d7d91cd92f8490da17fc7",
    "timeStamp": 1651850206451
  },
  "delegationID": "62753bdeea4f5223164c4c37"
}

Unfreeze coin

post

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

Body
delegationAddressstringRequired

Sender PIRI Address

delegationPrivateKeystringRequired

Sender Private Key

nodeAddressstringRequired

Delegate Address

txHashstringRequired

Tx used during freezing

Responses
200

OK

application/json; charset=utf-8
post
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'"
200

OK

{
  "error": 0,
  "tx": "8d892c39d1300a300767ed9345e4d463436c1057a9f2beb9fd92bf6bdd739906",
  "sign": "3045022100d45ce2cfbe574cb18733924d31da4a0ff7a458655ad723b7065740e29476c3b9022002dc79fca37a61ba332502a591b93384a2beb62c704d7d91cd92f8490da17fc7",
  "timeStamp": 1651851391178
}

Join as deputy

post

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.

Body
addressstringRequired

PIRI Address

privateKeystringRequired

Private Key

aliasstringOptional

Deputy Alias to give

websitestringOptional

URL | Required for D.V.P.A. (Domain Verified PIRI Address)

Responses
200

OK

application/json; charset=utf-8
post
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'"
200

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"
}

Check deputy

post

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

Body
addressstringRequired

PIRI Address

Responses
200

OK

application/json; charset=utf-8
Responseboolean
post
POST /checkDeputy HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18

"address='text'"
200

OK

true

Verify address

post

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.

Body
addressstringRequired

PIRI Address

Responses
200

OK

application/json
Responseboolean
post
POST /verifyAddress HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 18

"address='text'"
200

OK

true

List deputies

post

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

Responses
200

OK

application/json; charset=utf-8
post
POST /listDeputies HTTP/1.1
Host: core.pirichain.com
Accept: */*
200

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
  }
]

Get my reward quantity

post

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

Body
base58stringRequired

PIRI Address

privateKeystringRequired

Private Key

Responses
200

OK

application/json; charset=utf-8
post
POST /getMyRewardQuantity HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 37

"base58='text'&privateKey='text'"
200

OK

{
  "error": 0,
  "rewardAmount": 127.63191273465246
}

Claim my rewards

post

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

Body
addressstringRequired

PIRI Address

privateKeystringRequired

Private Key

Responses
200

OK

application/json; charset=utf-8
post
POST /claimMyRewards HTTP/1.1
Host: core.pirichain.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 38

"address='text'&privateKey='text'"
200

OK

{
  "error": 0,
  "tx": "d357d39ab856bdf3f3abfad01c4cce6fa41f17e32dd2f0bbb13540b8d4d7830f",
  "sign": "30450221009006eb64c124ddf557fd0e2c186c725674c04a92262717a5667820bd2fbba1130220535d99e95aae47b7c980eb593b387cabd2c49354ad636549fdf06cae1571d4e0",
  "timeStamp": 1663766042014
}

List delegation top N

post

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

Responses
200

OK

application/json; charset=utf-8
post
POST /listDelegationTopN HTTP/1.1
Host: core.pirichain.com
Accept: */*
200

OK

[
  {
    "_id": "PRTMQqXYnvfs7QmjaDLEFoD4AmxiZAqF8yJhZW19rfr",
    "totalFrozen": 144352
  }
]

Was this helpful?