API to interact with Andromeda ADOs.
Copy export default class ADOAPI {
constructor (
protected client : AndromedaClient ,
protected address : string = ""
) {} Execute Messages
andromedaReceive
Converts a message object to an Andromeda Execute message.
Copy protected andromedaReceive ( msg : Msg ) {
return { andr_receive : msg };
}
Returns an update owner message.
The address to assign as the new owner.
Optional expiration for the ownership request. Defaults to never.
Updates the owner for the given ADO.
circle-exclamation
Only accessible to the current owner.
The address of the new owner.
The address of the contract we are executing on.
Optional expiration. Defaults to never.
Optional memo to attached.
Check StdFeearrow-up-right .
updateAppContractMsg
Returns an update app contract message.
updateAppContract
Updates the app contract for a given ADO.
circle-exclamation
Only accessible to the current owner.
The address of the contract we are executing on.
registerModuleMsg
Returns a register module message.
Object used to define an address used with the Andromeda ecosystem.
Register a module with an ADO.
circle-exclamation
Only accessible by the contract owner.
Will error if the ADO does not implement modules.
The address of the contract we are executing on.
deregisterModuleMsg
Returns a deregister module message.
The id number (index) of the module to deregister.
deregisterModule
Deregisters a module with an ADO.
circle-exclamation
Only accessible by the contract owner.
Will error if the ADO does not implement modules.
The id number (index) of the module to deregister.
The address of the contract we are executing on.
Returns am alter module message.
The id number (index) of the module to alter.
The new module to replace the old one.
Alters a module within an ADO.
circle-exclamation
Only accessible by the contract owner.
Will error if the ADO does not implement modules.
The id number (index) of the module to alter.
The new module to replace the old one.
The address of the contract we are executing on.
Returns an owner query message.
Gets the owner address for a provided ADO.
The address of the contract we are querying.
Validates if a given address is an owner for the given ADO.
The address we are checking.
The address of the contract we are querying.
Returns an ADO type query message.
Gets the ADO type for the provided ADO.
The address of the contract we are querying.
Returns a publisher query message.
Gets the original publisher of the given ADO.
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.
The address of the contract we are querying.
Returns a version query.
Gets the version for a given ADO.
The address of the contract we are querying.
Returns a module query.
The id of the module to query.
Gets the module of the specified id for a given ADO.
circle-exclamation
Will error if the ADO does not implement modules.
The id of the module to query.
The address of the contract we are querying.
Returns a module IDs query.
Gets all module IDs for a given ADO.
circle-exclamation
Will error if the ADO does not implement modules
The address of the contract we are querying.
Gets all modules for a given ADO.
circle-exclamation
Uses several queries so response may be slow.
The address of the contract we are querying.