-
Notifications
You must be signed in to change notification settings - Fork 1
Batch file specification
Batch is a collection of transactions grouped together by a sender, which are validated, signed and sent as a single unit.
Compared to individual transactions, batches offer some advantages: all transactions within a batch a processed in one block, making them more cost-effective in terms of fee and resources.
- Add transactions to the batch directly from a wallet interface, then send them collectively from the "Batch" page later.
- Use a CSV file to define and import batch transactions. Simply upload CSV file on the "Batch" page to create a new batch.
Using CSV file is especially helpful when dealing with large batches, as entering transactions one by one on a wallet interface can be time-consuming.
Additionally, batch files provide the benefits of reusability and compatibility across wallets that support the same batch file specification.
All transactions in the batch are originated from the same account.
- When you add transaction to the batch from the wallet interface, it will be added to a batch for the operation sender.
- When you upload the CSV file to the app you'll select the sender for all transactions listed in the file in the Umami app interface.
The file format defined herein describes a batch of Tezos operations in the CSV format.
- Batch consists of transaction operations (although sometimes transactions may imply other operations, such as reveals).
- Each non-empty line in the batch file that meets a transaction specification (described below) represents a transaction.
- All transactions listed in the lines of the CSV file form a single batch.
- If any line does not match a transaction specification, the file and the batch are considered invalid.
file = transaction *(CRLF transaction) [CRLF]
transaction = teztx | tokentx
teztx = destination COMMA amount CRLF
tokentx = destination COMMA amount COMMA tokenaddr *(COMMA tokenid)
destination = tz[123][A-Za-z0-9]+{33} | KT1[A-Za-z0-9]+{33}
amount = [0-9]+(.[0-9]*)
tokenaddr = KT1[A-Za-z0-9]+{33}
tokenid = [0-9]+
COMMA = %x2C
According to the specification's teztx
definition, the base-token tez transaction requires:
- Destination - tz(1|2|3) or KT1 address.
- Amount of tez to send.
tz1Z3JYEXYs88wAdaB6WW8H9tSRVxwuzEQz2,1.23456
According to the specification's tokentx
definition, a token transaction requires:
- Destination - tz(1|2|3) or KT1 address.
- Amount of token to send.
- Address of the contract that manages the token.
- Token id of the token within the contract (must be empty for fa1.2 token).
tz1cbGwhSRwNt9XVdSnrqb4kzRyRJNAJrQni,1000,KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton,2
tz1cbGwhSRwNt9XVdSnrqb4kzRyRJNAJrQni,2000,KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton