Skip to main content
Version: 3.0.0

Establishing a connection

A connection to Coinbase Wallet can be initiated by calling the initiateHandshake function provided by the SDK. The function also takes in an optional initialActions parameter which apps can use to take certain actions along with the initial handshake request.

val requestAccount = Web3JsonRPC.RequestAccounts().action()
val handShakeActions = listOf(requestAccount)

initialActions = handShakeActions
) { result: Result<List<ActionResult>>, account: Account? ->
result.onSuccess { actionResults: List<ActionResult> ->
actionResults.handleSuccess("Handshake", handShakeActions, account)
result.onFailure { err ->

An example handshake request is provided in the sample application.

Was this helpful?