pendulum-chain / pendulum-chain/vortex
Add endpoint to generate a widget URL
@gianfra-t is already working on this.
Since Oct 1, 2025.
- Dominant language
- TypeScript
- Stars
- 6
- Forks
- 5
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 33
Description
Context
With this endpoint, we are able to add more security to the widget in the future. For example, on the endpoint, we can require an api-key, or access-token in order to make it callable only from supported entities.
TODO
Add a new POST endpoint '/session/create' that can take the following body parameters:
For passing an existing quote to a widget:
{
"quoteId": "xxx-xxx",
"walletAddressLocked": "1x0232r23jnjnfjk2n3fjkn434jknf443jnf4j4nf",
"externalSessionId": "third-party-session-id-1",
// "externalTransactionId": "third-party-transaction-id-1",
// "externalCustomerId": "third-party-customer-id-1"
}
For creating a link to the widget that automatically refreshes the quote (without showing the form again)
{
"inputAmount": "100",
"sourceCurrencyCode": "USD",
"destinationCurrencyCodeLocked": "BTC",
"countryCode": "US",
"paymentMethod": "CARD",
"walletAddressLocked": "1x0232r23jnjnfjk2n3fjkn434jknf443jnf4j4nf",
"externalSessionId": "meldSession1",
// "externalTransactionId": "meldTransaction1",
// "externalCustomerId": "meldCustomer1"
}
The response should contain the following:
{
"widgetUrl": “https://app.vortexfinance.co/widget?rampType=BUY&inputAmount=100&fiat=usd&cryptoLocked=btc&payment=card&walletLocked=1x0232r23jnjnfjk2n3fjkn434jknf443jnf4j4nf
}
or for a widget that does not automatically refresh the quote (pass the quoteId):
{
"widgetUrl": “https://app.vortexfinance.co/widget?quoteId=xxx-xxx&walletLocked=1x0232r23jnjnfjk2n3fjkn434jknf443jnf4j4nf
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.