Add a document to be signed (currently only one document is supported)
Document to be signed
Optionalfilename?: stringOptionalparameters?: {OptionalautoLoadEform?: booleanTry to find XSD and XSLT for a given eForm and load them automatically. Useful for visualizing and signing eForms. If true, schema, transformation, conatinerXmlns, container, packaging, and identifier parameters are ignored. If resources are not found, the response is 422. If provided document is an ASiC_E container conatining XML Datacontainer or it is an XML Datacontainer itself, XSLT found is used for visualiztion of signing document. Also, XSD and XSLT hashes are compared with hashes of XSD and XSLT found in XML Data Container EForm. If they differ, the response is 422. If the provided document is an XML document, Autogram will try to parse xmlns from root element and find resources based on its value. If successful, XML Datacontainer with xmls="http://data.gov.sk/def/container/xmldatacontainer+xml/1.1" is created, the document is validated against the XSD and visualized using the XSLT. If XSD validation fails, the response is 422. The XSLT transformation is found based on transformationLanguage (defaults to user preferred), transformationMediaDestinationTypeDescription (default XHTML, then HTML, then TXT), and transformationTargetEnvironment. If multiple transformations meet the criteria, the first one found is used.
OptionalcheckPDFACompliance?: booleanOptionalcontainer?: "ASiC-E" | "ASiC-S"OptionalcontainerXmlns?: "http://data.gov.sk/def/container/xmldatacontainer+xml/1.1"XML namespace for the XML Datacontainer. Specifies if xmldatacontainer should be created from XML. Doesn't create xmldatacontainer if payloadMimeType is application/vnd.gov.sk.xmldatacontainer+xml already. Accepts http://data.gov.sk/def/container/xmldatacontainer+xml/1.1 only. Defaults to null. Is ignored with autoLoadEform true.
OptionaldigestAlgorithm?: "SHA256" | "SHA384" | "SHA512"OptionalembedUsedSchemas?: booleanWhen creating XML Datacontainer, parameter indicates whether to embed XSD and XML or reference them. Practically this should be only used for ORSR EForms in which case (when identifier contains "justice.gov.sk/Forms") this parameter is overridden to true.
Optionalen319132?: booleanOptionalidentifier?: stringOptional identifier of the document template. Required if containerXmlns is http://data.gov.sk/def/container/xmldatacontainer+xml/1.1. Defaults to null. Is ignored with autoLoadEform true.
OptionalinfoCanonicalization?: OptionalkeyInfoCanonicalization?: Optionallevel?: Optionalpackaging?: "ENVELOPED" | "ENVELOPING"Optional form of packaging used with XML. ENVELOPED adds the signature as a child of the root element while ENVELOPING wraps the XML in a new element. Only applies to XAdES signatures. Must be ENVELOPING when used without ASiC container and with non XML documents. Is ignored with autoLoadEform true.
OptionalpropertiesCanonicalization?: Optionalschema?: stringOptionalschemaIdentifier?: stringOptional identifier of the XML schema. The value is used in "UsedXSDReference" field inside created XML Datacontainer. If provided with autoLoadEform true, Autogram will try to find such schema. Default value is "http://schemas.gov.sk/form/
Optionaltransformation?: stringOptional XML transformation used to present the signing document to user and to compute digest used in "UsedPresentationSchemaReference" in "DigestValue" attribute inside created XML Datacontainer. Format (plaintext or base64) is dictated by payloadMimeType. Is ignored with autoLoadEform true.
OptionaltransformationIdentifier?: stringOptional identifier of the XML transformation. If provided with autoLoadEform true, Autogram will try to find such transformation. Default value is "http://schemas.gov.sk/form/
OptionaltransformationLanguage?: stringOptionaltransformationMediaDestinationTypeDescription?: "XHTML" | "HTML" | "TXT"Optional media destination type description of the XML transformation. If autoLoadEform is true, Autogram will try to find signing XSLT with this type. Otherwise transformation must be provided. Overrides value of the output method in provided or auto-loaded transformation which is used by default.
OptionaltransformationTargetEnvironment?: stringOptionalpayloadMimeType?: stringMIME type for document content and signature parameters XSLT transformation and XSD schema.
Binary files should be encoded using base64, e.g., application/pdf;base64.
Text formats like XML can be optionally encoded using base64 or supplied as plain text.
If omitted, mimetype is decided based on document.filename and content is expected to be in Base64.
List mobile devices paired with this integration (devices that receive push notifications).
Optional — part of the notifications capability (see getPairingQrCodeUrl).
Get QR code URL for pairing this integration with a mobile device.
Optional — part of the notifications capability together with sendNotification and getPairedDevices. Channels that implement all three get the pairing UI; channels that skip them are signed by per-document QR scan only.
URL string
Get QR code URL for the document to be signed
URL string
Extension point for initializing the integration
Load existing or register new integration with the Autogram v mobile server
Send a push notification for the current document to paired devices.
Optional — part of the notifications capability (see getPairingQrCodeUrl).
Manages restore points for handling page reloads during the signing process.
When a page gets reloaded and you have a restorePoint set up, this method will:
A unique string/hash identifier for the restore point (e.g., document hash, session ID)
Promise that resolves to:
SignedObject if a restore point was found AND the document is already signednull if no restore point exists, or restore point found but document is still pendingconst channel = new AvmSimpleChannel();
await channel.loadOrRegister();
// Generate a unique restore point identifier (e.g., based on document hash)
const restorePoint = `doc-${documentHash}-${signers}-${url}`;
// Check if we're restoring from a previous session
const signedDoc = await channel.useRestorePoint(restorePoint);
if (signedDoc) {
// Document was already signed during previous session
console.log("Document already signed:", signedDoc);
} else {
// Either new signing or continuing from previous session
await channel.addDocument(documentToSign);
const qrUrl = await channel.getQrCodeUrl();
// Show QR code to user...
const signedDoc = await channel.waitForSignature();
}
Use case: User starts signing, switches to Autogram v Mobile app. Android pauses the browser (e.g., Firefox). User completes signing in AVM. When user returns to browser, the page reloads. Using restore points, the app can detect the document was already signed and complete without user interaction.
Waits for the document to be signed, resolving when the document is signed.
Promise that resolves to the signed document
Default direct implementation of AutogramVMobileIntegrationInterfaceStateful that communicates with the Autogram v Mobile (AVM) cloud service.
Thin stateful adapter over MobileClient: it tracks "the current signature request" between the interface's step-wise calls (
addDocument→getQrCodeUrl→waitForSignature→reset).useRestorePoint provides cross-page-reload continuity via RestorePointStore: the request token is persisted in the configured storage (IndexedDB by default) so an in-progress signing session can be recovered after navigation.
This class is the default channel used by
CombinedClient. The browser extension replaces it withAvmChannelWeb, which routes calls through the content-script ↔ injected-script message bridge instead of talking to the AVM API directly.