@ledgerhq/coin-celo
Version:
26 lines • 1.03 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const eip55_1 = __importDefault(require("eip55"));
/*
NOTE: we should use the evm resolver for celo, but due to the signer types conflicting for now
we are using a separate resolver
*/
const resolver = (signerContext) => {
return async (deviceId, { path, verify, currency }) => {
const { address, publicKey } = await signerContext(deviceId, signer => {
/* istanbul ignore next: optional chaining + undefined is a valid value */
const chainId = currency?.ethereumLikeInfo?.chainId.toString();
return signer.getAddress(path, verify, false, chainId);
});
return {
address: eip55_1.default.encode(address),
publicKey,
path,
};
};
};
exports.default = resolver;
//# sourceMappingURL=hw-getAddress.js.map