@psalomo/jsonrpc-client 0.5.0 → 1.0.1

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 +1 @@
1
- {"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../src/generated-types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,sCAAsC,EACtC,qCAAqC,EACrC,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,mCAAmC,EACnC,oCAAoC,EACpC,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,CACjB,MAAM,CAAC,EAAE,mCAAmC,GAC3C,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC3C,0BAA0B,CACxB,MAAM,CAAC,EAAE,6BAA6B,GACrC,OAAO,CAAC,oCAAoC,CAAC,CAAC;IACjD,2BAA2B,CACzB,MAAM,CAAC,EAAE,yBAAyB,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC,y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AC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;QACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAExB,aAAa,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;QACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3B,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC5B;AAGD,MAAM,WAAW,uBACf,SAAQ,iBAAiB,EACvB,kBAAkB;IAEpB,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACvC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB"}
1
+ {"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../src/generated-types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,sCAAsC,EACtC,qCAAqC,EACrC,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,0BA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B,WAAW,CAC/B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAGD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC,CAE1C;AAGD,wBAAsB,KAAK,CACzB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAE3B;AAGD,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,yBAAyB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAGD,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAE5B;AAGD,wBAAsB,EAAE,CACtB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,2BAA2B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAGD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAE/B"}
package/dist/index.d.mts CHANGED
@@ -1,67 +1,25 @@
1
- import { RpcStateChangesInBlockByTypeRequest, RpcStateChangesInBlockResponse, RpcStateChangesInBlockRequest, RpcStateChangesInBlockByTypeResponse, RpcCongestionLevelRequest, RpcCongestionLevelResponse, GenesisConfigRequest, GenesisConfig, RpcLightClientBlockProofRequest, RpcLightClientBlockProofResponse, RpcLightClientExecutionProofRequest, RpcLightClientExecutionProofResponse, RpcMaintenanceWindowsRequest, EXPERIMENTALMaintenanceWindowsResponse, RpcProtocolConfigRequest, RpcProtocolConfigResponse, RpcReceiptRequest, RpcReceiptResponse, RpcSplitStorageInfoRequest, RpcSplitStorageInfoResponse, RpcTransactionStatusRequest, RpcTransactionResponse, RpcValidatorsOrderedRequest, EXPERIMENTALValidatorsOrderedResponse, RpcBlockRequest, RpcBlockResponse, RpcSendTransactionRequest, CryptoHash, RpcChunkRequest, RpcChunkResponse, RpcClientConfigRequest, RpcClientConfigResponse, RpcGasPriceRequest, RpcGasPriceResponse, RpcHealthRequest, RpcHealthResponse, RpcNetworkInfoRequest, RpcNetworkInfoResponse, RpcLightClientNextBlockRequest, RpcLightClientNextBlockResponse, RpcQueryRequest, RpcQueryResponse, RpcStatusRequest, RpcStatusResponse, RpcValidatorRequest, RpcValidatorResponse, AccountView, CallResult, AccessKeyView, RPC_METHODS } from '@near-js/jsonrpc-types';
1
+ import { RpcStateChangesInBlockByTypeRequest, RpcStateChangesInBlockResponse, RpcStateChangesInBlockRequest, RpcStateChangesInBlockByTypeResponse, RpcCongestionLevelRequest, RpcCongestionLevelResponse, GenesisConfigRequest, GenesisConfig, RpcLightClientBlockProofRequest, RpcLightClientBlockProofResponse, RpcLightClientExecutionProofRequest, RpcLightClientExecutionProofResponse, RpcMaintenanceWindowsRequest, EXPERIMENTALMaintenanceWindowsResponse, RpcProtocolConfigRequest, RpcProtocolConfigResponse, RpcReceiptRequest, RpcReceiptResponse, RpcSplitStorageInfoRequest, RpcSplitStorageInfoResponse, RpcTransactionStatusRequest, RpcTransactionResponse, RpcValidatorsOrderedRequest, EXPERIMENTALValidatorsOrderedResponse, RpcBlockRequest, RpcBlockResponse, RpcSendTransactionRequest, CryptoHash, RpcChunkRequest, RpcChunkResponse, RpcClientConfigRequest, RpcClientConfigResponse, RpcGasPriceRequest, RpcGasPriceResponse, RpcHealthRequest, RpcHealthResponse, RpcNetworkInfoRequest, RpcNetworkInfoResponse, RpcLightClientNextBlockRequest, RpcLightClientNextBlockResponse, RpcQueryRequest, RpcQueryResponse, RpcStatusRequest, RpcStatusResponse, RpcValidatorRequest, RpcValidatorResponse, AccountView, CallResult, AccessKeyView } from '@near-js/jsonrpc-types';
2
2
  export { JsonRpcRequestSchema, JsonRpcResponseSchema, RPC_METHODS } from '@near-js/jsonrpc-types';
