Skip to content

Commit

Permalink
Sync Starknet Infura content changes (#1483)
Browse files Browse the repository at this point in the history
* Sync Starknet Infura content changes

* Update whats-new on starknet methods

* Update link

* Update spacing

* Update docs/whats-new.md

---------

Co-authored-by: Alexandra Carrillo <[email protected]>
  • Loading branch information
joaniefromtheblock and alexandratran authored Aug 12, 2024
1 parent a1f8089 commit 0cc5832
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 656 deletions.
5 changes: 4 additions & 1 deletion docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ The latest major MetaMask documentation updates are listed by the month they wer
For a comprehensive list of recent product changes, visit the "Release Notes" section at the bottom
of the [MetaMask developer page](https://metamask.io/developer/).

## July 2024
## August 2024

- Updated [Starknet documentation](/services/reference/starknet) with API methods supported by new partners, Bware and Chainstack. ([#1483](https://github.com/MetaMask/metamask-docs/pull/1483))

## July 2024
- Documented [Binance Smart Chain](/services/reference/bnb-smart-chain/) support. ([#1458](https://github.com/MetaMask/metamask-docs/pull/1458))
- Documented [Celo WebSocket](/services/reference/celo/) support. ([#1446](https://github.com/MetaMask/metamask-docs/pull/1446))
- Documented [ZKsync Era WebSocket](/services/reference/zksync) support. ([#1438](https://github.com/MetaMask/metamask-docs/pull/1438))
Expand Down
16 changes: 16 additions & 0 deletions services/reference/starknet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import CardList from '@site/src/components/CardList'

# Starknet

:::note Decentralized Infrastructure Network (DIN)

Starknet is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
meaning calls to the network are routed to a [partner infrastructure provider](#partner-and-privacy-policy).

:::

Starknet is a decentralized, permissionless and scalable Layer-2 network protocol developed by StarkWare for the Ethereum
network. It leverages zk-STARKs technology for scalability and privacy, allowing developers to build and deploy smart contracts
that can perform more computations than on Ethereum's base layer, while maintaining a high level of security and decentralization.
Expand Down Expand Up @@ -36,3 +43,12 @@ See the [Starknet documentation](https://docs.starknet.io/documentation/) to fin
}
]}
/>

## Partner and privacy policy

The following partners provide access to Starknet:

<!-- markdown-link-check-disable -->
- Bware Labs ([Terms of Service](https://bwarelabs.com/terms), [Privacy Policy](https://bwarelabs.com/privacy))
- Chainstack ([Terms of Service](https://chainstack.com/tos/), [Privacy Policy](https://chainstack.com/privacy/))
<!-- markdown-link-check-enable -->
8 changes: 5 additions & 3 deletions services/reference/starknet/json-rpc-methods/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Infura supports a subset of the [Starknet API methods](https://github.com/starkw

The following Starknet methods are not supported:

- `starknet_pendingTransactions`
- `starknet_addDeployTransaction`
- `starknet_estimateMessageFee`
- `starknet_getBlockWithReceipts`
- `pathfinder_getTransactionStatus`
- `starknet_getTransactionStatus`
- `starknet_specVersion`
- `starknet_traceBlockTransactions`
- `starknet_traceTransaction`

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: "starknet_pendingTransactions"
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Returns a list of pending transactions.

## Parameters

None.

## Returns

An array of pending
[Starknet transaction](https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/transactions/)
objects.

## Example

Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard).

### Request

<Tabs>
<TabItem value="cURL">

```bash
curl https://starknet-mainnet.infura.io/v3/6e46ee5c0df54fb48c0fb2a94502c42a \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "starknet_pendingTransactions", "params": [], "id": 0}'
```

</TabItem>
</Tabs>

### Response

<Tabs>
<TabItem value="JSON">

```json
{
"jsonrpc": "2.0",
"result": [
{
"type": "INVOKE",
"transaction_hash": "0x51b20a0fc4372f88251e85b273b3fdd1840abde65cd65861691abd8eae8ae24",
"max_fee": "0x173ef69c85ddc",
"version": "0x0",
"signature": ["0x30f5c0835f649d07e0335bcfe9a2844ff644ba5ae746853ac607b304f4ef551", "0x87428cbd6d283c49652003effa075d1479f6ca24e7e6dae5da5e16a587875"],
"nonce": "0x0",
"contract_address": "0x8451e87f44cdadbe0e235804753194d24939603a025324ca380e73806e39a6",
"entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad",
"calldata": ["0x1", "0x7861c4e276294a7e859ff0ae2eec0c68300ad9cbb43219db907da9bad786488", "0x2f0b3c5710379609eb5495f1ecd348cb28167711b73609fe565a72734550354", "0x0", "0x3", "0x3", "0x697066733a2f2f516d543577517453516e4a4173423550377a76436e787574", "0x6d70424b515a756a624e666444734b664c515a363933", "0x0", "0x5"]
}, {
"type": "INVOKE",
"transaction_hash": "0x4a79fbaa6c898a9823ae7d58aa30f70f0cd76da83fcc796b0e8f686d714837a",
"max_fee": "0x5fb93c8e0320",
"version": "0x0",
"signature": ["0x40b94d079352f30849cb1fd11d7e6b7ddb9bf82c0af6a6e59821a1c72607592", "0x7d25b96e4e2664ae0a9aaecf523242a5769773b4a1d2753db97711782fea1c9"],
"nonce": "0x0",
"contract_address": "0x1e3415180f65313145bb0c6afa3ea73600f5275fbd22c526bbff5de7f9532ee",
"entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad",
"calldata": ["0x1", "0x3090623ea32d932ca1236595076b00702e7d860696faf300ca9eb13bfe0a78c", "0x2d4c8ea4c8fb9f571d1f6f9b7692fff8e5ceaf73b1df98e7da8c1109b39ae9a", "0x0", "0x2", "0x2", "0x2a92f0f860bf7c63fb9ef42cff4137006b309e0e6e1484e42d0b5511959414d", "0x1", "0x3"]
},
...
],
"id": 0
}
```

</TabItem>
</Tabs>

This file was deleted.

Loading

0 comments on commit 0cc5832

Please sign in to comment.