5 何如使用java web3j获取一个对象的hash值和用私钥对其签名

我想要创建一个java web程序,自动调用nft市场的open api挂单,卡在对参数签名这一步了,请问如何获取parameters这个对象的hash值和用私钥进行签名

"parameters": {
    "conduitKey": "0x618Cf13c76c1FFC2168fC47c98453dCc6134F5c8888888888888888888888888",
    "consideration": [
      {
        "endAmount": "90090000000000000",
        "identifierOrCriteria": "0",
        "itemType": 0,
        "recipient": "0x3aa48fc5f9d205531263381e69fd0457aa684b47",
        "startAmount": "90090000000000000",
        "token": "0x0000000000000000000000000000000000000000"
      },
      {
        "endAmount": "8910000000000000",
        "identifierOrCriteria": "0",
        "itemType": 0,
        "recipient": "0x3aa48fc5f9d205531263381e69fd0457aa684b47",
        "startAmount": "8910000000000000",
        "token": "0x0000000000000000000000000000000000000000"
      }
    ],
    "counter": 0,
    "endTime": 1682493877,
    "offer": [
      {
        "endAmount": "1",
        "identifierOrCriteria": "45990",
        "itemType": 2,
        "startAmount": "1",
        "token": "0xf8b973fdf2e6f700a775aa94ff72180688b5a044"
      }
    ],
    "offerer": "0x",
    "orderType": 2,
    "salt": "1462602105",
    "startTime": 0,
    "totalOriginalConsiderationItems": 1,
    "zone": "0x868B0635A8858dB9D984B5A27559f961Fd2736c0",
    "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
  }
请先 登录 后评论

2 个回答

Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
Meta - 风是自由的,你也是
请先 登录 后评论
  • 3 关注
  • 1 收藏,2547 浏览
  • pale 提出于 2023-05-21 15:53