{
  "encodeAccountKey": {
    "static": false,
    "preRequisites": [
      {
        "layer": "caver.account",
        "class": "AccountKeyLegacy",
        "method": "constructor",
        "static": false,
        "parameters": {}
      },
      {
        "layer": "caver.account",
        "class": "AccountKeyPublic",
        "method": "fromPublicKey",
        "static": true,
        "parameters": {
          "publicKey": "0x022dfe0d7c496d954037ab15afd3352008f6c5bfe972850b7b321e96721f4bf11f7e6aa508dd50af53e190dcd4a2559aa1c3ef3f78b97b97e2928ac33e038464"
        }
      },
      {
        "layer": "caver.account",
        "class": "AccountKeyFail",
        "method": "constructor",
        "static": false,
        "parameters": {}
      },
      {
        "layer": "caver.account",
        "class": "AccountKeyWeightedMultiSig",
        "method": "fromPublicKeysAndOptions",
        "static": true,
        "parameters": {
          "pubArray": [
            "0xc10b598a1a3ba252acc21349d61c2fbd9bc8c15c50a5599f420cccc3291f9bf9803a1898f45b2770eda7abce70e8503b5e82b748ec0ce557ac9f4f4796965e4e",
            "0x1769a9196f523c419be50c26419ebbec34d3d6aa8b59da834212f13dbec9a9c12a4d0eeb91d7bd5d592653d43dd0593cfe24cb20a5dbef05832932e7c7191bf6"
          ],
          "options": {
            "threshold": 2,
            "weights": [
              1,
              1
            ]
          }
        }
      },
      {
        "layer": "caver.account",
        "class": "AccountKeyRoleBased",
        "method": "fromRoleBasedPublicKeysAndOptions",
        "static": true,
        "parameters": {
          "pubArray": [
            [
              "0xb86b2787e8c7accd7d2d82678c9bef047a0aafd72a6e690817506684e8513c9af36becba90c8de06fd06da16492263267a63720985f94fc5a027d0a26d25e6ae",
              "0xe4d4901155edabc2bd5b356c63e58af20fe0a74e5f210de6396b74094f40215d3bc4d619872b96c091c741a15736a7ef12f530b7593038bbbfbf6c35deee8a34"
            ],
            [
              "0x1a909c4d7dbb5281b1d1b55e79a1b2568111bd2830246c3173ce824000eb8716afe39b6106fb9db360fb5779e2d346c8328698174831941586b11bdc3e755905",
              "0x1427ac6351bbfc15811e8e5389a674b01d7a2c253e69a6ed30a33583864368f65f63b92fd60be61c5d176ae1771e7738e6a043af814b9af5d81137df29ee95f2",
              "0x90fe4bb78bc981a40874ebcff2f9de4eba1e59ecd7a271a37814413720a3a5ea5fa9bd7d8bc5c66a9a08d77563458b004bbd1d594a3a12ef108cdc7c04c525a6"
            ],
            [
              "0x91245244462b3eee6436d3dc0ba3f69ef413fe2296c729733eff891a55f70c02f2b0870653417943e795e7c8694c4f8be8af865b7a0224d1dec0bf8a1bf1b5a6",
              "0x77e05dd93cdd6362f8648447f33d5676cbc5f42f4c4946ae1ad62bd4c0c4f3570b1a104b67d1cd169bbf61dd557f15ab5ee8b661326096954caddadf34ae6ac8",
              "0xd3bb14320d87eed081ae44740b5abbc52bac2c7ccf85b6281a0fc69f3ba4c171cc4bd2ba7f0c969cd72bfa49c854d8ac2cf3d0edea7f0ce0fd31cf080374935d",
              "0xcfa4d1bee51e59e6842b136ff95b9d01385f94bed13c4be8996c6d20cb732c3ee47cd2b6bbb917658c5fd3d02b0ddf1242b1603d1acbde7812a7d9d684ed37a9"
            ]
          ],
          "options": [
            {
              "threshold": 2,
              "weights": [
                1,
                1
              ]
            },
            {
              "threshold": 2,
              "weights": [
                1,
                1,
                2
              ]
            },
            {
              "threshold": 3,
              "weights": [
                1,
                1,
                2,
                2
              ]
            }
          ]
        }
      }
    ],
    "testCases": [
      {
        "id": "CONFORMANCE-RPC-005",
        "description": "encode accountKeyNil",
        "skipJs": true,
        "input": {},
        "expectedResult": {
          "status": "pass",
          "output": {
            "method": "klay_encodeAccountKey",
            "params": [
              {
                "keyType": 0,
                "key": {}
              }
            ]
          }
        }
      },
      {
        "id": "CONFORMANCE-RPC-006",
        "description": "encode accountKeyLegacy",
        "input": {
          "accountKey": "preRequisites[0]"
        },
        "expectedResult": {
          "status": "pass",
          "output": {
            "method": "klay_encodeAccountKey",
            "params": [
              {
                "keyType": 1,
                "key": {}
              }
            ]
          }
        }
      },
      {
        "id": "CONFORMANCE-RPC-007",
        "description": "encode accountKeyPublic",
        "input": {
          "accountKey": "preRequisites[1]"
        },
        "expectedResult": {
          "status": "pass",
          "output": {
            "method": "klay_encodeAccountKey",
            "params": [
              {
                "keyType": 2,
                "key": {
                  "x": "0x22dfe0d7c496d954037ab15afd3352008f6c5bfe972850b7b321e96721f4bf1",
                  "y": "0x1f7e6aa508dd50af53e190dcd4a2559aa1c3ef3f78b97b97e2928ac33e038464"
                }
              }
            ]
          }
        }
      },
      {
        "id": "CONFORMANCE-RPC-008",
        "description": "encode accountKeyFail",
        "input": {
          "accountKey": "preRequisites[2]"
        },
        "expectedResult": {
          "status": "pass",
          "output": {
            "method": "klay_encodeAccountKey",
            "params": [
              {
                "keyType": 3,
                "key": {}
              }
            ]
          }
        }
      },
      {
        "id": "CONFORMANCE-RPC-009",
        "description": "encode accountKeyWeightedMultiSig",
        "input": {
          "accountKey": "preRequisites[3]"
        },
        "expectedResult": {
          "status": "pass",
          "output": {
            "method": "klay_encodeAccountKey",
            "params": [
              {
                "keyType": 4,
                "key": {
                  "threshold": 2,
                  "keys": [
                    {
                      "weight": 1,
                      "key": {
                        "x": "0xc10b598a1a3ba252acc21349d61c2fbd9bc8c15c50a5599f420cccc3291f9bf9",
                        "y": "0x803a1898f45b2770eda7abce70e8503b5e82b748ec0ce557ac9f4f4796965e4e"
                      }
                    },
                    {
                      "weight": 1,
                      "key": {
                        "x": "0x1769a9196f523c419be50c26419ebbec34d3d6aa8b59da834212f13dbec9a9c1",
                        "y": "0x2a4d0eeb91d7bd5d592653d43dd0593cfe24cb20a5dbef05832932e7c7191bf6"
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      },
      {
        "id": "CONFORMANCE-RPC-010",
        "description": "encode accountKeyRoleBased",
        "input": {
          "accountKey": "preRequisites[4]"
        },
        "expectedResult": {
          "status": "pass",
          "output": {
            "method": "klay_encodeAccountKey",
            "params": [
              {
                "keyType": 5,
                "key": [
                  {
                    "keyType": 4,
                    "key": {
                      "threshold": 2,
                      "keys": [
                        {
                          "weight": 1,
                          "key": {
                            "x": "0xb86b2787e8c7accd7d2d82678c9bef047a0aafd72a6e690817506684e8513c9a",
                            "y": "0xf36becba90c8de06fd06da16492263267a63720985f94fc5a027d0a26d25e6ae"
                          }
                        },
                        {
                          "weight": 1,
                          "key": {
                            "x": "0xe4d4901155edabc2bd5b356c63e58af20fe0a74e5f210de6396b74094f40215d",
                            "y": "0x3bc4d619872b96c091c741a15736a7ef12f530b7593038bbbfbf6c35deee8a34"
                          }
                        }
                      ]
                    }
                  },
                  {
                    "keyType": 4,
                    "key": {
                      "threshold": 2,
                      "keys": [
                        {
                          "weight": 1,
                          "key": {
                            "x": "0x1a909c4d7dbb5281b1d1b55e79a1b2568111bd2830246c3173ce824000eb8716",
                            "y": "0xafe39b6106fb9db360fb5779e2d346c8328698174831941586b11bdc3e755905"
                          }
                        },
                        {
                          "weight": 1,
                          "key": {
                            "x": "0x1427ac6351bbfc15811e8e5389a674b01d7a2c253e69a6ed30a33583864368f6",
                            "y": "0x5f63b92fd60be61c5d176ae1771e7738e6a043af814b9af5d81137df29ee95f2"
                          }
                        },
                        {
                          "weight": 2,
                          "key": {
                            "x": "0x90fe4bb78bc981a40874ebcff2f9de4eba1e59ecd7a271a37814413720a3a5ea",
                            "y": "0x5fa9bd7d8bc5c66a9a08d77563458b004bbd1d594a3a12ef108cdc7c04c525a6"
                          }
                        }
                      ]
                    }
                  },
                  {
                    "keyType": 4,
                    "key": {
                      "threshold": 3,
                      "keys": [
                        {
                          "weight": 1,
                          "key": {
                            "x": "0x91245244462b3eee6436d3dc0ba3f69ef413fe2296c729733eff891a55f70c02",
                            "y": "0xf2b0870653417943e795e7c8694c4f8be8af865b7a0224d1dec0bf8a1bf1b5a6"
                          }
                        },
                        {
                          "weight": 1,
                          "key": {
                            "x": "0x77e05dd93cdd6362f8648447f33d5676cbc5f42f4c4946ae1ad62bd4c0c4f357",
                            "y": "0xb1a104b67d1cd169bbf61dd557f15ab5ee8b661326096954caddadf34ae6ac8"
                          }
                        },
                        {
                          "weight": 2,
                          "key": {
                            "x": "0xd3bb14320d87eed081ae44740b5abbc52bac2c7ccf85b6281a0fc69f3ba4c171",
                            "y": "0xcc4bd2ba7f0c969cd72bfa49c854d8ac2cf3d0edea7f0ce0fd31cf080374935d"
                          }
                        },
                        {
                          "weight": 2,
                          "key": {
                            "x": "0xcfa4d1bee51e59e6842b136ff95b9d01385f94bed13c4be8996c6d20cb732c3e",
                            "y": "0xe47cd2b6bbb917658c5fd3d02b0ddf1242b1603d1acbde7812a7d9d684ed37a9"
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    ]
  }
}