-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add Bitcoin L1 deposit-address instruction + refundAddress to quotes #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
699ff8c
1f5f79e
298add7
380105a
fa6f692
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| title: Bitcoin L1 Deposit Address | ||
| allOf: | ||
| - $ref: ./BasePaymentAccountInfo.yaml | ||
| - type: object | ||
| required: | ||
| - address | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| enum: | ||
| - BITCOIN_L1 | ||
| address: | ||
| type: string | ||
| description: On-chain Bitcoin (L1) deposit address to send funds to | ||
| example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq | ||
| network: | ||
| type: string | ||
| description: The blockchain network for the deposit address. | ||
| enum: | ||
| - BITCOIN | ||
| example: BITCOIN | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,4 +21,10 @@ allOf: | |
| The payment rail to use for the transfer. Must be one of the rails | ||
| supported by the destination account. If not specified, the system | ||
| will select a default rail. | ||
| refundAddress: | ||
| type: string | ||
| description: >- | ||
| Optional address the funds are returned to if the payout cannot be | ||
| completed. Applies to crypto off-ramp destinations. | ||
| example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq | ||
|
Comment on lines
+24
to
+29
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The PR description is a little confusing - it says this is for offramps? For offramp refunds (e.g., USDB -> BTC offramp fails, so we want to refund) shouldn't that automatically just go back to the source, and would we ever not know that value? I think it makes sense to me that this is not the case for onramps - if the flow fails I'm guessing you should be able to specify where your BTC should go back to if it doesn't work.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The confusing description is on me — I rewrote that section and mislabeled it. Fixing it now. And I think you're right on the substance; here's what I found digging into the server side. Why the wording reads wrong. On whether it's needed at all — I think not, for the reason you gave. For a BTC-out payout, Grid is the party funding the upstream swap, so a failed payout refunds to a Grid-controlled address Grid already knows; the caller has nothing to contribute. And in the case where there genuinely is an inbound on-chain leg whose sender we can't infer (customer deposits BTC/stables to a generated address), that's already covered by Where the field probably came from. The upstream Orchestra API requires Nothing consumes it yet. That flashnet package currently has no non-test importers, and there's no The cost is asymmetric, which is what tips it for me: removing it now is free, and adding it back later is additive and non-breaking. Shipping it and removing it later is a breaking change. Given it's unused and the semantics are dubious, the cheap and safe move is to drop @peterrojs — you wrote the Orchestra client, so you'd know the flow better than I can infer it: is there an off-ramp shape where the refund target isn't derivable from the source, e.g. the customer funds the swap directly rather than out of a Grid-held balance? If not, say the word and I'll drop the field and rebundle. I didn't want to remove something you added deliberately for work you're mid-way through wiring up. |
||
| description: Destination account details | ||
Uh oh!
There was an error while loading. Please reload this page.