From 1aaf17542062324574a67406df0fc8a65c84b27d Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Fri, 21 Dec 2018 16:40:51 +0900 Subject: [PATCH 1/7] update API doc based on https://github.com/bosnet/sebak/pull/863/ --- API_v1/models.md | 28 ++++++++++++++++++++++------ API_v1/transactions.md | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/API_v1/models.md b/API_v1/models.md index 6b249c4..4935e16 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,6 +33,13 @@ + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs` + operation_count: 1 + + operation (array) + + (object) : + + H + + type : `payment` - operation type. ex. payment, create-account + + B + + target : `GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG` + + amount : `100000` - amount in GON + sequence_id: 0 + source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ` + _links @@ -66,14 +73,14 @@ + sequence_id: 0 - The last sequence number of the source account + 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 @@ -86,14 +93,14 @@ + 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 @@ -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) - @@ -125,8 +139,10 @@ + 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 @@ -190,5 +206,5 @@ ### Problem NotFound + status: 400 (number) -+ title: `does not exists` ++ title: `does not exists` + type: `https://boscoin.io/sebak/error/128` diff --git a/API_v1/transactions.md b/API_v1/transactions.md index 8f3e764..d8fd021 100644 --- a/API_v1/transactions.md +++ b/API_v1/transactions.md @@ -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 From 8d1d86a0071b29115aa477d85c363120c5ac89e6 Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Fri, 21 Dec 2018 17:06:06 +0900 Subject: [PATCH 2/7] fixed wrong api response --- API_v1/models.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/API_v1/models.md b/API_v1/models.md index 4935e16..0c0ab64 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,8 +33,9 @@ + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs` + operation_count: 1 - + operation (array) - + (object) : + + + operations:(array) + + (object): + H + type : `payment` - operation type. ex. payment, create-account + B @@ -71,7 +72,7 @@ + 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: `payment` - operation type. ex. payment, create-account @@ -90,7 +91,7 @@ + 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 @@ -144,7 +145,7 @@ + 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 @@ -187,7 +188,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` From 31711ad7e65d37a082fbc6ada22896701790087d Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Fri, 21 Dec 2018 17:13:07 +0900 Subject: [PATCH 3/7] remove array --- API_v1/models.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/API_v1/models.md b/API_v1/models.md index 0c0ab64..eaf6243 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,8 +33,7 @@ + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs` + operation_count: 1 - - + operations:(array) + + operations + (object): + H + type : `payment` - operation type. ex. payment, create-account From 9c60cf178bdbe2c24b4709f11a744acb0a435608 Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Fri, 21 Dec 2018 17:20:40 +0900 Subject: [PATCH 4/7] fix json array --- API_v1/models.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/API_v1/models.md b/API_v1/models.md index eaf6243..d2067fe 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,13 +33,12 @@ + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs` + operation_count: 1 - + operations - + (object): - + H - + type : `payment` - operation type. ex. payment, create-account - + B - + target : `GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG` - + amount : `100000` - amount in GON + + operations (array) + + H + + type : `payment` - operation type. ex. payment, create-account + + B + + target : `GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG` + + amount : `100000` - amount in GON + sequence_id: 0 + source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ` + _links @@ -136,7 +135,6 @@ + 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 From 704c49854d6df1fcd48db792c51ef7d2c3a47956 Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Fri, 21 Dec 2018 17:23:27 +0900 Subject: [PATCH 5/7] fix array format --- API_v1/models.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/API_v1/models.md b/API_v1/models.md index d2067fe..e5002fe 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,12 +33,13 @@ + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs` + operation_count: 1 - + operations (array) - + H - + type : `payment` - operation type. ex. payment, create-account - + B - + target : `GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG` - + amount : `100000` - amount in GON + + operations: + + (array) + + H + + type : `payment` - operation type. ex. payment, create-account + + B + + target : `GCIKBR6QXYF6VLLTXC7EHKDGAPAOLSRALZTWTLZ2SANBYWMWT6AURQGG` + + amount : `100000` - amount in GON + sequence_id: 0 + source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ` + _links From 5a6196de863483bf5c811745ee829d8416ed807f Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Thu, 27 Dec 2018 15:18:43 +0900 Subject: [PATCH 6/7] change wrong phrase --- API_v1/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_v1/models.md b/API_v1/models.md index e5002fe..d00f0ab 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,7 +33,7 @@ + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs` + operation_count: 1 - + operations: + + operations: + (array) + H + type : `payment` - operation type. ex. payment, create-account From 746a7f32085cc6089a018f11495281b975fea183 Mon Sep 17 00:00:00 2001 From: cmcm2222 Date: Thu, 31 Jan 2019 17:35:23 +0900 Subject: [PATCH 7/7] change missing contents about transacionts block --- API_v1/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_v1/models.md b/API_v1/models.md index d00f0ab..430bfd8 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -28,7 +28,7 @@ + templated: true + self + href: `/api/v1/transactions` - + block: `241` + + block: `DVVRGpX56x8wjPfNp5nGsgpW2YuhPNHGAd1g6R9g8mBQ` + created: `2018-11-02T14:09:33.019606000+09:00` + fee: 10000 + hash: `7nLuyg8radTExzBM2WhG37AwohBwEySBw4vj2xdtdjAs`