-
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.
Merge branch 'main' into walletlib-expose-authv2-params
- Loading branch information
Showing
7 changed files
with
224 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.