Skip to main content
A connected wallet can be asked to sign and broadcast transactions: build a typed payload, send it over the bridge, and the user approves it in their wallet app. All snippets assume a connected connector — see Connect Wallet.

Building the Request

A request is a SendTransactionPayload containing one or more SendTransactionMessage entries:
SendTransactionMessage fields: SendTransactionPayload fields:

Sending

send_transaction() sends the request to the wallet and returns a request_id immediately — the user still has to approve it in their wallet app:
Before sending, the connector automatically verifies that the connected wallet declares the SendTransaction feature, supports the number of messages in the payload (each wallet advertises a max_messages limit, typically 4), and supports extra currencies if any message uses them. A failed check raises WalletNotSupportFeatureError; calling without a connected wallet raises WalletNotConnectedError.

Waiting for the Result

wait_transaction(request_id) blocks until the wallet signs and submits the transaction (or rejects it, or the request times out) and returns a (result, error) tuple:
result.boc is the signed external message BoC returned by the wallet. result.normalized_hash is the locally computed normalized external-message hash — it can be used to look the transaction up in explorers and indexers, but it is not the on-chain transaction hash. Common errors are UserRejectsError (the user declined in the wallet UI) and RequestTimeoutError (no response before valid_until) — see Errors for the full list. To stop waiting for a pending request (for example, when the user navigates away), call connector.drop_request(request_id).

Complete Example

Batch Transfers

A single request can contain several messages — the wallet signs and sends them in one transaction. Add more SendTransactionMessage entries to the messages list:
The number of messages is limited by the wallet’s advertised max_messages, checked by send_transaction() as described in Sending.

Send Request Examples

Full source code of the transaction flow on GitHub