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