-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #800 from AraiEzzra/docs/transaction-bytes
Docs / Add bytes schema for transaction
- Loading branch information
Showing
4 changed files
with
63 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,44 @@ | ||
# Transaction send asset | ||
# Asset Send | ||
|
||
## Get bytes | ||
|
||
| Field | Type | Bytes | Required | | ||
|------------------|--------------|-------|----------| | ||
| recipientAddress | uint64 | 8 | + | | ||
| amount | uint64 | 8 | + | | ||
|
||
Bytes should be written in `Little Endian` order and in order that shown in table | ||
|
||
## Example get bytes | ||
|
||
Get bytes from a send asset | ||
|
||
```json | ||
{ | ||
"recipientAddress": "15701569034897442085", | ||
"amount": 1000 | ||
"amount": 10000000000, | ||
"recipientAddress": "4957046151241062485", | ||
} | ||
``` | ||
|
||
The result of getting bytes from this asset will be the following buffer | ||
|
||
For convenience, it is converted to hexadecimal code | ||
|
||
```text | ||
36f7ca4455d8f0030200000000e40b54 | ||
``` | ||
|
||
|
||
## Verify | ||
|
||
To verify `send asset`, you need to check the sender account `balance`, it must be the same or more | ||
then sum of transaction amount and transaction `fee` | ||
|
||
## Example Asset Send | ||
|
||
```json | ||
{ | ||
"recipientAddress": "15701569034897442085", | ||
"amount": 1000 | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters