Sign Amino
A web application may also request Adena to sign and send the transaction without broadcasting it directly on Adena via the Sign 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 signed transaction data on the console for the web application to broadcast it by itself.
Code
adena.Sign(
tx: {
messages: [
{
type: "string",
value: object
},
// you may add additional messages within the brackets
...
],
memo?: string
},
isNotification?: boolean // default: true
)Params
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
code
number
Account number
status
string
Returns success or failure
type
string
Response type
message
string
Descriptive message of the result
data
object
Signed Amino Model
Transaction Model
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
messages[].value
object
Values (must match the type's format)
memo
String
Transaction memo (tag)
Signed Amino Model
signed
StdSignDoc
Signed transaction document
signature
StdSignature
Signature
checkTx
object
Only returns on successful transactions
deliverTx
object
Only returns on successful transactions
/bank.MsgSend
/bank.MsgSendSample Request
Sample Response
/vm.m_call
/vm.m_callSample Request
Sample Response
/vm.m_addpkg
/vm.m_addpkgSample Request
Sample Response
/vm.m_run
/vm.m_runSample Request
Sample Response
Last updated