Integrate with Slope Wallet (Mobile)
Establishing a Connection
Mobile applications and wallets are pulling up and passing references to each other using the URL scheme method.
If the android device cannot pull up the other applications, you need to add the package name of the other applications to your AndroidManifest.xml.
Connecting: Requires connection and returns wallet address
Mobile applications: Assembly link request
Reference format
Formatted for post-transfer
Description of parameters
Parameter | Data Type | Necessary | Formatting | Description |
---|---|---|---|---|
slopewallet://wallet.slope | String | Yes | N/A | Schema Protocol |
returnSchemes | String | Yes | utf8+hex | Callbacks to scheme protocols, i.e. business-defined scheme protocols |
slopePayParams | String | Yes | utf8+hex | Requires parameter |
Description of the slopePayParams structure
Parameter | Data type | Necessary | Description |
---|---|---|---|
type | String | Yes | pay: indicates payment connect: indicates a connection |
Wallet: Returns public key address
Return the public key address to mobile applications
Sending a transaction
Transaction Request
Mobile applications: Assembly Request Parameters.
Reference format
Formatted for post-transfer
Description of parameters
Parameter | Data type | Necessary | Formatting | Description |
---|---|---|---|---|
slopewallet://wallet.slope | String | Yes | N/A | Schema protocal |
returnSchemes | String | Yes | utf8+hex | Callbacks to scheme protocols, i.e. business-defined scheme protocols |
slopePayParams | String | Yes | utf8+hex | Requires parameter |
Description of slopePayParams structure
Parameter | Data type | Necessary | Description |
---|---|---|---|
type | String | Yes | pay: indicates payment connect: indicates a connection |
address | String | Yes | Receiver's wallet address |
memo | String | Yes | Order numbers, generated and managed by the mobile application itself |
amount | String | Yes | Payment amount |
symbol | String | Yes | Token symbol, may be empty if token is SOL |
label | String | No | Title |
message | String | No | Content |
Mobile application transaction request code example
Wallet transaction signature code example
Signing a Message
Once the mobile applications pulls up the wallet and sends the transaction information, it indicates that the user has allowed the native wallet application to sign and send the transaction to the chain.
Wallet: Assembly response parameters
Parameter | Data type | Necessary | Formatting | Description |
---|---|---|---|---|
slopePayReturn | String | Yes | N/A | TxSignature returned on the push-to-chain structure for the query result as a string |
type | String | Yes | N/A | pay: indicates payment connect: indicates a connection |
error | String | No | N/A | A json string of the map structure, where the user represents the result of the operation |
error code | error message |
---|---|
80000000 | SUCCESS. |
80000001 | Unknown error. |
80000002 | Slope Wallet is not installed. |
80000003 | Slope Wallet app version is too low. |
80000004 | Insufficient account balance. |
80000005 | Token account is not created. |
80000006 | Unconfirmed transaction. |
80000007 | Transaction failed. |
Last updated