File tree Expand file tree Collapse file tree 4 files changed +2993
-2777
lines changed
packages/android/algokit_transact
src/main/kotlin/com.example.algokit_transact
uniffi/algokit_transact_ffi Expand file tree Collapse file tree 4 files changed +2993
-2777
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ android {
5151}
5252
5353dependencies {
54- // implementation(project(":transact"))
55- implementation(" com.example.transact:algo-transact-ffi:0.0.1" )
54+ implementation(project(" :transact" ))
55+ // implementation("com.example.transact:algo-transact-ffi:0.0.1")
5656 implementation(libs.androidx.core.ktx)
5757 implementation(libs.androidx.appcompat)
5858 implementation(libs.material)
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class MainActivity : ComponentActivity() {
2525 color = MaterialTheme .colorScheme.background
2626 ) {
2727 val address = TransactApi ()
28- .createAddressFromString (" YVRRLLVBX54N44WG4EZJWPXXA6RROAU5TLHB4XHCMZFVZBVCB6KSDWDSEQ" )
29- Greeting (address.address )
28+ .getPubKeyFromAddress (" YVRRLLVBX54N44WG4EZJWPXXA6RROAU5TLHB4XHCMZFVZBVCB6KSDWDSEQ" )
29+ Greeting (address.toString() )
3030 }
3131 }
3232 }
@@ -71,4 +71,4 @@ fun GreetingPreview() {
7171 HelloWorldTheme {
7272 Greeting (" Android" )
7373 }
74- }
74+ }
Original file line number Diff line number Diff line change 11package com.example.transact
22
3+ import android.R.attr.publicKey
34import android.location.Address
45import uniffi.algokit_transact_ffi.Transaction
56import uniffi.algokit_transact_ffi.addressFromPublicKey
7+ import uniffi.algokit_transact_ffi.publicKeyFromAddress
68
79class TransactApi {
810 companion object {
@@ -15,12 +17,12 @@ class TransactApi {
1517 }
1618 }
1719
18- fun createAddressFromPubKey (publicKey : ByteArray ): Address {
20+ fun createAddressFromPubKey (publicKey : ByteArray ): String {
1921 return addressFromPublicKey(publicKey)
2022 }
2123
22- fun createAddressFromString ( publicKey : ByteArray ): Address {
23- return addressFromPublicKey(publicKey )
24+ fun getPubKeyFromAddress ( address : String ): ByteArray {
25+ return publicKeyFromAddress(address )
2426 }
2527
2628 fun encodeTransaction (transaction : Transaction ): ByteArray {
You can’t perform that action at this time.
0 commit comments