Skip to content

Commit b09cf0e

Browse files
pengyingclaude
andcommitted
feat: change cryptoNetwork from string to enum, truncate environment postfix
Creates a shared CryptoNetwork enum schema with values: BITCOIN, ETHEREUM, SOLANA, BASE, SPARK, LIGHTNING. The environment (mainnet/testnet) is now determined by which API environment the request targets, removing the _MAINNET/_TESTNET/_DEVNET/_REGTEST suffixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 80ac181 commit b09cf0e

8 files changed

Lines changed: 89 additions & 58 deletions

File tree

mintlify/openapi.yaml

Lines changed: 29 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 29 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
type: string
2+
description: |
3+
The blockchain network identifier. The environment (mainnet vs testnet) is determined
4+
automatically based on whether the request is made against the production or sandbox API.
5+
6+
| Value | Production | Sandbox |
7+
|-------|------------|---------|
8+
| BITCOIN | Bitcoin mainnet | Bitcoin testnet |
9+
| ETHEREUM | Ethereum mainnet | Ethereum Sepolia |
10+
| SOLANA | Solana mainnet | Solana devnet |
11+
| BASE | Base mainnet | Base Sepolia |
12+
| SPARK | Spark mainnet | Spark testnet |
13+
| LIGHTNING | Lightning mainnet | Lightning regtest |
14+
enum:
15+
- BITCOIN
16+
- ETHEREUM
17+
- SOLANA
18+
- BASE
19+
- SPARK
20+
- LIGHTNING
21+
example: SOLANA

openapi/components/schemas/crypto/EstimateCryptoWithdrawalFeeRequest.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ properties:
1515
description: The currency code of the asset to withdraw (e.g. USDC).
1616
example: USDC
1717
cryptoNetwork:
18-
type: string
19-
description: >-
20-
The blockchain network for the withdrawal. Example values: SOLANA_MAINNET,
21-
SOLANA_DEVNET, ETHEREUM_MAINNET, ETHEREUM_TESTNET, BASE_MAINNET,
22-
BASE_TESTNET, SPARK_MAINNET, SPARK_TESTNET, LIGHTNING_MAINNET,
23-
LIGHTNING_REGTEST.
24-
example: SOLANA_MAINNET
18+
$ref: ./CryptoNetwork.yaml
2519
amount:
2620
type: integer
2721
description: The amount to withdraw in the smallest unit of the currency.

openapi/components/schemas/external_accounts/ExternalAccount.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ allOf:
4141
$ref: ./BeneficiaryVerifiedData.yaml
4242
description: Verified beneficiary data returned by the payment rail, if available
4343
cryptoNetwork:
44-
type: string
45-
description: >-
46-
The blockchain network for this external account, if applicable. Present when the account
47-
is a cryptocurrency wallet. Example values: SOLANA_MAINNET, SOLANA_DEVNET,
48-
ETHEREUM_MAINNET, ETHEREUM_TESTNET, BASE_MAINNET, BASE_TESTNET,
49-
SPARK_MAINNET, SPARK_TESTNET, LIGHTNING_MAINNET, LIGHTNING_REGTEST.
50-
example: SOLANA_MAINNET
44+
$ref: ../crypto/CryptoNetwork.yaml
5145
accountInfo:
5246
$ref: ./ExternalAccountInfoOneOf.yaml

openapi/components/schemas/external_accounts/ExternalAccountCreateRequest.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ allOf:
2929
incoming UMA payments will be deposited into the primary internal account for the customer.
3030
default: false
3131
cryptoNetwork:
32-
type: string
33-
description: >-
34-
The blockchain network for this external account. Required when the account is a
35-
cryptocurrency wallet. Specifies which network the wallet is on. Example values:
36-
SOLANA_MAINNET, SOLANA_DEVNET, ETHEREUM_MAINNET, ETHEREUM_TESTNET,
37-
BASE_MAINNET, BASE_TESTNET, SPARK_MAINNET, SPARK_TESTNET, LIGHTNING_MAINNET,
38-
LIGHTNING_REGTEST.
39-
example: SOLANA_MAINNET
32+
$ref: ../crypto/CryptoNetwork.yaml
4033
accountInfo:
4134
$ref: ./ExternalAccountInfoOneOf.yaml

openapi/components/schemas/quotes/RealtimeFundingQuoteSource.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,12 @@ allOf:
2424
for the full list of supported fiat and crypto currencies.
2525
example: USD
2626
cryptoNetwork:
27-
type: string
28-
description: >-
29-
The crypto network to use for the funding source. Required when `currency` is a
30-
stablecoin (e.g. USDC, USDT). Specifies which network the customer will deposit
31-
on, so the correct deposit address can be generated. Example values:
32-
`SOLANA_MAINNET`, `SOLANA_DEVNET`, `ETHEREUM_MAINNET`, `ETHEREUM_TESTNET`,
33-
`BASE_MAINNET`, `BASE_TESTNET`, `SPARK_MAINNET`, `SPARK_TESTNET`,
34-
`LIGHTNING_MAINNET`, `LIGHTNING_REGTEST`.
35-
example: SOLANA_MAINNET
27+
allOf:
28+
- $ref: ../crypto/CryptoNetwork.yaml
29+
- description: >-
30+
The crypto network to use for the funding source. Required when `currency` is a
31+
stablecoin (e.g. USDC, USDT). Specifies which network the customer will deposit
32+
on, so the correct deposit address can be generated.
3633
description: >-
3734
Fund the quote using a real-time funding source (RTP, SEPA Instant, Spark, Stables, etc.).
3835
This will require manual just-in-time funding using `paymentInstructions` in the response.

openapi/paths/crypto/crypto_estimate-withdrawal-fee.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ post:
2121
value:
2222
internalAccountId: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
2323
currency: USDC
24-
cryptoNetwork: SOLANA_MAINNET
24+
cryptoNetwork: SOLANA
2525
amount: 1000000
2626
destinationAddress: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
2727
responses:

0 commit comments

Comments
 (0)