Seal a proof pack
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/proof-packs/seal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/proof-packs/seal"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/proof-packs/seal"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/proof-packs/seal")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/proof-packs/seal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/proof-packs/seal \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"pack": {
"envelopeVersion": "<string>",
"issuedAt": "2023-11-07T05:31:56Z",
"orgId": "<string>",
"packId": "<string>",
"label": "<string>",
"records": [
{
"payload": {
"version": "<string>",
"receiptId": "<string>",
"correlationId": "<string>",
"spatialAnchorId": "<string>",
"spatialPlacementId": "<string>",
"issuedAt": "2023-11-07T05:31:56Z",
"renderedAt": "2023-11-07T05:31:56Z",
"dwellMs": 123,
"nonce": "<string>",
"witness": "<string>"
},
"keyId": "<string>",
"algorithm": "<string>",
"signature": "<string>",
"payloadCanonical": "<string>",
"beforeHash": "<string>",
"afterHash": "<string>"
}
],
"metering": {
"schemaVersion": "<string>",
"orgId": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"records": [
{
"idemKey": "<string>",
"proofReceiptId": "<string>",
"unitCount": "<string>",
"weight": "<string>",
"spatialAnchorId": "<string>",
"spatialPlacementId": "<string>",
"observedAt": "2023-11-07T05:31:56Z"
}
],
"totals": {}
},
"settlement": {
"orgId": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"currency": "<string>",
"meterGross": {},
"lines": [
{
"idemKey": "<string>",
"meterRecordIdemKey": "<string>",
"share": "<string>",
"ledgerAccountCode": "<string>",
"amountCents": 123,
"currency": "<string>"
}
],
"totals": {
"grossCents": 123,
"netToTenantCents": 123,
"platformFeeCents": 123,
"vatCents": 123,
"passThroughFeeLedgerCodes": [
"<string>"
]
}
}
},
"sealed": true
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Proof
Seal a proof pack
Seal a new signed proof pack covering every DELIVERY_OBSERVED event since the last seal. pack is null and sealed is false when there is nothing new to seal. Requires scopes proof:read and delivery:write. Request body is ignored.
POST
/
v1
/
proof-packs
/
seal
Seal a proof pack
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1/proof-packs/seal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1/proof-packs/seal"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1/proof-packs/seal"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.enfinitos.com/v1/proof-packs/seal")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1/proof-packs/seal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request POST \
--url https://sandbox.api.enfinitos.com/v1/proof-packs/seal \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"pack": {
"envelopeVersion": "<string>",
"issuedAt": "2023-11-07T05:31:56Z",
"orgId": "<string>",
"packId": "<string>",
"label": "<string>",
"records": [
{
"payload": {
"version": "<string>",
"receiptId": "<string>",
"correlationId": "<string>",
"spatialAnchorId": "<string>",
"spatialPlacementId": "<string>",
"issuedAt": "2023-11-07T05:31:56Z",
"renderedAt": "2023-11-07T05:31:56Z",
"dwellMs": 123,
"nonce": "<string>",
"witness": "<string>"
},
"keyId": "<string>",
"algorithm": "<string>",
"signature": "<string>",
"payloadCanonical": "<string>",
"beforeHash": "<string>",
"afterHash": "<string>"
}
],
"metering": {
"schemaVersion": "<string>",
"orgId": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"records": [
{
"idemKey": "<string>",
"proofReceiptId": "<string>",
"unitCount": "<string>",
"weight": "<string>",
"spatialAnchorId": "<string>",
"spatialPlacementId": "<string>",
"observedAt": "2023-11-07T05:31:56Z"
}
],
"totals": {}
},
"settlement": {
"orgId": "<string>",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"currency": "<string>",
"meterGross": {},
"lines": [
{
"idemKey": "<string>",
"meterRecordIdemKey": "<string>",
"share": "<string>",
"ledgerAccountCode": "<string>",
"amountCents": 123,
"currency": "<string>"
}
],
"totals": {
"grossCents": 123,
"netToTenantCents": 123,
"platformFeeCents": 123,
"vatCents": 123,
"passThroughFeeLedgerCodes": [
"<string>"
]
}
}
},
"sealed": true
},
"contractVersion": "<string>"
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}{
"ok": true,
"message": "<string>",
"contractVersion": "<string>",
"field": "<string>",
"validationErrors": [
{}
],
"requiredScopes": [
"<string>"
],
"keyScopes": [
"<string>"
]
}Authorizations
API key sent as Authorization: Bearer <api-key>.
⌘I