Last active
April 24, 2022 08:18
-
-
Save garethtdavies/f55c8d9d2535cd392b00abff131592c4 to your computer and use it in GitHub Desktop.
MinaExplorer GraphQL API
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
{ | |
transactions( | |
limit: 25 | |
sortBy: DATETIME_DESC | |
query: {OR: [{to: "B62qqHM1bihHNvju89PFYugLw73PYRb7pGwp82CpEmWfSYVJiQAppaC"}, {from: "B62qqHM1bihHNvju89PFYugLw73PYRb7pGwp82CpEmWfSYVJiQAppaC"}], AND: {canonical: true, dateTime_gte: "2021-01-15T00:00:00Z"}} | |
) { | |
fee | |
canonical | |
from | |
to | |
nonce | |
amount | |
memo | |
hash | |
kind | |
dateTime | |
blockHeight | |
blockStateHash | |
} | |
} |
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
{ | |
blocks( | |
query: {creator: "B62qogU1qY33L8jwRmkwjN42xpSNrv8UkxaKrRFZxJSgbaNRMtpMTg7"} | |
sortBy: DATETIME_DESC, | |
limit: 10 | |
) { | |
creator | |
canonical | |
stateHash | |
dateTime | |
protocolState { | |
consensusState { | |
blockHeight | |
} | |
} | |
transactions { | |
coinbase | |
} | |
} | |
} |
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
{ | |
blocks( | |
query: { | |
canonical: true | |
protocolState: { consensusState: { blockHeight: "2116" } } | |
} | |
) { | |
stateHash | |
creator | |
canonical | |
dateTime | |
} | |
} |
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
{ | |
snarks( | |
limit: 10 | |
query: {prover: "B62qogU1qY33L8jwRmkwjN42xpSNrv8UkxaKrRFZxJSgbaNRMtpMTg7"} | |
sortBy: DATETIME_DESC | |
) { | |
fee | |
dateTime | |
block { | |
stateHash | |
protocolState { | |
consensusState{ | |
blockHeight | |
} | |
} | |
} | |
canonical | |
} | |
} |
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
{ | |
transactions( | |
limit: 10 | |
sortBy: DATETIME_DESC | |
query: {from: "B62qogU1qY33L8jwRmkwjN42xpSNrv8UkxaKrRFZxJSgbaNRMtpMTg7", canonical: true} | |
) { | |
fee | |
from | |
to | |
nonce | |
amount | |
block { | |
stateHash | |
protocolState { | |
consensusState { | |
blockHeight | |
} | |
} | |
} | |
memo | |
hash | |
kind | |
dateTime | |
} | |
} |
Also see https://altair.sirmuel.design/ for a useful GraphQL GUI that will generate the above requests for you.
Find a delegation transaction:
query {
transactions(
query: {
from: "B62qk8nQLZdDDm5VH6nZMpSf8eJwY3rDZa9U7Mz5St8bpu7gRp2t1CA"
canonical: true
isDelegation: true
}
) {
from
to
amount
dateTime
blockHeight
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example to get the last 10 blocks produced by a public key: