Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
Welcome to the Developer Q&A for the
MultiChain
blockchain platform.
Please feel free to ask questions about the platform to receive answers from the MultiChain developers or other members of the community.
Related questions
what method we need to call from multichain java api to convert json object to hex format string
any way to store json data in multichain1.0 directly or to convert json data to hex directly using multichain javaapi
Is there any command to convert file data into hex format??
can we convert json object into string and then convert into hex format
getting data from streams
4,156
questions
4,369
answers
5,718
comments
Most popular tags
multichain
streams
assets
stream
transactions
json-rpc
blockchain
wallet
permissions
error
address
raw-transactions
asset
mining
node
api
issue
multichain-explorer
nodes
connect
multichaind
multisig
transaction
smart-filters
metadata
private-key
atomic-exchange
multichain-cli
multichain-web-demo
data
connection
performance
blocks
demo
web
json
database
storage
native-currency
bitcoin
private-blockchain
network
fee
smart-contracts
wallets
signrawtransaction
off-chain
exchange
multiple-nodes
getnewaddress
Convert hex data values from streams
+1
vote
How to convert the hexadecimal values from Streams to strings data.
Thanks.
asked
Mar 16, 2017
by
saravana
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
0
votes
Best answer
Thanks, i have figured out...
it's bin2hex() and hex2bin() in PHP.
answered
Mar 16, 2017
by
saravana
Can we do it on multichain side...?
No, unfortunately not, because you cannot pass binary data in JSON.
so for example i am doing stream and getting the transaction. no i have to read what i stream.. so how its possible..
what i tried so far:
From transaction i can get the hash and from hash i am getting hex data.. not convert the hex data into ASCII its not possible on BC side..
So in which way we can get the stream data into back to ASCII form.. at BC Side
You should convert the data to ASCII on the client side.
Or use MultiChain 2.0 alpha 3 which provides native support for text items in streams.
Any sample code or any example. its possible for you to share.. ?
To convert between hexadecimal and text in PHP, use the pack() and unpack() functions. Here's the code you need:
https://stackoverflow.com/a/46344675
Please
log in
or
register
to add a comment.
...