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

没有找到给交易签名的方法 #9

Closed
MonveChen opened this issue Apr 15, 2021 · 2 comments
Closed

没有找到给交易签名的方法 #9

MonveChen opened this issue Apr 15, 2021 · 2 comments

Comments

@MonveChen
Copy link

样例提供的交易方式只是节点账号才能发起的交易方式

任意账号如何发起交易呢?提供私钥的那种

我没有找到给交易签名的方法,除了getSigner,但它并不适用

@nanne007
Copy link
Member

@wk3368 正在开发该功能。

@wk3368
Copy link
Collaborator

wk3368 commented Apr 28, 2021

  1. we have exported utils.tx.generateSignedUserTransactionHex in "@starcoin/starcoin": "^0.2.1"

  2. please check this branch(signTransaction) of repo test_dapp as a demo of how to use it:

const hex = await utils.tx.generateSignedUserTransactionHex(senderPrivateKeyHex, fromAccount, toAccount, sendAmount, maxGasAmount, senderSequenceNumber, expirationTimestampSecs, chainId);

https://github.com/starcoinorg/test-dapp/blob/signTransaction/src/index.js#L586

@wk3368 wk3368 closed this as completed Apr 28, 2021
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

3 participants