woodwardmatt / hashgraph-tools Goto Github PK
View Code? Open in Web Editor NEWAn informal collection of example transactions coded against the Hedera JS SDK.
License: Apache License 2.0
An informal collection of example transactions coded against the Hedera JS SDK.
License: Apache License 2.0
Hi Matt. This is less of a bug and more of an awareness piece. Your scripts are a great resource for getting someone up and running but it's important they know what the keys do if/when they come to mint a larger collection that they want to put out to the public.
Right now I believe you can't remove the keys once set. If someone runs the mint token script then all their keys will be set which might not be what they're after.
Having a Wipe key set for example would let them burn a token in someone else's account which might not be what they're after.
The update might just be a simple change to the Readme and also a comment in an .env.example
file with what each key is for:
.env.example
# The supply key lets you mint new tokens under the token ID
# SUPPLY_KEY=
# The admin key lets you update the global properties of your token such as the name, symbol and the treasury account. If you want your token to be immutable then don't set this
# ADMIN_KEY=
etc
and then to add conditional keys only if they're set in the .env file.
const adminKey = process.env.ADMIN_KEY
const supplyKey = process.env.SUPPLY_KEY
if (adminKey) {
transaction.setAdminKey(PrivateKey.fromString(adminKey))
}
if (supplyKey) {
transaction.setSupplyKey(PrivateKey.fromString(supplyKey))
}
etc…
On a side note, I have added a HIP proposal to address the fact that you can't remove keys once set. I'd appreciate it if you had a moment to add any comments/feedback. Thanks!
CONTEXT:
The recent update to use differentiated keys seems to be causing some issues. Needs some further R & D with Hedera devs.
ERRORS:
An error minting the nft: StatusError: receipt for transaction 0.0.0@00000000000000000 contained error status INVALID_SIGNATURE
WORKAROUND:
Revert to using the single account for all key types until a further update is provided.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.