LiquidAccounts

push_liquid_account_transaction - register new account

/*
    getClient()
    * service name: vaccounts
    * contract name

    service.push_liquid_account_transaction
    * account name of contract with LiquidAcount code deployed
    * private key of LiquidAccount
    * action name: regaccount to register new account
    * payload
        * vaccount - name of LiquidAccount

*/

const service = await (await getClient()).service('vaccounts', "vacctstst123");
const response = await service.push_liquid_account_transaction(
    "vacctstst123",
    "5JMUyaQ4qw6Zt816B1kWJjgRA5cdEE6PhCb2BW45rU8GBEDa1RC",
    "regaccount",
    {
        vaccount: 'testing126'
    }
);

push_liquid_account_transaction - push transaction after creating account

/*
    getClient()
    * service name: vaccounts
    * contract name

    service.push_liquid_account_transaction
    * account name of contract with LiquidAcount code deployed
    * private key of LiquidAccount
    * action name: hello
    * payload
        * any - payload must match struct outline in the smart contract

*/

const service = await (await getClient()).service('vaccounts', "vacctstst123");
const response = await service.push_liquid_account_transaction(
    "vacctstst123",
    "5JMUyaQ4qw6Zt816B1kWJjgRA5cdEE6PhCb2BW45rU8GBEDa1RC",
    "hello",
    {
        vaccount: 'testing126'
    }
);

Last updated