spec.json 4.69 KB
Newer Older
1
[
kladkogex's avatar
kladkogex committed
2 3 4
  {
    "name": "importBLSKeyShare",
    "params": {
kladkogex's avatar
kladkogex committed
5 6
      "keyShareName": "key1",
      "keyShare": "1122334455"
kladkogex's avatar
kladkogex committed
7
    },
kladkogex's avatar
kladkogex committed
8 9 10 11 12
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "encryptedKeyShare": "12345"
    }
kladkogex's avatar
kladkogex committed
13 14 15 16 17 18
  },

  {
    "name": "blsSignMessageHash",
    "params": {
      "keyShareName": "key1",
19 20
      "messageHash": "1122334455",
      "n": 2,
Oleh's avatar
Oleh committed
21
      "t": 2
kladkogex's avatar
kladkogex committed
22
    },
kladkogex's avatar
kladkogex committed
23 24 25
    "returns": {
      "status": 0,
      "errorMessage": "12345",
kladkogex's avatar
kladkogex committed
26
      "signatureShare": "12345"
kladkogex's avatar
kladkogex committed
27
    }
kladkogex's avatar
kladkogex committed
28 29 30 31 32
  },

  {
    "name": "importECDSAKey",
    "params": {
Oleh's avatar
Oleh committed
33
      "keyName": "NEK:abcdef1234",
kladkogex's avatar
kladkogex committed
34 35
      "key": "1122334455"
    },
kladkogex's avatar
kladkogex committed
36 37 38 39 40
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "encryptedKey": "12345"
    }
kladkogex's avatar
kladkogex committed
41 42 43 44
  },

  {
    "name": "generateECDSAKey",
kladkogex's avatar
kladkogex committed
45 46 47
    "returns": {
      "status": 0,
      "errorMessage": "12345",
svetaro's avatar
svetaro committed
48
      "encryptedKey": "12345",
kladko's avatar
kladko committed
49 50
      "keyName": "tmp:123",
      "publicKey": "12345"
kladkogex's avatar
kladkogex committed
51
    }
kladkogex's avatar
kladkogex committed
52 53
  },

54 55 56 57 58 59 60 61
  {
    "name": "getPublicECDSAKey",
    "params": {
      "keyName": "key1"
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
kladko's avatar
kladko committed
62
      "publicKey": "12345"
63 64
    }
  },
kladkogex's avatar
kladkogex committed
65 66 67 68

  {
    "name": "ecdsaSignMessageHash",
    "params": {
svetaro's avatar
svetaro committed
69
      "keyName": "key1",
70 71
      "messageHash": "1122334455",
      "base": 10
kladkogex's avatar
kladkogex committed
72
    },
kladkogex's avatar
kladkogex committed
73 74 75
    "returns": {
      "status": 0,
      "errorMessage": "12345",
svetaro's avatar
svetaro committed
76 77 78
      "signature_v": "12345",
      "signature_r": "12345",
      "signature_s": "12345"
kladkogex's avatar
kladkogex committed
79
    }
80 81 82 83 84
  },

  {
    "name": "generateDKGPoly",
    "params": {
85
      "polyName": "POLY:SCHAIN_ID :NODE_ID :DKG_ID",
86 87 88 89 90 91
      "t": 3
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345"
    }
92 93 94 95 96
  },

  {
    "name": "getVerificationVector",
    "params": {
97
      "polyName": "p1",
98 99 100 101 102 103 104 105 106
      "n": 3,
      "t": 3
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "Verification Vector": [{},{}]

    }
107
  },
Oleh's avatar
Oleh committed
108
  
109 110 111 112
  {
    "name": "getSecretShare",
    "params": {
      "polyName": "key1",
113
      "publicKeys": ["122","1222"],
114 115 116 117 118 119
      "n": 3,
      "t": 3
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
kladko's avatar
kladko committed
120
      "secretShare": "123"
121
    }
122
  },
Oleh's avatar
Oleh committed
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138

  {
    "name": "getSecretShareV2",
    "params": {
      "polyName": "key1",
      "publicKeys": ["122","1222"],
      "n": 3,
      "t": 3
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "secretShare": "123"
    }
  },

139
  {
kladko's avatar
kladko committed
140
    "name": "dkgVerification",
141
    "params": {
142
      "publicShares": "123",
kladko's avatar
kladko committed
143 144
      "ethKeyName":"NEK:hex",
      "secretShare": "f_ij",
145 146 147 148 149 150 151
      "n": 3,
      "t": 3,
      "index" : 2
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
152
      "result": true
153
    }
154
  },
Oleh's avatar
Oleh committed
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172

  {
    "name": "dkgVerificationV2",
    "params": {
      "publicShares": "123",
      "ethKeyName":"NEK:hex",
      "secretShare": "f_ij",
      "n": 3,
      "t": 3,
      "index" : 2
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "result": true
    }
  },

173
  {
kladko's avatar
kladko committed
174
    "name": "createBLSPrivateKey",
175
    "params": {
kladko's avatar
kladko committed
176 177
      "blsKeyName": "BLS_KEY:SCHAIN_ID :NODE_ID :DKG_ID: ",
      "ethKeyName":"NEK:hex",
178
      "polyName":"POLY:SCHAIN_ID :NODE_ID :DKG_ID: ",
kladko's avatar
kladko committed
179
      "secretShare": "122",
180 181 182 183 184 185
      "n": 3,
      "t": 3
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
kladko's avatar
kladko committed
186
      "blsKeyName": "key"
187
    }
188 189
  },

Oleh's avatar
Oleh committed
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
  {
    "name": "createBLSPrivateKeyV2",
    "params": {
      "blsKeyName": "BLS_KEY:SCHAIN_ID :NODE_ID :DKG_ID: ",
      "ethKeyName":"NEK:hex",
      "polyName":"POLY:SCHAIN_ID :NODE_ID :DKG_ID: ",
      "secretShare": "122",
      "n": 3,
      "t": 3
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "blsKeyName": "key"
    }
  },

207
  {
kladko's avatar
kladko committed
208
    "name": "getBLSPublicKeyShare",
209
    "params": {
kladko's avatar
kladko committed
210
      "blsKeyName": "BLS_KEY:SCHAIN_ID :NODE_ID :DKG_ID"
211 212 213 214
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
215
      "blsPublicKeyShare": []
216
    }
217 218 219
  },

  {
kladko's avatar
kladko committed
220
    "name": "complaintResponse",
221
    "params": {
Oleh's avatar
Oleh committed
222
      "polyName": "POLY:SCHAIN_ID :NODE_ID :DKG_ID: ",
223 224 225 226 227 228 229 230
      "n": 3,
      "t": 3,
      "ind": 1
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "share*G2": "123",
231
      "dhKey": "123"
232
    }
233 234
  },

Oleh's avatar
Oleh committed
235 236 237 238 239 240 241 242 243 244 245
  {
    "name": "multG2",
    "params": {
      "x": "12345"
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "x*G2": "123"
    }
  },
246

Oleh's avatar
Oleh committed
247 248 249 250 251 252 253 254 255 256 257
  {
    "name": "isPolyExists",
    "params": {
      "polyName": "POLY:SCHAIN_ID :NODE_ID :DKG_ID: "
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "IsExist": "True"
    }
  },
258

Oleh's avatar
Oleh committed
259 260 261 262 263 264 265 266 267 268 269 270 271
  {
    "name": "calculateAllBLSPublicKeys",
    "params": {
      "publicShares": "123",
      "n": 3,
      "t": 2
    },
    "returns": {
      "status": 0,
      "errorMessage": "12345",
      "publicKeys": []
    }
  },
272
]