Files
api/packages/jsonrpc/src/create/param.ts
T
Jaco Greeff ad2b1abdc9 Move @polakdot/jsonrpc -> packages/jsonrpc (#1874)
* Move @polakdot/jsonrpc -> packages/jsonrpc

* Update links
2020-02-16 17:41:45 +01:00

20 lines
563 B
TypeScript

// Copyright 2017-2020 @polkadot/jsonrpc authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { InterfaceTypes } from '@polkadot/types/types';
import { RpcParam } from '../types';
interface RpcParamOptions {
isOptional?: boolean;
}
/** @internal */
export default function createParam (name: string, type: InterfaceTypes, { isOptional = false }: RpcParamOptions = { isOptional: false }): RpcParam {
return {
isOptional,
name,
type
};
}