UNPKG

@bigmi/core

Version:

TypeScript library for Bitcoin apps.

17 lines 612 B
import { createTransport } from '../factories/createTransport.js'; /** * @description Creates a custom transport given an EIP-1193 compliant `request` attribute. */ export function custom(provider, config = {}) { const { key = 'custom', methods, name = 'Custom Provider', retryDelay, } = config; return ({ retryCount: defaultRetryCount }) => createTransport({ key, methods, name, request: provider.request.bind(provider), retryCount: config.retryCount ?? defaultRetryCount, retryDelay, type: 'custom', }); } //# sourceMappingURL=custom.js.map