Movement Provider
After setting up your wallet, you can have access to the Movement provider:
// react
const { providers } = useTomo()
const { movementProvider } = providers;
// pure js
const tronProvider = window.tomo_movementGet Movement Address
The Movement address is from the wallet state or provider. In React framework:
import { useTomo} from '@tomo-inc/tomo-web-sdk';
const { walletState, providers } = useTomo()
// get from wallet state
const movementAddress = walletState.movementAddress
// or get from provider
const movementAddress = await providers.movementProvider.getAddress()
Or Pure JS:
Provider Functions
Signing a Message
It uses the Movement provider to sign a plaintext message with a nonce. The output is a response message output defined as below:
Sign Transaction
To sign a transaction, you need to create a AnyRawTransaction from Aptos SDK and send it to the movement Provider for signing.
Send Transaction
Our movement provider also supports signing and submitting a transaction through one call, which require a InputGenerateTransactionPayloadData as inputs.
Example
We provide an example as follows:
React
Pure JS
Last updated