let sign = await window?.keplr?.signDirect(
chain.cosmosChainId,
sender.accountAddress,
{
bodyBytes: msg.signDirect.body.serializeBinary(),
authInfoBytes: msg.signDirect.authInfo.serializeBinary(),
chainId: chain.cosmosChainId,
accountNumber: new Long(sender.accountNumber),
},
// @ts-expect-error the types are not updated on Keplr side
{ isEthereum: true },
)
if (sign !== undefined) {
let rawTx = createTxRaw(sign.signed.bodyBytes, sign.signed.authInfoBytes, [
new Uint8Array(Buffer.from(sign.signature.signature, 'base64')),
])
// Broadcast it
const postOptions = {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: generatePostBodyBroadcast(rawTx),
}
let broadcastPost = await fetch(
https://rest.cosmos.directory/evmos${generateEndpointBroadcast()},
postOptions,
)
let response = await broadcastPost.json()
console.log("response", response)
};
This is the code which I tried to run ibc transfer.
but how can we use this code on mobile version?
because there is no window.keplr on the mobile.
Please help me how can we run the transactions using keplr mobile,