Skip to main content

Installation

Magic interacts with the Cosmos blockchain via Magic’s extension NPM package @magic-ext/cosmos. The Cosmos extension also lets you interact with the blockchain using methods from cosmjs.
NOTEYou can skip straight to our kitchen sink example directly:Cosmos Example

Initialization

JavaScript

Common Methods

Sign and Send Transaction

To send or sign a standard Cosmos blockchain transaction, you can call the magic.cosmos.signAndBroadcast method or magic.cosmos.sign method.
JavaScript

Send Tokens

Using magic.cosmos.sendTokens function to native tokens on Cosmos blockchain.
JavaScript

Change Address

Using magic.cosmos.changeAddress function to change the address prefix.
JavaScript

Resources