{
  "address": "pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt",
  "metadata": {
    "name": "pyth_lazer_solana_contract",
    "version": "0.4.2",
    "spec": "0.1.0",
    "description": "Pyth Lazer Solana contract and SDK.",
    "repository": "https://github.com/pyth-network/pyth-crosschain"
  },
  "instructions": [
    {
      "name": "initialize",
      "discriminator": [
        175,
        175,
        109,
        31,
        13,
        152,
        155,
        237
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "storage",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  116,
                  111,
                  114,
                  97,
                  103,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "top_authority",
          "type": "pubkey"
        },
        {
          "name": "treasury",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update",
      "discriminator": [
        219,
        200,
        88,
        176,
        158,
        63,
        253,
        127
      ],
      "accounts": [
        {
          "name": "top_authority",
          "signer": true,
          "relations": [
            "storage"
          ]
        },
        {
          "name": "storage",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  116,
                  111,
                  114,
                  97,
                  103,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "trusted_signer",
          "type": "pubkey"
        },
        {
          "name": "expires_at",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_ecdsa_signer",
      "discriminator": [
        22,
        110,
        222,
        141,
        112,
        219,
        27,
        200
      ],
      "accounts": [
        {
          "name": "top_authority",
          "signer": true,
          "relations": [
            "storage"
          ]
        },
        {
          "name": "storage",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  116,
                  111,
                  114,
                  97,
                  103,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "trusted_signer",
          "type": {
            "array": [
              "u8",
              20
            ]
          }
        },
        {
          "name": "expires_at",
          "type": "i64"
        }
      ]
    },
    {
      "name": "verify_ecdsa_message",
      "discriminator": [
        207,
        170,
        89,
        179,
        216,
        67,
        129,
        146
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "storage",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  116,
                  111,
                  114,
                  97,
                  103,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true,
          "relations": [
            "storage"
          ]
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "message_data",
          "type": "bytes"
        }
      ]
    },
    {
      "name": "verify_message",
      "docs": [
        "Verifies a ed25519 signature on Solana by checking that the transaction contains",
        "a correct call to the built-in `ed25519_program`.",
        "",
        "- `message_data` is the signed message that is being verified.",
        "- `ed25519_instruction_index` is the index of the `ed25519_program` instruction",
        "within the transaction. This instruction must precede the current instruction.",
        "- `signature_index` is the index of the signature within the inputs to the `ed25519_program`.",
        "- `message_offset` is the offset of the signed message within the",
        "input data for the current instruction."
      ],
      "discriminator": [
        180,
        193,
        120,
        55,
        189,
        135,
        203,
        83
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "storage",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  116,
                  111,
                  114,
                  97,
                  103,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "treasury",
          "writable": true,
          "relations": [
            "storage"
          ]
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions_sysvar",
          "docs": [
            "(e.g. in `sysvar::instructions::load_instruction_at_checked`).",
            "This account is not usable with anchor's `Program` account type because it's not executable."
          ]
        }
      ],
      "args": [
        {
          "name": "message_data",
          "type": "bytes"
        },
        {
          "name": "ed25519_instruction_index",
          "type": "u16"
        },
        {
          "name": "signature_index",
          "type": "u8"
        }
      ],
      "returns": {
        "defined": {
          "name": "VerifiedMessage"
        }
      }
    }
  ],
  "accounts": [
    {
      "name": "Storage",
      "discriminator": [
        209,
        117,
        255,
        185,
        196,
        175,
        68,
        9
      ]
    }
  ],
  "types": [
    {
      "name": "Storage",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "top_authority",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "single_update_fee_in_lamports",
            "type": "u64"
          },
          {
            "name": "num_trusted_signers",
            "type": "u8"
          },
          {
            "name": "trusted_signers",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "TrustedSignerInfo",
                    "generics": [
                      {
                        "kind": "type",
                        "type": "pubkey"
                      }
                    ]
                  }
                },
                5
              ]
            }
          },
          {
            "name": "num_trusted_ecdsa_signers",
            "type": "u8"
          },
          {
            "name": "trusted_ecdsa_signers",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "TrustedSignerInfo",
                    "generics": [
                      {
                        "kind": "type",
                        "type": {
                          "array": [
                            "u8",
                            20
                          ]
                        }
                      }
                    ]
                  }
                },
                2
              ]
            }
          },
          {
            "name": "_extra_space",
            "type": {
              "array": [
                "u8",
                43
              ]
            }
          }
        ]
      }
    },
    {
      "name": "TrustedSignerInfo",
      "generics": [
        {
          "kind": "type",
          "name": "T"
        }
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "type": {
              "generic": "T"
            }
          },
          {
            "name": "expires_at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "VerifiedMessage",
      "docs": [
        "A message with a verified ed25519 signature."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "public_key",
            "docs": [
              "Public key that signed the message."
            ],
            "type": "pubkey"
          },
          {
            "name": "payload",
            "docs": [
              "Signed message payload."
            ],
            "type": "bytes"
          }
        ]
      }
    }
  ]
}
