Code Monkey home page Code Monkey logo

algorand-php's People

Contributors

hafael avatar rootsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

algorand-php's Issues

An error occured when minting your NFT. Error: Request failed with status code 500

Hi!
I run IPFS Desktop and status - connected to IPFS.
I have some work addresses:

GATEWAY:  http://127.0.0.1:8080
API:  /ip4/127.0.0.1/tcp/5001
ADDRESSES:
/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip4/188.164.164.240/tcp/4001/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip4/188.164.164.240/udp/4001/quic/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip4/192.168.1.30/tcp/4001/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip4/192.168.1.30/udp/4001/quic/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip6/::1/tcp/4001/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1
/ip6/::1/udp/4001/quic/p2p/12D3KooWQLpF7fRu8VcsNpxRoHoEwcxXriSpBdopW6BVKPZqQLi1

But in Chrome Console a completely different address (status code 500) when i try to create an item:
POST http://192.168.1.190:81/asa/transaction/fields 500 (Internal Server Error)
{message: "cURL error 6: Could not resolve host: host.docker.…/host.docker.internal:5001/api/v0/add?only-hash=1", exception: "Rootsoft\\IPFS\\Exceptions\\IPFSException", file: "/var/www/html/vendor/rootsoft/laravel-ipfs/src/Traits/MakesHttpRequests.php", line: 93, trace: Array(50)}

How should I change the address "host.docker.internal"? I tried to change to 127.0.0.1, but I get 500.
issue01
issue02

I am not able to fund this repository

I realize this is not the best way to use Issues, but I can't find any other way to get into contact with anybody and as an Algorand community-member who is a PHP/Laravel developer looking to find a good way to create an Algorand based web-app this is incredible. If you enable funding through github I will definitely contribute on a recurring basis. I also am very open to contributing to the code someday, but as of now I'm very inexperienced with blockchain development.

Apologies if the issue is a nuisance, feel free to close it. If you'd like to reach out to me my email is public on my profile.

Thanks!

Read Me File Issue

$kmdClient = new KmdClient('127.0.0.1', 'YOUR-API-KEY');
$algorand = new Algorand($algodClient, $indexerClient, $kdmClient);

Please change the spell of $kdmClient to $kmdClient in second line (the third paramter).

Failed to create NFT token without metaData

vendor\rootsoft\algorand-php\src\Models\Transactions\Types\AssetConfigTransaction.php

!

  1. metaData allow null
  2. Exception in this string

"message": "MessagePack\Type\Bin::__construct(): Argument #1 ($data) must be of type string, null given, called in /var/www/html/vendor/rootsoft/algorand-php/src/Models/Transactions/Types/AssetConfigTransaction.php on line 136",

  1. Bin allow only string in the constructor

Transactions are not using mainnet credentials.

When configuring Algorand.php with PureStake credentials for Mainnet the transactions are still done in TestNet.

When trying to hardcode the credentials in the rest of the package code, the actions on the Algorand network throw a 'Forbidden' error.

Did I miss any settings?

failed to destroy asset

the destroy() method of the AssetConfigTransactionBuilder class returns an instance of the AssetConfigTransaction class, when it should return its context, so that the transaction proceeds to the rate calculation step through the build() method.

keep getting {"message":"Forbidden"} error upon http request making

made a client like:

$algodClient = new AlgodClient(PureStake::TESTNET_ALGOD_API_URL, 'my-api-key');
$indexerClient = new IndexerClient(PureStake::TESTNET_INDEXER_API_URL, ''my-api-key');
$kmdClient = new KmdClient('127.0.0.1', ''my-api-key');
$algorand = new Algorand($algodClient, $indexerClient, $kmdClient);

making http request:

$transaction = TransactionBuilder::payment()
    ->sender($account->getAddress())
    ->note('test')
    ->amount(1000000) // 1 Algo
    ->receiver(Address::fromPublicKey("some-address"))
    ->useSuggestedParams($algorand)
    ->suggestedFeePerByte(10)
    ->build();

error was occurred at line ->useSuggestedParams($algorand)

the error:

Fatal error: Uncaught Rootsoft\Algorand\Exceptions\ApiKeyException: {"message":"Forbidden"} in /Users/h1-226/code/phpz/vendor/rootsoft/algorand-php/src/Traits/MakesHttpRequests.php:125
Stack trace:
#0 /Users/h1-226/code/phpz/vendor/rootsoft/algorand-php/src/Traits/MakesHttpRequests.php(106): Rootsoft\Algorand\Algorand->handleRequestError(Object(GuzzleHttp\Psr7\Response))
#1 /Users/h1-226/code/phpz/vendor/rootsoft/algorand-php/src/Traits/MakesHttpRequests.php(27): Rootsoft\Algorand\Algorand->request(Object(Rootsoft\Algorand\Clients\AlgodClient), 'GET', 'v2/transactions...', Array) 
#2 /Users/h1-226/code/phpz/vendor/rootsoft/algorand-php/src/Services/ManagesTransactionParamsV2.php(19): Rootsoft\Algorand\Algorand->get(Object(Rootsoft\Algorand\Clients\AlgodClient), '/v2/transaction...')
#3 /Users/h1-226/code/phpz/vendor/rootsoft/algorand-php/src/Models/Transactions/Builders/RawTransactionBuilder.php(361): Rootsoft\Algorand\Algorand->getSuggestedTransactionParams()
#4 /Users/h1-226/code/phpz/index.php(61): Rootsoft\Algorand\Models\Transactions\Builders\RawTransactionBuilder->useSuggestedParams(Object(Rootsoft\Algorand\Algorand))
#5 {main} thrown in /Users/h1-226/code/phpz/vendor/rootsoft/algorand-php/src/Traits/MakesHttpRequests.php on line 125

tested out my api key in https://developer.purestake.io/apis, everything was working fine over there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.