Skip to content
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

Update the offering section of the readme to match types.js #116

Conversation

SiennaSaito
Copy link
Contributor

@SiennaSaito SiennaSaito commented Jul 12, 2023

Context

The offering section of the readme is out of date with types.ts.
This PR manually updates the readme. We'll be able to automate this work if #115 or something similar happens but I want to get the readme up to date so we have something to validate automatic generation against.

References removed:

  • unitPriceDollars
  • baseFeeDollars
  • minDollars
  • maxDollars

References added:

  • quoteUnitsPerBaseUnit

Remaining work

I actually don't know anything about TBDex so I have no idea what any of the properties in Offering do.
I've marked each entry that is missing a description with ???
If someone could comment inline on the files changed with what each ??? should be replaced with that would be super cool!

README.md Outdated
| ----------------------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | string | Y | Unique identifier for this offering |
| `description` | string | Y | Brief description of what is being offered. |
| `quoteUnitsPerBaseUnit` | string | Y | ??? |
Copy link
Contributor Author

@SiennaSaito SiennaSaito Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to use for the description for quoteUnitsPerBaseUnit 🤔

@SiennaSaito SiennaSaito force-pushed the sienna/update-offering-section-in-readme branch from 96d60f4 to c3f022d Compare July 12, 2023 07:06
@jiyoontbd
Copy link
Contributor

jiyoontbd commented Jul 12, 2023 via email

README.md Outdated
| ----------------------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | string | Y | Unique identifier for this offering |
| `description` | string | Y | Brief description of what is being offered. |
| `quoteUnitsPerBaseUnit` | string | Y | ??? |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `quoteUnitsPerBaseUnit` | string | Y | ??? |
| `quoteUnitsPerBaseUnit` | string | Y | Number of quote units on offer for one base currency unit (i.e 290000 USD for 1 BTC |

README.md Outdated
@@ -67,32 +63,32 @@ Base Currency is the currency that the PFI is **selling**. Quote currency is the
| field | data type | required | description |
| ---------------------------------- | --------- | -------- | --------------------------------------------------------------------------------------------------- |
| `kind` | string | Y | Type of payment method (i.e. `DEBIT_CARD`, `BITCOIN_ADDRESS`, `SQUARE_PAY`) |
| `paymentPresentationDefinitionJwt` | string | N | PresentationDefinition that describes the VCs needed to use this PaymentMethod in JWT string format |
| `requiredPaymentDetails` | string | N | ??? |
Copy link
Contributor

@phoebe-lew phoebe-lew Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `requiredPaymentDetails` | string | N | ??? |
| `requiredPaymentDetails` | string | N | Details of the VCs required to use this payment in json-schema format |

README.md Outdated
"feeSubunits": "100"
},
{
"kind": "SQUARE_PAY",
"paymentPresentationDefinitionJwt": null,
"requiredPaymentDetails": ???,
Copy link
Contributor

@phoebe-lew phoebe-lew Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"requiredPaymentDetails": ???,

README.md Outdated
"kind": "BTC_ADDRESS",
"paymentPresentationDefinitionJwt": "abc...IDsx"
"requiredPaymentDetails": ???
Copy link
Contributor

@phoebe-lew phoebe-lew Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"requiredPaymentDetails": ???
"requiredPaymentDetails": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "BTC Required Payment Details",
"type": "object",
"required": [
"btcAddress"
],
"additionalProperties": false,
"properties": {
"btcAddress": {
"description": "The address you wish to receive BTC in",
"type": "string"
}
}
}

indenting might be a bit wonky!

README.md Outdated
| `feeSubunits` | string | N | Optional fee associated with using this kind of payment method in the smallest currency delineation |


```json
{
"id": ???,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"id": ???,
"id": "tbdex:offering:123456",

README.md Outdated
"description": "Buy BTC with USD!",
"quoteUnitsPerBaseUnit": ???,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"quoteUnitsPerBaseUnit": ???,
"quoteUnitsPerBaseUnit": "29000",

@SiennaSaito SiennaSaito force-pushed the sienna/update-offering-section-in-readme branch from c3f022d to a6c82d7 Compare July 13, 2023 00:28
@SiennaSaito
Copy link
Contributor Author

SiennaSaito commented Jul 13, 2023

Thanks for the quick review @phoebe-lew + @jiyoontbd! 😎 ✨
After this is merged I'll get started on a proof of concept for automating the generation of the readme table based off types.ts (#115)

@phoebe-lew phoebe-lew merged commit 10ff63d into TBD54566975:main Jul 14, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants