Skip to content

the response of tonconnectUI.sendTransaction()? #189

Description

@huangxok

Your Question

the respose of tonconnectUI.sendTransaction()?
I have read the document about tonconnectUI.sendTransaction method.
the method return a boc.
so what's the boc?

is it a message hash?
how to analysis the boc?

`const transaction = {
validUntil: Math.floor(Date.now() / 1000) + 60, // 60 sec
messages: [
{
address: "EQBBJBB3HagsujBqVfqeDUPJ0kXjgTPLWPFFffuNXNiJL0aA",
amount: "20000000",
// stateInit: "base64bocblahblahblah==" // just for instance. Replace with your transaction initState or remove
},
{
address: "EQDmnxDMhId6v1Ofg_h5KR5coWlFG6e86Ro3pc7Tq4CA0-Jn",
amount: "60000000",
// payload: "base64bocblahblahblah==" // just for instance. Replace with your transaction payload or remove
}
]
}

try {
const result = await tonConnectUI.sendTransaction(transaction);

// you can use signed boc to find the transaction 
// what‘s myAppExplorerService.getTransaction to do?
const someTxData = await myAppExplorerService.getTransaction(result.boc);
alert('Transaction was sent successfully', someTxData);

} catch (e) {
console.error(e);
}`

Context

No response

What have you tried so far?

No response

Relevant Code or Commands

No response

Documentation Check

  • Yes, I have checked the documentation.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions