Events
Asynchronous events
Events are responsible to warn the user that an action has to be taken. Those actions can be signing a new payload, or that the transactions went through.
Scheduling
Schedule new Vertices events. Make sure to process them afterward to have the SDK process the queued events.
Parameters
evt
: event to be processed
Return codes
VTC_SUCCESS
on success.VTC_ERROR_NO_MEM
when event queue is full: either process events or increaseVTC_EVENTS_COUNT
.
Processing
Call this function to have the Vertices SDK process pending events. Whenever calling a Vertices function, make sure to process all the events. To make sure all the events are processed, this function should be called from an infinite loop or OS thread/task. This function will call the user-defined callback if one has been passed when using vertices_new
Parameters
queue_size
: Pointer to size_t
value that will be replaced with the Vertices interval queue size defining the number of events to be processed.
Return code
VTC_SUCCESS
when the event is correctly processed.Error code from the event.
Last updated