-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the existing
transaction
to transactionWatch
and add a new…
… different `transaction` namespace (#107) * Rename `transaction` to `transactionWatch` * Add a new different `transaction` namespace * Add text about validation --------- Co-authored-by: Josep M Sobrepere <[email protected]>
- Loading branch information
Showing
8 changed files
with
45 additions
and
10 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,3 +1,3 @@ | ||
# Introduction | ||
|
||
The `transaction` functions allow submitting a transaction for inclusion in the chain. | ||
The `transaction` functions allow broadcasting a transaction for inclusion in the chain. |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Introduction | ||
|
||
The `transactionWatch` functions allow submitting a transaction for inclusion in the chain. |
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
4 changes: 2 additions & 2 deletions
4
src/api/transaction_unstable_unwatch.md → src/api/transactionWatch_unstable_unwatch.md
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# transaction_unstable_broadcast | ||
|
||
**Parameters**: | ||
|
||
- `transaction`: String containing the hexadecimal-encoded SCALE-encoded transaction to try to include in a block. | ||
|
||
**Return value**: String representing the operation, or `null` if the maximum number of broadcasted transactions has been reached. | ||
|
||
The string returned by this function is opaque and its meaning can't be interpreted by the JSON-RPC client. | ||
|
||
Once this function has been called, the JSON-RPC server will try to propagate this transaction over the peer-to-peer network until `transaction_unstable_stop` is called. | ||
|
||
The JSON-RPC server must allow at least 4 transactions being broadcasted at the same time per JSON-RPC client. | ||
Any attempt to broadcast more than 4 transactions simultaneously might result in `null` being returned. | ||
|
||
The JSON-RPC server might check whether the transaction is valid before broadcasting it. If it does so and if the transaction is invalid, the server should silently do nothing and the JSON-RPC client is not informed of the problem. Invalid transactions should still count towards the limit to the number of simultaneously broadcasted transactions. |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# transaction_unstable_stop | ||
|
||
**Parameters**: | ||
|
||
- `operationId`: Opaque string equal to the value returned by `transaction_unstable_broadcast` | ||
|
||
**Return value**: *null* | ||
|
||
The node will no longer try to broadcast the transaction over the peer-to-peer network. | ||
|
||
## Possible errors | ||
|
||
A JSON-RPC error is generated if the `operationId` doesn't correspond to any active `transaction_unstable_broadcast` operation. |
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