ndarproj/agp-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ndarproj/agp-laravel

最新稳定版本:v1.1.0

Composer 安装命令:

composer require ndarproj/agp-laravel

包简介

Axie genes parser tool for Laravel(PHP)

README 文档

README

Vanilla PHP Package: agp-php

This is a port of the Javascript version of a plugin, you can find it here: agp-npm

Package agp-php 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.

Requirements

Composer, PHP 8.0 or later.

Installation

Install using Composer:

composer require ndarproj/agp-laravel

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.

256 Bit Genes

use Ndarproj\AxieGeneParser\AxieGene;

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

512 Bit Genes

use Ndarproj\AxieGeneParser\AxieGene;
use Ndarproj\AxieGeneParser\HexType;

$axieGene = new AxieGene(
    "0x280000000000010040412090830C0000000101942040440A00010190284082040001018C2061000A000101801021400400010180204080060001018418404008",
    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.

  • getGenes()
  • getCls()
  • getRegion()
  • getTag()
  • getBodySkin()
  • getPattern()
  • getColor()
  • getEyes()
  • getMouth()
  • getEars()
  • getHorn()
  • getBack()
  • getTail()

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固