@solana/rpc-graphql 2.0.0-experimental.ee4214c → 2.0.0-experimental.ef09aec

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.
Files changed (45) hide show
  1. package/README.md +1088 -30
  2. package/dist/index.browser.cjs +2790 -1925
  3. package/dist/index.browser.cjs.map +1 -1
  4. package/dist/index.browser.js +2786 -1926
  5. package/dist/index.browser.js.map +1 -1
  6. package/dist/index.native.js +2786 -1922
  7. package/dist/index.native.js.map +1 -1
  8. package/dist/index.node.cjs +2790 -1921
  9. package/dist/index.node.cjs.map +1 -1
  10. package/dist/index.node.js +2786 -1922
  11. package/dist/index.node.js.map +1 -1
  12. package/dist/types/context.d.ts +18 -16
  13. package/dist/types/loaders/account.d.ts +28 -0
  14. package/dist/types/loaders/block.d.ts +16 -0
  15. package/dist/types/loaders/common/resolve-info.d.ts +3 -0
  16. package/dist/types/loaders/program-accounts.d.ts +28 -0
  17. package/dist/types/loaders/transaction.d.ts +39 -0
  18. package/dist/types/resolvers/account.d.ts +8 -0
  19. package/dist/types/rpc.d.ts +7 -2
  20. package/dist/types/schema/account.d.ts +124 -0
  21. package/dist/types/schema/block.d.ts +17 -0
  22. package/dist/types/schema/common/inputs.d.ts +3 -0
  23. package/dist/types/schema/common/scalars.d.ts +45 -0
  24. package/dist/types/schema/common/types.d.ts +27 -0
  25. package/dist/types/schema/index.d.ts +2 -0
  26. package/dist/types/schema/instruction.d.ts +954 -0
  27. package/dist/types/schema/program-accounts.d.ts +12 -0
  28. package/dist/types/schema/transaction.d.ts +16 -0
  29. package/package.json +17 -12
  30. package/dist/types/cache.d.ts +0 -7
  31. package/dist/types/schema/account/index.d.ts +0 -3
  32. package/dist/types/schema/account/query.d.ts +0 -38
  33. package/dist/types/schema/account/types.d.ts +0 -5
  34. package/dist/types/schema/block/index.d.ts +0 -3
  35. package/dist/types/schema/block/query.d.ts +0 -42
  36. package/dist/types/schema/block/types.d.ts +0 -7
  37. package/dist/types/schema/inputs.d.ts +0 -9
  38. package/dist/types/schema/picks.d.ts +0 -36
  39. package/dist/types/schema/program-accounts/index.d.ts +0 -2
  40. package/dist/types/schema/program-accounts/query.d.ts +0 -47
  41. package/dist/types/schema/program-accounts/types.d.ts +0 -3
  42. package/dist/types/schema/scalars.d.ts +0 -3
  43. package/dist/types/schema/transaction/index.d.ts +0 -3
  44. package/dist/types/schema/transaction/query.d.ts +0 -33
  45. package/dist/types/schema/transaction/types.d.ts +0 -12
