Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from ShaneMaglangit/feature-512-support
Browse files Browse the repository at this point in the history
Feature 512 support
  • Loading branch information
ShaneMaglangit authored Jul 30, 2021
2 parents 56a1e08 + 418df59 commit 3e48adc
Show file tree
Hide file tree
Showing 27 changed files with 546 additions and 326 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
.nyc_output
1 change: 0 additions & 1 deletion .nyc_output/0f1259a1-f9ae-46c3-a748-06fe4732cd26.json

This file was deleted.

1 change: 0 additions & 1 deletion .nyc_output/8a3cc9a5-9dcf-418e-93e0-92dcf0f4d646.json

This file was deleted.

1 change: 0 additions & 1 deletion .nyc_output/a14d407a-e11e-462b-830e-207b7d2d80a6.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .nyc_output/processinfo/index.json

This file was deleted.

28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ 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.

> Only supports 256 bit genes
## Documentation

For more detailed documentation, see [agp-npm documentation](https://shanemaglangit.github.io/agp-npm).
Expand All @@ -31,17 +29,37 @@ Let us create an AxieGene object from the hex string that we have.

**JavaScript**

256 Bit Genes

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

**TypeScript**
512 Bit Genes

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

**TypeScript**

256 Bit Genes

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

512 Bit Genes

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


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.

Expand Down Expand Up @@ -71,6 +89,6 @@ Love this module? Feel free to buy me a coffee and motivate me to work on more s

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

Support does not need to have any monetary value. I would also appreciate if you leave a star!
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agp-npm",
"version": "v1.0.0",
"version": "v1.0.1",
"author": "Shane Maglangit",
"license": "GPL-3.0",
"description": "Gene parsing package for Axie Infinity.",
Expand All @@ -11,7 +11,7 @@
"coverage": "nyc npm test",
"docs": "typedoc src --out docs",
"develop": "tsc && node dist/src/axie-gene.js",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "tslint -p tsconfig.json",
"test": "jest",
"prepare": "npm run build",
Expand Down
Loading

0 comments on commit 3e48adc

Please sign in to comment.