Comments (6)
@pavel-corsaghin thanks for the feature request! Definitely, this would be implemented in the near future.
However, what are you trying to achieve?
If you simply want to send NEO assets from your address to another, and it does not matter where you hold your NEO assets, you can use the raw transaction feature in this project. :-)
If the wallet/address you want to send the assets from is located locked in a NEO node, then, you have two options: 1) either you export the wallet in the WIF format and import it using neow3j; or 2) you can unlock the NEO wallet on the NEO GUI and then use the upcoming sendtoaddress
feature as you requested.
from neow3j.
Hello @gsmachado, Thank you for reply! I am new in this area so your library very helpful for me. But i have a stupid question, how can i create a raw transaction? I am simply writing an application to send NEO, nep5 tokens and claim GAS from the wallet, I have WIF private key (which created from mnemonic) saved locate in my app and list UTXOs (history transactions) for this address (get from api server). How can I create rawtransaction with your library. Can you create a example for simple transaction instead of "a raw transaction with a 2/3 multisig address". Many thanks and sorry for my english.
from neow3j.
i am trying with this:
`
val ecKeyPair = ECKeyPair.create(WIF.getPrivateKeyFromWIF("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
val neoAddress = Keys.getAddress(ecKeyPair)
log("address: $neoAddress")
val rawTx = RawTransaction.createContractTransaction(
null, null,
Arrays.asList(
RawTransactionInput("9feac4774eb0f01ab5d6817c713144b7c020b98f257c30b1105062d434e6f254", 0)
),
Arrays.asList(
RawTransactionOutput(0, NEOAsset.HASH_ID, "100.0", "AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y")
)
)
val rawTxUnsignedArray = rawTx.toArray()
val rawInvocationScriptList = Arrays.asList(RawInvocationScript(Sign.signMessage(rawTxUnsignedArray, ecKeyPair)))
rawTx.addScript(rawInvocationScriptList, Keys.getVerificationScriptFromPublicKey(1, ecKeyPair.publicKey))
val rawTxSignedArray = rawTx.toArray()
val rawTransactionHexString = Numeric.toHexStringNoPrefix(rawTxSignedArray)
log("rawTransactionHexString: $rawTransactionHexString" )
`
But i am not sure about list RawTransactionInput. This is list UTXOs (history transactions of sender address)?. What prevHash and prevIndex means?
from neow3j.
@pavel-corsaghin so, release version 1.0.8 includes support to sendtoaddress
. :-)
from neow3j.
@pavel-corsaghin just replying to your last message: yes, the RawTransactionInput
relates to the unspent amount that you're planning to spend. Then, the prevHash
is the hash of the previous unspent transaction (output), and the prevIndex
is the index of the previous transaction (also output).
from neow3j.
For now, I'm going to close this issue. Let me know if you have some other issues.
By the way, you are welcome to join NEO Discord and ask neow3j
questions on the #java channel.
from neow3j.
Related Issues (20)
- [Neo v3.6.0] Add new PRC `FindStorage`
- [Neo v3.6.0] Add new opcode `ABORTMSG`
- [Neo v3.6.0] Add new opcode `ASSERTMSG`
- Prevent conflicting trust and permission configurations in contracts HOT 2
- Add more utility methods for `bool` values
- Evaluate: How easy is it to update neo-express to a new Neo version? HOT 2
- Evaluate: Can we use neo-go as a replacement of neo-express in devpack-test? HOT 2
- Accept `Hash160` and `Hash256` as key values in Storage and StorageMap `get...()` methods
- Compiler uses `PUSH1` instead of `PUSHT` in boolean event parameter
- More restrictive use of syscall `Notify` HOT 1
- Add `NeoToken.unclaimedGas()` without block height parameter
- [Neo 3.6.0] Support contract id parameter for RPC `getContractState` HOT 1
- No overwrite of transaction attributes HOT 1
- `Transaction.toJson()` does not serialize transaction attribute properties
- Collection of frequently used Instruction Sequences
- Add convenience method `subscribeToEvents(contractHash)` HOT 2
- public enum TransactionAttributeType is two less HOT 2
- Support `ECPoint` in Storage methods HOT 1
- Support `Storage.delete` with `Hash160` and `Hash256` keys
- Use abstract class for ByteString-like types in devpack
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neow3j.