You interact with a æternity node through HTTP.
To learn more about contracts and contract life cycles see the doc.
There are two basic types of API calls, off-chain operations and on-chain transactions.
For an up to date list of all HTTP API endpoints and their arguments seeæternity node HTTP API
Sophia calldata creation
A number of functions described below create calldata for contract call or
contract create transactions (code/encode-calldata,code/call, create/compute,call/compute). These support two ways of specifying the
function and arguments to the call:
Unchecked (legacy): Function name (except for create/compute) and arguments
as a Sophia constant tuple. No checks are made to ensure that the given
arguments match what the contracts expects.
Checked: An argument call containing Sophia source code for a contract
snippet containing (at least) a prototype for the function to be called and a
special function __call() whose body is a single call to this function. This
contract is type checked and the given arguments are checked to be compatible
with the type that the called contract expects.
For example, to call a function swap that expects a record argument you can
give the following call:
contract CallExample =
record pt = {x : int, y : int}
function swap : pt => pt
function __call() = swap({x = 3, y = 4})
The call contract can contain more definitions than are needed to type check
the call. In particular, it can be the complete source code of the contract
to be called, with an added __call function.
Off chain operations
An æternity node provides some utility functions to help you create contract transactions and test contracts.