moonstream-to / waggle

Apache License 2.0
2 stars 2 forks source link

Waggle sign API server #11

Closed kompotkot closed 10 months ago

kompotkot commented 11 months ago

Handle API requests for batch sign

Example of API request:

{
    "chain_id": 80001,
    "dropper": "0x4ec36E288E1b5d6914851a141cb041152Cf95328",
    "signer": "0x123c51488a18fc75d3b8993743f3c132316952c8",
    "requests": [
        {
            "dropId": "2",
            "requestID": "5",
            "claimant": "0x000000000000000000000000000000000000dEaD",
            "blockDeadline": "40000000",
            "amount": "3000000000000000000"
        },
        {
            "dropId": "2",
            "requestID": "6",
            "claimant": "0x000000000000000000000000000000000000dEaD",
            "blockDeadline": "40000000",
            "amount": "3000000000000000000"
        }
    ]
}

Example of response:

{
    "chain_id": 80001,
    "dropper": "0x4ec36E288E1b5d6914851a141cb041152Cf95328",
    "signer": "0x123c51488a18fc75d3b8993743f3c132316952c8",
    "sensible": false,
    "requests": [
        {
            "dropId": "2",
            "requestID": "5",
            "claimant": "0x000000000000000000000000000000000000dEaD",
            "blockDeadline": "40000000",
            "amount": "3000000000000000000",
            "signature": "1165f3f1edba760f570a833891ef238c9e40d2e2d1c6d66ab39904v1934c4bb9342e463bd24e0464cceb66a91ea96a48965bb7603d59dc6b859f1112d077a5e41b",
            "signer": "0x123c51488a18fc75d3b8993743f3c132316952c8"
        },
        {
            "dropId": "2",
            "requestID": "6",
            "claimant": "0x000000000000000000000000000000000000dEaD",
            "blockDeadline": "40000000",
            "amount": "3000000000000000000",
            "signature": "85127edfac02da74776d761f230dc8d1c361ec8fb400881224d8e6001b00b17326048930b0b6e4f03ce407993e12399f80b325cc0be075fad855a2c6168f3b221c",
            "signer": "0x123c51488a18fc75d3b8993743f3c132316952c8"
        }
    ]
}
kompotkot commented 11 months ago

Resolves https://github.com/moonstream-to/waggle/pull/11

kompotkot commented 11 months ago

@bugout-dev check