getAccount
Used to get the account address under this MarsApp, ensuring unique user identity under each MarsApp. Different MarsApps will have different account addresses, reflecting the independent identity of users in each application.
Request Parameters
Parameter Name
Type
Required
Description
type
String
No
Request type. Defaults to returning BTC address; if 1 is passed, returns ECC public key (Base64 encoded).
Response Parameters
Parameter Name
Type
Description
result
String
Returned account address or public key.
Call Example
let payload = {
type: "1"
};
const response = await relayx.getAccount(payload);
if (response.code === 200) {
console.log("RelayApp account:", response.result);
}Last updated