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 stateconstmovementAddress=walletState.movementAddress// or get from providerconstmovementAddress=awaitproviders.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.
/** pure js */
import { getWalletState } from '@tomo-inc/tomo-web-sdk';
/** pure js */
// get from wallet state
const movementAddress = getWalletState().movementAddress
// or get from provider
const movementAddress = await window.tomo_movement.getAddress()