const q = await ensc.conversions.quote({ type: 'crypto-issue', chain: 'celo', pair: 'USDC', amount: '100' });{
"v": 1,
"enc": "<string>",
"ciphertext": "<string>"
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}Quote a crypto leg
The converter contract prices the conversion; the quote is refused while the oracle rate is stale. For crypto-redeem the response carries the largest ENSC amount currently redeemable into the pair. Response body is a SealedResponseEnvelope whose plaintext is QuoteResponse. Send X-ENSC-Key-Id to pick the recipient signing key when more than one is active.
const q = await ensc.conversions.quote({ type: 'crypto-issue', chain: 'celo', pair: 'USDC', amount: '100' });{
"v": 1,
"enc": "<string>",
"ciphertext": "<string>"
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "ENSC_VALIDATION_FAILED",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}Authorizations
Your secret key, generated in the ProsperaVest dashboard (Sandbox or Live). Send as: Authorization: Bearer ensc_live_sk_...
Headers
"sig_01HXY..."
Query Parameters
crypto-issue, crypto-redeem 2 - 40USDC, USDT, CELO 60^\d+(\.\d+)?$Response
Sealed response
ENSC-RESP-V1. HPKE (RFC 9180; DHKEM(X25519, HKDF-SHA256), HKDF-SHA256, ChaCha20-Poly1305) seal of the plaintext JSON response to the merchant signing key named by X-ENSC-Key-Id (Ed25519 key converted to X25519). info = "ENSC-RESP-V1\n{requestId}". The body is signed by ENSC: X-ENSC-Signature over "ENSC-RESP-V1\n{requestId}\n{timestamp}\n{sha256(body)}". Returned for sk/rk merchant keys only.