Skip to content

Add Solana support #2152

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 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions services/get-started/pricing/credit-cost.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ are charged at approximately one second intervals.

<CreditCostTable methods="polygon" />

## Starknet
## Solana

<CreditCostTable methods="starknet" />
All Solana methods are charged at 180 credits per request.

## Starknet

<CreditCostTable methods="starknet" />

## ZKsync Era

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 / 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"}

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

View workflow job for this annotation

GitHub Actions / Spelling (.mdx)

[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 Solana 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