RPC Commands
Here is a description of all RPC commands available.
Official SDKs support all of these. To get more detailed info, refer to your SDK documentation.
Subscriptions won't be available on Deeplink channel because of technical limitations.
get_endpoint
Gets the endpoint URL used on AEWallet.
Request
// no payload in request
Success Response
{
endpointUrl: string // Endpoint URL
}
refresh_current_account
Request the wallet to refresh current account info
Request
// no payload in request
Success Response
// no response
get_accounts
Gets the accounts available on AEWallet.
Request
// No payload
Success Response
{
accounts: [
{
shortName: string, // Account name
serviceName: string, // Service name
genesisAddress: string, // Genesis address
}
]
}
send_transaction
Signs and sends a transaction.
Request
{
type: string, // Type of transaction
version: number, // Version of the transaction (used for backward compatiblity)
data: Object, // Transaction data zone (identity, keychain, smart contract, etc.)
generateEncryptedSeedSC: boolean // (Optional) : if true, add a encrypted (by storage nonce public key) seed in the transaction's ownerships to allow nodes to manage smart contract
}
Success Response
{
transactionAddress: string, // Sent transaction address.
nbConfirmations: number, // number of received confirmations.
maxConfirmations: number, // Max number of confirmations.
}
add_service
Add a service in the keychain
Request
{
name: string, // Name of the service
}
Success Response
{
transactionAddress: string, // Transaction address.
nbConfirmations: number, // number of received confirmations.
maxConfirmations: number, // Max number of confirmations.
}
remove_service
Remove a service from the keychain
Request
{
name: string, // Name of the service
}
Success Response
{
transactionAddress: string, // Transaction address.
nbConfirmations: number, // Number of received confirmations.
maxConfirmations: number, // Max number of confirmations.
}
get_services_from_keychain
Gets keychain's services from the keychain connected to AEWallet.
Request
// No payload
Success Response
{
services: [
{
derivationPath: string, // Derivation path
curve: string, // Curve
hashAlgo: string // Hash Algo
}
]
}
keychain_derive_keypair
Derive a keypair for the given service at the index given and get the public key
Request
{
serviceName: string, // Service name to identify the derivation path to use
index: number, // Chain index to derive (optional - default to 0)
pathSuffix: string // Additional information to add to a service derivation path (optional - default to empty)
}
Success Response
{
publicKey: string // Public key of the service at the index given
}
keychain_derive_address
Derive an address for the given service at the index given
Request
{
serviceName: string, // Service name to identify the derivation path to use
index: number, // Chain index to derive (optional - default to 0)
pathSuffix: string // Additional information to add to a service derivation path (optional - default to empty)
}
Success Response
{
address: string // Address derived
}
get_current_account
Gets the current account selected on AEWallet.
Request
// No payload
Success Response
{
shortName: string, // Account name
serviceName: string, // Service name
genesisAddress: string, // Genesis address
}
sign_transactions
Signs many transactions.
Request
{
serviceName: string, // Service name to use to sign the tx
pathSuffix: string, // Additional information to add to a service derivation path (optional)
description: { // Readable description to explain the purpose of signing transactions (locale + description)
en: string,
fr: string,
},
transactions: [
{
type: string, // Type of transaction
version: number, // Version of the transaction (used for backward compatiblity)
data: Object // Transaction data zone (identity, keychain, smart contract, etc.)
}
]
}
Success Response
{
signedTxs: [
{
address: string, // Address: hash of the new generated public key for the given transaction
previousPublicKey: string, // Previous generated public key matching the previous signature
previousSignature: string, // Signature from the previous public key
originSignature: string // Signature from the device which originated the transaction (used in the Proof of work)
}
]
}
sign_payloads
Signs many payloads.
Request
{
serviceName: string, // Service name to use to sign the payload
pathSuffix: string, // Additional information to add to a service derivation path (optional)
description: { // Readable description to explain the purpose of signing payloads (locale + description)
en: string,
fr: string,
},
payloads: [
{
payload: string, // Payload to sign
isHexa: boolean // Precise if the payload if in hexadecimal format
}
]
}
Success Response
{
signedPayloads: [
{
signedPayload: string, // Signed payload
}
]
}
subscribe_account
Listens to any updates on an account.
Subscription
{
name: string, // Service name to use to sign the payload
}
Notifications
{
name: string,
genesisAddress: string,
lastAddress: string?,
balance: {
nativeTokenName: string,
nativeTokenValue: double,
}?,
}
subscribe_current_account
Listens to any updates on wallet selected account.
Subscription
// no payload in request
Notifications
{
name: string,
genesisAddress: string,
}