parent
b1ca749fb7
commit
75a238a425
@ -1,4 +1,4 @@ |
||||
import { RPCRequestPayload } from './types'; |
||||
import { RPCRequestPayload } from '../types'; |
||||
import { RPCMethod } from './rpc'; |
||||
/** |
||||
* @class JsonRpc |
@ -1,9 +1,15 @@ |
||||
export * from './baseProvider'; |
||||
export * from './defaultFetcher'; |
||||
export * from './messenger'; |
||||
export * from './rpcBuilder'; |
||||
// provider related
|
||||
export * from './providers/baseProvider'; |
||||
export * from './providers/defaultFetcher'; |
||||
export * from './providers/http'; |
||||
// messenger and middlewares
|
||||
export * from './messenger/messenger'; |
||||
export * from './messenger/responseMiddleware'; |
||||
// rpc builder and blockchain method
|
||||
export * from './blockchain/rpcBuilder'; |
||||
export * from './blockchain/net'; |
||||
export * from './blockchain/rpc'; |
||||
// utils
|
||||
export * from './util'; |
||||
export * from './http'; |
||||
export * from './net'; |
||||
export * from './rpc'; |
||||
// types
|
||||
export * from './types'; |
||||
|
@ -1,8 +1,8 @@ |
||||
import { JsonRpc } from './rpcbuilder'; |
||||
import { JsonRpc } from '../blockchain/rpcbuilder'; |
||||
import { ResponseMiddleware } from './responseMiddleware'; |
||||
import { HttpProvider } from './http'; |
||||
import { getResultForData } from './util'; |
||||
import { RPCMethod } from './rpc'; |
||||
import { HttpProvider } from '../providers/http'; |
||||
import { getResultForData } from '../util'; |
||||
import { RPCMethod } from '../blockchain/rpc'; |
||||
|
||||
const defaultConfig = { |
||||
Default: { |
@ -1,4 +1,4 @@ |
||||
import { RPCResponseBody } from './types'; |
||||
import { RPCResponseBody } from '../types'; |
||||
/** |
||||
* @class ResponseMiddleware |
||||
* @description Response middleware of RPC |
@ -1,5 +1,5 @@ |
||||
import { ReqMiddleware, ResMiddleware, MiddlewareType } from './types'; |
||||
import { RPCMethod } from './rpc'; |
||||
import { ReqMiddleware, ResMiddleware, MiddlewareType } from '../types'; |
||||
import { RPCMethod } from '../blockchain/rpc'; |
||||
|
||||
class BaseProvider { |
||||
middlewares = { |
@ -1,5 +1,5 @@ |
||||
import fetch from 'cross-fetch'; |
||||
import { RPCRequest, RPCResponseBody, RPCError, RPCResult } from './types'; |
||||
import { RPCRequest, RPCResponseBody, RPCError, RPCResult } from '../types'; |
||||
|
||||
export const fetchRPC = { |
||||
requestHandler: (request: RPCRequest<any[]>, headers: any) => |
Loading…
Reference in new issue