Skip to content
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

const client = new BncClient("https://testnet-dex.binance.org") const privateKey = crypto.getPrivateKeyFromMnemonic(mnemonic) client.setPrivateKey(privateKey) const from = "tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd"// sender address const recipient = "tbnb1prrujx8kkukrcrppklggadhuvegfnx8pemsq77"// recipient address const randomNumber = "e8eae926261ab77d018202434791a335249b470246a7b02e28c3b2fb6ffad8f3"// 32 bytes random number const timestamp = Math.floor(Date.now()/1000)// take the current timestamp const randomNumberHash = calculateRandomNumberHash(randomNumber, timestamp) const amount = [{ denom: "BNB", amount: 100 }] const expectedIncome = "100:BNB"// expected income const heightSpan = 400// height span const res = client.swap.HTLT(from, recipient, "", "", randomNumberHash, timestamp, amount, expectedIncome, heightSpan, false) #27

Open
Mooodyds opened this issue Jan 20, 2024 · 0 comments

Comments

@Mooodyds
Copy link

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant