forked from wormhole-foundation/wormhole-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5d8411
commit 2f29106
Showing
7 changed files
with
84 additions
and
79 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
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 |
---|---|---|
@@ -1,27 +1,25 @@ | ||
Wormhole Connect SDK | ||
-------------------- | ||
|
||
## Wormhole Connect SDK | ||
|
||
An SDK that wraps the core Wormhole SDK and provides a convenient API to interact with the Wormhole Token Bridge protocol. | ||
|
||
Here is an example showing how to send a token across chains using this SDK: | ||
|
||
Here is an example showing how to send a token across chains using this SDK: | ||
```ts | ||
const context = new WormholeContext('MAINNET'); | ||
// interact easily with any chain! | ||
// supports EVM, Solana, Terra, etc | ||
const tokenId = { | ||
chain: 'ethereum', | ||
address: '0x123...', | ||
} | ||
const context = new WormholeContext('MAINNET'); | ||
|
||
// interact easily with any chain! | ||
// supports EVM, Solana, Terra, etc | ||
const tokenId = { | ||
chain: 'ethereum', | ||
address: '0x123...', | ||
}; | ||
|
||
const receipt = context.send( | ||
tokenId, | ||
'10', // amount | ||
'ethereum', // sending chain | ||
'0x789...', // sender address | ||
'moonbeam', // destination chain | ||
'0x789...', // recipient address on destination chain | ||
) | ||
``` | ||
const receipt = context.send( | ||
tokenId, | ||
'10', // amount | ||
'ethereum', // sending chain | ||
'0x789...', // sender address | ||
'moonbeam', // destination chain | ||
'0x789...', // recipient address on destination chain | ||
); | ||
``` |
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
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