Kunstmaan / Kunstmaan/libphp-multichain

Extensibility

Open
#5 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
31
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Hi,

I've come across an issue using this library which is how we can add more features to it without touching the library itself. One concrete situation is the missing completerawexchange command that I needed but had no way to add it since the client is a private property with no getter. I suggest to decouple the JsonRPC\Client from the MultichainClient which will then be injected ideally in the constructor and provide a getter for it. This way I'd be able to extend MultichainClient and implement new features if required. More importantly I'd also be able to change the connection at runtime without re-instantiating MultichainClient.

Let me know if you're open for a pull request and I'll create one with the suggested changes.

Best

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing how JsonRPC\Client is held and used by MultichainClient, including the private connection referenced in the issue. Done means the client can be supplied and accessed as proposed, while supporting extension of MultichainClient and changing the connection without re-instantiation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.