Update REST Endpoints
Motivation
Updated
-
GET /testnet3/records/allis nowPOSTand returns a list of records. -
GET /testnet3/records/unspentis nowPOSTand returns a list of records. -
GET /testnet3/records/spentis nowPOSTand returns a list of records.
Created
-
POST /testnet3/ciphertexts/unspent- Retrieves a vector of unspent record ciphertexts given a view key. -
GET /testnet3/record/ciphertext/{commitment}- Retrieves the record ciphertext given its commitment. This endpoint is needed because the Aleo CLI should be able to retrieve the record/s associated with their commitments which can be inputs of the execute command. -
POST /testnet3/transfer- Creates a transfer from account A given its private key to account B given its address, for a given amount. This endpoint is needed to make transfers between accounts and to make a faucet of a sort.
/testnet3/transfer request example
{
"from": "APrivateKey1zkp6ka4UZu9JfMFDBqzKBffX7HQpsneKtzCTwnHb5GXVDpL",
"to": "aleo1ttf46heagh0e50esnd0ju29xjka6jd9ccsq7hqg9n4wv57mx4uzsm4frgf",
"amount": 1
}
Related PRs/Issues
This PR addresses:
- #1056
- #1077
The compiler job failure seems transient, but the clippy one isn't.
The
compilerjob failure seems transient, but theclippyone isn't.
I saw that the clippy warning was added in another PR. Do you think that we should address it in this PR, or should be do that in another?
I saw that the clippy warning was added in another PR.
If it was caused by a different change, I think it should be a separate PR, so it could possibly be merged sooner.
@ilitteri could you take a look at the merge conflicts for this PR? We made a few bug + clippy fixes to the REST endpoints in PRs today.