Skip to content

Commit 1283c9e

Browse files
mummyhaphegitbook-bot
authored andcommitted
GITBOOK-172: No subject
1 parent 43784b4 commit 1283c9e

19 files changed

Lines changed: 65 additions & 28 deletions

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* [Generate An API Key](basic-tutorials/api-key/generate-an-api-key.md)
1616
* [Statistic Page](basic-tutorials/api-key/statistic-page.md)
1717
* [Customize Endpoint Advanced Features](basic-tutorials/api-key/customize-endpoint-advanced-features.md)
18-
* [Best Practices](basic-tutorials/api-key/best-practices.md)
1918
* [Wallet Set Up](basic-tutorials/wallet-set-up/README.md)
2019
* [MetaMask Tutorial](basic-tutorials/wallet-set-up/metamask-tutorial.md)
2120
* [Manually Add Network in MetaMask](basic-tutorials/wallet-set-up/manually-add-network-in-metamask.md)
@@ -28,6 +27,7 @@
2827
* [Email notifications setting](basic-tutorials/account-management/email-notifications-setting.md)
2928
* [Team Management](basic-tutorials/team-management/README.md)
3029
* [Build your own Team](basic-tutorials/team-management/build-your-own-team.md)
30+
* [Best Practices](basic-tutorials/best-practices.md)
3131

3232
## Build
3333

basic-tutorials/api-key/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ icon: key
1313
[statistic-page.md](statistic-page.md)
1414
{% endcontent-ref %}
1515

16-
{% content-ref url="best-practices.md" %}
17-
[best-practices.md](best-practices.md)
16+
{% content-ref url="../best-practices.md" %}
17+
[best-practices.md](../best-practices.md)
1818
{% endcontent-ref %}

basic-tutorials/api-key/customize-endpoint-advanced-features.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you require access to data from earlier blocks, you can utilize the **Archive
2424

2525
Enabling Archive mode will route all requests sent to this API key to the archive nodes of the blockchain network. It's important to note that there is a **30% increase in RU consumption**, since running an archive node requires significant storage capacity. 
2626

27-
In order to optimize efficiency, we recommend activating Archive mode only when necessary, or generate an individual API key to send the archive requests. Check [best-practices.md](best-practices.md "mention") to more efficiently use the feature. Additionally, processing times may be longer due to the substantial amount of data involved. Check [here ](../../build/supported-networks-and-advanced-features.md)for the full list of chains that the Archive mode is supported.
27+
In order to optimize efficiency, we recommend activating Archive mode only when necessary, or generate an individual API key to send the archive requests. Check [best-practices.md](../best-practices.md "mention") to more efficiently use the feature. Additionally, processing times may be longer due to the substantial amount of data involved. Check [here ](../../build/supported-networks-and-advanced-features.md)for the full list of chains that the Archive mode is supported.
2828

2929
By default, the Archive mode is set to off. To enable it, simply click on the Archive mode symbol corresponding to the endpoint in the API Key list.
3030

@@ -65,7 +65,6 @@ To use these functions, go to the Endpoint List of the user's dashboard, click t
6565

6666
<figure><img src="../../.gitbook/assets/advanced features 2.png" alt=""><figcaption></figcaption></figure>
6767

68-
You are able to switch it to Normal, MEV Protection or Global Cast. Only one of the three can be selected.\
69-
68+
You are able to switch it to Normal, MEV Protection or Global Cast. Only one of the three can be selected.<br>
7069

