teleport-sdk.waitforattestations
Home > teleport-sdk > waitForAttestations
waitForAttestations() function
Collect attestations for a transaction from the Oracle network
Signature:export declare function waitForAttestations(dstDomain: DomainId, txHash: string, threshold: number, isValidAttestation: TeleportOracleAuth['isValid'], pollingIntervalMs: number, teleportGUID?: TeleportGUID, timeoutMs?: number, onNewSignatureReceived?: (numSignatures: number, threshold: number, guid?: TeleportGUID) => void): Promise<{
signatures: string;
teleportGUID: TeleportGUID;
}>;
Parameters
Parameter | Type | Description |
---|---|---|
dstDomain | DomainId | |
txHash | string | hash of the transaction to attest |
threshold | number | number of signatures to collect |
isValidAttestation | TeleportOracleAuth['isValid'] | callback to check if an oracle signature is valid |
pollingIntervalMs | number | |
teleportGUID | TeleportGUID | (Optional) TeleportGUID created by the txHash transaction |
timeoutMs | number | (Optional) |
onNewSignatureReceived | (numSignatures: number, threshold: number, guid?: TeleportGUID) => void | (Optional) callback |
Promise<{ signatures: string; teleportGUID: TeleportGUID; }>
Promise containing oracle attestations, and the attested TeleportGUID