Skip to content

@Emyrk Emyrk released this Nov 5, 2019

A new tag was needed to trigger the automatical build in the ci pipeline

This release marks an upgrade to the api set for interacting with pegnet transactions. The new apis can be found in the wiki here: https://github.com/pegnet/pegnetd/wiki/API. A large change in this update is how transactions are presented to the user. A transaction on pegnet can be either a:

  • burn from FCT -> pFCT
  • coinbase from mining rewards
  • transfer from an asset changing ownership (person A -> person B)
  • conversion from a change in asset, PEG -> pUSD

Every transaction is considered to be included inside of a batch. This is because Pegnet allows users to combine multiple transactions into a single entry. For consistency, if a hash is provided in the form of 64 hex characters, it can contain 0 or more transactions. It could be a factoid txid, a mining opr, or an entryhash. To provide a pegnet txid to a specific transaction, the index of the transaction in the batch must also be provided in the format of [TxIndex]-[Txhash].

E.g: 0-839809fd4f16200c97b1e53c6775c0efd55746db3c285461149adac3572694b3 is the first transaction associated with the given hash. If the batch contains more than 1 tx, you can use the prefix to report the txid of the single tx in the batch: 1-83980..., 2-83980.... There is no rule on the padding of the prefix. If a fixed length is needed for display purposes, leading 0s are accepted: 001-83980...

This change required a large update to the pegnet database, so a full resync is required. The pegnet node will automatically create a new database when using the latest codebase. No action is required to trigger this resync.

API Endpoints added:

  • get-transactions : queries for all transactions related to a hash, address, or height
  • get-transaction-status : Details if a transaction is executed, pending, or rejected.

API Endpoints changed:

  • get-transaction : The params for this have changed
  • get-transaction-entry : This api endpoint was dropped

CLI Commands Updqated/Added:

  • `pegnetd get txs <entryhash | factoid txid | entryhash>
  • pegnetd get tx <pegnet txid>
  • pegnetd burn <FA-source> <FCT amount> : The FCT -> pFCT command has been added to pegnetd
Assets 5
You can’t perform that action at this time.