From 9a4ac234f1ebbf1d5068ac849b3562f87ae6b62b Mon Sep 17 00:00:00 2001 From: <> Date: Wed, 23 Aug 2023 19:36:38 +0000 Subject: [PATCH] Deployed 65b1ca0 with MkDocs version: 1.5.2 --- .nojekyll | 0 404.html | 407 + accounts/index.html | 974 ++ addresses/index.html | 1049 ++ assets/_mkdocstrings.css | 64 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.78eede0e.min.js | 29 + assets/javascripts/bundle.78eede0e.min.js.map | 8 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 ++++++++++ .../workers/search.dfff1995.min.js | 42 + .../workers/search.dfff1995.min.js.map | 8 + assets/stylesheets/main.0e669242.min.css | 1 + assets/stylesheets/main.0e669242.min.css.map | 1 + assets/stylesheets/palette.85d0ee34.min.css | 1 + .../stylesheets/palette.85d0ee34.min.css.map | 1 + clearing_house/index.html | 10636 ++++++++++++++++ clearing_house_user/index.html | 4296 +++++++ css/custom.css | 13 + css/mkdocstrings.css | 6 + img/drift.png | Bin 0 -> 92853 bytes index.html | 591 + objects.inv | Bin 0 -> 1137 bytes search/search_index.json | 1 + sitemap.xml | 28 + sitemap.xml.gz | Bin 0 -> 252 bytes 57 files changed, 25356 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 accounts/index.html create mode 100644 addresses/index.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.78eede0e.min.js create mode 100644 assets/javascripts/bundle.78eede0e.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.dfff1995.min.js create mode 100644 assets/javascripts/workers/search.dfff1995.min.js.map create mode 100644 assets/stylesheets/main.0e669242.min.css create mode 100644 assets/stylesheets/main.0e669242.min.css.map create mode 100644 assets/stylesheets/palette.85d0ee34.min.css create mode 100644 assets/stylesheets/palette.85d0ee34.min.css.map create mode 100644 clearing_house/index.html create mode 100644 clearing_house_user/index.html create mode 100644 css/custom.css create mode 100644 css/mkdocstrings.css create mode 100644 img/drift.png create mode 100644 index.html create mode 100644 objects.inv create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..4777cd00 --- /dev/null +++ b/404.html @@ -0,0 +1,407 @@ + + + +
+ + + + + + + + + + + + + + +These functions are used to retrieve specific on-chain accounts (State, PerpMarket, SpotMarket, etc.)
+clearing_house = ClearingHouse.from_config(config, provider)
+
+# get sol market info
+sol_market_index = 0
+sol_market = await get_perp_market_account(clearing_house.program, sol_market_index)
+print(
+ sol_market.amm.sqrt_k,
+ sol_market.amm.base_asset_amount_long,
+ sol_market.amm.base_asset_amount_short,
+)
+
+# get usdc spot market info
+usdc_spot_market_index = 0
+usdc_market = await get_spot_market_account(clearing_house.program, usdc_spot_market_index)
+print(
+ usdc.market_index,
+ usdc.deposit_balance,
+ usdc.borrow_balance,
+)
+
accounts
+
+
+get_all_perp_market_accounts(program)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
64 +65 |
|
get_all_spot_market_accounts(program)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
78 +79 |
|
get_if_stake_account(program, authority, spot_market_index)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
24 +25 +26 +27 +28 +29 +30 +31 |
|
get_perp_market_account(program, market_index)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
58 +59 +60 +61 |
|
get_spot_market_account(program, spot_market_index)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
68 +69 +70 +71 +72 +73 +74 +75 |
|
get_state_account(program)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
18 +19 +20 +21 |
|
get_user_account(program, authority, subaccount_id=0)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
46 +47 +48 +49 +50 +51 +52 +53 +54 +55 |
|
get_user_stats_account(program, authority)
+
+
+ async
+
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/accounts.py
34 +35 +36 +37 +38 +39 +40 +41 +42 +43 |
|
These functions are used to derive on-chain addresses of the accounts (publickey of the sol-market)
+ + +addresses
+
+
+get_clearing_house_signer_public_key(program_id)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
70 +71 +72 +73 |
|
get_insurance_fund_stake_public_key(program_id, authority, spot_market_index)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
26 +27 +28 +29 +30 +31 +32 +33 +34 |
|
get_insurance_fund_vault_public_key(program_id, spot_market_index)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
17 +18 +19 +20 +21 +22 +23 |
|
get_perp_market_public_key(program_id, market_index)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
8 + 9 +10 +11 +12 +13 +14 |
|
get_spot_market_public_key(program_id, spot_market_index)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
37 +38 +39 +40 +41 +42 +43 |
|
get_spot_market_vault_authority_public_key(program_id, spot_market_index)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
55 +56 +57 +58 +59 +60 +61 |
|
get_spot_market_vault_public_key(program_id, spot_market_index)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
46 +47 +48 +49 +50 +51 +52 |
|
get_state_public_key(program_id)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
64 +65 +66 +67 |
|
get_user_account_public_key(program_id, authority, user_id=0)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
85 +86 +87 +88 +89 +90 +91 +92 |
|
get_user_stats_account_public_key(program_id, authority)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
76 +77 +78 +79 +80 +81 +82 |
|
int_to_le_bytes(a)
+
+/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/driftpy/addresses.py
4 +5 |
|
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var _a=/["'&<>]/;Pn.exports=Aa;function Aa(e){var t=""+e,r=_a.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i