@0xcert/ethereum-http-provider
Version:
Implementation of HTTP communication provider for the Ethereum blockchain.
31 lines (30 loc) • 1.17 kB
TypeScript
import { GatewayConfig, GenericProvider, SignMethod } from '@0xcert/ethereum-generic-provider';
export interface HttpProviderOptions {
accountId?: string;
cache?: 'default' | 'no-cache' | 'reload' | 'force-cache' | 'only-if-cached' | string;
credentials?: 'include' | 'same-origin' | 'omit' | string;
headers?: {
[key: string]: string;
};
mode?: 'no-cors' | 'cors' | 'same-origin' | string;
redirect?: 'manual' | 'follow' | 'error' | string;
signMethod?: SignMethod;
unsafeRecipientIds?: string[];
assetLedgerSource?: string;
valueLedgerSource?: string;
requiredConfirmations?: number;
gatewayConfig?: GatewayConfig;
mutationTimeout?: number;
url: string;
gasPriceMultiplier?: number;
retryGasPriceMultiplier?: number;
sandbox?: Boolean;
verbose?: Boolean;
}
export declare class HttpProvider extends GenericProvider {
protected _options: HttpProviderOptions;
constructor(options: HttpProviderOptions);
static getInstance(options: HttpProviderOptions): HttpProvider;
isSupported(): boolean;
send(data: any, callback: (err: any, data: any) => any): Promise<any>;
}