Skip to content

Abstract and standarize getTransaction() method #27

@phoenix-web3

Description

@phoenix-web3
  • I have read the Contributing file of the documentation.
  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I am willing to lend a hand to help implement this feature.

Feature Request

Feature Description

The enpoint "getTransaction" needs to be standardized for all coins. For that, I've created the following standard, subject to changes.

"transaction":{
   "fee":"xxx",
   "block":"xxx",
   "data":"xxx",
   "transfers":[
      {
         "fromAddress":"xxx",
         "toAddress":"xxx",
         "fee":"xxx",
         "amount":"xxx"
      },
      {
         "fromAddress":"xxx",
         "toAddress":"xxx",
         "fee":"xxx",
         "amount":"xxx"
      }
   ]
}

All of the objets above are self-explaining.

  • The unit of the fee, as in all the project, would be in the lowest unit of the currency (satoshi in btc or wei in ethereum).
  • Each of the transfers have its own fee, depending on the amount of the global fee provided by the sender.
  • The "data" object will contain the specific information of the currency (f.e.: fee per byte, size, gas price...)
  • "transaction" will be null when the specified txid does not exist.
  • "block" will be null when unconfirmed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions