{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"codeGuideFiles":[],"seo":{"title":"P2C Subscription CLI ( rakurai-p2c )","description":"Learn how to work with Staking API for managing deposits, withdrawals, and stake pool information."},"dynamicMarkdocComponents":[],"metadata":{"type":"markdown"},"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"p2c-subscription-cli--rakurai-p2c-"},"children":["P2C Subscription CLI (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rakurai-p2c"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["This is how you keep your post-pack stream paid for."]}," Use it to see what a validator's subscription costs, check what you owe for past epochs, and top up before the grace window runs out and delivery stops. Updates missed while suspended are not replayed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It touches the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PSA"]}," only. Tips and backrun settlement are separate paths with separate tools."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audience:"]}," P2C User/Consumer (searchers / traders / services that consume Rakurai post-pack confirmations)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Program:"]}," Reward Distribution ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PSA"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["P2CSubscriptionAccount"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install: ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/cli/readme#2.-installation"},"children":["CLI overview"]},". How billing works on-chain: ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/programs/reward_distribution/readme#5.-psa--prepaid-fee-to-use-post-pack"},"children":["PSA"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1.-what-this-cli-is-about"},"children":["1. What this CLI is about"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Post-pack confirmations need a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["prepaid subscription escrow"]}," (PSA) per service name + validator vote. You keep that escrow funded; each epoch a stake-based fee is deducted from it. If the escrow runs dry and a deficit builds up, P2C access can move to grace and then stop until the shortfall is cleared."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This CLI is how ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["you"]}," manage funding for that escrow:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Read"]}," balance, total owed, status, and deficit (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-account"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-all-accounts"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Fund"]}," prepaid SOL (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]},", or a plain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["solana transfer"]}," to the PDA)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," MevShare revenue sharing. Sharing post-pack backrun profit uses an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MCA"]}," and ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/cli/partner_reward_settlement"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rakurai-revshare"]}]},". Post-pack product overview: ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.rakurai.io/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/post_pack/"},"children":["official guide"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PSA accounts are created by Rakurai / ops before you fund them."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2.-what-you-do-each-epoch"},"children":["2. What you do each epoch"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Keep the prepaid account funded ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["before"]}," the epoch ends (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["solana transfer"]}," to the PDA)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After the epoch, run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-account"]}," and check:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["balance after rent-exempt"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["total owed (excludes the current in-progress epoch)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["status (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Active"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["InGrace"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Suspended"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["deficit (shown only when greater than zero)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["underfunded alert (only when balance < owed for past epochs)"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If balance is low, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-all-accounts"]}," lists every subscription for the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--name"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--detail"]}," adds manager/auth and per-epoch owed rows."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2.1.-status-meanings"},"children":["2.1. Status meanings"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Active"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fees current; P2C eligible"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["InGrace"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recent underfunded periods within the grace window (default ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2"]}," epochs)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Suspended"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unpaid streak exceeded grace — ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["P2C access is stopped"]}," until the shortfall is cleared"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"danger","name":"Suspended stops the stream"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the status reaches ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Suspended"]},", the validator stops sending you post-pack updates. Funding the shortfall clears the deficit and restores delivery, but any updates missed while suspended are gone. Watch the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deficit"]}," field and top up before the streak reaches ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grace_epochs"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Owed always excludes the current epoch"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total owed"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]}," shortfall calculation cover ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["past epochs only"]},". The in-progress cluster epoch has not been priced yet, so a balance that looks sufficient today can still be short once the epoch closes."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3.-commands"},"children":["3. Commands"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"rakurai-p2c \\\n  --url <RPC_URL> \\\n  --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \\\n  --keypair <KEYPAIR> \\\n  <COMMAND>\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Global flags: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-k"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--keypair"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-u"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--url"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-p"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--program-id"]},"."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-account"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show one escrow (balance after rent-exempt, total owed, status, deficit if any)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-all-accounts"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List escrows for a service ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--name"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Top up prepaid SOL"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fund shortfalls for every underfunded PSA under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--name"]}," (excludes current epoch)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3.1.-get-account"},"children":["3.1. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-account"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["One escrow for one validator. Summary: pubkey, name, vote, status, balance after rent-exempt, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["total owed"]}," (past epochs only — current cluster epoch excluded), and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["deficit only if greater than zero"]},". An underfunded alert appears only when balance is below owed. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--detail"]}," adds manager/auth, commission, and per-epoch rows (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["due"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deducted"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["owed"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimed"]},")."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"rakurai-p2c \\\n  --url <RPC_URL> \\\n  --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \\\n  get-account \\\n  --name <SERVICE_NAME> \\\n  --vote-pubkey <VALIDATOR_VOTE_PUBKEY>\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3.2.-get-all-accounts"},"children":["3.2. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-all-accounts"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"rakurai-p2c \\\n  --url <RPC_URL> \\\n  --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \\\n  get-all-accounts \\\n  --name <SERVICE_NAME>\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3.3.-fund"},"children":["3.3. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"rakurai-p2c \\\n  --url <RPC_URL> \\\n  --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \\\n  --keypair <FUNDER_KEYPAIR> \\\n  fund \\\n  --name <SERVICE_NAME> \\\n  --vote-pubkey <VALIDATOR_VOTE_PUBKEY> \\\n  --amount <LAMPORTS>\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Anyone may also fund the PDA with a plain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["solana transfer"]}," into the escrow address."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3.4.-fund-all"},"children":["3.4. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Funds the shortfall (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["owed − balance"]},") for every underfunded PSA with the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--name"]},". Owed excludes the current cluster epoch. Skips accounts that already cover past-epoch due."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"rakurai-p2c \\\n  --url <RPC_URL> \\\n  --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \\\n  --keypair <FUNDER_KEYPAIR> \\\n  fund-all \\\n  --name <SERVICE_NAME>\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--batch-size"]}," (default 10) controls fund instructions per transaction. Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}," to preview."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"appendix-program-ids"},"children":["Appendix: Program IDs"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Cluster"},"children":["Cluster"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Reward Distribution program"},"children":["Reward Distribution program"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mainnet"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RAkd1EJg45QQHeuXy7JEWBhdNvsd64Z5PbZJWQT96iB"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Testnet"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A37zgM34Q43gKAxBWQ9zSbQRRhjPqGK8jM49H7aWqNVB"]}]}]}]}]}]}]},"headings":[{"value":"P2C Subscription CLI ( rakurai-p2c )","id":"p2c-subscription-cli--rakurai-p2c-","depth":1},{"value":"1. What this CLI is about","id":"1.-what-this-cli-is-about","depth":2},{"value":"2. What you do each epoch","id":"2.-what-you-do-each-epoch","depth":2},{"value":"2.1. Status meanings","id":"2.1.-status-meanings","depth":3},{"value":"3. Commands","id":"3.-commands","depth":2},{"value":"3.1. get-account","id":"3.1.-get-account","depth":3},{"value":"3.2. get-all-accounts","id":"3.2.-get-all-accounts","depth":3},{"value":"3.3. fund","id":"3.3.-fund","depth":3},{"value":"3.4. fund-all","id":"3.4.-fund-all","depth":3},{"value":"Appendix: Program IDs","id":"appendix-program-ids","depth":2}],"frontmatter":{"seo":{"title":"P2C Subscription CLI ( rakurai-p2c )"}},"lastModified":"2026-09-08T10:33:30.000Z"},"slug":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/cli/p2c_subscription","userData":{"isAuthenticated":false,"teams":["anonymous"]}}