API Classes
ADOAPI Class
API to interact with Andromeda ADOs.
export default class ADOAPI {
constructor(
protected client: AndromedaClient,
protected address: string = ""
) {}Execute Messages
andromedaReceive
Converts a message object to an Andromeda Execute message.
protected andromedaReceive(msg: Msg) {
return { andr_receive: msg };
}
Msg
updateOwnerMsg
Returns an update owner message.
newOwner
string
The address to assign as the new owner.
Expiration
updateOwner
Updates the owner for the given ADO.
Only accessible to the current owner.
newOwner
string
The address of the new owner.
addr
string
The address of the contract we are executing on.
memo
string
Optional memo to attached.
Fee
Check StdFee.
updateAppContractMsg
Returns an update app contract message.
appContract
string
The new app contract.
updateAppContract
Updates the app contract for a given ADO.
Only accessible to the current owner.
appContract
string
The new app contract.
addr
string
The address of the contract we are executing on.
memo
string
Optional memo to attach.
registerModuleMsg
Returns a register module message.
module
Module
The module to register.
Module
AndrAddress
Object used to define an address used with the Andromeda ecosystem.
registerModule
Register a module with an ADO.
Only accessible by the contract owner.
Will error if the ADO does not implement modules.
deregisterModuleMsg
Returns a deregister module message.
id
number
The id number (index) of the module to deregister.
deregisterModule
Deregisters a module with an ADO.
Only accessible by the contract owner.
Will error if the ADO does not implement modules.
id
number
The id number (index) of the module to deregister.
addr
string
The address of the contract we are executing on.
memo
string
Optional memo to attach.
alterModuleMsg
Returns am alter module message.
id
number
The id number (index) of the module to alter.
alterModule
Alters a module within an ADO.
Only accessible by the contract owner.
Will error if the ADO does not implement modules.
Query Messages
ownerQuery
Returns an owner query message.
getOwner
Gets the owner address for a provided ADO.
addr
string
The address of the contract we are querying.
isOwner
Validates if a given address is an owner for the given ADO.
addr
string
The address we are checking.
contractAddr
string
The address of the contract we are querying.
typeQuery
Returns an ADO type query message.
getType
Gets the ADO type for the provided ADO.
addr
string
The address of the contract we are querying.
publisherQuery
Returns a publisher query message.
getPublisher
Gets the original publisher of the given ADO.
addr
string
The address of the contract we are querying.
createdHeightQuery
Returns a block height creation query.
getCreatedHeight
Gets the block height at which the given ADO was created.
addr
string
The address of the contract we are querying.
versionQuery
Returns a version query.
getVersion
Gets the version for a given ADO.
addr
string
The address of the contract we are querying.
moduleQuery
Returns a module query.
id
string or number
The id of the module to query.
getModule
Gets the module of the specified id for a given ADO.
Will error if the ADO does not implement modules.
id
string or number
The id of the module to query.
addr
string
The address of the contract we are querying.
moduleIdsQuery
Returns a module IDs query.
getModuleIds
Gets all module IDs for a given ADO.
Will error if the ADO does not implement modules
addr
string
The address of the contract we are querying.
getModules
Gets all modules for a given ADO.
Uses several queries so response may be slow.
addr
string
The address of the contract we are querying.
Last updated