-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
130 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Blob API - BSC Develop | ||
--- | ||
|
||
|
||
## Blob API | ||
|
||
### eth_getBlobSidecarByTxHash | ||
**Parameters** | ||
|
||
**Hash** String (REQUIRED) | ||
|
||
* HEX String - the hash of the transaction | ||
|
||
**full_blob_flag** Boolean (OPTIONAL) | ||
|
||
* Default is true. If ture it returns the full blob info, if false only return first 32 bytes of blobs. | ||
|
||
``` | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecarByTxHash","params":["0x377d3615d2e76f4dcc0c9a1674d2f5487cba7644192e7a4a5af9fe5f08b60a63"],"id":1}' | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecarByTxHash","params":["0x377d3615d2e76f4dcc0c9a1674d2f5487cba7644192e7a4a5af9fe5f08b60a63", false],"id":1}' | ||
``` | ||
|
||
### eth_getBlobSidecars | ||
**Parameters** | ||
|
||
**BlockNumber** QUANTITY|TAG | ||
|
||
* HEX String - an integer block number | ||
* HEX String - the hash of the block | ||
* String "earliest" for the earliest/genesis block | ||
* String "latest" - for the latest mined block | ||
* String "safe" - for the latest justified head block | ||
* String "**finalized**" - for the latest finalized block | ||
|
||
**full_blob_flag** Boolean (OPTIONAL) | ||
|
||
* Default is true. If ture it returns the full blob info, if false only return first 32 bytes of blobs. | ||
|
||
``` | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecars","params":["latest"],"id":1}' | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlobSidecarByTxHash","params":["0xc5043f", false],"id":1}' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: Bsc API - BSC Develop | ||
--- | ||
|
||
|
||
## Bsc API | ||
|
||
### eth_health | ||
|
||
* a health check endpoint to detect whether the RPC func of a node is ok. Return true is ok, false is no health. | ||
|
||
|
||
``` | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_health","params":[],"id":1}' | ||
``` | ||
|
||
### eth_getTransactionsByBlockNumber | ||
|
||
* get all the transactions for the given block number. | ||
|
||
**Parameters** | ||
|
||
**BlockNumber** QUANTITY|TAG | ||
|
||
* HEX String - an integer block number | ||
* String "earliest" for the earliest/genesis block | ||
* String "latest" - for the latest mined block | ||
* String "safe" - for the latest justified head block | ||
* String "**finalized**" - for the latest finalized block | ||
|
||
``` | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionsByBlockNumber","params":["0x539492"],"id":1}' | ||
``` | ||
|
||
|
||
### eth_getTransactionDataAndReceipt | ||
|
||
* get the original transaction data and transaction receipt for the given transaction hash. | ||
|
||
**Parameters** | ||
|
||
**Hash** String (REQUIRED) | ||
|
||
* HEX String - the hash of the transaction | ||
|
||
``` | ||
curl -X POST "http://localhost:8545/" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionDataAndReceipt","params":["0x516a2ab1506b020e7f49d0d0ddbc471065624d1a603087262cebf4ca114ff588"],"id":1}' | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters