Cohort
Cohort.create
Cohort.createconst config = {
threshold: 3,
shares: 5,
porterUri: 'https://porter-ibex.nucypher.community',
};
const newCohort = await Cohort.create(config, (include = []), (exclude = []));Cohort.toJSON
Cohort.toJSONconst cohortJSON = newCohort.toJSON();
console.log(cohortJSON);
// {
// "ursulaAddresses": [
// "0x5cf1703a1c99a4b42eb056535840e93118177232",
// "0x7fff551249d223f723557a96a0e1a469c79cc934",
// "0x9c7c824239d3159327024459ad69bb215859bd25"
// ],
// "threshold": 2,
// "shares": 3,
// "porterUri": "https://porter-ibex.nucypher.community"
// }Cohort.fromJSON
Cohort.fromJSONLast updated
Was this helpful?