Skip to content

Create Phasing Poll

Create a phased transaction with conditional deferred execution based on the result of a vote, on a list of linked transactions or on the revelation of a secret; or simply with unconditional deferred execution. POST only.

Request: Refer to Create Transaction Request for common parameters.

  • requestType is any type from the CreateTransaction list which is phasing-safe, indicated with italics such as Send Money
  • phased is true to create a phased transaction (optional but required for all of the following parameters, which are all optional for unphased transactions)
  • phasingFinishHeight is the block height at which the poll will finish; the transaction will be executed at this block height only if all conditions (if any) have been met, otherwise the transaction will never be executed
  • phasingVotingModel is an integer code for the method of approval:
    • -1 for None
    • 0 for Vote By Account
    • 1 for Vote By Account Balance
    • 2 for Vote By Asset Balance
    • 3 for Vote By Currency Balance
    • 4 for By Linked Transactions
    • 5 for By Secret
  • phasingQuorum is the number of “votes” needed for transaction approval (required if phasingVotingModel >= 0, default 0):
    • 0 for voting model -1
    • the number of accounts for model 0
    • total TQT for model 1
    • total QNT for models 2 and 3
    • the number of transactions for model 4
    • 1 for model 5
  • phasingMinBalance is the minimum balance (in TQT or QNT) required for voting (optional, default 0)
  • phasingMinBalanceModel is (required if phasingMinBalance > 0, must match phasingVotingModel when phasingVotingModel = 1, 2 or 3):
    • 1 for XIN balance
    • 2 for an asset balance
    • 3 for a currency balance
  • phasingHolding is the asset or currency ID (required if phasingMinBalanceModel = 2 or 3)
  • phasingWhitelisted is the account ID of an account allowed to vote for the transaction; once used, only whitelisted accounts are allowed to vote (optional, may be used up to ten times per API request)
  • phasingLinkedFullHash is the full hash of a transaction that must be in the blockchain at the phasingFinishHeight; transactions already in the blockchain before the acceptance of the phased transaction can also be linked, as long as they are not more than 60 days old, or themselves phased transactions (required only for voting model 4, may be used up to ten times per API request)
  • phasingHashedSecret is the hash of a secret phrase (up to 100 bytes long) required for approval (required only for voting model 5)
  • phasingHashedSecretAlgorithm is the hash function used: 2 for SHA256, 6 for RIPEMD160 and 62 for SHA256 followed by RIPEMD160, according to Get Constants (required for a phasingHashedSecret)

Note: When a balance affects the poll result, the result depends only on the balance (including pending outgoing phased transfers) computed just prior to the finish height.

Response: Refer to Create Transaction Response.