Step 6 - Publish

Approve

await service.wallet.approve.execute('cmd id', { 
    token: string,              // token to approve
    spender?: string,           // defaults to the vault address
    amount?: string             // defaults to unlimited
})

Get Allowance

await service.wallet.getAllowance.execute('cmd id', { 
    token: string,              // token to approve
    spender?: string,           // defaults to the vault address
})

// returns
{
  amount: string                // the spendable tokens left
} 

Publish

await service.fct.active.publish.execute('cmd id', {
    data: object                  // the FCT
    autoSign?: 'early' | 'late'   // if exist, sign before or after publishing
}) 

Last updated