fix types

This commit is contained in:
Sasha 2024-01-29 18:45:35 +01:00
parent a545530e29
commit 62fec796f2
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -308,7 +308,7 @@ export class RLNInstance {
public async registerMembership(
options: RegisterMembershipOptions
): Promise<undefined | KeystoreEntity> {
): Promise<undefined | DecryptedCredentials> {
if (!this.contract) {
throw Error("RLN Contract is not initialized.");
}

View File

@ -3,7 +3,7 @@ import { ethers } from "ethers";
import { zeroPadLE } from "./byte_utils.js";
import { RLN_REGISTRY_ABI, RLN_STORAGE_ABI } from "./constants.js";
import type { KeystoreEntity } from "./keystore/index.js";
import type { DecryptedCredentials } from "./keystore/index.js";
import { type IdentityCredential, RLNInstance } from "./rln.js";
import { MerkleRootTracker } from "./root_tracker.js";
@ -210,7 +210,7 @@ export class RLNContract {
public async registerWithIdentity(
identity: IdentityCredential
): Promise<KeystoreEntity | undefined> {
): Promise<DecryptedCredentials | undefined> {
if (this.storageIndex === undefined) {
throw Error(
"Cannot register credential, no storage contract index found."