@keypo/typescript-sdk
Version:
A TypeScript SDK for using Keypo
45 lines (44 loc) • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEvmConditions = void 0;
const createEvmConditions = (chain, contractAddress, fileIdentifier) => {
const conditions = [
{
contractAddress,
functionName: "checkPermission",
functionParams: [`${fileIdentifier}`, ":userAddress"],
functionAbi: {
type: "function",
stateMutability: "view",
outputs: [
{
type: "bool",
name: "",
internalType: "bool",
},
],
name: "checkPermission",
inputs: [
{
type: "string",
name: "fileIdentifier",
internalType: "string",
},
{
type: "address",
name: "requestAddress",
internalType: "address",
},
],
},
chain,
returnValueTest: {
key: "",
comparator: "=",
value: "true",
},
},
];
return conditions;
};
exports.createEvmConditions = createEvmConditions;