Skip to content

Commit 216dbad

Browse files
authored
added prettier (#456)
1 parent 0e5cf98 commit 216dbad

File tree

93 files changed

+3532
-1742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3532
-1742
lines changed

.prettierrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
proseWrap: always

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
### 👩‍💻 Development
44

5-
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
5+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview
6+
the documentation changes locally. To install, use the following command
67

78
```
89
npm i -g mintlify

api-reference/overview/authentication.mdx

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@ description: "Learn more about Livepeer's API."
44
icon: "lock"
55
---
66

7-
Livepeer API uses API keys to verify and authorize requests. You can manage and review your API keys through Livepeer Studio. You need to pass your API key in the `Authorization` header with a `Bearer` prefix while sending a request.
7+
Livepeer API uses API keys to verify and authorize requests. You can manage and
8+
review your API keys through Livepeer Studio. You need to pass your API key in
9+
the `Authorization` header with a `Bearer` prefix while sending a request.
810

911
```
1012
Bearer YOUR_API_KEY
1113
```
1214

13-
It's important to note that your API keys come with significant privileges, so it's essential to keep them safe and secure! Refrain from sharing your secret API keys in GitHub or other publicly accessible places.
15+
It's important to note that your API keys come with significant privileges, so
16+
it's essential to keep them safe and secure! Refrain from sharing your secret
17+
API keys in GitHub or other publicly accessible places.
1418

15-
By default, API keys can only be used from a backend server. This is to ensure maximum security and prevent that you accidentally expose your account by including the secret API key in a public web page.
19+
By default, API keys can only be used from a backend server. This is to ensure
20+
maximum security and prevent that you accidentally expose your account by
21+
including the secret API key in a public web page.
1622

1723
### CORS-Enabled Keys
1824

@@ -21,16 +27,22 @@ By default, API keys can only be used from a backend server. This is to ensure m
2127
API keys. **There is a different security model for CORS keys.**
2228
</Warning>
2329

24-
Studio supports the creation of CORS-enabled API keys. This is a special option when generating an API key which allows a webpage to make requests **directly**
30+
Studio supports the creation of CORS-enabled API keys. This is a special option
31+
when generating an API key which allows a webpage to make requests **directly**
2532
to Studio, as opposed to coming from your backend.
2633

2734
#### Security with CORS Keys
2835

29-
**The security model is different for CORS-enabled API keys.** Since any user has access to these keys, the IDs of assets and streams **must** be kept
30-
secret from anyone who should not have admin control over them. For instance, a viewer should only have access to the playback ID, since
31-
knowing the asset ID (together with the CORS-enabled API key, which is embedded in the webpage) allows them to make changes to the asset.
32-
33-
This is the same for streams - if a user has access to a stream ID alongside the CORS API key, they can modify the stream or view the stream key.
34-
If a viewer had access to the stream ID + CORS API key, they could hijack the stream. **A `playbackId` should be exposed to the viewer only.**
36+
**The security model is different for CORS-enabled API keys.** Since any user
37+
has access to these keys, the IDs of assets and streams **must** be kept secret
38+
from anyone who should not have admin control over them. For instance, a viewer
39+
should only have access to the playback ID, since knowing the asset ID (together
40+
with the CORS-enabled API key, which is embedded in the webpage) allows them to
41+
make changes to the asset.
42+
43+
This is the same for streams - if a user has access to a stream ID alongside the
44+
CORS API key, they can modify the stream or view the stream key. If a viewer had
45+
access to the stream ID + CORS API key, they could hijack the stream. **A
46+
`playbackId` should be exposed to the viewer only.**
3547

3648
<Frame>![cors api key](/images/quickstart/cors.png)</Frame>

api-reference/overview/introduction.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ description: "Learn more about Livepeer's API."
44
icon: "hand-wave"
55
---
66

7-
Welcome to the Livepeer API reference docs! Here you'll find all the endpoints exposed on the standard Livepeer API, learn how to use them and what they return.
7+
Welcome to the Livepeer API reference docs! Here you'll find all the endpoints
8+
exposed on the standard Livepeer API, learn how to use them and what they
9+
return.
810

9-
The Livepeer API is organized around REST, has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
11+
The Livepeer API is organized around REST, has predictable resource-oriented
12+
URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and
13+
uses standard HTTP response codes, authentication, and verbs.

delegators/guides/bridge-lpt-to-arbitrum.mdx

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,21 @@ title: Bridge LPT to Arbitrum
33
icon: bridge
44
---
55

6-
This guide will walk tokenholders through the process of moving LPT from the Ethereum mainnet to Arbitrum and vice versa.
6+
This guide will walk tokenholders through the process of moving LPT from the
7+
Ethereum mainnet to Arbitrum and vice versa.
78

8-
**This only applies if you have not delegated your LPT to an orchestrator on L1**
9+
**This only applies if you have not delegated your LPT to an orchestrator on
10+
L1**
911

10-
Please note that you will need some ETH in your wallet to complete this guide. If you are using testnet, you will need Rinkeby ETH.
12+
Please note that you will need some ETH in your wallet to complete this guide.
13+
If you are using testnet, you will need Rinkeby ETH.
1114

12-
1. Make sure your wallet (i.e. Metamask) is connected to the Ethereum mainnet (Rinkeby if using testnet) and then navigate to the [Arbitrum Bridge](https://bridge.arbitrum.io/)
13-
2. Click "Token", and enter the L1 LPT contract address 0x58b6a8a3302369daec383334672404ee733ab239. If you are using testnet, use the `LivepeerToken` address for Rinkeby.
15+
1. Make sure your wallet (i.e. Metamask) is connected to the Ethereum mainnet
16+
(Rinkeby if using testnet) and then navigate to the
17+
[Arbitrum Bridge](https://bridge.arbitrum.io/)
18+
2. Click "Token", and enter the L1 LPT contract address
19+
0x58b6a8a3302369daec383334672404ee733ab239. If you are using testnet, use the
20+
`LivepeerToken` address for Rinkeby.
1421

1522
<Frame>
1623
![BridgeClickToken](https://user-images.githubusercontent.com/89408276/155851894-eb959beb-3269-40b1-8d50-8768bf15f9f2.jpg)
@@ -22,15 +29,19 @@ Please note that you will need some ETH in your wallet to complete this guide. I
2229
![BridgeChooseToken-Enter](https://user-images.githubusercontent.com/89408276/155851630-8e60a17a-b6bd-4a65-972c-53d34c600026.jpg)
2330
</Frame>
2431

25-
6. Select LPT from the dropdown. Once you've done this, you should see your L1 balance.
26-
7. Click `Deposit` to move your L1 LPT to L2. This will initiate an Approval transaction. The first of 2 transactions required to bridge LPT to Arbitrum.
27-
8. After the Approval transaction status changes from pending to success (about 10 mins) LPT can now be Deposited.
32+
6. Select LPT from the dropdown. Once you've done this, you should see your L1
33+
balance.
34+
7. Click `Deposit` to move your L1 LPT to L2. This will initiate an Approval
35+
transaction. The first of 2 transactions required to bridge LPT to Arbitrum.
36+
8. After the Approval transaction status changes from pending to success (about
37+
10 mins) LPT can now be Deposited.
2838

2939
<Frame>
3040
![BridgeApprove](https://user-images.githubusercontent.com/89408276/155850572-2337514c-f6ad-419a-a9bf-94e7d3e1d891.jpg)
3141
</Frame>
3242

33-
10. Click 'Deposit' and confirm the transaction in your wallet to complete the bridging of LPT from L1 to L2
43+
10. Click 'Deposit' and confirm the transaction in your wallet to complete the
44+
bridging of LPT from L1 to L2
3445

3546
<Frame>
3647
![Bridge](https://user-images.githubusercontent.com/89408276/155375033-6fd66e8a-53ab-43e9-9fe6-3a0cec847a55.jpg)
@@ -40,24 +51,50 @@ Please note that you will need some ETH in your wallet to complete this guide. I
4051

4152
The same general instructions apply with three differences:
4253

43-
- You should start with your wallet connected to Arbitrum (Arbitrum Rinkeby if using testnet)
44-
- You will need to manually approve the amount that you are bridging using the [Arbiscan UI](https://arbiscan.io/address/0x289ba1701C2F088cf0faf8B3705246331cB8A839#writeContract). To do so, connect your wallet, scroll to the Approve function, enter the L2LPTGateway address [0x6D2457a4ad276000A615295f7A80F79E48CcD318](https://arbiscan.io/address/0x6D2457a4ad276000A615295f7A80F79E48CcD318) and the amount you'll be transferring and click "Write". Note that the amount is in "Wei", so use a [Unit Converter](https://etherscan.io/unitconverter) (e.g. if you want to bridge 10 LPT, you need to enter 10000000000000000000).
45-
- We are looking into options to remove this step. If it seems complex, we recommend swapping to ETH via [Uniswap](https://app.uniswap.org/#/swap?chain=arbitrum) and then transferring the ETH from L2 to L1 instead.
46-
- Next, click on the arrow below the amount input. The button will switch from "Deposit" to "Withdraw"
47-
- Click on "Token" -> "Manage token lists" -> enable "Arbed CMC List" and click on "Back to Select Token". You should now be able to choose LPT in the list.
48-
- After you've sent the withdraw tx, you need to wait ~1 week until you can claim your LPT on L1. You'll see the countdown below. Once the confirmation period is over, you can connect to the Ethereum mainnet and click "Claim" to withdraw your LPT on L1.
54+
- You should start with your wallet connected to Arbitrum (Arbitrum Rinkeby if
55+
using testnet)
56+
- You will need to manually approve the amount that you are bridging using the
57+
[Arbiscan UI](https://arbiscan.io/address/0x289ba1701C2F088cf0faf8B3705246331cB8A839#writeContract).
58+
To do so, connect your wallet, scroll to the Approve function, enter the
59+
L2LPTGateway address
60+
[0x6D2457a4ad276000A615295f7A80F79E48CcD318](https://arbiscan.io/address/0x6D2457a4ad276000A615295f7A80F79E48CcD318)
61+
and the amount you'll be transferring and click "Write". Note that the amount
62+
is in "Wei", so use a [Unit Converter](https://etherscan.io/unitconverter)
63+
(e.g. if you want to bridge 10 LPT, you need to enter 10000000000000000000).
64+
- We are looking into options to remove this step. If it seems complex, we
65+
recommend swapping to ETH via
66+
[Uniswap](https://app.uniswap.org/#/swap?chain=arbitrum) and then
67+
transferring the ETH from L2 to L1 instead.
68+
- Next, click on the arrow below the amount input. The button will switch from
69+
"Deposit" to "Withdraw"
70+
- Click on "Token" -> "Manage token lists" -> enable "Arbed CMC List" and click
71+
on "Back to Select Token". You should now be able to choose LPT in the list.
72+
- After you've sent the withdraw tx, you need to wait ~1 week until you can
73+
claim your LPT on L1. You'll see the countdown below. Once the confirmation
74+
period is over, you can connect to the Ethereum mainnet and click "Claim" to
75+
withdraw your LPT on L1.
4976

5077
### Bridging Failures
5178

52-
The Arbitrum rollup can fail to bridge tokens correctly if the gas prices are fluctuating by too much, or if the transaction runs out of gas. The former can be caused by gas prices changing from when the original "bridge" transaction was submitted, to when it was sequenced and submitted on L2. In this case, tokens will not reach your L2 wallet after an hour. Arbitrum [provides a page](https://retryable-tx-panel.arbitrum.io/) to check on the status of your L1 deposit transaction:
79+
The Arbitrum rollup can fail to bridge tokens correctly if the gas prices are
80+
fluctuating by too much, or if the transaction runs out of gas. The former can
81+
be caused by gas prices changing from when the original "bridge" transaction was
82+
submitted, to when it was sequenced and submitted on L2. In this case, tokens
83+
will not reach your L2 wallet after an hour. Arbitrum
84+
[provides a page](https://retryable-tx-panel.arbitrum.io/) to check on the
85+
status of your L1 deposit transaction:
5386

5487
<Frame>![Arbitrum UI](/images/delegating-guides/arbitrum-retry-ui.png)</Frame>
5588

56-
In the event of a failure of LPT to bridge due to gas spikes, you should see a message similar to the following:
89+
In the event of a failure of LPT to bridge due to gas spikes, you should see a
90+
message similar to the following:
5791

5892
<Frame>
5993
![Arbitrum
6094
UI](https://user-images.githubusercontent.com/23727056/176745651-98ff56d0-9c0a-4c2d-b9fe-bf3ba1d537a7.png)
6195
</Frame>
6296

63-
You should then be able to connect your wallet and resubmit the bridge transaction. This will retry the previous transaction. Make sure to do this in a timely manner, since the [L2 retry buffer is limited](https://docs.arbitrum.io/arbos/l1-to-l2-messaging).
97+
You should then be able to connect your wallet and resubmit the bridge
98+
transaction. This will retry the previous transaction. Make sure to do this in a
99+
timely manner, since the
100+
[L2 retry buffer is limited](https://docs.arbitrum.io/arbos/l1-to-l2-messaging).

delegators/guides/migrate-stake-to-arbitrum.mdx

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ title: Migrate stake to Arbitrum
33
icon: right-from-bracket
44
---
55

6-
This guide is applicable to delegators who delegated their LPT to an orchestrator on the Ethereum mainnet prior to February 14th, 2022. Once you have successfully completed the migration, this guide is no longer applicable and you will use Arbitrum in lieu of Ethereum Mainnet for all protocol actions.
6+
This guide is applicable to delegators who delegated their LPT to an
7+
orchestrator on the Ethereum mainnet prior to February 14th, 2022. Once you have
8+
successfully completed the migration, this guide is no longer applicable and you
9+
will use Arbitrum in lieu of Ethereum Mainnet for all protocol actions.
710

811
<Warning>
912
Claiming your delegated stake and earned ETH on Arbitrum is highly encouraged
@@ -16,13 +19,22 @@ This guide is applicable to delegators who delegated their LPT to an orchestrato
1619

1720
## Prerequisites for all chains
1821

19-
- Before using this guide, you will need make sure your Arbitrum wallet has enough arbETH to cover gas for the `claim` transaction. If you do not have arbETH in your wallet, you will need to add some using one of the bridges or on-ramps listed [here](https://portal.arbitrum.one/).
22+
- Before using this guide, you will need make sure your Arbitrum wallet has
23+
enough arbETH to cover gas for the `claim` transaction. If you do not have
24+
arbETH in your wallet, you will need to add some using one of the bridges or
25+
on-ramps listed [here](https://portal.arbitrum.one/).
2026
- The migration must be completed using the Livepeer explorer
21-
- **If you use a contract account rather than an EOA**: You will need to interact directly with the Migrator contract methods. Please use the guide [here](/orchestrators/guides/migrate-from-contract-wallet). _If you don’t know what this means, it probably doesn’t apply to you._
27+
- **If you use a contract account rather than an EOA**: You will need to
28+
interact directly with the Migrator contract methods. Please use the guide
29+
[here](/orchestrators/guides/migrate-from-contract-wallet). _If you don’t know
30+
what this means, it probably doesn’t apply to you._
2231

2332
## Claiming via the Explorer
2433

25-
1. Navigate to the [Livepeer Explorer](http://explorer.livepeer.org). If you have not connected the wallet that you used to delegate your LPT, connect it using the prompt in the upper left hand corner. If you haven't switched your network to Arbitrum, you'll be prompted to do so.
34+
1. Navigate to the [Livepeer Explorer](http://explorer.livepeer.org). If you
35+
have not connected the wallet that you used to delegate your LPT, connect it
36+
using the prompt in the upper left hand corner. If you haven't switched your
37+
network to Arbitrum, you'll be prompted to do so.
2638

2739
<Frame>
2840
<img
@@ -44,7 +56,8 @@ This guide is applicable to delegators who delegated their LPT to an orchestrato
4456

4557
2. **Claim your stake, rewards, and fees**
4658

47-
Click `Claim` to initiate a transaction that will claim your stake, rewards and fees.
59+
Click `Claim` to initiate a transaction that will claim your stake, rewards
60+
and fees.
4861

4962
<Frame>
5063
<img
@@ -62,6 +75,9 @@ This guide is applicable to delegators who delegated their LPT to an orchestrato
6275

6376
3. **View your profile**
6477

65-
Once the `claim` transaction has been confirmed (this usually takes a few seconds on Arbitrum), you see a link to your profile. Here, you'll be able to see your newly claimed balances.
78+
Once the `claim` transaction has been confirmed (this usually takes a few
79+
seconds on Arbitrum), you see a link to your profile. Here, you'll be able
80+
to see your newly claimed balances.
6681

67-
You will see an [Arbiscan](https://arbiscan.io/) link to the transaction id in case you want to look at the submitted transaction.
82+
You will see an [Arbiscan](https://arbiscan.io/) link to the transaction id
83+
in case you want to look at the submitted transaction.

0 commit comments

Comments
 (0)