UNPKG

gray-market-js

Version:

Utility library for the Gray Market rental marketplace

33 lines (30 loc) 1.03 kB
class MessageHelper { static getSignable(chainId, verifyingContract, listing) { return { types: { Listing: [ { name: "lender", type: "address" }, { name: "recurring", type: "bool"}, { name: "tokenType", type: "uint8" }, { name: "validUntil", type: "uint48" }, { name: "collectionAddress", type: "address" }, { name: "minRentalLength", type: "uint32" }, { name: "maxRentalLength", type: "uint32" }, { name: "authorizedCustodyProviderAddress", type: "address" }, { name: "tokenID", type: "uint256" }, { name: "amount", type: "uint256" }, { name: "costPerSecond", type: "uint256" } ] }, primaryType: "Listing", domain: { name: "Gray Boys Rental Marketplace", version: "1", chainId: chainId, verifyingContract: verifyingContract }, message: listing }; } } module.exports = MessageHelper;