{ "address": "DjVR4EuYV6USMJFfsGZwhZ3y8rtWsmG8EvDY96GTqqi3", "metadata": { "name": "descro", "version": "0.1.0", "spec": "0.1.0", "description": "Created with Anchor" }, "instructions": [ { "name": "cancel", "discriminator": [ 232, 219, 223, 41, 219, 236, 220, 190 ], "accounts": [ { "name": "seller", "writable": true, "signer": true }, { "name": "escrow_account", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119 ] }, { "kind": "account", "path": "escrow_account.seller", "account": "EscrowAccount" }, { "kind": "account", "path": "escrow_account.escrow_id", "account": "EscrowAccount" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "complete", "discriminator": [ 0, 77, 224, 147, 136, 25, 88, 76 ], "accounts": [ { "name": "buyer", "signer": true }, { "name": "seller", "writable": true }, { "name": "escrow_account", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119 ] }, { "kind": "account", "path": "escrow_account.seller", "account": "EscrowAccount" }, { "kind": "account", "path": "escrow_account.escrow_id", "account": "EscrowAccount" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "escrow_account" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "create_escrow", "discriminator": [ 253, 215, 165, 116, 36, 108, 68, 80 ], "accounts": [ { "name": "seller", "writable": true, "signer": true }, { "name": "buyer" }, { "name": "escrow_account", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119 ] }, { "kind": "account", "path": "seller" }, { "kind": "arg", "path": "escrow_id" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "escrow_account" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "amount", "type": "u64" }, { "name": "dispute_resolver", "type": { "option": "pubkey" } }, { "name": "escrow_id", "type": "u64" } ] }, { "name": "deposit", "discriminator": [ 242, 35, 198, 137, 82, 225, 242, 182 ], "accounts": [ { "name": "buyer", "writable": true, "signer": true }, { "name": "escrow_account", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119 ] }, { "kind": "account", "path": "escrow_account.seller", "account": "EscrowAccount" }, { "kind": "account", "path": "escrow_account.escrow_id", "account": "EscrowAccount" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "escrow_account" } ] } }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "dispute", "discriminator": [ 216, 92, 128, 146, 202, 85, 135, 73 ], "accounts": [ { "name": "initiator", "signer": true }, { "name": "escrow_account", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119 ] }, { "kind": "account", "path": "escrow_account.seller", "account": "EscrowAccount" }, { "kind": "account", "path": "escrow_account.escrow_id", "account": "EscrowAccount" } ] } } ], "args": [] }, { "name": "resolve", "discriminator": [ 246, 150, 236, 206, 108, 63, 58, 10 ], "accounts": [ { "name": "resolver", "signer": true }, { "name": "winner", "writable": true }, { "name": "seller", "writable": true }, { "name": "escrow_account", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119 ] }, { "kind": "account", "path": "escrow_account.seller", "account": "EscrowAccount" }, { "kind": "account", "path": "escrow_account.escrow_id", "account": "EscrowAccount" } ] } }, { "name": "vault", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 118, 97, 117, 108, 116 ] }, { "kind": "account", "path": "escrow_account" } ] } }, { "name": "resolver_entry", "writable": true, "pda": { "seeds": [ { "kind": "const", "value": [ 114, 101, 115, 111, 108, 118, 101, 114 ] }, { "kind": "account", "path": "escrow_account.dispute_resolver", "account": "EscrowAccount" } ], "program": { "kind": "const", "value": [ 4, 21, 77, 207, 27, 130, 71, 134, 111, 76, 186, 244, 136, 42, 168, 238, 151, 132, 148, 41, 241, 127, 56, 240, 140, 66, 190, 194, 253, 243, 165, 91 ] } } }, { "name": "escrow_authority", "pda": { "seeds": [ { "kind": "const", "value": [ 101, 115, 99, 114, 111, 119, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { "name": "registry_program" }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "winner", "type": { "defined": { "name": "Winner" } } } ] } ], "accounts": [ { "name": "EscrowAccount", "discriminator": [ 36, 69, 48, 18, 128, 225, 125, 135 ] } ], "errors": [ { "code": 6000, "name": "InvalidState", "msg": "Invalid state for this instruction" }, { "code": 6001, "name": "Unauthorized", "msg": "Signer is not authorized" }, { "code": 6002, "name": "NoResolverConfigured", "msg": "No resolver configured for this escrow" }, { "code": 6003, "name": "UnauthorizedResolver", "msg": "Signer is not the configured resolver" }, { "code": 6004, "name": "Expired", "msg": "Escrow has expired" } ], "types": [ { "name": "EscrowAccount", "type": { "kind": "struct", "fields": [ { "name": "seller", "type": "pubkey" }, { "name": "buyer", "type": "pubkey" }, { "name": "amount", "type": "u64" }, { "name": "dispute_resolver", "type": { "option": "pubkey" } }, { "name": "state", "type": { "defined": { "name": "EscrowState" } } }, { "name": "bump", "type": "u8" }, { "name": "vault_bump", "type": "u8" }, { "name": "escrow_id", "type": "u64" } ] } }, { "name": "EscrowState", "type": { "kind": "enum", "variants": [ { "name": "AwaitingDeposit" }, { "name": "Active" }, { "name": "Disputed" }, { "name": "Complete" }, { "name": "Cancelled" } ] } }, { "name": "Winner", "type": { "kind": "enum", "variants": [ { "name": "Buyer" }, { "name": "Seller" } ] } } ] }