chore: treeIndex as number

This commit is contained in:
Danish Arora 2025-04-02 17:33:10 +05:30
parent cad3e7afc5
commit 861a776d05
No known key found for this signature in database
GPG Key ID: 1C6EF37CDAE1426E
4 changed files with 6 additions and 6 deletions

View File

@ -476,7 +476,7 @@ export class RLNContract {
identity,
membership: {
address,
treeIndex: `0x${membershipId}`,
treeIndex: parseInt(membershipId),
chainId: network.chainId.toString(),
rateLimit: decodedData.membershipRateLimit.toNumber()
}
@ -602,7 +602,7 @@ export class RLNContract {
identity,
membership: {
address,
treeIndex: `0x${membershipId}`,
treeIndex: parseInt(membershipId),
chainId: network.chainId.toString(),
rateLimit: decodedData.membershipRateLimit.toNumber()
}

View File

@ -395,7 +395,7 @@ export class RLNLightContract {
identity,
membership: {
address,
treeIndex: `0x${membershipId}`,
treeIndex: parseInt(membershipId),
chainId: network.chainId.toString(),
rateLimit: decodedData.membershipRateLimit.toNumber()
}
@ -526,7 +526,7 @@ export class RLNLightContract {
identity,
membership: {
address,
treeIndex: `0x${membershipId}`,
treeIndex: parseInt(membershipId),
chainId: network.chainId.toString(),
rateLimit: decodedData.membershipRateLimit.toNumber()
}

View File

@ -10,7 +10,7 @@ export type Password = string | Uint8Array;
export type MembershipInfo = {
chainId: string;
address: string;
treeIndex: `0x${string}`; // hexadecimal string
treeIndex: number;
rateLimit: number;
};

View File

@ -288,7 +288,7 @@ export class RLNInstance {
return createRLNEncoder({
encoder: createEncoder(options),
rlnInstance: this,
index: parseInt(credentials.membership.treeIndex),
index: credentials.membership.treeIndex,
credential: credentials.identity
});
}