@solana/rpc-graphql 2.0.0-experimental.4366e2e
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 +9006 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +9002 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.native.js +9002 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +9004 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +9004 -0
- package/dist/index.node.js.map +1 -0
- package/dist/types/context.d.ts +7 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/rpc.d.ts +13 -0
- package/dist/types/rpc.d.ts.map +1 -0
- package/package.json +98 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SolanaRpcMethods } from '@solana/rpc-core';
|
|
2
|
+
import { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
3
|
+
export interface RpcGraphQLContext {
|
|
4
|
+
rpc: Rpc<SolanaRpcMethods>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createSolanaGraphQLContext(rpc: Rpc<SolanaRpcMethods>): RpcGraphQLContext;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,iDAAiD,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAC9B,GAAG,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC9B;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,GAAG,CAAC,gBAAgB,CAAC,GAAG,iBAAiB,CAExF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SolanaRpcMethods } from '@solana/rpc-core';
|
|
2
|
+
import { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
3
|
+
import { graphql, GraphQLSchema, Source } from 'graphql';
|
|
4
|
+
import { RpcGraphQLContext } from './context';
|
|
5
|
+
export interface RpcGraphQL {
|
|
6
|
+
context: RpcGraphQLContext;
|
|
7
|
+
query(source: string | Source, variableValues?: {
|
|
8
|
+
readonly [variable: string]: unknown;
|
|
9
|
+
}): ReturnType<typeof graphql>;
|
|
10
|
+
schema: GraphQLSchema;
|
|
11
|
+
}
|
|
12
|
+
export declare function createRpcGraphQL(rpc: Rpc<SolanaRpcMethods>): RpcGraphQL;
|
|
13
|
+
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,iDAAiD,CAAC;AACtE,OAAO,EAAE,OAAO,EAAqB,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAA8B,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE1E,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CACD,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,cAAc,CAAC,EAAE;QAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAC1D,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;IAC9B,MAAM,EAAE,aAAa,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAuBvE"}
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solana/rpc-graphql",
|
|
3
|
+
"version": "2.0.0-experimental.4366e2e",
|
|
4
|
+
"description": "A library for resolving GraphQl query calls to the Solana JSON RPC API",
|
|
5
|
+
"exports": {
|
|
6
|
+
"browser": {
|
|
7
|
+
"import": "./dist/index.browser.js",
|
|
8
|
+
"require": "./dist/index.browser.cjs"
|
|
9
|
+
},
|
|
10
|
+
"node": {
|
|
11
|
+
"import": "./dist/index.node.js",
|
|
12
|
+
"require": "./dist/index.node.cjs"
|
|
13
|
+
},
|
|
14
|
+
"react-native": "./dist/index.native.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"browser": {
|
|
18
|
+
"./dist/index.node.cjs": "./dist/index.browser.cjs",
|
|
19
|
+
"./dist/index.node.js": "./dist/index.browser.js"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.node.cjs",
|
|
22
|
+
"module": "./dist/index.node.js",
|
|
23
|
+
"react-native": "./dist/index.native.js",
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"./dist/"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"keywords": [
|
|
31
|
+
"blockchain",
|
|
32
|
+
"solana",
|
|
33
|
+
"web3"
|
|
34
|
+
],
|
|
35
|
+
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/solana-labs/solana-web3.js"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "http://github.com/solana-labs/solana-web3.js/issues"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": [
|
|
45
|
+
"supports bigint and not dead",
|
|
46
|
+
"maintained node versions"
|
|
47
|
+
],
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@solana/eslint-config-solana": "^1.0.2",
|
|
50
|
+
"@swc/jest": "^0.2.28",
|
|
51
|
+
"@types/jest": "^29.5.3",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
|
53
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
54
|
+
"agadoo": "^3.0.0",
|
|
55
|
+
"eslint": "^8.45.0",
|
|
56
|
+
"eslint-plugin-jest": "^27.2.3",
|
|
57
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
58
|
+
"graphql": "^16.8.0",
|
|
59
|
+
"jest": "^29.6.1",
|
|
60
|
+
"jest-environment-jsdom": "^29.6.2",
|
|
61
|
+
"jest-fetch-mock-fork": "^3.0.4",
|
|
62
|
+
"jest-runner-eslint": "^2.1.0",
|
|
63
|
+
"jest-runner-prettier": "^1.0.0",
|
|
64
|
+
"prettier": "^2.8",
|
|
65
|
+
"tsup": "7.2.0",
|
|
66
|
+
"typescript": "^5.1.6",
|
|
67
|
+
"version-from-git": "^1.1.1",
|
|
68
|
+
"@solana/addresses": "2.0.0-development",
|
|
69
|
+
"@solana/rpc-transport": "2.0.0-development",
|
|
70
|
+
"build-scripts": "0.0.0",
|
|
71
|
+
"test-config": "0.0.0",
|
|
72
|
+
"@solana/rpc-core": "2.0.0-development",
|
|
73
|
+
"tsconfig": "0.0.0"
|
|
74
|
+
},
|
|
75
|
+
"bundlewatch": {
|
|
76
|
+
"defaultCompression": "gzip",
|
|
77
|
+
"files": [
|
|
78
|
+
{
|
|
79
|
+
"path": "./dist/index*.js"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"scripts": {
|
|
84
|
+
"compile:js": "tsup --config build-scripts/tsup.config.package.ts",
|
|
85
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
86
|
+
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --globalSetup test-config/test-validator-setup.js --globalTeardown test-config/test-validator-teardown.js --rootDir . --watch",
|
|
87
|
+
"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
|
|
88
|
+
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/*",
|
|
89
|
+
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
90
|
+
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
91
|
+
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
92
|
+
"test:treeshakability:native": "agadoo dist/index.node.js",
|
|
93
|
+
"test:treeshakability:node": "agadoo dist/index.native.js",
|
|
94
|
+
"test:typecheck": "tsc --noEmit",
|
|
95
|
+
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --globalSetup test-config/test-validator-setup.js --globalTeardown test-config/test-validator-teardown.js --rootDir . --silent --passWithNoTests",
|
|
96
|
+
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --globalSetup test-config/test-validator-setup.js --globalTeardown test-config/test-validator-teardown.js --rootDir . --silent --passWithNoTests"
|
|
97
|
+
}
|
|
98
|
+
}
|