-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MWA 2.0 clientlib-ktx support (#576)
* Add new authorize method for MWA 2.0 spec support * Add deprecated annotations, prep for branching functionality * Add new authorize call for v2 wallets * Rename some internal objects and variables more appropriately * Add protocol version support request * Add Blockchain object support * Make identity details required, add blockchain propert * Fix and add MWA 2.0 specific tests * Make build with latest updates * PR Feedback * Fix mainnet for solana blockchain
- Loading branch information
1 parent
46f549b
commit 482c0d1
Showing
6 changed files
with
222 additions
and
141 deletions.
There are no files selected for viewing
31 changes: 30 additions & 1 deletion
31
...clientlib-ktx/src/main/java/com/solana/mobilewalletadapter/clientlib/AdapterOperations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,49 @@ | ||
package com.solana.mobilewalletadapter.clientlib | ||
|
||
import android.net.Uri | ||
import androidx.annotation.Nullable | ||
import com.solana.mobilewalletadapter.clientlib.protocol.MobileWalletAdapterClient | ||
|
||
interface AdapterOperations { | ||
suspend fun authorize(identityUri: Uri, iconUri: Uri, identityName: String, rpcCluster: RpcCluster = RpcCluster.MainnetBeta): MobileWalletAdapterClient.AuthorizationResult | ||
|
||
@Deprecated( | ||
"Replaced by updated authorize() method, which adds MWA 2.0 spec support", | ||
replaceWith = ReplaceWith("authorize(identityUri, iconUri, identityName, chain, authToken, features, addresses)"), | ||
DeprecationLevel.WARNING | ||
) | ||
suspend fun authorize( | ||
identityUri: Uri, | ||
iconUri: Uri, | ||
identityName: String, | ||
rpcCluster: RpcCluster = RpcCluster.MainnetBeta | ||
): MobileWalletAdapterClient.AuthorizationResult | ||
|
||
suspend fun authorize( | ||
identityUri: Uri, | ||
iconUri: Uri, | ||
identityName: String, | ||
chain: String, | ||
authToken: String? = null, | ||
features: Array<String>? = null, | ||
addresses: Array<ByteArray>? = null | ||
): MobileWalletAdapterClient.AuthorizationResult | ||
|
||
suspend fun reauthorize(identityUri: Uri, iconUri: Uri, identityName: String, authToken: String): MobileWalletAdapterClient.AuthorizationResult | ||
|
||
suspend fun deauthorize(authToken: String) | ||
|
||
suspend fun getCapabilities(): MobileWalletAdapterClient.GetCapabilitiesResult | ||
|
||
@Deprecated( | ||
"Replaced by signMessagesDetached, which returns the improved MobileWalletAdapterClient.SignMessagesResult type", | ||
replaceWith = ReplaceWith("signMessagesDetached(messages, addresses)"), | ||
DeprecationLevel.WARNING | ||
) | ||
suspend fun signMessages(messages: Array<ByteArray>, addresses: Array<ByteArray>): MobileWalletAdapterClient.SignPayloadsResult | ||
|
||
suspend fun signMessagesDetached(messages: Array<ByteArray>, addresses: Array<ByteArray>): MobileWalletAdapterClient.SignMessagesResult | ||
|
||
suspend fun signTransactions(transactions: Array<ByteArray>): MobileWalletAdapterClient.SignPayloadsResult | ||
|
||
suspend fun signAndSendTransactions(transactions: Array<ByteArray>, params: TransactionParams = DefaultTransactionParams): MobileWalletAdapterClient.SignAndSendTransactionsResult | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.