Welcome to the Aurory DNA SDK. This SDK is used to generate and parse Nefties' DNA.
npm i @aurory/dnajsimport { DNAFactory, EggFactory } from "@aurory/dna";
const df = new DNAFactory();
// the first argument is an egg's mint address.
const ef = new EggsFactory("8XaR7cPaMZoMXWBWgeRcyjWRpKYpvGsPF6dMwxnV4nzK", df);
const neftyIndex = ef.hatch().archetypeKey;
const dna = df.generateNeftyDNA(neftyIndex);
const parsed = df.parse(dna);
console.log(parsed);See
ParseV2interface for more details on df.parse's output.
const eggs = EggsFactory.getAllEggs();
for (const egg of eggs) {
const [eggPk, eggInfo] = egg;
console.log(eggPk, eggInfo);
}- Make sure to add tests for your changes.
- Make sure to specify the changes you made in the CHANGELOG, under the
Unreleasedsection. - If a new abilities dictionary or dna schema is added, update the appropriate
latest.tsfile.
- Open a branch named
release/vX.X.X - Update the version in
package.json - Update the CHANGELOG to replace the
Unreleasedsection with the new version