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

How do i retrieve the information about my asset? #313

Open
jay0x5 opened this issue Mar 24, 2022 · 0 comments
Open

How do i retrieve the information about my asset? #313

jay0x5 opened this issue Mar 24, 2022 · 0 comments

Comments

@jay0x5
Copy link

jay0x5 commented Mar 24, 2022

Hi i am kind of a beginner to Javascript and bigchaindb and i am storing this test asset to testnet, can anyone tell me how can i actually retrieve this asset back with any query?
This is my code:

const driver = require('bigchaindb-driver')
const API_PATH = 'http://localhost:9984/api/v1/'
const conn = new driver.Connection(API_PATH)

const jaybigdbtest = new driver.Ed25519Keypair()

const assetdata = {
'userdetails': {
'USERID': '$Paraverse$2022',
'Username': 'JayForTest',
'password': 'BigChainDB',
}
}
const txCreatejaybigdbtestSimple = driver.Transaction.makeCreateTransaction(
assetdata,
null, //since no metadata so null
// A transaction needs an output
[ driver.Transaction.makeOutput(
driver.Transaction.makeEd25519Condition(jaybigdbtest.publicKey))
],
jaybigdbtest.publicKey
)

const txCreatejaybigdbtestSimpleSigned = driver.Transaction.signTransaction(txCreatejaybigdbtestSimple, jaybigdbtest.privateKey)

conn.postTransactionCommit(txCreatejaybigdbtestSimpleSigned)
console.log('asset pushed!!!')

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