NearApi.Account (near_api v0.1.7)
NearApi Account struct
Contains account_id, e.g. hellowworld.testnet, and KeyPair (with public and secret keys)
Link to this section Summary
Functions
Send money from one Near account to another.
Technically this is a wrapper around Transfer transaction
from_account - an account strut NearApi.Account where account_id and key_pair
Link to this section Types
Specs
t() :: %NearApi.Account{
account_id: String.t(),
key_pair: NearApi.KeyPair.t() | nil
}
Link to this section Functions
Link to this function
build_account(account_id, key_pair)
Link to this function
send_money(from_account, receiver_id, amount)
Specs
send_money(from_account :: t(), receiver_id :: String.t(), amount :: String.t()) :: {:ok, body :: map()} | NearApi.RPC.Errors.t()
Send money from one Near account to another.
Technically this is a wrapper around Transfer transaction
from_account - an account strut NearApi.Account where account_id and key_pair
- `key_pair` must be FullAccess key and Transfers only available with this permissions level receiver_id - string value of the Near account ID, e.g. helloworld.testnet
amount - as String because in Yocto