POST /fetch
This endpoint is for fetching events based on a filter, for uses where getting events in a syncrhonous manner is desired. It receives a valid NOSTR as body and returns an array of the events that match that filter
Examples
Valid Body
{
"#t": [
"internal-transaction-start"
],
"limit": 2
}
Javascript
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: '{"#t":["internal-transaction-start"]}'
};
fetch('https://api.lawallet.ar/nostr/fetch/', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Curl
curl --request POST \
--url https://api.lawallet.ar/nostr/fetch/ \
--header 'Content-Type: application/json' \
--data '{
"#t": [
"internal-transaction-start"
]
}'
Response
[
{
"created_at": 1704494938,
"content": "{\"tokens\":{\"BTC\":10000}}",
"tags": [
[
"p",
"cdc5662509a7660dfef50c634f7f3e3f3b0d57d4ca49a42152ddac641ccfaeb2"
],
[
"p",
"e17feb5f2cf83546bcf7fd9c8237b05275be958bd521543c2285ffc6c2d654b3"
],
[
"t",
"internal-transaction-start"
],
[
"bolt11",
"lnbc100n1pjn6ey0pp5t7mtzhs8q8wfcwajrhfz94jxg87g70wuay4qw02ta8azx62wf0dqhp5wh3x2fmc3nwhjqfv3czss6lndyxsvyskykgdzus3t5cyjs0sf6sqcqzzsxqzjcsp5hueuk64e2ra4vm9j82zk827g8l7dss2my9wta68qj36yfg4v66ss9qyyssqz7gree6qkl57xalqlcpxf5ye9yvsnuf0wf54dle0kstrwgjm0hkpa3mvd9y6f90fe6p07c5kzgtelxwl32lxkwm2c0hjnwxvted6vzspah0cj0"
]
],
"kind": 1112,
"pubkey": "a4c10dc7da61602206cf4affe58cf721bae1593b23f76736ab1f65c8a1df9674",
"id": "7b6b54ee390ccd66b1340a2f5f4230420d8655fdc42ccf74136dd808840cfa18",
"sig": "7b0d274fd83b8def04624143e5c7205a52d368c05acbc4128c3d29cbc64f3ce424aba1f9e7ffdc2ce88ccdcdbc908462c50d8dc1b1c96fa7f93611e85f5eea71"
},
{
"created_at": 1704494923,
"content": "{\"tokens\":{\"BTC\":10000}}",
"tags": [
[
"p",
"cdc5662509a7660dfef50c634f7f3e3f3b0d57d4ca49a42152ddac641ccfaeb2"
],
[
"p",
"e17feb5f2cf83546bcf7fd9c8237b05275be958bd521543c2285ffc6c2d654b3"
],
[
"t",
"internal-transaction-start"
],
[
"bolt11",
"lnbc100n1pjn6ey0pp5t7mtzhs8q8wfcwajrhfz94jxg87g70wuay4qw02ta8azx62wf0dqhp5wh3x2fmc3nwhjqfv3czss6lndyxsvyskykgdzus3t5cyjs0sf6sqcqzzsxqzjcsp5hueuk64e2ra4vm9j82zk827g8l7dss2my9wta68qj36yfg4v66ss9qyyssqz7gree6qkl57xalqlcpxf5ye9yvsnuf0wf54dle0kstrwgjm0hkpa3mvd9y6f90fe6p07c5kzgtelxwl32lxkwm2c0hjnwxvted6vzspah0cj0"
]
],
"kind": 1112,
"pubkey": "a4c10dc7da61602206cf4affe58cf721bae1593b23f76736ab1f65c8a1df9674",
"id": "9d21651fac7b27b884bb802f6ba8af8cfd584020cb1c262fa88a9099882be444",
"sig": "0d6994e966292964136b5a7124c6e269cce0896fef98be25c0e4ad61c4b52f7b0fce537baddc8a0df283a1dae81983d25646dc3be28a994b3cabfed7e9815952"
}
]