Purchase Signature

https://api.nsure.network/v1/sign

POST https://api.nsure.network/v1/sign

sign method = 'personal_sign'

Request Body

{
code: 200,
msg: "ok",
    result:{
    cost: "0.00189371061895979"
deadline: 1620284188
r: "0x3c56c3f787b9e62250260ef4fffa48b93e904d2d359c8acfe1ca290846d2653a"
s: "0x59b1a580b7b6312128b767d2f3708504e2bfcb7939b386f07b8a124d1a96a27c"
v: 28}
}
Sign data example
{
        domain: {
            name: 'sign',
            chainId: 1,
        },
        message: {
            account:"0x....000", // user addr
            currencyType:0, // Payment asset type
            amount: "0", // Insured ETH amount (unit: wei)
            period:30, // Insurance period (unit: day, 30~365)
            product:0, //Insurance product id
            nonce:"0", // nonce
            deadline:1607680924304
        },
        primaryType: 'sign',
        types: {
            EIP712Domain: [
                {name: 'name', type: 'string'},
                {name: 'chainId', type: 'uint256'},
            ],
            sign: [
                {
                    name: 'product',
                    type: 'uint256'
                },
                {
                    name: 'account',
                    type: 'address'
                },
                {
                    name: 'amount',
                    type: 'uint256'
                },
                {
                    name: 'currencyType',
                    type: 'uint256'
                },
                {
                    name: 'period',
                    type: 'uint256'
                },
                {
                    name: 'nonce',
                    type: 'uint256'
                },
                {
                    name: 'deadline',
                    type: 'uint256'
                }

            ],

        }
    }

Last updated