Skip to content

Commit

Permalink
chore: documenation
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Nov 14, 2024
1 parent 1ef08e0 commit d7e34c9
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 108 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
4 changes: 3 additions & 1 deletion examples/sample-react-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ function App() {

useEffect(() => {
const loadCounter = async () => {
const counter = await counterContract.read.counter();
const counter = await counterContract.read.counter({
revision: {},
});
setCount(counter[0]);
};

Expand Down
6 changes: 3 additions & 3 deletions packages/dapp-kit-react/src/DAppKitProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const useThor = (): DAppKitContext['thor'] => {
const context = useContext(Context);

if (!context) {
throw new Error('"useThor" must be used within a ConnexProvider');
throw new Error('"useThor" must be used within a DAppKitProvider');
}

return context.thor;
Expand All @@ -160,7 +160,7 @@ export const useWallet = (): DAppKitContext['wallet'] => {
const context = useContext(Context);

if (!context) {
throw new Error('"useWallet" must be used within a ConnexProvider');
throw new Error('"useWallet" must be used within a DAppKitProvider');
}

return context.wallet;
Expand All @@ -171,7 +171,7 @@ export const useWalletModal = (): DAppKitContext['modal'] => {

if (!context) {
throw new Error(
'"useWalletModal" must be used within a ConnexProvider',
'"useWalletModal" must be used within a DAppKitProvider',
);
}
return context.modal;
Expand Down
6 changes: 3 additions & 3 deletions packages/dapp-kit-react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ export interface AccountState {
}

/**
* Connex Provider Options
* DAppKit Provider Options
* @param children - React children
*/
export type DAppKitProviderOptions = DAppKitUIOptions & {
children: React.ReactNode;
};

/**
* Connex Context
* This context is used to provide the Connex instance and the Connex Vendor instance
* DAppKit Context
* This context is used to provide the Wallet and Thor instances
* to the application.
*/

Expand Down
3 changes: 2 additions & 1 deletion packages/dapp-kit-ui/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# `@vechain/dapp-kit-ui`

The Vechain DApp Kit serves as a sophisticated layer built upon @vechain/connex, providing a simplified and efficient
The Vechain DApp Kit serves as a sophisticated layer built upon @vechain/sdk-network, providing a simplified and
efficient
avenue for engaging with a multitude of Vechain wallets. This innovative toolkit enhances the ease of interaction,
offering developers a seamless bridge to connect with diverse Vechain wallet functionalities. For more information,
please refer to the official [Vechain Docs](https://docs.vechain.org/developer-resources/sdks-and-providers/dapp-kit)
Expand Down
5 changes: 3 additions & 2 deletions packages/dapp-kit/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# `@vechain/dapp-kit`

The Vechain DApp Kit serves as a sophisticated layer built upon @vechain/connex, providing a simplified and efficient
The Vechain DApp Kit serves as a sophisticated layer built upon @vechain/sdk-network, providing a simplified and
efficient
avenue for engaging with a multitude of Vechain wallets. This innovative toolkit enhances the ease of interaction,
offering developers a seamless bridge to connect with diverse Vechain wallet functionalities. For more information,
please refer to the official [Vechain Docs](https://docs.vechain.org/developer-resources/sdks-and-providers/dapp-kit)
Expand Down Expand Up @@ -41,7 +42,7 @@ const { thor, vendor, wallet } = new DAppKit({
```

- You can set the wallet source when the user selects a wallet, or if you want to default to a specific wallet.
- Connex is ready to use as normal
- Thor and the Wallet instances are ready to use

```typescript
import type { WalletSource } from '@vechain/dapp-kit';
Expand Down
Loading

0 comments on commit d7e34c9

Please sign in to comment.