Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sdks/kotlin/advanced-api-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MainActivity : AppCompatActivity() {
)
)

val (r, s, v) = response.activity.result.signRawPayloadResult!!
val (r, s, v) = response.result
println("Message signed: r=$r, s=$s, v=$v")
} catch (e: Exception) {
println("Error signing message: ${e.message}")
Expand All @@ -66,6 +66,9 @@ class MainActivity : AppCompatActivity() {
}
}
```
<Note>
You can grab the result of the request directly from the `response.result` object. Alternatively, you can also access the full activity metadata from `response.activity`.
</Note>

## Viewing the activity

Expand Down Expand Up @@ -96,12 +99,12 @@ Passkey stamper (minimal)
```kotlin
import androidx.activity.ComponentActivity
import com.turnkey.http.TurnkeyClient
import com.turnkey.passkey.PasskeyStamper
import com.turnkey.stamper.Stamper

// In an Activity (or something with a valid Activity reference)
val client = TurnkeyClient(
apiBaseUrl = config.apiBaseUrl,
stamper = PasskeyStamper(
stamper = Stamper.fromPasskey(
activity = this,
rpId = "your-rp-id.example.com" // must match your WebAuthn RP ID
)
Expand Down
6 changes: 3 additions & 3 deletions sdks/kotlin/using-embedded-wallets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class MainActivity : AppCompatActivity() {
)
)

val createdAddresses = res.activity.result.createWalletAccountsResult!!.addresses
val createdAddresses = res.result.addresses
println(createdAddresses)
} catch (t: Throwable) {
println(t)
Expand Down Expand Up @@ -241,7 +241,7 @@ class MainActivity : AppCompatActivity() {
)
)

val exportBundle = res.activity.result.exportWalletResult!!.exportBundle
val exportBundle = res.result.exportBundle
// Store or transmit the exportBundle securely
} catch (t: Throwable) {
println(t)
Expand Down Expand Up @@ -294,7 +294,7 @@ class MainActivity : AppCompatActivity() {
)
)

val exportBundle = res.activity.result.exportWalletAccountResult!!.exportBundle
val exportBundle = res.result.exportBundle

val keyMaterial = decryptExportBundle(
exportBundle = exportBundle,
Expand Down