Skip to main content

4. Compliance & Cryptographic Evidence

The following methods are available via the AgriBackup SDK for this integration stage.

Generate Bulk Archive Report

Asynchronously compiles XML payloads, Hedera state proofs, and legal document hashes into a single cryptographic ZIP artifact. Triggers a 'report.ready' webhook upon completion.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.api.triggerArchiveReport(/* args */);
console.log(response.data);

Ingests physical PDF or binary documents required by TRACES NT, returns a secure cryptographic hash and internal reference URL for inclusion in the DDS payload.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.declarations.uploadDocument(/* args */);
console.log(response.data);

List Generated Due Diligence Statements

Returns a cursor-paginated list of generated DDS payloads and their Hedera consensus states.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.declarations.listDdsPayloads(/* args */);
console.log(response.data);

Generate Due Diligence Statement (DDS)

Generates a TRACES NT compliant DDS. Autonomously anchors provided legal_document_hashes to the Hedera ledger for land tenure proof.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.declarations.generateDds(/* args */);
console.log(response.data);

Submit DDS to TRACES NT

Executes the SOAP API handshake with TRACES NT utilizing Vault-decrypted tokens, and returns the official EU reference number.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.declarations.submitDds(/* args */);
console.log(response.data);

Revoke a submitted DDS

Dispatches a revocation request to TRACES NT and anchors the revocation timestamp and receipt on Hedera.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.declarations.revokeDds(/* args */);
console.log(response.data);

Download Bulk Archive ZIP

Retrieves the compiled ZIP artifact. The download link is temporary and time-limited.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.api.downloadArchiveReport(/* args */);
console.log(response.data);

Retrieve shipment cryptographic evidence

Traverses the supply chain graph to locate all EUDR batches mathematically linked to this shipment ID or Bill of Lading, returning their consolidated Hedera state proofs.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.evidence.getShipmentLedgerEvidence(/* args */);
console.log(response.data);

Retrieve polygon cryptographic evidence

Returns raw Hedera transaction IDs, state proofs, and Merkle root hashes for a verified production polygon.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.evidence.getPolygonLedgerEvidence(/* args */);
console.log(response.data);

Retrieve batch cryptographic evidence

Returns raw Hedera transaction IDs, state proofs, and Merkle root hashes for a consolidated EUDR batch. All anchoring is on the Hedera DLT layer.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.evidence.getBatchLedgerEvidence(/* args */);
console.log(response.data);

Retrieve finalized DDS payload

Returns the TRACES NT V3 XML payload and Hedera consensus timestamp once async DDS generation completes.

import { AgriBackupClient } from 'agribackup';

const client = new AgriBackupClient('sk_live_...');
const response = await client.declarations.getDdsPayload(/* args */);
console.log(response.data);