diff --git a/API.md b/API.md index 8e79554..c1d7ac3 100644 --- a/API.md +++ b/API.md @@ -4,6 +4,25 @@ HOST: https://mainnet.blockchainos.org # Sebak Client API SEBAK, the next BOScoin network with ISAAC consensus protocol. +## SEBAK API supports [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). +- Request only accepted methods + - [**GET**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) + - [**HEAD**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) + - [**POST**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) +- Except automatic set up by user-agent ,request Header accepts only; + - [**Accept**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) + - [**Accept-Language**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) + - [**Content-Language**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Language) + - [**Content-type**](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type): you should check detail information below about content-type. + - [**DPR**](https://httpwg.org/http-extensions/client-hints.html#dpr) + - [**Save-data**](https://httpwg.org/http-extensions/client-hints.html#save-data) + - [**Viewport-width**](https://httpwg.org/http-extensions/client-hints.html#viewport-width) + - [**Width**](https://httpwg.org/http-extensions/client-hints.html#width) +- The only allowed values for the Content-Type header are: + - ```application/x-www-form-urlencoded``` + - ```multipart/form-data``` + - ```text/plain``` + <!-- partial(API_v1/accounts.md) --> <!-- partial(API_v1/models.md) --> <!-- partial(API_v1/transactions.md) --> diff --git a/API_v1/models.md b/API_v1/models.md index 6b249c4..d00f0ab 100644 --- a/API_v1/models.md +++ b/API_v1/models.md @@ -33,6 +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 + sequence_id: 0 + source: `GDIRF4UWPACXPPI4GW7CMTACTCNDIKJEHZK44RITZB4TD3YUM6CCVNGJ` + _links @@ -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 @@ -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 @@ -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) - @@ -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 @@ -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` @@ -190,5 +205,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 diff --git a/sebak/command.md b/sebak/command.md index 40999cc..9816348 100644 --- a/sebak/command.md +++ b/sebak/command.md @@ -1,4 +1,4 @@ -To install `sebak` command, please check the [installation guide](installation.md). +# SEBAK command # Options ```sh @@ -113,11 +113,8 @@ Flags: --log string set log file --log-format string log format, {terminal, json} (default "terminal") --log-level string log level, {crit, error, warn, info, debug} (default "info") - --log-rotate-max-count string max count of rotated logs (default "0") - --log-rotate-max-days string max days of rotated logs (default "0") - --log-rotate-max-size string max size of rotate log (default "100") - --log-rotate-uncompress disable compression of rotate log --network-id string network id + --ntp string ntp server for time sync (default "time.bora.net") --operations-in-ballot-limit string operations limit in a ballot (default "10000") --operations-limit string operations limit in a transaction (default "1000") --publish string endpoint url for other nodes @@ -132,6 +129,7 @@ Flags: --sync-pool-size string sync pool size (default "300") --sync-retry-interval string sync retry interval (default "10s") --threshold string threshold (default "67") + --time-sync-command string command for syncing local time --timeout-accept string timeout of the accept state (default "2s") --timeout-allconfirm string timeout of the allconfirm state (default "30s") --timeout-init string timeout of the init state (default "2s") @@ -192,10 +190,10 @@ Usage: Flags: --dry-run Print the transaction instead of sending it - --endpoint string endpoint to send the transaction to (https / memory address) - -h, --help help for unfreezeRequest - --network-id string network id - --verbose Print extra data (transaction sent) + —endpoint string endpoint to send the transaction to (https / memory address) + -h, —help help for unfreezeRequest + —network-id string network id + —verbose Print extra data (transaction sent) ``` ## `sebak version` @@ -203,5 +201,5 @@ Flags: This command for print current version. ```sh $ sebak version -0.1.X -``` +version= git= build= +``` \ No newline at end of file