evias / nem-php Goto Github PK
View Code? Open in Web Editor NEWNEM Blockchain NIS API Wrapper and Software Development Kit for PHP
Home Page: https://docs.nem.io
License: MIT License
NEM Blockchain NIS API Wrapper and Software Development Kit for PHP
Home Page: https://docs.nem.io
License: MIT License
The PHPECC project has been abandoned for years, despite numerous attempts to fix security issues in the code. Paragon Initiative Enterprises has opted to fork PHPECC in order to provide a more secure implementation of ECDH and ECDSA for PHP projects.
Please refer to the Release Notes for our fork, which contains the specifics about the security issues we fixed and how to ensure your code is safe.
Hi! Here is the code snippet.
App::register('NEM\ServiceProvider');
$nemConfig = app('nem.config');
$nemAPI = app("nem");
$nemSDK = app("nem.sdk");
$service = $nemSDK->account();
$account = $service->getFromAddress("TBORJWW4BRZBZ2NHX5QKDHLZSG6LQZG23DYES3Z2");`
"Type error: Argument 2 passed to NEM\Models\Mutators\ModelMutator::mutate() must be of the type array, object given, called in /Users/CS76Bot/Development/web3/nem/nem-ecom/vendor/evias/nem-php/src/Infrastructure/Service.php on line 127"
If I change the argument type to object the model generated is empty.
- setAttributes in the model class is failing to map the attributes
Any help would be much appreciated :)
Thank you
kornrunner/keccak
requires php: >=7.1
though evias/nem-php
requires php: >=5.5.9
.
Use mine (just a copy of kornrunner/keccak
for php: >=5.3
), fix dependency of evias/nem-php
, or take other way instead please.
Using version ^0.2.14 for evias/nem-php
./composer.json has been updated
Running composer update evias/nem-php
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires evias/nem-php ^0.2.14 -> satisfiable by evias/nem-php[v0.2.14].
- evias/nem-php v0.2.14 requires illuminate/contracts 5.0.33|5.1.|5.2.|5.3.|5.4.|5.5.|5.6.|5.7.* -> found illuminate/contracts[v5.0.33, ..., 5.7.x-dev] but it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
here is my code
$sdk = new \NEM\SDK([
"protocol" => "http",
"use_ssl" => false,
"host" => "52.197.57.86",
"port" => 7890,
"endpoint" => "/",
]);
$message = $sdk->models()->Message(['type' => 1,'plain'=>'test123']);
$messageHash = $message->toDTO();
$keypair = new \NEM\Core\KeyPair("4444353a76a97fd65d67d0d0b5bae23069ca753d8a0793f01091e8051992d9b5","a01ca52e998f17804adfc193782a338b50a8f0476649dd4025fc3d2096cda5d9");
$data['transaction']['signer'] = $keypair->getPublicKey("hex");
$data['transaction']['amount'] = 3;
$data['transaction']['recipient'] = 'TAAM36DYU5GEUR6PBQG74TXCH63FDLF6Y2WXQOE3';
$data['transaction']['type'] = 257;
$data['transaction']['version'] = -1744830463;
$data['transaction']['message'] = $message;
$data['transaction']['message']['payload'] = $messageHash['payload'];
$data['transaction']['message']['type'] = $messageHash['type'];
$transactionM = $sdk->models()->Transaction($data);
$transaction = $service->announce($transactionM, $keypair);
Hi!
I executed Example 4: Custom Headers and response callback configurations, but show warning like below.
php src/HelloNem.php
PHP Warning: trim() expects parameter 1 to be string, object given in PJ_ROOT/vendor/guzzlehttp/psr7/src/MessageTrait.php on line 180
...
Thanks!
Hi, i tried out your 9th example to create a randomly keypair and i want to get clean private key from it, thus i assume
$keypair->getPrivateKey("hex")
this line of code would give me the private key i want, but somehow i try import the result in nano wallet, it shows different address from what your code generated
can you advice me?
Public keys in a MultisigModifications collection are current not sorted. This should be done under the hood when the transaction is serialized.
A method overload will be implemented for the MultisigModifications ModelCollection.
Hi!
Can you show usage example on how to convert account into a multisig account?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.