bn.callAll
▸ callAll(actions): Promise<CallAllResponse>
description Call multiple custom actions in sequence and return all results.
example
const results = await bn.callAll([
{ action: 'action1', payload: { data: 'test1' } },
{ action: 'action2', payload: { data: 'test2' } }
])
console.log(results)
{
results: [
{ result: { data: 'test1' } },
{ error: 'error', result: null }
]
}
Parameters
| Name | Type |
|---|---|
actions | { action: string ; payload?: any }[] |
Returns
Promise<CallAllResponse>
Interface: CallAllResponse
| Name | Type | Description |
|---|---|---|
| results | { error?: any ; result: any }[] |