Vertices Docs
  • Welcome 👨‍💻
  • ⚙️ Vertices SDK
    • Quickstart
      • Unix
        • New account
        • Pay transaction
        • Application call
      • Microcontrollers
        • PlatformIO
        • ESP-IDF
        • Zephyr (soon)
    • API Reference
      • Providers
      • Accounts
      • Events
      • Transactions
      • Applications
    • Porting guide
      • Starting from scratch
      • New vertex
      • HTTP Client
      • Handling events
Powered by GitBook
On this page
  • Payment
  • Parameters
  • Return codes
  • Application call
  • Parameters
  • Return codes

Was this helpful?

  1. ⚙️ Vertices SDK
  2. API Reference

Transactions

Payment

ret_code_t
vertices_transaction_pay_new(
            account_info_t *account, 
            char *receiver, 
            uint64_t amount, 
            void *params);

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

ret_code_t
vertices_transaction_app_call(
    account_info_t *account, 
    uint64_t app_id, 
    void *params);

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.

typedef struct
{
    uint32_t count;
    app_key_value_t values[APPS_KV_MAX_COUNT];
} app_values_t;

typedef struct
{
    char name[APPS_KV_NAME_MAX_LENGTH]; //!< variable name, ASCII-encoded, can contains up to APPS_KV_NAME_MAX_LENGTH bytes
    value_type_t type; //!< type [tt]
    union
    {
        uint64_t value_uint;
        uint8_t value_slice[APPS_KV_SLICE_MAX_SIZE];
    };
} app_key_value_t;

typedef enum
{
    VALUE_TYPE_NONE = 0,
    VALUE_TYPE_BYTESLICE,
    VALUE_TYPE_INTEGER,
} value_type_t;

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

PreviousEventsNextApplications

Last updated 3 years ago

Was this helpful?