Skip to content
New issue

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

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

Already on GitHub? # to your account

Feat: update typescript/app template to latest bindings #1855

Merged
merged 3 commits into from
Aug 21, 2023

Conversation

dOrgJelli
Copy link
Contributor

No description provided.

@dOrgJelli dOrgJelli changed the title feat: update typescript/app template to latest bindings (WIP) feat: update typescript/app template to latest bindings Aug 15, 2023
@Niraj-Kamdar Niraj-Kamdar requested a review from namesty as a code owner August 17, 2023 00:01
@@ -0,0 +1,15 @@
import { BaseEthereum } from "./wrap";
Copy link
Contributor

Choose a reason for hiding this comment

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

This would go in npm sdk


const client = new PolywrapClient();
import { Ethereum } from "./ethereum";
import { Logger } from "./logger";
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be npm wrap sdk


import { CoreClient, PolywrapClient } from "@polywrap/client-js";

export class Ethereum extends BaseEthereum {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As an app developer, it feels weird that I have to do this every time. I would imagine that the code below would be the "sane defaults", and if I wanted to change it I could do something like:

import { Ethereum as DefaultEthereum } from "./wrap"

class Ethereum extends DefaultEthereum {
  protected _getDefaultClient(): CoreClient {
    // TODO: create your own custom client
  }
}

@dOrgJelli dOrgJelli changed the title (WIP) feat: update typescript/app template to latest bindings Feat: update typescript/app template to latest bindings Aug 21, 2023
@dOrgJelli dOrgJelli merged commit cb1d37c into origin-dev Aug 21, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants