Repository navigation
BFP-5213: document the withdrawal amount quantum #301
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| { | ||
| "version": "1", | ||
| "algorithm": "sha256", | ||
| "generated_at": "2026-10-29T15:57:26.956791Z", | ||
| "generated_at": "2026-11-09T23:09:20.862721Z", | ||
| "spec_files": { | ||
| "resources/account-data-api.yaml": "ca145d50d48e0f3709130af89cf0feb3416c36adbd54b5ad40740f55217f94af", | ||
| "resources/auth-api.yaml": "01e54ca1a13d2d6307e0d3a9ea38f816902521e7c85998f0f21a1353cc54fb76", | ||
| "resources/bluefin-api.yaml": "27c095db0279a96408e4b60840d791c344fd40a380d4edb3bbf1f68b68ff7f2d", | ||
| "resources/common.yaml": "760ce6c130e31c3f0eafd692ca5d834499c7f24a15157fb4b43d05bd1043a0c0", | ||
| "resources/common.yaml": "c988ec664a55450806c8ee838c7d787e38c2d5af74287e58b949315fd5457be7", | ||
| "resources/exchange-common-api.yaml": "3c84fcdfa44e689c2465b79dab3dd0d2a2a1777ad207e167c64c457fcba58006", | ||
| "resources/exchange-pro-api.yaml": "a9b065f87a8c5992667eee65f3680f178de693f0a01c82726f0378547a2b540f", | ||
| "resources/rewards-data-api.yaml": "cdbd81ff161c09bf47ac6099e892d1f1e6a735d035cb16a22d6ad7eec0ac3550", | ||
| "resources/trade-api.yaml": "229ac3d9a7a30b640db928cc5d99cddc4e185e70b76e7c0d7273f94225cd1d37", | ||
| "resources/trade-api.yaml": "7256f14398f76f06fab31cd477386a7e0f4ec960c17e841dc100a2676d8a5d5f", | ||
| "resources/vera-api.yaml": "f4c51b5f6614dd4e3b9f5f1f01f945e06d9090849530ecb916ad4ae18d8f61a0", | ||
| "resources/websocket-api.yaml": "ff3458af8e3788bf0ae94159a60b0964186bed574aa4ec1edac70fae9d25c06a" | ||
| }, | ||
| "combined_hash": "13e2104bd6fe752d0cf6d120281300f3f3c00fe4a88005ba17ad1c8f6ac2a7dd" | ||
| "combined_hash": "984fcd9f9b8f481315e1d4733eba220a1060280e2a00ed78f6bbfcda499eccd9" | ||
| } |
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.
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.
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.
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 |
|---|---|---|
|
|
@@ -240,7 +240,13 @@ components: | |
| example: 0x000000000ABC | ||
| amountE9: | ||
| type: string | ||
| description: The amount in e9 of the asset that the User will withdraw from their account | ||
| description: >- | ||
| The amount in e9 of the asset that the User will withdraw from their account. | ||
| Must be a whole number of the asset's smallest on-chain unit, i.e. a multiple of | ||
| 10^(9 - decimals) where decimals is the asset's on-chain decimals (1000 for USDC, | ||
|
Contributor
Author
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 asset's on-chain decimals" doesn't say where a client gets that value. The only exposed field is |
||
| which has 6 decimals). Other amounts are rejected after the request is accepted, | ||
| via a failed-command event. Round down to that multiple before submitting, | ||
|
Contributor
Author
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. "via a failed-command event" leaves out what integrators need to match on. pro-mono#2125 maps |
||
| including when withdrawing maxWithdrawQuantityE9. | ||
| example: 1000000000 | ||
| salt: | ||
| type: string | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ sha2 = "0.10.9" | |
|
|
||
| [dependencies.bluefin_api] | ||
| path = "gen/bluefin_api" | ||
| version = "1.22.0" | ||
| version = "1.23.0" | ||
|
|
||
| [dependencies.ed25519-dalek] | ||
| features = ["rand_core"] | ||
|
|
@@ -93,7 +93,7 @@ keywords = [ | |
| license = "Unlicense" | ||
| name = "bluefin-pro" | ||
| repository = "https://github.com/fireflyprotocol/pro-sdk" | ||
| version = "1.22.0" | ||
| version = "1.23.0" | ||
|
Contributor
Author
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 version goes to 1.23.0 here and in
Contributor
Author
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. Fixed in e56ccfd: refreshed |
||
|
|
||
| [workspace] | ||
| members = [ | ||
|
|
||
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.
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.
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.
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 |
|---|---|---|
|
|
@@ -59,5 +59,5 @@ | |
| }, | ||
| "type": "module", | ||
| "types": "./dist/index.d.ts", | ||
| "version": "2.4.0" | ||
| "version": "2.5.0" | ||
|
Contributor
Author
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 says this version was set by hand because |
||
| } | ||
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10^(9 - decimals)only holds for decimals <= 9. The engine uses10u64.pow(9_u32.saturating_sub(decimals)), so for any asset with more than 9 decimals the quantum is 1. A client that follows the formula literally gets a fractional or negative exponent (10 ** (9 - 18)->1e-9, or a BigIntRangeError). Consider saying "10^max(0, 9 - decimals)" here and onamountE9.