A web application may also request Adena to create a signed transaction via the adena.SignTx method. Upon receiving the request, Adena will prompt the user to sign the transaction.
If the user proceeds to sign the transaction, Adena will return the encoded transaction data on the console.
Code
adena.SignTx(
tx: {
messages: [
{
type: "string",
value: object
},
// you may add additional messages within the brackets
...
],
memo?: string
},
isNotification?: boolean // default: true
)
Params
Key
Type
Description
message.type
string
"/bank.MsgSend" for transfers
"/vm.m_call" for contract calls
"/vm.m_addpkg" for adding packages
"/vm.m_run" for simulating transactions
message.value
object
Values (must match the type's format)
memo
string
Transaction memo (tag)
tx
[Transaction Model]
Transaction info
isNotification
boolean
Notification (default: true)
Response
Key
Type
Description
code
number
Account number
status
string
Returns success or failure
type
string
Response type
message
string
Descriptive message of the result
data
object
Encoded Transaction Model
Transaction Model
Key
Type
Description
messages[].type
string
"/bank.MsgSend" for transfers
"/vm.m_call" for contract calls
"/vm.m_addpkg" for adding packages
"/vm.m_run" for executing a gno script