@@ -1,22 +1,24 @@
1
- import { SolanaRpcMethods } from '@solana/rpc-core';
2
- import { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
3
- import { GraphQLCache } from './cache';
4
- import { AccountQueryArgs } from './schema/account/query';
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ import { createRpcGraphQL } from './rpc';
3
+ import { AccountQueryArgs } from './schema/account';
5
4
  import { BlockQueryArgs } from './schema/block';
6
5
  import { ProgramAccountsQueryArgs } from './schema/program-accounts';
7
- import { TransactionQueryArgs } from './schema/transaction/query';
6
+ import { TransactionQueryArgs } from './schema/transaction';
7
+ export type Rpc = Parameters<typeof createRpcGraphQL>[0];
8
+ type LoadFn<TArgs> = (args: TArgs, info?: GraphQLResolveInfo | undefined) => Promise<unknown>;
9
+ type Loader<TArgs> = {
10
+ load: LoadFn<TArgs>;
11
+ };
12
+ type RpcGraphQLLoaders = {
13
+ account: Loader<AccountQueryArgs>;
14
+ block: Loader<BlockQueryArgs>;
15
+ programAccounts: Loader<ProgramAccountsQueryArgs>;
16
+ transaction: Loader<TransactionQueryArgs>;
17
+ };
8
18
  export interface RpcGraphQLContext {
9
- cache: GraphQLCache;
10
- resolveAccount(args: AccountQueryArgs): ReturnType<typeof resolveAccount>;
11
- resolveBlock(args: BlockQueryArgs): ReturnType<typeof resolveBlock>;
12
- resolveProgramAccounts(args: ProgramAccountsQueryArgs): ReturnType<typeof resolveProgramAccounts>;
13
- resolveTransaction(args: TransactionQueryArgs): ReturnType<typeof resolveTransaction>;
14
- rpc: Rpc<SolanaRpcMethods>;
19
+ loaders: RpcGraphQLLoaders;
20
+ rpc: Rpc;
15
21
  }
16
- declare function resolveAccount({ address, encoding, ...config }: AccountQueryArgs, cache: GraphQLCache, rpc: Rpc<SolanaRpcMethods>): Promise<{} | null | undefined>;
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;
22
+ export declare function createSolanaGraphQLContext(rpc: Rpc): RpcGraphQLContext;
21
23
  export {};
22
24
  //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { Address } from '@solana/addresses';
2
+ import { GraphQLResolveInfo } from 'graphql';
3
+ import type { Rpc } from '../context';
4
+ import { AccountQueryArgs } from '../schema/account';
5
+ declare function normalizeArgs(args: AccountQueryArgs): {
6
+ address: Address;
7
+ commitment: "processed" | "confirmed" | "finalized";
8
+ dataSlice: Readonly<{
9
+ offset: number;
10
+ length: number;
11
+ }> | undefined;
12
+ encoding: "base58" | "base64" | "base64+zstd" | "jsonParsed";
13
+ minContextSlot: bigint | undefined;
14
+ };
15
+ export declare function refineJsonParsedAccountData(jsonParsedAccountData: any): {
16
+ data: any;
17
+ meta: {
18
+ program: any;
19
+ space: any;
20
+ type: any;
21
+ };
22
+ };
23
+ export declare function loadAccount(rpc: Rpc, { address, ...config }: ReturnType<typeof normalizeArgs>): Promise<any>;
24
+ export declare function createAccountLoader(rpc: Rpc): {
25
+ load: (args: AccountQueryArgs, info?: GraphQLResolveInfo) => Promise<any>;
26
+ };
27
+ export {};
28
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ import type { Rpc } from '../context';
3
+ import { BlockQueryArgs } from '../schema/block';
4
+ declare function normalizeArgs(args: BlockQueryArgs): {
5
+ commitment: import("@solana/rpc-types").Commitment;
6
+ encoding: "base58" | "base64" | "jsonParsed";
7
+ maxSupportedTransactionVersion: number;
8
+ slot: bigint;
9
+ transactionDetails: "accounts" | "full" | "none" | "signatures";
10
+ };
11
+ export declare function loadBlock(rpc: Rpc, { slot, ...config }: ReturnType<typeof normalizeArgs>): Promise<any>;
12
+ export declare function createBlockLoader(rpc: Rpc): {
13
+ load: (args: BlockQueryArgs, info?: GraphQLResolveInfo) => Promise<any>;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=block.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ export declare function onlyPresentFieldRequested(fieldName: string, info?: GraphQLResolveInfo): boolean;
3
+ //# sourceMappingURL=resolve-info.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ import type { Rpc } from '../context';
3
+ import { ProgramAccountsQueryArgs } from '../schema/program-accounts';
4
+ declare function normalizeArgs(args: ProgramAccountsQueryArgs): {
5
+ commitment: import("@solana/rpc-types").Commitment;
6
+ dataSlice: Readonly<{
7
+ offset: number;
8
+ length: number;
9
+ }> | undefined;
10
+ encoding: "base58" | "base64" | "base64+zstd" | "jsonParsed";
11
+ filters: (Readonly<{
12
+ offset: bigint;
13
+ bytes: string;
14
+ encoding: "base58" | "base64";
15
+ }> | Readonly<{
16
+ dataSize: bigint;
17
+ }>)[];
18
+ minContextSlot: bigint | undefined;
19
+ programAddress: import("@solana/addresses").Address;
20
+ };
21
+ export declare function loadProgramAccounts(rpc: Rpc, { programAddress, ...config }: ReturnType<typeof normalizeArgs>): Promise<any[]>;
22
+ export declare function createProgramAccountsLoader(rpc: Rpc): {
23
+ load: (args: ProgramAccountsQueryArgs, info?: GraphQLResolveInfo) => Promise<any[] | {
24
+ programAddress: import("@solana/addresses").Address;
25
+ }>;
26
+ };
27
+ export {};
28
+ //# sourceMappingURL=program-accounts.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { GraphQLResolveInfo } from 'graphql';
2
+ import type { Rpc } from '../context';
3
+ import { TransactionQueryArgs } from '../schema/transaction';
4
+ declare function normalizeArgs(args: TransactionQueryArgs): {
5
+ commitment: import("@solana/rpc-types").Commitment;
6
+ encoding: "base58" | "base64" | "jsonParsed";
7
+ maxSupportedTransactionVersion: number;
8
+ signature: import("@solana/keys").Signature;
9
+ };
10
+ export declare function refineJsonParsedTransaction({ encoding, transaction }: {
11
+ encoding: string;
12
+ transaction: any;
13
+ }): {
14
+ data: any;
15
+ encoding: string;
16
+ meta: any;
17
+ slot: any;
18
+ version: any;
19
+ };
20
+ export declare function loadTransaction(rpc: Rpc, { signature, ...config }: ReturnType<typeof normalizeArgs>): Promise<{
21
+ data: any;
22
+ encoding: string;
23
+ meta: any;
24
+ slot: any;
25
+ version: any;
26
+ } | null>;
27
+ export declare function createTransactionLoader(rpc: Rpc): {
28
+ load: (args: TransactionQueryArgs, info?: GraphQLResolveInfo) => Promise<{
29
+ data: any;
30
+ encoding: string;
31
+ meta: any;
32
+ slot: any;
33
+ version: any;
34
+ } | {
35
+ signature: import("@solana/keys").Signature;
36
+ } | null>;
37
+ };
38
+ export {};
39
+ //# sourceMappingURL=transaction.d.ts.map
@@ -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<unknown> | null;
8
+ //# sourceMappingURL=account.d.ts.map
@@ -1,7 +1,11 @@
1
- import { SolanaRpcMethods } from '@solana/rpc-core';
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<SolanaRpcMethods>): RpcGraphQL;
16
+ export declare function createRpcGraphQL(rpc: Rpc<RpcMethods>): RpcGraphQL;
17
+ export {};
13
18
  //# sourceMappingURL=rpc.d.ts.map
@@ -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: Address\n encoding: AccountEncoding\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: Address\n data: Base58EncodedBytes\n encoding: AccountEncoding\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: Address\n data: Base64EncodedBytes\n encoding: AccountEncoding\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: Address\n data: Base64ZstdEncodedBytes\n encoding: AccountEncoding\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: Address\n data: NonceAccountData\n encoding: AccountEncoding\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: Address\n data: LookupTableAccountData\n encoding: AccountEncoding\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: Address\n data: MintAccountData\n encoding: AccountEncoding\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: Address\n data: TokenAccountData\n encoding: AccountEncoding\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: Address\n data: StakeAccountData\n encoding: AccountEncoding\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: Address\n data: VoteAccountData\n encoding: AccountEncoding\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<unknown> | null;
25
+ };
26
+ AccountBase64: {
27
+ owner: (parent: {
28
+ [x: string]: Address;
29
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
30
+ };
31
+ AccountBase64Zstd: {
32
+ owner: (parent: {
33
+ [x: string]: Address;
34
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
35
+ };
36
+ NonceAccountData: {
37
+ authority: (parent: {
38
+ [x: string]: Address;
39
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
40
+ };
41
+ NonceAccount: {
42
+ owner: (parent: {
43
+ [x: string]: Address;
44
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
45
+ };
46
+ LookupTableAccountData: {
47
+ authority: (parent: {
48
+ [x: string]: Address;
49
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
50
+ };
51
+ LookupTableAccount: {
52
+ owner: (parent: {
53
+ [x: string]: Address;
54
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
55
+ };
56
+ MintAccountData: {
57
+ freezeAuthority: (parent: {
58
+ [x: string]: Address;
59
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
60
+ mintAuthority: (parent: {
61
+ [x: string]: Address;
62
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
63
+ };
64
+ MintAccount: {
65
+ owner: (parent: {
66
+ [x: string]: Address;
67
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
68
+ };
69
+ TokenAccountData: {
70
+ mint: (parent: {
71
+ [x: string]: Address;
72
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
73
+ owner: (parent: {
74
+ [x: string]: Address;
75
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
76
+ };
77
+ TokenAccount: {
78
+ owner: (parent: {
79
+ [x: string]: Address;
80
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
81
+ };
82
+ StakeAccountDataMetaAuthorized: {
83
+ staker: (parent: {
84
+ [x: string]: Address;
85
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
86
+ withdrawer: (parent: {
87
+ [x: string]: Address;
88
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
89
+ };
90
+ StakeAccountDataMetaLockup: {
91
+ custodian: (parent: {
92
+ [x: string]: Address;
93
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
94
+ };
95
+ StakeAccountDataStakeDelegation: {
96
+ voter: (parent: {
97
+ [x: string]: Address;
98
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
99
+ };
100
+ StakeAccount: {
101
+ owner: (parent: {
102
+ [x: string]: Address;
103
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
104
+ };
105
+ VoteAccountDataAuthorizedVoter: {
106
+ authorizedVoter: (parent: {
107
+ [x: string]: Address;
108
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
109
+ };
110
+ VoteAccountData: {
111
+ authorizedWithdrawer: (parent: {
112
+ [x: string]: Address;
113
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
114
+ node: (parent: {
115
+ [x: string]: Address;
116
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
117
+ };
118
+ VoteAccount: {
119
+ owner: (parent: {
120
+ [x: string]: Address;
121
+ }, args: AccountQueryArgs, context: import("../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
122
+ };
123
+ };
124
+ //# sourceMappingURL=account.d.ts.map
@@ -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: [Address]\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,3 @@
1
+ export declare const inputTypeDefs = "\n input DataSlice {\n offset: Int\n length: Int\n }\n\n input ProgramAccountsFilter {\n bytes: BigInt\n dataSize: BigInt\n encoding: AccountEncoding\n offset: BigInt\n }\n";
2
+ export declare const inputResolvers: {};
3
+ //# sourceMappingURL=inputs.d.ts.map
@@ -0,0 +1,45 @@
1
+ import { Kind } from 'graphql';
2
+ export declare const scalarTypeDefs = "\n scalar Address\n scalar Base58EncodedBytes\n scalar Base64EncodedBytes\n scalar Base64ZstdEncodedBytes\n scalar BigInt\n";
3
+ export declare const scalarResolvers: {
4
+ Address: {
5
+ __parseLiteral(ast: {
6
+ kind: Kind;
7
+ value: string | number | bigint | boolean;
8
+ }): string | null;
9
+ __parseValue(value: string): string;
10
+ __serialize(value: string): string;
11
+ };
12
+ Base58EncodedBytes: {
13
+ __parseLiteral(ast: {
14
+ kind: Kind;
15
+ value: string | number | bigint | boolean;
16
+ }): string | null;
17
+ __parseValue(value: string): string;
18
+ __serialize(value: string): string;
19
+ };
20
+ Base64EncodedBytes: {
21
+ __parseLiteral(ast: {
22
+ kind: Kind;
23
+ value: string | number | bigint | boolean;
24
+ }): string | null;
25
+ __parseValue(value: string): string;
26
+ __serialize(value: string): string;
27
+ };
28
+ Base64ZstdEncodedBytes: {
29
+ __parseLiteral(ast: {
30
+ kind: Kind;
31
+ value: string | number | bigint | boolean;
32
+ }): string | null;
33
+ __parseValue(value: string): string;
34
+ __serialize(value: string): string;
35
+ };
36
+ BigInt: {
37
+ __parseLiteral(ast: {
38
+ kind: Kind;
39
+ value: string | number | bigint | boolean;
40
+ }): bigint | null;
41
+ __parseValue(value: string): bigint;
42
+ __serialize(value: string): bigint;
43
+ };
44
+ };
45
+ //# sourceMappingURL=scalars.d.ts.map
@@ -0,0 +1,27 @@
1
+ export declare const commonTypeDefs = "\n enum AccountEncoding {\n BASE_58\n BASE_64\n BASE_64_ZSTD\n PARSED\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 type ReturnData {\n data: Base64EncodedBytes\n programId: Address\n }\n\n type Reward {\n commission: Int\n lamports: BigInt\n postBalance: BigInt\n pubkey: Address\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: Address\n uiTokenAmount: TokenAmount\n }\n\n enum TransactionEncoding {\n BASE_58\n BASE_64\n PARSED\n }\n\n enum TransactionVersion {\n LEGACY\n ZERO\n }\n";
2
+ export declare const commonResolvers: {
3
+ AccountEncoding: {
4
+ BASE_58: string;
5
+ BASE_64: string;
6
+ BASE_64_ZSTD: string;
7
+ PARSED: string;
8
+ };
9
+ TokenBalance: {
10
+ mint: (parent: {
11
+ [x: string]: import("@solana/addresses").Address;
12
+ }, args: import("../account").AccountQueryArgs, context: import("../../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
13
+ owner: (parent: {
14
+ [x: string]: import("@solana/addresses").Address;
15
+ }, args: import("../account").AccountQueryArgs, context: import("../../context").RpcGraphQLContext, info: import("graphql").GraphQLResolveInfo | undefined) => Promise<unknown> | null;
16
+ };
17
+ TransactionEncoding: {
18
+ BASE_58: string;
19
+ BASE_64: string;
20
+ PARSED: string;
21
+ };
22
+ TransactionVersion: {
23
+ LEGACY: string;
24
+ ZERO: number;
25
+ };
26
+ };
27
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function createSolanaGraphQLSchema(): import("graphql").GraphQLSchema;
2
+ //# sourceMappingURL=index.d.ts.map