Skip to content

Commit f4a55eb

Browse files
authored
Merge pull request #859 from rsksmart/Stable-Test
Stable test -> QA-Test
2 parents 9634162 + 74c7c5a commit f4a55eb

File tree

2 files changed

+129
-1
lines changed

2 files changed

+129
-1
lines changed

.github/workflows/devPortal-update.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,28 @@ jobs:
210210
rm ${TEMP_FILE}
211211
cp ${TRANSFORMED_FILE} ${BASE_DST}/advanced-operations.md
212212
213+
#####################################
214+
# Trusted accounts #
215+
#####################################
216+
TEMP_FILE="trusted-accounts.md"
217+
tail -n +2 ${BASE_SRC}/docs/Trusted-Accounts.md > ${TEMP_FILE}
218+
TRANSFORMED_FILE="transformed/trusted-accounts.md"
219+
echo "---" > ${TRANSFORMED_FILE}
220+
echo "sidebar_label: Trusted Accounts feature" >> ${TRANSFORMED_FILE}
221+
echo "sidebar_position: 240" >> ${TRANSFORMED_FILE}
222+
echo "title: Flyover SDK - Trusted Accounts" >> ${TRANSFORMED_FILE}
223+
echo "tags: [rsk, rootstock, rif, flyover, integrate, integration guide, rbtc, powpeg, automation]" >> ${TRANSFORMED_FILE}
224+
echo "description: Trusted accounts allowed to perform automated PegIn and PegOut operations." >> ${TRANSFORMED_FILE}
225+
echo "---" >> ${TRANSFORMED_FILE}
226+
echo "" >> ${TRANSFORMED_FILE}
227+
echo ":::info[Note]" >> ${TRANSFORMED_FILE}
228+
echo "If you wish to suggest changes on this document, please open a PR on the [Liquidity Provider Server Repository](https://github.com/rsksmart/liquidity-provider-server.git)" >> ${TRANSFORMED_FILE}
229+
echo ":::" >> ${TRANSFORMED_FILE}
230+
echo "" >> ${TRANSFORMED_FILE}
231+
cat ${TEMP_FILE} >> ${TRANSFORMED_FILE}
232+
rm ${TEMP_FILE}
233+
cp ${TRANSFORMED_FILE} ${BASE_DST}/trusted-accounts.md
234+
213235
# Step 3: Commit and Push Changes to Devportal Repository
214236
- name: Commit and Push Changes
215237
env:
@@ -233,4 +255,4 @@ jobs:
233255
-H "Authorization: Bearer ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}" \
234256
-H "X-GitHub-Api-Version: 2022-11-28" \
235257
https://api.github.com/repos/rsksmart/devportal/pulls \
236-
-d "{\"title\":\"Liquidity-provider-server automated update of documentation ${BRANCH_NAME}\",\"body\":\"This PR updates the Devportal documentation with the latest changes from the Liquidity Provider Server repository.\",\"head\":\"${BRANCH_NAME}\",\"base\":\"main\"}"
258+
-d "{\"title\":\"Liquidity-provider-server automated update of documentation ${BRANCH_NAME}\",\"body\":\"This PR updates the Devportal documentation with the latest changes from the Liquidity Provider Server repository.\",\"head\":\"${BRANCH_NAME}\",\"base\":\"main\"}"

