forked from Scottcjn/Rustchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2383 lines (2296 loc) · 63.5 KB
/
openapi.yaml
File metadata and controls
2383 lines (2296 loc) · 63.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: RustChain REST API
description: |
Complete OpenAPI specification for the RustChain blockchain REST API.
## Overview
RustChain is a proof-of-work blockchain with CPU antiquity-based rewards.
This API provides access to network data, wallet operations, attestation,
governance, and bridge functionality.
## Base URLs
- **Production**: `https://rustchain.org`
- **Development**: `http://localhost:8099`
## Authentication
- **Public endpoints**: No authentication required
- **Admin endpoints**: Require `X-Admin-Key` header
- **Signed transfers**: Require Ed25519 signature in request body
## Rate Limits
| Endpoint Category | Limit |
|------------------|-------|
| Health/Ready | 60/min |
| Epoch/Miners | 30/min |
| Wallet Balance | 30/min |
| Attestation | 1/min per miner |
| Admin endpoints | 10/min |
## HTTPS Certificate
The node uses a self-signed certificate. Use `-k` flag with curl or
disable certificate verification in HTTP clients.
version: 2.2.1-rip200
contact:
name: RustChain Development
url: https://github.com/Scottcjn/rustchain-bounties
license:
name: MIT
url: https://opensource.org/licenses/MIT
servers:
- url: https://rustchain.org
description: Production node (public)
- url: http://localhost:8099
description: Local development node
tags:
- name: Health & Status
description: Node health and readiness endpoints
- name: Epoch & Network
description: Epoch information and network statistics
- name: Miners
description: Miner enrollment and attestation data
- name: Wallet
description: Wallet balance and transfer operations
- name: Attestation
description: Hardware attestation and enrollment
- name: Governance
description: On-chain governance proposals and voting
- name: Bridge
description: Cross-chain bridge operations (RIP-0305)
- name: Premium
description: Premium endpoints (x402 payment protocol)
- name: Admin
description: Administrative endpoints requiring X-Admin-Key
paths:
/health:
get:
tags:
- Health & Status
summary: Node health check
description: |
Returns comprehensive health status including uptime, version,
database status, backup age, and sync state.
operationId: getHealth
responses:
'200':
description: Node is healthy
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponse'
example:
ok: true
version: "2.2.1-rip200"
uptime_s: 43200
db_rw: true
backup_age_hours: 12.5
tip_age_slots: 0
'503':
description: Node is unhealthy or unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/HealthResponse'
example:
ok: false
version: "2.2.1-rip200"
uptime_s: 43200
db_rw: false
backup_age_hours: 48.0
tip_age_slots: 150
/ready:
get:
tags:
- Health & Status
summary: Readiness probe
description: |
Kubernetes-style readiness probe. Returns `ready: true` when
the node is fully synced and ready to serve traffic.
operationId: getReady
responses:
'200':
description: Node is ready
content:
application/json:
schema:
$ref: '#/components/schemas/ReadinessResponse'
example:
ready: true
'503':
description: Node is not ready
content:
application/json:
schema:
$ref: '#/components/schemas/ReadinessResponse'
example:
ready: false
/epoch:
get:
tags:
- Epoch & Network
summary: Current epoch information
description: |
Returns current epoch number, slot position, blocks per epoch,
reward pool, and enrolled miner count.
operationId: getEpoch
responses:
'200':
description: Epoch information retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/EpochResponse'
example:
epoch: 75
slot: 10800
blocks_per_epoch: 144
epoch_pot: 1.5
enrolled_miners: 10
/api/miners:
get:
tags:
- Miners
summary: List active miners
description: |
Returns all currently active/enrolled miners with their
hardware details, attestation status, and reward multipliers.
operationId: getMiners
responses:
'200':
description: Miner list retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/MinerInfo'
example:
- miner: eafc6f14eab6d5c5362fe651e5e6c23581892a37RTC
device_arch: G4
device_family: PowerPC
hardware_type: PowerPC G4 (Vintage)
antiquity_multiplier: 2.5
entropy_score: 0.0
last_attest: 1771187406
first_attest: 1770000000
- miner: scott
device_arch: x86_64
device_family: Intel
hardware_type: Modern x86_64
antiquity_multiplier: 1.0
entropy_score: 0.0
last_attest: 1771187200
first_attest: 1770000000
/api/nodes:
get:
tags:
- Epoch & Network
summary: List connected nodes
description: |
Returns all connected attestation nodes with their roles,
addresses, and last-seen timestamps.
operationId: getNodes
responses:
'200':
description: Node list retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/NodeInfo'
example:
- node_id: primary
address: 50.28.86.131
role: attestation
status: active
last_seen: 1771187406
- node_id: ergo-anchor
address: 50.28.86.153
role: anchor
status: active
last_seen: 1771187400
/api/stats:
get:
tags:
- Epoch & Network
summary: Network statistics
description: |
Returns overall network statistics including total blocks,
transactions, and other metrics.
operationId: getStats
responses:
'200':
description: Statistics retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/NetworkStats'
example:
total_blocks: 150000
total_transactions: 1205000
total_miners: 25
active_miners: 10
/api/hall_of_fame:
get:
tags:
- Miners
summary: Hall of Fame leaderboard
description: |
Returns leaderboard across 5 categories of miners/participants.
Categories include top miners by various metrics.
operationId: getHallOfFame
responses:
'200':
description: Hall of Fame retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/HallOfFameResponse'
example:
top_miners:
- miner: scott
category: longevity
score: 1000
top_vintage:
- miner: eafc6f14eab6d5c5362fe651e5e6c23581892a37RTC
category: vintage
score: 2.5
/api/fee_pool:
get:
tags:
- Epoch & Network
summary: Fee pool statistics
description: |
Returns RIP-301 fee pool statistics showing fees recycled
to the mining pool.
operationId: getFeePool
responses:
'200':
description: Fee pool statistics retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/FeePoolResponse'
example:
description: Fee Pool Statistics
destination: founder_community
destination_balance_rtc: 83246.13
rip: 301
total_fee_events: 0
total_fees_collected_rtc: 0
withdrawal_fee_rtc: 0.01
/api/settlement/{epoch}:
get:
tags:
- Epoch & Network
summary: Historical settlement data
description: |
Query historical settlement data for a specific epoch,
including rewards distributed to miners.
operationId: getSettlement
parameters:
- name: epoch
in: path
required: true
schema:
type: integer
description: Epoch number to query
responses:
'200':
description: Settlement data retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SettlementResponse'
example:
epoch: 75
timestamp: 1771200000
total_pot: 1.5
total_distributed: 1.5
miner_count: 5
settlement_hash: 8a3f2e1d9c7b6a5e4f3d2c1b0a9e8d7c
ergo_tx_id: abc123
rewards:
scott: 0.487
pffs1802: 0.390
miner3: 0.195
'404':
description: Settlement not found for epoch
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/wallet/balance:
get:
tags:
- Wallet
summary: Get wallet balance
description: |
Check RTC balance for a miner wallet. Accepts `miner_id` as
canonical parameter, with `address` as backward-compatible alias.
operationId: getWalletBalance
parameters:
- name: miner_id
in: query
required: false
schema:
type: string
description: Wallet/miner identifier (canonical parameter)
- name: address
in: query
required: false
schema:
type: string
description: Backward-compatible alias for miner_id
responses:
'200':
description: Balance retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/BalanceResponse'
example:
ok: true
miner_id: scott
amount_rtc: 42.5
amount_i64: 42500000
'404':
description: Wallet not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
ok: false
error: WALLET_NOT_FOUND
miner_id: unknown
/wallet/history:
get:
tags:
- Wallet
summary: Get wallet transaction history
description: |
Read recent transfer history for a wallet. Returns entries where
the wallet is either sender or recipient. Public endpoint but
scoped to single wallet.
operationId: getWalletHistory
parameters:
- name: miner_id
in: query
required: false
schema:
type: string
description: Wallet/miner identifier (canonical parameter)
- name: address
in: query
required: false
schema:
type: string
description: Backward-compatible alias for miner_id
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 200
default: 10
description: Max records to return (clamped to 1-200)
responses:
'200':
description: History retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TransactionRecord'
example:
- tx_id: 6df5d4d25b6deef8f0b2e0fa726cecf1
from_addr: scott
to_addr: friend
amount: 1.25
amount_i64: 1250000
timestamp: 1771187406
status: pending
direction: sent
counterparty: friend
memo: Payment for services
confirmed_at: null
confirms_at: 1771191006
/wallet/transfer/signed:
post:
tags:
- Wallet
summary: Submit signed transfer
description: |
Transfer RTC between wallets using Ed25519 signature.
Does not require admin key - uses cryptographic signature instead.
operationId: submitSignedTransfer
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SignedTransferRequest'
example:
from_address: senderRTC
to_address: recipientRTC
amount_rtc: 10.0
amount_i64: 10000000
nonce: 1771187406
signature: base64_ed25519_signature_here
public_key: hex_encoded_public_key
memo: Optional payment memo
responses:
'200':
description: Transfer submitted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TransferResponse'
example:
success: true
tx_hash: abc123def456
new_balance: 90.5
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: INVALID_SIGNATURE
detail: Ed25519 signature verification failed
'402':
description: Insufficient balance
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: INSUFFICIENT_BALANCE
available: 5.0
requested: 10.0
/wallet/transfer:
post:
tags:
- Admin
summary: Admin transfer
description: |
Transfer RTC between wallets (admin only).
Requires X-Admin-Key header.
operationId: adminTransfer
security:
- AdminKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTransferRequest'
example:
from_miner: treasury
to_miner: scott
amount_rtc: 10.0
memo: Bounty payment #123
responses:
'200':
description: Transfer executed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/AdminTransferResponse'
example:
ok: true
tx_id: tx_abc123
from_balance: 990.0
to_balance: 52.5
'401':
description: Unauthorized - invalid admin key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: UNAUTHORIZED
detail: Invalid or missing X-Admin-Key
/wallet/swap-info:
get:
tags:
- Wallet
summary: Get swap information
description: |
Get USDC/wRTC swap guidance including prices and contract addresses.
operationId: getSwapInfo
responses:
'200':
description: Swap info retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SwapInfoResponse'
example:
rtc_price_usd: 0.10
wrtc_solana_mint: 12TAdKXxcGf6oCv4rqDz2NkgxjyHq6HQKoxKZYGf5i4X
wrtc_base_contract: "0x5683C10596AaA09AD7F4eF13CAB94b9b74A669c6"
raydium_pool: 8CF2Q8nSCxRacDShbtF86XTSrYjueBMKmfdR3MLdnYzb
bridge_url: https://bottube.ai/bridge
/attest/submit:
post:
tags:
- Attestation
summary: Submit hardware attestation
description: |
Submit hardware attestation to enroll in current epoch.
Includes hardware fingerprint data for CPU antiquity verification.
operationId: submitAttestation
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AttestationRequest'
example:
miner_id: scott
timestamp: 1771187406
device_info:
arch: PowerPC
family: G4
fingerprint:
clock_skew:
drift_ppm: 24.3
jitter_ns: 1247
cache_timing:
l1_latency_ns: 5
l2_latency_ns: 15
simd_identity:
instruction_set: AltiVec
pipeline_bias: 0.76
thermal_entropy:
idle_temp_c: 42.1
load_temp_c: 71.3
variance: 3.8
instruction_jitter:
mean_ns: 3200
stddev_ns: 890
behavioral_heuristics:
cpuid_clean: true
no_hypervisor: true
signature: Ed25519_base64_signature
responses:
'200':
description: Attestation accepted, miner enrolled
content:
application/json:
schema:
$ref: '#/components/schemas/AttestationResponse'
example:
enrolled: true
epoch: 75
multiplier: 2.5
hw_hash: abc123def456
next_settlement: 1771200000
'400':
description: Attestation rejected
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/VMDetectedResponse'
- $ref: '#/components/schemas/HardwareBoundResponse'
examples:
vm_detected:
summary: VM detected
value:
error: VM_DETECTED
failed_checks:
- clock_skew
- thermal_entropy
penalty_multiplier: 2.5e-9
hardware_bound:
summary: Hardware already bound
value:
error: HARDWARE_ALREADY_BOUND
existing_miner: other_wallet
/lottery/eligibility:
get:
tags:
- Attestation
summary: Check epoch eligibility
description: |
Check if a miner is enrolled and eligible for the current
epoch block lottery.
operationId: checkEligibility
parameters:
- name: miner_id
in: query
required: true
schema:
type: string
description: Miner wallet identifier
responses:
'200':
description: Eligibility check completed
content:
application/json:
schema:
$ref: '#/components/schemas/EligibilityResponse'
example:
eligible: true
epoch: 75
multiplier: 2.5
last_attest: 1771187406
status: active
/rewards/settle:
post:
tags:
- Admin
summary: Trigger epoch settlement
description: |
Manually trigger epoch settlement (admin only).
Distributes rewards to enrolled miners.
operationId: triggerSettlement
security:
- AdminKeyAuth: []
responses:
'200':
description: Settlement triggered successfully
content:
application/json:
schema:
$ref: '#/components/schemas/SettlementTriggerResponse'
example:
ok: true
epoch: 75
miners_rewarded: 5
total_distributed: 1.5
settlement_hash: 8a3f2e1d
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/explorer:
get:
tags:
- Health & Status
summary: Block explorer UI
description: |
Web UI for browsing blocks and transactions.
Returns HTML page, not JSON.
operationId: getExplorer
responses:
'200':
description: HTML page returned
content:
text/html:
schema:
type: string
example: "<!DOCTYPE html><html>...</html>"
/governance/proposals:
get:
tags:
- Governance
summary: List proposals
description: |
List all governance proposals with their current status.
operationId: listProposals
responses:
'200':
description: Proposals retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProposalSummary'
example:
- proposal_id: 1
title: Enable parameter X
status: active
votes_yes: 1000
votes_no: 200
ends_at: 1771200000
/governance/proposal/{proposal_id}:
get:
tags:
- Governance
summary: Get proposal details
description: |
Get detailed information about a specific proposal.
operationId: getProposal
parameters:
- name: proposal_id
in: path
required: true
schema:
type: integer
description: Proposal ID
responses:
'200':
description: Proposal details retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/ProposalDetail'
example:
proposal_id: 1
title: Enable parameter X
description: Rationale and implementation details
proposer: RTC_wallet_address
status: active
created_at: 1770000000
ends_at: 1771200000
votes_yes: 1000
votes_no: 200
quorum_required: 5000
'404':
description: Proposal not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/governance/propose:
post:
tags:
- Governance
summary: Create proposal
description: |
Create a new governance proposal.
operationId: createProposal
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProposalRequest'
example:
wallet: RTC_wallet_address
title: Enable parameter X
description: Rationale and implementation details
responses:
'200':
description: Proposal created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProposalResponse'
example:
success: true
proposal_id: 2
created_at: 1771187406
/governance/vote:
post:
tags:
- Governance
summary: Submit vote
description: |
Submit a vote on a proposal. Requires Ed25519 signature.
operationId: submitVote
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VoteRequest'
example:
proposal_id: 1
wallet: RTC_wallet_address
vote: "yes"
nonce: "1700000000"
public_key: ed25519_pubkey_hex
signature: ed25519_signature_hex
responses:
'200':
description: Vote submitted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/VoteResponse'
example:
success: true
vote_id: 12345
proposal_id: 1
/governance/ui:
get:
tags:
- Governance
summary: Governance UI
description: |
Web UI for governance voting. Returns HTML page.
operationId: getGovernanceUI
responses:
'200':
description: HTML page returned
content:
text/html:
schema:
type: string
/api/bridge/initiate:
post:
tags:
- Bridge
summary: Initiate bridge transfer
description: |
Create a new bridge transfer (deposit or withdraw) between
RustChain and external chains (Solana, Ergo, Base).
Requires admin authentication.
operationId: initiateBridge
security:
- AdminKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BridgeInitiateRequest'
example:
direction: deposit
source_chain: rustchain
dest_chain: solana
source_address: RTC_miner123
dest_address: "4TRwNqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXq"
amount_rtc: 100.0
memo: Optional memo
responses:
'200':
description: Bridge transfer initiated
content:
application/json:
schema:
$ref: '#/components/schemas/BridgeInitiateResponse'
example:
ok: true
bridge_transfer_id: 12345
tx_hash: abc123def456
status: pending
lock_epoch: 85
unlock_at: 1709942400
estimated_completion: "2026-03-10T12:00:00Z"
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
insufficient_balance:
summary: Insufficient balance
value:
error: Insufficient available balance
available_rtc: 50.0
pending_debits_rtc: 20.0
requested_rtc: 100.0
invalid_address:
summary: Invalid address
value:
error: "Invalid solana address: length must be 32-44 characters"
/api/bridge/status/{tx_hash}:
get:
tags:
- Bridge
summary: Get bridge status
description: |
Get status of a specific bridge transfer by transaction hash.
operationId: getBridgeStatus
parameters:
- name: tx_hash
in: path
required: true
schema:
type: string
description: Transaction hash
responses:
'200':
description: Status retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/BridgeStatusResponse'
example:
ok: true
transfer:
id: 12345
direction: deposit
source_chain: rustchain
dest_chain: solana
source_address: RTC_miner123
dest_address: "4TRwNqXqXqXqXqXqXqXqXqXqXqXqXqXqXqXq"
amount_rtc: 100.0
bridge_type: bottube
external_tx_hash: 5xKjPqR
external_confirmations: 8
required_confirmations: 12
status: confirming
lock_epoch: 85
created_at: 1709856000
updated_at: 1709859600
expires_at: 1710460800
tx_hash: abc123def456
'404':
description: Transfer not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/bridge/list:
get:
tags:
- Bridge
summary: List bridge transfers
description: |
List bridge transfers with optional filters.
operationId: listBridgeTransfers
parameters:
- name: status
in: query
required: false
schema:
type: string
enum: [pending, locked, confirming, completed, failed, voided]
description: Filter by status
- name: source_address
in: query
required: false
schema:
type: string
description: Filter by source address
- name: dest_address
in: query
required: false
schema:
type: string
description: Filter by destination address
- name: direction
in: query
required: false
schema:
type: string
enum: [deposit, withdraw]