Skip to content

Commit 56af48e

Browse files
committed
add pkp minting row
1 parent eda6ed3 commit 56af48e

File tree

3 files changed

+100
-2
lines changed

3 files changed

+100
-2
lines changed

docs/learning-lit/pricing/current-prices.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CurrentPricesTable } from "/snippets/CurrentPricesTable.jsx";
66
The following table shows the current pricing for Lit Protocol services on the **Naga Prod / Mainnet V1** network. Prices are displayed in both $LITKEY tokens and USD (based on current market rates).
77

88
<Note>
9-
Prices update dynamically based on network usage. The values shown below reflect real-time prices fetched from the blockchain.
9+
Most prices update dynamically based on network usage. The values shown below reflect real-time prices fetched from the blockchain. Note that PKP Minting cost is static and does not change with network utilization.
1010
</Note>
1111

1212
<CurrentPricesTable />
@@ -25,6 +25,7 @@ Prices update dynamically based on network usage. The values shown below reflect
2525
- **Decryption and Access Control**: Decrypting data and enforcing access control conditions
2626
- **Lit Action**: Executing serverless JavaScript functions (pricing varies by component)
2727
- **Sign Session Key**: Session-based signing operations
28+
- **PKP Minting**: Creating a new Programmable Key Pair (static price, does not vary with network usage)
2829

2930
### Lit Action Pricing Components
3031

docs/learning-lit/pricing/payment-model.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ For detailed information on current pricing, see the [Current Prices](/learning-
6060
There are additional costs associated with using Lit Protocol's services that are not covered by the network usage payments. These include:
6161

6262
- **Gas on Lit Chain** - Lit Chain is the database for Lit network. When you make a transaction on Lit Chain, you will need to pay for the gas used by the transaction. Examples of operations that would require a transaction on Lit Chain are things like changing PKP Permissions, transferring PKPs, and launching smart contracts on Lit Chain. Lit Chain gas is priced in $LITKEY tokens and the gas price is very low compared to other chains.
63-
- **PKP Minting** - When you mint a new PKP, you will need to pay a specific fee for the minting operation. Check out the [Current Prices page](/learning-lit/pricing/current-prices) to see the price right now.
63+
- **PKP Minting** - When you mint a new PKP, you will need to pay a specific fee for the minting operation. This fee is not dynamic and is a fixed cost. Check out the [Current Prices page](/learning-lit/pricing/current-prices) to see the price right now.

docs/snippets/CurrentPricesTable.jsx

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
33
export const CurrentPricesTable = () => {
44
// Constants - defined inside component for Mintlify compatibility
55
const NAGA_PROD_PRICE_FEED_ADDRESS = '0x88F5535Fa6dA5C225a3C06489fE4e3405b87608C';
6+
const NAGA_PROD_PKP_ADDRESS = '0xaeEA5fE3654919c8Bb2b356aDCb5dF4eC082C168';
67
const RPC_URL = 'https://lit-chain-rpc.litprotocol.com/';
78

89
// Product IDs
@@ -166,6 +167,23 @@ export const CurrentPricesTable = () => {
166167
},
167168
];
168169

170+
// PKP Contract ABI (for mintCost)
171+
const PKP_ABI = [
172+
{
173+
inputs: [],
174+
name: 'mintCost',
175+
outputs: [
176+
{
177+
internalType: 'uint256',
178+
name: '',
179+
type: 'uint256',
180+
},
181+
],
182+
stateMutability: 'view',
183+
type: 'function',
184+
},
185+
];
186+
169187
// Helper functions
170188
const getLitKeyPrice = async () => {
171189
try {
@@ -207,6 +225,7 @@ export const CurrentPricesTable = () => {
207225
const [litActionConfigs, setLitActionConfigs] = useState([]);
208226
const [litKeyPriceUSD, setLitKeyPriceUSD] = useState(null);
209227
const [usagePercent, setUsagePercent] = useState(null);
228+
const [pkpMintCost, setPkpMintCost] = useState(null);
210229
const [ethersLoaded, setEthersLoaded] = useState(false);
211230

212231
// Load ethers from CDN
@@ -255,6 +274,7 @@ export const CurrentPricesTable = () => {
255274
const { ethers } = window;
256275
const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
257276
const contract = new ethers.Contract(NAGA_PROD_PRICE_FEED_ADDRESS, PRICE_FEED_ABI, provider);
277+
const pkpContract = new ethers.Contract(NAGA_PROD_PKP_ADDRESS, PKP_ABI, provider);
258278

259279
const priceUSD = await getLitKeyPrice();
260280
setLitKeyPriceUSD(priceUSD);
@@ -268,6 +288,10 @@ export const CurrentPricesTable = () => {
268288

269289
const litActionConfigsResult = await contract.getLitActionPriceConfigs();
270290

291+
// Fetch PKP minting cost (static price)
292+
const mintCostResult = await pkpContract.mintCost();
293+
setPkpMintCost(mintCostResult);
294+
271295
setBasePrices(basePricesResult);
272296
setMaxPrices(maxPricesResult);
273297
setCurrentPrices(currentPricesResult);
@@ -435,6 +459,79 @@ export const CurrentPricesTable = () => {
435459
</tr>
436460
);
437461
})}
462+
{pkpMintCost !== null && (
463+
<tr>
464+
<td
465+
style={{
466+
padding: '8px 6px 8px 8px',
467+
border: '1px solid #ddd',
468+
fontWeight: '500',
469+
fontSize: '0.9em',
470+
}}
471+
>
472+
PKP Minting{' '}
473+
<span
474+
style={{
475+
color: '#666',
476+
fontSize: '0.85em',
477+
fontWeight: 'normal',
478+
fontStyle: 'italic',
479+
}}
480+
>
481+
(Static)
482+
</span>
483+
</td>
484+
<td
485+
style={{
486+
padding: '8px 10px',
487+
textAlign: 'right',
488+
border: '1px solid #ddd',
489+
fontFamily: 'monospace',
490+
fontWeight: '600',
491+
fontSize: '0.85em',
492+
}}
493+
>
494+
{formatPrice(
495+
weiToTokens(pkpMintCost, window.ethers),
496+
litKeyPriceUSD
497+
? weiToTokens(pkpMintCost, window.ethers) * litKeyPriceUSD
498+
: null
499+
)}
500+
</td>
501+
<td
502+
style={{
503+
padding: '8px 10px',
504+
textAlign: 'right',
505+
border: '1px solid #ddd',
506+
fontFamily: 'monospace',
507+
fontSize: '0.85em',
508+
}}
509+
>
510+
{formatPrice(
511+
weiToTokens(pkpMintCost, window.ethers),
512+
litKeyPriceUSD
513+
? weiToTokens(pkpMintCost, window.ethers) * litKeyPriceUSD
514+
: null
515+
)}
516+
</td>
517+
<td
518+
style={{
519+
padding: '8px 10px',
520+
textAlign: 'right',
521+
border: '1px solid #ddd',
522+
fontFamily: 'monospace',
523+
fontSize: '0.85em',
524+
}}
525+
>
526+
{formatPrice(
527+
weiToTokens(pkpMintCost, window.ethers),
528+
litKeyPriceUSD
529+
? weiToTokens(pkpMintCost, window.ethers) * litKeyPriceUSD
530+
: null
531+
)}
532+
</td>
533+
</tr>
534+
)}
438535
</tbody>
439536
</table>
440537
</div>

0 commit comments

Comments
 (0)