@waku/rln
Version:
RLN (Rate Limiting Nullifier) implementation for Waku
21 lines (18 loc) • 532 B
JavaScript
import { Coder } from './abstract-coder.js';
// Clones the functionality of an existing Coder, but without a localName
class AnonymousCoder extends Coder {
constructor(coder) {
super(coder.name, coder.type, undefined, coder.dynamic);
this.coder = coder;
}
defaultValue() {
return this.coder.defaultValue();
}
encode(writer, value) {
return this.coder.encode(writer, value);
}
decode(reader) {
return this.coder.decode(reader);
}
}
export { AnonymousCoder };