/
marketplace_accounts.ts
48 lines (38 loc) · 1.21 KB
/
marketplace_accounts.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { BN, web3 } from '@coral-xyz/anchor';
import type { AnchorTypes } from '../../anchor/types';
export interface MarketVarsInfo {
updateAuthorityMaster: web3.PublicKey;
}
import * as GM_TYPES from './gmIdl';
export type GM_PROGRAM = GM_TYPES.GmIdl;
export type GmTypes = AnchorTypes<GM_PROGRAM>;
type Account = GmTypes['Accounts'];
export type FeeExemptInfo = Account['FeeReduction'];
export type MarketVarsAccountInfo = Account['MarketVars'];
export type OpenOrdersCounterInfo = Account['OpenOrdersCounter'];
export type OrderAccountInfo = Account['OrderAccount'];
export type RegisteredCurrencyInfo = Account['RegisteredCurrency'];
export interface OrderAccountItem {
publicKey: web3.PublicKey;
account: OrderAccountInfo;
}
export type RegisteredCurrencyItem = {
mint: web3.PublicKey;
royalty: BN;
saVault: web3.PublicKey;
};
export type RoyaltyTier = {
stakeAmount: BN;
discount: BN;
};
export type RoyaltyTiers = [RoyaltyTier];
export interface FeeExemptItem {
publicKey: web3.PublicKey;
account: FeeExemptInfo;
}
export enum GmLogs {
CancelOrderMemo = 'CancelOrderMemo',
ExchangeMemo = 'ExchangeMemo',
InitializeMemo = 'InitializeMemo',
RegisterCurrencyMemo = 'RegisterCurrencyMemo',
}