3
3
 
4
- interface DynamicRpcMethods {
5
- experimentalChanges(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
6
- experimentalChangesInBlock(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
7
- experimentalCongestionLevel(params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
8
- experimentalGenesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
9
- experimentalLightClientBlockProof(params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
10
- experimentalLightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
11
- experimentalMaintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
12
- experimentalProtocolConfig(params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
13
- experimentalReceipt(params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
14
- experimentalSplitStorageInfo(params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
15
- experimentalTxStatus(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
16
- experimentalValidatorsOrdered(params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
17
- block(params?: RpcBlockRequest): Promise<RpcBlockResponse>;
18
- broadcastTxAsync(params?: RpcSendTransactionRequest): Promise<CryptoHash>;
19
- broadcastTxCommit(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
20
- changes(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
21
- chunk(params?: RpcChunkRequest): Promise<RpcChunkResponse>;
22
- clientConfig(params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
23
- gasPrice(params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
24
- health(params?: RpcHealthRequest): Promise<RpcHealthResponse>;
25
- lightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
26
- networkInfo(params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
27
- nextLightClientBlock(params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
28
- query(params?: RpcQueryRequest): Promise<RpcQueryResponse>;
29
- sendTx(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
30
- status(params?: RpcStatusRequest): Promise<RpcStatusResponse>;
31
- tx(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
32
- validators(params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
33
- }
34
- interface ConvenienceMethods {
35
- viewAccount(params: {
36
- accountId: string;
37
- finality?: 'final' | 'near-final' | 'optimistic';
38
- blockId?: string | number;
39
- }): Promise<AccountView>;
40
- viewFunction(params: {
41
- accountId: string;
42
- methodName: string;
43
- argsBase64?: string;
44
- finality?: 'final' | 'near-final' | 'optimistic';
45
- blockId?: string | number;
46
- }): Promise<CallResult>;
47
- viewAccessKey(params: {
48
- accountId: string;
49
- publicKey: string;
50
- finality?: 'final' | 'near-final' | 'optimistic';
51
- blockId?: string | number;
52
- }): Promise<AccessKeyView>;
53
- }
54
- interface CompleteClientInterface extends DynamicRpcMethods, ConvenienceMethods {
55
- call<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
4
+ interface ValidationResult {
5
+ validateRequest: (request: JsonRpcRequest) => void;
6
+ validateResponse: (response: JsonRpcResponse) => void;
7
+ validateMethodRequest?: (method: string, request: JsonRpcRequest) => void;
8
+ validateMethodResponse?: (method: string, response: JsonRpcResponse) => void;
56
9
  }
10
+ /**
11
+ * Enable validation for the client
12
+ * This function should only be called if you want to include schema validation
13
+ * Calling this function will include Zod schemas in your bundle
14
+ */
15
+ declare function enableValidation(): ValidationResult;
57
16
 
58
- type RpcMethod = (typeof RPC_METHODS)[number];
59
17
  interface ClientConfig {
60
18
  endpoint: string;
61
19
  headers?: Record<string, string>;
62
20
  timeout?: number;
63
21
  retries?: number;
64
- validateResponses?: boolean;
22
+ validation?: ValidationResult;
65
23
  }
66
24
  interface JsonRpcRequest<T = unknown> {
67
25
  jsonrpc: '2.0';
@@ -86,29 +44,32 @@ declare class JsonRpcClientError extends Error {
86
44
  constructor(message: string, code?: number | undefined, data?: unknown | undefined);
87
45
  }
88
46
  declare class JsonRpcNetworkError extends Error {
89
- originalError: Error;
90
- constructor(message: string, originalError: Error);
47
+ originalError?: Error | undefined;
48
+ constructor(message: string, originalError?: Error | undefined);
91
49
  }
92
-
50
+ /**
51
+ * NEAR RPC Client with static function architecture
52
+ * This client only holds configuration and provides a makeRequest method
53
+ * Individual RPC methods are provided as standalone functions that take this client as a parameter
54
+ */
93
55
  declare class NearRpcClient {
94
- private endpoint;
95
- private headers;
96
- private timeout;
97
- private retries;
98
- private validateResponses;
56
+ readonly endpoint: string;
57
+ readonly headers: Record<string, string>;
58
+ readonly timeout: number;
59
+ readonly retries: number;
60
+ private readonly validation?;
99
61
  constructor(config: string | ClientConfig);
100
62
  /**
101
- * Get request ID matching NEAR RPC documentation examples
63
+ * Make a raw JSON-RPC request
64
+ * This is used internally by the standalone RPC functions
102
65
  */
103
- private getRequestId;
66
+ makeRequest<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
104
67
  /**
105
- * Make a raw JSON-RPC call
106
- * This method is public to allow dynamic calls to any RPC method
68
+ * Create a new client with modified configuration
107
69
  */
108
- call<TParams = unknown, TResult = unknown>(method: RpcMethod, params?: TParams): Promise<TResult>;
109
- }
110
- interface NearRpcClient extends DynamicRpcMethods, ConvenienceMethods {
70
+ withConfig(config: Partial<ClientConfig>): NearRpcClient;
111
71
  }
72
+ declare const defaultClient: NearRpcClient;
112
73
 
113
74
  interface RpcRequest {
114
75
  jsonrpc: '2.0';
@@ -133,4 +94,105 @@ declare class NearRpcError extends Error {
133
94
  constructor(code: number, message: string, data?: unknown | undefined);
134
95
  }
135
96
 
136
- export { type ClientConfig, type CompleteClientInterface, type ConvenienceMethods, type DynamicRpcMethods, JsonRpcClientError, type JsonRpcError, JsonRpcNetworkError, type JsonRpcRequest, type JsonRpcResponse, NearRpcClient, NearRpcError, type RpcError, type RpcRequest, type RpcResponse, NearRpcClient as default };
97
+ interface DynamicRpcMethods {
98
+ experimentalChanges(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
99
+ experimentalChangesInBlock(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
100
+ experimentalCongestionLevel(params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
101
+ experimentalGenesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
102
+ experimentalLightClientBlockProof(params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
103
+ experimentalLightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
104
+ experimentalMaintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
105
+ experimentalProtocolConfig(params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
106
+ experimentalReceipt(params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
107
+ experimentalSplitStorageInfo(params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
108
+ experimentalTxStatus(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
109
+ experimentalValidatorsOrdered(params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
110
+ block(params?: RpcBlockRequest): Promise<RpcBlockResponse>;
111
+ broadcastTxAsync(params?: RpcSendTransactionRequest): Promise<CryptoHash>;
112
+ broadcastTxCommit(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
113
+ changes(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
114
+ chunk(params?: RpcChunkRequest): Promise<RpcChunkResponse>;
115
+ clientConfig(params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
116
+ gasPrice(params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
117
+ health(params?: RpcHealthRequest): Promise<RpcHealthResponse>;
118
+ lightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
119
+ networkInfo(params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
120
+ nextLightClientBlock(params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
121
+ query(params?: RpcQueryRequest): Promise<RpcQueryResponse>;
122
+ sendTx(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
123
+ status(params?: RpcStatusRequest): Promise<RpcStatusResponse>;
124
+ tx(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
125
+ validators(params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
126
+ }
127
+ interface ConvenienceMethods {
128
+ viewAccount(params: {
129
+ accountId: string;
130
+ finality?: 'final' | 'near-final' | 'optimistic';
131
+ blockId?: string | number;
132
+ }): Promise<AccountView>;
133
+ viewFunction(params: {
134
+ accountId: string;
135
+ methodName: string;
136
+ argsBase64?: string;
137
+ finality?: 'final' | 'near-final' | 'optimistic';
138
+ blockId?: string | number;
139
+ }): Promise<CallResult>;
140
+ viewAccessKey(params: {
141
+ accountId: string;
142
+ publicKey: string;
143
+ finality?: 'final' | 'near-final' | 'optimistic';
144
+ blockId?: string | number;
145
+ }): Promise<AccessKeyView>;
146
+ }
147
+ interface CompleteClientInterface extends DynamicRpcMethods, ConvenienceMethods {
148
+ call<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
149
+ }
150
+ declare function experimentalChanges(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
151
+ declare function experimentalChangesInBlock(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
152
+ declare function experimentalCongestionLevel(client: NearRpcClient, params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
153
+ declare function experimentalGenesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
154
+ declare function experimentalLightClientBlockProof(client: NearRpcClient, params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
155
+ declare function experimentalLightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
156
+ declare function experimentalMaintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
157
+ declare function experimentalProtocolConfig(client: NearRpcClient, params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
158
+ declare function experimentalReceipt(client: NearRpcClient, params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
159
+ declare function experimentalSplitStorageInfo(client: NearRpcClient, params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
160
+ declare function experimentalTxStatus(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
161
+ declare function experimentalValidatorsOrdered(client: NearRpcClient, params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
162
+ declare function block(client: NearRpcClient, params?: RpcBlockRequest): Promise<RpcBlockResponse>;
163
+ declare function broadcastTxAsync(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<CryptoHash>;
164
+ declare function broadcastTxCommit(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
165
+ declare function changes(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
166
+ declare function chunk(client: NearRpcClient, params?: RpcChunkRequest): Promise<RpcChunkResponse>;
167
+ declare function clientConfig(client: NearRpcClient, params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
168
+ declare function gasPrice(client: NearRpcClient, params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
169
+ declare function health(client: NearRpcClient, params?: RpcHealthRequest): Promise<RpcHealthResponse>;
170
+ declare function lightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
171
+ declare function networkInfo(client: NearRpcClient, params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
172
+ declare function nextLightClientBlock(client: NearRpcClient, params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
173
+ declare function query(client: NearRpcClient, params?: RpcQueryRequest): Promise<RpcQueryResponse>;
174
+ declare function sendTx(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
175
+ declare function status(client: NearRpcClient, params?: RpcStatusRequest): Promise<RpcStatusResponse>;
176
+ declare function tx(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
177
+ declare function validators(client: NearRpcClient, params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
178
+
179
+ declare function viewAccount(client: NearRpcClient, params: {
180
+ accountId: string;
181
+ finality?: 'final' | 'near-final' | 'optimistic';
182
+ blockId?: string | number;
183
+ }): Promise<AccountView>;
184
+ declare function viewFunction(client: NearRpcClient, params: {
185
+ accountId: string;
186
+ methodName: string;
187
+ argsBase64?: string;
188
+ finality?: 'final' | 'near-final' | 'optimistic';
189
+ blockId?: string | number;
190
+ }): Promise<CallResult>;
191
+ declare function viewAccessKey(client: NearRpcClient, params: {
192
+ accountId: string;
193
+ publicKey: string;
194
+ finality?: 'final' | 'near-final' | 'optimistic';
195
+ blockId?: string | number;
196
+ }): Promise<AccessKeyView>;
197
+
198
+ export { type ClientConfig, type CompleteClientInterface, type ConvenienceMethods, type DynamicRpcMethods, JsonRpcClientError, type JsonRpcError, JsonRpcNetworkError, type JsonRpcRequest, type JsonRpcResponse, NearRpcClient, NearRpcError, type RpcError, type RpcRequest, type RpcResponse, block, broadcastTxAsync, broadcastTxCommit, changes, chunk, clientConfig, NearRpcClient as default, defaultClient, enableValidation, experimentalChanges, experimentalChangesInBlock, experimentalCongestionLevel, experimentalGenesisConfig, experimentalLightClientBlockProof, experimentalLightClientProof, experimentalMaintenanceWindows, experimentalProtocolConfig, experimentalReceipt, experimentalSplitStorageInfo, experimentalTxStatus, experimentalValidatorsOrdered, gasPrice, health, lightClientProof, networkInfo, nextLightClientBlock, query, sendTx, status, tx, validators, viewAccessKey, viewAccount, viewFunction };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  export * from './client';
2
2
  export * from './types';
3
- export * from './generated-types';
3
+ export { NearRpcClient, defaultClient } from './client';
4
+ export type { DynamicRpcMethods, ConvenienceMethods, CompleteClientInterface, } from './generated-types';
4
5
  export { JsonRpcRequestSchema, JsonRpcResponseSchema, } from '@near-js/jsonrpc-types';
5
6
  export { RPC_METHODS } from '@near-js/jsonrpc-types';
7
+ export * from './generated-functions';
8
+ export { enableValidation } from './validation.js';
6
9
  export { NearRpcClient as default } from './client';
7
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGxD,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,cAAc,uBAAuB,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}