Skip to content

Commit 9bd47ef

Browse files
authored
Add Solana support (#2152)
* Add Solana methods. Signed-off-by: bgravenorst <[email protected]> * Add credit cost. Signed-off-by: bgravenorst <[email protected]> * Fix cursor issues. Signed-off-by: bgravenorst <[email protected]> * Minor correction. Signed-off-by: bgravenorst <[email protected]> * Update CC. Signed-off-by: bgravenorst <[email protected]> * Update pricing info. Signed-off-by: bgravenorst <[email protected]> * Fix curl. Signed-off-by: bgravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]>
1 parent c778eda commit 9bd47ef

File tree

70 files changed

+6793
-174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+6793
-174
lines changed

services/get-started/pricing/credit-cost.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,13 @@ are charged at approximately one second intervals.
8080

8181
<CreditCostTable methods="polygon" />
8282

83-
## Starknet
83+
## Solana
8484

85-
<CreditCostTable methods="starknet" />
85+
All Solana methods are charged at 160 credits per request.
8686

87+
## Starknet
8788

89+
<CreditCostTable methods="starknet" />
8890

8991
## ZKsync Era
9092

services/reference/solana/index.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
description: Solana network documentation.
3+
---
4+
5+
import CardList from '@site/src/components/CardList'
6+
7+
# Solana
8+
9+
:::note Decentralized Infrastructure Network (DIN)
10+
11+
Solana is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service,
12+
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies).
13+
14+
Solana access is currently limited to paid accounts.
15+
To get expedited access, upgrade to a paid tier. Solana support will be available to all account tiers in the future.
16+
17+
:::
18+
19+
Solana provides a high-performance network that is utilized for a range of use cases, including finance, NFTs, payments, and gaming.
20+
Solana operates as a single global state machine and is open and interoperable.
21+
22+
:::info See also
23+
- See the [official Solana documentation](https://solana.com/docs) for more information.
24+
:::
25+
26+
Select an option below to get started with the Solana network.
27+
28+
<CardList
29+
items={[
30+
{
31+
href: "quickstart",
32+
title: "Quickstart",
33+
description: "Learn how to quickly connect and make calls to the Solana network."
34+
},
35+
{
36+
href: "json-rpc-methods",
37+
title: "JSON-RPC APIs",
38+
description: "View the APIs available for communicating with the Solana network."
39+
},
40+
{
41+
href: "../../../developer-tools/dashboard/get-started/create-api/",
42+
title: "Create an API key",
43+
description: "Learn how to create an API key and secure and share it with your team."
44+
}
45+
]}
46+
/>
47+
48+
## Partners and privacy policies
49+
50+
The following partners provide access to the Solana network:
51+
<!-- markdown-link-check-disable -->
52+
- Everstake ([Terms of Service](https://everstake.one/docs/terms-of-use.pdf), [Privacy Policy](https://everstake.one/docs/privacy-policy.pdf))
53+
- Triton One ([Terms of Service and Privacy Policy](https://triton.one/legal))
54+
<!-- markdown-link-check-enable -->
Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
---
2+
title: "getAsset"
3+
---
4+
5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
7+
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';
8+
9+
# `getAsset`
10+
11+
Returns the metadata information of a compressed or standard asset. <CreditCost network="solana" method="getAsset" />
12+
13+
## Parameters
14+
15+
- `id`: (string) _[required]_ - The `base58` encoded public key of the asset to query.
16+
- `config`: (object) _[optional]_ - Optional flags to return additional information about the asset:
17+
- `showFungible`: (boolean) - Whether to return the `token_info` object about the asset.
18+
- `showUnverifiedCollections`: (boolean) - Whether to return an asset from an unverified collection.
19+
- `showCollectionMetadata`: (boolean) - Whether to return the collection metadata.
20+
21+
## Returns
22+
23+
`result` - An object with the following fields:
24+
25+
- `interface` - The interface type of the asset. Return types
26+
include: `V1_NFT`, `V1_PRINT`, `LEGACY_NFT`, `V2_NFT`, `FungibleAsset`, `FungibleToken`, `Custom`, `Identity`, `Executable`, `ProgrammableNFT`.
27+
- `id` - The ID of the asset.
28+
- `content` - Metadata and content information:
29+
- `$schema` - The schema URI.
30+
- `json_uri` - The URI pointing to the asset's JSON metadata.
31+
- `files` - List of associated files with `uri`, `mime`, and optional `contexts`.
32+
- `metadata` - Metadata fields:
33+
- `name` - The name of the asset.
34+
- `symbol` - The symbol of the asset.
35+
- `description` - A description of the asset.
36+
- `attributes` - List of attributes with `trait_type` and `value`.
37+
- `token_standard` - The token standard of the asset.
38+
- `ownership` - An object containing the ownership details:
39+
- `owner` - The owner's public key.
40+
- `frozen` - Whether the asset is frozen.
41+
- `delegated` - Whether the asset is delegated.
42+
- `delegate` - The delegate's public key.
43+
- `ownership_model` - The ownership model, for example `single` or `token`.
44+
- `compression` - An object containing the asset compression details:
45+
- `eligible` - Whether the asset is eligible for compression.
46+
- `compressed` - Whether the asset is compressed.
47+
- `data_hash` - The data hash of the asset.
48+
- `creator_hash` - The creator hash of the asset.
49+
- `asset_hash` - The asset hash.
50+
- `tree` - The Merkle tree ID.
51+
- `seq` - The sequence number.
52+
- `leaf_id` - The leaf ID.
53+
- `royalty` - An object containing the royalty details:
54+
- `royalty_model` - The royalty model (`creators`, `fanout`, or `single`).
55+
- `target` - The target address for royalties.
56+
- `percent` - The royalty percentage.
57+
- `basis_points` - The royalty in basis points.
58+
- `primary_sale_happened` - Whether the primary sale has occurred.
59+
- `locked` - Whether the royalty is locked.
60+
- `creators` - List of creators:
61+
- `address` - The creator's public key.
62+
- `share` - The creator's share percentage.
63+
- `verified` - Whether the creator is verified.
64+
- `grouping` - Grouping details:
65+
- `group_key` - The group key (for example, `collection`).
66+
- `group_value` - The group value.
67+
- `uses` - An object containing the usage details:
68+
- `use_method` - The usage method (`burn`, `multiple`, or `single`).
69+
- `remaining` - The remaining uses.
70+
- `total` - The total uses.
71+
- `supply` - Supply details:
72+
- `print_max_supply` - The maximum supply for prints.
73+
- `print_current_supply` - The current supply for prints.
74+
- `edition_nonce` - The edition nonce.
75+
- `mutable` - Whether the asset is mutable.
76+
- `burnt` - Whether the asset is burnt.
77+
- `token_info` - Additional token info which is returned via the `showFungible` parameter:
78+
- `supply` - The supply of the asset.
79+
- `decimals` - The decimals supported by the asset.
80+
- `token_program` - The token program of the asset.
81+
- `mint_authority` - The mint authority of the asset.
82+
- `freeze_authority` - The freeze authority of the asset.
83+
84+
## Example
85+
86+
Replace `<YOUR-API-KEY>` with your API key.
87+
88+
### Request
89+
90+
<Tabs>
91+
<TabItem value="curl">
92+
93+
```bash
94+
curl https://solana-mainnet.infura.io/v3/<YOUR-API-KEY> \
95+
-X POST \
96+
-H "Content-Type: application/json" \
97+
-d '{"jsonrpc": "2.0", "id": 1, "method": "getAsset", "params": ["GEciJX32EwG7DeHrXgosvpDAgjiuPo3uSEUAfJPLoSBD"]}'
98+
```
99+
100+
</TabItem>
101+
</Tabs>
102+
103+
### Response
104+
105+
<Tabs>
106+
<TabItem value="JSON">
107+
108+
```bash
109+
{
110+
"jsonrpc": "2.0",
111+
"result": {
112+
"interface": "Custom",
113+
"id": "GEciJX32EwG7DeHrXgosvpDAgjiuPo3uSEUAfJPLoSBD",
114+
"content": {
115+
"$schema": "https://schema.metaplex.com/nft1.0.json",
116+
"json_uri": "https://arweave.net/I657C0VaPHIN7G4iL8Lr_8nctJhoIecFIyzlMCVF6IQ",
117+
"files": [
118+
{
119+
"uri": "https://arweave.net/IxZAe2W4quFYdtae3d_NFZ8kAAcledOkK6_C7H352es",
120+
"mime": "image/png"
121+
},
122+
{
123+
"uri": "https://arweave.net/IxZAe2W4quFYdtae3d_NFZ8kAAcledOkK6_C7H352es?ext=png",
124+
"mime": "image/png"
125+
}
126+
],
127+
"metadata": {
128+
"attributes": [
129+
{
130+
"value": "Green",
131+
"trait_type": "Background"
132+
},
133+
{
134+
"value": "Green / Green",
135+
"trait_type": "Fur / Skin"
136+
},
137+
{
138+
"value": "Policeman's Cap",
139+
"trait_type": "Head"
140+
},
141+
{
142+
"value": "Sandwich",
143+
"trait_type": "Mouth"
144+
},
145+
{
146+
"value": "No Traits",
147+
"trait_type": "Teeth"
148+
},
149+
{
150+
"value": "Police Uniform",
151+
"trait_type": "Clothing"
152+
},
153+
{
154+
"value": "No Traits",
155+
"trait_type": "Eyewear"
156+
},
157+
{
158+
"value": 1,
159+
"trait_type": "generation",
160+
"display_type": "number"
161+
},
162+
{
163+
"value": 2463,
164+
"trait_type": "sequence",
165+
"display_type": "number"
166+
}
167+
],
168+
"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.",
169+
"name": "Degen Ape #2463",
170+
"symbol": "DAPE"
171+
},
172+
"links": {
173+
"external_url": "",
174+
"image": "https://arweave.net/IxZAe2W4quFYdtae3d_NFZ8kAAcledOkK6_C7H352es"
175+
}
176+
},
177+
"authorities": [
178+
{
179+
"address": "DC2mkgwhy56w3viNtHDjJQmc7SGu2QX785bS4aexojwX",
180+
"scopes": [
181+
"full"
182+
]
183+
}
184+
],
185+
"compression": {
186+
"eligible": false,
187+
"compressed": false,
188+
"data_hash": "",
189+
"creator_hash": "",
190+
"asset_hash": "",
191+
"tree": "",
192+
"seq": 0,
193+
"leaf_id": 0
194+
},
195+
"grouping": [
196+
{
197+
"group_key": "collection",
198+
"group_value": "DSwfRF1jhhu6HpSuzaig1G19kzP73PfLZBPLofkw6fLD"
199+
}
200+
],
201+
"royalty": {
202+
"royalty_model": "creators",
203+
"target": null,
204+
"percent": 0.042,
205+
"basis_points": 420,
206+
"primary_sale_happened": true,
207+
"locked": false
208+
},
209+
"creators": [
210+
{
211+
"address": "9BKWqDHfHZh9j39xakYVMdr6hXmCLHH5VfCpeq2idU9L",
212+
"share": 39,
213+
"verified": false
214+
},
215+
{
216+
"address": "9FYsKrNuEweb55Wa2jaj8wTKYDBvuCG3huhakEj96iN9",
217+
"share": 25,
218+
"verified": false
219+
},
220+
{
221+
"address": "HNGVuL5kqjDehw7KR63w9gxow32sX6xzRNgLb8GkbwCM",
222+
"share": 25,
223+
"verified": false
224+
},
225+
{
226+
"address": "7FzXBBPjzrNJbm9MrZKZcyvP3ojVeYPUG2XkBPVZvuBu",
227+
"share": 10,
228+
"verified": false
229+
},
230+
{
231+
"address": "DC2mkgwhy56w3viNtHDjJQmc7SGu2QX785bS4aexojwX",
232+
"share": 1,
233+
"verified": true
234+
}
235+
],
236+
"ownership": {
237+
"frozen": false,
238+
"delegated": false,
239+
"delegate": null,
240+
"ownership_model": "single",
241+
"owner": "1BWutmTvYPwDtmw9abTkS4Ssr8no61spGAvW1X6NDix"
242+
},
243+
"supply": {
244+
"print_max_supply": 0,
245+
"print_current_supply": 0,
246+
"edition_nonce": 255
247+
},
248+
"mutable": false,
249+
"burnt": false
250+
},
251+
"id": 0
252+
}
253+
```
254+
255+
</TabItem>
256+
</Tabs>

0 commit comments

Comments
 (0)