Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Move BigInt JSON parse and strigify functions to rpc-spec-types
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Oct 24, 2024
1 parent 7b90a8d commit e58940e
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 4 deletions.
10 changes: 9 additions & 1 deletion packages/library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export * from '@solana/rpc';
export * from '@solana/rpc-parsed-types';
export * from '@solana/rpc-subscriptions';
export * from '@solana/rpc-types';
export * from '@solana/rpc-spec-types';
export * from '@solana/signers';
export * from '@solana/transaction-messages';
export * from '@solana/transactions';
Expand All @@ -20,3 +19,12 @@ export * from './decode-transaction-message';
export * from './send-and-confirm-durable-nonce-transaction';
export * from './send-and-confirm-transaction';
export * from './send-transaction-without-confirming';

export type {
RpcRequest,
RpcRequestTransformer,
RpcResponse,
RpcResponseData,
RpcResponseTransformer,
} from '@solana/rpc-spec-types';
export { createRpcMessage } from '@solana/rpc-spec-types';
2 changes: 2 additions & 0 deletions packages/rpc-spec-types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export * from './overloads';
export * from './parse-json-with-bigints';
export * from './rpc-message';
export * from './rpc-request';
export * from './rpc-response';
export * from './stringify-json-with-bigints';
export * from './type-helpers';
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { RpcTransport } from '@solana/rpc-spec';
import { parseJsonWithBigInts, stringifyJsonWithBigints } from '@solana/rpc-spec-types';
import type Dispatcher from 'undici-types/dispatcher';

import { createHttpTransport } from './http-transport';
import { AllowedHttpRequestHeaders } from './http-transport-headers';
import { isSolanaRequest } from './is-solana-request';
import { parseJsonWithBigInts } from './parse-json-with-bigints';
import { stringifyJsonWithBigints } from './stringify-json-with-bigints';

type Config = Readonly<{
dispatcher_NODE_ONLY?: Dispatcher;
Expand Down
6 changes: 5 additions & 1 deletion packages/rpc-transport-http/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
},
"display": "@solana/rpc-transport-http",
"extends": "../tsconfig/base.json",
"include": ["src"]
"include": [
"src",
"../rpc-spec-types/src/parse-json-with-bigints.ts",
"../rpc-spec-types/src/stringify-json-with-bigints.ts"
]
}

0 comments on commit e58940e

Please sign in to comment.