Skip to content

Add Solana support via DIN #1978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b212bf0
Add initial Solana methods.
bgravenorst Apr 9, 2025
c61f40e
Document standard Solana methods.
bgravenorst Apr 14, 2025
b84f7a3
Add quickstart.
bgravenorst Apr 15, 2025
b2acd21
Add Solana network logo.
bgravenorst Apr 15, 2025
2aa9423
Add DAS methods.
bgravenorst Apr 17, 2025
087387c
Add partner information.
bgravenorst Apr 17, 2025
5dfa65b
Add admonitions.
bgravenorst Apr 17, 2025
5c28f7d
Update quickstart.
bgravenorst Apr 17, 2025
26ad485
Document Snaps bundle analyzer option (#1955)
alexandratran Apr 2, 2025
0fc99ba
fix responsive card display across all viewports (#1953)
AndyMBridges Apr 3, 2025
a6b9393
Update MEV to include paid customers. (#1959)
bgravenorst Apr 3, 2025
71f681b
add osano silent script (#1962)
AndyMBridges Apr 4, 2025
9b559b8
chore(deps-dev): bump @eslint/js from 9.21.0 to 9.24.0 (#1964)
dependabot[bot] Apr 7, 2025
80c2480
update gha (#1966)
joshuafernandes Apr 7, 2025
a36080a
remove old osano scri[t (#1967)
AndyMBridges Apr 7, 2025
840b297
chore(deps): bump estree-util-value-to-estree in the npm_and_yarn gro…
dependabot[bot] Apr 7, 2025
676bd57
feat: add MetaMask and Dynamic SDK integration guide (#1972)
cxalem Apr 14, 2025
0d13bd4
Update tokens.md (#1963)
fosgate29 Apr 14, 2025
3833dfd
chore(deps): bump @metamask/profile-sync-controller (#1973)
dependabot[bot] Apr 14, 2025
34967ae
Document mobile deeplinks (#1928)
alexandratran Apr 14, 2025
cd8ab0f
Remove Browserify bundler option (#1976)
alexandratran Apr 15, 2025
a71cf7a
Add hoodi support. (#1977)
bgravenorst Apr 16, 2025
07ddad4
Merge main and add what's new.
bgravenorst Apr 17, 2025
848a597
Merge branch 'main' into solana
bgravenorst Apr 17, 2025
7d4b921
Address reviewer feedback.
bgravenorst Apr 21, 2025
b5efb2d
Merge branch 'main' into solana
bgravenorst Apr 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ of the [MetaMask developer page](https://metamask.io/developer/).

## April 2025

- Documented [Solana](/services/reference/solana) support. ([#1978](https://github.com/MetaMask/metamask-docs/pull/1978))
- Documented [Ethereum Hoodi testnet](/services/get-started/endpoints/#ethereum) support. ([#1977](https://github.com/MetaMask/metamask-docs/pull/1977))
- Documented [how to use deeplinks](/sdk/guides/use-deeplinks).
([#1928](https://github.com/MetaMask/metamask-docs/pull/1928))
Expand Down
7 changes: 7 additions & 0 deletions services/get-started/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ Include your authentication details when [making IPFS requests](/reference/ipfs/
| Mainnet | JSON-RPC over HTTPS | `https://scroll-mainnet.infura.io/v3/<YOUR-API-KEY>` |
| Sepolia | JSON-RPC over HTTPS | `https://scroll-sepolia.infura.io/v3/<YOUR-API-KEY>` |

## Solana

| Network | Description | URL |
|---------|-------------------------|-------------------------------------------------------|
| Mainnet | JSON-RPC over HTTPS | `https://solana-mainnet.infura.io/v3/<YOUR-API-KEY>` |
| Devnet | JSON-RPC over HTTPS | `https://solana-devnet.infura.io/v3/<YOUR-API-KEY>` |

## Starknet

| Network | Description | URL |
Expand Down
54 changes: 54 additions & 0 deletions services/reference/solana/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
description: Solana network documentation.
---

import CardList from '@site/src/components/CardList'

# Solana

:::note Decentralized Infrastructure Network (DIN)

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

Solana access is currently limited to paid accounts.
To get expedited access, upgrade to a paid tier. Solana support will be available to all account tiers in the future.

:::

Solana provides a high-performance network that is utilized for a range of use cases, including finance, NFTs, payments, and gaming.
Solana operates as a single global state machine and is open and interoperable.

:::info See also
- See the [official Solana documentation](https://solana.com/docs) for more information.
:::

Select an option below to get started with the Solana network.

<CardList
items={[
{
href: "quickstart",
title: "Quickstart",
description: "Learn how to quickly connect and make calls to the Solana network."

Check warning on line 33 in services/reference/solana/index.md

View workflow job for this annotation

GitHub Actions / Lint / Spelling (.md)

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Remove 'quickly' if it's not important to the meaning of the statement. Raw Output: {"message": "[Microsoft.Adverbs] Remove 'quickly' if it's not important to the meaning of the statement.", "location": {"path": "services/reference/solana/index.md", "range": {"start": {"line": 33, "column": 34}}}, "severity": "WARNING"}
},
{
href: "json-rpc-methods",
title: "JSON-RPC APIs",
description: "View the APIs available for communicating with the Solana network."
},
{
href: "../../../developer-tools/dashboard/get-started/create-api/",
title: "Create an API key",
description: "Learn how to create an API key and secure and share it with your team."
}
]}
/>

## Partners and privacy policies

The following partners provide access to the Scroll network:
<!-- markdown-link-check-disable -->
- Everstake ([Terms of Service](https://everstake.one/docs/terms-of-use.pdf), [Privacy Policy](https://everstake.one/docs/privacy-policy.pdf))
- Triton One ([Terms of Service and Privacy Policy](https://triton.one/legal))
<!-- markdown-link-check-enable -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
---
title: "getAsset"
---

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

# `getAsset`

Returns the metadata information of a compressed or standard asset.

## Parameters

- `id`: (string) _[required]_ - The `base58` encoded public key of the asset to query.
- `config`: (object) _[optional]_ - Optional flags to return additional information about the asset:
- `showFungible`: (boolean) - Whether to return the `token_info` object about the asset.
- `showUnverifiedCollections`: (boolean) - Whether to return an asset from an unverified collection.
- `showCollectionMetadata`: (boolean) - Whether to return the collection metadata.

## Returns

`result` - An object with the following fields:

- `interface` - The interface type of the asset. Return types
include: `V1_NFT`, `V1_PRINT`, `LEGACY_NFT`, `V2_NFT`, `FungibleAsset`, `FungibleToken`, `Custom`, `Identity`, `Executable`, `ProgrammableNFT`.
- `id` - The ID of the asset.
- `content` - Metadata and content information:
- `$schema` - The schema URI.
- `json_uri` - The URI pointing to the asset's JSON metadata.
- `files` - List of associated files with `uri`, `mime`, and optional `contexts`.
- `metadata` - Metadata fields:
- `name` - The name of the asset.
- `symbol` - The symbol of the asset.
- `description` - A description of the asset.
- `attributes` - List of attributes with `trait_type` and `value`.
- `token_standard` - The token standard of the asset.
- `ownership` - An object containing the ownership details:
- `owner` - The owner's public key.
- `frozen` - Whether the asset is frozen.
- `delegated` - Whether the asset is delegated.
- `delegate` - The delegate's public key.
- `ownership_model` - The ownership model, for example `single` or `token`.
- `compression` - An object containing the asset compression details:
- `eligible` - Whether the asset is eligible for compression.
- `compressed` - Whether the asset is compressed.
- `data_hash` - The data hash of the asset.
- `creator_hash` - The creator hash of the asset.
- `asset_hash` - The asset hash.
- `tree` - The Merkle tree ID.
- `seq` - The sequence number.
- `leaf_id` - The leaf ID.
- `royalty` - An object containing the royalty details:
- `royalty_model` - The royalty model (`creators`, `fanout`, or `single`).
- `target` - The target address for royalties.
- `percent` - The royalty percentage.
- `basis_points` - The royalty in basis points.
- `primary_sale_happened` - Whether the primary sale has occurred.
- `locked` - Whether the royalty is locked.
- `creators` - List of creators:
- `address` - The creator's public key.
- `share` - The creator's share percentage.
- `verified` - Whether the creator is verified.
- `grouping` - Grouping details:
- `group_key` - The group key (for example, `collection`).
- `group_value` - The group value.
- `uses` - An object containing the usage details:
- `use_method` - The usage method (`burn`, `multiple`, or `single`).
- `remaining` - The remaining uses.
- `total` - The total uses.
- `supply` - Supply details:
- `print_max_supply` - The maximum supply for prints.
- `print_current_supply` - The current supply for prints.
- `edition_nonce` - The edition nonce.
- `mutable` - Whether the asset is mutable.
- `burnt` - Whether the asset is burnt.
- `token_info` - Additional token info which is returned via the `showFungible` parameter:
- `supply` - The supply of the asset.
- `decimals` - The decimals supported by the asset.
- `token_program` - The token program of the asset.
- `mint_authority` - The mint authority of the asset.
- `freeze_authority` - The freeze authority of the asset.

## Example

Replace `<YOUR-API-KEY>` with your API key.

### Request

<Tabs>
<TabItem value="curl">

```bash
curl https://solana-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "getAsset", "params": ["GEciJX32EwG7DeHrXgosvpDAgjiuPo3uSEUAfJPLoSBD"]}'
```

</TabItem>
</Tabs>

### Response

<Tabs>
<TabItem value="JSON">

```bash
{
"jsonrpc": "2.0",
"result": {
"interface": "Custom",
"id": "GEciJX32EwG7DeHrXgosvpDAgjiuPo3uSEUAfJPLoSBD",
"content": {
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://arweave.net/I657C0VaPHIN7G4iL8Lr_8nctJhoIecFIyzlMCVF6IQ",
"files": [
{
"uri": "https://arweave.net/IxZAe2W4quFYdtae3d_NFZ8kAAcledOkK6_C7H352es",
"mime": "image/png"
},
{
"uri": "https://arweave.net/IxZAe2W4quFYdtae3d_NFZ8kAAcledOkK6_C7H352es?ext=png",
"mime": "image/png"
}
],
"metadata": {
"attributes": [
{
"value": "Green",
"trait_type": "Background"
},
{
"value": "Green / Green",
"trait_type": "Fur / Skin"
},
{
"value": "Policeman's Cap",
"trait_type": "Head"
},
{
"value": "Sandwich",
"trait_type": "Mouth"
},
{
"value": "No Traits",
"trait_type": "Teeth"
},
{
"value": "Police Uniform",
"trait_type": "Clothing"
},
{
"value": "No Traits",
"trait_type": "Eyewear"
},
{
"value": 1,
"trait_type": "generation",
"display_type": "number"
},
{
"value": 2463,
"trait_type": "sequence",
"display_type": "number"
}
],
"description": "Deep in the heart of Dingus Forest echoes the sleepless cries of a troop of 10,000 apes. These aren’t just regular apes, however. These are degenerate apes.",
"name": "Degen Ape #2463",
"symbol": "DAPE"
},
"links": {
"external_url": "",
"image": "https://arweave.net/IxZAe2W4quFYdtae3d_NFZ8kAAcledOkK6_C7H352es"
}
},
"authorities": [
{
"address": "DC2mkgwhy56w3viNtHDjJQmc7SGu2QX785bS4aexojwX",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "DSwfRF1jhhu6HpSuzaig1G19kzP73PfLZBPLofkw6fLD"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
},
"creators": [
{
"address": "9BKWqDHfHZh9j39xakYVMdr6hXmCLHH5VfCpeq2idU9L",
"share": 39,
"verified": false
},
{
"address": "9FYsKrNuEweb55Wa2jaj8wTKYDBvuCG3huhakEj96iN9",
"share": 25,
"verified": false
},
{
"address": "HNGVuL5kqjDehw7KR63w9gxow32sX6xzRNgLb8GkbwCM",
"share": 25,
"verified": false
},
{
"address": "7FzXBBPjzrNJbm9MrZKZcyvP3ojVeYPUG2XkBPVZvuBu",
"share": 10,
"verified": false
},
{
"address": "DC2mkgwhy56w3viNtHDjJQmc7SGu2QX785bS4aexojwX",
"share": 1,
"verified": true
}
],
"ownership": {
"frozen": false,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "1BWutmTvYPwDtmw9abTkS4Ssr8no61spGAvW1X6NDix"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 255
},
"mutable": false,
"burnt": false
},
"id": 0
}
```

</TabItem>
</Tabs>
Loading
Loading