-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nur Fikri <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Not Jeremy Liu <[email protected]> Co-authored-by: Todd Kao <[email protected]> Co-authored-by: thal0x <[email protected]>
- Loading branch information
1 parent
c6d2330
commit dacf973
Showing
55 changed files
with
1,504 additions
and
778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': patch | ||
--- | ||
|
||
ability to pass signer and account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/client': patch | ||
--- | ||
|
||
update getCosmosSigner type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': patch | ||
--- | ||
|
||
fix balance loading display state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': patch | ||
--- | ||
|
||
fix loading indicator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': patch | ||
--- | ||
|
||
Add callback functions for wallet connect/disconnect and transaction broadcasted / completed / failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/client': minor | ||
--- | ||
|
||
stargate transfer types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': patch | ||
--- | ||
|
||
exclude assets programatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': patch | ||
--- | ||
|
||
add daodao iframe wallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@skip-go/widget': minor | ||
--- | ||
|
||
evm mobile wallet support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'nextjs': patch | ||
--- | ||
|
||
fix example default route and client asset search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: 'Connected Wallet' | ||
|
||
--- | ||
|
||
## Overview | ||
|
||
If your application has already connected to a user's wallet (e.g., via MetaMask for EVM networks, Phantom for Solana, or Keplr for Cosmos), you can provide this information directly to the Widget. By doing so, the Widget will: | ||
|
||
- Display and query balances for the user's already-connected wallet addresses for supported chains. | ||
- Use the signer functions you provide to facilitate transactions, token swaps, or any operation that requires the user's signature. | ||
|
||
This eliminates the need for the user to perform a separate connection flow within the widget itself, improving their overall experience and reducing friction. | ||
|
||
<Info> | ||
See a full code example [here](https://github.com/skip-mev/skip-go/tree/staging/examples/nextjs/src/app/injected/page.tsx). | ||
</Info> | ||
|
||
## Key Props and Concepts | ||
|
||
### `connectedAddresses` | ||
|
||
The `connectedAddresses` prop is a map from chain IDs to addresses. This map tells the widget which addresses are currently connected and should be used for transactions. | ||
|
||
- **Type:** `Record<ChainId, Address>` | ||
- **Example:** | ||
```typescript | ||
const accountMap: Record<string, string> = { | ||
"1": "0x123...abc", // Ethereum mainnet address | ||
"solana": "3n9...xyz", // Solana address | ||
"cosmoshub-4": "cosmos1...", // Cosmos Hub address | ||
... | ||
}; | ||
|
||
### Signer Functions | ||
|
||
In addition to passing in `connectedAddresses`, you must also provide the widget with signer functions so it can sign and send transactions on behalf of the user. These functions vary by chain type and are provided as separate props: | ||
|
||
- `getCosmosSigner() => Promise<OfflineSigner>` | ||
- `getEVMSigner() => Promise<WalletClient>` | ||
- `getSVMSigner() => Promise<PhantomWalletAdapter>` | ||
|
||
Each of these functions should return a signer (or signer-like interface) that the widget can use to create and broadcast transactions. |
Oops, something went wrong.