New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random numbers for decentralized sequencer interactions #474
base: szynek/sequencer-client
Are you sure you want to change the base?
Conversation
} | ||
const base64 = this._activeTx.random.replace(/-/g, '+').replace(/_/g, '/'); | ||
const array = Uint8Array.from(atob(base64), c => c.charCodeAt(0)); | ||
const bigInt = Buffer.from(array).readBigUInt64BE(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add
import { Buffer } from 'warp-isomorphic';
Buffer
is nodejs specific and the above code might not work in browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import has been added.
@@ -260,6 +280,9 @@ export class SWVrf { | |||
|
|||
// returns a random value in a range from 1 to maxValue | |||
randomInt(maxValue: number): number { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please mark as Deprecated and update the docs here https://docs.warp.cc/docs/sdk/advanced/vrf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added comments with @deprecated
. I will update all documentation related to the new sequencer as part of the task at warp-contracts/sequencer#85.
9acada5
to
3f81256
Compare
No description provided.