npm.io
0.1.0-beta.20 • Published 2 years ago

wormhole-connect-sdk

Licence
ISC
Version
0.1.0-beta.20
Deps
22
Size
9.1 MB
Vulns
22
Weekly
0
Stars
115

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:

 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
 )