Action

Action

new Action()

Methods

(static) ACTION(str)

convert a string to Action.

Example
import { ACTION } from "ultrain-ts-lib/src/action";
Parameters:
Name Type Description
str

an readable string of action name. It can only include: _0-9a-zA-Z

(static) hasAuth(account)

to check if an account name has been authored.

Parameters:
Name Type Description
account

the account name which will be checked.

Returns:

boolean value, return true means the account is authored, otherwised false.

(static) requireAuth(account)

check the authority of a speicfic account name.

Parameters:
Name Type Description
account

account_name whose authority is required.

(static) requirePermissionLevel(pl)

to check if permission is authored or not.

Example
import { requirePermissionLevel } from "ultrain-ts-lib/src/action";
Parameters:
Name Type Description
pl

PermissionLevel to check

(static) requireRecipient(account)

add account to be notified.

Parameters:
Name Type Description
account

account to be notified.

(static) sendInline(pl, receiver, action, data)

send an inline action.

Parameters:
Name Type Description
pl PermissionLevel

an instance of Permission_Level.

receiver account_name

the contract which receive this action.

action NameEx

the name of this action.

data T

parameter of this action, which must be type of T.

Action

new Action()

class Action is applied to access an action's context information. This class is static.

Example
import { Action } from "ultrain-ts-lib/src/action";

Methods

(static) ACTION(str)

convert a string to Action.

Example
import { ACTION } from "ultrain-ts-lib/src/action";
Parameters:
Name Type Description
str

an readable string of action name. It can only include: _0-9a-zA-Z

(static) hasAuth(account)

to check if an account name has been authored.

Parameters:
Name Type Description
account

the account name which will be checked.

Returns:

boolean value, return true means the account is authored, otherwised false.

(static) requireAuth(account)

check the authority of a speicfic account name.

Parameters:
Name Type Description
account

account_name whose authority is required.

(static) requirePermissionLevel(pl)

to check if permission is authored or not.

Example
import { requirePermissionLevel } from "ultrain-ts-lib/src/action";
Parameters:
Name Type Description
pl

PermissionLevel to check

(static) requireRecipient(account)

add account to be notified.

Parameters:
Name Type Description
account

account to be notified.

(static) sendInline(pl, receiver, action, data)

send an inline action.

Parameters:
Name Type Description
pl PermissionLevel

an instance of Permission_Level.

receiver account_name

the contract which receive this action.

action NameEx

the name of this action.

data T

parameter of this action, which must be type of T.