The function requires three input parameters:
SenderAddress: Address of the sender of the token. If a password is specified to unlock the account the password has to be for this address.
RecipientAddress: The address of the recipient. The address can also be a Self-Sovereign Identity.
TokenAmount: The amount to Token to be transferred.
FeePayer: Optional to define who pays the fees. If left empty or 0 the sender will pay the fees. If set to one the recipient will pay the fee and if set to two the fees will be split 50/50.
CoinName: Optional Name or Address of the Token to be transferred. If left empty the default Token (in this case here CodeBCoin) will be used.
Password: Optional parameter to be used to trigger automatically the account unlock for the account specified in SenderAddress.
Once you submitted the transaction you get the transaction hash as a return value. You an use that hash to verify that your transaction has been minted into a block. That can be done with function GetReceipt in the Tools namespace. GetReceipt returns the minted block number as HEX value.
Transfer Token With Identity
Our distributed Self-Sovereign Identities (SSI) can receive and transfer funds as any other identity. Since a SSI does not have its own private key many consider transfers via Identity contract as more secure.
Please note that every identity has a parameter defining the max. amount of coins the identity can transfer. The default value is 0. That means a new Identity Contract cannot transfer funds unless an account with admin or minter right increased that limit.
To the the current limit of a given SSI Contract you call function GetIdentityERC20Limit from the Identity Namespace.
If the limit is greater than 0 you can transfer with the command TransferTokenWithIdentity from the Settlement Namespace. The function requires one more input parameter than the function TransferToken explained above. This parameter IdentityAddress is the address of your identity contract.
To make testing easier we created a test account for you:
Note: CodeB is a testnet. Transactions do not have any real value!