UNPKG

@airgap/coinlib-core

Version:

The @airgap/coinlib-core is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

18 lines 718 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasConfigurableContract = exports.implementsInterface = void 0; function implementsInterface(object, schema) { if (typeof object !== 'object' || !object) { return false; } return Object.keys(schema).every(function (key) { return schema[key] === 'optional' || object[key] !== undefined; }); } exports.implementsInterface = implementsInterface; function hasConfigurableContract(object) { return implementsInterface(object, { getContractAddress: 'required', setContractAddress: 'required' }); } exports.hasConfigurableContract = hasConfigurableContract; //# sourceMappingURL=interfaces.js.map