refactor create dht value

This commit is contained in:
Christien Rioux 2023-07-08 22:50:44 -04:00
parent 9f9feeb325
commit 19f384ab33
13 changed files with 53 additions and 40 deletions

View file

@ -78,11 +78,11 @@ class VeilidRoutingContextJS implements VeilidRoutingContext {
}
@override
Future<DHTRecordDescriptor> createDHTRecord(
CryptoKind kind, DHTSchema schema) async {
Future<DHTRecordDescriptor> createDHTRecord(DHTSchema schema,
{CryptoKind kind = 0}) async {
return DHTRecordDescriptor.fromJson(jsonDecode(await _wrapApiPromise(js_util
.callMethod(wasm, "routing_context_create_dht_record",
[_ctx.id, kind, jsonEncode(schema)]))));
[_ctx.id, jsonEncode(schema), kind]))));
}
@override