Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy authored and Deniallugo committed Aug 10, 2021
1 parent e6862e3 commit 32efc5b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
18 changes: 9 additions & 9 deletions infrastructure/api-docs/blueprint/groups/accounts.apib
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## api/v0.2/accounts/{accountIdOrAddress}/{stateType} [/accounts/{accountIdOrAddress}/{stateType}]

+ Parameters
+ accountIdOrAddress (required, string, `1`) ... Account Id or address in the zkSync network
+ stateType (required, "committed" | "finalized", `committed`) ... The type of account state which we want to get
+ accountIdOrAddress (required, string, `1`) ... Account id or address in the zkSync network
+ stateType (required, "committed" | "finalized", `committed`) ... The type of account state which you want to get

### Get account state [GET]
Returns committed or finalized account state
Expand All @@ -19,7 +19,7 @@ Returns committed or finalized account state
## api/v0.2/accounts/{accountIdOrAddress} [/accounts/{accountIdOrAddress}]

+ Parameters
+ accountIdOrAddress (required, string, `1`) ... Account Id or address in the zkSync network
+ accountIdOrAddress (required, string, `1`) ... Account id or address in the zkSync network

### Get account full state [GET]
Returns both committed and finalized account states
Expand All @@ -34,10 +34,10 @@ Returns both committed and finalized account states
## api/v0.2/accounts/{accountIdOrAddress}/transactions [/accounts/{accountIdOrAddress}/transactions{?from,limit,direction}]

+ Parameters
+ accountIdOrAddress (required, string, `1`) ... Account Id or address in the zkSync network
+ from (required, "latest" | string, `latest`) ... From which transaction to show
+ accountIdOrAddress (required, string, `1`) ... Account id or address in the zkSync network
+ from (required, "latest" | string, `latest`) ... A hash of transaction from which to show or `latest`
+ limit (required, number, `2`) ... The limit of transactions to be shown
+ direction (required, "newer" | "older", `older`) ... newer or older than the id of the `from`
+ direction (required, "newer" | "older", `older`) ... Newer or older than the id of the `from`


### Get account transactions [GET]
Expand All @@ -55,10 +55,10 @@ Returns the transactions for a particular account according to the query params
## api/v0.2/accounts/{accountIdOrAddress}/transactions/pending [/accounts/{accountIdOrAddress}/transactions/pending{?from,limit,direction}]

+ Parameters
+ accountIdOrAddress (required, string, `1`) ... Account Id or address in the zkSync network
+ from (required, "latest" | number, `100`) ... From which transaction to show
+ accountIdOrAddress (required, string, `1`) ... Account id or address in the zkSync network
+ from (required, "latest" | number, `100`) ... A hash of transaction from which to show or `latest`
+ limit (required, number, `2`) ... The limit of transactions to be shown
+ direction (required, "newer" | "older", `older`) ... newer or older than the id of the `from`
+ direction (required, "newer" | "older", `older`) ... Newer or older than the id of the `from`

### Get pending priority operations [GET]
Get account pending priority operations.
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/api-docs/blueprint/groups/batches.apib
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Submit batch of transactions.
## api/v0.2/transactions/batches/:txBatchHash [/transactions/batches/{txBatchHash}]

+ Parameters
+ txBatchHash (required, string, `{{txBatchHash}}`) ... the hash of the contents of the batch queried
+ txBatchHash (required, string, `{{txBatchHash}}`) ... The hash of the contents of the batch queried

### Get transactions batch status [GET]
Get transactions batch status (latest receipt)
Expand Down
12 changes: 6 additions & 6 deletions infrastructure/api-docs/blueprint/groups/blocks.apib
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## api/v0.2/blocks [/blocks{?from,limit,direction}]

+ Parameters
+ from (required, "latest" | number, `latest`) ... From which transaction to show
+ from (required, "latest" | number, `latest`) ... A number of the block from which to show or `latest`
+ limit (required, number, `2`) ... The limit of transactions to be shown
+ direction (required, "newer" | "older", `older`) ... newer or older than the id of the `from`
+ direction (required, "newer" | "older", `older`) ... Newer or older than the id of the `from`

### Get blocks range [GET]
Get blocks range
Expand All @@ -22,7 +22,7 @@ Get blocks range
## api/v0.2/blocks/:block_number [/blocks/{blockNumber}]

+ Parameters
+ `blockNumber`: `lastCommitted` (required, BlockNumber) - a number of the block or `lastCommitted` for getting the last committed block or `lastFinalized` for getting the last finalized block
+ `blockNumber`: `lastCommitted` (required, BlockNumber) - A number of the block, `lastCommitted` or `lastFinalized`

### Get block details [GET]
Get block details
Expand All @@ -37,10 +37,10 @@ Get block details
## api/v0.2/blocks/blockNumber/transactions [/blocks/{blockNumber}/transactions{?from,limit,direction}]

