Welcome to the Aurory DNA SDK. This SDK is used to generate and parse Nefties' DNA.
npm i @aurory/dnajs
import { 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
ParseV2
interface 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
Unreleased
section. - If a new abilities dictionary or dna schema is added, update the appropriate
latest.ts
file.
- Open a branch named
release/vX.X.X
- Update the version in
package.json
- Update the CHANGELOG to replace the
Unreleased
section with the new version