UNPKG

494 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = send;
7
8// Copyright 2017-2018 @polkadot/api-provider authors & contributors
9// This software may be modified and distributed under the terms
10// of the ISC license. See the LICENSE file for details.
11async function send({
12 requests,
13 db
14}, method, params) {
15 if (!requests[method]) {
16 throw new Error(`provider.send: Invalid method '${method}'`);
17 }
18
19 return requests[method](db, params);
20}
\No newline at end of file