承接 andrey-vasarovsky/crypto-gateway-engine 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

andrey-vasarovsky/crypto-gateway-engine

Composer 安装命令:

composer require andrey-vasarovsky/crypto-gateway-engine

包简介

Crypto payment gateway for BTC, LTC, ETH, TRX, XRP

README 文档

README

Api services

This component use next api services:

Infura You must create account. Then create new project with product Ethereum. After that you will receive project id value. Then paste this key to env "INFURA_PROJECT_ID". This service uses for Ethereum blockchain.

Nownodes You just need to fill email input and press button "Get Free Api Key". Then you will receive api key on your email. Then paste this key to env "NOWNODES_API_KEY". This service uses for Bitcoin/Litecoin blockchain.

Trongrid This service uses for Tron blockchain. It is used without any api key.

Xrp ledger This service uses for Ripple blockchain. It is used without any api key.

Mainnet/Testnet blockchain

If you want to use component in testnet you must set this env parameters:

BTC_TESTNET=true
LTC_TESTNET=true
ETH_TESTNET=true
XRP_TESTNET=true
TRX_TESTNET=true

Mnemonic phrase

At this moment all project use only one mnemonic phase. From this phrase will be generated new wallet addresses. Also from wallet with path index 0 will be processed all withdrawal. To set this phrase you must fill env parameter MNEMONIC_PHRASE

Test wallets

For test use can generate your own wallets or can use next one:

TRX

Test explorer

Attention: when you send trc20 token your trx balance must be greater than 0, because fee paid only in trx

ETH

Test explorer

Attention: when you send erc20 token your eth balance must be greater than 0, because fee paid only in eth

##XRP Test explorer

Attention: first transaction to new address must be greater than 10 XRP, otherwise transaction will be failed, and you even could not find address at explorer, more details

BTC

Test explorer

LTC

Test explorer

How to use this component?

When you want to generate wallet, you need seed phrase (mnemonic). It is the main keys. You can use your own seed phrase or generate new one. To generate new seed phrase you can make next step:

$service = app(WalletGenerator::class);
$mnemonic = $service->generateSeed();

To generate BTC crypto wallet:

$service = app(WalletGenerator::class);
$mnemonic = $service->generateSeed();
        
$path = 0;
$wallet = $service->generate(new CryptoCurrencyCoin(CryptoCurrencyCoin::BTC), $mnemonic, $path);

From one mnemonic you can generate (2^31 - 1) addresses, just you need to put needed $path. More detail you can reed at BIP-32 specification

To send 0.0001 BTC from our wallet to n2k8dJGvQa9Z4G5gPDogKPsopbvoGoJmaR you can use next code, of course at your wallet must be sum greater than 0.0001 + network fee:

$walletService = app(WalletGenerator::class);
$mnemonic = $walletService->generateSeed();

$coin = new CryptoCurrencyCoin(CryptoCurrencyCoin::BTC);
$senderWalletDto = $walletService->generate($coin, $mnemonic, 0);

$currency = new Currency(CryptoCurrency::BTC(), new CurrencyNetwork(TokenType::DEFAULT(), 8));
$senderWallet = new Wallet($senderWalletDto->address, $senderWalletDto->privateKey, $currency, $senderWalletDto->pubKey);

$crypto = AbstractCryptoFactory::instanceByCurrency($currency);
$destinationAddressDto = new DestinationAddressDto([
    'address' => 'n2k8dJGvQa9Z4G5gPDogKPsopbvoGoJmaR',
    'amount' => 0.0001
]);
$transaction = $crypto->createTransaction($senderWallet)->create($destinationAddressDto);
$result = $crypto->broadcastTransaction($transaction);

andrey-vasarovsky/crypto-gateway-engine 适用场景与选型建议

andrey-vasarovsky/crypto-gateway-engine 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 01 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 andrey-vasarovsky/crypto-gateway-engine 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 andrey-vasarovsky/crypto-gateway-engine 我们能提供哪些服务?
定制开发 / 二次开发

基于 andrey-vasarovsky/crypto-gateway-engine 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-01-06