@etherspot/remote-signer
Version:
Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler
39 lines (37 loc) • 795 B
JavaScript
import {
concat,
pad
} from "./chunk-VPBLFL5G.mjs";
// src/sdk/common/utils/userop-utils.ts
var resolveProperties = async (object) => {
const promises = Object.keys(object).map((key) => {
const value = object[key];
return Promise.resolve(value).then((v) => ({ key, value: v }));
});
const results = await Promise.all(promises);
return results.reduce((accum, result) => {
accum[result.key] = result.value;
return accum;
}, {});
};
var getExecuteMode = ({
callType,
execType
}) => {
return concat([
callType,
// 1 byte
execType,
// 1 byte
"0x00000000",
// 4 bytes
"0x00000000",
// 4 bytes
pad("0x00000000", { size: 22 })
]);
};
export {
resolveProperties,
getExecuteMode
};
//# sourceMappingURL=chunk-M6FK2HC2.mjs.map