-
If I have a privatekey, this account have btc coin, I want send btc to another account, what should I do? Please give me a example, I want to send token to another account,give me a example,Thank you very much |
Beta Was this translation helpful? Give feedback.
Answered by
mccwdev
Jan 15, 2024
Replies: 1 comment 1 reply
-
Easiest is to create a wallet and then create a transaction: pk = 'tprv8ZgxMBicQKsPeTWfDcHDjngYVa8LR4VQnn4GtoJLXEtQYpRRkRt6TsqKp2nBRfnJt9vjUTREV8YpjPr8jecxNh1USymackFnAHnD7MEQo7r'
w = wallet_create_or_open('mycoins', pk)
w.scan(scan_gap_limit=1)
w.info()
w.send_to('n1UDMjicDJ6c2Kuv8eHLcYrZUmGGXfH2Nu', 10000) or if you have just a single key with unspent outputs: pk = 'tprv8ZgxMBicQKsPeTWfDcHDjngYVa8LR4VQnn4GtoJLXEtQYpRRkRt6TsqKp2nBRfnJt9vjUTREV8YpjPr8jecxNh1USymackFnAHnD7MEQo7r'
w = wallet_create_or_open('mycoins_single', pk, scheme='single')
w.transactions_update()
w.info()
w.send_to('n1UDMjicDJ6c2Kuv8eHLcYrZUmGGXfH2Nu', 10000) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mccwdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Easiest is to create a wallet and then create a transaction:
or if you have just a single key with unspent outputs: