@solana/rpc-graphql 2.0.0-experimental.ee4214c → 2.0.0-experimental.f7d1af1
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/README.md +1088 -30
- package/dist/index.browser.cjs +2677 -1879
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +2678 -1880
- package/dist/index.browser.js.map +1 -1
- package/dist/index.native.js +2678 -1880
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +2677 -1879
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +2678 -1880
- package/dist/index.node.js.map +1 -1
- package/dist/types/cache.d.ts.map +1 -0
- package/dist/types/context.d.ts +15 -15
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/loaders/account.d.ts +14 -0
- package/dist/types/loaders/account.d.ts.map +1 -0
- package/dist/types/loaders/block.d.ts +6 -0
- package/dist/types/loaders/block.d.ts.map +1 -0
- package/dist/types/loaders/program-accounts.d.ts +6 -0
- package/dist/types/loaders/program-accounts.d.ts.map +1 -0
- package/dist/types/loaders/transaction.d.ts +16 -0
- package/dist/types/loaders/transaction.d.ts.map +1 -0
- package/dist/types/resolvers/account.d.ts +8 -0
- package/dist/types/resolvers/account.d.ts.map +1 -0
- package/dist/types/rpc.d.ts +7 -2
- package/dist/types/rpc.d.ts.map +1 -0
- package/dist/types/schema/account.d.ts +124 -0
- package/dist/types/schema/account.d.ts.map +1 -0
- package/dist/types/schema/block.d.ts +17 -0
- package/dist/types/schema/block.d.ts.map +1 -0
- package/dist/types/schema/common/inputs.d.ts +10 -0
- package/dist/types/schema/common/inputs.d.ts.map +1 -0
- package/dist/types/schema/common/scalars.d.ts +13 -0
- package/dist/types/schema/common/scalars.d.ts.map +1 -0
- package/dist/types/schema/common/types.d.ts +12 -0
- package/dist/types/schema/common/types.d.ts.map +1 -0
- package/dist/types/schema/index.d.ts +2 -0
- package/dist/types/schema/index.d.ts.map +1 -0
- package/dist/types/schema/instruction.d.ts +954 -0
- package/dist/types/schema/instruction.d.ts.map +1 -0
- package/dist/types/schema/program-accounts.d.ts +12 -0
- package/dist/types/schema/program-accounts.d.ts.map +1 -0
- package/dist/types/schema/transaction.d.ts +16 -0
- package/dist/types/schema/transaction.d.ts.map +1 -0
- package/package.json +14 -11
- package/dist/types/schema/account/index.d.ts +0 -3
- package/dist/types/schema/account/query.d.ts +0 -38
- package/dist/types/schema/account/types.d.ts +0 -5
- package/dist/types/schema/block/index.d.ts +0 -3
- package/dist/types/schema/block/query.d.ts +0 -42
- package/dist/types/schema/block/types.d.ts +0 -7
- package/dist/types/schema/inputs.d.ts +0 -9
- package/dist/types/schema/picks.d.ts +0 -36
- package/dist/types/schema/program-accounts/index.d.ts +0 -2
- package/dist/types/schema/program-accounts/query.d.ts +0 -47
- package/dist/types/schema/program-accounts/types.d.ts +0 -3
- package/dist/types/schema/scalars.d.ts +0 -3
- package/dist/types/schema/transaction/index.d.ts +0 -3
- package/dist/types/schema/transaction/query.d.ts +0 -33
- package/dist/types/schema/transaction/types.d.ts +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/cache.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB,KAAK,IAAI,IAAI,CAAC;IACd,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAAC;IAC9D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1E;AAwBD,wBAAgB,kBAAkB,IAAI,YAAY,CAkCjD"}
|
package/dist/types/context.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
1
|
+
import { GraphQLResolveInfo } from 'graphql';
|
|
3
2
|
import { GraphQLCache } from './cache';
|
|
4
|
-
import {
|
|
3
|
+
import { loadAccount } from './loaders/account';
|
|
4
|
+
import { loadBlock } from './loaders/block';
|
|
5
|
+
import { loadProgramAccounts } from './loaders/program-accounts';
|
|
6
|
+
import { loadTransaction } from './loaders/transaction';
|
|
7
|
+
import { createRpcGraphQL } from './rpc';
|
|
8
|
+
import { AccountQueryArgs } from './schema/account';
|
|
5
9
|
import { BlockQueryArgs } from './schema/block';
|
|
6
10
|
import { ProgramAccountsQueryArgs } from './schema/program-accounts';
|
|
7
|
-
import { TransactionQueryArgs } from './schema/transaction
|
|
11
|
+
import { TransactionQueryArgs } from './schema/transaction';
|
|
12
|
+
export type Rpc = Parameters<typeof createRpcGraphQL>[0];
|
|
8
13
|
export interface RpcGraphQLContext {
|
|
9
14
|
cache: GraphQLCache;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
rpc: Rpc
|
|
15
|
+
loadAccount(args: AccountQueryArgs, info?: GraphQLResolveInfo): ReturnType<typeof loadAccount>;
|
|
16
|
+
loadBlock(args: BlockQueryArgs, info?: GraphQLResolveInfo): ReturnType<typeof loadBlock>;
|
|
17
|
+
loadProgramAccounts(args: ProgramAccountsQueryArgs, info?: GraphQLResolveInfo): ReturnType<typeof loadProgramAccounts>;
|
|
18
|
+
loadTransaction(args: TransactionQueryArgs, info?: GraphQLResolveInfo): ReturnType<typeof loadTransaction>;
|
|
19
|
+
rpc: Rpc;
|
|
15
20
|
}
|
|
16
|
-
declare function
|
|
17
|
-
declare function resolveBlock({ slot, encoding, ...config }: BlockQueryArgs, cache: GraphQLCache, rpc: Rpc<SolanaRpcMethods>): Promise<{} | null | undefined>;
|
|
18
|
-
declare function resolveProgramAccounts({ programAddress, encoding, ...config }: ProgramAccountsQueryArgs, cache: GraphQLCache, rpc: Rpc<SolanaRpcMethods>): Promise<{} | undefined>;
|
|
19
|
-
declare function resolveTransaction({ signature, encoding, ...config }: TransactionQueryArgs, cache: GraphQLCache, rpc: Rpc<SolanaRpcMethods>): Promise<{} | null | undefined>;
|
|
20
|
-
export declare function createSolanaGraphQLContext(rpc: Rpc<SolanaRpcMethods>): RpcGraphQLContext;
|
|
21
|
-
export {};
|
|
21
|
+
export declare function createSolanaGraphQLContext(rpc: Rpc): RpcGraphQLContext;
|
|
22
22
|
//# 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,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAsB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,WAAW,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IAC/F,SAAS,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;IACzF,mBAAmB,CACf,IAAI,EAAE,wBAAwB,EAC9B,IAAI,CAAC,EAAE,kBAAkB,GAC1B,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC1C,eAAe,CAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IAC3G,GAAG,EAAE,GAAG,CAAC;CACZ;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,GAAG,GAAG,iBAAiB,CAkBtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import { GraphQLCache } from '../cache';
|
|
3
|
+
import type { Rpc } from '../context';
|
|
4
|
+
import { AccountQueryArgs } from '../schema/account';
|
|
5
|
+
export declare function refineJsonParsedAccountData(jsonParsedAccountData: any): {
|
|
6
|
+
data: any;
|
|
7
|
+
meta: {
|
|
8
|
+
program: any;
|
|
9
|
+
space: any;
|
|
10
|
+
type: any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function loadAccount({ address, encoding, ...config }: AccountQueryArgs, cache: GraphQLCache, rpc: Rpc, info?: GraphQLResolveInfo): Promise<any>;
|
|
14
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/loaders/account.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAmBrD,wBAAgB,2BAA2B,CAAC,qBAAqB,EAAE,GAAG;;;;;;;EAQrE;AA4BD,wBAAsB,WAAW,CAC7B,EAAE,OAAO,EAAE,QAAuB,EAAE,GAAG,MAAM,EAAE,EAAE,gBAAgB,EACjE,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,GAAG,EACR,IAAI,CAAC,EAAE,kBAAkB,gBAgC5B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import { GraphQLCache } from '../cache';
|
|
3
|
+
import type { Rpc } from '../context';
|
|
4
|
+
import { BlockQueryArgs } from '../schema/block';
|
|
5
|
+
export declare function loadBlock({ slot, encoding, ...config }: BlockQueryArgs, cache: GraphQLCache, rpc: Rpc, _info?: GraphQLResolveInfo): Promise<any>;
|
|
6
|
+
//# sourceMappingURL=block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/loaders/block.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AA0CjD,wBAAsB,SAAS,CAC3B,EAAE,IAAI,EAAE,QAAuB,EAAE,GAAG,MAAM,EAAE,EAAE,cAAc,EAC5D,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,CAAC,EAAE,kBAAkB,gBA+B7B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import { GraphQLCache } from '../cache';
|
|
3
|
+
import type { Rpc } from '../context';
|
|
4
|
+
import { ProgramAccountsQueryArgs } from '../schema/program-accounts';
|
|
5
|
+
export declare function loadProgramAccounts({ programAddress, encoding, ...config }: ProgramAccountsQueryArgs, cache: GraphQLCache, rpc: Rpc, _info?: GraphQLResolveInfo): Promise<{} | undefined>;
|
|
6
|
+
//# sourceMappingURL=program-accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"program-accounts.d.ts","sourceRoot":"","sources":["../../../src/loaders/program-accounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AA8BtE,wBAAsB,mBAAmB,CACrC,EAAE,cAAc,EAAE,QAAuB,EAAE,GAAG,MAAM,EAAE,EAAE,wBAAwB,EAChF,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,CAAC,EAAE,kBAAkB,2BA2B7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import { GraphQLCache } from '../cache';
|
|
3
|
+
import type { Rpc } from '../context';
|
|
4
|
+
import { TransactionQueryArgs } from '../schema/transaction';
|
|
5
|
+
export declare function refineJsonParsedTransaction({ encoding, transaction }: {
|
|
6
|
+
encoding: string;
|
|
7
|
+
transaction: any;
|
|
8
|
+
}): {
|
|
9
|
+
data: any;
|
|
10
|
+
encoding: string;
|
|
11
|
+
meta: any;
|
|
12
|
+
slot: any;
|
|
13
|
+
version: any;
|
|
14
|
+
};
|
|
15
|
+
export declare function loadTransaction({ signature, encoding, ...config }: TransactionQueryArgs, cache: GraphQLCache, rpc: Rpc, _info?: GraphQLResolveInfo): Promise<{} | null | undefined>;
|
|
16
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/loaders/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA8C7D,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,GAAG,CAAA;CAAE;;;;;;EAW5G;AAOD,wBAAsB,eAAe,CACjC,EAAE,SAAS,EAAE,QAAuB,EAAE,GAAG,MAAM,EAAE,EAAE,oBAAoB,EACvE,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,CAAC,EAAE,kBAAkB,kCAkD7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Address } from '@solana/addresses';
|
|
2
|
+
import { GraphQLResolveInfo } from 'graphql';
|
|
3
|
+
import { RpcGraphQLContext } from '../context';
|
|
4
|
+
import { AccountQueryArgs } from '../schema/account';
|
|
5
|
+
export declare const resolveAccount: (fieldName: string) => (parent: {
|
|
6
|
+
[x: string]: Address;
|
|
7
|
+
}, args: AccountQueryArgs, context: RpcGraphQLContext, info: GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
8
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/resolvers/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,cAAc,cAAe,MAAM;;SAGlC,gBAAgB,WACb,iBAAiB,QACpB,kBAAkB,GAAG,SAAS,wBAE3C,CAAC"}
|
package/dist/types/rpc.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetAccountInfoApi } from '@solana/rpc-core/dist/types/rpc-methods/getAccountInfo';
|
|
2
|
+
import { GetBlockApi } from '@solana/rpc-core/dist/types/rpc-methods/getBlock';
|
|
3
|
+
import { GetProgramAccountsApi } from '@solana/rpc-core/dist/types/rpc-methods/getProgramAccounts';
|
|
4
|
+
import { GetTransactionApi } from '@solana/rpc-core/dist/types/rpc-methods/getTransaction';
|
|
2
5
|
import { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
3
6
|
import { graphql, GraphQLSchema, Source } from 'graphql';
|
|
4
7
|
import { RpcGraphQLContext } from './context';
|
|
8
|
+
type RpcMethods = GetAccountInfoApi & GetBlockApi & GetProgramAccountsApi & GetTransactionApi;
|
|
5
9
|
export interface RpcGraphQL {
|
|
6
10
|
context: RpcGraphQLContext;
|
|
7
11
|
query(source: string | Source, variableValues?: {
|
|
@@ -9,5 +13,6 @@ export interface RpcGraphQL {
|
|
|
9
13
|
}): ReturnType<typeof graphql>;
|
|
10
14
|
schema: GraphQLSchema;
|
|
11
15
|
}
|
|
12
|
-
export declare function createRpcGraphQL(rpc: Rpc<
|
|
16
|
+
export declare function createRpcGraphQL(rpc: Rpc<RpcMethods>): RpcGraphQL;
|
|
17
|
+
export {};
|
|
13
18
|
//# 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,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,GAAG,EAAE,MAAM,iDAAiD,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,EAA8B,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG1E,KAAK,UAAU,GAAG,iBAAiB,GAAG,WAAW,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;AAE9F,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,UAAU,CAAC,GAAG,UAAU,CAiBjE"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Address } from '@solana/addresses';
|
|
2
|
+
import { DataSlice, Slot } from '@solana/rpc-core/dist/types/rpc-methods/common';
|
|
3
|
+
export type AccountQueryArgs = {
|
|
4
|
+
address: Address;
|
|
5
|
+
dataSlice?: DataSlice;
|
|
6
|
+
encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';
|
|
7
|
+
commitment?: 'processed' | 'confirmed' | 'finalized';
|
|
8
|
+
minContextSlot?: Slot;
|
|
9
|
+
};
|
|
10
|
+
export declare const accountTypeDefs = "\n # Account interface\n interface Account {\n address: String\n encoding: String\n executable: Boolean\n lamports: BigInt\n owner: Account\n rentEpoch: BigInt\n }\n\n # An account with base58 encoded data\n type AccountBase58 implements Account {\n address: String\n data: String\n encoding: String\n executable: Boolean\n lamports: BigInt\n owner: Account\n rentEpoch: BigInt\n }\n\n # An account with base64 encoded data\n type AccountBase64 implements Account {\n address: String\n data: String\n encoding: String\n executable: Boolean\n lamports: BigInt\n owner: Account\n rentEpoch: BigInt\n }\n\n # An account with base64+zstd encoded data\n type AccountBase64Zstd implements Account {\n address: String\n data: String\n encoding: String\n executable: Boolean\n lamports: BigInt\n owner: Account\n rentEpoch: BigInt\n }\n\n # Interface for JSON-parsed meta\n type JsonParsedAccountMeta {\n program: String\n space: BigInt\n type: String\n }\n interface AccountJsonParsed {\n meta: JsonParsedAccountMeta\n }\n\n # A nonce account\n type NonceAccountFeeCalculator {\n lamportsPerSignature: String\n }\n type NonceAccountData {\n authority: Account\n blockhash: String\n feeCalculator: NonceAccountFeeCalculator\n }\n type NonceAccount implements Account & AccountJsonParsed {\n address: String\n data: NonceAccountData\n encoding: String\n executable: Boolean\n lamports: BigInt\n meta: JsonParsedAccountMeta\n owner: Account\n rentEpoch: BigInt\n }\n\n # A lookup table account\n type LookupTableAccountData {\n addresses: [String]\n authority: Account\n deactivationSlot: String\n lastExtendedSlot: String\n lastExtendedSlotStartIndex: Int\n }\n type LookupTableAccount implements Account & AccountJsonParsed {\n address: String\n data: LookupTableAccountData\n encoding: String\n executable: Boolean\n lamports: BigInt\n meta: JsonParsedAccountMeta\n owner: Account\n rentEpoch: BigInt\n }\n\n # A mint account\n type MintAccountData {\n decimals: Int\n freezeAuthority: Account\n isInitialized: Boolean\n mintAuthority: Account\n supply: String\n }\n type MintAccount implements Account & AccountJsonParsed {\n address: String\n data: MintAccountData\n encoding: String\n executable: Boolean\n lamports: BigInt\n meta: JsonParsedAccountMeta\n owner: Account\n rentEpoch: BigInt\n }\n\n # A token account\n type TokenAccountData {\n isNative: Boolean\n mint: Account\n owner: Account\n state: String\n tokenAmount: TokenAmount\n }\n type TokenAccount implements Account & AccountJsonParsed {\n address: String\n data: TokenAccountData\n encoding: String\n executable: Boolean\n lamports: BigInt\n meta: JsonParsedAccountMeta\n owner: Account\n rentEpoch: BigInt\n }\n\n # A stake account\n type StakeAccountDataMetaAuthorized {\n staker: Account\n withdrawer: Account\n }\n type StakeAccountDataMetaLockup {\n custodian: Account\n epoch: BigInt\n unixTimestamp: BigInt\n }\n type StakeAccountDataMeta {\n authorized: StakeAccountDataMetaAuthorized\n lockup: StakeAccountDataMetaLockup\n rentExemptReserve: String\n }\n type StakeAccountDataStakeDelegation {\n activationEpoch: BigInt\n deactivationEpoch: BigInt\n stake: String\n voter: Account\n warmupCooldownRate: Int\n }\n type StakeAccountDataStake {\n creditsObserved: BigInt\n delegation: StakeAccountDataStakeDelegation\n }\n type StakeAccountData {\n meta: StakeAccountDataMeta\n stake: StakeAccountDataStake\n }\n type StakeAccount implements Account & AccountJsonParsed {\n address: String\n data: StakeAccountData\n encoding: String\n executable: Boolean\n lamports: BigInt\n meta: JsonParsedAccountMeta\n owner: Account\n rentEpoch: BigInt\n }\n\n # A vote account\n type VoteAccountDataAuthorizedVoter {\n authorizedVoter: Account\n epoch: BigInt\n }\n type VoteAccountDataEpochCredit {\n credits: String\n epoch: BigInt\n previousCredits: String\n }\n type VoteAccountDataLastTimestamp {\n slot: BigInt\n timestamp: BigInt\n }\n type VoteAccountDataVote {\n confirmationCount: Int\n slot: BigInt\n }\n type VoteAccountData {\n authorizedVoters: [VoteAccountDataAuthorizedVoter]\n authorizedWithdrawer: Account\n commission: Int\n epochCredits: [VoteAccountDataEpochCredit]\n lastTimestamp: VoteAccountDataLastTimestamp\n node: Account\n priorVoters: [String]\n rootSlot: BigInt\n votes: [VoteAccountDataVote]\n }\n type VoteAccount implements Account & AccountJsonParsed {\n address: String\n data: VoteAccountData\n encoding: String\n executable: Boolean\n lamports: BigInt\n meta: JsonParsedAccountMeta\n owner: Account\n rentEpoch: BigInt\n }\n";
|
|
11
|
+
export declare const accountResolvers: {
|
|
12
|
+
Account: {
|
|
13
|
+
__resolveType(account: {
|
|
14
|
+
encoding: string;
|
|
15
|
+
meta: {
|
|
16
|
+
program: string;
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
}): "AccountBase58" | "AccountBase64" | "AccountBase64Zstd" | "NonceAccount" | "MintAccount" | "TokenAccount" | "StakeAccount" | "VoteAccount" | "LookupTableAccount";
|
|
20
|
+
};
|
|
21
|
+
AccountBase58: {
|
|
22
|
+
owner: (parent: {
|
|
23
|
+
[x: string]: Address;
|
|
24
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
25
|
+
};
|
|
26
|
+
AccountBase64: {
|
|
27
|
+
owner: (parent: {
|
|
28
|
+
[x: string]: Address;
|
|
29
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
30
|
+
};
|
|
31
|
+
AccountBase64Zstd: {
|
|
32
|
+
owner: (parent: {
|
|
33
|
+
[x: string]: Address;
|
|
34
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
35
|
+
};
|
|
36
|
+
NonceAccountData: {
|
|
37
|
+
authority: (parent: {
|
|
38
|
+
[x: string]: Address;
|
|
39
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
40
|
+
};
|
|
41
|
+
NonceAccount: {
|
|
42
|
+
owner: (parent: {
|
|
43
|
+
[x: string]: Address;
|
|
44
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
45
|
+
};
|
|
46
|
+
LookupTableAccountData: {
|
|
47
|
+
authority: (parent: {
|
|
48
|
+
[x: string]: Address;
|
|
49
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
50
|
+
};
|
|
51
|
+
LookupTableAccount: {
|
|
52
|
+
owner: (parent: {
|
|
53
|
+
[x: string]: Address;
|
|
54
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
55
|
+
};
|
|
56
|
+
MintAccountData: {
|
|
57
|
+
freezeAuthority: (parent: {
|
|
58
|
+
[x: string]: Address;
|
|
59
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
60
|
+
mintAuthority: (parent: {
|
|
61
|
+
[x: string]: Address;
|
|
62
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
63
|
+
};
|
|
64
|
+
MintAccount: {
|
|
65
|
+
owner: (parent: {
|
|
66
|
+
[x: string]: Address;
|
|
67
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
68
|
+
};
|
|
69
|
+
TokenAccountData: {
|
|
70
|
+
mint: (parent: {
|
|
71
|
+
[x: string]: Address;
|
|
72
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
73
|
+
owner: (parent: {
|
|
74
|
+
[x: string]: Address;
|
|
75
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
76
|
+
};
|
|
77
|
+
TokenAccount: {
|
|
78
|
+
owner: (parent: {
|
|
79
|
+
[x: string]: Address;
|
|
80
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
81
|
+
};
|
|
82
|
+
StakeAccountDataMetaAuthorized: {
|
|
83
|
+
staker: (parent: {
|
|
84
|
+
[x: string]: Address;
|
|
85
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
86
|
+
withdrawer: (parent: {
|
|
87
|
+
[x: string]: Address;
|
|
88
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
89
|
+
};
|
|
90
|
+
StakeAccountDataMetaLockup: {
|
|
91
|
+
custodian: (parent: {
|
|
92
|
+
[x: string]: Address;
|
|
93
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
94
|
+
};
|
|
95
|
+
StakeAccountDataStakeDelegation: {
|
|
96
|
+
voter: (parent: {
|
|
97
|
+
[x: string]: Address;
|
|
98
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
99
|
+
};
|
|
100
|
+
StakeAccount: {
|
|
101
|
+
owner: (parent: {
|
|
102
|
+
[x: string]: Address;
|
|
103
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
104
|
+
};
|
|
105
|
+
VoteAccountDataAuthorizedVoter: {
|
|
106
|
+
authorizedVoter: (parent: {
|
|
107
|
+
[x: string]: Address;
|
|
108
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
109
|
+
};
|
|
110
|
+
VoteAccountData: {
|
|
111
|
+
authorizedWithdrawer: (parent: {
|
|
112
|
+
[x: string]: Address;
|
|
113
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
114
|
+
node: (parent: {
|
|
115
|
+
[x: string]: Address;
|
|
116
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
117
|
+
};
|
|
118
|
+
VoteAccount: {
|
|
119
|
+
owner: (parent: {
|
|
120
|
+
[x: string]: Address;
|
|
121
|
+
}, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/schema/account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,gDAAgD,CAAC;AAIjF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,CAAC;IAC9D,UAAU,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IACrD,cAAc,CAAC,EAAE,IAAI,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,eAAe,yhLAmN3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;+BAEE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE;gBAAE,OAAO,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2F3F,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Slot } from '@solana/rpc-core/dist/types/rpc-methods/common';
|
|
2
|
+
import { Commitment } from '@solana/rpc-types';
|
|
3
|
+
export type BlockQueryArgs = {
|
|
4
|
+
slot: Slot;
|
|
5
|
+
commitment?: Commitment;
|
|
6
|
+
encoding?: 'base58' | 'base64' | 'jsonParsed';
|
|
7
|
+
transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';
|
|
8
|
+
};
|
|
9
|
+
export declare const blockTypeDefs = "\n type TransactionMetaForAccounts {\n err: String\n fee: BigInt\n postBalances: [BigInt]\n postTokenBalances: [TokenBalance]\n preBalances: [BigInt]\n preTokenBalances: [TokenBalance]\n status: TransactionStatus\n }\n\n type TransactionDataForAccounts {\n accountKeys: [String]\n signatures: [String]\n }\n\n type BlockTransactionAccounts {\n meta: TransactionMetaForAccounts\n data: TransactionDataForAccounts\n version: String\n }\n\n # Block interface\n interface Block {\n blockhash: String\n blockHeight: BigInt\n blockTime: Int\n parentSlot: BigInt\n previousBlockhash: String\n rewards: [Reward]\n transactionDetails: String\n }\n\n # A block with account transaction details\n type BlockWithAccounts implements Block {\n blockhash: String\n blockHeight: BigInt\n blockTime: Int\n parentSlot: BigInt\n previousBlockhash: String\n rewards: [Reward]\n transactions: [BlockTransactionAccounts]\n transactionDetails: String\n }\n\n # A block with full transaction details\n type BlockWithFull implements Block {\n blockhash: String\n blockHeight: BigInt\n blockTime: Int\n parentSlot: BigInt\n previousBlockhash: String\n rewards: [Reward]\n transactions: [Transaction]\n transactionDetails: String\n }\n\n # A block with none transaction details\n type BlockWithNone implements Block {\n blockhash: String\n blockHeight: BigInt\n blockTime: Int\n parentSlot: BigInt\n previousBlockhash: String\n rewards: [Reward]\n transactionDetails: String\n }\n\n # A block with signature transaction details\n type BlockWithSignatures implements Block {\n blockhash: String\n blockHeight: BigInt\n blockTime: Int\n parentSlot: BigInt\n previousBlockhash: String\n rewards: [Reward]\n signatures: [String]\n transactionDetails: String\n }\n";
|
|
10
|
+
export declare const blockResolvers: {
|
|
11
|
+
Block: {
|
|
12
|
+
__resolveType(block: {
|
|
13
|
+
transactionDetails: string;
|
|
14
|
+
}): "BlockWithAccounts" | "BlockWithNone" | "BlockWithSignatures" | "BlockWithFull";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/schema/block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gDAAgD,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;IAC9C,kBAAkB,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;CACpE,CAAC;AAEF,eAAO,MAAM,aAAa,smEA+EzB,CAAC;AAEF,eAAO,MAAM,cAAc;;6BAEE;YAAE,kBAAkB,EAAE,MAAM,CAAA;SAAE;;CAa1D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const inputTypeDefs = "\n enum AccountEncoding {\n base58\n base64\n base64Zstd\n jsonParsed\n }\n\n enum BlockTransactionDetails {\n accounts\n full\n none\n signatures\n }\n\n enum Commitment {\n confirmed\n finalized\n processed\n }\n\n input DataSlice {\n offset: Int\n length: Int\n }\n\n input ProgramAccountsFilter {\n bytes: BigInt\n dataSize: BigInt\n encoding: String\n offset: BigInt\n }\n\n enum TransactionEncoding {\n base58\n base64\n jsonParsed\n }\n\n enum TransactionVersion {\n legacy\n zero\n }\n";
|
|
2
|
+
export declare const inputResolvers: {
|
|
3
|
+
AccountEncoding: {
|
|
4
|
+
base64Zstd: string;
|
|
5
|
+
};
|
|
6
|
+
TransactionVersion: {
|
|
7
|
+
zero: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../../src/schema/common/inputs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,srBA2CzB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Kind } from 'graphql';
|
|
2
|
+
export declare const scalarTypeDefs = "\n scalar BigInt\n";
|
|
3
|
+
export declare const scalarResolvers: {
|
|
4
|
+
BigInt: {
|
|
5
|
+
__parseLiteral(ast: {
|
|
6
|
+
kind: Kind;
|
|
7
|
+
value: string | number | bigint | boolean;
|
|
8
|
+
}): bigint | null;
|
|
9
|
+
__parseValue(value: string): bigint;
|
|
10
|
+
__serialize(value: string): bigint;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=scalars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalars.d.ts","sourceRoot":"","sources":["../../../../src/schema/common/scalars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,eAAO,MAAM,cAAc,0BAE1B,CAAC;AAEF,eAAO,MAAM,eAAe;;4BAEA;YAAE,IAAI,EAAE,IAAI,CAAC;YAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;SAAE,GAAG,MAAM,GAAG,IAAI;4BAMzE,MAAM,GAAG,MAAM;2BAGhB,MAAM,GAAG,MAAM;;CAIzC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const commonTypeDefs = "\n type ReturnData {\n data: String\n programId: String\n }\n\n type Reward {\n commission: Int\n lamports: BigInt\n postBalance: BigInt\n pubkey: String\n rewardType: String\n }\n\n type TokenAmount {\n amount: String\n decimals: Int\n uiAmount: BigInt\n uiAmountString: String\n }\n\n type TokenBalance {\n accountIndex: Int\n mint: Account\n owner: Account\n programId: String\n uiTokenAmount: TokenAmount\n }\n";
|
|
2
|
+
export declare const commonResolvers: {
|
|
3
|
+
TokenBalance: {
|
|
4
|
+
mint: (parent: {
|
|
5
|
+
[x: string]: import("@solana/addresses").Address;
|
|
6
|
+
}, args: import("../account").AccountQueryArgs, context: import("../../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
7
|
+
owner: (parent: {
|
|
8
|
+
[x: string]: import("@solana/addresses").Address;
|
|
9
|
+
}, args: import("../account").AccountQueryArgs, context: import("../../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<any> | null;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/schema/common/types.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,2iBA4B1B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAK3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schema/index.ts"],"names":[],"mappings":"AAuFA,wBAAgB,yBAAyB,oCAuBxC"}
|