Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial draft for alpha release #1

Merged
merged 99 commits into from
May 24, 2019

Conversation

chetankothari
Copy link

@chetankothari chetankothari commented Apr 17, 2019

Listing things that need to be improved or addressed

  1. Allow signing with another account than the primary account
  2. Accept channel management as a dependency
  3. Dynamic stub generation (currently the sdk expects the user to give the sub for it to work)

I have added a simple example file which tries to invoke example calculator service. code.
Sample usage has been added to snet-code-examples which can be easily tried out locally.

Need help with identifying the correctness of all the operations and corner cases if I have missed any. I feel we can do better with the design and happy to hear suggestions if any.

src/PaymentChannel.js Outdated Show resolved Hide resolved
src/PaymentChannel.js Outdated Show resolved Hide resolved
src/PaymentChannel.js Outdated Show resolved Hide resolved
src/PaymentChannel.js Outdated Show resolved Hide resolved
src/Account.js Show resolved Hide resolved
src/sdk.js Outdated Show resolved Hide resolved
@@ -0,0 +1,61 @@
import { find } from 'lodash';

export default class DefaultPaymentChannelManagementStrategy {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add interface to implement custom strategy - not sure if interfaces are common in JS, thogh :-)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this would be communicated with api docs which would be made available soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants