Type alias GmIdl

GmIdl: {
    accounts: [{
        name: "FeeReduction";
        type: {
            fields: [{
                name: "account";
                type: "publicKey";
            }, {
                name: "bump";
                type: "u8";
            }, {
                name: "discount";
                type: "u64";
            }];
            kind: "struct";
        };
    }, {
        name: "MarketVars";
        type: {
            fields: [{
                name: "updateAuthorityMaster";
                type: "publicKey";
            }, {
                name: "bump";
                type: "u8";
            }];
            kind: "struct";
        };
    }, {
        name: "OpenOrdersCounter";
        type: {
            fields: [{
                name: "openOrderCount";
                type: "u64";
            }, {
                name: "bump";
                type: "u8";
            }];
            kind: "struct";
        };
    }, {
        name: "OrderAccount";
        type: {
            fields: [{
                name: "orderInitializerPubkey";
                type: "publicKey";
            }, {
                name: "currencyMint";
                type: "publicKey";
            }, {
                name: "assetMint";
                type: "publicKey";
            }, {
                name: "initializerCurrencyTokenAccount";
                type: "publicKey";
            }, {
                name: "initializerAssetTokenAccount";
                type: "publicKey";
            }, {
                name: "orderSide";
                type: {
                    defined: "OrderSide";
                };
            }, {
                name: "price";
                type: "u64";
            }, {
                name: "orderOriginationQty";
                type: "u64";
            }, {
                name: "orderRemainingQty";
                type: "u64";
            }, {
                name: "createdAtTimestamp";
                type: "i64";
            }];
            kind: "struct";
        };
    }, {
        name: "RegisteredCurrency";
        type: {
            fields: [{
                name: "tokenMint";
                type: "publicKey";
            }, {
                name: "saCurrencyVault";
                type: "publicKey";
            }, {
                name: "royalty";
                type: "u64";
            }, {
                name: "bump";
                type: "u8";
            }, {
                name: "royaltyTiers";
                type: {
                    vec: {
                        defined: "RoyaltyTier";
                    };
                };
            }];
            kind: "struct";
        };
    }];
    errors: [{
        code: 6000;
        msg: "Invalid Destination Token Account";
        name: "InvalidDestinationAccount";
    }, {
        code: 6001;
        msg: "Invalid instruction.";
        name: "InvalidInstruction";
    }, {
        code: 6002;
        msg: "Invalid SPL Token mint";
        name: "InvalidMint";
    }, {
        code: 6003;
        msg: "Invalid Offer Account Owner";
        name: "InvalidOfferAccountOwner";
    }, {
        code: 6004;
        msg: "Invalid SPL Token account";
        name: "InvalidTokenAccount";
    }, {
        code: 6005;
        msg: "Numerical overflow error";
        name: "NumericalOverflowError";
    }, {
        code: 6006;
        msg: "Invalid Update Authority account";
        name: "InvalidUpdateAuthorityAccount";
    }, {
        code: 6007;
        msg: "Invalid Order Vault Authority account";
        name: "InvalidOrderVaultAuthorityAccount";
    }, {
        code: 6008;
        msg: "Uninitialized Token Account";
        name: "UninitializedTokenAccount";
    }, {
        code: 6009;
        msg: "Insufficient Balance";
        name: "InsufficientBalance";
    }, {
        code: 6010;
        msg: "Invalid Order Duration";
        name: "InvalidOrderDuration";
    }, {
        code: 6011;
        msg: "Origination quantity must be greater than 0";
        name: "InvalidOriginationQty";
    }, {
        code: 6012;
        msg: "Insufficient Order Quantity Remaining";
        name: "InsufficientOrderQty";
    }, {
        code: 6013;
        msg: "Invalid Royalty Value";
        name: "InvalidRoyalty";
    }, {
        code: 6014;
        msg: "Invalid Open Order Counter";
        name: "InvalidCounter";
    }, {
        code: 6015;
        msg: "Mint must be zero decimal";
        name: "MintDecimalError";
    }, {
        code: 6016;
        msg: "Order Account does not match provided account";
        name: "InvalidOrderAccountError";
    }, {
        code: 6017;
        msg: "No royalty tier exists with provided stake amount";
        name: "InvalidRoyaltyTier";
    }, {
        code: 6018;
        msg: "Royalty Tier vector cannot hold any additional tiers";
        name: "RoyaltyTierLength";
    }, {
        code: 6019;
        msg: "Order price did not match expected price";
        name: "InvalidOrderPrice";
    }, {
        code: 6020;
        msg: "Royalty tier already exists";
        name: "DuplicateRoyaltyTier";
    }, {
        code: 6021;
        msg: "Order seller did not match expected seller";
        name: "InvalidSeller";
    }];
    instructions: [{
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "RegisteredCurrency";
                    kind: "account";
                    path: "registered_currency.token_mint";
                    type: "publicKey";
                }];
            };
        }];
        args: [{
            name: "stakeAmount";
            type: "u64";
        }, {
            name: "discount";
            type: "u64";
        }];
        name: "addRoyaltyTier";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "RegisteredCurrency";
                    kind: "account";
                    path: "registered_currency.token_mint";
                    type: "publicKey";
                }];
            };
        }];
        args: [{
            name: "stakeAmount";
            type: "u64";
        }];
        name: "deleteRoyaltyTier";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "deregisterCurrency";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "initializeMarketplace";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "saCurrencyVault";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [{
            name: "royalty";
            type: "u64";
        }];
        name: "registerCurrency";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "saCurrencyVault";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "updateCurrencyVault";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [{
            name: "royalty";
            type: "u64";
        }];
        name: "updateCurrencyRoyalty";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "RegisteredCurrency";
                    kind: "account";
                    path: "registered_currency.token_mint";
                    type: "publicKey";
                }];
            };
        }];
        args: [{
            name: "stakeAmount";
            type: "u64";
        }, {
            name: "discount";
            type: "u64";
        }];
        name: "updateRoyaltyTier";
    }, {
        accounts: [{
            isMut: false;
            isSigner: true;
            name: "updateAuthorityMaster";
        }, {
            isMut: true;
            isSigner: true;
            name: "funder";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "feeExemptTarget";
        }, {
            isMut: true;
            isSigner: false;
            name: "feeExemptAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [{
            name: "discount";
            type: "u64";
        }];
        name: "addFeeExemption";
    }, {
        accounts: [{
            isMut: false;
            isSigner: true;
            name: "updateAuthorityMaster";
        }, {
            isMut: true;
            isSigner: false;
            name: "funder";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "feeExemptAccount";
        }];
        args: [];
        name: "removeFeeExemption";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "orderInitializer";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "receiveMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-account";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerReceiveTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }, {
            isMut: false;
            isSigner: false;
            name: "rent";
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }];
        args: [{
            name: "price";
            type: "u64";
        }, {
            name: "originationQty";
            type: "u64";
        }];
        name: "processInitializeBuy";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "orderInitializer";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "receiveMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-account";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "initializerReceiveTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "receive_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }, {
            isMut: false;
            isSigner: false;
            name: "rent";
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }];
        args: [{
            name: "price";
            type: "u64";
        }, {
            name: "originationQty";
            type: "u64";
        }];
        name: "processInitializeSell";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "orderTaker";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderTakerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderTakerReceiveTokenAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "assetMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderInitializer";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerReceiveTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    account: "OrderAccount";
                    kind: "account";
                    path: "order_account.order_initializer_pubkey";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "saVault";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }, {
            isMut: false;
            isSigner: false;
            name: "atlasStaking";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredStake";
        }, {
            isMut: false;
            isSigner: false;
            name: "stakingAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "feeReduction";
        }];
        args: [{
            name: "purchaseQuantity";
            type: "u64";
        }, {
            name: "expectedPrice";
            type: "u64";
        }, {
            name: "seller";
            type: "publicKey";
        }];
        name: "processExchange";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "signer";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderInitializer";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-account";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }];
        args: [];
        name: "processCancel";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "payer";
        }, {
            isMut: false;
            isSigner: false;
            name: "user";
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "user";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "initializeOpenOrdersCounter";
    }];
    metadata: Record<string, unknown>;
    name: "marketplace";
    types: [{
        name: "RoyaltyTier";
        type: {
            fields: [{
                name: "stakeAmount";
                type: "u64";
            }, {
                name: "discount";
                type: "u64";
            }];
            kind: "struct";
        };
    }, {
        name: "OrderSide";
        type: {
            kind: "enum";
            variants: [{
                name: "Buy";
            }, {
                name: "Sell";
            }];
        };
    }, {
        name: "TokenType";
        type: {
            kind: "enum";
            variants: [{
                name: "Asset";
            }, {
                name: "Currency";
            }];
        };
    }];
    version: "0.1.0";
}

