@solana/rpc-graphql 2.0.0-experimental.0cfc222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +63 -0
- package/dist/index.browser.cjs +2203 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +2201 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.native.js +2197 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +2199 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +2197 -0
- package/dist/index.node.js.map +1 -0
- package/dist/types/cache.d.ts +7 -0
- package/dist/types/context.d.ts +22 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/rpc.d.ts +13 -0
- package/dist/types/schema/account/index.d.ts +3 -0
- package/dist/types/schema/account/query.d.ts +38 -0
- package/dist/types/schema/account/types.d.ts +5 -0
- package/dist/types/schema/block/index.d.ts +3 -0
- package/dist/types/schema/block/query.d.ts +42 -0
- package/dist/types/schema/block/types.d.ts +7 -0
- package/dist/types/schema/inputs.d.ts +9 -0
- package/dist/types/schema/picks.d.ts +36 -0
- package/dist/types/schema/program-accounts/index.d.ts +2 -0
- package/dist/types/schema/program-accounts/query.d.ts +47 -0
- package/dist/types/schema/program-accounts/types.d.ts +3 -0
- package/dist/types/schema/scalars.d.ts +3 -0
- package/dist/types/schema/transaction/index.d.ts +3 -0
- package/dist/types/schema/transaction/query.d.ts +33 -0
- package/dist/types/schema/transaction/types.d.ts +12 -0
- package/package.json +101 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2023 Solana Labs, Inc
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# @solana/rpc-graphql
|
|
2
|
+
|
|
3
|
+
This package defines a GraphQL client resolver built on top of the
|
|
4
|
+
[Solana JSON-RPC](https://docs.solana.com/api/http).
|
|
5
|
+
|
|
6
|
+
# Solana & GraphQL
|
|
7
|
+
|
|
8
|
+
GraphQL is a query language for your API, and a server-side runtime for
|
|
9
|
+
executing queries using a type system you define for your data.
|
|
10
|
+
|
|
11
|
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/GraphQL_Logo.svg/1024px-GraphQL_Logo.svg.png?20161105194737" alt="graphql-icon" width="24" align="center"/> [**GraphQL**](https://graphql.org/learn/)
|
|
12
|
+
|
|
13
|
+
This library attempts to define a type system for Solana. With the proper
|
|
14
|
+
type system, developers can take advantage of the best features of GraphQL
|
|
15
|
+
to make interacting with Solana via RPC smoother, faster, more reliable,
|
|
16
|
+
and involve less code.
|
|
17
|
+
|
|
18
|
+
## Design
|
|
19
|
+
|
|
20
|
+
⚠️ **In Development:** The API's query/schema structure may change as the API
|
|
21
|
+
matures.
|
|
22
|
+
|
|
23
|
+
With the exception of many familiar RPC methods for obtaining information about
|
|
24
|
+
a validator or cluster, majority of Solana data required by various
|
|
25
|
+
applications revolves around two components:
|
|
26
|
+
|
|
27
|
+
- Accounts
|
|
28
|
+
- Blocks
|
|
29
|
+
|
|
30
|
+
One can add a third component found within a block:
|
|
31
|
+
|
|
32
|
+
- Transactions
|
|
33
|
+
|
|
34
|
+
With these three main components in mind, consider a GraphQL type system that
|
|
35
|
+
revolves around accounts, blocks, and transactions.
|
|
36
|
+
|
|
37
|
+
### Types
|
|
38
|
+
|
|
39
|
+
Coming soon!
|
|
40
|
+
|
|
41
|
+
#### Account
|
|
42
|
+
|
|
43
|
+
Coming soon!
|
|
44
|
+
|
|
45
|
+
### Queries
|
|
46
|
+
|
|
47
|
+
Coming soon!
|
|
48
|
+
|
|
49
|
+
#### Accounts
|
|
50
|
+
|
|
51
|
+
Coming soon!
|
|
52
|
+
|
|
53
|
+
#### Program Accounts
|
|
54
|
+
|
|
55
|
+
Coming soon!
|
|
56
|
+
|
|
57
|
+
#### Blocks
|
|
58
|
+
|
|
59
|
+
Coming soon!
|
|
60
|
+
|
|
61
|
+
#### Transactions
|
|
62
|
+
|
|
63
|
+
Coming soon!
|