Shuffling

From ArdorDocs
Jump to: navigation, search

Other languages:

Coin shuffling can be used to perform mixing of child chain tokens such as IGNIS, MS currencies (unless created as non-shuffleable), or AE assets. ARDR parent chain tokens are not shuffleable. Any account can create a new shuffling, specifying the holding to be shuffled, the shuffle amount, number of participants required, and registration deadline.

Get Account Shufflings

Retrieves info about shufflings for a specific account.

Request:

  • requestType is getAccountShufflings
  • chain the chain related to the operation
  • account is the account ID
  • includeFinished is true to include completed shufflings (optional)
  • includeHoldingInfo is true to include holding info (optional)
  • firstIndex is a zero-based index to the first tagged data to retrieve (optional)
  • lastIndex is a zero-based index to the last tagged data to retrieve (optional)
  • adminPassword is a string with the admin password (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)
  • shufflings (A) is an array containing the shuffling object (refer to Get Shuffling)

Get Account Shufflings Example

http://localhost:27876/nxt?
 getAccountShufflings&
 chain=2&
 account=ARDOR-UZNP-6LBA-YQ38-3TEY8
{
 "requestProcessingTime": 91,
 "shufflings": [
  {
   "blocksRemaining": 4372,
   "amount": "25000000000000",
   "shufflingStateHash": "be12c737ad86e551621f57ebddaaaa61e66cf0a206fabfe40538304ff674c7a7",
   "issuer": "11802441287912491934",
   "holding": "0",
   "stage": 0,
   "holdingType": 0,
   "participantCount": 7,
   "assigneeRS": "ARDOR-UZNP-6LBA-YQ38-3TEY8",
   "shuffling": "5901270965262160574",
   "registrantCount": 2,
   "assignee": "1403321141259239061",
   "issuerRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
   "shufflingFullHash": "be12c737ad86e551621f57ebddaaaa61e66cf0a206fabfe40538304ff674c7a7"
  }
 ]
}


Get All Shufflings

Retrieves info about all shufflings.

Request:

  • requestType is getAllShufflings
  • chain the chain related to the operation
  • includeFinished is true to include completed shufflings (optional)
  • includeHoldingInfo is true to include holding info (optional)
  • finishedOnly is true to omit not yet finished shufflings (optional)
  • firstIndex is a zero-based index to the first tagged data to retrieve (optional)
  • lastIndex is a zero-based index to the last tagged data to retrieve (optional)
  • adminPassword is a string with the admin password (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)
  • shufflings (A) is an array containing the shuffling object (refer to Get Shuffling)

Get All Shufflings Example

http://localhost:27876/nxt?
 requestType=getAllShufflings&
 chain=2
{
 "requestProcessingTime": 81,
 "shufflings": [
  {
   "blocksRemaining": 226,
   "amount": "5000000000000",
   "shufflingStateHash": "9be2ed518e46d921df9f9f6425cc16a399f72a7833c58dbeb2a261e04620c392",
   "issuer": "16667202175165271068",
   "holding": "0",
   "stage": 0,
   "holdingType": 0,
   "participantCount": 5,
   "assigneeRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
   "shuffling": "2439058250271679131",
   "registrantCount": 3,
   "assignee": "11802441287912491934",
   "issuerRS": "ARDOR-J52W-4BF7-L4J9-GEGMG",
   "shufflingFullHash": "9be2ed518e46d921df9f9f6425cc16a399f72a7833c58dbeb2a261e04620c392"
  }
 ]
}


Get Assigned Shufflings

Retrieves info about a shufflings that are currently assigned to a specific account.

Request:

  • requestType is getAssignedShufflings
  • chain the chain related to the operation
  • account is the account ID
  • includeHoldingInfo is true to include holding info (optional)
  • firstIndex is a zero-based index to the first tagged data to retrieve (optional)
  • lastIndex is a zero-based index to the last tagged data to retrieve (optional)
  • adminPassword is a string with the admin password (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)
  • shufflings (A) is an array containing the shuffling object (refer to Get Shuffling)

Get Assigned Shufflings Example

