-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgravenorst
wants to merge
41
commits into
main
Choose a base branch
from
solana
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b212bf0
Add initial Solana methods.
bgravenorst c61f40e
Document standard Solana methods.
bgravenorst b84f7a3
Add quickstart.
bgravenorst b2acd21
Add Solana network logo.
bgravenorst 2aa9423
Add DAS methods.
bgravenorst 087387c
Add partner information.
bgravenorst 5dfa65b
Add admonitions.
bgravenorst 5c28f7d
Update quickstart.
bgravenorst 26ad485
Document Snaps bundle analyzer option (#1955)
alexandratran 0fc99ba
fix responsive card display across all viewports (#1953)
AndyMBridges a6b9393
Update MEV to include paid customers. (#1959)
bgravenorst 71f681b
add osano silent script (#1962)
AndyMBridges 9b559b8
chore(deps-dev): bump @eslint/js from 9.21.0 to 9.24.0 (#1964)
dependabot[bot] 80c2480
update gha (#1966)
joshuafernandes a36080a
remove old osano scri[t (#1967)
AndyMBridges 840b297
chore(deps): bump estree-util-value-to-estree in the npm_and_yarn gro…
dependabot[bot] 676bd57
feat: add MetaMask and Dynamic SDK integration guide (#1972)
cxalem 0d13bd4
Update tokens.md (#1963)
fosgate29 3833dfd
chore(deps): bump @metamask/profile-sync-controller (#1973)
dependabot[bot] 34967ae
Document mobile deeplinks (#1928)
alexandratran cd8ab0f
Remove Browserify bundler option (#1976)
alexandratran a71cf7a
Add hoodi support. (#1977)
bgravenorst 07ddad4
Merge main and add what's new.
bgravenorst 848a597
Merge branch 'main' into solana
bgravenorst 7d4b921
Address reviewer feedback.
bgravenorst b5efb2d
Merge branch 'main' into solana
bgravenorst 90eedb4
Snap dialogs do not support `metamask::` urls (#1970)
alexandratran 531bab7
chore(deps): bump sass from 1.83.4 to 1.87.0 (#1988)
dependabot[bot] 3956c5f
cleaner ci (#1990)
joshuafernandes 206078d
Fix React TS connect guide (Wallet API) (#1995)
alexandratran 6ce0e77
Discontinue support for the Ethereum Holesky testnet. (#1996)
bgravenorst 8dd950d
Add tutorial for creating an AI agent with the SDK (#1993)
alexandratran fc34a14
Add filter methods for supported methods (#1994)
bgravenorst 8263f4f
Update codeowners (#1998)
alexandratran f9921b3
Update apis.md (#1997)
Montoya fd9a780
chore(deps): bump @metamask/design-tokens from 5.0.0 to 7.1.0 (#2000)
dependabot[bot] 88305b3
add osano silent script (#1962)
AndyMBridges 596e215
remove old osano scri[t (#1967)
AndyMBridges 91f60de
Fix merge issue.
bgravenorst 40c4b3e
Merge main and add what's new.
bgravenorst 5a2b3f4
Address reviewer feedback.
bgravenorst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
- 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
|
||
}, | ||
{ | ||
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 --> |
255 changes: 255 additions & 0 deletions
255
services/reference/solana/json-rpc-methods/digital-asset-standard/getasset.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.