JavaScript
Functional instantiation

by Benny Neugebauer

const [alice_ident, bob_ident] = await Promise.all([0, 1].map(() => Proteus.keys.IdentityKeyPair.new()));
const [alice_store, bob_store] = await Promise.all(
  [0, 1].map(async () => new TestStore(await Proteus.keys.PreKey.generate_prekeys(0, 10)))
);

const alice_ident = await Proteus.keys.IdentityKeyPair.new();
const alice_store = new TestStore(await Proteus.keys.PreKey.generate_prekeys(0, 10));

const bob_ident = await Proteus.keys.IdentityKeyPair.new();
const bob_store = new TestStore(await Proteus.keys.PreKey.generate_prekeys(0, 10));