7170
<figure><img src="../../.gitbook/assets/advanced features 3.png" alt=""><figcaption></figcaption></figure>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,46 @@ A batch call is a JSON-RPC method that bundles multiple requests (like `eth_call
188188
In order to better serve different types of users and ensure the healthy and efficient operation of BlockPI RPC service network, we have implemented different restrictions on various types of endpoints. If a user triggers any of these restrictions, the system will return an error. The following table outlines these limitations:
189189

190190
<table><thead><tr><th>Endpoint Type</th><th width="388.3333333333333">Restrictions </th><th>Error Code</th></tr></thead><tbody><tr><td>Public</td><td>Not support WS/WSS</td><td>N/A</td></tr><tr><td>Public</td><td>Not support Debug_* and Trace_*</td><td>-32000</td></tr><tr><td>Public</td><td>Maximum request rate: 10 qps</td><td>429</td></tr><tr><td>Public</td><td>Maximum response body size: 3 MB</td><td>-32000</td></tr><tr><td>Public</td><td>Maximum block range: 1024</td><td>-32602</td></tr><tr><td>Public</td><td>Maximum batch size: 10</td><td>-32000</td></tr><tr><td>Private</td><td>Maximum block range: 5000 with address input</td><td>-32602</td></tr><tr><td>Private</td><td>Only support “callTracer” and ”prestateTracer” for debug method</td><td>-32000</td></tr><tr><td>Private HTTPS</td><td>Maximum batch size: 1000</td><td>-32000</td></tr><tr><td>Private WSS</td><td>Do not support batch call</td><td>-32000</td></tr><tr><td>All HTTPS</td><td>Do not support subscribe and filter rpc method</td><td>-32000</td></tr></tbody></table>
191+
192+
## Using gRPC in SUI SDK
193+
194+
The following is a sample code demonstrating how to use a **gRPC Endpoint** with the SUI SDK. Please note that we **do not support gRPC-Web**, only **native gRPC**.
195+
196+
```
197+
import * as grpc from '@grpc/grpc-js';
198+
import { SuiGrpcClient } from '@mysten/sui/grpc';
199+
//import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport';
200+
import { GrpcTransport } from '@protobuf-ts/grpc-transport';
201+
202+
const token = '...';
203+
204+
const metadata = new grpc.Metadata();
205+
metadata.add('x-token', token);
206+
207+
const metadataGenerator = (options, callback) => {
208+
callback(null, metadata);
209+
};
210+
211+
const callCredentials = grpc.credentials.createFromMetadataGenerator(metadataGenerator);
212+
213+
214+
var creds = grpc.credentials.combineChannelCredentials(
215+
grpc.credentials.createSsl(),
216+
callCredentials,
217+
);
218+
219+
const transport = new GrpcTransport({
220+
host: "sui.blockpi.network:443",
221+
channelCredentials: creds,
222+
});
223+
224+
225+
226+
const grpcClient = new SuiGrpcClient({
227+
network: 'mainnet',
228+
transport,
229+
});
230+
231+
// Get current epoch information
232+
const { response: epochInfo } = await grpcClient.ledgerService.getEpoch({});
233+
```

basic-tutorials/team-management/build-your-own-team.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ Once a Team is established, your account will automatically become a Team accoun
1414

1515
## Add member
1616

17-
Input BlockPI UID or an email address to invite your team member to join the team. \
18-
17+
Input BlockPI UID or an email address to invite your team member to join the team. <br>
1918

2019
<figure><img src="../../.gitbook/assets/Team 2.png" alt=""><figcaption></figcaption></figure>
2120

build/api-reference/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BlockPI Network is now fully available on more than **60 chains** including Main
1515

1616
BlockPI supports WebSocket and HTTPS. Note that the `eth_subscribe` method is only available for WebSocket.&#x20;
1717

18-
To safeguard the RPC node, every RPC provider sets a timeout for WebSocket connections to be disconnected periodically. In the case of BlockPI, the timeout is set to 30 minutes after each connection is established. Please check the code sample of our [best-practices.md](../../basic-tutorials/api-key/best-practices.md "mention") page for instruction.
18+
To safeguard the RPC node, every RPC provider sets a timeout for WebSocket connections to be disconnected periodically. In the case of BlockPI, the timeout is set to 30 minutes after each connection is established. Please check the code sample of our [best-practices.md](../../basic-tutorials/best-practices.md "mention") page for instruction.
1919

2020
{% hint style="info" %}
2121
If you send batch RPC requests in a single HTTPS request, cost would be based on the number of RPC requests. Note that there is limit time for a Https request. If too many RPC requests are sent with one Https request, there may be a timeout error. So the number is limited to 10 for public endpoints and 1000 for private endpoints.

build/api-reference/aptos/check-basic-node-health (1).md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ Oldest non-pruned block height of the chain
5454

5555
Representation of a successful healthcheck
5656

57-
**message** string\
58-
57+
**message** string<br>
5958

6059
#### Example:
6160

build/api-reference/aptos/check-basic-node-health.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Show some basic info of the node
22

3-
\
4-
3+
<br>
54

65
#### Example:
76

build/api-reference/aptos/get-ledger-info.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ A string containing a 64-bit unsigned integer.
8484

8585
A string containing a 64-bit unsigned integer.
8686

87-
**git\_hash** string\
88-
87+
**git\_hash** string<br>
8988

9089
#### Example:
9190

build/api-reference/berachain/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ description: >-
3030
* [eth\_estimateGas](eth_estimategas.md)
3131
* [eth\_newBlockFilter](eth_newblockfilter.md)
3232
* [eth\_getFilterChanges](eth_getfilterchanges.md)
33-
* [eth\_uninstallFilter](eth_uninstallfilter.md)
33+
* [eth\_uninstallFilter](../blast/eth_uninstallfilter.md)
3434
* [eth\_subscribe](eth_subscribe.md)
3535

3636
### net <a href="#eth_unsubscribe" id="eth_unsubscribe"></a>

0 commit comments

Comments
 (0)