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

created a custom-connector folder > custom-connector.md documentation #70

Closed

Conversation

mimiprosper
Copy link

@mimiprosper mimiprosper commented Dec 20, 2024

I have a made Documentation on adding a custom wallet connector.

Fixes #59

Copy link
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

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

Some comments, please take into account that the point is to teach someone how they can go about implementing a custom connection, also would appreciate it if you can provide a sample full code that is copiable

Copy link
Collaborator

Choose a reason for hiding this comment

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

need to place it under the Recipes section, you can check when rendering.

Comment on lines 34 to 39
```
import { Starknet } from 'starknet.js';
import { InjectedConnector } from 'starknet.js/connectors/injected';
import { WebWalletConnector } from 'starknet.js/connectors/webwallet';
import { QRCodeModal } from '@walletconnect/qrcode-modal';
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use language-specific syntax highlighting, you can refer to other examples

Uploading image.png…

Comment on lines 1 to 9
# Contents

1. [Introduction](#introduction)
2. [Install Dependencies](#configure-chains)
3. [Create Custom Connector Class](#create-custom-connector-class)
4. [Implement Wallet Connection Methods](#implement-wallet-connection-methods)
5. [Handle Errors](#handle-errors)
6. [Integrate with User Interface](#integrate-with-user-interface)
7. [Summary](#summary)
Copy link
Collaborator

Choose a reason for hiding this comment

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

we dont need this section

Comment on lines 42 to 43
Create a custom connector class that extends the base Starknet connector:

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please elaborate futher

Comment on lines 91 to 92
Implement methods to handle different types of wallet connections:
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please elaborate futher

@metalboyrick
Copy link
Collaborator

gm @mimiprosper how is it going, do be reminded that ODHack is ending today.

@mimiprosper
Copy link
Author

mimiprosper commented Dec 22, 2024

GM @metalboyrick

Please do you have materials that can help? There are limited materials/no material about custom wallet connector on starknet. If you have any material that can helpful please send. BurnerWalletConnector not enough resource. Time for this kind of research and work is too short. Thanks.

@metalboyrick
Copy link
Collaborator

you can fix my comments first, aside from the elaboration ones they should be pretty simple.

@metalboyrick
Copy link
Collaborator

here is a short article on what these connectors do: https://www.starknet-react.com/docs/wallets. connector basically are interfaces that abstract away wallet features, BurnerConnector abstracts the Burner Wallets provided in starknet-devnet, ArgentConnector abstracts Argent wallets, and so on.

The code structure that you wrote within the documentation looks correct. But some adjustments are needed, you can even put the BurnerConnector as an example as it is in fact a custom connector.

@mimiprosper
Copy link
Author

mimiprosper commented Dec 22, 2024

@metalboyrick

I would fix now, am on it.

@mimiprosper
Copy link
Author

@metalboyrick

  • I have put the Docs in the recipes folder.
  • I have fixed the issues you commented

Comment on lines +7 to +16
First, install the necessary packages:

```
npm install @scaffold-stark/stark-burner
```
OR

```
yarn add @scaffold-stark/stark-burner
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant breaking down the burner wallet as an example connector ser. not installing it, this would defeat the purpose of the documentation

@metalboyrick
Copy link
Collaborator

GM @mimiprosper, seems like we will not be able to finish the PR in due time. Therefore we would not be able to consider this PR as an ODHack 11 PR, but you can still work on it but the rewards will not be part of the ODHack11 reward.

Really appreciate the attempt!

@mimiprosper
Copy link
Author

mimiprosper commented Dec 23, 2024

GM @metalboyrick

I would work on this task and get it right. Please i need some clarification:

  1. You want me to build/code a custom wallet connector (like BurnerWalletConnector).
  2. Write a Documentation on how to create the custom wallet connector a built/coded
  3. Write a Documentation on how to implement the custom wallet connector in a dApp

Thanks.

@metalboyrick
Copy link
Collaborator

GM @metalboyrick

I would work on this task and get it right. Please i need some clarification:

  1. You want me to build/code a custom wallet connector (like BurnerWalletConnector).
  2. Write a Documentation on how to create the custom wallet connector a built/coded
  3. Write a Documentation on how to implement the custom wallet connector in a dApp

Thanks.

essentially, the main idea is that we wanted to do no. 3, if you can do 1, that is great, but if you don't know where to start, you can explain how BurnerWalletConnector is built, without having to have a custom one.

  1. Write a Documentation on how to implement the custom wallet connector in a dApp

in this case how to implement one with scaffold so people who want to build wallets can also use scaffold to help them do so.

@metalboyrick
Copy link
Collaborator

Closed due to inactivity

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.

[DOCS] Add Docs Recipe on “ Adding custom connectors”
2 participants