{
  "address": "po1iCYakK3gHCLbuju4wGzFowTMpAJxkqK1iwUqMonY",
  "metadata": {
    "name": "glam_policies",
    "version": "1.0.1",
    "spec": "0.1.0",
    "description": "GLAM policies program"
  },
  "instructions": [
    {
      "name": "close_extra_metas_account",
      "discriminator": [
        67,
        72,
        24,
        239,
        222,
        207,
        240,
        177
      ],
      "accounts": [
        {
          "name": "extra_metas_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  120,
                  116,
                  114,
                  97,
                  45,
                  97,
                  99,
                  99,
                  111,
                  117,
                  110,
                  116,
                  45,
                  109,
                  101,
                  116,
                  97,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "destination",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "close_policy",
      "discriminator": [
        55,
        42,
        248,
        229,
        222,
        138,
        26,
        252
      ],
      "accounts": [
        {
          "name": "policy_account",
          "docs": [
            "lamports will be refunded to the owner"
          ],
          "writable": true
        },
        {
          "name": "signer",
          "writable": true,
          "signer": true
        },
        {
          "name": "subject",
          "writable": true,
          "relations": [
            "policy_account"
          ]
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "create_policy",
      "discriminator": [
        27,
        81,
        33,
        27,
        196,
        103,
        246,
        53
      ],
      "accounts": [
        {
          "name": "policy_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  99,
                  99,
                  111,
                  117,
                  110,
                  116,
                  45,
                  112,
                  111,
                  108,
                  105,
                  99,
                  121
                ]
              },
              {
                "kind": "account",
                "path": "subject_token_account"
              }
            ]
          }
        },
        {
          "name": "authority",
          "docs": [
            "Must be the mint authority or permanent delegate"
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "subject"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "mint"
        },
        {
          "name": "subject_token_account"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "locked_until",
          "type": "u64"
        },
        {
          "name": "time_unit",
          "type": {
            "defined": {
              "name": "TimeUnit"
            }
          }
        }
      ]
    },
    {
      "name": "execute",
      "discriminator": [
        105,
        37,
        101,
        197,
        75,
        251,
        102,
        26
      ],
      "accounts": [
        {
          "name": "src_account"
        },
        {
          "name": "mint"
        },
        {
          "name": "dst_account"
        },
        {
          "name": "src_account_authority"
        },
        {
          "name": "extra_metas_account",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  120,
                  116,
                  114,
                  97,
                  45,
                  97,
                  99,
                  99,
                  111,
                  117,
                  110,
                  116,
                  45,
                  109,
                  101,
                  116,
                  97,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "src_policy_account"
        },
        {
          "name": "dst_policy_account"
        }
      ],
      "args": [
        {
          "name": "_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "initialize_extra_metas_account",
      "discriminator": [
        43,
        34,
        13,
        49,
        167,
        88,
        235,
        235
      ],
      "accounts": [
        {
          "name": "extra_metas_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  120,
                  116,
                  114,
                  97,
                  45,
                  97,
                  99,
                  99,
                  111,
                  117,
                  110,
                  116,
                  45,
                  109,
                  101,
                  116,
                  97,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "metas",
          "type": {
            "vec": {
              "defined": {
                "name": "AnchorExtraAccountMeta"
              }
            }
          }
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "PolicyAccount",
      "discriminator": [
        218,
        201,
        183,
        164,
        156,
        127,
        81,
        175
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "InvalidSourcePolicyAccount",
      "msg": "Invalid source policy account"
    },
    {
      "code": 6001,
      "name": "LockUp",
      "msg": "Policy violation: lock-up has not expired"
    },
    {
      "code": 6002,
      "name": "NotAuthorized",
      "msg": "Not authorized"
    }
  ],
  "types": [
    {
      "name": "AnchorExtraAccountMeta",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "discriminator",
            "type": "u8"
          },
          {
            "name": "address_config",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "is_signer",
            "type": "bool"
          },
          {
            "name": "is_writable",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "PolicyAccount",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "subject",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "token_account",
            "type": "pubkey"
          },
          {
            "name": "locked_until",
            "type": "u64"
          },
          {
            "name": "time_unit",
            "type": {
              "defined": {
                "name": "TimeUnit"
              }
            }
          }
        ]
      }
    },
    {
      "name": "TimeUnit",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Second"
          },
          {
            "name": "Slot"
          }
        ]
      }
    }
  ]
}