npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

agp-npm

v1.0.11

Published

Gene parsing package for Axie Infinity.

Downloads

59

Readme

agp-npm

npm version

Package agp-npm is a gene parsing package for Axie Infinity.

The name agp stands for "Axie Gene Parser" which decodes the hex representation of an Axie's gene into a human readable format.

Documentation

For more detailed documentation, see agp-npm documentation.

Install

agp-npm runs on Node.js and is available as a NPM package.

npm install agp-npm

Usage

To get started, you'll first need to get the gene of an Axie in hex. You may use the Axie Infinity GraphQL endpoint to get this detail. For this example, let's use the hex 0x11c642400a028ca14a428c20cc011080c61180a0820180604233082

Let us create an AxieGene object from the hex string that we have.

JavaScript

256 Bit Genes

const { AxieGene } = require("agp-npm/dist/axie-gene"); // Defaults to HexType.Bit256
const axieGene = new AxieGene("0x11c642400a028ca14a428c20cc011080c61180a0820180604233082");

512 Bit Genes

const { AxieGene, HexType } = require("agp-npm/dist/axie-gene");
const hex = "0x280000000000010040412090830C0000000101942040440A00010190284082040001018C2061000A000101801021400400010180204080060001018418404008"
const axieGene = new AxieGene(hex, HexType.Bit512);

TypeScript

256 Bit Genes

const axieGene = new AxieGene("0x11c642400a028ca14a428c20cc011080c61180a0820180604233082");

512 Bit Genes

const hex = "0x280000000000010040412090830C0000000101942040440A00010190284082040001018C2061000A000101801021400400010180204080060001018418404008"
const axieGene = new AxieGene(hex, HexType.Bit512);

Gene Quality

You may also get the quality of the genes directly through the AxieGene object.

axieGene.getGeneQuality();

This object automatically handles the parsing of the hex value for you. You may simply use the accessors of the class to get the gene information that you want.

Here are the properties that you can get from the AxieGene object.

Go Lang Support

I also released a similar package for Go. Do check it out!

Support the Author

Love this module? Feel free to buy me a coffee and motivate me to work on more stuffs like this!

Ronin Address: ronin:789c9b253eba265f0079e3ebcaaea2503eb31bb3
ETH Address: 0x9F50E3606caf22ff5E0E03F0eb02DE3Fa2786535
Paypal: paypal.me/shanemaglangit

Support does not need to have any monetary value. I would also appreciate if you leave a star!