From 5924b5f01006fd4102543b7a594fd44b28f6332c Mon Sep 17 00:00:00 2001 From: weboko Date: Thu, 19 Jan 2023 23:11:56 +0100 Subject: [PATCH] remove default signature message --- example/index.js | 5 ++++- src/const.ts | 3 --- src/index.ts | 7 +------ 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/example/index.js b/example/index.js index 1e68718..643930e 100644 --- a/example/index.js +++ b/example/index.js @@ -44,8 +44,11 @@ rln.create().then(async rlnInstance => { "any" ); + const DEFAULT_SIGNATURE_MESSAGE = + "The signature of this message will be used to generate your RLN credentials. Anyone accessing it may send messages on your behalf, please only share with the RLN dApp"; + const signer = provider.getSigner(); - const signature = await signer.signMessage(rln.DEFAULT_SIGNATURE_MESSAGE); + const signature = await signer.signMessage(DEFAULT_SIGNATURE_MESSAGE); console.log(`Got signature: ${signature}`); const contract = await rln.RLNContract.init(rlnInstance, {address: rln.GOERLI_CONTRACT.address, provider: signer }); diff --git a/src/const.ts b/src/const.ts index f2b903b..9cbc7d7 100644 --- a/src/const.ts +++ b/src/const.ts @@ -12,6 +12,3 @@ export const GOERLI_CONTRACT = { address: "0x4252105670fe33d2947e8ead304969849e64f2a6", abi: RLN_ABI, }; - -export const DEFAULT_SIGNATURE_MESSAGE = - "The signature of this message will be used to generate your RLN credentials. Anyone accessing it may send messages on your behalf, please only share with the RLN dApp"; diff --git a/src/index.ts b/src/index.ts index de31be9..d2d837d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,5 @@ import { RLNDecoder, RLNEncoder } from "./codec.js"; -import { - DEFAULT_SIGNATURE_MESSAGE, - GOERLI_CONTRACT, - RLN_ABI, -} from "./const.js"; +import { GOERLI_CONTRACT, RLN_ABI } from "./const.js"; import { Proof, RLNInstance } from "./rln.js"; import { MembershipKey } from "./rln.js"; import { RLNContract } from "./rln_contract.js"; @@ -26,5 +22,4 @@ export { RLNContract, RLN_ABI, GOERLI_CONTRACT, - DEFAULT_SIGNATURE_MESSAGE, };