Transactions

Payment

1
ret_code_t
2
vertices_transaction_pay_new(
3
account_info_t *account,
4
char *receiver,
5
uint64_t amount,
6
void *params);
Copied!

Parameters

    account: sender account. Handle after creating the account using vertices_account_add.
    receiver: public base-32 address of the receiver account.
    amount: the number of tokens to be sent. In Algorand's case in microAlgos.
    params: in Algorand's case, note that will be included in the transaction.

Return codes

    VTC_SUCCESS if the transaction went through
    VTC_ERROR_INVALID_PARAM if one parameter is incorrect
    VTC_ERROR_NO_MEM if there is no room to queue the payment transaction

Application call

1
ret_code_t
2
vertices_transaction_app_call(
3
account_info_t *account,
4
uint64_t app_id,
5
void *params);
Copied!

Parameters

    account: sender account. Handle after creating the account using vertices_account_add.
    app_id: Algorand application ID
    params: in Algorand's case, a pointer to app_values_t that has been zeroed before.
1
typedef struct
2
{
3
uint32_t count;
4
app_key_value_t values[APPS_KV_MAX_COUNT];
5
} app_values_t;
6
​
7
typedef struct
8
{
9
char name[APPS_KV_NAME_MAX_LENGTH]; //!< variable name, ASCII-encoded, can contains up to APPS_KV_NAME_MAX_LENGTH bytes
10
value_type_t type; //!< type [tt]
11
union
12
{
13
uint64_t value_uint;
14
uint8_t value_slice[APPS_KV_SLICE_MAX_SIZE];
15
};
16
} app_key_value_t;
17
​
18
typedef enum
19
{
20
VALUE_TYPE_NONE = 0,
21
VALUE_TYPE_BYTESLICE,
22
VALUE_TYPE_INTEGER,
23
} value_type_t;
Copied!

Return codes

    VTC_SUCCESS if the transaction went through
    VTC_ERROR_INVALID_PARAM if one parameter is incorrect
    VTC_ERROR_NO_MEM if there is no room to queue the payment transaction
    ​
Last modified 4mo ago