Sign Generic Transaction
Once an application is connected to Martian wallet via connect method, an app can request the user to Sign a generic transaction using window.martian.signGenericTransaction()
and it will return a Promise that resolves when the user accepts the request and reject (throw when awaited) when the user declines the request or request is not valid/fails. It takes one parameter listed below:
Object
Below is the object structure:
Here:
"func" should have function name, For e.g.
0x1::coin::transfer
"args" should have list of arguments for the specified function
"type_args" should have list of type arguments, For e.g.
0x1::aptos_coin::AptosCoin
Below is an example code describing the way to sign a generic transaction.
Last updated