mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-03-21 22:33:10 +00:00
test
This commit is contained in:
parent
f39d215cca
commit
ad0e277525
@ -29,13 +29,12 @@ export class IdentityCredential {
|
||||
);
|
||||
}
|
||||
|
||||
public toJSON(): Record<string, number[] | string> {
|
||||
public toJSON(): Record<string, number[]> {
|
||||
return {
|
||||
idTrapdoor: Array.from(this.IDTrapdoor),
|
||||
idNullifier: Array.from(this.IDNullifier),
|
||||
idSecretHash: Array.from(this.IDSecretHash),
|
||||
idCommitment: Array.from(this.IDCommitment),
|
||||
idCommitmentBigInt: this.IDCommitmentBigInt.toString()
|
||||
idCommitment: Array.from(this.IDCommitment)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ export class Keystore {
|
||||
treeIndex: _.get(obj, "treeIndex"),
|
||||
chainId: _.get(obj, "membershipContract.chainId"),
|
||||
address: _.get(obj, "membershipContract.address"),
|
||||
rateLimit: _.get(obj, "membershipContract.rateLimit")
|
||||
rateLimit: _.get(obj, "userMessageLimit")
|
||||
}
|
||||
};
|
||||
} catch (err) {
|
||||
@ -298,6 +298,10 @@ export class Keystore {
|
||||
private static fromIdentityToBytes(options: KeystoreEntity): Uint8Array {
|
||||
return utf8ToBytes(
|
||||
JSON.stringify({
|
||||
membershipContract: {
|
||||
chainId: options.membership.chainId,
|
||||
address: options.membership.address
|
||||
},
|
||||
treeIndex: options.membership.treeIndex,
|
||||
identityCredential: {
|
||||
idTrapdoor: Array.from(options.identity.IDTrapdoor),
|
||||
@ -305,10 +309,7 @@ export class Keystore {
|
||||
idSecretHash: Array.from(options.identity.IDSecretHash),
|
||||
idCommitment: Array.from(options.identity.IDCommitment)
|
||||
},
|
||||
membershipContract: {
|
||||
chainId: options.membership.chainId,
|
||||
address: options.membership.address
|
||||
}
|
||||
userMessageLimit: options.membership.rateLimit
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user