Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update API doc based on https://github.com/bosnet/sebak/pull/863/ #23

Merged
merged 7 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions API_v1/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@
+ templated: true
+ self
+ href: `/api/v1/transactions`
+ block: `241`
+ block: `DVVRGpX56x8wjPfNp5nGsgpW2YuhPNHGAd1g6R9g8mBQ`
+ created: `2018-11-02T14:09:33.019606000+09:00`
+ fee: 10000
+ hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs`
+ operation_count: 1
+ operations:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In transaction, block: 241 should be changed
when I call the api in testnet block shows block hash

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank :)
👍

+ (array)
+ H
+ type : `payment` - operation type. ex. payment, create-account
+ B
+ target : `GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG`
+ amount : `100000` - amount in GON
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

txs, block-height, block-hash , total-txs, total-ops should be included

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you see the `payment' type.
https://mainnet.blockchainos.org/api/v1/transactions/EqGR1c3S3dMDD6ZDxusAxuLNJGErb1tzS56Q2QNYUUoW

you can see that it is different with inflation or collect-tx-fee.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I got it.

+ sequence_id: 0
+ source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`
+ _links
Expand Down Expand Up @@ -64,16 +71,16 @@
+ source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ - Source account
+ fee: 10000 - The fee paid by the source account for this transaction. Minimum is 10000 GON
+ sequence_id: 0 - The last sequence number of the source account
+ operations (array)
+ operations:(array)
+ (object):
+ H
+ H
+ type: `payment` - operation type. ex. payment, create-account
+ B
+ target: GDTEPFWEITKFHSUO44NQABY2XHRBBH2UBVGJ2ZJPDREIOL2F6RAEBJE4 - The funded account's public key
+ amount: 1000000000000- amount in GON

### Transaction Post
+ _links
### Transaction Post
+ _links
+ history
+ href: `/api/v1/transactions/7mRUj4cnUPaTrpByojPsT3xoRRdwG6Q9z2eLyCMapQm6/history`
+ self
Expand All @@ -83,17 +90,17 @@
+ source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ - Source account
+ fee: `10000` - The fee paid by the source account for this transaction. Minimum is 10000 GON
+ sequence_id: 0 - The last sequence number of the source account
+ operations (array)
+ operations:(array)
+ (object):
+ H
+ type:create-account - operation type. ex. payment, create-account
+ type: `create-account` - operation type. ex. payment, create-account
+ B
+ target: GDTEPFWEITKFHSUO44NQABY2XHRBBH2UBVGJ2ZJPDREIOL2F6RAEBJE4 - The funded account's public key
+ amount: 1000000000000- amount in GON
+ status: `submitted` - three categories of status; submitted, confirmed, rejected

### Transaction
+ _links
+ _links
+ account
+ href: `/api/v1/accounts/GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`
+ operations
Expand All @@ -106,6 +113,13 @@
+ fee: `10000` (string) - The fee paid by the source account
+ hash: `ghf6msRhE4jRf5DPib9UHD1msadvmZs9o53V9FQTb11` (string,required) - Hash of transaction. //TODO: link for the details
+ operation_count: 1 (number) - The number of operations in this transaction.
+ operations:(array)
+ (object):
+ H
+ type : `payment` - operation type. ex. payment, create-account
+ B
+ target : GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`
+ amount : 200
+ sequence_id: 0 (number) - the Sequence number of the source account.
+ source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ` (string) -

Expand All @@ -122,13 +136,14 @@
+ body
+ target: GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI - The funded account's public key
+ amount: `1000000000000` - amount in GON

+ confirmed: `2018-11-27T07:49:05.971799020Z`
+ hash: F6SEv2QhgwZwxUARbRacxyZaufzcTxdYDXJBpvf7pNAj-7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs - Hash of operation
+ index: 0
+ proposed_time: `2018-11-27T07:49:05.942922134Z`
+ source: GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ - Source account
+ target: GDEPYGGALPJ5HENXCNOQJPPDOQMA2YAXPERZ4XEAKVFFJJEVP4ZBK6QI - The funded account's public key
+ tx_hash: 7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs - Hash of transaction
+ type: create-account - operation type. ex. payment, create-account
+ type: `create-account` - operation type. ex. payment, create-account

+ _links
+ next
Expand Down Expand Up @@ -171,7 +186,7 @@
+ href: `/api/v1/blocks/AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q`
+ confirmed: 2018-11-18T18:44:47.900933000+09:00
+ hash: `AcFpZMr6EhxBuCw3xADUzepa395wmh3c5fo2cyxYCi1q`
+ height: 3
+ height: 3
+ prev_block_hash: `J8TQCCtsiLcRZpYtVN3ozCFByd24fjXe2BgodLkeXN7S`,
+ proposed_time: `2018-04-17T5:07:31.000000000Z`
+ proposer: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ`
Expand All @@ -190,5 +205,5 @@

### Problem NotFound
+ status: 400 (number)
+ title: `does not exists`
+ title: `does not exists`
+ type: `https://boscoin.io/sebak/error/128`
2 changes: 1 addition & 1 deletion API_v1/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Transactions API
## Transactions [/api/v1/transactions]


### Payment transaction [POST]
### Payment transaction [POST]

+ You can refer [this link to make transaction through sebakpy-util.](https://bosnet.github.io/how-to-make-transaction-post/)
+ Data Body consist of 3 parts, ; T, H, B
Expand Down