Skip to content

Commit 0479876

Browse files
authored
Add new network support (#2321)
* Add Hemi network. Signed-off-by: bgravenorst <[email protected]> * Fix typos. Signed-off-by: bgravenorst <[email protected]> * Add Hemi support. Signed-off-by: bgravenorst <[email protected]> * Remove key. Signed-off-by: bgravenorst <[email protected]> * Remove op partials. Signed-off-by: bgravenorst <[email protected]> * Remove WSS. Signed-off-by: bgravenorst <[email protected]> * Add the WSS support. Signed-off-by: bgravenorst <[email protected]> * Address reviewer feedback. Signed-off-by: bgravenorst <[email protected]> * Update pricing. Signed-off-by: bgravenorst <[email protected]> * Delete methods. Signed-off-by: bgravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]>
1 parent cd06ebc commit 0479876

File tree

81 files changed

+2628
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2628
-0
lines changed

services/get-started/endpoints.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ Ensure that you replace `<YOUR-API-KEY>` with an API key from your [MetaMask Dev
7575
| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://sepolia.infura.io/v3/<YOUR-API-KEY>` |
7676
| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://sepolia.infura.io/ws/v3/<YOUR-API-KEY>` |
7777

78+
## Hemi
79+
80+
| Network | Description | URL |
81+
|---------|---------------------|------------------------------------------------------|
82+
| Mainnet | JSON-RPC over HTTPS | `https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY>` |
83+
| Testnet | JSON-RPC over HTTPS | `https://hemi-testnet.infura.io/v3/<YOUR-API-KEY>` |
84+
7885
## IPFS
7986

8087
:::caution Restricted access
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';
2+
3+
Returns a list of the last "bad blocks" that the client has seen on the network. Bad blocks are blocks that were rejected by the client due to validation errors. <CreditCost network="evm_debug" method="debug_getBadBlocks" />
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace `<YOUR-API-KEY>` with an API key from your [MetaMask Developer dashboard](https://developer.metamask.io/).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
None
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```bash
2+
curl https://hemi-testnet.infura.io/v3/<YOUR-API-KEY> \
3+
-X POST \
4+
-H "Content-Type: application/json" \
5+
-d '{
6+
"jsonrpc": "2.0",
7+
"method": "debug_getBadBlocks",
8+
"params": [],
9+
"id": 1
10+
}'
11+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
```json
2+
{
3+
"id": 1,
4+
"jsonrpc": "2.0",
5+
"result": [
6+
{
7+
"author": "0x0000000000000000000000000000000000000000",
8+
"difficulty": "0x0",
9+
"extraData": "0x",
10+
"gasLimit": "0x0",
11+
"gasUsed": "0x0",
12+
"hash": "0x27bfb37e507ce90da141307204b1c6ba24194380613590ac50ca4b1d7198ff65",
13+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
14+
"miner": "0x0000000000000000000000000000000000000000",
15+
"number": "0x0",
16+
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
17+
"reason": "Invalid block",
18+
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
19+
"rlp": "0x010203",
20+
"sealFields": [],
21+
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
22+
"size": "0x3",
23+
"stateRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
24+
"timestamp": "0x0",
25+
"totalDifficulty": null,
26+
"transactions": [],
27+
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
28+
"uncles": []
29+
}
30+
]
31+
}
32+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
An array of bad block objects. Each bad block object contains:
2+
3+
- `baseFeePerGas`: The integer representation of the base fee per gas for this block encoded as hexadecimal.
4+
- `difficulty`: The integer representation of the difficulty for this block encoded as hexadecimal.
5+
- `extraData`: The extra data field of this block.
6+
- `gasLimit`: The maximum gas allowed in this block encoded as hexadecimal.
7+
- `gasUsed`: The total used gas by all transactions in this block encoded as hexadecimal.
8+
- `hash`: The hash of the block.
9+
- `logsBloom`: The bloom filter for the logs of the block. Null if pending.
10+
- `miner`: The address of the beneficiary to whom the mining rewards were given.
11+
- `mixHash`: A 256-bit hash encoded as hexadecimal.
12+
- `nonce`: The hash of the generated proof-of-work. `Null if pending.
13+
- `number`: The block number of the requested block encoded as hexadecimal. Null if pending.
14+
- `parentHash`: The hash of the parent block.
15+
- `reason`: The reason why this block was considered "bad".
16+
- `receiptsRoot`: The root of the receipts trie of the block.
17+
- `rlp`: The RLP encoded header.
18+
- `sealFields`: Array of seal fields.
19+
- `sha3Uncles`: The SHA3 of the uncles' data in the block.
20+
- `size`: The size of this block in bytes as an Integer value encoded as hexadecimal.
21+
- `stateRoot`: The root of the final state trie of the block.
22+
- `timestamp`: The Unix timestamp for when the block was collated.
23+
- `totalDifficulty`: The total difficulty of the chain until this block.
24+
- `transactions`: An array of transaction objects with the following fields:
25+
- `blockHash`: The hash of the block where this log was in. Null when it's a pending log.
26+
- `blockNumber`: The block number where this log was in. Null when it's a pending log.
27+
- `from`: The address of the sender.
28+
- `gas`: The gas provided by the sender, encoded as hexadecimal.
29+
- `gasPrice`: The gas price provided by the sender in wei, encoded as hexadecimal.
30+
- `maxFeePerGas`: The maximum fee per gas set in the transaction.
31+
- `maxPriorityFeePerGas`: The maximum priority gas fee set in the transaction.
32+
- `hash`: The hash of the transaction.
33+
- `input`: The data sent along with the transaction.
34+
- `nonce`: The number of transactions made by the sender before this one encoded as hexadecimal.
35+
- `to`: The address of the receiver. Null when it's a contract creation transaction.
36+
- `transactionIndex`: The integer of the transaction's index position that the log was created from. Null when it's a pending log.
37+
- `value`: The value transferred in wei encoded as hexadecimal.
38+
- `type`: The transaction type.
39+
- `accessList`: A list of addresses and storage keys that the transaction plans to access.
40+
- `chainId`: The chain id of the transaction, if any.
41+
- `v`: The standardized V field of the signature.
42+
- `r`: The R field of the signature.
43+
- `s`: The S field of the signature.
44+
- `transactionsRoot`: The root of the transaction trie of the block.
45+
- `uncles`: An array of uncle hashes.

services/reference/hemi/index.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
description: Hemi network documentation.
3+
---
4+
5+
import CardList from '@site/src/components/CardList'
6+
7+
# Hemi
8+
9+
:::note Decentralized Infrastructure Network (DIN)
10+
11+
Hemi is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
12+
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).
13+
14+
:::
15+
16+
Hemi network brings together the security of Bitcoin and the programmability of Ethereum. Built using Bitcoin as a security layer, Hemi enables developers to build decentralized applications that benefit from Bitcoin's security while leveraging Ethereum's rich ecosystem and tooling.
17+
18+
Smart contracts can directly access Bitcoin state and verify Bitcoin transactions, all while using standard Ethereum development frameworks.
19+
20+
:::info See also
21+
22+
- The [official Hemi documentation](https://docs.hemi.xyz/) for more information.
23+
- Build Bitcoin-aware dapps on the EVM using the
24+
[Hemi Bitcoin Kit (hBK)](https://docs.hemi.xyz/building-bitcoin-apps/hemi-bitcoin-kit-hbk).
25+
26+
:::
27+
28+
Select an option below to get started with the Hemi network.
29+
30+
<CardList
31+
items={[
32+
{
33+
href: "./quickstart",
34+
title: "Quickstart",
35+
description: "Learn how to quickly connect and make calls to the Hemi network."
36+
},
37+
{
38+
href: "./json-rpc-methods",
39+
title: "JSON-RPC APIs",
40+
description: "View the APIs available for communicating with the Hemi network."
41+
},
42+
{
43+
href: "../../../developer-tools/dashboard/get-started/create-api/",
44+
title: "Create an API key",
45+
description: "Learn how to create and secure an API key."
46+
}
47+
]}
48+
/>
49+
50+
## Partners and privacy policies
51+
52+
No personal information is sent as part of partner requests, only information necessary to fulfill your API request. This means that Infura's partner service provider can service your request, but not store the content of your request.
53+
54+
The following partners provide access to the Hemi network:
55+
<!-- markdown-link-check-disable -->
56+
- Infstones ([Privacy Policy](https://infstones.com/terms/privacy-notice))
57+
- Simply Staking ([Privacy Policy](https://simplystaking.com/privacy-policy))
58+
<!-- markdown-link-check-enable -->
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl" label="curl">
6+
7+
```bash
8+
curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
19+
```
20+
21+
</TabItem>
22+
</Tabs>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
<Tabs>
5+
<TabItem value="curl" label="curl">
6+
7+
```bash
8+
curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
9+
-X POST \
10+
-H "Content-Type: application/json" \
11+
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
19+
```
20+
21+
</TabItem>
22+
</Tabs>

0 commit comments

Comments
 (0)