Type declaration

  • accounts: [{
        name: "FeeReduction";
        type: {
            fields: [{
                name: "account";
                type: "publicKey";
            }, {
                name: "bump";
                type: "u8";
            }, {
                name: "discount";
                type: "u64";
            }];
            kind: "struct";
        };
    }, {
        name: "MarketVars";
        type: {
            fields: [{
                name: "updateAuthorityMaster";
                type: "publicKey";
            }, {
                name: "bump";
                type: "u8";
            }];
            kind: "struct";
        };
    }, {
        name: "OpenOrdersCounter";
        type: {
            fields: [{
                name: "openOrderCount";
                type: "u64";
            }, {
                name: "bump";
                type: "u8";
            }];
            kind: "struct";
        };
    }, {
        name: "OrderAccount";
        type: {
            fields: [{
                name: "orderInitializerPubkey";
                type: "publicKey";
            }, {
                name: "currencyMint";
                type: "publicKey";
            }, {
                name: "assetMint";
                type: "publicKey";
            }, {
                name: "initializerCurrencyTokenAccount";
                type: "publicKey";
            }, {
                name: "initializerAssetTokenAccount";
                type: "publicKey";
            }, {
                name: "orderSide";
                type: {
                    defined: "OrderSide";
                };
            }, {
                name: "price";
                type: "u64";
            }, {
                name: "orderOriginationQty";
                type: "u64";
            }, {
                name: "orderRemainingQty";
                type: "u64";
            }, {
                name: "createdAtTimestamp";
                type: "i64";
            }];
            kind: "struct";
        };
    }, {
        name: "RegisteredCurrency";
        type: {
            fields: [{
                name: "tokenMint";
                type: "publicKey";
            }, {
                name: "saCurrencyVault";
                type: "publicKey";
            }, {
                name: "royalty";
                type: "u64";
            }, {
                name: "bump";
                type: "u8";
            }, {
                name: "royaltyTiers";
                type: {
                    vec: {
                        defined: "RoyaltyTier";
                    };
                };
            }];
            kind: "struct";
        };
    }]
  • errors: [{
        code: 6000;
        msg: "Invalid Destination Token Account";
        name: "InvalidDestinationAccount";
    }, {
        code: 6001;
        msg: "Invalid instruction.";
        name: "InvalidInstruction";
    }, {
        code: 6002;
        msg: "Invalid SPL Token mint";
        name: "InvalidMint";
    }, {
        code: 6003;
        msg: "Invalid Offer Account Owner";
        name: "InvalidOfferAccountOwner";
    }, {
        code: 6004;
        msg: "Invalid SPL Token account";
        name: "InvalidTokenAccount";
    }, {
        code: 6005;
        msg: "Numerical overflow error";
        name: "NumericalOverflowError";
    }, {
        code: 6006;
        msg: "Invalid Update Authority account";
        name: "InvalidUpdateAuthorityAccount";
    }, {
        code: 6007;
        msg: "Invalid Order Vault Authority account";
        name: "InvalidOrderVaultAuthorityAccount";
    }, {
        code: 6008;
        msg: "Uninitialized Token Account";
        name: "UninitializedTokenAccount";
    }, {
        code: 6009;
        msg: "Insufficient Balance";
        name: "InsufficientBalance";
    }, {
        code: 6010;
        msg: "Invalid Order Duration";
        name: "InvalidOrderDuration";
    }, {
        code: 6011;
        msg: "Origination quantity must be greater than 0";
        name: "InvalidOriginationQty";
    }, {
        code: 6012;
        msg: "Insufficient Order Quantity Remaining";
        name: "InsufficientOrderQty";
    }, {
        code: 6013;
        msg: "Invalid Royalty Value";
        name: "InvalidRoyalty";
    }, {
        code: 6014;
        msg: "Invalid Open Order Counter";
        name: "InvalidCounter";
    }, {
        code: 6015;
        msg: "Mint must be zero decimal";
        name: "MintDecimalError";
    }, {
        code: 6016;
        msg: "Order Account does not match provided account";
        name: "InvalidOrderAccountError";
    }, {
        code: 6017;
        msg: "No royalty tier exists with provided stake amount";
        name: "InvalidRoyaltyTier";
    }, {
        code: 6018;
        msg: "Royalty Tier vector cannot hold any additional tiers";
        name: "RoyaltyTierLength";
    }, {
        code: 6019;
        msg: "Order price did not match expected price";
        name: "InvalidOrderPrice";
    }, {
        code: 6020;
        msg: "Royalty tier already exists";
        name: "DuplicateRoyaltyTier";
    }, {
        code: 6021;
        msg: "Order seller did not match expected seller";
        name: "InvalidSeller";
    }]
  • instructions: [{
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "RegisteredCurrency";
                    kind: "account";
                    path: "registered_currency.token_mint";
                    type: "publicKey";
                }];
            };
        }];
        args: [{
            name: "stakeAmount";
            type: "u64";
        }, {
            name: "discount";
            type: "u64";
        }];
        name: "addRoyaltyTier";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "RegisteredCurrency";
                    kind: "account";
                    path: "registered_currency.token_mint";
                    type: "publicKey";
                }];
            };
        }];
        args: [{
            name: "stakeAmount";
            type: "u64";
        }];
        name: "deleteRoyaltyTier";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "deregisterCurrency";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "initializeMarketplace";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "saCurrencyVault";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [{
            name: "royalty";
            type: "u64";
        }];
        name: "registerCurrency";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "saCurrencyVault";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "updateCurrencyVault";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [{
            name: "royalty";
            type: "u64";
        }];
        name: "updateCurrencyRoyalty";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "updateAuthorityAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "RegisteredCurrency";
                    kind: "account";
                    path: "registered_currency.token_mint";
                    type: "publicKey";
                }];
            };
        }];
        args: [{
            name: "stakeAmount";
            type: "u64";
        }, {
            name: "discount";
            type: "u64";
        }];
        name: "updateRoyaltyTier";
    }, {
        accounts: [{
            isMut: false;
            isSigner: true;
            name: "updateAuthorityMaster";
        }, {
            isMut: true;
            isSigner: true;
            name: "funder";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "feeExemptTarget";
        }, {
            isMut: true;
            isSigner: false;
            name: "feeExemptAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [{
            name: "discount";
            type: "u64";
        }];
        name: "addFeeExemption";
    }, {
        accounts: [{
            isMut: false;
            isSigner: true;
            name: "updateAuthorityMaster";
        }, {
            isMut: true;
            isSigner: false;
            name: "funder";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "feeExemptAccount";
        }];
        args: [];
        name: "removeFeeExemption";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "orderInitializer";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "receiveMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-account";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerReceiveTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }, {
            isMut: false;
            isSigner: false;
            name: "rent";
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }];
        args: [{
            name: "price";
            type: "u64";
        }, {
            name: "originationQty";
            type: "u64";
        }];
        name: "processInitializeBuy";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "orderInitializer";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "receiveMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-account";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "initializerReceiveTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "receive_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }, {
            isMut: false;
            isSigner: false;
            name: "rent";
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }];
        args: [{
            name: "price";
            type: "u64";
        }, {
            name: "originationQty";
            type: "u64";
        }];
        name: "processInitializeSell";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "orderTaker";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderTakerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderTakerReceiveTokenAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "currencyMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "assetMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderInitializer";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerReceiveTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    account: "OrderAccount";
                    kind: "account";
                    path: "order_account.order_initializer_pubkey";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "saVault";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredCurrency";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "registered-currency";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "currency_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }, {
            isMut: false;
            isSigner: false;
            name: "atlasStaking";
        }, {
            isMut: false;
            isSigner: false;
            name: "registeredStake";
        }, {
            isMut: false;
            isSigner: false;
            name: "stakingAccount";
        }, {
            isMut: false;
            isSigner: false;
            name: "feeReduction";
        }];
        args: [{
            name: "purchaseQuantity";
            type: "u64";
        }, {
            name: "expectedPrice";
            type: "u64";
        }, {
            name: "seller";
            type: "publicKey";
        }];
        name: "processExchange";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "signer";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderInitializer";
        }, {
            isMut: false;
            isSigner: false;
            name: "marketVarsAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "market-vars";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: true;
            isSigner: false;
            name: "initializerDepositTokenAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "orderVaultAccount";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-account";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "orderVaultAuthority";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "order-vault-auth";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: true;
            isSigner: false;
            name: "orderAccount";
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "order_initializer";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "tokenProgram";
        }];
        args: [];
        name: "processCancel";
    }, {
        accounts: [{
            isMut: true;
            isSigner: true;
            name: "payer";
        }, {
            isMut: false;
            isSigner: false;
            name: "user";
        }, {
            isMut: true;
            isSigner: false;
            name: "openOrdersCounter";
            pda: {
                seeds: [{
                    kind: "const";
                    type: "string";
                    value: "open-orders-counter";
                }, {
                    kind: "account";
                    path: "user";
                    type: "publicKey";
                }, {
                    account: "Mint";
                    kind: "account";
                    path: "deposit_mint";
                    type: "publicKey";
                }];
            };
        }, {
            isMut: false;
            isSigner: false;
            name: "depositMint";
        }, {
            isMut: false;
            isSigner: false;
            name: "systemProgram";
        }];
        args: [];
        name: "initializeOpenOrdersCounter";
    }]
  • metadata: Record<string, unknown>
  • name: "marketplace"
  • types: [{
        name: "RoyaltyTier";
        type: {
            fields: [{
                name: "stakeAmount";
                type: "u64";
            }, {
                name: "discount";
                type: "u64";
            }];
            kind: "struct";
        };
    }, {
        name: "OrderSide";
        type: {
            kind: "enum";
            variants: [{
                name: "Buy";
            }, {
                name: "Sell";
            }];
        };
    }, {
        name: "TokenType";
        type: {
            kind: "enum";
            variants: [{
                name: "Asset";
            }, {
                name: "Currency";
            }];
        };
    }]
  • version: "0.1.0"