VirtualFileSystemAPI
Class
Class to interact with the VFS aOS contract.
export default class VirtualFileSystemAPI extends ADOAPI {
constructor(public client: AndromedaClient, public address: string) {
super(client, address);
}resolvePathMsg
Generates a 'ResolvePath' query message for the VFS.
resolvePathMsg(path: string) {
return {
resolve_path: {
path,
},
};
}path
string
The path to resolve.
resolvePath
Resolves the specified path to its corresponding address.
path
string
The path to resolve.
registerUserMsg
Generates a 'RegisterUser' message for the VFS.
username
string
The username to register.
registerUser
Registers a username for the currently used signing address.
username
string
The username to register.
msgParams
Optional parameters to add to the execute message such as funds, memo or fee.
OptionalExecuteParams
addPathMsg
Generates a 'AddPath' message for the VFS.
name
string
The name of the path to register the address to.
address
string
The address to register the path to.
addPath
Registers a path for the currently used signing address.
name
string
The name of the path to register the address to.
address
string
The address to register the path to.
msgParams
Optional parameters to add to the execute message such as funds, memo or fee.
getUsernameMsg
Generates a 'GetUsername' query message for the VFS.
address
string
The address to get the username for.
getUsername
Resolves the username for the given address
address
string
The address to get the username for.
subDirMsg
Generates a 'SubDir' query message for the VFS.
path
string
The path to get sub paths for.
subDir
Resolves the sub dir for a given path.
path
string
The path to get sub paths for.
pathsMsg
Generates a 'paths' query message for the VFS.
addr
string
The addr to get the paths for.
paths
Resolves the paths for a given address
addr
string
The addr to get the paths for.
Last updated