Aptos
/v1/transactionsКредиты: 150
Submit a signed transaction
Параметры
| Имя | Тип | Описание |
|---|---|---|
| sender | string | Body. Address of the sending account. |
| sequence_number | string (u64) | Body. Sequence number of the transaction for the sender. |
| max_gas_amount | string (u64) | Body. Maximum gas units the sender is willing to spend. |
| gas_unit_price | string (u64) | Body. Price per gas unit, in octas. |
| expiration_timestamp_secs | string (u64) | Body. Unix time (seconds) after which the transaction is no longer valid. |
| payload | object | Body. Transaction payload, e.g. { type: "entry_function_payload", function, type_arguments, arguments }. |
| signature | object | Body. Transaction signature, e.g. { type: "ed25519_signature", public_key, signature }. |
| replay_protection_nonce | string (u64) | Body. Optional nonce used for replay protection. (необязательно) |
Результат
Тип
object
HTTP 202 with the pending transaction: hash, sender, sequence_number, max_gas_amount, gas_unit_price, expiration_timestamp_secs, payload, signature.
Примеры кода
curl 'https://holy-burned-sky-apt-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/v1/transactions' \
-X POST \
-H 'content-type: application/json' \
-d '{
"sender": "0x1",
"sequence_number": "0",
"max_gas_amount": "2000",
"gas_unit_price": "100",
"expiration_timestamp_secs": "1893456000",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_account::transfer",
"type_arguments": [],
"arguments": [
"0x2",
"1000"
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x00",
"signature": "0x00"
}
}'