http://localhost:27876/nxt?
 requestType=getAssignedShufflings&
 chain=2&
 account=ARDOR-V4WY-U928-GRN8-CKPL9
{
 "blocksRemaining": 20,
 "amount": "5000000000000",
 "shufflingStateHash": "9be2ed518e46d921df9f9f6425cc1...",
 "requestProcessingTime": 3,
 "issuer": "16667202175165271068",
 "holding": "0",
 "stage": 1,
 "holdingType": 0,
 "participantCount": 5,
 "assigneeRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
 "shuffling": "2439058250271679131",
 "registrantCount": 5,
 "assignee": "11802441287912491934",
 "issuerRS": "ARDOR-J52W-4BF7-L4J9-GEGMG",
 "shufflingFullHash": "9be2ed518e46d921df9f9f6425cc16a399..."
}


Get Holding Shufflings

Retrieves info about shufflings for a specific holding and/or stage.

Request:

  • requestType is getHoldingShufflings
  • chain the chain related to the operation
  • holding is the holding ID (optional)
  • stage is the stage of the shuffling (See Get Constants for type definitions) (optional)
  • includeFinished is true to include completed shufflings (optional)
  • firstIndex is a zero-based index to the first tagged data to retrieve (optional)
  • lastIndex is a zero-based index to the last tagged data to retrieve (optional)
  • adminPassword is a string with the admin password (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • requestProcessingTime (N) is the API request processing time (in millisec)
  • shufflings (A) is an array containing the shuffling object (refer to Get Shuffling)

Get Holding Shufflings Example

http://localhost:27876/nxt?
 requestType=getHoldingShufflings&
 chain=2&
 holding=15344649963748848799&
 includeFinished=true
{
 "requestProcessingTime": 4,
 "shufflings": [
  {
   "holding": "15344649963748848799",
   "blocksRemaining": 0,
   "amount": "1000",
   "stage": 4,
   "shufflingStateHash": "57ed7cc02fa5b1f289d2a345314be5ec557ad093a5fd3070a16aba952d30656f",
   "holdingType": 1,
   "participantCount": 5,
   "shuffling": "144176732027925694",
   "registrantCount": 1,
   "issuer": "17417706268123203912",
   "issuerRS": "ARDOR-A4CA-L7JT-ZYGU-HZ2G5",
   "shufflingFullHash": "beb46651f937000259819298872f1721170a4c2e1af7f7900cb2ca01188fd942"
  }
 ]
}


Get Shufflers

Retrieves info about active shufflers on the current node.

Request:

  • requestType is getShufflers
  • account is account ID (optional)
  • shufflingFullHash is shuffling full hash (optional)
  • secretPhrase is secret phrase of the account doing the shuffling (required if adminPassword is not provided)
  • adminPassword is the admin password (required if secretPhrase is not provided)
  • includeParticipantState to include each shuffling participant's state (optional)

Response:

  • shufflers (A) is an array containing all currently running shuffling processes on the node.
    • account (S) is account ID
    • accountRS (S) is the account Reed Solomon address
    • recipient (S) is the recipient account ID to where the funds will be sent once the shuffling is completed
    • recipientRS (S) is the recipient account Reed Solomon address to where the funds will be sent once the shuffling is completed
    • shuffling (S) is the shuffling ID
    • shufflingFullHash (S) is the shuffling full hash
    • participantState (N) is the state for the participant (For more info, see shufflingParticipantStates array in Get Constants)
  • requestProcessingTime (N) is the API request processing time (in millisec)

Get Shufflers Example

http://localhost:27876/nxt?
 requestType=getShufflers&
 adminPassword=IWontTellYou
{
 "shufflers": [
  {
   "accountRS": "ARDOR-7A48-47JL-T7LD-D5FS3",
   "recipientRS": "ARDOR-H42E-48UL-FM7A-AVEC2",
   "recipient": "9235083011255928844",
   "shuffling": "9534657251385467319",
   "account": "12745647715474645062",
   "shufflingFullHash": "b7e1eedb40e851849cb77a53075ce74aa..."
  }
 ],
 "requestProcessingTime": 0
}


Get Shuffling

Retrieves info about a shuffling.

Request:

  • requestType is getShuffling
  • chain the chain related to the operation
  • shuffling is the shuffling ID
  • includeHoldingInfo is true to include holding info (optional)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • blocksRemaining (N) number of blocks remaining until current stage is finished.
  • amount (S) the amount of holdingType to be shuffled
  • shufflingStateHash (S) state hash of the shuffling
  • shufflingFullHash (S) the full hash of the shuffling
  • issuer (S) is the issuer account ID
  • issuerRS (S) is the Reed-Solomon address of the issuer account
  • assignee (S) is the current assignee account ID
  • assigneeRS (S) is the Reed-Solomon address of the current assignee account
  • shuffling (S) is the shuffling ID
  • holding (S) is the asset or currency ID
  • holdingType (N) is the holding type (See Get Constants for type definitions)
  • stage (N) is the current stage of the shuffling (See Get Constants for type definitions)
  • participantCount (N) is the number of participants required to start the shuffling
  • registrantCount (N) is the number of registrered participants
  • recipientPublicKeys (A) is an array of recipient public keys
  • holdingInfo (A) is an array containing the asset or currency info (if includeHoldingInfo is true and holdingType is not NXT)
  • requestProcessingTime (N) is the API request processing time (in millisec)

Get Shuffling Example

http://localhost:27876/nxt?
 requestType=getShuffling&
 chain=2&
 shuffling=3347171811359602131
{
 "blocksRemaining": 956,
 "amount": "100000000000",
 "shufflingStateHash": "d3354a42078b732e16561b67a37d699d0410c564a4d18568319170665bf5dd9b",
 "requestProcessingTime": 2,
 "issuer": "10740484011813680725",
 "holding": "0",
 "stage": 0,
 "holdingType": 0,
 "participantCount": 5,
 "assigneeRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
 "shuffling": "3347171811359602131",
 "registrantCount": 2,
 "assignee": "11802441287912491934",
 "issuerRS": "ARDOR-PFLP-BQHY-NG4J-BXG5C",
 "shufflingFullHash": "d3354a42078b732e16561b67a37d699d0410c564a4d18568319170665bf5dd9b"
}


Get Shuffling Participants

Retrieves info about participants in a shuffling.

Request:

  • requestType is getShufflingParticipants
  • chain the chain related to the operation
  • shuffling is the shuffling ID
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • participants (A)
    • shuffling (S) is the shuffling ID
    • account (S) is the account ID
    • accountRS (S) is the account Reed Solomong address
    • state (N) is the state for the participant (For more info, see shufflingParticipantStates array in Get Constants)
    • nextAccount (S) is the account ID of the next account in turn
    • nextAccountRS (S) is the account Reed Solomon address of the next account in turn
  • requestProcessingTime (N) is the API request processing time (in millisec)

Get Shuffling Participants Example

http://localhost:27876/nxt?
 requestType=getShufflingParticipants&
 chain=2&
 shuffling=16292433427943984172
{
 "requestProcessingTime": 5,
 "participants": [
  {
   "nextAccountRS": "ARDOR-KTTY-WRE6-2B5Y-4CYWR",
   "accountRS": "ARDOR-3ZXY-KWR5-LR8V-2PYAT",
   "shuffling": "16292433427943984172",
   "state": 2,
   "nextAccount": "3167098051496568638",
   "account": "910806360590974910"
  },
  {
   "nextAccountRS": "ARDOR-L8VW-NRUG-LZ6Q-62WWW",
   "accountRS": "ARDOR-KTTY-WRE6-2B5Y-4CYWR",
   "shuffling": "16292433427943984172",
   "state": 2,
   "nextAccount": "5653003407546981244",
   "account": "3167098051496568638"
  },
  {
   "nextAccountRS": "ARDOR-XC7L-35JW-FZCL-24NUT",
   "accountRS": "ARDOR-L8VW-NRUG-LZ6Q-62WWW",
   "shuffling": "16292433427943984172",
   "state": 2,
   "nextAccount": "930699247665195186",
   "account": "5653003407546981244"
  },
  {
   "nextAccountRS": "ARDOR-2222-2222-2222-22222",
   "accountRS": "ARDOR-XC7L-35JW-FZCL-24NUT",
   "shuffling": "16292433427943984172",
   "state": 2,
   "nextAccount": "0",
   "account": "930699247665195186"
  }
 ]
}


Shuffling Cancel

Cancels a shuffling.

Request: Refer to Create Transaction Request for common parameters.

  • requestType is shufflingCancel
  • chain the chain related to the operation
  • shuffling is the shuffling ID
  • shufflingStateHash is the state hash of the shuffling
  • cancellingAccount is the account ID (optional)

Response Refer to Create Transaction Response.


Shuffling Create

Creates a new shuffling.

Request: Refer to Create Transaction Request for common parameters.

  • requestType is shufflingCreate
  • chain the chain related to the operation
  • holding is the holding id (optional if holdingType is 0)
  • holdingType is the holding type (See Get Constants for type definitions) (optional)
  • amount is the amount of the holding to shuffle
  • participantCount is the number of participants
  • registrationPeriod is the number of blocks the participants have to register until the shuffle is cancelled

Response Refer to Create Transaction Response.

Shuffling Create Example

http://localhost:27876/nxt?
 requestType=shufflingCreate&
 chain=2&
 amount=10000000000000&
 participantCount=7&
 registrationPeriod=9757&
 secretPhrase=IWontTellYou&
 feeNQT=100000000&
 deadline=1440
{
 "senderPublicKey": "ffcafb6de1ec93db5fe0475a6e2efd82faa3cb89a47a7d96f5579b0deadd5c10",
 "signature": "36b410b83abb4e373bf77c715c8ef3b06ba6c872e621e3f5f412dc1424eb6a0710ed8...",
 "feeNQT": "100000000",
 "transactionIndex": 0,
 "requestProcessingTime": 5,
 "type": 7,
 "confirmations": 9906,
 "fullHash": "2d10f4e18f808aa8d0de06d5cddcd77828eb6e7548f62e48de83f58fdf0629d5",
 "version": 1,
 "phased": false,
 "ecBlockId": "13021232786632787054",
 "signatureHash": "18956d76e3ed20937027373615e5fb49f11d1ac86eed279176856b59644899f5",
 "attachment": {
  "holding": "0",
  "amount": "10000000000000",
  "registrationPeriod": 9757,
  "holdingType": 0,
  "participantCount": 7,
  "version.ShufflingCreation": 1
 },
 "senderRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
 "subtype": 0,
 "amountNQT": "0",
 "sender": "11802441287912491934",
 "ecBlockHeight": 817230,
 "block": "435349863926964285",
 "blockTimestamp": 80029572,
 "deadline": 1440,
 "transaction": "12144660700617510957",
 "timestamp": 80029541,
 "height": 817245
}


Shuffling Process

Manually process the shuffling for a specific participant. Note that the shuffling must be in processing stage and the secretPhrase must match the current shuffling assignee.

Request: Refer to Create Transaction Request for common parameters.

  • requestType is shufflingProcess
  • chain the chain related to the operation
  • shuffling is the shuffling ID
  • recipientSecretPhrase is the secret phrase of the recipient account (optional if recipientPublicKey is provided)
  • recipientPublicKey is the public key of the recipient account (optional if recipientSecretPhrase is provided)

Response Refer to Create Transaction Response.

Shuffling Process Example

http://localhost:27876/nxt?
 requestType=shufflingProcess&
 chain=2&
 shuffling=12144660700617510957&
 recipientSecretPhrase=IWontTellYou&
 secretPhrase=IWontTellYou&
 feeNQT=100000000&
 deadline=1440
{
   "senderPublicKey": "ffcafb6de1ec93db5fe0475a6e2efd82faa3cb89a47a7d96f5579b0deadd5c10",
   "signature": "fb6112d759cedfefe14a7bdbe19b2fac73d334566f05fc20d7d79933879b140...",
   "feeNQT": "1000000000",
   "transactionIndex": 1,
   "type": 7,
   "confirmations": 251,
   "fullHash": "0d0855396fa1a60c8b50507069abdb5a7c6af3fdb49f12766c8630ec66309642",
   "version": 1,
   "phased": false,
   "ecBlockId": "17529486445813261105",
   "signatureHash": "a7c1d67e2ff01dd8e3cf72869428a708a6ad087bb6247e628fb1964456eea66b",
   "attachment": {
    "shuffling": "12144660700617510957",
    "shufflingStateHash": "e98b2810531c6e807e5e89bb2537025bc7b4fb72e79ab675deb6fec2b8ec6d78",
    "data": [
     "438e2560cd958a173dc3b7adc3eb3c02a69ea5..."
    ],
    "version.ShufflingProcessing": 1,
    "hash": "2e3cecabbf59a47d55399649be89d1bcd1b56264dca32cb269f88b30cbe2c262"
   },
   "senderRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
   "subtype": 2,
   "amountNQT": "0",
   "sender": "11802441287912491934",
   "ecBlockHeight": 826902,
   "block": "15948287569415806210",
   "blockTimestamp": 80611249,
   "deadline": 1440,
   "transaction": "911593473664419853",
   "timestamp": 80611213,
   "height": 826917
  }


Shuffling Register

Registers a new participant to an existing shuffling. The shuffling must be in stage registration.

Request: Refer to Create Transaction Request for common parameters.

  • requestType is shufflingRegister
  • chain the chain related to the operation
  • shufflingFullHash is the full hash of the shuffling to register

Response Refer to Create Transaction Response.

Shuffling Register Example

http://localhost:27876/nxt?
 requestType=shufflingRegister&
 chain=2&
 shufflingFullHash=2d10f4e18f808aa8d0de06d5cddcd77828eb6e7548f62e48de83f58fdf0629d5&
 secretPhrase=IWontTellYou&
 feeNQT=100000000&
 deadline=1440
{
 "senderPublicKey": "6351706ab8ea5c94243e6b0bff3be05f2e1b9accc83004af3e655a8fbc104735",
 "signature": "23bb57aee566ba2c27fe8c83ea4e88821f9f23c820371a39b5d49dbd327...",
 "feeNQT": "100000000",
 "transactionIndex": 1,
 "requestProcessingTime": 3,
 "type": 7,
 "confirmations": 9924,
 "fullHash": "467e60696e598fe5c075446897ff636886bf7c0e9...",
 "version": 1,
 "phased": false,
 "ecBlockId": "4928509411801335816",
 "signatureHash": "b0e945000b9010814f5399d9006a21939089db5616...",
 "attachment": {
  "version.ShufflingRegistration": 1,
  "shufflingFullHash": "2d10f4e18f808aa8d0de06d5cddcd77828eb6e7..."
 },
 "senderRS": "ARDOR-D78H-8QHV-DEP2-5TAGA",
 "subtype": 1,
 "amountNQT": "0",
 "sender": "3763066681748198607",
 "ecBlockHeight": 817256,
 "block": "12642960475175742738",
 "blockTimestamp": 80031214,
 "deadline": 1440,
 "transaction": "16541538287104327238",
 "timestamp": 80031109,
 "height": 817265
}


Shuffling Verify

Sends a verification that an account's recipient public key is found within a shuffling.

Request: Refer to Create Transaction Request for common parameters.

  • requestType is shufflingVerify
  • chain the chain related to the operation
  • shuffling is the shuffling ID
  • shufflingStateHash is the current state hash of the shuffle

Response Refer to Create Transaction Response.

Shuffling Verify Example

http://localhost:27876/nxt?
 requestType=shufflingVerify&
 chain=2&
 shuffling=12144660700617510957&
 shufflingStateHash=90832470918374087102938470198234&
 recipientSecretPhrase=IWontTellYou&
 secretPhrase=IWontTellYou&
 feeNQT=100000000&
 deadline=1440
{
 "senderPublicKey": "f050f86b050c1de933d8094c9a05a346b2319912313a04b822bba15d6d256505",
 "signature": "a23968d9cf5313e745fa4b50102f7f6d664c1b574d8ff2fbcc721cb967a42a0225f1e...",
 "feeNQT": "100000000",
 "transactionIndex": 3,
 "requestProcessingTime": 3,
 "type": 7,
 "confirmations": 287,
 "fullHash": "296a76a1601da4a06c6524df5791553b5d305cb266f71afb6e9d7aa0149c04ff",
 "version": 1,
 "phased": false,
 "ecBlockId": "3207126357685519085",
 "signatureHash": "7b69ba9ffb10d725b693abb53157f274cbf42f2435e919821cda67f889f44e96",
 "attachment": {
  "version.ShufflingVerification": 1,
  "shuffling": "12144660700617510957",
  "shufflingStateHash": "fbc8b99c99c4e09203f1237771e38c7ee484c18a72572c3d1adae04da858fe92"
 },
 "senderRS": "ARDOR-KHDF-9KSG-2UCY-BUQZ4",
 "subtype": 4,
 "amountNQT": "0",
 "sender": "10484056935692287341",
 "ecBlockHeight": 826914,
 "block": "1046003298185760668",
 "blockTimestamp": 80612146,
 "deadline": 1440,
 "transaction": "11575409243111975465",
 "timestamp": 80611663,
 "height": 826925
}


Start Shuffler

Starts a automated Shuffler. Once started, the Shuffler monitors the blockchain state for transactions relevant to the specified shuffle, and automatically submits the required transactions on behalf of the user, performing shuffle processing, verification, or cancellation as needed.

Request:

  • requestType is startShuffler
  • chain the chain related to the operation
  • secretPhrase is the secret phrase of the account entering the shuffling
  • shufflingFullHash the full hash of the shuffling
  • recipientSecretPhrase the secret phrase of the recipient account (optional if recipientPublicKey is present)
  • recipientPublicKey the public key of the recipient account (optional if recipientSecretPhrase is present)
  • feeRateNQTPerFXT is the conversion rate between 1 child chain NQT to 1 whole ARDR

Response

  • shuffling (S) is the shuffling ID
  • shufflingFullHash (S) is the full hash of the shuffling
  • account (S) is the account ID
  • accountRS (S) is the account Reed Solomong address
  • recipient (S) is the account ID of the recipient account
  • recipientRS (S) is the account Reed Solomon address of the recipient account
  • requestProcessingTime (N) is the API request processing time (in millisec)

Start Shuffler Example

http://localhost:27876/nxt?
 requestType=startShuffler&
 chain=2&
 shufflingFullHash=2d10f4e18f808aa8d0de06d5cddcd77828eb6e7548f62e48de83f58fdf0629d5&
 secretPhrase=IWontTellYou&
 recipientSecretPhrase=IWontTellYou
{
 "shuffling": "12144660700617510957",
 "shufflingFullHash": "2d10f4e18f808aa8d0de06d5cddcd77828eb6e7548f62e48de83f58fdf0629d5",
 "account": "11802441287912491934",
 "accountRS": "ARDOR-V4WY-U928-GRN8-CKPL9",
 "recipient": "3763066681748198607",
 "recipientRS": "ARDOR-D78H-8QHV-DEP2-5TAGA",
 "requestProcessingTime": 7
}


Stop Shuffler

Stops a previously started automated Shuffler.

Request:

  • requestType is stopShuffler
  • account is the account ID (optional if shufflingFullHash or secretPhrase or adminPassword is provided)
  • shufflingFullHash the full hash of the shuffling (optional if account or adminPassword is provided)
  • secretPhrase is the secret phrase of the account entering the shuffling (optional if adminPassword is provided)
  • adminPassword is the admin password (optional if secretPhrase is provided)

Response

  • stoppedShuffler (B) means the specified shuffler was stopped
  • stoppedAllShufflers (B) means all shufflers on the node was stopped (only if adminPassword is provided in request)
  • requestProcessingTime (N) is the API request processing time (in millisec)

Stop Shuffler Example

http://localhost:27876/nxt?
 requestType=stopShuffler&
 shufflingFullHash=2d10f4e18f808aa8d0de06d5cddcd77828eb6e7548f62e48de83f58fdf0629d5&
 secretPhrase=IWontTellYou
{
 "stoppedShuffler": true,
 "requestProcessingTime": 7
}


Start StandbyShuffler

Starts an StandbyShuffler.

An StandbyShuffler will monitor the blockchain for new shufflings. When a new shuffling meets a given criteria the StandbyShuffler will start a shuffler targeting an unused recipient account from a configured pool.

Starting an StandbyShuffler does not join existing shufflings even if they meet the StandbyShuffler criteria. You should check existing shufflings when creating an StandbyShuffler if you want to join them.

The source account is identified by the secretPhrase. The secret phrase must be specified as the StandbyShuffler needs it to create the StartShuffler transaction.

A shuffling is matched against a series of parameters: chain, holdingType, holding, minAmount, maxAmount and minParticipants.

The bundling fee rate is required. Since StandbyShufflers will be running unattended and it can't be predicted what the feeRate should be at the time shuffling is triggered, users are advised to also configure a PersonalBundler, set the StandbyShuffler to submit transactions with zero fees and bundle them themselves.

You need to specify a pool of unused public keys to be used as recipients for the shufflings. It is allowed to specify keys of used accounts but they will be filtered and removed from the pool. The recipientPublicKeys is a string parameter that accepts multiple values or multiple lines in the same value.

You should generate the new accounts using the account wizard and write down the passphrases in a secure storage. Keep in mind that the secret passphrases are never submitted to the remote node, only the derived public keys are.

There can only be one StandbyShuffler per combination of source account, chain, holdingType and holdingId. If you try to start an StandbyShuffler with those same parameters the response will have started to false and no StandbyShuffler will be returned.

In order to use this feature you need to configure the corresponding add-on:

nxt.addOns=nxt.addons.StandbyShuffling

Request:

  • requestType is startStandbyShuffler
  • chain is the child chain related to the operation (eg: 2 for Ignis)
  • secretPhrase is the secret passphrase of the source account that we want to shuffle
  • holdingType is the holding type
  • holding is the holding id (the chain id if holdingType is 0)
  • minAmount is the minimum shuffling amount of the holding required to join a shuffling (optional)
  • maxAmount is the maximum shuffling amount of the holding required to join a shuffling (optional)
  • minParticipants is the minimum number of participants of the shuffling (optional)
  • feeRateNQTPerFXT is the conversion rate between 1 child chain NQT to 1 whole ARDR
  • recipientPublicKeys is an unused public key for a recipient account (multiple values allowed, multiple lines allowed)

Response

  • started (B) is true to indicate that a new StandbyShuffler has been configured
  • standbyShuffling (O) an object representing the new configured StandbyShuffler
    • standbyShuffling (O) an object representing the new configured StandbyShuffler
    • account (S) is the source account ID
    • accountRS (S) is the source account Reed Solomon address
    • chain (N) is the child chain
    • holdingType (N) is the holding type
    • holding (S) is the holding id
    • minAmount (S) is the minimum shuffling amount of the configured holding required to join a shuffling (0 if not configured)
    • maxAmount (S) is the maximum shuffling amount of the configured holding required to join a shuffling (0 if not configured)
    • minParticipants (N) is the minimum number of participants of the shuffling
    • feeRateNQTPerFXT (N) is the conversion rate between 1 child chain NQT to 1 whole ARDR
    • recipientPublicKeys (A) is an array of configured public keys for recipient accounts

Start StandbyShuffler Example

http://localhost:27876/nxt?
 requestType=startStandbyShuffler&
 chain=2&
 secretPhrase=IWontTellYou&
 holdingType=0&
 holding=2&
 feeRateNQTPerFxt=0&
 recipientPublicKeys=112e0c5748b5ea610a44a09b1ad0d2bddc945a6ef5edc7551b80576249ba585b&
 recipientPublicKeys=23bd93d72126d9fdd9a5f41998129be475a4cd3c710f6356dee82d2ecb49cc05
{
    "started": true,
    "requestProcessingTime": 481,
    "standbyShuffling": {
        "holding": "2",
        "minAmount": "0",
        "chain": 2,
        "recipientPublicKeys": [
            "23bd93d72126d9fdd9a5f41998129be475a4cd3c710f6356dee82d2ecb49cc05"
        ],
        "holdingType": 0,
        "accountRS": "ARDOR-XK4R-7VJU-6EQG-7R335",
        "maxAmount": "0",
        "account": "5873880488492319831",
        "minParticipants": 3,
        "feeRateNQTPerFXT": 0
    }
}

Stop StandbyShuffler

Stops an StandbyShuffler.

When the secret phrase is specified, a single StandbyShuffler will be stopped. The StandbyShuffler is identified by the secret phrase, holding and account. The administrator password is not required and will be ignored.

When the administrator password is specified, a single StandbyShuffler can be stopped by specifying the source account and holding properties. If no account is specified, all StandbyShufflers will be stopped.

The holding type and account property name must be specified when the secret phrase or account is specified. Holding type codes are listed in Get Constants. In addition, the holding identifier must be specified when the holding type is ASSET or CURRENCY.

Request

  • requestType is stopStandbyShuffler
  • chain is the child chain related to the operation (eg: 2 for Ignis)
  • account is the source account ID (optional if adminPassword is provided)
  • secretPhrase is the secret passphrase of the source account (optional if adminPassword is provided)
  • holdingType is the holding type (optional)
  • holding is the holding id (optional, the chain id if holdingType is 0)
  • adminPassword is the admin password (optional if secretPhrase is provided)

Response

  • stopped (N) is the number of the StandbyShufflers that have been stopped

Stop StandbyShuffler Example

http://localhost:27876/nxt?
 requestType=stopStandbyShuffler&
 chain=2&
 secretPhrase=IWontTellYou&
 holdingType=0&
 holding=2
{
    "stopped": 1,
    "requestProcessingTime": 1
}


Get StandbyShufflers

Gets a list of currently running StandbyShufflers.

The StandbyShufflers for a single source account will be returned when the secret phrase is specified. A single StandbyShuffler will be returned if the holding is specified. Otherwise, all StandbyShufflers for the source account will be returned. The administrator password is not required and will be ignored.

When the administrator password is specified, all StandbyShufflers will be returned unless the source account is also specified. A single StandbyShuffler will be returned if the holding is specified. Otherwise, all StandbyShufflers for the source account will be returned.

Holding type codes are listed in Get Constants. In addition, the holding identifier must be specified when the holding type is ASSET or CURRENCY.

Request

  • requestType is getStandbyShufflers
  • chain is to filter by the child chain (optional)
  • account is the source account ID (optional if adminPassword is provided)
  • secretPhrase is the secret passphrase of the source account (optional if adminPassword is provided)
  • holdingType is the holding type (optional)
  • holding is the holding id (optional)
  • adminPassword is the admin password (optional if secretPhrase is provided)
  • includeHoldingInfo is true to include holding info (optional)

Response

  • standbyShufflings (A) is an array containg all currently running StandbyShufflers given the request parameters
    • account (S) is the source account ID
    • accountRS (S) is the source account Reed Solomon address
    • chain (N) is the child chain
    • holdingType (N) is the holding type
    • holding (S) is the holding id (if holdingType is not 0)
    • minAmount (S) is the minimum shuffling amount of the configured holding required to join a shuffling
    • maxAmount (S) is the maximum shuffling amount of the configured holding required to join a shuffling
    • minParticipants (N) is the minimum number of participants of the shuffling
    • feeRateNQTPerFXT (S) is the conversion rate between 1 child chain NQT to 1 whole ARDR
    • recipientPublicKeys (A) is an array of configured public keys for recipient accounts

Get StandbyShufflers Example

http://localhost:27876/nxt?
 requestType=getStandbyShufflers&
 chain=2&
 secretPhrase=IWontTellYou&
 holdingType=0&
 holding=2
{
    "standbyShufflings": [
        {
            "holding": "2",
            "minAmount": "0",
            "chain": 2,
            "recipientPublicKeys": [
                "23bd93d72126d9fdd9a5f41998129be475a4cd3c710f6356dee82d2ecb49cc05"
            ],
            "holdingType": 0,
            "accountRS": "ARDOR-XK4R-7VJU-6EQG-7R335",
            "maxAmount": "0",
            "account": "5873880488492319831",
            "minParticipants": 3,
            "feeRateNQTPerFXT": 0
        }
    ],
    "requestProcessingTime": 4
}