docs/Trusted-Accounts.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Liquidity Provider Trusted Accounts
2+
3+
## 🧠 Summary
4+
The **Liquidity Provider Trusted Accounts** feature extends the existing **Liquidity Provider Server (LPS)** and **FlyoverSDK** to allow Liquidity Providers (LPs) to configure a set of trusted Rootstock accounts that can bypass certain validation checks — such as the **reCAPTCHA** verification — during **PegIn** or **PegOut** operations.
5+
6+
This functionality is part of the **Flyover Protocol**, aimed at enabling automated integrations for partners and liquidity providers who operate frequently.
7+
8+
---
9+
10+
## 🏗 Architecture and Design
11+
12+
### Components
13+
This feature adds functionality to two existing components:
14+
1. **Liquidity Provider Server (LPS)** – Enables LPs to configure and manage trusted accounts with BTC/RBTC locking caps.
15+
2. **FlyoverSDK** – Provides new methods that allow integrators to sign and submit quotes authenticated by trusted accounts.
16+
17+
### Design Notes
18+
- Backward compatible with existing FlyoverSDK versions `>= v1.7.0` and LPS versions `>= v2.3.0`.
19+
- The account paying for the operation doesn’t need to be the same as the whitelisted account, but a valid signature of the quote hash from the trusted account must be provided.
20+
21+
---
22+
23+
## ⚙️ Setup and Configuration
24+
25+
### Environment Requirements
26+
- **FlyoverSDK:** `>= v1.70`
27+
- **LPS:** `>= v2.3.0`
28+
29+
### Configuration
30+
- The LP must configure authorized trusted accounts in their **LPS instance**.
31+
- No additional `.env` variables or feature flags are required.
32+
33+
---
34+
35+
## 🔌 API / Interface Details
36+
37+
### FlyoverSDK Methods
38+
39+
- `async acceptAuthenticatedQuote(quote: Quote, signature: string): Promise<AcceptedQuote>`: Accepts a PegIn quote authenticated by a trusted account’s signature.
40+
- `async acceptAuthenticatedPegoutQuote(quote: PegoutQuote, signature: string): Promise<AcceptedPegoutQuote>`: Accepts a PegOut quote authenticated by a trusted account’s signature.
41+
- `async signQuote(quote: Quote | PegoutQuote): Promise<string>`: Generates a valid signature for a given quote using the whitelisted Rootstock account.
42+
43+
### Input / Output
44+
Same input and output as `acceptQuote` and `acceptPegoutQuote`.
45+
The difference is that these methods require a **`signature`** parameter, obtained via:
46+
- The `signQuote()` SDK method, or
47+
- A manually created signature by the SDK integrator.
48+
49+
### Possible errors
50+
Both error types are raised as **`FlyoverError`** instances:
51+
| Error Scenario | Description |
52+
|----------------|--------------|
53+
| Invalid Signature | The provided signature does not match a whitelisted account. |
54+
| Locking Cap Exceeded | The account exceeded its assigned BTC/RBTC locking cap. |
55+
56+
---
57+
58+
## 🧭 Integration Guide
59+
60+
To integrate this feature:
61+
62+
1. Ensure you are using **FlyoverSDK >= v1.70**.
63+
2. Obtain a whitelisted Rootstock account from your Liquidity Provider.
64+
3. Use the SDK’s `signQuote` method to sign your quote hash.
65+
4. Use the authenticated accept method (`acceptAuthenticatedQuote` or `acceptAuthenticatedPegoutQuote`) with the quote and signature.
66+
5. The LP’s LPS instance will validate the signature against its trusted accounts configuration.
67+
68+
> 🔐 Only accounts whitelisted by an LP will be accepted.
69+
> Each account has a configured BTC/RBTC locking cap that restricts usage volume.
70+
71+
### Authentication
72+
Trust is based solely on account whitelisting and signature verification.
73+
74+
### Integration Entry Points
75+
- Primary integration via **FlyoverSDK**
76+
- No direct API calls required
77+
78+
---
79+
80+
## 🧪 Testing
81+
82+
### Local Testing Setup
83+
- Deploy a **local LPS instance**.
84+
- Configure one or more trusted accounts.
85+
- Test using the new SDK methods with valid and invalid signatures to validate expected behavior.
86+
87+
### Test Utilities
88+
Example tests and automation demos can be found in:
89+
🔗 [Flyover SDK Automation Demo](https://github.com/rsksmart/flyover-sdk/tree/main/utilities/pegin-pegout-automation-demo)
90+
91+
### Notes
92+
Follow the documentation in the above repository for commands and setup steps.
93+
94+
---
95+
96+
## 🧾 Changelog
97+
| Component | Version | Release Link |
98+
|------------|----------|---------------|
99+
| FlyoverSDK | v1.7.0 | [GitHub Release](https://github.com/rsksmart/flyover-sdk/releases/tag/v1.7.0) |
100+
| LPS | v2.3.0 | [GitHub Release](https://github.com/rsksmart/liquidity-provider-server/releases/tag/v2.3.0) |
101+
102+
---
103+
104+
## 📦 Related Resources
105+
- **Flyover SDK (npm):** [@rsksmart/flyover-sdk](https://www.npmjs.com/package/@rsksmart/flyover-sdk)
106+
- **GitHub Repo:** [Flyover SDK](https://github.com/rsksmart/flyover-sdk)

0 commit comments

Comments
 (0)