Skip to main content

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

ParameterTypeDescription
dstDomainDomainId
txHashstringhash of the transaction to attest
thresholdnumbernumber of signatures to collect
isValidAttestationTeleportOracleAuth['isValid']callback to check if an oracle signature is valid
pollingIntervalMsnumber
teleportGUIDTeleportGUID(Optional) TeleportGUID created by the txHash transaction
timeoutMsnumber(Optional)
onNewSignatureReceived(numSignatures: number, threshold: number, guid?: TeleportGUID) => void(Optional) callback
Returns:

Promise<{ signatures: string; teleportGUID: TeleportGUID; }>

Promise containing oracle attestations, and the attested TeleportGUID