+ Parameters
+ `blockNumber`: `lastCommitted` (required, BlockNumber) - a number of the block or `lastCommitted` for getting the last committed block or `lastFinalized` for getting the last finalized block
+ from (required, "latest" | string, `latest`) ... From which transaction to show
+ `blockNumber`: `lastCommitted` (required, BlockNumber) - A number of the block, `lastCommitted` or `lastFinalized`
+ from (required, "latest" | string, `latest`) ... A hash of transaction from which to show or `latest`
+ limit (required, number, `2`) ... The limit of transactions to be shown
+ direction (required, "newer" | "older", `older`) ... newer or older than the id of the `from`
+ direction (required, "newer" | "older", `older`) ... Newer or older than the id of the `from`

### Get block transactions [GET]
Get block transactions
Expand Down
12 changes: 6 additions & 6 deletions infrastructure/api-docs/blueprint/groups/tokens.apib
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## api/v0.2/tokens [/tokens{?from,limit,direction}]

+ Parameters
+ from (required, "latest" | number, `latest`) ... From which token id to show
+ from (required, "latest" | number, `latest`) ... Token id of transaction from which to show or `latest`
+ limit (required, number, `2`) ... The limit of tokens to be returned
+ direction (required, "newer" | "older", `older`) ... newer or older than the id of the `from`
+ direction (required, "newer" | "older", `older`) ... Newer or older than the id of the `from`

### Get list of supported tokens [GET]
Returns the tokens that are currently supported by zkSync
Expand All @@ -22,7 +22,7 @@ Returns the tokens that are currently supported by zkSync
## api/v0.2/tokens/tokenIdOrAddress [/tokens/{tokenIdOrAddress}]

+ Parameters
+ tokenIdOrAddress (required, string, `2`) ... the id or address of the token in the zkSync network
+ tokenIdOrAddress (required, string, `2`) ... Id or address of the token in the zkSync network

### Get token info [GET]
Get token into
Expand All @@ -37,8 +37,8 @@ Get token into
## api/v0.2/tokens/:tokenIdOrAddress/priceIn/:currency [/tokens/{tokenIdOrAddress}/priceIn/{currency}]

+ Parameters
+ tokenIdOrAddress (required, string, `2`) ... the id or address of the token in the zkSync network
+ currency (required, `usd` | number, `usd`) ... either usd or any of the supported tokens in the zkSync network
+ tokenIdOrAddress (required, string, `2`) ... Id or address of the token in the zkSync network
+ currency (required, `usd` | number, `usd`) ... Either `usd` or id of any of the supported tokens in the zkSync network

### Get token price [GET]
Get token price relative to another token
Expand All @@ -53,7 +53,7 @@ Get token price relative to another token
## api/v0.2/tokens/nft/id [/tokens/nft/{id}]

+ Parameters
+ id (required, number, `{{nftId}}`) ... the id of the nft in the zkSync network
+ id (required, number, `{{nftId}}`) ... Id of the nft in the zkSync network

### Get nft info [GET]
Get nft into
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/api-docs/blueprint/groups/transactions.apib
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Submit single transaction
## api/v0.2/transactions/:txHash [/transactions/{txHash}]

+ Parameters
+ txHash (required, string, `{{txHash}}`) ... hash of the transaction in the zkSync network
+ txHash (required, string, `{{txHash}}`) ... A hash of the transaction in the zkSync network

### Get transaction receipt [GET]
Get transaction receipt
Expand All @@ -36,7 +36,7 @@ Get transaction receipt
## api/v0.2/transactions/:txHash/data [/transactions/{txHash}/data]

+ Parameters
+ txHash (required, string, `{{txHash}}`) ... hash of the transaction in the zkSync network
+ txHash (required, string, `{{txHash}}`) ... A hash of the transaction in the zkSync network

### Get transaction data [GET]
Get transaction data
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/api-docs/blueprint/types/batches.apib
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## SubmitBatchResponse (object)
+ batchHash: 0x6d6f7e07c85a770c6cb9f667c6b7d2d6335781f956a3a66503c87a56fd392e80 (string, required)
+ transactionHashes: [0xca1d902dc4aa0d401aded0f3c4c6e73c1aa68fbb661856af1a8874472f5043bb] (array[string], required)
+ transactionHashes: `0xca1d902dc4aa0d401aded0f3c4c6e73c1aa68fbb661856af1a8874472f5043bb` (array[string], required)

## BatchStatus (object)
+ batchHash: 0x6d6f7e07c85a770c6cb9f667c6b7d2d6335781f956a3a66503c87a56fd392e80 (string, required),
+ transactionHashes: [0xca1d902dc4aa0d401aded0f3c4c6e73c1aa68fbb661856af1a8874472f5043bb] (array[string], required)
+ transactionHashes: `0xca1d902dc4aa0d401aded0f3c4c6e73c1aa68fbb661856af1a8874472f5043bb` (array[string], required)
+ createdAt: `2020-10-12T09:05:03.123416742` (string, required),
+ batchStatus (object, required)
+ updatedAt: `2020-10-12T09:05:03.123416742` (string, required)
Expand Down

0 comments on commit 32efc5b

Please sign in to comment.