@solana/rpc-graphql 2.0.0-experimental.b419cd0 → 2.0.0-experimental.b7674ea

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.
@@ -1,7 +1,6 @@
1
1
  import { GraphQLResolveInfo } from 'graphql';
2
2
  import { GraphQLCache } from './cache';
3
3
  import { loadProgramAccounts } from './loaders/program-accounts';
4
- import { loadTransaction } from './loaders/transaction';
5
4
  import { createRpcGraphQL } from './rpc';
6
5
  import { AccountQueryArgs } from './schema/account';
7
6
  import { BlockQueryArgs } from './schema/block';
@@ -11,12 +10,15 @@ export type Rpc = Parameters<typeof createRpcGraphQL>[0];
11
10
  type Loader<TArgs> = {
12
11
  load: (args: TArgs, info?: GraphQLResolveInfo | undefined) => Promise<unknown>;
13
12
  };
13
+ type Loaders = {
14
+ account: Loader<AccountQueryArgs>;
15
+ block: Loader<BlockQueryArgs>;
16
+ transaction: Loader<TransactionQueryArgs>;
17
+ };
14
18
  export interface RpcGraphQLContext {
15
19
  cache: GraphQLCache;
16
- accountLoader: Loader<AccountQueryArgs>;
17
- blockLoader: Loader<BlockQueryArgs>;
18
20
  loadProgramAccounts(args: ProgramAccountsQueryArgs, info?: GraphQLResolveInfo): ReturnType<typeof loadProgramAccounts>;
19
- loadTransaction(args: TransactionQueryArgs, info?: GraphQLResolveInfo): ReturnType<typeof loadTransaction>;
21
+ loaders: Loaders;
20
22
  rpc: Rpc;
21
23
  }
22
24
  export declare function createSolanaGraphQLContext(rpc: Rpc): RpcGraphQLContext;
@@ -1,7 +1,12 @@
1
1
  import { GraphQLResolveInfo } from 'graphql';
2
- import { GraphQLCache } from '../cache';
3
2
  import type { Rpc } from '../context';
4
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
+ };
5
10
  export declare function refineJsonParsedTransaction({ encoding, transaction }: {
6
11
  encoding: string;
7
12
  transaction: any;
@@ -12,5 +17,23 @@ export declare function refineJsonParsedTransaction({ encoding, transaction }: {
12
17
  slot: any;
13
18
  version: any;
14
19
  };
15
- export declare function loadTransaction({ signature, ...config }: TransactionQueryArgs, cache: GraphQLCache, rpc: Rpc, _info?: GraphQLResolveInfo): Promise<{} | null | undefined>;
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 {};
16
39
  //# sourceMappingURL=transaction.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/rpc-graphql",
3
- "version": "2.0.0-experimental.b419cd0",
3
+ "version": "2.0.0-experimental.b7674ea",
4
4
  "description": "A library for resolving GraphQl query calls to the Solana JSON RPC API",
5
5
  "exports": {
6
6
  "browser": {
@@ -70,13 +70,13 @@
70
70
  "tsup": "7.2.0",
71
71
  "typescript": "^5.1.6",
72
72
  "version-from-git": "^1.1.1",
73
- "@solana/addresses": "2.0.0-experimental.b419cd0",
74
- "@solana/rpc-core": "2.0.0-experimental.b419cd0",
75
- "@solana/rpc-transport": "2.0.0-experimental.b419cd0",
76
- "@solana/keys": "2.0.0-experimental.b419cd0",
77
- "@solana/rpc-types": "2.0.0-experimental.b419cd0",
73
+ "@solana/addresses": "2.0.0-experimental.b7674ea",
74
+ "@solana/keys": "2.0.0-experimental.b7674ea",
75
+ "@solana/rpc-core": "2.0.0-experimental.b7674ea",
76
+ "@solana/rpc-transport": "2.0.0-experimental.b7674ea",
77
+ "@solana/rpc-types": "2.0.0-experimental.b7674ea",
78
78
  "build-scripts": "0.0.0",
79
- "@solana/transactions": "2.0.0-experimental.b419cd0",
79
+ "@solana/transactions": "2.0.0-experimental.b7674ea",
80
80
  "test-config": "0.0.0",
81
81
  "tsconfig": "0.0.0"
82
82
  },