🌊
Seabed Labs
  • ⛓️Open Source Primitives
    • 💳Pre-Authorized Debit V1
      • 📜Program
        • ⛓️Deployments
        • ⚓Anchor IDL
        • 💾Account Model
          • 👮Smart Delegate
          • 💳Pre Authorization
        • ⚙️Instructions
          • 👮Init Smart Delegate
          • 💳Init Pre Authorization
          • 💳Close Pre Authorization
          • 💳Update Pause Pre Authorization
          • 🪙Debit
      • 🛠️Typescript SDK
        • 📘Read Client
        • ⚓Instruction Factory
        • ⚙️Transaction Factory
      • 🖥️Web UI
Powered by GitBook
On this page
  1. Open Source Primitives
  2. Pre-Authorized Debit V1
  3. Program
  4. Instructions

Init Smart Delegate

PreviousInstructionsNextInit Pre Authorization

Last updated 1 year ago

pub struct InitSmartDelegate<'info> {
    #[account(mut)]
    pub payer: Signer<'info>,

    #[account(
        init,
        seeds = [
            b"smart-delegate",
        ],
        bump,
        space = 8 + SmartDelegate::INIT_SPACE,
        payer = payer,
    )]
    pub smart_delegate: Account<'info, SmartDelegate>,

    pub system_program: Program<'info, System>,
}

This instruction is used to create the singleton . Anyone can call this instruction as it's only meant to be done once. In practice, our team will initialize the smart delegate using this for each instance of the program (the addresses can be found in the account page linked earlier).

⛓️
💳
📜
⚙️
👮
Github Source
Smart Delegate account