From a71cb4cdb444f0d07d976130baf396d6e3a1f464 Mon Sep 17 00:00:00 2001 From: Wael Date: Thu, 16 Nov 2023 03:10:23 -0800 Subject: [PATCH 01/14] updating new endpoints --- koios_python/network.py | 26 ++++++++++++++++++++++++++ koios_python/pool.py | 34 ++++++++++++++++++++++++++++++++++ koios_python/urls.py | 13 ++++++++++--- tests.py | 23 +++++++++++++++++++++++ 4 files changed, 93 insertions(+), 3 deletions(-) diff --git a/koios_python/network.py b/koios_python/network.py index 4b047fe..bf00fba 100644 --- a/koios_python/network.py +++ b/koios_python/network.py @@ -67,3 +67,29 @@ def get_param_updates(self, content_range="0-57"): network_params = json.loads(network_params.content) return network_params +@Exception_Handler +def get_treasury_withdrawals(self, content_range="0-999"): + """ + Get all treasury withdrawals from the chain starting Shelley era + + :return: list of treasury withdrawals starting from Shelley era. + :rtype: list + """ + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) + treasury_withdrawals = json.loads(treasury_withdrawals.content) + return treasury_withdrawals + +@Exception_Handler +def get_reserve_withdrawals(self, content_range="0-999"): + """ + Get all reserve withdrawals from the chain starting Shelley era + + :return: list of reserve withdrawals starting from Shelley era. + :rtype: list + """ + timeout = get_timeout() + reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout) + reserve_withdrawals = json.loads(reserve_withdrawals.content) + return reserve_withdrawals \ No newline at end of file diff --git a/koios_python/pool.py b/koios_python/pool.py index 5a1e69f..6bebd03 100644 --- a/koios_python/pool.py +++ b/koios_python/pool.py @@ -185,4 +185,38 @@ def get_pool_metadata(self, *args): get_format = {"_pool_bech32_ids": [args]} pool_list = requests.post(self.POOL_METADATA_URL, json = get_format, timeout=timeout) pool_list = json.loads(pool_list.content) + return pool_list + +@Exception_Handler +def get_pool_registrations(self, epoch_no=None): + """ + Get all pool registrations for all epochs (or _epoch_no if provided) + + :param str epoch_no: epoch number to get info (from the beginning if omitted). + :return: list of pool registrations. + :rtype: list. + """ + timeout = get_timeout() + if epoch_no is None: + print(f"WARNING: epoch_no is required") + else: + pool_list = requests.get(f"{self.POOL_REGISTRATIONS_URL}{epoch_no}", timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list + +@Exception_Handler +def get_pool_retirements(self, epoch_no=None): + """ + Get all pool retirements for all epochs (or _epoch_no if provided) + + :param str epoch_no: epoch number to get info (from the beginning if omitted). + :return: list of pool retirements. + :rtype: list. + """ + timeout = get_timeout() + if epoch_no is None: + print(f"WARNING: epoch_no is required") + else: + pool_list = requests.get(f"{self.POOL_RETIREMENTS_URL}{epoch_no}", timeout=timeout) + pool_list = json.loads(pool_list.content) return pool_list \ No newline at end of file diff --git a/koios_python/urls.py b/koios_python/urls.py index 8dbb187..63d71ca 100644 --- a/koios_python/urls.py +++ b/koios_python/urls.py @@ -6,20 +6,22 @@ class URLs: # imported like class methods from .epoch import get_epoch_info, get_epoch_params, get_epoch_block_protocols - from .network import get_tip, get_genesis, get_totals, get_param_updates + from .network import get_tip, get_genesis, get_totals, get_param_updates, get_treasury_withdrawals, get_reserve_withdrawals from .block import get_blocks, get_block_info, get_block_txs from .address import get_address_info, get_address_txs, get_address_assets, get_credential_txs, get_credential_utxos from .account import get_account_info, get_account_info_cached, get_account_list, get_account_rewards, get_account_utxos,\ get_account_updates, get_account_addresses, get_account_assets, get_account_history, get_account_assets_paginated + from .asset import get_asset_list, get_asset_addresses, get_asset_info, get_asset_history, get_policy_asset_info, \ get_asset_summary, get_asset_txs, get_asset_info_bulk, get_asset_token_registry, get_asset_nft_address,\ get_policy_asset_addresses, get_policy_asset_list - from .pool import get_pool_list, get_pool_info, get_pool_stake_snapshot, get_pool_delegators, get_pool_delegators_history, get_pool_blocks, get_pool_history, get_pool_updates, get_pool_relays, get_pool_metadata + from .pool import get_pool_list, get_pool_info, get_pool_stake_snapshot, get_pool_delegators, get_pool_delegators_history, get_pool_blocks, \ + get_pool_history, get_pool_updates, get_pool_relays, get_pool_metadata, get_pool_registrations, get_pool_retirements from .scripts import get_native_script_list, get_plutus_script_list, get_script_redeemers, get_datum_info from .transactions import get_tx_info, get_tx_utxos, get_tx_metadata, get_tx_metalabels, submit_tx, get_tx_status - def __init__(self, url='https://api.koios.rest/api/v0/', network='mainnet'): + def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): self.version = 'koios-python v1.3.1' self.url = url @@ -40,6 +42,8 @@ def __init__(self, url='https://api.koios.rest/api/v0/', network='mainnet'): self.GENESIS_URL = self.url + "genesis" self.TOTALS_URL = self.url + "totals" self.NETWORK_PARAM_UPDATES_URL = self.url + "param_updates" + self.TREASURY_WITHDRAWALS_URL = self.url + "treasury_withdrawals" + self.RESERVE_WITHDRAWALS_URL = self.url + "reserve_withdrawals" # Epoch URLs self.EPOCH_INFO_URL = self.url + "epoch_info" @@ -77,6 +81,7 @@ def __init__(self, url='https://api.koios.rest/api/v0/', network='mainnet'): #self.ACCOUNT_ASSETS_URL = self.url + "account_assets?offset=" self.ACCOUNT_ASSETS_URL = self.url + "account_assets" self.ACCOUNT_HISTORY_URL = self.url + "account_history" + self.ACCOUNT_TXS = self.url + "account_txs" # Asset URLs self.ASSET_LIST_URL = self.url + "asset_list" @@ -103,6 +108,8 @@ def __init__(self, url='https://api.koios.rest/api/v0/', network='mainnet'): self.POOL_UPDATES_URL = self.url + "pool_updates" self.POOL_RELAYS_URL = self.url + "pool_relays" self.POOL_METADATA_URL = self.url + "pool_metadata" + self.POOL_REGISTRATIONS_URL = self.url + "pool_registrations?_epoch_no=" + self.POOL_RETIREMENTS_URL = self.url + "pool_retirements?_epoch_no=" # Scripts URLs self.NATIVE_SCRIPT_LIST_URL = self.url + "native_script_list" diff --git a/tests.py b/tests.py index 6698c6a..5044684 100644 --- a/tests.py +++ b/tests.py @@ -33,8 +33,31 @@ print(kp.version) +# print('------------------------------------------------------------------------------------------') + +# tx_utxo_mainnet = kp.get_tx_utxos('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') +# print(tx_utxo_mainnet) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_pool_registrations(400)) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_pool_retirements(400)) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_treasury_withdrawals()) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_reserve_withdrawals()) + print('------------------------------------------------------------------------------------------') +pp.pp(kp.get_account_txs('stake1u8yxtugdv63wxafy9d00nuz6hjyyp4qnggvc9a3vxh8yl0ckml2uz', after_block=50000)) + ''' pp.pp(kp.get_tip()) From 6b52a409092e2b64d2fc16f89764ae09d26990db Mon Sep 17 00:00:00 2001 From: Wael Date: Thu, 16 Nov 2023 20:18:09 -0800 Subject: [PATCH 02/14] added all endpoints --- .../__pycache__/__init__.cpython-311.pyc | Bin 579 -> 540 bytes .../__pycache__/account.cpython-311.pyc | Bin 8996 -> 10056 bytes .../__pycache__/address.cpython-311.pyc | Bin 4489 -> 5631 bytes .../__pycache__/asset.cpython-311.pyc | Bin 10618 -> 11703 bytes .../__pycache__/block.cpython-311.pyc | Bin 2387 -> 2348 bytes .../__pycache__/environment.cpython-311.pyc | Bin 4153 -> 4114 bytes .../__pycache__/epoch.cpython-311.pyc | Bin 3506 -> 3467 bytes .../__pycache__/network.cpython-311.pyc | Bin 3108 -> 4381 bytes .../__pycache__/ogmios.cpython-311.pyc | Bin 0 -> 1215 bytes koios_python/__pycache__/pool.cpython-311.pyc | Bin 8836 -> 10284 bytes .../__pycache__/scripts.cpython-311.pyc | Bin 3237 -> 5314 bytes .../__pycache__/transactions.cpython-311.pyc | Bin 4927 -> 5701 bytes koios_python/__pycache__/urls.cpython-311.pyc | Bin 8366 -> 9958 bytes koios_python/account.py | 25 ++++++- koios_python/address.py | 34 ++++++++- koios_python/asset.py | 27 +++++++ koios_python/ogmios.py | 25 +++++++ koios_python/scripts.py | 67 ++++++++++++++---- koios_python/transactions.py | 18 ++++- koios_python/urls.py | 30 +++++--- tests.py | 45 +++++++++++- 21 files changed, 243 insertions(+), 28 deletions(-) create mode 100644 koios_python/__pycache__/ogmios.cpython-311.pyc create mode 100644 koios_python/ogmios.py diff --git a/koios_python/__pycache__/__init__.cpython-311.pyc b/koios_python/__pycache__/__init__.cpython-311.pyc index 9318bd1e12b00d5ba033f138aded689961f4b04c..032dbbf80e126b8bd0cbe5b9c0495b5dbc673c15 100644 GIT binary patch delta 52 zcmX@iGKYm{IWI340}w3E4o%(2Bf%(TuOC{RT2!oGo|u}GS(cfq?~F(Dvm~Q5Nk1sHAip>hs30?cvK`|+03{9|a{vGU diff --git a/koios_python/__pycache__/account.cpython-311.pyc b/koios_python/__pycache__/account.cpython-311.pyc index cb2a565838157eb4828152ec0b89cbdc1bd5c3ef..92e81c8c0b6ce2ef95762f3015c1ebb2b15c5936 100644 GIT binary patch delta 1052 zcmah|%}X0W6yM#L50WM}*_ddGI`JS`5Ob+Q11%J#UP`2Xp@FiDyOU(iW;e`iYy$~N zp@#@PRN|or3q2Go*q(&qu}9m}3OR@%^iQyqUQ1`uVV2aJsC;B zPw8?Z%AFpZ7b%}_T=HNa#ju~5Ar=*QI5jo9m|l<%+}nlc87{f7 z$ozh)Tkm%1#CJ^#vm1^_SeVCpPGokj#6>^Z=>veH4C&1wONNSKmJLg$QCOv3n@+Mp zO@sRt;d)~m#aG3~%y)OlcE^q*qq}~)Z?fq<74K}_e;01o<981-_LF5>Tsaa~+Tu#n zb1Fu+Qg8C@q46Uz*%p&cPt)@~F>zS1`!e+Da^n*RYxdlVEoP3yOk2$Si+b!68?$(T zmLu_))i3dBDRknNWz|$<8Mp4mvjSFI+wqupjl%STbELNaCBDQbM>#<}qyKjJjJq^H N9Msq5LpR(Vfj?}RG|T`1 delta 165 zcmX@%x5SNaIWI340}!m5teKK2J&{j>=?}w14Shzzi4mvRQka4nG=(-hFuE`~rs{_l zrxq3KC+4J9==)?Q6(tr`>O1G;m!<@lDXO?7?Cg}&I z7UUOa0u^NDZ=T0oDa)zJSi}ajPE&BQu4=*LMXKUli9jwR5EsX6KCBwX$j2baDEt9L I6iEU_0aPz9HUIzs diff --git a/koios_python/__pycache__/address.cpython-311.pyc b/koios_python/__pycache__/address.cpython-311.pyc index 1a7b2f50124e54728678eb1ac940dcb074d68352..4fa643fdc00544a137e0b479a2192099c39c4efc 100644 GIT binary patch delta 959 zcmb7?-%Aux6vt;~f6TbQoN+aGSB#sh>7ZtzE3BX(nnEo|{-T6h#_rv9VBA^n%+?w% z>q8Hl521{Z4?g%(Js3pz67*ud2P5pmwjk7hV9y10@0LM@M2Ev??mgdg=5X%4kD}kY z1JC__4@2zh;XKl$tw4xqDh6xl1F*1xHFp9CV3iK2h zQ!rFAI>;)kbe7YME@a5He+^|7tSo~?UDv?rEJMFmAf+j3VCuxvX${e8)l~J2qJfl( zG-!Y>JzEQewH^RbO37&^Pz^AlXa@Sx!FnU~6lbeW6Xy_aBex=R*iAmwy5wm?+)nlr zRadH3C185NxP`(?;UlO@qvPY#S7&CDbF(+62&WTRpkjccoY>;M1& delta 229 zcmeyb-KosCoR^o20SM+7Y)N6`oyaG_xMZSwmpo4j?;NHSz80osK)KZ*1z-@xnZgvz zpvk}ST^N&Ns(xs3YEiL%Voqv>zE5USQDRZ0zH?4~X-aTOeolO(&U<) zE#jlJlA%Z(XmgP$kod)6lbfGXnv-f*WDevq0&($shROFtY8gEy$B4Q!#!g-$s>H`2 Mz$o$oM1XYy0R2rq!TiXg3;k%Ab@#BHszf?E{g9spFA4Rgp)*4qvO+%;_V7IAD@F+?JTUkFWb#TXO`A>X z?|83%!p2YIB#otSio+D>EgYn9n!v{I%Bo1tbYN<@nF`KFNK2bjrOoE>AYs3erG6qX z!_>WuD9v>nLV$S96Do_F?v_eyK2{cL;no*jOH=FZiE8_F!U&xyAF3UVuZ|hMe&S`@ zrWBlaEWqmFQ>(qk?X-~{H>8PmX`(7kl(|jGJ8xS^ES_JNqE#tc=4yg-E@22k;x$ir zpECPai5;}emR*{;u7@J6z^$K)D96lsUo*IcOl!W#j@Xx1U@?a-;D>~xKdAa~Tr*<;2cCXF^f$Kl`ZXs$Fxa;gcnwj_)B>x0> delta 279 zcmdlU{VPa)IWI340}#wk-jcFdfq~&Mhyw%6P{wDoiRvnbA}MSwjLU#Rt6}mCQLL#f zDIzKC7~*Uo@rgD0jG`0Y=rW2-mSWVE7E2MvP$!VW6wIJ0zPW*M0h430erR!OQL%nv zPHKg|Pi9h4Vo{~Ob54F~N^nVjQDS HvlJTuwObJS delta 92 zcmZ1@bXkaJIWI340}!m5teLWr=M9r%vVLfBYEiL%Voqv>zE5USQDRZ0zH?4~X-aTO teoF(Dvm~Q5Nk1sHAip>hs30?cb0gzKJ^*GSAOQdX diff --git a/koios_python/__pycache__/epoch.cpython-311.pyc b/koios_python/__pycache__/epoch.cpython-311.pyc index 622cacd19cb2d0350c3ca7a3b62b372b37ab3d82..7f6d93b77c878511e926eb40352a278267af82be 100644 GIT binary patch delta 53 zcmdla-7U?toR^o20SFdnho)}iIm9AmqaRwFT2!oGo|u}GS(cfq?~F(Dvm~Q5Nk1sHAip>hs30?c^9z>68~}UzAj1Fv diff --git a/koios_python/__pycache__/network.cpython-311.pyc b/koios_python/__pycache__/network.cpython-311.pyc index fe6b7c6f97bd42703e4cf960841fce566389882d..b9cdec60ef3b28d5b87481ac88a3bc86de4c1690 100644 GIT binary patch delta 915 zcmZ1?F;|IiIWI340}x#J9-6v~dm^6%@AGTfa0q`l3)Sid|mH7BzyGgaRuKe;qFHLs+2 z^F}69cE**HpL4EdRG&PRD~bIVtAVbirRC&Qj??N3xfFoFJ+(w3F(*f%q$oA9xU{HJ zp**uBBc&*@JTa$OA+0DscXBGHnJ^aF$!j@{>Wk!o{wPua5}F)E93Zw5h~NYfpfI>4 z5fbF;7#tcD86WN$;^7kH81Cp393L9wQ^W&O!wVw#fP^M%5kH8n0wUN!ges7@B?7ZJ z9?4n7tUxJ{+ZD8m1VO4K(o;*~v8gQ50ZO|8adF7xd0fiY(#mseR(Zutu=@&AR(B1is`)5ESdN7dqrs>4Mo$175fK*1Z_au-)*=%>k8BnvbSNNIp5?#ayD&id*=CO8hjcCKUqD+asn7l%!5eoARhs$G#OP!S^# y7k{3d&AmE6ih)V^0~0r+!UqNz@sSxQc7;(0A`DT$#VG%Q0Y)Gcz(l}uVCw+5S^A#< delta 203 zcmbQMv_yh$IWI340}!m5teJ9|eIlO(W8Fmc07*sd<@)-QXfD>kuXpY0GkIlf&c&j diff --git a/koios_python/__pycache__/ogmios.cpython-311.pyc b/koios_python/__pycache__/ogmios.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ada301fd73aaa4968e60e3ef5b6cf56762d0a44d GIT binary patch literal 1215 zcmZ`&&2JPp6t`zQyU8ph;!Au;2rJEHk=US$(+ar23dDhe3RK$5YC85NvzZxBZBHPp zjkE_YNI7sofK+--LG%ykU(oYL%3){`=2rBIyU$+DAG#v zB%Ebq*FES}=m&p*dV{pxJr#xrsCQ`pjF|I_y94&eLmx)k#!uyFo?9++2bhs}&KA-3 zgsJq%Z1y$!fDGKDp|LP_HtZ54_$X-qC!vynzSYRQiAU6y#yfj zl_H_vttOFBjjsV%6lz*vsb)EH&87N3oN27&I+tma#*xxCKl`3h+7&eTQRKQzWwups zX1v^4diwLlHKTNu_T5IK(RaUXT&+8%+EXHxS!gN=*K2}-i&&Sb>L}p=Tc0ytCZkjv zHl^UD^CL+M;j4exh=vx0YtU3E`ZQ0*(M~MmPTi4h?47U z)65sgL8_TN2cY&BQ4G`&{c{?5{>cC4C4037L)mu8@*Y_pk>&k`^DmO^WO!$Map^rD zowx>VcyHf7xqam=c{lg|!tXzf{MN4D+Vfk(Tl=-e?dHqy)%tF2X|J|4yfv;Z4DTJl zIS7cWb~;RiolZfFTmYx3@pL1SBDEJWghQQ4TN~y?>siP%Talf+@DIgY7HNM#@;ofd zv!K4rT~7qdV}4U!0@Ie4S_L(6F~$?(U@}2gRS-Tltl4jj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2CMX+#vSmyBi|_S=AWt;Fypt#prcb+2I=d=2Bs46%lNOJ>N7_P%x<4&2xoyrh%1 zNSjl4L*E#@f2t*2a*EUaPqGt7$YykqC_Vcc{3s&==n@bagcOsCFl;=|gn|pB0s}XN zVVP*`7DzHR6qs37n3b~n+2J{sXA=T*J(Y?xU_k^)4shO`7L!Vgb7>LH0Jrrt!+{8! zj*Co8U`E)u0HiH_JBdUj($KdYER!Oi2D|~T(jxUrxG~?5o8T$v<58BCwGlMZZQz@b z%Y;lbGENk18GHAt?}K1C6r30x3x}@0&s$K8My3@Sx1Mi9?Jj7_hK2xdMZRTK!-gWp zw78HGYT1SM46O|;yd4Ew5UBN(Q2X)y(0v)+!ZtKnta=PHw0t=r>uvBVwc2xr3f;Nd zlkdstOAhDV{=!nR>zvYcPPV_EYp%3)<|hk5-q*?widPx?09=&x=(Fuaki=~n(#)lvVf>9;kTL)RCzrMK$at9E+%-cNAeu{Ep z5B)%pe$WTpFRUZ|tvzv~+}r>M%?$*%rp9NDZmC1(ST@%Q_FWknJpy1vY}vHuMS)Pu z5yUTl3Pl_L2($*mA&Sj=C{|Yqov$ngmtXiq`b*;)FVU{TRAE%M48W7M@#h%Wye5A* zAzz=9>G>i(uh8@V{_|)sfe>&LBfMIhq$qX8gU)j`Yj~u34^z9U+4anDK9SJkel8tAf*20(nlrhg$2%4iw%|#h}?83?HP$rp}2Dbpk7H etzr$c+X;C*utVvM3sua7USOZu?YPgae$hV+E-%;s delta 520 zcmX@4xm1#GIWI340}!m5teNtIV<_( zmckUwpvklG)k3CluJqKB__X|@+{BV%R-iHk5crjWGrF>YS!eQY#{8X1~PCZLy-)SDv|^ezc_4i^HWN5 zQtgTifLul(E_zI)Y2PTk+9FPNH;Z?xRDENT^NFX!= PIg@=wWclFQ!0rG5gHe+^ diff --git a/koios_python/__pycache__/transactions.cpython-311.pyc b/koios_python/__pycache__/transactions.cpython-311.pyc index 253d28718f4bc4a53ee89e94c23a980282bcd3f0..372990e5bc63a285dd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RUx&4P1zu`!ZHgU3nVsR1gnA+?!6tcKtKt_y87N?%59-0as26WTFvBOx z>`XTMv4IRcfClg&8pK0r2oIxSJc35>C>q6MXbg{|aXf)0SifTK!INkbr%(z{p(#9# zrdi!@&fqjk<5@I|=g=J9i}vDqG>;e10yz)o)TelKcP@00OE%QR!v_|f@1aRp;6*qh zjKVdcpZCHKLPkjXA?K+I$sp_#Z&G#4`>~J|VcB=Tko3W)zN0WBb*ckKO~RQ%v6wGq zJ+LN4gbyTmS~B1hX@d8_Z&Ct&m7*{tKMP+fenozq{KBWX6)#kjsG_*a$CTey5>yU|r4qIA+hGn!%6uk#Uj(62+|~?eAdj zxT|!g60YimcZk1>W%WQjsPnxr6V#zAC_^@=!8F;=1vO=d+uzIFJ6*Mnsidp6!zJS1 z!LoKigR1j=(68zcR%JM-YOtH^Csj=`-2Oi19&puerUqTr4;P5vU|GW#LpnbKogp1I zNyL0e13e@|CZs9jZu+NyQRSjwERjC%{E zsa42;`703vqm<#8tbGAzHP@sU4}Cqlki2y zRk)<@hfRG0Ug^9J#jclOSA4FmBDa(EGfCo>lY%`%b~{awyaz7FQ^)D2wq**1g8o(6 z0fL%$)wHrF>>w?u6d_ubGP#_ccN{xROAQo_6ipP(1f(OIwbqLzJ3>oQ3i>r*DbXX< zycx&ImtZXsf%A!-<(jx=S*Cp#ZQ4cAN3oltpTeLRpcteWq8KKqNlw--td$&lgqB7r z#wf<=VX$OpicTh5B6riVCun^S#Uw?Ff=-A%&Giz#K`vkC>^EuUG6lVZ3_fzQkE4#9CYf!JyY5ik( jgE!?VY~|L?{EU4Sp4+ac3p`KK|C&Fs`Y(TT%2Iy^QWs8D diff --git a/koios_python/account.py b/koios_python/account.py index f524e86..b923d6b 100644 --- a/koios_python/account.py +++ b/koios_python/account.py @@ -203,4 +203,27 @@ def get_account_history(self, *args): get_format = {"_stake_addresses": [args], "_epoch_no": epoch} history = requests.post(self.ACCOUNT_HISTORY_URL, json= get_format, timeout=timeout) history = json.loads(history.content) - return history \ No newline at end of file + return history + +@Exception_Handler +def get_account_txs(self, stake_address, after_block=None): + """ + Get the transaction hash list of input payment credential array (stake key), optionally + filtering after specified block height (inclusive). + + :param str stake_address: str stake address (stake1...) + :param int after_block: filtering after block (inclusive) defaul is None, from the beginning + :return: list of address transactions. + :rtype: list. + """ + timeout = get_timeout() + + if after_block is None: + get_format = {"_stake_address": stake_address} + txs_list = requests.post(self.ACCOUNT_TX_URL, json = get_format, timeout=timeout) + txs_list = json.loads(txs_list.content) + else: + get_format = {"_stake_address": stake_address, "_after_block_height": after_block} + txs_list = requests.post(self.ACCOUNT_TXS_URL, json = get_format, timeout=timeout) + txs_list = json.loads(txs_list.content) + return txs_list \ No newline at end of file diff --git a/koios_python/address.py b/koios_python/address.py index 81fd9e9..10963b0 100644 --- a/koios_python/address.py +++ b/koios_python/address.py @@ -42,7 +42,7 @@ def get_address_txs(self, *address_tx, after_block=0): return hash_list @Exception_Handler -def get_credential_utxos(self, *payment_credentials, content_range="0-5"): +def get_credential_utxos(self, *payment_credentials, content_range="0-999"): """ Get a list of UTxO against input payment credential array including their balances. @@ -77,7 +77,7 @@ def get_address_assets(self, *args): @Exception_Handler -def get_credential_txs(self, *payment_credentials, after_block_height=0, content_range="0-15"): +def get_credential_txs(self, *payment_credentials, after_block_height=0, content_range="0-999"): """ Get the transaction hash list of input payment credential array (stake key), optionally filtering after specified block height (inclusive). @@ -93,4 +93,32 @@ def get_credential_txs(self, *payment_credentials, after_block_height=0, content txs_list = requests.post(self.ADDRESS_CREDENTIAL_TXS_URL, json = get_format, headers=custom_headers, timeout=timeout) txs_list = json.loads(txs_list.content) - return txs_list \ No newline at end of file + return txs_list + +@Exception_Handler +def get_address_utxos(self, *addresses, extended=False, content_range="0-999"): + """ + Get the UTxO set for a given address. + + :param list address: Array of Cardano payment address(es) + :param bool extended: extended flag to toggle additional fields (optional, default is False) + return: list of utxos + :rtype: list. + """ + + if extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + if extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + return utxos \ No newline at end of file diff --git a/koios_python/asset.py b/koios_python/asset.py index 4bfed59..d0ff48d 100644 --- a/koios_python/asset.py +++ b/koios_python/asset.py @@ -234,3 +234,30 @@ def get_asset_txs(self, asset_policy, asset_name, after_block_height=0, history= txs = json.loads(txs.content) return txs + +@Exception_Handler +def get_asset_utxos(self, *asset_list, extended=False, content_range="0-999"): + """ + Get the UTXO information of a list of assets including + + :param list of assets + :param bool extended: extended UTXO information + :return: list of utxos + :rtype: list. + """ + if extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range),} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + if extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range),} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + return utxos \ No newline at end of file diff --git a/koios_python/ogmios.py b/koios_python/ogmios.py new file mode 100644 index 0000000..07346c3 --- /dev/null +++ b/koios_python/ogmios.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +""" +Provides all address functions +""" +import json +import requests +from .environment import * + + +@Exception_Handler +def query_tip(self, query, *params): + """ + Query the current tip of the Network. + + :param str query: query to search and read data from Ogmios. + :param dict params: parameters to search and read data. + :return: list of all info about query. + :rtype: list. + """ + print(f"Querying {self.url}...") + timeout = get_timeout() + get_format = {"jsonrpc": "2.0", "method": query} + tip = requests.post(self.url, json = get_format, timeout=timeout) + tip = json.loads(tip.content) + return tip \ No newline at end of file diff --git a/koios_python/scripts.py b/koios_python/scripts.py index 1872e1b..05e3bee 100644 --- a/koios_python/scripts.py +++ b/koios_python/scripts.py @@ -18,9 +18,9 @@ def get_native_script_list(self, content_range="0-999"): """ timeout = get_timeout() custom_headers = {"Range": str(content_range)} - get_format = requests.post(self.NATIVE_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) - get_format = json.loads(get_format.content) - return get_format + script_list = requests.post(self.NATIVE_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) + script_list = json.loads(script_list.content) + return script_list @Exception_Handler @@ -34,9 +34,9 @@ def get_plutus_script_list(self, content_range="0-999"): """ timeout = get_timeout() custom_headers = {"Range": str(content_range)} - get_format = requests.post(self.PLUTUS_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) - get_format = json.loads(get_format.content) - return get_format + script_list = requests.post(self.PLUTUS_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) + script_list = json.loads(script_list.content) + return script_list @Exception_Handler @@ -49,9 +49,9 @@ def get_script_redeemers(self, script_hash): :rtype: list. """ timeout = get_timeout() - query = requests.get(self.SCRIPT_REDEEMERS_URL + script_hash, timeout=timeout) - query = json.loads(query.content) - return query + script_redeemers = requests.get(self.SCRIPT_REDEEMERS_URL + script_hash, timeout=timeout) + script_redeemers = json.loads(script_redeemers.content) + return script_redeemers @Exception_Handler @@ -64,7 +64,48 @@ def get_datum_info(self, *datum_hash): :rtype: list. ''' timeout = get_timeout() - custom_headers = {"_datum_hashes": [datum_hash]} - get_format = requests.post(self.DATUM_INFO_URL, json = custom_headers, timeout=timeout) - get_format = json.loads(get_format.content) - return get_format \ No newline at end of file + get_format = {"_datum_hashes": [datum_hash]} + datum_info = requests.post(self.DATUM_INFO_URL, json = get_format, timeout=timeout) + datum_info = json.loads(datum_info.content) + return datum_info + +@Exception_Handler +def get_script_utxos(self, script_hash, extended=False, content_range="0-999"): + """ + Get list of all UTxOs for a given script hash + + :params string script_hash: script hash in hexadecimal format (hex) to search and read data. + :params bool extended: extended output format, default is False. + :return: list of all UTxOs for a given script hash. + :rtype: list. + """ + if extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + utxos_list = requests.get(f"{self.SCRIPT_UTXOS_URL}{script_hash}&_extended={extended}", timeout=timeout, headers = custom_headers) + utxos_list = json.loads(utxos_list.content) + else: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + utxos_list = requests.get(f"{self.SCRIPT_UTXOS_URL}{script_hash}&_extended={extended}", timeout=timeout, headers=custom_headers) + utxos_list = json.loads(utxos_list.content) + + return utxos_list + +@Exception_Handler +def get_script_info(self, *script_hashes, content_range="0-999"): + """ + Get list of script information for given script hashes + + :params list script_hashes: Array of script hashes in hexadecimal format (hex) to search and read data. + :return: list of script information for given script hashes. + :rtype: list. + """ + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + get_format = {"_script_hashes": [script_hashes]} + script_info = requests.post(self.SCRIPT_INFO_URL, json = get_format, timeout=timeout, headers=custom_headers) + script_info = json.loads(script_info.content) + return script_info \ No newline at end of file diff --git a/koios_python/transactions.py b/koios_python/transactions.py index dff72e1..2e2c44b 100644 --- a/koios_python/transactions.py +++ b/koios_python/transactions.py @@ -102,4 +102,20 @@ def get_tx_status(self, *args): get_format = {"_tx_hashes": [args]} tx_status = requests.post(self.TX_STATUS_URL, json = get_format, timeout=timeout) tx_status = json.loads(tx_status.content) - return tx_status \ No newline at end of file + return tx_status + +@Exception_Handler +def get_utxo_info(self, *args, extended=False, content_range="0-999"): + """ + Get UTxO set for requested UTxO references. + + :param list utxo_hash: Array of Cardano utxo references in the form "hash#index" + :return: list of all info about UTxO(s). + :rtype: list. + """ + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + get_format = {"_utxo_refs": [args], "_extended": extended} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + return utxo_info \ No newline at end of file diff --git a/koios_python/urls.py b/koios_python/urls.py index 63d71ca..68db347 100644 --- a/koios_python/urls.py +++ b/koios_python/urls.py @@ -8,24 +8,26 @@ class URLs: from .epoch import get_epoch_info, get_epoch_params, get_epoch_block_protocols from .network import get_tip, get_genesis, get_totals, get_param_updates, get_treasury_withdrawals, get_reserve_withdrawals from .block import get_blocks, get_block_info, get_block_txs - from .address import get_address_info, get_address_txs, get_address_assets, get_credential_txs, get_credential_utxos + from .address import get_address_info, get_address_txs, get_address_assets, get_credential_txs, get_credential_utxos,\ + get_address_utxos from .account import get_account_info, get_account_info_cached, get_account_list, get_account_rewards, get_account_utxos,\ - get_account_updates, get_account_addresses, get_account_assets, get_account_history, get_account_assets_paginated - + get_account_updates, get_account_addresses, get_account_assets, get_account_history, get_account_assets_paginated, get_account_txs from .asset import get_asset_list, get_asset_addresses, get_asset_info, get_asset_history, get_policy_asset_info, \ get_asset_summary, get_asset_txs, get_asset_info_bulk, get_asset_token_registry, get_asset_nft_address,\ - get_policy_asset_addresses, get_policy_asset_list + get_policy_asset_addresses, get_policy_asset_list, get_asset_utxos from .pool import get_pool_list, get_pool_info, get_pool_stake_snapshot, get_pool_delegators, get_pool_delegators_history, get_pool_blocks, \ get_pool_history, get_pool_updates, get_pool_relays, get_pool_metadata, get_pool_registrations, get_pool_retirements - from .scripts import get_native_script_list, get_plutus_script_list, get_script_redeemers, get_datum_info - from .transactions import get_tx_info, get_tx_utxos, get_tx_metadata, get_tx_metalabels, submit_tx, get_tx_status + from .scripts import get_native_script_list, get_plutus_script_list, get_script_redeemers, get_datum_info, get_script_utxos, get_script_info + from .transactions import get_tx_info, get_tx_utxos, get_tx_metadata, get_tx_metalabels, submit_tx, get_tx_status, get_utxo_info + from .ogmios import query_tip - def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): + def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', server='koios'): self.version = 'koios-python v1.3.1' self.url = url self.network = network + self.server = server # change subdomain to network name then change the rest of urls to use the new subdomain if self.network == 'preview' or self.network == 'preprod': @@ -35,6 +37,13 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): self.url = 'https://' + self.url elif self.network == 'mainnet': self.url = url + + if self.server == "ogmios": + self.url = url + "ogmios/" + + if self.server == "koios": + self.url = url + # Network URLs @@ -62,6 +71,7 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): self.TX_METALABELS_URL = self.url + "tx_metalabels" self.SUBMIT_TX_URL = self.url + "submittx" self.TX_STATUS_URL = self.url + "tx_status" + self.UTXO_INFO_URL = self.url + "utxo_info" # Address URLs self.ADDRESS_INFO_URL = self.url + "address_info" @@ -69,6 +79,7 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): self.ADDRESS_ASSETS_URL = self.url + "address_assets" self.ADDRESS_CREDENTIAL_TXS_URL = self.url + "credential_txs" self.ADDRESS_CREDENTIAL_UTXOS_URL = self.url + "credential_utxos" + self.ADDRESS_UTXOS_URL = self.url + "address_utxos" # Stake Account URLs self.ACCOUNT_LIST_URL = self.url + "account_list?offset=" @@ -81,7 +92,7 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): #self.ACCOUNT_ASSETS_URL = self.url + "account_assets?offset=" self.ACCOUNT_ASSETS_URL = self.url + "account_assets" self.ACCOUNT_HISTORY_URL = self.url + "account_history" - self.ACCOUNT_TXS = self.url + "account_txs" + self.ACCOUNT_TXS_URL = self.url + "account_txs" # Asset URLs self.ASSET_LIST_URL = self.url + "asset_list" @@ -96,6 +107,7 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): self.ASSET_TOKEN_REGISTRY_URL = self.url + "asset_token_registry" self.POLICY_ASSET_ADDRESSES_LIST_URL = self.url + "policy_asset_addresses?_asset_policy=" self.POLICY_ASSET_LIST_URL = self.url + "policy_asset_list?_asset_policy=" + self.ASSET_UTXOS_URL = self.url + "asset_utxos" # Pool URLs self.POOL_LIST_URL = self.url + "pool_list" @@ -116,3 +128,5 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet'): self.PLUTUS_SCRIPT_LIST_URL = self.url + "plutus_script_list" self.SCRIPT_REDEEMERS_URL = self.url + "script_redeemers?_script_hash=" self.DATUM_INFO_URL = self.url + "datum_info" + self.SCRIPT_UTXOS_URL = self.url + "script_utxos?_script_hash=" + self.SCRIPT_INFO_URL = self.url + "script_info" \ No newline at end of file diff --git a/tests.py b/tests.py index 5044684..cd180ad 100644 --- a/tests.py +++ b/tests.py @@ -25,7 +25,7 @@ ############################################################ -## MAINNET PARAMETERS +## MAINNET PARAMETERS (simple TESTS) # Default Koios Endpoint kp = koios_python.URLs() # We need to create an instance of the class URLs @@ -54,9 +54,48 @@ # pp.pp(kp.get_reserve_withdrawals()) +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_account_txs('stake1u8yxtugdv63wxafy9d00nuz6hjyyp4qnggvc9a3vxh8yl0ckml2uz', after_block=7981396)) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv", +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], +# extended=False)) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_asset_list(content_range="0-2")) + +# pp.pp(kp.get_asset_utxos(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"], +# ["f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a","6b6f696f732e72657374"], +# extended=False)) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_script_utxos(script_hash="d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8", extended=True)) + +# print('------------------------------------------------------------------------------------------') + +# pp.pp(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0" +# ], extended=True)) + +# print('------------------------------------------------------------------------------------------') +# pp.pp(kp.get_script_info( [ +# "bd2119ee2bfb8c8d7c427e8af3c35d537534281e09e23013bca5b138", +# "c0c671fba483641a71bb92d3a8b7c52c90bf1c01e2b83116ad7d4536" +# ])) + print('------------------------------------------------------------------------------------------') -pp.pp(kp.get_account_txs('stake1u8yxtugdv63wxafy9d00nuz6hjyyp4qnggvc9a3vxh8yl0ckml2uz', after_block=50000)) +kp_ogmios = koios_python.URLs(server="ogmios") +print(kp_ogmios.url, kp_ogmios.server) +pp.pp(kp_ogmios.query_tip(query="queryLedgerState/tip")) + + + ''' pp.pp(kp.get_tip()) @@ -149,6 +188,8 @@ pp.pprint(get_epoch_320_info_false) ''' +############################################################ + ############################################################ # Custom Koios Endpoint From 1007cbfb778ba3be6b6c12a55958db0ace20b7e6 Mon Sep 17 00:00:00 2001 From: Wael Date: Sat, 18 Nov 2023 14:32:42 -0800 Subject: [PATCH 03/14] update ogmios query --- .../__pycache__/ogmios.cpython-311.pyc | Bin 1215 -> 1160 bytes koios_python/__pycache__/urls.cpython-311.pyc | Bin 9958 -> 9954 bytes koios_python/ogmios.py | 2 +- koios_python/urls.py | 2 +- tests.py | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koios_python/__pycache__/ogmios.cpython-311.pyc b/koios_python/__pycache__/ogmios.cpython-311.pyc index ada301fd73aaa4968e60e3ef5b6cf56762d0a44d..684705b2f4c80158301a775c1acf9c324c3320c4 100644 GIT binary patch delta 194 zcmdnb*}=)XoR^o20SMNrN2c~nPeTMNT7pqkYn zgBt1c#E^JG_|NQz9h4t zNCK#hdvZK;Q7XqR_W1ae{N(ufB2J)S5g(Aa#hsd0mRXdamz$bba*HJuXj%~~NL5aUk)F!zMRBr8Fniu1FrpWd!2l^vT*RMnX3j PL@%JC$+0ZzEFhf#w_ibG diff --git a/koios_python/__pycache__/urls.cpython-311.pyc b/koios_python/__pycache__/urls.cpython-311.pyc index 1fbe31dd0e746c9a339ac843d885a99d34187db0..360736e5e906a108e901793c71a34a900ab69481 100644 GIT binary patch delta 55 ycmaFn`^cAfIWI340}$*{k4$~Lkyo9ajkT~ewWxBl9s46W0oe;IC}^^Q+BN{@IuUOG delta 59 zcmaFl`^=YjIWI340}w2D5tjOKBd Date: Mon, 22 Jan 2024 11:40:48 -0800 Subject: [PATCH 04/14] Untrack files in .gitignore --- .gitignore | 1 + koios_python.egg-info/PKG-INFO | 133 ----- koios_python.egg-info/SOURCES.txt | 19 - koios_python.egg-info/dependency_links.txt | 1 - koios_python.egg-info/top_level.txt | 1 - test_koios_nets.py | 665 --------------------- tests.py | 17 +- 7 files changed, 9 insertions(+), 828 deletions(-) delete mode 100644 koios_python.egg-info/PKG-INFO delete mode 100644 koios_python.egg-info/SOURCES.txt delete mode 100644 koios_python.egg-info/dependency_links.txt delete mode 100644 koios_python.egg-info/top_level.txt delete mode 100644 test_koios_nets.py diff --git a/.gitignore b/.gitignore index ab096e8..0670472 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build dist koios_python.egg-info .DS_Store +.env \ No newline at end of file diff --git a/koios_python.egg-info/PKG-INFO b/koios_python.egg-info/PKG-INFO deleted file mode 100644 index 8486b2f..0000000 --- a/koios_python.egg-info/PKG-INFO +++ /dev/null @@ -1,133 +0,0 @@ -Metadata-Version: 2.1 -Name: koios-python -Version: 1.3.1 -Summary: Python wrapper Library using Koios API for accessing information stored on the Cardano Blockchain -Home-page: https://github.com/QuixoteSystems -Author: Quixote Stake Pool -Author-email: quixotepool@proton.me -License: MIT -Keywords: koios,blockchain,cardano,API,REST,RESTful -Classifier: Development Status :: 4 - Beta -Classifier: Intended Audience :: Developers -Classifier: Topic :: Software Development :: Build Tools -Classifier: License :: OSI Approved :: MIT License -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3 :: Only -Description-Content-Type: text/markdown -License-File: LICENSE.md - -![koios-python](https://user-images.githubusercontent.com/82296005/194378368-6d2de904-8eec-48bf-a0d9-37118f299470.png) - -# Koios Python ![PyPI - Python Version](https://img.shields.io/badge/python-%3E%3D3.8-blue) [![PyPI - Python Version](https://img.shields.io/badge/pypi%20package-v1.3.0-green)](https://pypi.org/project/koios-python/) - -## Overview -**Koios Python** is Python wrapper which allow interacting with all information and parameters stored on the Cardano blockchain using [Koios REST API](https://api.koios.rest/) - - -## What is Koios Python? -**Koios Python** is a library based on [Koios](https://www.koios.rest/) Elastic Query Layer for [Cardano Node](https://github.com/input-output-hk/cardano-node/) by [Cardano Community Guild Operators](https://github.com/cardano-community).
-**Koios** is best described as a Decentralized and Elastic RESTful query layer for exploring data on Cardano blockchain to consume within applications/wallets/explorers/etc.

-**Koios** is really useful for developers because resource and maintenance requirements for Cardano blockchain components (e.g. cardano-node, cardano-db-sync) are ever-growing. It also simplifies how to query complex information from the blockchain. - -This library allows getting data from the Cardano Blockchain using a simple syntaxis in your Python code. All the querys follow Koios API REST operations. - -Required Python Modules --------------- -* https://pypi.python.org/pypi/requests - -## Installation [![PyPI Latest Release](https://img.shields.io/pypi/v/koios-python.svg)](https://pypi.org/project/koios-python/) -```python -pip install koios_python -``` - -## Upgrade to the last Version -```python -pip install --upgrade koios_python -``` - -## Usage -Import to your python file this library: - -```python -import koios_python -``` - -You can read all info about how works this library in our [Wiki](https://github.com/cardano-community/koios-python/wiki) - -## TODO - -- [ ] Adding Pagination for all queries where makes sense (At the moment, there are a bunch with this feature) -- [x] Managing errors - - [x] Inside functions - - [ ] Pagination - - [x] User Inputs - - [x] Timeouts -- [ ] Adding Vertical Filtering -- [ ] Adding Async methods - - - - - -## Features -- Supported REST Services: - - [x] Network - - Chain Tip - - Genesis Info - - Historical Tokenomic Statistics - - [x] Epoch - - Epoch Information - - Epoch's Protocol Parameters - - Epoch Blocks Protocol - - [x] Block - - Block List - - Block Information - - Block Transactions - - [x] Transactions - - Transaction Information - - Transaction UTxOs - - Transaction Metadata - - Transaction Metadata Labels - - Transaction Submission - - Transaction Status (Block Confirmations) - - [x] Address - - Address Information - - Address Transactions - - Transactions from Payment Credentials - - Address Assets - - [x] Account - - Account List - - Account Information - - Account Information Cached - - Account Rewards - - Account Updates (History) - - Account Addresses - - Account Assets - - Account History - - [x] Asset - - Asset List - - Asset Address List - - Asset Information - - Asset History - - Asset Policy Information - - Asset Summary - - Asset Transaction History - - [x] Pool - - Pool List - - Pool Information - - Stake Snapshot - - Pool Delegators List - - Pool Blocks - - Pool Stake, Block and Reward History - - Pool Updates (History) - - Pool Relays - - Pool Metadata - - [x] Script - - Native Script List - - Plutus Script List - - Script Redeemers - - Datum Information - diff --git a/koios_python.egg-info/SOURCES.txt b/koios_python.egg-info/SOURCES.txt deleted file mode 100644 index 67f7d1f..0000000 --- a/koios_python.egg-info/SOURCES.txt +++ /dev/null @@ -1,19 +0,0 @@ -LICENSE.md -README.md -setup.py -koios_python/__init__.py -koios_python/account.py -koios_python/address.py -koios_python/asset.py -koios_python/block.py -koios_python/environment.py -koios_python/epoch.py -koios_python/network.py -koios_python/pool.py -koios_python/scripts.py -koios_python/transactions.py -koios_python/urls.py -koios_python.egg-info/PKG-INFO -koios_python.egg-info/SOURCES.txt -koios_python.egg-info/dependency_links.txt -koios_python.egg-info/top_level.txt \ No newline at end of file diff --git a/koios_python.egg-info/dependency_links.txt b/koios_python.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/koios_python.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/koios_python.egg-info/top_level.txt b/koios_python.egg-info/top_level.txt deleted file mode 100644 index 5073aeb..0000000 --- a/koios_python.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -koios_python diff --git a/test_koios_nets.py b/test_koios_nets.py deleted file mode 100644 index ab549e8..0000000 --- a/test_koios_nets.py +++ /dev/null @@ -1,665 +0,0 @@ -#!/usr/bin/env python -""" -TESTING SCRIPT FOR KOIOS_PYTHON USING PYTEST (MAINNET & TESTNET) - -Main purpose of this script is to ensure basic functionality of the koios-python library and -its features are working with the current version of the Koios REST API. - -It will help test basic edge cases and ensure that the library is working as expected. - -To use this script, you must have pytest installed. - -You can install pytest using pip: -pip install pytest - -After you have downloaded/cloned this repo and installed pytest, you can run this script -First change directory to the folder containing this repo and script then simply run the -following command in your terminal: - -pytest test_koios_nets.py - -Watch the terminal for the results of the tests. :) - -""" - -import pytest -import koios_python as kp - -# create a new url object with your own url or use koios.rest url by default -kp_mainnet_server = kp.URLs() - -# Koios server switching to testnet default is mainnet and this feature only works for standard Koios rest api server api.koios.rest/api/v0 -kp_testnet_server = kp.URLs( network='testnet') - - -# test network switching by trying to switch back to mainnet -def test_network_switch(): - - kp_test = kp.URLs(network='testnet') - genesis_info_testnet = kp_test.get_genesis() - # check if we are on testnet - assert genesis_info_testnet[0]['networkid'] == 'Testnet' - # switch back to mainnet - kp_test = kp.URLs(network='mainnet') - genesis_info_mainnet = kp_test.get_genesis() - # check if we are on mainnet - assert genesis_info_mainnet[0]['networkid'] == 'Mainnet' - - -############################################################################## -# ACCOUNT FUNCTIONS - -# 1- get account list -def test_get_account_list(): - - # get account list from mainnet server - account_list_mainnet = kp_mainnet_server.get_account_list() - assert len(account_list_mainnet) > 0 - assert 'code' not in account_list_mainnet[0] - - # get account list from testnet server - account_list_testnet = kp_testnet_server.get_account_list() - assert len(account_list_testnet) > 0 - assert 'code' not in account_list_testnet[0] - -# 2- get account info -def test_get_account_info(): - - # get account info from mainnet server - account_info_mainnet = kp_mainnet_server.get_account_info("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_info_mainnet) > 0: - assert 'code' not in account_info_mainnet[0] - assert len(account_info_mainnet) > 0 - - # get account info from testnet server - account_info_testnet = kp_testnet_server.get_account_info("stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj") - if len(account_info_testnet) > 0: - assert 'code' not in account_info_testnet[0] - assert len(account_info_testnet) > 0 - -# 3- get account rewards -def test_get_account_rewards(): - - # get account rewards from mainnet server - account_rewards_mainnet = kp_mainnet_server.get_account_rewards("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - # get account rewards by epoch - account_rewards_mainnet_epoch = kp_mainnet_server.get_account_rewards("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250", 350) - # Check for error code in response and empty list - if len(account_rewards_mainnet) > 0 and len(account_rewards_mainnet_epoch) > 0: - assert 'code' not in account_rewards_mainnet[0] and 'code' not in account_rewards_mainnet_epoch[0] - assert len(account_rewards_mainnet) > 0 and len(account_rewards_mainnet_epoch) > 0 - - # get account rewards from testnet server - account_rewards_testnet = kp_testnet_server.get_account_rewards("stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj") - # get account rewards by epoch - account_rewards_testnet_epoch = kp_testnet_server.get_account_rewards("stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj", 200) - # Check for error code in response and empty list - if len(account_rewards_testnet) > 0 and len(account_rewards_testnet_epoch) > 0: - assert 'code' not in account_rewards_testnet[0] and 'code' not in account_rewards_testnet_epoch[0] - -# 4- get account updates -def test_get_account_updates(): - - account_updates_mainnet = kp_mainnet_server.get_account_updates("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_updates_mainnet) > 0: - assert 'code' not in account_updates_mainnet[0] - assert len(account_updates_mainnet) > 0 - - account_updates_testnet = kp_testnet_server.get_account_updates("stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj") - if len(account_updates_testnet) > 0: - assert 'code' not in account_updates_testnet[0] - -# 5- get account addresses -def test_get_account_addresses(): - - account_assets_mainnet = kp_mainnet_server.get_account_addresses("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_assets_mainnet) > 0: - assert 'code' not in account_assets_mainnet[0] - - account_assets_testnet = kp_testnet_server.get_account_addresses(["stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj", - "stake_test1uq7g7kqeucnqfweqzgxk3dw34e8zg4swnc7nagysug2mm4cm77jrx"]) - if len(account_assets_testnet) > 0: - assert 'code' not in account_assets_testnet[0] - - -# 6- get account assets -def test_get_account_assets(): - - account_assets_mainnet = kp_mainnet_server.get_account_assets("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_assets_mainnet) > 0: - assert 'code' not in account_assets_mainnet[0] - - account_assets_testnet = kp_testnet_server.get_account_assets(["stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj", - "stake_test1uq7g7kqeucnqfweqzgxk3dw34e8zg4swnc7nagysug2mm4cm77jrx"]) - if len(account_assets_testnet) > 0: - assert 'code' not in account_assets_testnet[0] - - -# 7- get account history -def test_get_account_history(): - - account_history_mainnet = kp_mainnet_server.get_account_history(["stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250", - "stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy"]) - if len(account_history_mainnet) > 0: - assert 'code' not in account_history_mainnet[0] - - account_history_testnet = kp_testnet_server.get_account_history(["stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj", - "stake_test1uq7g7kqeucnqfweqzgxk3dw34e8zg4swnc7nagysug2mm4cm77jrx"]) - if len(account_history_testnet) > 0: - assert 'code' not in account_history_testnet[0] - -############################################################################## -# ADDRESS FUNCTIONS - -# 1- get address info -def test_get_address_info(): - - address_info_mainnet = kp_mainnet_server.get_address_info("addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g") - if len(address_info_mainnet) > 0: - assert 'code' not in address_info_mainnet[0] - - address_info_testnet = kp_testnet_server.get_address_info("addr_test1qzx9hu8j4ah3auytk0mwcupd69hpc52t0cw39a65ndrah86djs784u92a3m5w475w3w35tyd6v3qumkze80j8a6h5tuqq5xe8y") - if len(address_info_testnet) > 0: - assert 'code' not in address_info_testnet[0] - -# 2- get address transactions -def test_get_address_transactions(): - - address_txs_mainnet = kp_mainnet_server.get_address_txs(["addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g", - "addr1qyfldpcvte8nkfpyv0jdc8e026cz5qedx7tajvupdu2724tlj8sypsq6p90hl40ya97xamkm9fwsppus2ru8zf6j8g9sm578cu"]) - if len(address_txs_mainnet) > 0: - assert 'code' not in address_txs_mainnet[0] - - address_txs_testnet = kp_testnet_server.get_address_txs(["addr_test1qzx9hu8j4ah3auytk0mwcupd69hpc52t0cw39a65ndrah86djs784u92a3m5w475w3w35tyd6v3qumkze80j8a6h5tuqq5xe8y", - "addr_test1qrk7920v35zukhcch4kyydy6rxnhqdcvetkvngeqrvtgavw8tpzdklse3kwer7urhrlfg962m9fc8cznfcdpka5pd07sgf8n0w"]) - if len(address_txs_testnet) > 0: - assert 'code' not in address_txs_testnet[0] - - address_txs_after_block = kp_mainnet_server.get_address_txs("addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g",1) - if len(address_txs_after_block) > 0: - assert 'code' not in address_txs_after_block[0] - -# 3- get address assets -def test_get_address_assets(): - - - address_assets_mainnet = kp_mainnet_server.get_address_assets("addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g") - if len(address_assets_mainnet) >0: - assert 'code' not in address_assets_mainnet[0] - - address_assets_testnet = kp_testnet_server.get_address_assets("addr_test1qrk7920v35zukhcch4kyydy6rxnhqdcvetkvngeqrvtgavw8tpzdklse3kwer7urhrlfg962m9fc8cznfcdpka5pd07sgf8n0w") - if len(address_assets_testnet) >0: - assert 'code' not in address_assets_testnet[0] - -# 4- get payment credentials hash -def test_get_credentials(): - - - credentials_mainnet = kp_mainnet_server.get_credential_txs('025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52') - if len(credentials_mainnet) > 0: - assert 'code' not in credentials_mainnet[0] - - credentials_testnet = kp_testnet_server.get_credential_txs('00003fac863dc2267d0cd90768c4af653572d719a79ca3b01957fa79') - if len(credentials_testnet) > 0: - assert 'code' not in credentials_testnet[0] - - credentials_after_block = kp_mainnet_server.get_credential_txs('025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52',6238675) - if len(credentials_after_block) > 0: - assert 'code' not in credentials_after_block[0] - - credentials_after_block_testnet = kp_testnet_server.get_credential_txs('00003fac863dc2267d0cd90768c4af653572d719a79ca3b01957fa79',2342661) - if len(credentials_after_block_testnet) > 0: - assert 'code' not in credentials_after_block_testnet[0] - -############################################################################## -# ASSET FUNCTIONS - -# 1- get asset list of all native tokens -def test_get_asset_list(): - - - asset_list_mainnet = kp_mainnet_server.get_asset_list() - if len(asset_list_mainnet) > 0: - assert 'code' not in asset_list_mainnet[0] - - asset_list_testnet = kp_testnet_server.get_asset_list() - if len(asset_list_testnet) > 0: - assert 'code' not in asset_list_testnet[0] - - -# 2- get asset address list -def test_get_asset_address_list(): - - - asset_addr_list_mainnet = kp_mainnet_server.get_asset_address_list("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_addr_list_mainnet) > 0: - assert 'code' not in asset_addr_list_mainnet[0] - - asset_addr_list_testnet = kp_testnet_server.get_asset_address_list("000327a9e427a3a3256eb6212ae26b7f53f7969b8e62d37ea9138a7b",54735465737431) - if len(asset_addr_list_testnet) > 0: - assert 'code' not in asset_addr_list_testnet[0] - - -# 3- get asset info -def test_get_asset_info(): - - - asset_info_mainnet = kp_mainnet_server.get_asset_info("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_info_mainnet) > 0: - assert 'code' not in asset_info_mainnet[0] - - asset_info_testnet = kp_testnet_server.get_asset_info("000327a9e427a3a3256eb6212ae26b7f53f7969b8e62d37ea9138a7b",54735465737431) - if len(asset_info_testnet) > 0: - assert 'code' not in asset_info_testnet[0] - -# 4- get asset history -def test_get_asset_history(): - - asset_history_mainnet = kp_mainnet_server.get_asset_history("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_history_mainnet) > 0: - assert 'code' not in asset_history_mainnet[0] - - asset_history_testnet = kp_testnet_server.get_asset_history("000327a9e427a3a3256eb6212ae26b7f53f7969b8e62d37ea9138a7b",54735465737431) - if len(asset_history_testnet) > 0: - assert 'code' not in asset_history_testnet[0] - -# 5- get asset policy info -def test_get_asset_policy_info(): - - - asset_policy_info_mainnet = kp_mainnet_server.get_asset_policy_info("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501") - if len(asset_policy_info_mainnet) > 0: - assert 'code' not in asset_policy_info_mainnet[0] - - asset_policy_info_testnet = kp_testnet_server.get_asset_policy_info("000327a9e427a3a3256eb6212ae26b7f53f7969b8e62d37ea9138a7b") - if len(asset_policy_info_testnet) > 0: - assert 'code' not in asset_policy_info_testnet[0] - -# 6- get asset summary -def test_get_asset_summary(): - - - asset_summary_mainnet = kp_mainnet_server.get_asset_summary('750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', '424f4f4b') - if len(asset_summary_mainnet) > 0: - assert 'code' not in asset_summary_mainnet[0] - - asset_summary_testnet = kp_testnet_server.get_asset_summary("000327a9e427a3a3256eb6212ae26b7f53f7969b8e62d37ea9138a7b",54735465737431) - if len(asset_summary_testnet) > 0: - assert 'code' not in asset_summary_testnet[0] - -# 7- get asset transaction history -def test_get_asset_txs_history(): - - - asset_txs_history_mainnet = kp_mainnet_server.get_asset_txs('750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501','424f4f4b') - if len(asset_txs_history_mainnet) > 0: - assert 'code' not in asset_txs_history_mainnet[0] - - asset_txs_history_testnet = kp_testnet_server.get_asset_txs('000327a9e427a3a3256eb6212ae26b7f53f7969b8e62d37ea9138a7b',54735465737431) - if len(asset_txs_history_testnet) > 0: - assert 'code' not in asset_txs_history_testnet[0] - -############################################################################## - -# BLOCK FUNCTIONS - -# 1- get list of blocks -def test_get_blocks(): - - blocks_mainnet_server = kp_mainnet_server.get_blocks() - assert 'code' not in blocks_mainnet_server[0] - - blocks_testnet_server = kp_testnet_server.get_blocks() - assert 'code' not in blocks_testnet_server[0] - -# 2- get block info -def test_get_block_info(): - - - block_info_mainnet = kp_mainnet_server.get_block_info(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30", - "60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a", - "c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015"]) - if len(block_info_mainnet) > 0: - assert 'code' not in block_info_mainnet[0] - - block_info_testnet = kp_testnet_server.get_block_info(["f75fea40852ed7d7f539d008e45255725daef8553ae7162750836f279570813a", - "ff9f0c7fb1136de2cd6f10c9a140af2887f1d3614cc949bfeb262266d4c202b7", - "5ef645ee519cde94a82f0aa880048c37978374f248f11e408ac0571a9054d9d3"]) - if len(block_info_testnet) > 0: - assert 'code' not in block_info_testnet[0] - - -# 3- get block transactions -def test_get_block_txs(): - - - block_txs_mainnet = kp_mainnet_server.get_block_txs(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30"]) - if len(block_txs_mainnet) > 0: - assert 'code' not in block_txs_mainnet[0] - - block_txs_testnet = kp_testnet_server.get_block_txs(["f75fea40852ed7d7f539d008e45255725daef8553ae7162750836f279570813a", - "ff9f0c7fb1136de2cd6f10c9a140af2887f1d3614cc949bfeb262266d4c202b7", - "5ef645ee519cde94a82f0aa880048c37978374f248f11e408ac0571a9054d9d3"]) - if len(block_txs_testnet) > 0: - assert 'code' not in block_txs_testnet[0] - -############################################################################## -# EPOCH FUNCTIONS - -# 1- get epoch info -def test_get_epoch_info(): - - epoch_info_mainnet = kp_mainnet_server.get_epoch_info() - assert 'code' not in epoch_info_mainnet[0] - - epoch_info_testnet = kp_testnet_server.get_epoch_info() - assert 'code' not in epoch_info_testnet[0] - -# 2- get epoch params -def test_get_epoch_params(): - - epoch_params_mainnet = kp_mainnet_server.get_epoch_params() - assert 'code' not in epoch_params_mainnet[0] - - epoch_params_testnet = kp_testnet_server.get_epoch_params() - assert 'code' not in epoch_params_testnet[0] - - - -############################################################################## -# NETWORK FUNCTIONS - -# 1- check tip -def test_get_tip(): - - tip_mainnet = kp_mainnet_server.get_tip() - assert 'code' not in tip_mainnet[0] - - tip_testnet = kp_testnet_server.get_tip() - assert 'code' not in tip_testnet[0] - - -# 2- check genesis info -def test_get_genesis(): - - genesis_mainnet = kp_mainnet_server.get_genesis() - assert 'code' not in genesis_mainnet[0] - - genesis_testnet = kp_testnet_server.get_genesis() - assert 'code' not in genesis_testnet[0] - -# 3- check total info -def test_get_totals(): - - epoch_totals_mainnet = kp_mainnet_server.get_totals() - assert 'code' not in epoch_totals_mainnet[0] - - epoch_totals_testnet = kp_testnet_server.get_totals() - assert 'code' not in epoch_totals_testnet[0] - - -############################################################################## -# POOL FUNCTIONS - -# 1- get list of pools on the network -def test_get_pool_list(): - - pool_list_mainnet = kp_mainnet_server.get_pool_list() - pool_list_mainnet_range = kp_mainnet_server.get_pool_list('0-10') - if len(pool_list_mainnet) > 0 and len(pool_list_mainnet_range) > 0: - assert 'code' not in pool_list_mainnet[0] and 'code' not in pool_list_mainnet_range[0] - - pool_list_testnet = kp_testnet_server.get_pool_list() - pool_list_testnet_range = kp_testnet_server.get_pool_list('0-10') - if len(pool_list_testnet) > 0 and len(pool_list_testnet_range) > 0: - assert 'code' not in pool_list_testnet[0] and 'code' not in pool_list_testnet_range[0] - - -# 2- get pool info -def test_get_pool_info(): - - pool_info_mainnet = kp_mainnet_server.get_pool_info(["pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", - "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m", - "pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm"]) - if len(pool_info_mainnet) > 0: - assert 'code' not in pool_info_mainnet[0] - assert 'code' not in pool_info_mainnet[0] - - pool_info_testnet = kp_testnet_server.get_pool_info(["pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh", - "pool102x86jz7uus6p6mlw02fdw2s805kng7g6ujs6s342t5msk36tch", - "pool103qt58f9xlsr7y9anz3lnyq6cph4xh2yr4qrrtc356ldzz6ktqz"]) - if len(pool_info_testnet) > 0: - assert 'code' not in pool_info_testnet[0] - - -# 3- get pool stake snapshot -def test_get_pool_stake_snapshot(): - - stake_snapshot_mainnet = kp_mainnet_server.get_pool_stake_snapshot("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(stake_snapshot_mainnet) > 0: - assert 'code' not in stake_snapshot_mainnet[0] - - stake_snapshot_testnet = kp_testnet_server.get_pool_stake_snapshot("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - if len(stake_snapshot_testnet) > 0: - assert 'code' not in stake_snapshot_testnet[0] - -# 4- get pool delegator information -def test_get_pool_delegators(): - - delegator_info_mainnet = kp_mainnet_server.get_pool_delegators("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(delegator_info_mainnet) > 0: - assert 'code' not in delegator_info_mainnet[0] - - delegator_info_testnet = kp_testnet_server.get_pool_delegators("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - if len(delegator_info_testnet) > 0: - assert 'code' not in delegator_info_testnet[0] - - -# 5- get pool delegator history -def test_get_pool_delegators_history(): - - delegator_history_mainnet = kp_mainnet_server.get_pool_delegators_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(delegator_history_mainnet) > 0: - assert 'code' not in delegator_history_mainnet[0] - - delegator_history_testnet = kp_testnet_server.get_pool_delegators_history("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - if len(delegator_history_testnet) > 0: - assert 'code' not in delegator_history_testnet[0] - -# 6- get pool blocks -def test_get_pool_blocks(): - - pool_blocks_mainnet = kp_mainnet_server.get_pool_blocks("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - pool_blocks_mainnet_epoch = kp_mainnet_server.get_pool_blocks("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", 350) - if len(pool_blocks_mainnet) > 0 and len(pool_blocks_mainnet_epoch) > 0: - assert 'code' not in pool_blocks_mainnet[0] and 'code' not in pool_blocks_mainnet_epoch[0] - - pool_blocks_testnet = kp_testnet_server.get_pool_blocks("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - pool_blocks_testnet_epoch = kp_testnet_server.get_pool_blocks("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh", 185) - if len(pool_blocks_testnet) > 0 and len(pool_blocks_testnet_epoch) > 0: - assert 'code' not in pool_blocks_testnet[0] - -# 7- get pool history -def test_get_pool_history(): - - pool_history_mainnet = kp_mainnet_server.get_pool_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - pool_history_mainnet_epoch = kp_mainnet_server.get_pool_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", 350) - if len(pool_history_mainnet) > 0 and len(pool_history_mainnet_epoch) > 0: - assert 'code' not in pool_history_mainnet[0] and 'code' not in pool_history_mainnet_epoch[0] - - pool_history_testnet = kp_testnet_server.get_pool_history("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - pool_history_testnet_epoch = kp_testnet_server.get_pool_history("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh", 185) - if len(pool_history_testnet) > 0 and len(pool_history_testnet_epoch) > 0: - assert 'code' not in pool_history_testnet[0] and 'code' not in pool_history_testnet_epoch[0] - -# 8- get pool updates -def test_get_pool_updates(): - - pool_updates_mainnet = kp_mainnet_server.get_pool_updates() - pool_updates_mainnet_pool = kp_mainnet_server.get_pool_updates("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(pool_updates_mainnet) > 0 and len(pool_updates_mainnet_pool) > 0: - assert 'code' not in pool_updates_mainnet[0] and 'code' not in pool_updates_mainnet_pool[0] - - pool_updates_testnet = kp_testnet_server.get_pool_updates() - pool_updates_testnet_pool = kp_testnet_server.get_pool_updates("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - if len(pool_updates_testnet) > 0 and len(pool_updates_testnet_pool) > 0: - assert 'code' not in pool_updates_testnet[0] and 'code' not in pool_updates_testnet_pool[0] - -# 9- get pool relays -def test_get_pool_relays(): - - pool_relays_mainnet = kp_mainnet_server.get_pool_relays() - pool_relays_mainnet_range = kp_mainnet_server.get_pool_relays('0-70') - if len(pool_relays_mainnet) > 0 and len(pool_relays_mainnet_range) > 0: - assert 'code' not in pool_relays_mainnet[0] and 'code' not in pool_relays_mainnet_range[0] - - pool_relays_testnet = kp_testnet_server.get_pool_relays() - pool_relays_testnet_range = kp_testnet_server.get_pool_relays('0-70') - if len(pool_relays_testnet) > 0 and len(pool_relays_testnet_range) > 0: - assert 'code' not in pool_relays_testnet[0] and 'code' not in pool_relays_testnet_range[0] - -# 10- get pool metadata -def test_get_pool_metadata(): - - pool_metadata_mainnet = kp_mainnet_server.get_pool_metadata() - pool_metadata_mainnet_pool = kp_mainnet_server.get_pool_metadata("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - pool_metadata_mainnet_pool_list = kp_mainnet_server.get_pool_metadata(["pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", - "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m"]) - if len(pool_metadata_mainnet) > 0 and len(pool_metadata_mainnet_pool) > 0 and len(pool_metadata_mainnet_pool_list) > 0: - assert 'code' not in pool_metadata_mainnet[0] and 'code' not in pool_metadata_mainnet_pool[0] and 'code' not in pool_metadata_mainnet_pool_list[0] - - pool_metadata_testnet = kp_testnet_server.get_pool_metadata() - pool_metadata_testnet_pool = kp_testnet_server.get_pool_metadata("pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh") - pool_metadata_testnet_pool_list = kp_testnet_server.get_pool_metadata(["pool102llj7e7a0mmxssjvjkv2d6lppuh6cz6q9xwc3tsksn0jqwz9eh", - "pool102x86jz7uus6p6mlw02fdw2s805kng7g6ujs6s342t5msk36tch"]) - if len(pool_metadata_testnet) > 0 and len(pool_metadata_testnet_pool) > 0 and len(pool_metadata_testnet_pool_list) > 0: - assert 'code' not in pool_metadata_testnet[0] and 'code' not in pool_metadata_testnet_pool[0] and 'code' not in pool_metadata_testnet_pool_list[0] - - -############################################################################## -# SCRIPT FUNCTIONS - -# 1- get list of native scripts on the network -def test_get_native_script_list(): - - script_list_mainnet = kp_mainnet_server.get_native_script_list() - script_list_mainnet_range = kp_mainnet_server.get_native_script_list('0-10') - if len(script_list_mainnet) > 0 and len(script_list_mainnet_range) > 0: - assert 'code' not in script_list_mainnet[0] and 'code' not in script_list_mainnet_range[0] - - script_list_testnet = kp_testnet_server.get_native_script_list() - script_list_testnet_range = kp_testnet_server.get_native_script_list('0-10') - if len(script_list_testnet) > 0 and len(script_list_testnet_range) > 0: - assert 'code' not in script_list_testnet[0] and 'code' not in script_list_testnet_range[0] - -# 2- get plutus script list -def test_get_plutus_script_list(): - - script_list_mainnet = kp_mainnet_server.get_plutus_script_list() - script_list_mainnet_range = kp_mainnet_server.get_plutus_script_list('0-10') - if len(script_list_mainnet) > 0 and len(script_list_mainnet_range) > 0: - assert 'code' not in script_list_mainnet[0] and 'code' not in script_list_mainnet_range[0] - - script_list_testnet = kp_testnet_server.get_plutus_script_list() - script_list_testnet_range = kp_testnet_server.get_plutus_script_list('0-10') - if len(script_list_testnet) > 0 and len(script_list_testnet_range) > 0: - assert 'code' not in script_list_testnet[0] and 'code' not in script_list_testnet_range[0] - - -# 3- get list of all redeemers for a given script hash -def test_get_script_redeemers(): - - script_redeemers_mainnet = kp_mainnet_server.get_script_redeemers('d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8') - if len(script_redeemers_mainnet) > 0: - assert 'code' not in script_redeemers_mainnet[0] - - script_redeemers_testnet = kp_testnet_server.get_script_redeemers('9a3910acc1e1d49a25eb5798d987739a63f65eb48a78462ffae21e6f') - if len(script_redeemers_testnet) > 0: - assert 'code' not in script_redeemers_testnet[0] - - -############################################################################## -# TRANSACTION FUNCTIONS - -# 1- get transaction(s) info -def test_tx_info(): - - tx_info_mainnet = kp_mainnet_server.get_tx_info('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_info_mainnet_list = kp_mainnet_server.get_tx_info(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_info_mainnet) > 0 and len(tx_info_mainnet_list) > 0: - assert 'code' not in tx_info_mainnet[0] and 'code' not in tx_info_mainnet_list[0] - - tx_info_testnet = kp_testnet_server.get_tx_info('928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b') - tx_info_testnet_list = kp_testnet_server.get_tx_info(['928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b', - 'c7e96e4cd6aa9e3afbc7b32d1e8023daf4197931f1ea61d2bdfc7a2e5e017cf1']) - if len(tx_info_testnet) > 0 and len(tx_info_testnet_list) > 0: - assert 'code' not in tx_info_testnet[0] and 'code' not in tx_info_testnet_list[0] - -# 2- get transaction(s) utxos -def test_get_tx_utxos(): - - tx_utxo_mainnet = kp_mainnet_server.get_tx_utxos('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_utxo_mainnet_list = kp_mainnet_server.get_tx_utxos(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_utxo_mainnet) > 0 and len(tx_utxo_mainnet_list) > 0: - assert 'code' not in tx_utxo_mainnet[0] and 'code' not in tx_utxo_mainnet_list[0] - - tx_utxo_testnet = kp_testnet_server.get_tx_utxos('928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b') - tx_utxo_testnet_list = kp_testnet_server.get_tx_utxos(['928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b', - 'c7e96e4cd6aa9e3afbc7b32d1e8023daf4197931f1ea61d2bdfc7a2e5e017cf1']) - if len(tx_utxo_testnet) > 0 and len(tx_utxo_testnet_list) > 0: - assert 'code' not in tx_utxo_testnet[0] and 'code' not in tx_utxo_testnet_list[0] - -# 3- get transaction(s) metadata -def test_get_tx_metadata(): - - tx_metadata_mainnet = kp_mainnet_server.get_tx_metadata('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_metadata_mainnet_list = kp_mainnet_server.get_tx_metadata(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_metadata_mainnet) > 0 and len(tx_metadata_mainnet_list) > 0: - assert 'code' not in tx_metadata_mainnet[0] and 'code' not in tx_metadata_mainnet_list[0] - - tx_metadata_testnet = kp_testnet_server.get_tx_metadata('928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b') - tx_metadata_testnet_list = kp_testnet_server.get_tx_metadata(['928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b', - 'c7e96e4cd6aa9e3afbc7b32d1e8023daf4197931f1ea61d2bdfc7a2e5e017cf1']) - if len(tx_metadata_testnet) > 0 and len(tx_metadata_testnet_list) > 0: - assert 'code' not in tx_metadata_testnet[0] and 'code' not in tx_metadata_testnet_list[0] - -# 4- get transaction(s) metadata labels -def test_get_tx_metalabels(): - - tx_metalables_mainnet = kp_mainnet_server.get_tx_metalabels('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_metalables_mainnet_list = kp_mainnet_server.get_tx_metalabels(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_metalables_mainnet) > 0 and len(tx_metalables_mainnet_list) > 0: - assert 'code' not in tx_metalables_mainnet[0] and 'code' not in tx_metalables_mainnet_list[0] - - tx_metalables_testnet = kp_testnet_server.get_tx_metalabels('928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b') - tx_metalables_testnet_list = kp_testnet_server.get_tx_metalabels(['928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b', - 'c7e96e4cd6aa9e3afbc7b32d1e8023daf4197931f1ea61d2bdfc7a2e5e017cf1']) - if len(tx_metalables_testnet) > 0 and len(tx_metalables_testnet_list) > 0: - assert 'code' not in tx_metalables_testnet[0] and 'code' not in tx_metalables_testnet_list[0] - -# 5- get submit signed transaction -# # NOT FINISHED -# # submit_tx signed cbor -# # def test_submit_tx(): - -# # tx_submit = koios_python.submit_tx("file") -# # assert 'code' not in tx_submit[0] - -# 6- get tx status -def test_get_tx_status(): - - tx_status_mainnet = kp_mainnet_server.get_tx_status('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_status_mainnet_list = kp_mainnet_server.get_tx_status(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_status_mainnet) > 0 and len(tx_status_mainnet_list) > 0: - assert 'code' not in tx_status_mainnet[0] and 'code' not in tx_status_mainnet_list[0] - - tx_status_testnet = kp_testnet_server.get_tx_status('928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b') - tx_status_testnet_list = kp_testnet_server.get_tx_status(['928052b80bfc23801da525a6bf8f805da36f22fa0fd5fec2198b0746eb82b72b', - 'c7e96e4cd6aa9e3afbc7b32d1e8023daf4197931f1ea61d2bdfc7a2e5e017cf1']) - if len(tx_status_testnet) > 0 and len(tx_status_testnet_list) > 0: - assert 'code' not in tx_status_testnet[0] and 'code' not in tx_status_testnet_list[0] diff --git a/tests.py b/tests.py index a43b07a..cb8e06d 100644 --- a/tests.py +++ b/tests.py @@ -3,7 +3,7 @@ Examples to check how works Koios-Python Library """ import pprint as pp # We recommend use pprint library to show your outputs -import koios_python # We need to install and import koios_python library +from koios_python import * # We need to install and import koios_python library import time #alternative if we just need some functions @@ -27,11 +27,11 @@ ############################################################ ## MAINNET PARAMETERS (simple TESTS) # Default Koios Endpoint -kp = koios_python.URLs() # We need to create an instance of the class URLs +kp = URLs() # We need to create an instance of the class URLs print('------------------------------------------------------------------------------------------') -print(kp.version) +# print(kp.version) # print('------------------------------------------------------------------------------------------') @@ -88,16 +88,16 @@ # "c0c671fba483641a71bb92d3a8b7c52c90bf1c01e2b83116ad7d4536" # ])) -print('------------------------------------------------------------------------------------------') +# print('------------------------------------------------------------------------------------------') + +# kp_ogmios = URLs(server="ogmios") +# print(kp_ogmios.url, kp_ogmios.server) +# pp.pp(kp_ogmios.query(query="queryLedgerState/tip")) -kp_ogmios = koios_python.URLs(server="ogmios") -print(kp_ogmios.url, kp_ogmios.server) -pp.pp(kp_ogmios.query(query="queryLedgerState/tip")) -''' pp.pp(kp.get_tip()) pp.pp(kp.get_genesis()) @@ -186,7 +186,6 @@ get_epoch_320_info_false = kp.get_epoch_info(epoch_no=320, include_next_epoch=False) pp.pprint(get_epoch_320_info_false) -''' ############################################################ From 64f50aebd1ed5475898f49e4ed82c3d9421071e1 Mon Sep 17 00:00:00 2001 From: Wael Date: Mon, 22 Jan 2024 11:59:58 -0800 Subject: [PATCH 05/14] Untrack files in .gitignore --- .gitignore | 1 + koios_python/network.py | 2 +- test_koios.py | 507 ---------------------------------------- tests.py | 162 ++++++------- 4 files changed, 85 insertions(+), 587 deletions(-) delete mode 100644 test_koios.py diff --git a/.gitignore b/.gitignore index 0670472..f6656bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ test_koios_nets.py +test_koios.py build dist koios_python.egg-info diff --git a/koios_python/network.py b/koios_python/network.py index bf00fba..23dba60 100644 --- a/koios_python/network.py +++ b/koios_python/network.py @@ -54,7 +54,7 @@ def get_totals(self, epoch_no=None): return totals @Exception_Handler -def get_param_updates(self, content_range="0-57"): +def get_param_updates(self, content_range="0-999"): """ Get all parameter update proposals submitted to the chain starting Shelley era diff --git a/test_koios.py b/test_koios.py deleted file mode 100644 index 8d7151c..0000000 --- a/test_koios.py +++ /dev/null @@ -1,507 +0,0 @@ -#!/usr/bin/env python -""" -TESTING SCRIPT FOR KOIOS_PYTHON USING PYTEST - -Main purpose of this script is to ensure basic functionality of the koios-python library and -its features are working with the current version of the Koios REST API. - -It will help test basic edge cases and ensure that the library is working as expected. - -To use this script, you must have pytest installed. - -You can install pytest using pip: -pip install pytest - -After you have downloaded/cloned this repo and installed pytest, you can run this script -First change directory to the folder containing this repo and script then simply run the -following command in your terminal: - -pytest test_koios.py - - -Watch the terminal for the results of the tests. :) - -""" - -import pytest -import koios_python - -# create a new url object with your own url or use koios.rest url by default -kp = koios_python.URLs() - - -# START OF TESTS FOR KOIOS_PYTHON - -############################################################################## -# STAKE ACCOUNT FUNCTIONS -############################################################################## - -# get account list -def test_get_account_list(): - - # get account list from mainnet server - account_list_mainnet = kp.get_account_list() - assert len(account_list_mainnet) > 0 - assert 'code' not in account_list_mainnet[0] - -# get account info -def test_get_account_info(): - - # get account info from mainnet server - account_info_mainnet = kp.get_account_info("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_info_mainnet) > 0: - assert 'code' not in account_info_mainnet[0] - assert len(account_info_mainnet) > 0 - -# get account utxos -def test_get_account_utxos(): - - account_utxos_mainnet = kp.get_account_utxos("stake1u8yxtugdv63wxafy9d00nuz6hjyyp4qnggvc9a3vxh8yl0ckml2uz") - if len(account_utxos_mainnet) > 0: - assert 'code' not in account_utxos_mainnet[0] - assert len(account_utxos_mainnet) > 0 - -# get account info -def test_get_account_info_cached(): - - # get account info from mainnet server - account_info_cached_mainnet = kp.get_account_info_cached("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_info_cached_mainnet) > 0: - assert 'code' not in account_info_cached_mainnet[0] - assert len(account_info_cached_mainnet) > 0 - -# get account rewards -def test_get_account_rewards(): - - # get account rewards from mainnet server - account_rewards_mainnet = kp.get_account_rewards("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - # get account rewards by epoch - account_rewards_mainnet_epoch = kp.get_account_rewards("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250", 350) - # Check for error code in response and empty list - if len(account_rewards_mainnet) > 0 and len(account_rewards_mainnet_epoch) > 0: - assert 'code' not in account_rewards_mainnet[0] and 'code' not in account_rewards_mainnet_epoch[0] - assert len(account_rewards_mainnet) > 0 and len(account_rewards_mainnet_epoch) > 0 - -# get account updates -def test_get_account_updates(): - - account_updates_mainnet = kp.get_account_updates("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_updates_mainnet) > 0: - assert 'code' not in account_updates_mainnet[0] - assert len(account_updates_mainnet) > 0 - -# get account addresses -def get_account_addresses(): - - account_addresses_mainnet = kp.get_account_updates(["stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250",\ - "stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy"]) - if len(account_addresses_mainnet) > 0: - assert 'code' not in account_addresses_mainnet[0] - assert len(account_addresses_mainnet) > 0 - -# get account assets -def test_get_account_assets(): - - account_assets_mainnet = kp.get_account_assets("stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250") - if len(account_assets_mainnet) > 0: - assert 'code' not in account_assets_mainnet[0] - -# get account history -def test_get_account_history(): - - account_history_mainnet = kp.get_account_history(["stake1uyrx65wjqjgeeksd8hptmcgl5jfyrqkfq0xe8xlp367kphsckq250", - "stake1uxpdrerp9wrxunfh6ukyv5267j70fzxgw0fr3z8zeac5vyqhf9jhy"]) - if len(account_history_mainnet) > 0: - assert 'code' not in account_history_mainnet[0] - - -############################################################################## -# ADDRESS FUNCTIONS -############################################################################## - -# get address info -def test_get_address_info(): - - address_info_mainnet = kp.get_address_info("addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g") - if len(address_info_mainnet) > 0: - assert 'code' not in address_info_mainnet[0] - -# get address transactions -def test_get_address_transactions(): - - address_txs_mainnet = kp.get_address_txs(["addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g", - "addr1qyfldpcvte8nkfpyv0jdc8e026cz5qedx7tajvupdu2724tlj8sypsq6p90hl40ya97xamkm9fwsppus2ru8zf6j8g9sm578cu"]) - if len(address_txs_mainnet) > 0: - assert 'code' not in address_txs_mainnet[0] - - address_txs_after_block = kp.get_address_txs("addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g",1) - if len(address_txs_after_block) > 0: - assert 'code' not in address_txs_after_block[0] - -# get address assets -def test_get_address_assets(): - - address_assets_mainnet = kp.get_address_assets("addr1qyp9kz50sh9c53hpmk3l4ewj9ur794t2hdqpngsjn3wkc5sztv9glpwt3frwrhdrltjaytc8ut2k4w6qrx3p98zad3fq07xe9g") - if len(address_assets_mainnet) >0: - assert 'code' not in address_assets_mainnet[0] - -# Get a list of UTxO against input payment credential -def test_get_credential_utxos(): - - credentials_utxos_mainnet = kp.get_credential_utxos(["025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52",\ - "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555"]) - if len(credentials_utxos_mainnet) > 0: - assert 'code' not in credentials_utxos_mainnet[0] - -# get payment credentials hash -def test_get_credentials(): - - credentials_mainnet = kp.get_credential_txs(['025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52','13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555']) - if len(credentials_mainnet) > 0: - assert 'code' not in credentials_mainnet[0] - - credentials_after_block_height = kp.get_credential_txs('025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52','13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555',after_block_height=6238675) - if len(credentials_after_block_height) > 0: - assert 'code' not in credentials_after_block_height[0] - - -############################################################################## -# ASSET FUNCTIONS -############################################################################## - -# get asset list of all native tokens -def test_get_asset_list(): - - asset_list_mainnet = kp.get_asset_list() - if len(asset_list_mainnet) > 0: - assert 'code' not in asset_list_mainnet[0] - -# Get a list of assets registered via token registry on Github -def test_get_asset_token_registry(): - - asset_token_registry = kp.get_asset_token_registry() - if len(asset_token_registry) > 0: - assert 'code' not in asset_token_registry[0] - -# get asset address list -def test_get_asset_address_list(): - - asset_addr_list_mainnet = kp.get_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_addr_list_mainnet) > 0: - assert 'code' not in asset_addr_list_mainnet[0] - -# get asset address nft address -def test_get_asset_nft_address(): - - asset_nft_address_mainnet = kp.get_asset_nft_address("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_nft_address_mainnet) > 0: - assert 'code' not in asset_nft_address_mainnet[0] - -# get asset info -def test_get_asset_info(): - - asset_info_mainnet = kp.get_asset_info("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_info_mainnet) > 0: - assert 'code' not in asset_info_mainnet[0] - -# get asset info list of assets (bulk) -def test_get_asset_info_bulk(): - - asset_info_bulk_mainnet = kp.get_asset_info_bulk(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"],["1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e","776f726c646d6f62696c65746f6b656e"]) - if len(asset_info_bulk_mainnet) > 0: - assert 'code' not in asset_info_bulk_mainnet[0] - - asset_info_bulk_mainnet = kp.get_asset_info_bulk("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_info_bulk_mainnet) > 0: - assert 'code' not in asset_info_bulk_mainnet[0] - -# get asset history -def test_get_asset_history(): - - asset_history_mainnet = kp.get_asset_history("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b") - if len(asset_history_mainnet) > 0: - assert 'code' not in asset_history_mainnet[0] - -# get policy asset addresses -def test_get_policy_asset_addresses(): - - asset_policy_asset_addresses_mainnet = kp.get_policy_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "0-50") - if len(asset_policy_asset_addresses_mainnet) > 0: - assert 'code' not in asset_policy_asset_addresses_mainnet[0] - -# get policy asset information -def test_get_policy_asset_info(): - - asset_policy_asset_info_mainnet = kp.get_policy_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501") - if len(asset_policy_asset_info_mainnet) > 0: - assert 'code' not in asset_policy_asset_info_mainnet[0] - -def test_get_policy_asset_list(): - - asset_policy_asset_list_mainnet = kp.get_policy_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "0-99") - if len(asset_policy_asset_list_mainnet) > 0: - assert 'code' not in asset_policy_asset_list_mainnet[0] - -# get asset summary -def test_get_asset_summary(): - - asset_summary_mainnet = kp.get_asset_summary('750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', '424f4f4b') - if len(asset_summary_mainnet) > 0: - assert 'code' not in asset_summary_mainnet[0] - -# get asset transaction history -def test_get_asset_txs(): - - asset_txs_history_mainnet = kp.get_asset_txs('750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', '424f4f4b', 5000000, True, "0-99") - if len(asset_txs_history_mainnet) > 0: - assert 'code' not in asset_txs_history_mainnet[0] - - -############################################################################## -# BLOCK FUNCTIONS -############################################################################## - -# get list of blocks -def test_get_blocks(): - - blocks_mainnet_server = kp.get_blocks() - assert 'code' not in blocks_mainnet_server[0] - -# get block info -def test_get_block_info(): - - block_info_mainnet = kp.get_block_info(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30", - "60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a", - "c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015"]) - if len(block_info_mainnet) > 0: - assert 'code' not in block_info_mainnet[0] - -# get block transactions -def test_get_block_txs(): - - block_txs_mainnet = kp.get_block_txs(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30"]) - if len(block_txs_mainnet) > 0: - assert 'code' not in block_txs_mainnet[0] - - -############################################################################## -# EPOCH FUNCTIONS -############################################################################## - -# get epoch info -def test_get_epoch_info(): - - epoch_info_mainnet = kp.get_epoch_info() - assert 'code' not in epoch_info_mainnet[0] - -# get epoch params -def test_get_epoch_params(): - - epoch_params_mainnet = kp.get_epoch_params() - assert 'code' not in epoch_params_mainnet[0] - -def test_get_epoch_block_protocols(): - - epoch_block_protocols_mainnet = kp.get_epoch_block_protocols() - assert 'code' not in epoch_block_protocols_mainnet[0] - - -############################################################################## -# NETWORK FUNCTIONS -############################################################################## - -# check tip -def test_get_tip(): - - tip_mainnet = kp.get_tip() - assert 'code' not in tip_mainnet[0] - -# check genesis info -def test_get_genesis(): - - genesis_mainnet = kp.get_genesis() - assert 'code' not in genesis_mainnet[0] - -def test_get_totals(): - - epoch_totals_mainnet = kp.get_totals() - assert 'code' not in epoch_totals_mainnet[0] - - -############################################################################## -# POOL FUNCTIONS -############################################################################## - -# get list of pools on the network -def test_get_pool_list(): - - pool_list_mainnet = kp.get_pool_list() - pool_list_mainnet_range = kp.get_pool_list('0-10') - if len(pool_list_mainnet) > 0 and len(pool_list_mainnet_range) > 0: - assert 'code' not in pool_list_mainnet[0] and 'code' not in pool_list_mainnet_range[0] - -# get pool info -def test_get_pool_info(): - - pool_info_mainnet = kp.get_pool_info(["pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", - "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m", - "pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm"]) - if len(pool_info_mainnet) > 0: - assert 'code' not in pool_info_mainnet[0] - assert 'code' not in pool_info_mainnet[0] - -# get pool stake snapshot -def test_get_pool_stake_snapshot(): - - stake_snapshot_mainnet = kp.get_pool_stake_snapshot("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(stake_snapshot_mainnet) > 0: - assert 'code' not in stake_snapshot_mainnet[0] - -# get pool delegator information -def test_get_pool_delegators(): - - delegator_info_mainnet = kp.get_pool_delegators("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(delegator_info_mainnet) > 0: - assert 'code' not in delegator_info_mainnet[0] - -# get pool delegator history -def test_get_pool_delegators_history(): - - delegator_history_mainnet = kp.get_pool_delegators_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(delegator_history_mainnet) > 0: - assert 'code' not in delegator_history_mainnet[0] - -# get pool blocks -def test_get_pool_blocks(): - - pool_blocks_mainnet = kp.get_pool_blocks("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - pool_blocks_mainnet_epoch = kp.get_pool_blocks("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", 350) - if len(pool_blocks_mainnet) > 0 and len(pool_blocks_mainnet_epoch) > 0: - assert 'code' not in pool_blocks_mainnet[0] and 'code' not in pool_blocks_mainnet_epoch[0] - -# get pool history -def test_get_pool_history(): - - pool_history_mainnet = kp.get_pool_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - pool_history_mainnet_epoch = kp.get_pool_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", 350) - if len(pool_history_mainnet) > 0 and len(pool_history_mainnet_epoch) > 0: - assert 'code' not in pool_history_mainnet[0] and 'code' not in pool_history_mainnet_epoch[0] - -# get pool updates -def test_get_pool_updates(): - - pool_updates_mainnet = kp.get_pool_updates() - pool_updates_mainnet_pool = kp.get_pool_updates("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - if len(pool_updates_mainnet) > 0 and len(pool_updates_mainnet_pool) > 0: - assert 'code' not in pool_updates_mainnet[0] and 'code' not in pool_updates_mainnet_pool[0] - -# get pool relays -def test_get_pool_relays(): - - pool_relays_mainnet = kp.get_pool_relays() - pool_relays_mainnet_range = kp.get_pool_relays('0-70') - if len(pool_relays_mainnet) > 0 and len(pool_relays_mainnet_range) > 0: - assert 'code' not in pool_relays_mainnet[0] and 'code' not in pool_relays_mainnet_range[0] - -# get pool metadata -def test_get_pool_metadata(): - - pool_metadata_mainnet = kp.get_pool_metadata() - pool_metadata_mainnet_pool = kp.get_pool_metadata("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc") - pool_metadata_mainnet_pool_list = kp.get_pool_metadata(["pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", - "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m"]) - if len(pool_metadata_mainnet) > 0 and len(pool_metadata_mainnet_pool) > 0 and len(pool_metadata_mainnet_pool_list) > 0: - assert 'code' not in pool_metadata_mainnet[0] and 'code' not in pool_metadata_mainnet_pool[0] and 'code' not in pool_metadata_mainnet_pool_list[0] - - -############################################################################## -# SCRIPT FUNCTIONS -############################################################################## - -# get list of native scripts on the network -def test_get_native_script_list(): - - script_list_mainnet = kp.get_native_script_list() - script_list_mainnet_range = kp.get_native_script_list('0-10') - if len(script_list_mainnet) > 0 and len(script_list_mainnet_range) > 0: - assert 'code' not in script_list_mainnet[0] and 'code' not in script_list_mainnet_range[0] - -# get plutus script list -def test_get_plutus_script_list(): - - script_list_mainnet = kp.get_plutus_script_list() - script_list_mainnet_range = kp.get_plutus_script_list('0-10') - if len(script_list_mainnet) > 0 and len(script_list_mainnet_range) > 0: - assert 'code' not in script_list_mainnet[0] and 'code' not in script_list_mainnet_range[0] - -# get list of all redeemers for a given script hash -def test_get_script_redeemers(): - - script_redeemers_mainnet = kp.get_script_redeemers('d8480dc869b94b80e81ec91b0abe307279311fe0e7001a9488f61ff8') - if len(script_redeemers_mainnet) > 0: - assert 'code' not in script_redeemers_mainnet[0] - -def test_get_datum_info(): - - datum_info = kp.get_datum_info('818ee3db3bbbd04f9f2ce21778cac3ac605802a4fcb00c8b3a58ee2dafc17d46', - "45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0") - if len(datum_info) > 0: - assert 'code' not in datum_info[0] - - -############################################################################## -# TRANSACTION FUNCTIONS -############################################################################## - -# get transaction(s) info -def test_tx_info(): - - tx_info_mainnet = kp.get_tx_info('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_info_mainnet_list = kp.get_tx_info(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_info_mainnet) > 0 and len(tx_info_mainnet_list) > 0: - assert 'code' not in tx_info_mainnet[0] and 'code' not in tx_info_mainnet_list[0] - -# get transaction(s) utxos -def test_get_tx_utxos(): - - tx_utxo_mainnet = kp.get_tx_utxos('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_utxo_mainnet_list = kp.get_tx_utxos(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_utxo_mainnet) > 0 and len(tx_utxo_mainnet_list) > 0: - assert 'code' not in tx_utxo_mainnet[0] and 'code' not in tx_utxo_mainnet_list[0] - -# get transaction(s) metadata -def test_get_tx_metadata(): - - tx_metadata_mainnet = kp.get_tx_metadata('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_metadata_mainnet_list = kp.get_tx_metadata(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_metadata_mainnet) > 0 and len(tx_metadata_mainnet_list) > 0: - assert 'code' not in tx_metadata_mainnet[0] and 'code' not in tx_metadata_mainnet_list[0] - -# get transaction(s) metadata labels -def test_get_tx_metalabels(): - - tx_metalables_mainnet = kp.get_tx_metalabels('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_metalables_mainnet_list = kp.get_tx_metalabels(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_metalables_mainnet) > 0 and len(tx_metalables_mainnet_list) > 0: - assert 'code' not in tx_metalables_mainnet[0] and 'code' not in tx_metalables_mainnet_list[0] - -# # NOT FINISHED -# # submit_tx signed cbor -# # def test_submit_tx(): - -# # tx_submit = koios_python.submit_tx("file") -# # assert 'code' not in tx_submit[0] - -# get tx status -def test_get_tx_status(): - - tx_status_mainnet = kp.get_tx_status('0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94') - tx_status_mainnet_list = kp.get_tx_status(['0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94', - 'f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e']) - if len(tx_status_mainnet) > 0 and len(tx_status_mainnet_list) > 0: - assert 'code' not in tx_status_mainnet[0] and 'code' not in tx_status_mainnet_list[0] - diff --git a/tests.py b/tests.py index cb8e06d..cfab778 100644 --- a/tests.py +++ b/tests.py @@ -5,31 +5,34 @@ import pprint as pp # We recommend use pprint library to show your outputs from koios_python import * # We need to install and import koios_python library import time +# alternative if we just need some functions +# from koios_python import block, epochs -#alternative if we just need some functions -#from koios_python import block, epochs +########################################################################################## +## MAINNET PARAMETERS (simple TESTS) +# Default Koios Endpoint +kp = URLs() # We need to create an instance of the class URLs + +########################################################################################## +# Network Endpoint Tests +########################################################################################## + +pp.pprint(kp.get_tip()) -# Some examples: -## TESTENET PARAMETERS -# kp_test = koios_python.URLs(network="testnet") -# print(kp_test.url, kp_test.network) -# print(kp_test.get_account_info("stake_test1uqrw9tjymlm8wrwq7jk68n6v7fs9qz8z0tkdkve26dylmfc2ux2hj")) -# print(kp_test.get_native_script_list()) -# kp_test = koios_python.URLs(network="mainnet") -# print(kp_test.GENESIS_URL) -# print(kp_test.url, kp_test.network) -# print(kp_test.get_tip_test_version()) -############################################################ -## MAINNET PARAMETERS (simple TESTS) -# Default Koios Endpoint -kp = URLs() # We need to create an instance of the class URLs -print('------------------------------------------------------------------------------------------') + + + + + + +########################################################################################## +# print('------------------------------------------------------------------------------------------') # print(kp.version) @@ -98,94 +101,94 @@ -pp.pp(kp.get_tip()) +# pp.pp(kp.get_tip()) -pp.pp(kp.get_genesis()) +# pp.pp(kp.get_genesis()) -pp.pp(kp.get_totals()) -pp.pp(kp.get_pool_delegators_history("pool1hrv8gtrm0dgjg6zyss5uwa4nkruzfnh5vrdkr2sayj7x2nw6mjc", 391)) +# pp.pp(kp.get_totals()) +# pp.pp(kp.get_pool_delegators_history("pool1hrv8gtrm0dgjg6zyss5uwa4nkruzfnh5vrdkr2sayj7x2nw6mjc", 391)) # print('----------------------------------------------------------------------------------------') # check_big_account = kp.get_account_addresses(["stake1uxqh9rn76n8nynsnyvf4ulndjv0srcc8jtvumut3989cqmgjt49h6"]) # pp.pp(check_big_account) -print('------------------------------------------------------------------------------------------') +# print('------------------------------------------------------------------------------------------') -get_asset_list = kp.get_asset_list(content_range="999-1999") -print(get_asset_list) +# get_asset_list = kp.get_asset_list(content_range="999-1999") +# print(get_asset_list) -print('------------------------------------------------------------------------------------------') -get_asset_token_registry = kp.get_asset_token_registry("0-5") -pp.pp(get_asset_token_registry) +# print('------------------------------------------------------------------------------------------') +# get_asset_token_registry = kp.get_asset_token_registry("0-5") +# pp.pp(get_asset_token_registry) -print('------------------------------------------------------------------------------------------') -get_asset_addresses = kp.get_asset_addresses(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501',asset_name='424f4f4b',content_range="999-1999") -pp.pprint(get_asset_addresses) +# print('------------------------------------------------------------------------------------------') +# get_asset_addresses = kp.get_asset_addresses(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501',asset_name='424f4f4b',content_range="999-1999") +# pp.pprint(get_asset_addresses) -print('------------------------------------------------------------------------------------------------------------------------------------------------------') -get_asset_nft_address = kp.get_asset_nft_address(asset_policy='f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a', - asset_name='68616e646c65') -pp.pprint(get_asset_nft_address) +# print('------------------------------------------------------------------------------------------------------------------------------------------------------') +# get_asset_nft_address = kp.get_asset_nft_address(asset_policy='f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a', +# asset_name='68616e646c65') +# pp.pprint(get_asset_nft_address) -print('------------------------------------------------------------------------------------------') -get_asset_info_bulk = kp.get_asset_info_bulk(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"],["1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e","776f726c646d6f62696c65746f6b656e"]) -pp.pprint(get_asset_info_bulk) +# print('------------------------------------------------------------------------------------------') +# get_asset_info_bulk = kp.get_asset_info_bulk(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"],["1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e","776f726c646d6f62696c65746f6b656e"]) +# pp.pprint(get_asset_info_bulk) -print('------------------------------------------------------------------------------------------') -get_policy_asset_addresses = kp.get_policy_asset_addresses(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', content_range="0-500") -pp.pprint(get_policy_asset_addresses) +# print('------------------------------------------------------------------------------------------') +# get_policy_asset_addresses = kp.get_policy_asset_addresses(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', content_range="0-500") +# pp.pprint(get_policy_asset_addresses) -print('------------------------------------------------------------------------------------------') -get_policy_asset_info = kp.get_policy_asset_info(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501') -pp.pprint(get_policy_asset_info) +# print('------------------------------------------------------------------------------------------') +# get_policy_asset_info = kp.get_policy_asset_info(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501') +# pp.pprint(get_policy_asset_info) -print('------------------------------------------------------------------------------------------') -get_policy_asset_list = kp.get_policy_asset_list(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', content_range="0-99") -pp.pprint(get_policy_asset_list) +# print('------------------------------------------------------------------------------------------') +# get_policy_asset_list = kp.get_policy_asset_list(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', content_range="0-99") +# pp.pprint(get_policy_asset_list) -print('------------------------------------------------------------------------------------------') -get_asset_summary = kp.get_asset_summary(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', asset_name='424f4f4b') -pp.pprint(get_asset_summary) +# print('------------------------------------------------------------------------------------------') +# get_asset_summary = kp.get_asset_summary(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', asset_name='424f4f4b') +# pp.pprint(get_asset_summary) -print('------------------------------------------------------------------------------------------') -get_asset_txs = kp.get_asset_txs(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', asset_name='424f4f4b', after_block_height=500000, history=False, content_range="0-99") -pp.pprint(get_asset_txs) +# print('------------------------------------------------------------------------------------------') +# get_asset_txs = kp.get_asset_txs(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', asset_name='424f4f4b', after_block_height=500000, history=False, content_range="0-99") +# pp.pprint(get_asset_txs) -print('------------------------------------------------------------------------------------------') -get_asset_txs_hist_true = kp.get_asset_txs(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', asset_name='424f4f4b', after_block_height=50000, history=True, content_range="0-99") -pp.pprint(get_asset_txs_hist_true) +# print('------------------------------------------------------------------------------------------') +# get_asset_txs_hist_true = kp.get_asset_txs(asset_policy='750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501', asset_name='424f4f4b', after_block_height=50000, history=True, content_range="0-99") +# pp.pprint(get_asset_txs_hist_true) -print('------------------------------------------------------------------------------------------') -get_address_info = kp.get_address_info("addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv","addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y") -pp.pprint(get_address_info) +# print('------------------------------------------------------------------------------------------') +# get_address_info = kp.get_address_info("addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv","addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y") +# pp.pprint(get_address_info) -print('------------------------------------------------------------------------------------------') -get_address_txs = kp.get_address_txs("addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv","addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y",after_block=6238675) -pp.pprint(get_address_txs) +# print('------------------------------------------------------------------------------------------') +# get_address_txs = kp.get_address_txs("addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv","addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y",after_block=6238675) +# pp.pprint(get_address_txs) -print('------------------------------------------------------------------------------------------') -get_address_credential_utxos = kp.get_credential_utxos("025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52","025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52") -pp.pprint(get_address_credential_utxos) +# print('------------------------------------------------------------------------------------------') +# get_address_credential_utxos = kp.get_credential_utxos("025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52","025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52") +# pp.pprint(get_address_credential_utxos) -print('------------------------------------------------------------------------------------------') -get_address_assets = kp.get_address_assets("addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv","addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y") -pp.pprint(get_address_assets) +# print('------------------------------------------------------------------------------------------') +# get_address_assets = kp.get_address_assets("addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv","addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y") +# pp.pprint(get_address_assets) -print('------------------------------------------------------------------------------------------') -get_address_credential_txs = kp.get_credential_txs("025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52", "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555", after_block_height=6238675) -pp.pprint(get_address_credential_txs) +# print('------------------------------------------------------------------------------------------') +# get_address_credential_txs = kp.get_credential_txs("025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52", "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555", after_block_height=6238675) +# pp.pprint(get_address_credential_txs) -print('------------------------------------------------------------------------------------------') -get_network_params = kp.get_param_updates() -pp.pprint(get_network_params) +# print('------------------------------------------------------------------------------------------') +# get_network_params = kp.get_param_updates() +# pp.pprint(get_network_params) -print('------------------------------------------------------------------------------------------') -get_epoch_320_info = kp.get_epoch_info(epoch_no=320, include_next_epoch=True) -pp.pprint(get_epoch_320_info) +# print('------------------------------------------------------------------------------------------') +# get_epoch_320_info = kp.get_epoch_info(epoch_no=320, include_next_epoch=True) +# pp.pprint(get_epoch_320_info) -get_epoch_320_info_false = kp.get_epoch_info(epoch_no=320, include_next_epoch=False) -pp.pprint(get_epoch_320_info_false) +# get_epoch_320_info_false = kp.get_epoch_info(epoch_no=320, include_next_epoch=False) +# pp.pprint(get_epoch_320_info_false) ############################################################ @@ -222,7 +225,8 @@ ############################################################ - +# Heavy/Large data tests +############################################################ #pprint.pp(kp.get_account_assets_2("stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz", "0-999")) # pprint.pp(kp.get_account_assets("stake1u9f9v0z5zzlldgx58n8tklphu8mf7h4jvp2j2gddluemnssjfnkzz")) From c16d105b0111cdd05ab577d48d954e9dee44d428 Mon Sep 17 00:00:00 2001 From: Wael Date: Mon, 22 Jan 2024 12:02:11 -0800 Subject: [PATCH 06/14] Untrack files in .gitignore --- .gitignore | 4 ++-- tests.py => tests/tests.py | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename tests.py => tests/tests.py (100%) diff --git a/.gitignore b/.gitignore index f6656bd..4ea6150 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -test_koios_nets.py -test_koios.py +tests/test_koios_nets.py +tests/test_koios.py build dist koios_python.egg-info diff --git a/tests.py b/tests/tests.py similarity index 100% rename from tests.py rename to tests/tests.py From def335d0927a38de17be0a70477bfb5d03da62d2 Mon Sep 17 00:00:00 2001 From: Wael Date: Mon, 22 Jan 2024 22:57:04 -0800 Subject: [PATCH 07/14] update --- .gitignore | 4 +- .../__pycache__/address.cpython-311.pyc | Bin 5631 -> 5958 bytes .../__pycache__/block.cpython-311.pyc | Bin 2348 -> 3207 bytes .../__pycache__/epoch.cpython-311.pyc | Bin 3467 -> 5515 bytes .../__pycache__/network.cpython-311.pyc | Bin 4381 -> 6183 bytes .../__pycache__/ogmios.cpython-311.pyc | Bin 1160 -> 1410 bytes .../__pycache__/transactions.cpython-311.pyc | Bin 5701 -> 8301 bytes koios_python/__pycache__/urls.cpython-311.pyc | Bin 9954 -> 9993 bytes koios_python/address.py | 13 +- koios_python/block.py | 41 +++- koios_python/epoch.py | 95 ++++++--- koios_python/network.py | 77 ++++++-- koios_python/ogmios.py | 13 +- koios_python/transactions.py | 109 ++++++++--- koios_python/urls.py | 3 +- tests/tests.py => tests.py | 185 +++++++++++++++++- 16 files changed, 455 insertions(+), 85 deletions(-) rename tests/tests.py => tests.py (66%) diff --git a/.gitignore b/.gitignore index 4ea6150..f6656bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -tests/test_koios_nets.py -tests/test_koios.py +test_koios_nets.py +test_koios.py build dist koios_python.egg-info diff --git a/koios_python/__pycache__/address.cpython-311.pyc b/koios_python/__pycache__/address.cpython-311.pyc index 4fa643fdc00544a137e0b479a2192099c39c4efc..8ba0c7d0e578d50d5d0b2818cfbabb2f659bbcea 100644 GI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%&U{f039tj$`bPi2qK2W&_?1 juzRNmu+<-|@5*AeX4f5>gB(vMm-w4xnm3Yry}08StlGYG diff --git a/koios_python/__pycache__/block.cpython-311.pyc b/koios_python/__pycache__/block.cpython-311.pyc index 72a1f2229bc182d92e06d7186220a7edb202cd8d..3b5698abb0cbd8603a572c1079233ac8fc67a13e 100644 GIT binary patch literal 3207 zcmeH}-*4MQ9Kg?Zessy=Cha!XZWNEI2=7PRX$;gdkku(a%{RQ_A$0^8=6ie)ikABrk$RW zG6gH`7`8=X&uH}FXB^Zr=W>TP!~Mqw1_si6&?`b=Xw&33Zi3l;!*_z4>UqsnJ zTe_g}4)v{PGcI0^k!b2Ff7#pn`4p*cj8DH0~1H?jj=$3c@?WUi8xrosx_exN)3;+Z8^H- zc#5M^Aul<$BpvVX@0YNiwy{Qfy%<<`3fLNyOasE(nWhAM1LtlYLQ_5S76o}t$H?iB{$_MYSFw&Ina6bE+{EdEGihUETBR#e-sQ$8bVsRMyOE)Dr$^3> zxB|R_+k*8k3h<7^6~M-g4PCx+=EG6t+Q?-$lqI(1hD}@5ps)I?$zeA{bTi{7>H>ug z0tPaXE2ay?v2%)_V1%JT2wiz}4y4Ufeb)%2-uI=do5pQJ?>lR!3pp4v(l=!rHaV8R z3z=KqgHnHBQF`-t-57lhFDCAUm~>+x-$7MEf3%_2&aZQ`xzdHTX#Cz+m1yTm=b`UU zEY4KBPu99mRyy7;i>s-Qxr6iCg8ihc^2zl|>P9tnqn5f+j;yBk&UMb8Ul^{Yj?_{| z%8_#9x9&Fr--}9RWUMywSp^z!b$kxj%S2m?r%E4fK%OWapb8HW_|y5?cnhR2u?f7Z z@kMTeW3UHM1GE9m0A2(9onendzx9%(d9VVo2jFjm9kw37S1qK4pNAW=2{&&CFV3bI zeiT`P{FZ|pVe@(Ed>Gu(>7N3)J)!|y!^+q=$Ckd2w?y)K+Q=B``etoouR*pU%~qE( zsglV-&!mq?^hvsO)+e)$ZoqEPG4pNi-uKwXa>851tRI~`TTn?ARYfXMDopR;K(BrE=e+oBxb({g>wgyvj zm84ZoTD7FLL%g+kvUC|AfF%EiuE_tZ&^-#EQv(XLxs%u3l%y z;LbSV*J(I<=;3baBRF@+&iEu6_)r@etOwx#59ty2&F1FM)(-YQo__jHMI5b)qcw4~ zEUb!cv)TFfg#%TwrzZB4g|hJX^lS}wGg}d-s^U~loZ2DYT3jrB!03@VOb;2k#f>V8 zW~UX!8xpny#dYhpfo+Q(;cn{OowS~(pB&0X)zVBIvr`(=9fQ62L&PGoePy%dRL<54 zrv5(e1wB0%$v04~3mnI-hj=cuj%XD@-0o7G{#H#Zfa|c_7P|ejh0f6MTIstYWj$#24BSxo3(A)G%~wI52>A- z2n)7u(I6EIf>K&aE}r!yJ!WAKVIc>>iw8j|UOYLoX=)Vo=m+!PneQpVzB%#NjmO?oEYE<7W2>KilW8hXO;fYf5~Je7)GR~SW_ge~@aLI4y}f_v zT71c&HrD0&7sn&9WFkIV&21t{5-D&(uYS%QTvkZ4PGYc?6pI9Jwax6pog55c zrymdH0+!$DdIK8+8z)OrABtA^L)uuO%k=jaGrPeOA2;~8$;Z)fg>TZLD~oGO2H$P+ z-DtSXHK9@H!<*S)oAJc9Im~;^HkeH`FR`u9!yX{Y*xbdg} diff --git a/koios_python/__pycache__/epoch.cpython-311.pyc b/koios_python/__pycache__/epoch.cpython-311.pyc index 7f6d93b77c878511e926eb40352a278267af82be..f3faadcb2ef0a6d6dbafd3e8ea984573e9ebfa70 100644 GIT binary patch literal 5515 zcmeHLO-$TI6t=zIpRoKD(;uKsEQLm)NuWhdS`m^6!cRz2pd^u6Qq?u~Y%uZKo3WRK zWsx>g4z%i_he)lIBK1Utg47;4^pHbOJ$a=)Aghs(svdG9qCFJ#&^Kf6vcLi<+4huS z{5&4dy!YmL_`Wy$eN|Nj1Laob59n|`!~8}b@+IIm)+V6wHKQ`4jLNE<&W^J5&W&pj3o`l)=a~yctR`;K4C$&urB*npOSZ#ya>TXp4aa2#BG}l^UG%UW&&wuqVP8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3lXfdCr_v|J}}fj{BQJWuhA!IG1N_9ok+KnM=$=V zwY64YW)29c#xKsiok1^y`VvfK5@17-ZSKr+WLwdCV?y`51b^*h)!m%u3rVB>`P<=p zo5$`EX&tXx&}%#0*bN8z?)w{5tD58CIrI2bhyx6%v^}a zYe{h8hwWPrkKh;S@CpGG%r#fge7hQwK4War55$sR^s|^3dDiLkP Uq0a6YPX|`04X}R12C*5{KQN#H^#A|> diff --git a/koios_python/__pycache__/urls.cpython-311.pyc b/koios_python/__pycache__/urls.cpython-311.pyc index 360736e5e906a108e901793c71a34a900ab69481..b976d8971c891764c1cc98a86a56207641a8e60c 100644 GIT binary patch delta 1028 zcmaJ=OHUI~80|-A+L`G*D%gv(T;-{P;sdM?1Qf6$sEy)|XsSX@)Jn}%G$AI4y3m!x z?+56@#JIpmYSPek>op``J6U566QYs&dhnQgABRi4|G| zP0fM;MzsZu>jay04G-xAEIg%Cu<@Esb!U`iStf)NOfwlq^d(ZWID^ug2F1TDT5k}f zhKAh+fd~#5R439{Dq`i5mEk3W!cw7CNG&3&qF7*EKUha3M9>Op*b*W@u`fjR<LSMnzW*ehyKbWgV(XaDmNQlR!PTnp9sYoi!r2O0rr!YEq~ZT7%T; zMOP!fF)6+_HT=W6zOz|o5op3ji|Xs7vr**MOST3NSQOR@ZKKqhL{~FDvnW2bH2h`} z{KTf;CJ@J{P4&&v*(`EfBx}K)Hib<>+a|TR=xW7>HpK_FhVN{GGi=VWu68sWs&`0d ztH|w;Y&&jnD6|Q!Q)=y^s|#;C6mK~iK6eOCv-#B_kidD?wOcy7M6O4&ZmbGZ*d?@H zsU<{LA5MfR-Uw^Z!#Pf}ZBKqGd{|xG>jlrJ-Q3CSu;(9fGhT2weeOcmJ?#Z@X_uXN zfv!Ynf1*F%Ou}lN>M6N&=7c-WK0^00hbs)c!144km$mS3y9$rQQt%e1W7YZhu_sDt zgW~pbXCH^X43hafRWHDL#nyX1cZSO^^P@G7{bLzWw-$W=!=j!4Kgos?FPKUVWd~C! zmkaI(4#hgQ&1-FEvO^=8bcg$qQDAS5-(K(oKtU-1rQqYBjRCMrImU})G5!<>zXdMV Ii@Uh(9|#5i;s5{u delta 1016 zcmaKrOKgon6vyxMKE9dnt#pcehqh={Tkl6{d+Xg+<0f{L@SBrFOsixUCD5@ZfESc1*fnc2!v zrYWwdTvI|>9$OTX()R&9&nynMP2ns07Jy?5QVBJ-U{yL(p$rQ(%~MpZX}+@Du_-2{ z?*)49+Z=vke{FM82fxs_7~+m#OLS(DGAz|pqiC6?T4lNJP)thSBZtB*hr@g9PaIBG z!Gt5oYOq|v*67S~WvJJ*LeW}HE0yJfOED>Zw_OUCT@KH&-*Y)>f^k=nB>X^Mv(Btj zhV_~n6m8Jds4Qnaib?6a=21B3ad?RRrpL(^81)3%3hz9@T6AWkGPG*iq^M2PW@S0y zQ%p+Vd7r{*pTiJNTJm@OJ<+n(f^jetY{>?PIqNH)9FACf~T@f>2UX*Htx@M_4QYTQk5eW614Hiu8UO$Q diff --git a/koios_python/address.py b/koios_python/address.py index 10963b0..47dbdc7 100644 --- a/koios_python/address.py +++ b/koios_python/address.py @@ -17,9 +17,16 @@ def get_address_info(self, *args): :rtype: list. """ timeout = get_timeout() - get_format = {"_addresses": [args] } - addresses = requests.post(self.ADDRESS_INFO_URL, json= get_format, timeout=timeout) - addresses = json.loads(addresses.content) + + if self.BEARER is None: + get_format = {"_addresses": [args] } + addresses = requests.post(self.ADDRESS_INFO_URL, json= get_format, timeout=timeout) + addresses = json.loads(addresses.content) + else: + get_format = {"_addresses": [args] } + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + addresses = requests.post(self.ADDRESS_INFO_URL, json= get_format, timeout=timeout, headers=custom_headers) + addresses = json.loads(addresses.content) return addresses diff --git a/koios_python/block.py b/koios_python/block.py index 9e5a42a..2dacf86 100644 --- a/koios_python/block.py +++ b/koios_python/block.py @@ -17,9 +17,16 @@ def get_blocks(self,content_range="0-999"): :rtype: list """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - blocks = requests.get(self.BLOCKS_URL, headers = custom_headers, timeout=timeout) - blocks = json.loads(blocks.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + blocks = requests.get(self.BLOCKS_URL, headers = custom_headers, timeout=timeout) + blocks = json.loads(blocks.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + blocks = requests.get(self.BLOCKS_URL, headers = custom_headers, timeout=timeout) + blocks = json.loads(blocks.content) + return blocks @@ -33,9 +40,17 @@ def get_block_info(self,*block_hash): :rtype: list """ timeout = get_timeout() - get_format = {"_block_hashes":[block_hash]} - block = requests.post(self.BLOCK_INFO_URL, json = get_format, timeout=timeout) - block = json.loads(block.content) + + if self.BEARER is None: + get_format = {"_block_hashes":[block_hash]} + block = requests.post(self.BLOCK_INFO_URL, json = get_format, timeout=timeout) + block = json.loads(block.content) + else: + get_format = {"_block_hashes":[block_hash]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + block = requests.post(self.BLOCK_INFO_URL, json = get_format, timeout=timeout, headers=custom_headers) + block = json.loads(block.content) + return block @@ -49,7 +64,15 @@ def get_block_txs(self,*block_hash): :rtype: list """ timeout = get_timeout() - get_format = {"_block_hashes":[block_hash]} - txs = requests.post(self.BLOCK_TXS_URL, json = get_format, timeout=timeout) - txs = json.loads(txs.content) + + if self.BEARER is None: + get_format = {"_block_hashes":[block_hash]} + txs = requests.post(self.BLOCK_TXS_URL, json = get_format, timeout=timeout) + txs = json.loads(txs.content) + else: + get_format = {"_block_hashes":[block_hash]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + txs = requests.post(self.BLOCK_TXS_URL, json = get_format, timeout=timeout, headers=custom_headers) + txs = json.loads(txs.content) + return txs \ No newline at end of file diff --git a/koios_python/epoch.py b/koios_python/epoch.py index 92ff35d..1101fdb 100644 --- a/koios_python/epoch.py +++ b/koios_python/epoch.py @@ -16,20 +16,44 @@ def get_epoch_info(self, epoch_no=None, include_next_epoch=False): :rtype: list """ timeout = get_timeout() - if epoch_no is None and include_next_epoch is False: - info = requests.get(f"{self.EPOCH_INFO_URL}?_include_next_epoch=false", timeout=timeout) - info = json.loads(info.content) - if epoch_no is None and include_next_epoch is True: - info = requests.get(f"{self.EPOCH_INFO_URL}?_include_next_epoch=true", timeout=timeout) - info = json.loads(info.content) - if epoch_no is not None and include_next_epoch is False: - info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=false",\ - timeout=timeout) - info = json.loads(info.content) - if epoch_no is not None and include_next_epoch is True: - info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=true",\ - timeout=timeout) - info = json.loads(info.content) + + if self.BEARER is None: + + if epoch_no is None and include_next_epoch is False: + info = requests.get(f"{self.EPOCH_INFO_URL}?_include_next_epoch=false", timeout=timeout) + info = json.loads(info.content) + if epoch_no is None and include_next_epoch is True: + info = requests.get(f"{self.EPOCH_INFO_URL}?_include_next_epoch=true", timeout=timeout) + info = json.loads(info.content) + if epoch_no is not None and include_next_epoch is False: + info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=false",\ + timeout=timeout) + info = json.loads(info.content) + if epoch_no is not None and include_next_epoch is True: + info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=true",\ + timeout=timeout) + info = json.loads(info.content) + else: + + if epoch_no is None and include_next_epoch is False: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.EPOCH_INFO_URL}?_include_next_epoch=false", timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + if epoch_no is None and include_next_epoch is True: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.EPOCH_INFO_URL}?_include_next_epoch=true", timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + if epoch_no is not None and include_next_epoch is False: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=false",\ + timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + if epoch_no is not None and include_next_epoch is True: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=true",\ + timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + return info @@ -44,12 +68,23 @@ def get_epoch_params(self, epoch_no=None): :rtype: list """ timeout = get_timeout() - if epoch_no is None: - info = requests.get(self.EPOCH_PARAMS_URL, timeout=timeout) - info = json.loads(info.content) + if self.BEARER is None: + if epoch_no is None: + info = requests.get(self.EPOCH_PARAMS_URL, timeout=timeout) + info = json.loads(info.content) + else: + info = requests.get(f"{self.EPOCH_PARAMS_URL}?_epoch_no={epoch_no}", timeout=timeout) + info = json.loads(info.content) else: - info = requests.get(f"{self.EPOCH_PARAMS_URL}?_epoch_no={epoch_no}", timeout=timeout) - info = json.loads(info.content) + if epoch_no is None: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(self.EPOCH_PARAMS_URL, timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.EPOCH_PARAMS_URL}?_epoch_no={epoch_no}", timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + return info @@ -63,10 +98,22 @@ def get_epoch_block_protocols(self, epoch_no=None): :rtype: list """ timeout = get_timeout() - if epoch_no is None: - info = requests.get(self.EPOCH_BLOCKS_URL, timeout=timeout) - info = json.loads(info.content) + + if self.BEARER is None: + if epoch_no is None: + info = requests.get(self.EPOCH_BLOCKS_URL, timeout=timeout) + info = json.loads(info.content) + else: + info = requests.get(f"{self.EPOCH_BLOCKS_URL}?_epoch_no={epoch_no}", timeout=timeout) + info = json.loads(info.content) else: - info = requests.get(f"{self.EPOCH_BLOCKS_URL}?_epoch_no={epoch_no}", timeout=timeout) - info = json.loads(info.content) + if epoch_no is None: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(self.EPOCH_BLOCKS_URL, timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.EPOCH_BLOCKS_URL}?_epoch_no={epoch_no}", timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + return info \ No newline at end of file diff --git a/koios_python/network.py b/koios_python/network.py index 23dba60..1c1a73e 100644 --- a/koios_python/network.py +++ b/koios_python/network.py @@ -15,8 +15,14 @@ def get_tip(self): :rtype: list. """ timeout = get_timeout() - tip = requests.get(self.TIP_URL, timeout=timeout) - tip = json.loads(tip.content) + if self.BEARER is None: + tip = requests.get(self.TIP_URL, timeout=timeout) + tip = json.loads(tip.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + tip = requests.get(self.TIP_URL, timeout=timeout, headers=custom_headers) + tip = json.loads(tip.content) + return tip @@ -29,7 +35,13 @@ def get_genesis(self): :rtype: list. """ timeout = get_timeout() - genesis = requests.get(self.GENESIS_URL, timeout=timeout) + + if self.BEARER is None: + genesis = requests.get(self.GENESIS_URL, timeout=timeout) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + genesis = requests.get(self.GENESIS_URL, timeout=timeout, headers=custom_headers) + genesis = json.loads(genesis.content) return genesis @@ -45,12 +57,23 @@ def get_totals(self, epoch_no=None): :rtype: list. """ timeout = get_timeout() - if epoch_no is None: - totals = requests.get(self.TOTALS_URL, timeout=timeout) - totals = json.loads(totals.content) + + if self.BEARER is None: + if epoch_no is None: + totals = requests.get(self.TOTALS_URL, timeout=timeout) + totals = json.loads(totals.content) + else: + totals = requests.get(f"{self.TOTALS_URL}?_epoch_no={epoch_no}", timeout=timeout) + totals = json.loads(totals.content) else: - totals = requests.get(f"{self.TOTALS_URL}?_epoch_no={epoch_no}", timeout=timeout) - totals = json.loads(totals.content) + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + if epoch_no is None: + totals = requests.get(self.TOTALS_URL, timeout=timeout, headers=custom_headers) + totals = json.loads(totals.content) + else: + totals = requests.get(f"{self.TOTALS_URL}?_epoch_no={epoch_no}", timeout=timeout, headers=custom_headers) + totals = json.loads(totals.content) + return totals @Exception_Handler @@ -62,9 +85,16 @@ def get_param_updates(self, content_range="0-999"): :rtype: list """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - network_params = requests.get(self.NETWORK_PARAM_UPDATES_URL, headers=custom_headers, timeout=timeout) - network_params = json.loads(network_params.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + network_params = requests.get(self.NETWORK_PARAM_UPDATES_URL, headers=custom_headers, timeout=timeout) + network_params = json.loads(network_params.content) + else: + custom_headers = {"Range": str(content_range), "Authorizatoin": f"Bearer {self.BEARER}"} + network_params = requests.get(self.NETWORK_PARAM_UPDATES_URL, headers=custom_headers, timeout=timeout) + network_params = json.loads(network_params.content) + return network_params @Exception_Handler @@ -76,9 +106,16 @@ def get_treasury_withdrawals(self, content_range="0-999"): :rtype: list """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) - treasury_withdrawals = json.loads(treasury_withdrawals.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) + treasury_withdrawals = json.loads(treasury_withdrawals.content) + else: + custom_headers = {"Range": str(content_range), "Authorizatoin": f"Bearer {self.BEARER}"} + treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) + treasury_withdrawals = json.loads(treasury_withdrawals.content) + return treasury_withdrawals @Exception_Handler @@ -90,6 +127,14 @@ def get_reserve_withdrawals(self, content_range="0-999"): :rtype: list """ timeout = get_timeout() - reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout) - reserve_withdrawals = json.loads(reserve_withdrawals.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout) + reserve_withdrawals = json.loads(reserve_withdrawals.content) + else: + custom_headers = {"Range": str(content_range), "Authorizatoin": f"Bearer {self.BEARER}"} + reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout, headers=custom_headers) + reserve_withdrawals = json.loads(reserve_withdrawals.content) + return reserve_withdrawals \ No newline at end of file diff --git a/koios_python/ogmios.py b/koios_python/ogmios.py index a3b743e..8ee759e 100644 --- a/koios_python/ogmios.py +++ b/koios_python/ogmios.py @@ -19,7 +19,14 @@ def query(self, query, *params): """ print(f"Querying {self.url}...") timeout = get_timeout() - get_format = {"jsonrpc": "2.0", "method": query} - tip = requests.post(self.url, json = get_format, timeout=timeout) - tip = json.loads(tip.content) + + if self.BEARER is None: + get_format = {"jsonrpc": "2.0", "method": query} + tip = requests.post(self.url, json = get_format, timeout=timeout) + tip = json.loads(tip.content) + else: + get_format = {"jsonrpc": "2.0", "method": query} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + tip = requests.post(self.url, json = get_format, timeout=timeout, headers=custom_headers) + return tip \ No newline at end of file diff --git a/koios_python/transactions.py b/koios_python/transactions.py index 2e2c44b..a15c0a5 100644 --- a/koios_python/transactions.py +++ b/koios_python/transactions.py @@ -16,9 +16,17 @@ def get_tx_info(self, *args): :rtype: list. """ timeout = get_timeout() - get_format = {"_tx_hashes": [args]} - tx_info = requests.post(self.TX_INFO_URL, json = get_format, timeout=timeout) - tx_info = json.loads(tx_info.content) + + if self.BEARER is None: + get_format = {"_tx_hashes": [args]} + tx_info = requests.post(self.TX_INFO_URL, json = get_format, timeout=timeout) + tx_info = json.loads(tx_info.content) + else: + get_format = {"_tx_hashes": [args]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + tx_info = requests.post(self.TX_INFO_URL, json = get_format, timeout=timeout, headers=custom_headers) + tx_info = json.loads(tx_info.content) + return tx_info @@ -32,9 +40,17 @@ def get_tx_utxos(self, *args): :rtype: list. """ timeout = get_timeout() - get_format = {"_tx_hashes": [args]} - tx_utxos = requests.post(self.TX_UTXOS_URL, json = get_format, timeout=timeout) - tx_utxos = json.loads(tx_utxos.content) + + if self.BEARER is None: + get_format = {"_tx_hashes": [args]} + tx_utxos = requests.post(self.TX_UTXOS_URL, json = get_format, timeout=timeout) + tx_utxos = json.loads(tx_utxos.content) + else: + get_format = {"_tx_hashes": [args]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + tx_utxos = requests.post(self.TX_UTXOS_URL, json = get_format, timeout=timeout, headers=custom_headers) + tx_utxos = json.loads(tx_utxos.content) + return tx_utxos @@ -48,9 +64,17 @@ def get_tx_metadata(self, *args): :rtype: list. """ timeout = get_timeout() - get_format = {"_tx_hashes": [args]} - tx_metadata = requests.post(self.TX_METADATA_URL, json = get_format, timeout=timeout) - tx_metadata = json.loads(tx_metadata.content) + + if self.BEARER is None: + get_format = {"_tx_hashes": [args]} + tx_metadata = requests.post(self.TX_METADATA_URL, json = get_format, timeout=timeout) + tx_metadata = json.loads(tx_metadata.content) + else: + get_format = {"_tx_hashes": [args]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + tx_metadata = requests.post(self.TX_METADATA_URL, json = get_format, timeout=timeout, headers=custom_headers) + tx_metadata = json.loads(tx_metadata.content) + return tx_metadata @@ -63,10 +87,18 @@ def get_tx_metalabels(self, content_range="0-999"): :return: list of metalabels transactions """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - tx_metalabels = requests.get(self.TX_METALABELS_URL, headers \ - = custom_headers, timeout=timeout) - tx_metalabels = json.loads(tx_metalabels.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + tx_metalabels = requests.get(self.TX_METALABELS_URL, headers \ + = custom_headers, timeout=timeout) + tx_metalabels = json.loads(tx_metalabels.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + tx_metalabels = requests.get(self.TX_METALABELS_URL, headers \ + = custom_headers, timeout=timeout) + tx_metalabels = json.loads(tx_metalabels.content) + return tx_metalabels @@ -80,12 +112,22 @@ def submit_tx(self, file): :return: hex transaction ID (if is successful ) """ timeout = get_timeout() - with open(file, "rb") as cbor_tx: - cbor_tx = cbor_tx.read() - cbor_header = {'Content-Type': 'application/cbor'} - submit = requests.post(self.SUBMIT_TX_URL, headers = cbor_header, \ - data = cbor_tx, timeout=timeout) - submit = json.loads(submit.content) + + if self.BEARER is None: + with open(file, "rb") as cbor_tx: + cbor_tx = cbor_tx.read() + cbor_header = {'Content-Type': 'application/cbor'} + submit = requests.post(self.SUBMIT_TX_URL, headers = cbor_header, \ + data = cbor_tx, timeout=timeout) + submit = json.loads(submit.content) + else: + with open(file, "rb") as cbor_tx: + cbor_tx = cbor_tx.read() + cbor_header = {'Content-Type': 'application/cbor', "Authorization": f"Bearer {self.BEARER}"} + submit = requests.post(self.SUBMIT_TX_URL, headers = cbor_header, \ + data = cbor_tx, timeout=timeout) + submit = json.loads(submit.content) + return submit @@ -114,8 +156,29 @@ def get_utxo_info(self, *args, extended=False, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - get_format = {"_utxo_refs": [args], "_extended": extended} - utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) - utxo_info = json.loads(utxo_info.content) + + if self.BEARER is None and extended is False: + custom_headers = {"Range": str(content_range)} + get_format = {"_utxo_refs": [args], "_extended": "false"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + + if self.BEARER is None and extended is True: + custom_headers = {"Range": str(content_range)} + get_format = {"_utxo_refs": [args], "_extended": "true"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + + if self.BEARER is not None and extended is False: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_utxo_refs": [args], "_extended": "false"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + + if self.BEARER is not None and extended is True: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_utxo_refs": [args], "_extended": "true"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + return utxo_info \ No newline at end of file diff --git a/koios_python/urls.py b/koios_python/urls.py index c78ba7b..cdb8578 100644 --- a/koios_python/urls.py +++ b/koios_python/urls.py @@ -22,12 +22,13 @@ class URLs: from .ogmios import query - def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', server='koios'): + def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', server='koios', bearer=None): self.version = 'koios-python v1.3.1' self.url = url self.network = network self.server = server + self.BEARER = bearer # change subdomain to network name then change the rest of urls to use the new subdomain if self.network == 'preview' or self.network == 'preprod': diff --git a/tests/tests.py b/tests.py similarity index 66% rename from tests/tests.py rename to tests.py index cfab778..e73dec4 100644 --- a/tests/tests.py +++ b/tests.py @@ -4,34 +4,211 @@ """ import pprint as pp # We recommend use pprint library to show your outputs from koios_python import * # We need to install and import koios_python library +# from koios_python import block, epochs # alternative if we just need some functions import time -# alternative if we just need some functions -# from koios_python import block, epochs +import os +from dotenv import load_dotenv +# load the environment variables +load_dotenv() +# Get api token +token = os.getenv("TOKEN") + + ########################################################################################## ## MAINNET PARAMETERS (simple TESTS) # Default Koios Endpoint -kp = URLs() # We need to create an instance of the class URLs +kp = URLs() # We need to create an instance of the class URLs (no bearer token) + +kp_token = URLs(bearer=token) # We need to create an instance of the class URLs (with bearer token) +# pp.pprint(kp_token.BEARER) ########################################################################################## # Network Endpoint Tests ########################################################################################## +# # Get tip (no bearer token) +# pp.pprint(kp.get_tip()) + +# # Get tip (with bearer token) +# pp.pprint(kp_token.get_tip()) + +# # Get Genesis (no bearer token) +# pp.pprint(kp.get_genesis()) + +# # Get Genesis (with bearer token) +# pp.pprint(kp_token.get_genesis()) + +# # Get Totals (no bearer token) +# pp.pprint(kp.get_totals()) +# pp.pprint(kp.get_totals(epoch_no=320)) + +# # Get Totals (with bearer token) +# pp.pprint(kp_token.get_totals()) +# pp.pprint(kp_token.get_totals(epoch_no=320)) -pp.pprint(kp.get_tip()) +# Get Network Param Updates (no bearer token) +# pp.pprint(kp.get_param_updates()) +# # Get Network Param Updates (with bearer token) +# pp.pprint(kp_token.get_param_updates()) +# # Get Reserve Withdrawals (no bearer token) +# pp.pprint(kp.get_reserve_withdrawals()) +# # Get Reserve Withdrawals (with bearer token) +# pp.pprint(kp_token.get_reserve_withdrawals()) +# # Get Treasury Withdrawals (no bearer token) +# pp.pprint(kp.get_treasury_withdrawals()) +# # Get Treasury Withdrawals (with bearer token) +# pp.pprint(kp_token.get_treasury_withdrawals()) +########################################################################################## +# Epoch Endpoint Tests +########################################################################################## +# # Get Epoch Info (no bearer token) +# get_epoch_320_info = kp.get_epoch_info(epoch_no=320, include_next_epoch=True) +# pp.pprint(get_epoch_320_info) +# get_epoch_320_info_false = kp.get_epoch_info(epoch_no=320, include_next_epoch=False) +# pp.pprint(get_epoch_320_info_false) +# # Get Epoch Info (with bearer token) +# get_epoch_320_info = kp_token.get_epoch_info(epoch_no=320, include_next_epoch=True) +# pp.pprint(get_epoch_320_info) +# get_epoch_320_info_false = kp_token.get_epoch_info(epoch_no=320, include_next_epoch=False) +# pp.pprint(get_epoch_320_info_false) +# # Get Epoch Params (no bearer token) +# pp.pprint(kp.get_epoch_params(320)) +# # Get Epoch Params (with bearer token) +# pp.pprint(kp_token.get_epoch_params(320)) + +# # Get Epoch Block Protocols (no bearer token) +# pp.pprint(kp.get_epoch_block_protocols(320)) + +# # Get Epoch Block Protocols (with bearer token) +# pp.pprint(kp_token.get_epoch_block_protocols(320)) ########################################################################################## +# Block Endpoint Tests +########################################################################################## + +# Get Block List (no bearer token) +# pp.pprint(kp.get_blocks("0-10")) + +# # Get Block List (with bearer token) +# pp.pprint(kp_token.get_blocks("0-10")) + +# # Get Block Info (no bearer token) +# pp.pprint(kp.get_block_info(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30", \ +# "60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a", \ +# "c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015"])) + +# # Get Block Info (with bearer token) +# pp.pprint(kp_token.get_block_info(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30", \ +# "60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a", \ +# "c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015"])) + +# # Get Block Txs (no bearer token) +# pp.pprint(kp.get_block_txs(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30", \ +# "60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a", \ +# "c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015"])) + +# # Get Block Txs (with bearer token) +# pp.pprint(kp_token.get_block_txs(["fb9087c9f1408a7bbd7b022fd294ab565fec8dd3a8ef091567482722a1fa4e30", \ +# "60188a8dcb6db0d80628815be2cf626c4d17cb3e826cebfca84adaff93ad492a", \ +# "c6646214a1f377aa461a0163c213fc6b86a559a2d6ebd647d54c4eb00aaab015"])) + + + +########################################################################################## +# Transaction Endpoint Tests +########################################################################################## + +# # Get UTxO info (no bearer token) +# pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"])) + +# # Get UTxO info (no bearer token, extended) +# pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=True, content_range="0-9")) +# pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=False, content_range="0-9")) + +# # Get UTxO info (with bearer token) +# pp.pprint(kp_token.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"])) + +# # Get UTxO info (with bearer token, extended) +# pp.pprint(kp_token.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=True, content_range="0-9")) +# pp.pprint(kp_token.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=False, content_range="0-9")) + +# # Get Tx Info (no bearer token) +# pp.pprint(kp.get_tx_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Info (with bearer token) +# pp.pprint(kp_token.get_tx_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Metadata (no bearer token) +# pp.pprint(kp.get_tx_metadata(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Metadata (with bearer token) +# pp.pprint(kp_token.get_tx_metadata(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Metalabels (no bearer token) +# pp.pprint(kp.get_tx_metalabels(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Metalabels (with bearer token) +# pp.pprint(kp_token.get_tx_metalabels(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Submit Tx (no bearer token) +# Testing soon + +# # Submit Tx (with bearer token) +# Testing soon + +# # Get Tx Status (no bearer token) +# pp.pprint(kp.get_tx_status(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Status (with bearer token) +# pp.pprint(kp_token.get_tx_status(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) + +# # Get Tx Utxos (no bearer token) +# pp.pprint(kp.get_tx_utxos("f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94")) + +# # Get Tx Utxos (with bearer token) +# pp.pprint(kp_token.get_tx_utxos("f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ +# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94")) + +########################################################################################## +# Address Endpoint Tests +########################################################################################## + +# Get Address Info (no bearer token) +pp.pprint(kp.get_address_info(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +"addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# Get Address Info (with bearer token) +pp.pprint(kp_token.get_address_info(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +"addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + + # print('------------------------------------------------------------------------------------------') # print(kp.version) From 51c6a3a41cf6799bab6b3f90c649082fd3673a4e Mon Sep 17 00:00:00 2001 From: Wael Date: Wed, 24 Jan 2024 14:52:33 -0800 Subject: [PATCH 08/14] updated endpoints and tests --- tests.py | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 196 insertions(+), 6 deletions(-) diff --git a/tests.py b/tests.py index e73dec4..b411b69 100644 --- a/tests.py +++ b/tests.py @@ -200,13 +200,203 @@ # Address Endpoint Tests ########################################################################################## -# Get Address Info (no bearer token) -pp.pprint(kp.get_address_info(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ -"addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) +# # Get Address Info (no bearer token) +# pp.pprint(kp.get_address_info(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# # Get Address Info (with bearer token) +# pp.pprint(kp_token.get_address_info(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# # Get Address UTxOs (no bearer token) +# pp.pprint(kp.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# # Get Address UTxOs (no bearer token, extended) +# pp.pprint(kp.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], extended=True, content_range="0-9")) +# pp.pprint(kp.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], extended=False, content_range="0-9")) + +# # Get Address UTxOs (with bearer token) +# pp.pprint(kp_token.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# # Get Address UTxOs (with bearer token, extended) +# pp.pprint(kp_token.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], extended=True, content_range="0-9")) +# pp.pprint(kp_token.get_address_utxos(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], extended=False, content_range="0-9")) + +# # Get Address Txs (no bearer token) +# pp.pprint(kp.get_address_txs(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], +# after_block=6238675)) + +# # Get Address Txs (with bearer token) +# pp.pprint(kp_token.get_address_txs(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"], +# after_block=6238675)) + +# # Get Address Assets (no bearer token) +# pp.pprint(kp.get_address_assets(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv", \ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# # Get Address Assets (with bearer token) +# pp.pprint(kp_token.get_address_assets(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv", \ +# "addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) + +# # Get UTxOs from payment credentials (no bearer token) +# pp.pprint(kp.get_credential_utxos(["025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52", \ +# "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555"], extended=True, content_range="0-9")) + +# # Get UTxOs from payment credentials (with bearer token) +# pp.pprint(kp_token.get_credential_utxos(["025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52", +# "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555"], extended=False, content_range="0-9")) + +# # Get Credential TXs (no bearer token) +# pp.pprint(kp.get_credential_txs("025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52", \ +# "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555", after_block=6238675)) + +# # Get Credential TXs (with bearer token) +# pp.pprint(kp_token.get_credential_txs("025b0a8f85cb8a46e1dda3fae5d22f07e2d56abb4019a2129c5d6c52", \ +# "13f6870c5e4f3b242463e4dc1f2f56b02a032d3797d933816f15e555", after_block=6238675)) + +########################################################################################## +# Pool Endpoint Tests +########################################################################################## + +# # Get Pool List (no bearer token) +# pp.pprint(kp.get_pool_list()) + +# # Get Pool List (with bearer token) +# pp.pprint(kp_token.get_pool_list()) + +# # Get Pool Info (no bearer token) +# pp.pprint(kp.get_pool_info(["pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", +# "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m", +# "pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm"])) + +# # Get Pool Info (with bearer token) +# pp.pprint(kp_token.get_pool_info(["pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", +# "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m", +# "pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm"])) + +# # Get Pool Stake Snapshot (no bearer token) +# pp.pprint(kp.get_pool_stake_snapshot("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc")) + +# # Get Pool Stake Snapshot (with bearer token) +# pp.pprint(kp_token.get_pool_stake_snapshot("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc")) + +# # Get Pool Delegators (no bearer token) +# pp.pprint(kp.get_pool_delegators("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", content_range="0-9")) + +# # Get Pool Delegators (with bearer token) +# pp.pprint(kp_token.get_pool_delegators("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", content_range="0-9")) + +# # Get Pool Delegators History (no bearer token) +# pp.pprint(kp.get_pool_delegators_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", epoch_no=320)) + +# # Get Pool Delegators History (with bearer token) +# pp.pprint(kp_token.get_pool_delegators_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", epoch_no=320)) + +########################################################################################## +# Asset Endpoint Tests +########################################################################################## + +# # Get Asset List (no bearer token) +# pp.pprint(kp.get_asset_list(content_range="0-9")) + +# # Get Asset List (with bearer token) +# pp.pprint(kp_token.get_asset_list(content_range="0-9")) + +# # Get Policy Asset List (no bearer token) +# pp.pprint(kp.get_policy_asset_list("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","0-9")) + +# # Get Policy Asset List (with bearer token) +# pp.pprint(kp_token.get_policy_asset_list("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","0-9")) + +# # Get Asset Token Registry (no bearer token) +# pp.pprint(kp.get_asset_token_registry("0-9")) + +# # Get Asset Token Registry (with bearer token) +# pp.pprint(kp_token.get_asset_token_registry("0-9")) + +# # Get Asset Information (Bulk) (no bearer token) +# pp.pprint(kp.get_asset_info_bulk(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"], \ +# ["f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a","6b6f696f732e72657374"])) + +# # Get Asset Information (Bulk) (with bearer token) +# pp.pprint(kp_token.get_asset_info_bulk(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"], \ +# ["f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a","6b6f696f732e72657374"])) + +# # Get Asset UTxOs (no bearer token, extended=False) +# pp.pprint(kp.get_asset_utxos(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"], \ +# ["f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a","6b6f696f732e72657374"], extended=False)) + +# # Get Asset UTxOs (no bearer token, extended=True) +# pp.pprint(kp.get_asset_utxos(["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"], \ +# ["f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a","6b6f696f732e72657374"], extended=True, content_range="0-9")) + +# # Get Asset History (no bearer token) +# pp.pprint(kp.get_asset_history("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b" \ +# , content_range="0-9")) + +# # Get Asset History (with bearer token) +# pp.pprint(kp_token.get_asset_history("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b" \ +# , content_range="0-9")) + +# # Get Asset Addresses (no bearer token) +# pp.pprint(kp.get_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b" \ +# , content_range="0-9")) + +# # Get Asset Addresses (with bearer token) +# pp.pprint(kp_token.get_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b" \ +# , content_range="0-9")) + +# # Get Asset NFT Address (no bearer token) +# pp.pprint(kp.get_asset_nft_address("f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a", "68616e646c65")) + +# # Get Asset NFT Address (with bearer token) +# pp.pprint(kp_token.get_asset_nft_address("f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a", "68616e646c65")) + +# # Get Policy Asset Adress List (no bearer token) +# pp.pprint(kp.get_policy_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", content_range="0-9")) + +# # Get Policy Asset Adress List (with bearer token) +# pp.pprint(kp_token.get_policy_asset_addresses("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", content_range="0-9")) + +# # Get Policy Asset Info (no bearer token) +# pp.pprint(kp.get_policy_asset_info("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501")) + +# # Get Policy Asset Info (with bearer token) +# pp.pprint(kp_token.get_policy_asset_info("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501")) + +# # Get Asset Summary (no bearer token) +# pp.pprint(kp.get_asset_summary("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b")) + +# # Get Asset Summary (with bearer token) +# pp.pprint(kp_token.get_asset_summary("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b")) + +# # Get Asset Transactions (no bearer token) +# pp.pprint(kp.get_asset_txs("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b", after_block=50000,\ +# content_range="0-9")) + +# # Get Asset Transactions (with bearer token) +# pp.pprint(kp_token.get_asset_txs("750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501", "424f4f4b", after_block=50000,\ +# content_range="0-9")) + +########################################################################################## +# Account Endpoint Tests +########################################################################################## + +# # Get Account List (no bearer token) + + + + + -# Get Address Info (with bearer token) -pp.pprint(kp_token.get_address_info(["addr1qy2jt0qpqz2z2z9zx5w4xemekkce7yderz53kjue53lpqv90lkfa9sgrfjuz6uvt4uqtrqhl2kj0a9lnr9ndzutx32gqleeckv",\ -"addr1q9xvgr4ehvu5k5tmaly7ugpnvekpqvnxj8xy50pa7kyetlnhel389pa4rnq6fmkzwsaynmw0mnldhlmchn2sfd589fgsz9dd0y"])) # print('------------------------------------------------------------------------------------------') From eed2b5fd37e2f6b193491a504d769600d895c2a4 Mon Sep 17 00:00:00 2001 From: Wael Date: Wed, 24 Jan 2024 14:53:21 -0800 Subject: [PATCH 09/14] updating functions for bearer token and testing --- .../__pycache__/address.cpython-311.pyc | Bin 5958 -> 8754 bytes .../__pycache__/asset.cpython-311.pyc | Bin 11703 -> 16785 bytes koios_python/__pycache__/pool.cpython-311.pyc | Bin 10284 -> 14965 bytes koios_python/__pycache__/urls.cpython-311.pyc | Bin 9993 -> 9993 bytes koios_python/account.py | 13 +- koios_python/address.py | 103 ++++++-- koios_python/asset.py | 226 +++++++++++++----- koios_python/pool.py | 175 +++++++++++--- koios_python/urls.py | 2 +- 9 files changed, 407 insertions(+), 112 deletions(-) diff --git a/koios_python/__pycache__/address.cpython-311.pyc b/koios_python/__pycache__/address.cpython-311.pyc index 8ba0c7d0e578d50d5d0b2818cfbabb2f659bbcea..637a1dbed8f7d14e1c39703d4e4115cb4821d43b 100644 GIT binary patch literal 8754 zcmdT}U2GJ`9pAn04-9wQnP4Y@2_z90unoba#reX3O=t-uwrPnC-7L3z=e5tbW@Zm; z_e_k$!$rzND_O!-spOYXBJvPLec-XJ`jD4Od(~C4R!_UKj@8p1gwj1{sI>_IEfqOBwq3r z_)(ty_l^1_zZ59=M>shk1+R0rpxhn1Ha8lCr@R!p$xGquzJ|OIY6uaq@;!U|> z$lcUrFT(6ar8cOuxv5UnWpPVWZcOqGbD6{(ioJ)`%ZeluBo+!tlq4(@f^wx|R#Vg> ziG5A|Km9ciX@)oWSF-fVK0N!_BE8YN1H4A%f8S3w;=D1lRqEO;&xf6NBv+&IWR%}VaF|K?~c>ve4u!u-l_!i zkr0l!Kp#Zh?Py93LOWpK<_ZAUwAcLvWmsHD~aZVopU}=%QE-zbt%QqxsGtxHT~V}gB#D}c)Ev^r71FA%S+5Ukv(vI!&wO&) zhzZvFB$Lm4Mqq-dMI)>!Q?gppjJE!gHm+i2PNXl|{qRv)#4<)1KaRlk;V2|Vcw81G z8Iw%Ji05TZugtDUn9j}ee*%HyzDZ%oC&=-wP7ee>n z>N!imwVo@YTu?46a?f!!Tbcs%q-Ro9RMIs)3;ipaH-dFzS?->mH4?N%>t3K!jyu6P zMIZ7hBn#YswsKoKKc4zzYT?AaaQyl&^>F9Pwq463%Y%CRzDjI0{oLZa%P-b;{pjwT zK0KhI zvMfmYnMd(ENI^!t0K@O#j5aPK4U0u0GK@##A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jy;kS|5aN>;URv5_$DY66Zyg#MvGA8_LVUR6ddLToMt@$%>1~$o^)rkU& zV~o^yMur{pm`G|wjM*f8AH{@tOh8KTj?zmQi{ZxkGRB;Xu}qTJgpDI`tC7k@MZ+pD z5qL|-Af;)luHh~S^pV`-U@F0t;>+@~#|mvSn7=pt-Fq_6>Udf$F-^`(zACx)y@c<>dF}%AF7@Ad?}#^S=6yFj z{W5O#Yjk=I9(^ zM`D=ldYf{%cUtOS!oG z`bkb`gIS*#Dr|+s0_`W|z?5Ue;}ki3#2R?BK#53RXO5Hmaxw{SBRh6Kdp}*E>d2lI Lrkq;gcE0o<)1(md diff --git a/koios_python/__pycache__/asset.cpython-311.pyc b/koios_python/__pycache__/asset.cpython-311.pyc index 1a3a23cbc0e8116f512c3738e88d9675b50721a3..e70826ea07aad2ff88f1bf6af347aa61302561ee 100644 GIT binary patch literal 16785 zcmeHOU2GIrmahJ9+t_W~G;w?Qsf-E18H0%lF*vZZ5Da+3*o=QjVwiNwU1htWyUN_E z#@O5Jc%(?%EAg@t(pU;J@;nR+3lACXKA@FW;$@{gmbLw0m1N1%D$>qAdBn^MPkYX- zpRS*7w{7qcq?F6It8U%8b${x7=bZ1J`j^JWdIq-t$o)b1@D#)R51yD?&^UO0#m6we zW_V_d;eEV6>l^dYU;mh&5AeZkV1yBZe1Z>u<$D0PJT~uV#zHhd;>i!w{HP~C0{L}c zF|JyokX!G`t%KYKPi{S}d55Rw2AbdK$=?C_O`cjBY3Z1!bQ9z^drHS3cQ@bSDcubD zJNXbFzwhUFedTxcYA5d>W;))Q+gE>?NVhV)AhTRH%W|?TDC|UDOe+~llVM>K77sm#?MFY`(IB>3n7@o=-hwSv#?!&c~hnYHk*+ZR+^x*DRN5Y zmY`3n%pRKNCNq#F@SUtI5%}$>r?>VJLCF)bSHE{AqfFV}1+4FgUTm5pT#l6$!lorr z5kw_LIB` z(L`Utl*r|TBb=Om6wo450tZ)QEle9AYY`=r6QsQIB63#X2t4?apWxJLjc4-8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vAHLn?McHn&-_BA*$+6-fxW?>6p&31b8 zS`>i7zJ@h=!{&Xo1zW(rIRyQ{gjMv6HTqm_WZPC4v#@W*nuE}DdH4Q@XIGdmHsUC3 K(W-0oo&OKnwo_>U diff --git a/koios_python/__pycache__/pool.cpython-311.pyc b/koios_python/__pycache__/pool.cpython-311.pyc index cb53db94313d69419c775d6551d3fb990a56f2fe..1fbdf0b486c670a85d0672ec5b656226d96258a8 100644 GIT binary patch literal 14965 zcmeHOU2GFsmM;IrPSS}17tla}Vn7X^frJqL5`KCT5|RK(XeTrQrq@(lmDs^4r*D;k z1k;;H{g7R?=3y3T*zIm9v)W-hVpqz;NW;AGun)X#c~uXrrD%~>yV`kLM(n(>FMH0d zU)$w4VZ+R5G!^ICzIE@db8ppmzH`qx{`-c8ItGp(tIOigjxo%?;}`Sr86V!9^)Sp& z8G*UU2p++k_T2Q)ckfNF;1m35-v}f6g)KtOm!2ok<*C`9xfy`^;FnBEZ4K0h%4&mj zjM}m>LQo$O>dNYCX?=ZJeI3-Z!Utvb^|ZdBto{S2-y$@Y)i*$WxJ=4MI?AT9)?r$| zxvYMZ;2mb7TW5FIT_u^jDM6GuKAq;KGnq6uo|O_xDkI5tzs4mS{532y6ZI54-+vo8 zdZfL*J>j*Ml3@by8SluOAJMy^U}NJbUf+k_95ZR1o$D363idUQoaYIgdup9ec^>+d zpm~;ICjI7T7{%(B^X0t%;Clkse`-Dz%tOD@V77&R))+beWXP;9zScv(G_;y5g5N3m z*UYzGA@Gg&cPU@a4|l6(_FwBbIC@2e@=rjIIi{R(W5X{B0~fi1f}VKk+VeVC=$p`41Bh%KFZ8ATn*=-k1|*Y#884IZy}fz zc|jy{A*iIL#7tIs8|)H!A`))NOYm+M8alH|GDA|cJU*t;+Cu$=sKkxdg_^FO&R9>Z z;Dc!uLPY#LE6R#o@IjkG!_}doEAcD+!z1x)u`31tq@0lofpmr!;Bv-{mjVU9ET+c` z4Ms(rt_?wjRA@|OWhFBeH)X8FS;cW4GCq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i79b0SDJ6 z4}TA0(?TI;FcB|##IhQ=kCBhmr;WLMzu^ZU2g(Wt-xSE~%DMw&C+jesH=$cBuH&}K zY+qw#Zr6}DD`bD8b+zTTam(ErWi3RHKid7~z|{EY_^>qysH^iS6@t>cS=^VWV7DP2 z%)q|A=BaaUry!pi8iu0T)IfZ6V!WDLzis6s?y9>=KC<1xc*)%*SQz^wyw!I=lmOi- zg*CS5Te}O5Jw{`XPG3&)aYEm7>i$j;`1)RB*z@}gJ99RFcR_z7VAhi1#J3N@_}dUV z#+vvgLx2k}O353jaQ9-O7DnTvQ$weR#^coxN=BfKTACn7J%DtELB_!FPiXuOh_467 zWBQ)ad+&q57yMcxdae*XXGG7{aj7vM!3-qkA25)y4c6~tHy9KRjBiUmjDHUpE>Hg+ zFde%6`rNl|!@tGXzQNeys{rF~Gi>$K@WnN#b}sCTZZII+bExU0?OJ@14aOF(0cv<^ zuni4t;ToXk1!@pM16#NTsM$viTG7B3t^sPgr~!wQvxRGbn!VJ(o;bY)t^ume*+;Mk e5binDn2opMIa{~}s4-_~pQBc#22MNrRR05YM3Tq= diff --git a/koios_python/__pycache__/urls.cpython-311.pyc b/koios_python/__pycache__/urls.cpython-311.pyc index b976d8971c891764c1cc98a86a56207641a8e60c..7c1080ddeb7b660718014e9f032a98163e3e1208 100644 GIT binary patch delta 22 ccmeD5>-6JY&dbZi00d3B8&j1x^8Qf+07b_Jj{pDw delta 22 ccmeD5>-6JY&dbZi00j5Xu1gi)$ooeP086_EJpcdz diff --git a/koios_python/account.py b/koios_python/account.py index b923d6b..6602486 100644 --- a/koios_python/account.py +++ b/koios_python/account.py @@ -17,9 +17,16 @@ def get_account_list(self, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - account_list = requests.get(self.ACCOUNT_LIST_URL, headers = custom_headers, timeout=timeout) - account_list = json.loads(account_list.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + account_list = requests.get(self.ACCOUNT_LIST_URL, headers = custom_headers, timeout=timeout) + account_list = json.loads(account_list.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + account_list = requests.get(self.ACCOUNT_LIST_URL, headers = custom_headers, timeout=timeout) + account_list = json.loads(account_list.content) + return account_list diff --git a/koios_python/address.py b/koios_python/address.py index 47dbdc7..6b83fe2 100644 --- a/koios_python/address.py +++ b/koios_python/address.py @@ -42,14 +42,22 @@ def get_address_txs(self, *address_tx, after_block=0): :return: hash list of address transactions """ timeout = get_timeout() - get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} - hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, timeout=timeout) - hash_list = json.loads(hash_list.content) + + if self.BEARER is None: + get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} + hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, timeout=timeout) + hash_list = json.loads(hash_list.content) + + if self.BEARER is not None: + get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, headers=custom_headers, timeout=timeout) + hash_list = json.loads(hash_list.content) return hash_list @Exception_Handler -def get_credential_utxos(self, *payment_credentials, content_range="0-999"): +def get_credential_utxos(self, *payment_credentials, extended=False, content_range="0-999"): """ Get a list of UTxO against input payment credential array including their balances. @@ -58,10 +66,34 @@ def get_credential_utxos(self, *payment_credentials, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - get_format = {"_payment_credentials":[payment_credentials]} - utxos = requests.post(self.ADDRESS_CREDENTIAL_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) + + if self.BEARER is None and extended is True: + extended = "true" + custom_headers = {"Range": str(content_range)} + get_format = {"_payment_credentials":[payment_credentials], "_extended": extended} + utxos = requests.post(self.ADDRESS_CREDENTIAL_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is True: + extended = "true" + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_payment_credentials":[payment_credentials], "_extended": extended} + utxos = requests.post(self.ADDRESS_CREDENTIAL_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is None and extended is False: + extended = "false" + custom_headers = {"Range": str(content_range)} + get_format = {"_payment_credentials":[payment_credentials], "_extended": extended} + utxos = requests.post(self.ADDRESS_CREDENTIAL_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is False: + extended = "false" + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_payment_credentials":[payment_credentials], "_extended": extended} + utxos = requests.post(self.ADDRESS_CREDENTIAL_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) return utxos @@ -76,15 +108,23 @@ def get_address_assets(self, *args): :rtype: list. """ timeout = get_timeout() - get_format = {"_addresses": [args] } - addresses = requests.post(self.ADDRESS_ASSETS_URL, json= get_format, timeout=timeout) - addresses = json.loads(addresses.content) - return addresses + if self.BEARER is None: + get_format = {"_addresses": [args]} + assets = requests.post(self.ADDRESS_ASSETS_URL, json = get_format, timeout=timeout) + assets = json.loads(assets.content) + + if self.BEARER is not None: + get_format = {"_addresses": [args]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + assets = requests.post(self.ADDRESS_ASSETS_URL, json = get_format, headers=custom_headers, timeout=timeout) + assets = json.loads(assets.content) + + return assets @Exception_Handler -def get_credential_txs(self, *payment_credentials, after_block_height=0, content_range="0-999"): +def get_credential_txs(self, *payment_credentials, after_block=0, content_range="0-999"): """ Get the transaction hash list of input payment credential array (stake key), optionally filtering after specified block height (inclusive). @@ -95,10 +135,18 @@ def get_credential_txs(self, *payment_credentials, after_block_height=0, content :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": after_block_height} - txs_list = requests.post(self.ADDRESS_CREDENTIAL_TXS_URL, json = get_format, headers=custom_headers, timeout=timeout) - txs_list = json.loads(txs_list.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": str(after_block)} + txs_list = requests.post(self.ADDRESS_CREDENTIAL_TXS_URL, json = get_format, headers = custom_headers, timeout=timeout) + txs_list = json.loads(txs_list.content) + + if self.BEARER is not None: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": str(after_block)} + txs_list = requests.post(self.ADDRESS_CREDENTIAL_TXS_URL, json = get_format, headers = custom_headers, timeout=timeout) + txs_list = json.loads(txs_list.content) return txs_list @@ -113,19 +161,36 @@ def get_address_utxos(self, *addresses, extended=False, content_range="0-999"): :rtype: list. """ - if extended is True: + if self.BEARER is None and extended is True: extended = "true" timeout = get_timeout() custom_headers = {"Range": str(content_range)} get_format = {"_addresses": [addresses], "_extended": extended} utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) utxos = json.loads(utxos.content) - if extended is False: + + if self.BEARER is None and extended is False: extended = "false" timeout = get_timeout() custom_headers = {"Range": str(content_range)} get_format = {"_addresses": [addresses], "_extended": extended} utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) return utxos \ No newline at end of file diff --git a/koios_python/asset.py b/koios_python/asset.py index d0ff48d..f564fd0 100644 --- a/koios_python/asset.py +++ b/koios_python/asset.py @@ -17,11 +17,18 @@ def get_asset_list(self, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - custom_params = {"order": "asset_name.asc"} - asset_list = requests.get(self.ASSET_LIST_URL, headers = custom_headers, params = custom_params, timeout=timeout) - asset_list = json.loads(asset_list.content) + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + custom_params = {"order": "asset_name.asc"} + asset_list = requests.get(self.ASSET_LIST_URL, headers = custom_headers, params = custom_params, timeout=timeout) + asset_list = json.loads(asset_list.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + custom_params = {"order": "asset_name.asc"} + asset_list = requests.get(self.ASSET_LIST_URL, headers = custom_headers, params = custom_params, timeout=timeout) + asset_list = json.loads(asset_list.content) + return asset_list @@ -35,9 +42,15 @@ def get_asset_token_registry(self, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) - token_registry = json.loads(token_registry.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) + token_registry = json.loads(token_registry.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) + token_registry = json.loads(token_registry.content) return token_registry @@ -54,11 +67,19 @@ def get_asset_addresses(self, asset_policy, asset_name, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - custom_params = {"order": "payment_address.asc"} - info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ - headers = custom_headers, params = custom_params, timeout=timeout) - info = json.loads(info.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + custom_params = {"order": "payment_address.asc"} + info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ + headers = custom_headers, params = custom_params, timeout=timeout) + info = json.loads(info.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + custom_params = {"order": "payment_address.asc"} + info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ + headers = custom_headers, params = custom_params, timeout=timeout) + info = json.loads(info.content) return info @@ -74,27 +95,41 @@ def get_asset_nft_address(self, asset_policy, asset_name): :rtype: list. """ timeout = get_timeout() - info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) - info = json.loads(info.content) + + if self.BEARER is None: + info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) + info = json.loads(info.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", \ + headers = custom_headers, timeout=timeout) + info = json.loads(info.content) return info +#DEPRECATED ENDPOINT REMOVE IN FUTURE VERSIONS +# @Exception_Handler +# def get_asset_info(self, asset_policy, asset_name): +# """ +# Get the information of an asset including first minting & token registry metadata. -@Exception_Handler -def get_asset_info(self, asset_policy, asset_name): - """ - Get the information of an asset including first minting & token registry metadata. +# :param str asset_policy: asset Policy ID in hexadecimal format (hex). +# :param str asset_name: string with Asset Name in hexadecimal format (hex). +# :return: list of all asset info. +# :rtype: list. +# """ +# timeout = get_timeout() - :param str asset_policy: asset Policy ID in hexadecimal format (hex). - :param str asset_name: string with Asset Name in hexadecimal format (hex). - :return: list of all asset info. - :rtype: list. - """ - timeout = get_timeout() - info = requests.get(f"{self.ASSET_INFO_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) - info = json.loads(info.content) +# if self.BEARER is None: +# info = requests.get(f"{self.ASSET_INFO_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) +# info = json.loads(info.content) +# else: +# custom_headers = {"Authorization": f"Bearer {self.BEARER}"} +# info = requests.get(f"{self.ASSET_INFO_URL}{asset_policy}&_asset_name={asset_name}", \ +# headers = custom_headers, timeout=timeout) +# info = json.loads(info.content) - return info +# return info @Exception_Handler @@ -106,15 +141,22 @@ def get_asset_info_bulk(self, *asset_list): :rtype: list. """ timeout = get_timeout() - get_format = {"_asset_list": asset_list} - asset_info = requests.post(self.ASSET_INFO_BULK_URL, json= get_format, timeout=timeout) - asset_info = json.loads(asset_info.content) + + if self.BEARER is None: + get_format = {"_asset_list": asset_list} + asset_info = requests.post(self.ASSET_INFO_BULK_URL, json= get_format, timeout=timeout) + asset_info = json.loads(asset_info.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + get_format = {"_asset_list": asset_list} + asset_info = requests.post(self.ASSET_INFO_BULK_URL, json= get_format, headers=custom_headers, timeout=timeout) + asset_info = json.loads(asset_info.content) return asset_info @Exception_Handler -def get_asset_history(self, asset_policy, asset_name): +def get_asset_history(self, asset_policy, asset_name, content_range="0-999"): """ Get the mint/burn history of an asset. @@ -124,14 +166,23 @@ def get_asset_history(self, asset_policy, asset_name): :rtype: list. """ timeout = get_timeout() - history = requests.get(f"{self.ASSET_HISTORY_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) - history = json.loads(history.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + history = requests.get(f"{self.ASSET_HISTORY_URL}{asset_policy}&_asset_name={asset_name}", + headers=custom_headers, timeout=timeout) + history = json.loads(history.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + history = requests.get(f"{self.ASSET_HISTORY_URL}{asset_policy}&_asset_name={asset_name}", + headers=custom_headers, timeout=timeout) + history = json.loads(history.content) return history @Exception_Handler -def get_policy_asset_addresses(self, asset_policy, content_range="0-500"): +def get_policy_asset_addresses(self, asset_policy, content_range="0-999"): """ Get the list of addresses with quantity for each asset on the given policy @@ -141,11 +192,19 @@ def get_policy_asset_addresses(self, asset_policy, content_range="0-500"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - custom_params = {"order": "asset_name.asc"} - info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", - headers = custom_headers, params = custom_params, timeout = timeout) - info = json.loads(info.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + custom_params = {"order": "asset_name.asc"} + info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", + headers = custom_headers, params = custom_params, timeout = timeout) + info = json.loads(info.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + custom_params = {"order": "asset_name.asc"} + info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", + headers = custom_headers, params = custom_params, timeout = timeout) + info = json.loads(info.content) return info @@ -160,8 +219,15 @@ def get_policy_asset_info(self, asset_policy): :rtype: list. """ timeout = get_timeout() - info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", timeout=timeout) - info = json.loads(info.content) + + if self.BEARER is None: + info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", timeout=timeout) + info = json.loads(info.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", \ + headers = custom_headers, timeout=timeout) + info = json.loads(info.content) return info @@ -177,12 +243,20 @@ def get_policy_asset_list(self, asset_policy, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - custom_params = {"order": "asset_name.asc"} - info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", - headers = custom_headers, params = custom_params, timeout = timeout) - info = json.loads(info.content) + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + custom_params = {"order": "asset_name.asc"} + info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", + headers = custom_headers, params = custom_params, timeout = timeout) + info = json.loads(info.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + custom_params = {"order": "asset_name.asc"} + info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", + headers = custom_headers, params = custom_params, timeout = timeout) + info = json.loads(info.content) + return info @@ -198,14 +272,21 @@ def get_asset_summary(self, asset_policy, asset_name): :rtype: list. """ timeout = get_timeout() - summary = requests.get(f"{self.ASSET_SUMMARY_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) - summary = json.loads(summary.content) + + if self.BEARER is None: + summary = requests.get(f"{self.ASSET_SUMMARY_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) + summary = json.loads(summary.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + summary = requests.get(f"{self.ASSET_SUMMARY_URL}{asset_policy}&_asset_name={asset_name}", \ + headers = custom_headers, timeout=timeout) + summary = json.loads(summary.content) return summary @Exception_Handler -def get_asset_txs(self, asset_policy, asset_name, after_block_height=0, history=False, content_range="0-999"): +def get_asset_txs(self, asset_policy, asset_name, after_block=0, history=False, content_range="0-999"): """ Get the list of current or all asset transaction hashes (newest first) @@ -218,21 +299,39 @@ def get_asset_txs(self, asset_policy, asset_name, after_block_height=0, history= :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - if history is True: + if self.BEARER is None and history is True: history = "true" + custom_headers = {"Range": str(content_range)} txs = requests.get(f"{self.ASSET_TXS_URL}{asset_policy}&_asset_name={asset_name} \ - &_after_block_height={after_block_height}&_history={history}", + &_after_block_height={after_block}&_history={history}", headers=custom_headers, timeout=timeout) txs = json.loads(txs.content) - if history is False: + + if self.BEARER is None and history is False: history = "false" + custom_headers = {"Range": str(content_range)} txs = requests.get(f"{self.ASSET_TXS_URL}{asset_policy}&_asset_name={asset_name} \ - &_after_block_height={after_block_height}&_history={history}", + &_after_block_height={after_block}&_history={history}", headers=custom_headers, timeout=timeout) txs = json.loads(txs.content) + if self.BEARER is not None and history is True: + history = "true" + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + txs = requests.get(f"{self.ASSET_TXS_URL}{asset_policy}&_asset_name={asset_name} \ + &_after_block_height={after_block}&_history={history}", + headers=custom_headers, timeout=timeout) + txs = json.loads(txs.content) + + if self.BEARER is not None and history is False: + history = "false" + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + txs = requests.get(f"{self.ASSET_TXS_URL}{asset_policy}&_asset_name={asset_name} \ + &_after_block_height={after_block}&_history={history}", + headers=custom_headers, timeout=timeout) + txs = json.loads(txs.content) + return txs @Exception_Handler @@ -245,19 +344,34 @@ def get_asset_utxos(self, *asset_list, extended=False, content_range="0-999"): :return: list of utxos :rtype: list. """ - if extended is True: + if self.BEARER is None and extended is True: extended = "true" timeout = get_timeout() custom_headers = {"Range": str(content_range),} get_format = {"_asset_list": asset_list, "_extended": extended} utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) utxos = json.loads(utxos.content) - if extended is False: + if self.BEARER is None and extended is False: extended = "false" timeout = get_timeout() custom_headers = {"Range": str(content_range),} get_format = {"_asset_list": asset_list, "_extended": extended} utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + if self.BEARER is not None and extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) return utxos \ No newline at end of file diff --git a/koios_python/pool.py b/koios_python/pool.py index 6bebd03..66f82b8 100644 --- a/koios_python/pool.py +++ b/koios_python/pool.py @@ -16,9 +16,17 @@ def get_pool_list(self, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - pool_list = requests.get(self.POOL_LIST_URL, headers = custom_headers, timeout=timeout) - pool_list = json.loads(pool_list.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + pool_list = requests.get(self.POOL_LIST_URL, headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(self.POOL_LIST_URL, headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list @@ -32,9 +40,17 @@ def get_pool_info(self, *args): :rtype: list. """ timeout = get_timeout() - get_format = {"_pool_bech32_ids": [args] } - pool_list = requests.post(self.POOL_INFO_URL, json = get_format, timeout=timeout) - pool_list = json.loads(pool_list.content) + + if self.BEARER is None: + get_format = {"_pool_bech32_ids": [args] } + pool_list = requests.post(self.POOL_INFO_URL, json = get_format, timeout=timeout) + pool_list = json.loads(pool_list.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + get_format = {"_pool_bech32_ids": [args] } + pool_list = requests.post(self.POOL_INFO_URL, json = get_format, headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list @@ -48,8 +64,15 @@ def get_pool_stake_snapshot(self, pool_bech32): :rtype: list. """ timeout = get_timeout() - snapshot = requests.get(self.POOL_STAKE_SNAPSHOT + pool_bech32, timeout=timeout) - snapshot = json.loads(snapshot.content) + + if self.BEARER is None: + snapshot = requests.get(self.POOL_STAKE_SNAPSHOT + pool_bech32, timeout=timeout) + snapshot = json.loads(snapshot.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + snapshot = requests.get(self.POOL_STAKE_SNAPSHOT + pool_bech32, headers = custom_headers, timeout=timeout) + snapshot = json.loads(snapshot.content) + return snapshot @@ -64,9 +87,16 @@ def get_pool_delegators(self, pool_bech32, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - info = requests.get(self.POOL_DELEGATORS_URL + pool_bech32, headers = custom_headers, timeout=timeout) - info = json.loads(info.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + info = requests.get(self.POOL_DELEGATORS_URL + pool_bech32, headers = custom_headers, timeout=timeout) + info = json.loads(info.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + info = requests.get(self.POOL_DELEGATORS_URL + pool_bech32, headers = custom_headers, timeout=timeout) + info = json.loads(info.content) + return info @@ -83,17 +113,30 @@ def get_pool_delegators_history(self, pool_bech32, epoch_no=None, content_range= """ timeout = get_timeout() custom_headers = {"Range": str(content_range)} - if epoch_no is None: + + if self.BEARER is None and epoch_no is None: info = requests.get(self.POOL_DELEGATORS_HISTORY_URL + pool_bech32, headers=custom_headers, timeout=timeout) info = json.loads(info.content) - else: + + if self.BEARER is None and epoch_no is not None: info = requests.get(f"{self.POOL_DELEGATORS_HISTORY_URL}{pool_bech32}&_epoch_no={epoch_no}", headers=custom_headers, timeout=timeout) info = json.loads(info.content) + + if self.BEARER is not None and epoch_no is None: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + info = requests.get(self.POOL_DELEGATORS_HISTORY_URL + pool_bech32, headers=custom_headers, timeout=timeout) + info = json.loads(info.content) + + if self.BEARER is not None and epoch_no is not None: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.POOL_DELEGATORS_HISTORY_URL}{pool_bech32}&_epoch_no={epoch_no}", headers=custom_headers, timeout=timeout) + info = json.loads(info.content) + return info @Exception_Handler -def get_pool_blocks(self, pool_bech32, epoch_no=None): +def get_pool_blocks(self, pool_bech32, epoch_no=None, content_range="0-999"): """ Return information about blocks minted by a given pool for all epochs (or _epoch_no if provided) @@ -103,17 +146,32 @@ def get_pool_blocks(self, pool_bech32, epoch_no=None): :rtype: list.s """ timeout = get_timeout() - if epoch_no is None: - info = requests.get(self.POOL_BLOCKS_URL + pool_bech32, timeout=timeout) + + if self.BEARER is None and epoch_no is None: + custom_headers = {"Range": str(content_range)} + info = requests.get(self.POOL_BLOCKS_URL + pool_bech32, timeout=timeout, headers=custom_headers) info = json.loads(info.content) - else: - info = requests.get(f"{self.POOL_BLOCKS_URL}{pool_bech32}&_epoch_no={epoch_no}", timeout=timeout) + + if self.BEARER is None and epoch_no is not None: + custom_headers = {"Range": str(content_range)} + info = requests.get(f"{self.POOL_BLOCKS_URL}{pool_bech32}&_epoch_no={epoch_no}", timeout=timeout, headers=custom_headers) + info = json.loads(info.content) + + if self.BEARER is not None and epoch_no is None: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + info = requests.get(self.POOL_BLOCKS_URL + pool_bech32, headers=custom_headers, timeout=timeout) + info = json.loads(info.content) + + if self.BEARER is not None and epoch_no is not None: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.POOL_BLOCKS_URL}{pool_bech32}&_epoch_no={epoch_no}", headers=custom_headers, timeout=timeout) info = json.loads(info.content) + return info @Exception_Handler -def get_pool_history(self, pool_bech32, epoch_no="history"): +def get_pool_history(self, pool_bech32, epoch_no=None): """ Return information about pool stake, block and reward history in a given epoch _epoch_no \ (or all epochs that pool existed for, in descending order if no _epoch_no was provided) @@ -124,12 +182,25 @@ def get_pool_history(self, pool_bech32, epoch_no="history"): :rtype: list. """ timeout = get_timeout() - if epoch_no == "history": + + if self.BEARER is None and epoch_no == None: info = requests.get(self.POOL_HISTORY_URL + pool_bech32, timeout=timeout) info = json.loads(info.content) - else: + + if self.BEARER is None and epoch_no is not None: info = requests.get(f"{self.POOL_HISTORY_URL}{pool_bech32}&_epoch_no={epoch_no}", timeout=timeout) info = json.loads(info.content) + + if self.BEARER is not None and epoch_no is None: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(self.POOL_HISTORY_URL + pool_bech32, headers=custom_headers, timeout=timeout) + info = json.loads(info.content) + + if self.BEARER is not None and epoch_no is not None: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.POOL_HISTORY_URL}{pool_bech32}&_epoch_no={epoch_no}", headers=custom_headers, timeout=timeout) + info = json.loads(info.content) + return info @@ -143,12 +214,25 @@ def get_pool_updates(self, pool_bech32=None): :rtype: list. """ timeout = get_timeout() - if pool_bech32 is None: + + if self.BEARER is None and pool_bech32 is None: pool_list = requests.get(self.POOL_UPDATES_URL, timeout=timeout) pool_list = json.loads(pool_list.content) - else: + + if self.BEARER is None and pool_bech32 is not None: pool_list = requests.get(f"{self.POOL_UPDATES_URL}?_pool_bech32={pool_bech32}", timeout=timeout) pool_list = json.loads(pool_list.content) + + if self.BEARER is not None and pool_bech32 is None: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(self.POOL_UPDATES_URL, headers=custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + + if self.BEARER is not None and pool_bech32 is not None: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(f"{self.POOL_UPDATES_URL}?_pool_bech32={pool_bech32}", headers=custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list @@ -162,9 +246,16 @@ def get_pool_relays(self, content_range="0-999"): :rtype: list. """ timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - pool_list = requests.get(self.POOL_RELAYS_URL, headers = custom_headers, timeout=timeout) - pool_list = json.loads(pool_list.content) + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + pool_list = requests.get(self.POOL_RELAYS_URL, headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(self.POOL_RELAYS_URL, headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list @@ -178,13 +269,17 @@ def get_pool_metadata(self, *args): :rtype: list. """ timeout = get_timeout() - if len(args) == 0: - pool_list = requests.post(self.POOL_METADATA_URL, timeout=timeout) - pool_list = json.loads(pool_list.content) - else: - get_format = {"_pool_bech32_ids": [args]} + + if self.BEARER is None and len(args) != 0: + get_format = {"_pool_bech32_ids": [args] } pool_list = requests.post(self.POOL_METADATA_URL, json = get_format, timeout=timeout) pool_list = json.loads(pool_list.content) + + if self.BEARER is not None and len(args) == 0: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(self.POOL_METADATA_URL, headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list @Exception_Handler @@ -199,9 +294,16 @@ def get_pool_registrations(self, epoch_no=None): timeout = get_timeout() if epoch_no is None: print(f"WARNING: epoch_no is required") - else: + return + + if self.BEARER is None: pool_list = requests.get(f"{self.POOL_REGISTRATIONS_URL}{epoch_no}", timeout=timeout) pool_list = json.loads(pool_list.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(f"{self.POOL_REGISTRATIONS_URL}{epoch_no}", headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list @Exception_Handler @@ -216,7 +318,14 @@ def get_pool_retirements(self, epoch_no=None): timeout = get_timeout() if epoch_no is None: print(f"WARNING: epoch_no is required") - else: + return + + if self.BEARER is None: pool_list = requests.get(f"{self.POOL_RETIREMENTS_URL}{epoch_no}", timeout=timeout) pool_list = json.loads(pool_list.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + pool_list = requests.get(f"{self.POOL_RETIREMENTS_URL}{epoch_no}", headers = custom_headers, timeout=timeout) + pool_list = json.loads(pool_list.content) + return pool_list \ No newline at end of file diff --git a/koios_python/urls.py b/koios_python/urls.py index cdb8578..5fe863c 100644 --- a/koios_python/urls.py +++ b/koios_python/urls.py @@ -98,7 +98,7 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', serv # Asset URLs self.ASSET_LIST_URL = self.url + "asset_list" self.ASSET_ADDRESSES_URL = self.url + "asset_addresses?_asset_policy=" - self.ASSET_INFO_URL = self.url + "asset_info?_asset_policy=" + self.ASSET_INFO_URL = self.url + "asset_info?_asset_policy=" #DEPRECATED self.ASSET_HISTORY_URL = self.url + "asset_history?_asset_policy=" self.POLICY_ASSET_INFO_URL = self.url + "policy_asset_info?_asset_policy=" self.ASSET_SUMMARY_URL = self.url + "asset_summary?_asset_policy=" From 161de12be556de247f877633e1f7995f14f8340d Mon Sep 17 00:00:00 2001 From: Wael Date: Wed, 24 Jan 2024 16:42:15 -0800 Subject: [PATCH 10/14] accounts, asset, tests updates --- .../__pycache__/account.cpython-311.pyc | Bin 10056 -> 16972 bytes .../__pycache__/asset.cpython-311.pyc | Bin 16785 -> 16785 bytes koios_python/__pycache__/urls.cpython-311.pyc | Bin 9993 -> 9978 bytes koios_python/account.py | 214 +++++++++++++++--- koios_python/asset.py | 46 ++-- koios_python/urls.py | 2 +- tests.py | 71 ++++++ 7 files changed, 275 insertions(+), 58 deletions(-) diff --git a/koios_python/__pycache__/account.cpython-311.pyc b/koios_python/__pycache__/account.cpython-311.pyc index 92e81c8c0b6ce2ef95762f3015c1ebb2b15c5936..d71645bdc376aa2e546af456f3415fa4b3a87855 100644 GIT binary patch literal 16972 zcmeHOTTC2Rny$V#G!0F60}Z|v!69y6aBPDwIQA^D!G;Cw0FDE8(rI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KJ*M)>=m3DlnruGpaG8ko?hNf$7qjE{*9b zGM(E^1?H`d5D_2x^s3e}WL^bkSZ9VcX1K`m|JHr!3-*%6UfRLEzfj;V>fA+*yI9uc zT`$F51_|fFUE2*pm*DrCE<79OsQTuux`O}6dc#gIyq+rr59`6hTk03VV_NW7v7xEx z4}WxQBVC9b(<8?U{$uNP-(10Sd5vlSKXj||Hcb7Kfxy6V>a*iqjB$U~f8~0_{ZIWY z#J`TTLdvhB1BYTk_iut;c&L3~^8dat7)26FtN|E=UoAhSEO&MtbofJv^1(hSt55qHL6~oqHZ0T&kCq#X=t^`J=byt7 z=3smLPw&B@=J>>P4d-!mum1`4;o_$E$?DU=-X}{4{TRyqBYbV|Q<-)226&(FwqyrP zW$^RsFzERM9oKN2p6|y58O}F7-+k5u;C9z=FxPevdrOO=lJ=~5GyORl=&9*mF6(*4 z3713G|F>GT+{^es3KfPQ__s2OK>q!J9kdJ1`F<*sUB*t@6@0eMCy^w=Zwg3}K#s7i zWB>coO7t{u`)|`Lr0%&?8r-^MdCg(}u9B6Ksksy|oqK6Hc^{}!YJNeroY)H3oi&bW z$)dJTOUa)PD*b5Xr?aHde$y%?&S%_eg0$7o@9m7)1=E2}+6K?woUokcQwl!@Z0$5Z zhvX$5Yn*%F@XKW2Ja~=E5vmwUBUsiH@mZVd!mmD3%)dJ9^;S2Q(<+cc zB6L}UukurffJwDDp6V}s5zW_LY&rfsq%~gzUo!k#;p#T0clEuT(cZtSvC{>1T4$%% z{pPER3%=$7}ksFtTr6tGk$;QDJkS V=_z)`z|AtY2bmeoCf{?|3;=km6juNM delta 65 zcmbQ(%s8=`k#{*SFBbz4?8@DkYPONrN0ssN<|tJb7RFbb<28L*7}++j)m_ZaD8D(- V^b|W|z-AfSgUpO3lkYif1^{=56ifgB diff --git a/koios_python/__pycache__/urls.cpython-311.pyc b/koios_python/__pycache__/urls.cpython-311.pyc index 7c1080ddeb7b660718014e9f032a98163e3e1208..f9aec40d2731f70c473de0db1c359ec54edcb724 100644 GIT binary patch delta 53 zcmeD5`{m2KoR^o20SLkuZcG)~$lEQ%&zG2-oL`z(5?@+UkzZ`Td7ID_ZWf!1iZ+}5 IN6Y Date: Wed, 24 Jan 2024 17:04:53 -0800 Subject: [PATCH 11/14] finish updates --- .../__pycache__/scripts.cpython-311.pyc | Bin 5314 -> 7606 bytes koios_python/scripts.py | 96 ++++++++-- tests.py | 180 ++++-------------- 3 files changed, 110 insertions(+), 166 deletions(-) diff --git a/koios_python/__pycache__/scripts.cpython-311.pyc b/koios_python/__pycache__/scripts.cpython-311.pyc index 3bf7dd8ccc6b85cbb27ca57d61bb438ef25a7c1a..cc34a8fab8da4c37c149499b41d5613cb06d6952 100644 GIT binary patch literal 7606 zcmeHMO>Eo96(%X_$C7`NIO49YO)^w}AvyE-=FJS>`@VVpysa(B!SU#3`P<0ky9KG0AfVD&8x^({~z zywBBX2}11-rL{pi1ob|p?J=*k-xuoMX;p+VF1mA$1g}x;c2ZGwBBxSBPtau6(8;8k zNf=2jqX)l4Yp+Im+pDKkHTxwGkMP95_rlwM=;XJ2a9$A%eAhj4{1a$6X^eGX_dHn z(P%5l!h2;MIdLXXs;}*9Ud)WV%oatgw)_$I8$t0t7T%y2_Ekg_{XLOmZxhouG z`UkTzmD5BwC;^Enb&zD`sU#>@6_U_0hMF;)hJ(b+5^RVi5!D6X*GHe?#p8coizaYkG0(3EP#U1{5QW_W0Hc+~d50PO%(e`cz>q1$3s z(+yj?IuyJ3@o;?X!_kY^V)4rt$71pE(aW|tqiY%4o6=+jI(BDa#cPYYnwqrR+=@7x zFB(E4+7qU3Xz6&#+K}UCaU7G5A22Q@d2#BVfWs9x$YBtU$5A{bLu`(fy0`FVhR>*ZraU z_bh++YWM!njxNpTdyW-)j#*vD7u(mQy${k$XA9ps{pV9wV#bng<)vE%>DFRsP3nFy zvlJ=pAIM9`3evH~&|>JXJ-y|(FT}0Uj|-zWEx3WR>k~L%P2YM*vP5YEjOG3xUj9wt z<;Bax%e9ngnEKZ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c1T!ICie&n@w9r`xtoQ1D838ID7b|NP?i{**xTUWmF zSKgX2=I>4{V^yWh(RaBzv#dq0HBZs)L1~lz>PSxP-yj8 zk-nLV>L_Fi2@8br6p^mOi^9ACQUS?kn2An+VJ{>G1%M|QkP)&NCmB{9EOtcbK%y}j z(V~I{8H}0D7_+#iXX0vn{-eay&1<*zLzmk^m#<;a0+$cLW1WL(cjCFU(^C(sS!3C; zor5)8g0D6Wq6J;G(5dot`8^{zTAJPo9@`vxqE}B|coF;a10#5+61-Cl-ocK6&A}(r z)f49{!I5fkq%>Xg4;bPAgV?ns;@f#JnPUw12$1&}*h%3F9Q{lY)`de-O;K?*^Ig%^ z%1?kp_v=&5r;wsPI_Kl7w+>;B=O2YtrYcnvuvV)`E9v@KkkO^I zCS8*=8gZPlE!%$W?woP$P8>HyofZho9oGCmOgJmL0`82SOfmH|-Ag!kXIgOzJNxYL zF(3c**1n;`!+sbu zfh}>n{hYV&i*dsffluw|u?_D|Xz16&o5LHP+Tf|*T`aFx&b(Va^R991M;kpm14Em4 z%kk>lG2`@SFJ?gCCw|v1q|{x!{Y?w-6P^*iVe%hLZuoY>gPSYm!Ro1tmGF2qJig)E z@Vz`b_?_ol^I-b1{Fa>$5Tu?K@WeCkXX?BBNPq|dal>rcSS`g z3M?$X0UZ_HaQ79TyS9KHx9b$S{vS{fb7N8F_H$#)ArAd6u0)wy6G@#dgXmDt15*Id7pj&UFd;Y z0OYQV=lNYx;Kf}IMHk0+m;Crw%KC~-z^O0T75#P8t;b_%q z{sC0pK*7(S*yTVp24l+!dvF-7hZ}uRvHQYM;vCUXz?M-MT>J3{yIcTQ*CHB Date: Fri, 1 Mar 2024 18:58:51 +0100 Subject: [PATCH 12/14] PyTest passed --- .../test_koios.cpython-311-pytest-7.2.2.pyc | Bin 0 -> 71341 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 424 -> 447 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 540 -> 581 bytes .../__pycache__/account.cpython-310.pyc | Bin 5378 -> 8721 bytes .../__pycache__/account.cpython-311.pyc | Bin 16972 -> 17013 bytes .../__pycache__/address.cpython-310.pyc | Bin 3212 -> 5109 bytes .../__pycache__/address.cpython-311.pyc | Bin 8754 -> 8811 bytes .../__pycache__/asset.cpython-310.pyc | Bin 7325 -> 9623 bytes .../__pycache__/asset.cpython-311.pyc | Bin 16785 -> 16826 bytes .../__pycache__/block.cpython-310.pyc | Bin 1631 -> 1918 bytes .../__pycache__/block.cpython-311.pyc | Bin 3207 -> 3248 bytes .../__pycache__/environment.cpython-310.pyc | Bin 2598 -> 2623 bytes .../__pycache__/environment.cpython-311.pyc | Bin 4114 -> 4155 bytes .../__pycache__/epoch.cpython-310.pyc | Bin 2089 -> 2735 bytes .../__pycache__/epoch.cpython-311.pyc | Bin 5515 -> 5556 bytes .../__pycache__/network.cpython-310.pyc | Bin 2081 -> 3543 bytes .../__pycache__/network.cpython-311.pyc | Bin 6183 -> 6229 bytes .../__pycache__/ogmios.cpython-310.pyc | Bin 0 -> 1035 bytes .../__pycache__/ogmios.cpython-311.pyc | Bin 1410 -> 1451 bytes koios_python/__pycache__/pool.cpython-310.pyc | Bin 5885 -> 8375 bytes koios_python/__pycache__/pool.cpython-311.pyc | Bin 14965 -> 15068 bytes .../__pycache__/scripts.cpython-310.pyc | Bin 2312 -> 4446 bytes .../__pycache__/scripts.cpython-311.pyc | Bin 7606 -> 7653 bytes .../__pycache__/transactions.cpython-310.pyc | Bin 3253 -> 4672 bytes .../__pycache__/transactions.cpython-311.pyc | Bin 8301 -> 8398 bytes koios_python/__pycache__/urls.cpython-310.pyc | Bin 5511 -> 6481 bytes koios_python/__pycache__/urls.cpython-311.pyc | Bin 9978 -> 10019 bytes koios_python/account.py | 106 ++++----- koios_python/address.py | 144 ++++++------ koios_python/asset.py | 221 +++++++++--------- koios_python/environment.py | 1 - koios_python/epoch.py | 1 + koios_python/network.py | 39 ++-- koios_python/pool.py | 3 + koios_python/scripts.py | 87 +++---- koios_python/transactions.py | 78 ++++--- koios_python/urls.py | 7 +- tests.py | 66 +++--- 38 files changed, 382 insertions(+), 371 deletions(-) create mode 100644 __pycache__/test_koios.cpython-311-pytest-7.2.2.pyc create mode 100644 koios_python/__pycache__/ogmios.cpython-310.pyc diff --git a/__pycache__/test_koios.cpython-311-pytest-7.2.2.pyc b/__pycache__/test_koios.cpython-311-pytest-7.2.2.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f6790df1e2f51e416ad8946a53e3da4bf473b01 GIT binary patch literal 71341 zcmeHwdu$v>dglx|t2TOz3%I9$-c!N zQ`EZ%yk|ySulJJ9cU-Uc5f9)#(gnDmbORnBUciII2Y86|03Ig2fJaCl;8C&<@EF+- zc$^#n>?a2SPmn`^1LQE^Npb{mkQ@aZBF6xS$#K9D(hqowoB$jp1Au;V5^#(R0-h#A zfM>`s;5ZopJWEaiPLNT+bHoogNyY%D$Z5c7at81`83(*T&H`Q}6M&bBgj@uSl1qRwG6NVV0l)+a0wzfa@G=PlevU){A0bh|M@bCuF%k!S zoFo9RkR;$$(($ru>az47@v?efdHUs7uHSgZ|MHVBUH`%>{%bG3o2}M`-RtD zdG^H{{x7~vv50`KxAz5UA?GiYl|sHK`|}xpX?~&TFQ%1+LdlO%Desqa#j+y%Q&Mpu z?a!2R>C!?zCuJ8(Yn)#8FXb2V#fyct(tJMW&n~1CNm=ttInujOD*7|BR04m|FG0wy zyt1^AoAcjVD9s})*`F>eikvI?Z^}v$Voiz9QHlPSP(uIJFI>OW+k3qPo@~}XFJ}w> zl3Xkq<&nu8gh)jyKS#{6mgc1r6K@s}$ib2WRn;|MFCC z?~iHYa3d|62n4+Nb>jDv6yP^qB@6Bj8l;_n#Ql36?*j9lz}|M1x@vS4mjml2owqwG z?n=j!hf>|{taKLtu0-=S{uWs}jSx?zGvg**lseP#F4Ett;krwGCWp(l*lmXGjowXH z@uW?*$fqPExf~@_>>NH*a$}C1n{*Rzi{&|1zdX+8q}b_1DV%i3+iR0pqjcM!d;==S z+atbj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3puWGa26mPIJH$y zZCKJ)Ijjj36Lb&M_SjZAsI6_4^O;dOY>^F`Ytz@b)sY8wSU+lEGiOG(2kIm~9PLwE zV`C|T@(MoZA5#Ss<6|Ckjg5LSuMHOT!2)#wqf@WJ>S$06mtnzsnmZ+jnNzZ#IVA&P zHkLUh*I9b=ls5UaKKbg4sd4X;Z%gvoR2nQWarZ++2dd!smL)CP9Q&-N}m*3l1JF=MpdS@{0ofTMaF zu-BPGf-*W@W6a7$p^gUYCO;g7R9h!gD+Il%*PxF6&Z3frPi+nds>1;_Sk#6~`fy40 zoMapAu*Ea+HK?TP?&s*NQv7*3I6D0TwZ{QsJq=Syew+fLd&llvt$ML!=InRRsF$AA zrmySM*WbTdoqj=^eqqZetM*H`M;%yevFBLZN75(IUlJR_j2IU+1lHhprH zVL7`X6JkY*2-M9;&|Bq*T&%o2yfa@R0R%!wBMBfD^qg3*h`ja`pekuX^`2FyU%=H? zNo|$nYVTcYj#NL^#WGfv#9SKCdSm;3xGe8M9UT@-LKXGzNP0MGsOHun3ZT3R_0xd? zkvS?d51&$}mb8JaK9Hs7Ptj8ZE>=e_sx#ED;i~&ds)A;oqAKXr(^LfkVgq%if~+Tx z7-v#l(I&3y6IZ`~wL0;%Hu3b9?+w*{>Gr4tYmGLc)O>Gj_}*wl04z{~pl+0B1e7&L zghk4x?~N+Ma&|!`#EKLVsGE_Xx5^Q@Sb2GPXTCxL2!xPE5-MC7j z8-cLp(+XX#rqGoN%spJ8uBQt1K~m`4twOEo%%Z{ikgOKpJ zHK2D5yxnncpvxV+=Mvyhw|nZIOMoL??rDlO0I&gyHNcS`_p3O}$O0kl0;M+q=r2)v z103~g=(@)ht%H%qa=x+y7E5&=PzVJQOoyWMZHlzNc0yZ;~Kwa`-l literal 0 HcmV?d00001 diff --git a/koios_python/__pycache__/__init__.cpython-310.pyc b/koios_python/__pycache__/__init__.cpython-310.pyc index ec8b0a424c0c353559fe14a928114a9976a2df1f..21a5741bac879f80b41c4edfa99eb1b84f26124d 100644 GIT binary patch delta 105 zcmZ3%yq}pTpO=@50SG27d6+tp=ekrBdtypTQEG89kdd66Uz%4E#hO@LoLUk!@vn+D zD^O(-i1?MEA6lGRRIHzvlUkwglbKYMSX8O+oReRg5?qpBl$f46*_=_AN!M_43Zn}E D@4_MN delta 81 zcmdnbyn>l0pO=@50SH!2)=Zhmb6x5ddtypTQEG8<6nkQFa(-!ENfc{hadB$Nt%-kC g#Mprg6-)S_bj#GKTM$v%v_ldBnB01UGk-~a#s diff --git a/koios_python/__pycache__/__init__.cpython-311.pyc b/koios_python/__pycache__/__init__.cpython-311.pyc index 032dbbf80e126b8bd0cbe5b9c0495b5dbc673c15..409b12d016e10f61879b00abde06bb0e5191469e 100644 GIT binary patch delta 105 zcmbQka+HO8IWI340}xDF@^B-!Bx68^erR!OQL%nvPHKg|Pi9h4Vo{~Ob54F~N^nVj zQDS5q SnP041P+5|ZpEtRL@ge|X02P7& diff --git a/koios_python/__pycache__/account.cpython-310.pyc b/koios_python/__pycache__/account.cpython-310.pyc index cb6cec712e2042b7c5ced79c4b241b5ee17a58a4..b42d8f375cfa73a27d4497c0feab1e399af822d3 100644 GIT binary patch literal 8721 zcmcgx+i%;}87HX=DOvI@7dL6zvbQyAlem`+MZBb_8#}3s#LjF5X$5QotwY&#WKlV! z;z&@6775UYt=OK10!@JqMKJ{Z6ZW*Xy$skhAJ;v!Zv*<44#j@oIV45NvYRwOZHPQ1 z&-u>B!{6__9k*D_EBMQg{oDR#UQxcLi{xJh7jNR{{R;=CR1~H%t)W&_oKp>LJ5@=k z@?N@* zl}RBd%bvnaCVN`+n_}9UQhKgy<}Y*ihQn;nv>FZ5s@2?f(>LqwX3clprkDQ~@2xDC z)F9(EY`gWXic4InFW%3*eDd_^(>0AcgnzVJ^gD;2cLN7sxvkvNdde2otF7>-nC5Fe ztcs)FO8Kd+G@fL7sh-ACAE$1m{p{y@FTG{_MZJ~orPmbMmr*bEQ{^*_W$tPZGOm>E z{yuNw?}F`{mf3JT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!9E->9(^&?Ab|Kb3+Yz411(hjuJRUNnVdNKYgH5gsd!yDj+IXw(&MpL9w+r4Dd%R zo|m58jEpqYckCIn(F--pn z6^7{&yZj=%{4&xzdbc1y7L?aZ(#zQ-kbvVyLI`OfB!nvcav%A4DW+P1@OB%99q&SPYIEe`(PCLAg1qIB>I ztIqN(5=-YSr`-Yj8N8V!!jU5ldbSt2PMEbBkZH@_MCP=);RUUSNI1J&+lWuDQVZEI zYOym?IgK7gxs>|0gyThacBYLW@KQ>?VBO{j8UF&n#VPjawsJUt{{x(e!)8Q3o3}^Oo%k&yoB$gQRpcr}^ZERHHnBq_9#_ zfFg-fN+Kuh&?I3OuO+ifc8r_`ul%+hh_2^+MhgpngTmA**il8(jVVo^#WjQLNEP?w RIz)H$&EbA1xzEmM{{j3(zUBY` diff --git a/koios_python/__pycache__/asset.cpython-311.pyc b/koios_python/__pycache__/asset.cpython-311.pyc index 7549fe0a0d9a2c0e8b5a2c236a9480032ad5ecd6..809d4bf63e9f9335a8f2107106c155ff23d3eedc 100644 GIT binary patch delta 1027 zcmZWnO-vI}5boQug%-BZmPP)d{1g^wSD+O{N>?zD7)$sSqb9YmD>T$@^I8(n115lQ zluW`26Au0ajVAgo#uMt*g9l>_35hXY@Suf*F<$h&5`O|O*)KESd^58%@2xJN7Yj&u zAP5!%Jr3(9&Acj*c9mCi);U#J&qc;@7|+Q)QGG@oPU<*3 zsmW)s9v|0d)<2o*$hd0LO?33q%hIi<(k%^>l=V6;IbO8GJ( z_v)4r^gA=H+d1JxLQ96?dNeXI2XjIRv`F=Q9UZ?KLeh6wuM&yh^qI3XQ7S;c#3qDl z3t>mF!>Dq+C^EIcNf5ln8&wL=RCP1ZW#Gf)QmxQ(G%25vf76;pu(G-FLBt%s+dFCY*LG< znu3JLCJ#%IV54-%#Qqhxz>iXe@1y23@Rxmsy&{q9o6SZJdtk5913sal8XqW`yo5n| z1EtI=W00N>gnIrg_1=&z;kprdz~*)!wwnN8u>fA$j`2Yn-i008d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$AIHCR+`|%Ej3y5z82)Nk?%-cGm6GMQFLlXg81Hc3AgPtCU zz!-4G*D=&kabg7KzQFgnQ0`jkUHwzFmN{PT-D~-AOU6eWuHeOhC_#}z0mG3#v`Y@$ z0?;1=BNUvJiMfTmY>d`dNnpY_4w-#^I9TaJG1HtN2{G%3DN>c_vHHre^DMfJd&fkN zu-bjBmi=>#O%h-ZWla4OEX-gQ-F*-r7i%z!3%Ew%j~SRF!CwX_e?5I+Ozd9j0&b8X zM{*NqYr5Kw;W8i2xet^qQPn&JGUPH4G!!z+^Ma`1d3~l1Ze}C0vlT+rNl%U0GC9vZ V=5<4?a%xlQeRIK@wi%x(vEP=p(Eb1b delta 689 zcmZ`%%}N|W5bo;knaR%X%*MYYY!Y&aAQKQn$SKDNibQrHDum6U+3bw&uC5b$TJSK7 z2hSeDynr6{AYMG=1@aJc$rB_OZwet*I}Gl{hA!&o`--os`=9^2=Et7rGCUVq5dN`# z_&-0q$H=f_HsT=|NZ}azFcO9jM9Ky-6)6w-i5N*^o!Y4!IA<`DsoY?J$d=(3w6iL2 z)PqNPbtf{)^oLP=V6v~g`PRn9ZNGbvn0TmqQ74RalH1?*;_hy8&h%p}-!_-F5=<|3 z_M*e=FJH`FiiL;-+LaniLk%S8X$-r7raTrpbXW1-yhBsUPhqDJ4+DVqDxPiHwVhe7$1a@<`93ujeQ+F@k=AiMCfvu=!=<;Q{nh;?oNBGvWwyn3RG`z23cEtiB=ab22X& tYp?*c!~nm9qf{7ol`1w>$)=q7SM-{ih9PkA3nsf~o6c*e?gFp-@E`X+kpln# diff --git a/koios_python/__pycache__/block.cpython-311.pyc b/koios_python/__pycache__/block.cpython-311.pyc index 3b5698abb0cbd8603a572c1079233ac8fc67a13e..c069f96f6c3f64936f275765bde453073b4a934d 100644 GIT binary patch delta 106 zcmZpd+#t!loR^o20SGLYKHSKCm^mO-KeRZts8~NSC$&P~Co`!iv8YntIVZm~CAcKN zC^0=%-=!$OASu5>-#0NkU*A2mB%?G*KPa^zzc>@9ATwV-J3lkOSht|EBqKjh*KqS! H=1Cj?hFK;# delta 65 zcmdlW*)GYwoR^o20SF{`*Kg!L%&cysA6lGRRIFc~n3|JWmYJ&WlAm0fo0?Zrte>5q TnP041P+5|ZpSM|#WfBJfci$B< diff --git a/koios_python/__pycache__/environment.cpython-310.pyc b/koios_python/__pycache__/environment.cpython-310.pyc index c0758c2be331548384bdfa7ae8f96e1493e92e63..140c7ac8458f9de84c17aa23db1400c7e5a84c60 100644 GIT binary patch delta 130 zcmZ1`vR{NZpO=@50SGp3c$oTlBX1(3Vzz#0acWVqeqv5)g}zT_Qc+@2rM`1cerZZ@ zNq$jcdg|mVMqMUd!^z7TwHQSvUt%<3WSY#%q{-+vS&vDBQD$;D(*j22$v>EE7+E%( hGB>d@8cg27(GQe%=QL*2o?Okjgq@j#gM*!i0{~THB+~!@ delta 102 zcmdllvP^_GpO=@50SH!2)=YV_kvEZ%CqzHAIJKx)KQSk@VsbyD?&N)pT8yHTUosjo zGESCZ(wywZq`@dVIiG0(qsn9fW*bK4&A!Y{tc-?}FL3lvPT(|V)R{bma|t^O2L}f` G4+j9nP8!z$ diff --git a/koios_python/__pycache__/environment.cpython-311.pyc b/koios_python/__pycache__/environment.cpython-311.pyc index 4121d1f00810d43d2ca46e4215c01a608f3bb5cc..cfe00d34aa488d7bc846c3ddbdb3f63b6513dc38 100644 GIT binary patch delta 146 zcmbQFuv>w5IWI340}yQ7@G$l9M&2mKfNcHH;?$yI{luKq3Vol?{L+-* zlKi5?^i+M9qWprS{0e>F#O!>1_so)v(j@($)PnrtOrV0yeEsbF%=}{Ag36MN{5)O5 x$$gCaj3SfwF-~WcnH>U#5HPj0T(Ua6M#Z)ZV<0kBgC!ZSqNePXOR4Gg$xt delta 105 zcmdn3FiC-TIWI340}$+97nb^DBX1O=x|4oracWVqetBYQPG(tVs=iBpa%paAUP-Zj zc7A4lv2Hmw JnEZ*~697YoBDnwn diff --git a/koios_python/__pycache__/epoch.cpython-310.pyc b/koios_python/__pycache__/epoch.cpython-310.pyc index 8a9d12e9c2c792970c7e533d8872bea2f306647c..caf415d3d82eec40bb5722388335eafdb3b8b1df 100644 GIT binary patch literal 2735 zcmcgu&2QX96!(n1YiGaMhR`-4s$2;n7PVbf+*X8=gro)1Bud&IR!ElDGut@vdY17x zN>-awxmM!TOBD%@`47s!z?BQK=mBx+ffGnb5mI?G_9ojTn@C7t$QtZ~s#pV#}CVBoI{yeW5$=Ni%XaUX(y ziuVkW`!3%%HqGzRo{?!ZKqChljUkQvIU0yR%6vQ;(lGl7JX!n3NKc6K%o9JQH#S1g zSl6;BpJhIu5lE{%^>b|>`)DsWWJ{g1pChHG`k5zvk@iQf26(M3>;uC zM=>!ss7ol1YF1KwOofw$mE`9ZX4e+h5{uKXV;YGl(P6t;Sy)|}zvq0uytv{#Tw6+v z&4`6bE?_Q+64PU$prNSc6CD3*9VZLsK;xGoxITBRN@h1q{>` z2I>j}^}fEY4fZ8cN)+4IM@eQDmx)1gLl|TXEc9{TAbCKaQ$9v%4Er3VTQgk^z6x&) zc$YK5JQmn$T&aLctKrJV*-HoPhMi6%jQlYa*lr7EX9y3J;r|U2Mn!%xEO7a0=JG?x zO-U?CWW&`gUX<&SBxOk|K$_Kb-d1PVX78`diQ{j{y{aUafE?ubxLm(2iR>f}{{tF- zM-n+gDY*ixq07%#;{BJ|c$^RDHV{s^C zhh-ti?@)uE#Pokzyt$>7`7h5Z9-o4&oh;MjahX)K&LCUSS0J6%3vlVedQHoU;N`^{ zS_W)49fvT_ankmY{go7Hxb1Tmb^x)HOA9+5?aDeh_uP;Klq;}ORp-*wP?)N(R7+VO ecNmES`icDEi)7~+$kHunCX7o6e+2inD*6Yqpx3_u delta 837 zcmaKq&1=*^7{>EXCZEmjrnXfmVi)Y8L1a(03SQd953p`OmV$T*%O=`xyG@y-Ad+Pd z;?aZ5Nn}C2Z7&`Q{t^8T+=F*-f;SK1`(}3`pmAWHOlIcE`^<0hd12_5qf*IMu$@US zShL@j&*X*X^y6+SPDdUQmXrx&nocorsCNzFYGF|2Vqi8 z_QPs;61DfM2glE%^B?RkR6Jue^E^!aCfaX`I}{pS;uj5C{1yD~iju|TqFMpn(p zs;Sykrt8F?&=5{=6w8cBtO4n3Ax9F1I}lTq_eTB6mB>F6kI!^LxE8?8fF+{n5X|ig|SBv&pa4wYA$gInH9`vQU)ERE#z5d(iOAk>UG6)b{-` f0aI?+%S&`;S>kMO?$a57S^3(&ZY(;$=3Mv#VehU` diff --git a/koios_python/__pycache__/epoch.cpython-311.pyc b/koios_python/__pycache__/epoch.cpython-311.pyc index f3faadcb2ef0a6d6dbafd3e8ea984573e9ebfa70..30a41455df75e341326807d23093721dd56ac703 100644 GIT binary patch delta 167 zcmeCy-lEOBoR^o20SGSde3+`Sk+*<7AXPuKIJKx)KQSk@Lfnze3+PF*{%1J+maEG)X@wwIIJZ6R03FUq3rPGrw53pt2+*KTp?i z^Ah%AMn;a!5}f(0jJBIQ_|C8}#%vB1KE)_&z$oy60Y-deW?&M&!YK5C2_%xnI5}2S JVRDS9J^;5=HeUb$ delta 126 zcmdm@-L1{LoR^o20SF3t)~70O(apMUz7hxfJNX=x^9t(NoSrfg)&u&Tu7LekM)Z1vui6!y!5R_zlHJM~eo0 z-~9Y5`+CYSenVyO%YgDJ6d8e_M#G>cwF0wY>R+p2QJZE0yKb-y&C=WhV#(iVk>>8`E{@4)H%38HS z%XDE^53OxWWgq9d)@uHVxove}1-Lu3eq?-a`R2C0Yu~kL_Mv@nL@BrRZIQq?&lFKB zj3_@Me%Ru~ZSpv63S7mcBF%t%YeX^@l4gf^E3O}2F6yzff~i=9vn24rj<@=zal7q` z4tY25+rD}~a+m!OT+!0y-YC_HSUMB87F~#KI(qT%l-=nH~!}&{#xP`G#?G1I`r-X(8MkvQUHY$uLYSO_dsTz zg-rUAM6Ph#OhI@^EEy$=6RBLGh>V!$w|tK<;SwGmkDcY0d1J1(vdh2pWyA#55q1qY7QI=4N1`E- zij$zGKX!0x&{SV#lT>4)?(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aTanHt-DB^RZ%vvJdXu6&r3~b#~aS2O(mT6j!@WM)F&ad>FoQh efOVVvp)!7W4uB$?*vLj0=MZ+(E+9NrLVo~~>(ko+ diff --git a/koios_python/__pycache__/network.cpython-311.pyc b/koios_python/__pycache__/network.cpython-311.pyc index 5799901d5c371b0fb77a465d381b3acd58b9f3da..af827f7e9e717146655b6ed226a67467f7d5905b 100644 GIT binary patch delta 210 zcmZ2(aMgf!IWI340}!-re3)9dkvE+=AYDJSIJKx)KQSk@Lfnze3+PF*{%1J+maEG)X@wwIIJZ6R03FUq3rPGrw53pt2+*KTp?i z^K52y-pPI zou8RstXoi7l98Xc`3SQ*?__TQ_ss`HA{bc>fo7yk?iVtc>?_tk`2fEdQxxOmi7fJy zz_6NW@*1A0lV1ybWn`QDP;e!eDNt)A5ErkX%+IeqdA|@h vSHuOm$cu83SL7lmUl%Ihd`C=^kx^r^x`YCdWRp3z*EBOeg@(73nlcW`UVIu@hM`?nR|>eGR`rYx!`k|TOoCac~i{% zFV4&}-o9UBr{2_M!HGNbP4F$8`um;lc;-+29rO>&Le{A{PSKeo@GO{*od#^-#A_qs zX!0u}Aa5(K#>9*`Nh_szVTchWk;BHd#mz^l4th}oT`j4iInhRu4|UXPYlx9VbE?u2 zp#>v~Q$`pylnj;3$?LsbNZp$!U?Mf7;nJ(E<%TQ$Kc352#Z9G(Rgwv9>iX&}h+-%S z-IbMTOSyuYamia`>zOPxZHi)#Ox#|tw>5De^&Z4dKit={P-SX^oSTtkv17g3WkVx! z4!pLzR>21)CbVAjBwUA1xgxQvd|0EZmukZi^b8%u3)U}{D2#P0mD$BTZU$F8!TQG9 z_QtmDC=SEZMq96xFv^<6`kACm+c1@dffdA|^)%0h)^Fx)gLYVLvZ!VqN|jSc1G}=z zX{C+K2bV>hBXtWne-D%Q8fr>t#*dPhVpmZ$PM&45Vmn4Ey2q2}N|w9wD0xK>WU?vD zsM<}oIaDP8AY^hNVRQG(G4x;Df7o6J?KP3@TFbFofn@cw(>Fn_L;;SR2(REJ>;=)E zYxoBCoCXsIHXIC?Ob3H@bX~yPMP3{VC5s%|w%0d~QeM_`9=w2GDdVb%Z2Fl~x9h;p Z<6N>T<4@`br-#0NkU*A2mB%?G*KPa^zzc>@9ATwV-J3lkOSht|EBqKjh*KqR( H=1GhIXecG! delta 65 zcmZ3@-NenkoR^o20SJ5q TnP041P+5|ZpSM|(WfCI*jhGdi diff --git a/koios_python/__pycache__/pool.cpython-310.pyc b/koios_python/__pycache__/pool.cpython-310.pyc index eaa14bf7f348147a738cb149b88379091b2d0460..1c9a1e1e8f4b6945c7ab57a4cf6af6f808454987 100644 GIT binary patch literal 8375 zcmds6&u<&Y73MCNKSWu!EIV@id+oHYnA(zKw{9#nZRA*$jmVNgDQP1FAXc0ewHCR{ z%q|^Ep?h)ALje~Ea>yYGkREmDx%d791&UrupeWE@no|$CIXU!uZ+4f<6)8JKfCeGJ zC1-bL_U+F1z3;s@-q=_vgU|1B|Fr*dC6oCVHIg3#jaTvY|Ad3ctYw5I^oF*k@vpw7 zi>xpj+0~3~h%+KD3h!%=w6z>sMKSVz2LJQ;UlODIzrei?h%xR}MC+_LC=PLJgj?g{ zFtu zJEu!`rFY*Ewr^UEhS~DGhPlypYk}jre(7^OW@hPg4ac(9)n0s(yL{>T_3JgA&WE2I ze(C!fzF*wOA;>(+Jk&dxdw47Dj65s!K=0r^INHN(kiBQ%O0JXb;9Wh=J~V>-XN8V& zulRfIq0uo`GODkjUfRc*Pj!*|M1PiX<^0ayN+v!Fc3@g&!|?;t+u(<)wWYM(ps{UA zyN>g=w8f0H14lY;-JEj002k1*MVViKKV9OPW?PoDnx-E}Q(A7_o;6!m-EpnJ7G}+J z1I(!|Tr}G)Gw@9FrOTHuW3HMf1tuYDW-)VHy0d)-4Kjn?d^{%DZsBh93~H98ZmvQW z?CRaZrfmsZ`rSg{G;OaPJSp6;Eon=0SC@Ib{_faZJJ|H3vt!XBmPfjybvvkry}S7v z^K+H?N;iwg>K3K_PTTeaznev$wX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*r5hwwGvmh;h0h15|1+&gBY5@VblRX6(lTk38lWsT* tv*0vu0keEEodE$Ivl=v*0|7OY8Z30W6cQIv|s+Ixld0Fc$y- diff --git a/koios_python/__pycache__/scripts.cpython-310.pyc b/koios_python/__pycache__/scripts.cpython-310.pyc index 43f22d88c3949113b48ecfad253a3f5bed5f10a1..abb3b29bbeaf754f1be7ff767145170522f7f42d 100644 GIT binary patch literal 4446 zcmcIn&2JM&6yHzVv12EM5K6xo+ETF*VCapgR1G8nB)*h5RprZS38P8 zuW5f^qyMp>@in~SM<}RP)u>L5K(FfXZw5xgteSe#XH_j~Q9H0J8q3fO%|6v>j*dMt z9_rOB^qio1T6m;GE2moHw5VERs#T&Bs+EV<3_V7tRI323<8=Cw2CK%Yv7$LAcS-&} z54U{E1o47^h#L1>QjqniS(AR)6#18+sdm@VV_O7_wO;DbgqA+LZ(q7_<;oSP7i(ct zvZi#o*W6$=oPiJiXW`Ajdjnqa6BJT=sO_0;Z4*8@()d|wNTUs(;p=-AHQUAp)@*5R zS}@0M+ikNA2l3e2%gD^LY&)}=`&Hk|v@xuS@K{HQ{Lu6QOlV(TBaB?21 znJ4hvV3GvBkR)7BkAe8j^^i9_JO~0cvf*#BW@oVOi8>Q`wRW!Majzkg^~o8!$@m&B-HYXcff(7dw&8u1*&|7U8muiuaVZ%*Tj`OHM za?aI4Iv;QNxyDa{jQx%Bs(?=`djZ=n-}cwI$9KxtgD|2iGUVO{D=+Y{wH9ud?|2Ww z@(o|sqqXuf1D$=C;D_Z0p&yD1tsOXt=7q~i(@mP?WJ7VWwG&UEB7F)JV0ZBz6q&KS zF|OzJX?&)k* z1~#s|Oag=mPeBhk=wJk_g(#4jBQ0;k2jPs8)F6_9^CW7a|B%aL zW>7Wsw4NHe!y##<%0ust(@ac@^L7fF+PFyNi2?GF@?o(D5^7e=PS3q zS#(n?zkO?^(zS9vjnhs*@!aM!SV!|#_RLR0t!uc5RLX3V0)mYe&!Al;U)3=$oOTw* zUZLE?yr$5&v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>bBFj`k||eRMHuxkY6|eRp;(fW$S@gUR!yH^U}Zi zzbCHNS8tspOvQ_FOfZ3Ps$mc&PD8#d*ri**L#(K0tl@|hAq2-!rJGF*&*MSe^U{h5 z!&w&CU17`5g^QJGq}XzSRtfy}RH?M+6r3eysU7fc%fF3ghBzpUm^4RB_^E1+sCnEL IQ5}c;1JcmcB>(^b diff --git a/koios_python/__pycache__/scripts.cpython-311.pyc b/koios_python/__pycache__/scripts.cpython-311.pyc index cc34a8fab8da4c37c149499b41d5613cb06d6952..0e3353da91884101b17fcd69b879abcc4474ec4e 100644 GIT binary patch delta 1721 zcma)6O>7%Q6!zL)uj7q>(%LR*7Ho^s;6%1dxDd5z6`F#Ak`^U)Rpo%$WGC@b#}m!0 zQPKlG5DA3DAsUGv!2vFWsO4mdBZwon9x8-Z91s$BBg7>LiT7sxm!=Y|G@r)bym>$0 zd*g2}|9&}o7>!1J@O>Ejjo1g#*IFS<`&_ZY`~I(hy^lxoThmC$id!T5%42+3@{v>g zh~)KCd<6J}6+Ol4z{mD|2S42z%PVelgEkz}aH`B~Y?1b(b07IlS6#s$Zmh~Tn7!jv zYbLJ|o)5Uew>WLMnqzMh+H_p4Mofz^eyqJrOh#Dt$j?Tg3O736bZV5@_e{s8jiUh5 zfn`yIQ2_BvpwNo1USC;!y(>neaBm+$})$wX0pA~^*U`@ zs}5!67AY+-y0cDqOUve6T6)!XYR&c13fZCD1_PUx?oylb!p+Vol#j1PTNIgPZ1&QpJ^Ng_AJ7G z79@&cBO`~TpE<)&!>I{7Y$T_FoI{t-BVfFZfViY2+uwxW@XugGP!ea%ld~UK=J5nM z#hjigo(!B1Ny+*e;q(vdCqB?~N=7`;&qrn;Pz4tM4is4*QlmV2Mai|3i64S3%;}zf zu}XH~oms@1V+CN!ZqQ*(azYu|W!djRtBYXkCb~VYl<(YHeL|D-n%Cq@XdLbZ@^TJI zF$}SmGIFxJiJ>WNI=hs!S-7?hi%*Gy2m(i}3DBt7~xW6IlEZ8Zj>3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b%PgH8IemfOD7e54 zSAggb&t;QIaS*!OR4Nzcl;r_8~ILvteWKS`yQpa1{> diff --git a/koios_python/__pycache__/urls.cpython-310.pyc b/koios_python/__pycache__/urls.cpython-310.pyc index 4b04e05663b786d258e7fca2fcc32e45c8c93a9a..336ecfde62867834c8e3e295425065271d6e912b 100644 GIT binary patch delta 2773 zcmZwJ%WoUU9S3mk@+H1WkrG9{ZOgW3N2EmS{iY;Jq9sudN#`+#t{LsdV#E=ZT}qBs zp+tcK1$ro8%(*~vYzySjUXq~cp=kerpg<7psR4TFq2~fQb$(ybu7Fh1e)XB(%|_5uaw$e1^^N zSvJe(*c_i{^L&9V@I|)Bm)H_tX3Knqt?*U0%GcN$&hs_ad7kC@2HW79Y?E)XEnZ*+ zzRk8V?{DnzUAD`MtjHg;>|?&i_V_;A=LhV7mskml0*yodggue&)}wmt7Ych@k5nA# zxcEldQ#@iwoypmK&yAMWGL4#bZobrB)LX~8S$k1ySaydk&(0rS*DXt)cfCF+zH(yTYF(vh1sTIY*Q z$EG~2&z%mr&#oMr4KI--92*_u;qTad-kw!x{JioP{64lki*clyuvnO<<72L<2OYj`ItuJFRkBJp{0bYd{;Wc;(UWb?AJiG#Lz^m{kyasQ< z>u>?i!`pCs1A`q5HsM`(3ogP1_%XZ<@4-9pKD?_tWP>{>UB>Z`JaP82b=*81y~t%I zGn34FW*QfD;{|YLHg#Lc{EPm}#pk|2a#zCkG@ocBh(Vmv~?Y?Tckgq%~zkg#!l*5KU^tAfkp;jzyABsPO|K1hLZ*9qIRK#WEZ^1}@ zbMx?Nsj5}qtNd{>>QZE-QYln5I;SEQVt*Zfa(K9}l?yw?O0}G?77t6;w@Y;D)nd7D zP$*R^;y*FAXGbfW<>Hgh`FLEBPK6!-71D0oWf_eRO-=3t^BF}AJK_VQW*X*i9rDNF z_(2zq?gMpVN_^QpvXGJ$>r)vX)uUX0C!E7-SoO=1U#4HygYKa6=GzH5MLr%^Tw*Dn zQdH@bSdaJ1!#S}%3;t|C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pycache__/urls.cpython-311.pyc index f9aec40d2731f70c473de0db1c359ec54edcb724..0d64766502c5e1f65f3e9dea3907eaae949dccac 100644 GIT binary patch delta 363 zcmez6yV#F+IWI340}zPpd6+7@k@va)tC608p26go0;$5nMXAN9MP;e+<(VZJDMg9p zi8+&f1SKX{3I=d-mX=iH$7klHxq($XaTpwxo=;!L1|%zXXq{LK7f-Ga)JjQl)Z!_Bj#jTq(CwU<;}Fmk`B z?%u(2g+t|rhRzy}3&x%oH9SFl)yc1A5(VXy=0vREz9?%95|X+hEkD^$Hk|1L$L4La m6FB5^8CfkpFyJI7r>ce7J1{W<)nF$-g2lh!kS#h33|#zArn0 lLq3O*)#3vKPI7XeT9|!3BO_1^cJd=w{0k1*qO-t20sw||VXgoG diff --git a/koios_python/account.py b/koios_python/account.py index 51573fc..b2757e7 100644 --- a/koios_python/account.py +++ b/koios_python/account.py @@ -21,7 +21,7 @@ def get_account_list(self, content_range="0-999"): if self.BEARER is None: custom_headers = {"Range": str(content_range)} account_list = requests.get(self.ACCOUNT_LIST_URL, headers = custom_headers, timeout=timeout) - account_list = json.loads(account_list.content) + account_list = json.loads(account_list.content) else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} account_list = requests.get(self.ACCOUNT_LIST_URL, headers = custom_headers, timeout=timeout) @@ -54,6 +54,30 @@ def get_account_info(self, *args): return accounts_info +@Exception_Handler +def get_account_info_cached(self, *args): + """ + Get the account information for given stake addresses (accounts). + + :param str args: staking address/es in bech32 format (stake1...). + :return: list with all address data. + :rtype: list. + """ + timeout = get_timeout() + + if self.BEARER is None: + get_format = {"_stake_addresses": [args] } + accounts_info = requests.post(self.ACCOUNT_INFO_CACHED_URL, json=get_format, timeout=timeout) + accounts_info = json.loads(accounts_info.content) + else: + get_format = {"_stake_addresses": [args] } + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + accounts_info = requests.post(self.ACCOUNT_INFO_CACHED_URL, json=get_format, headers = custom_headers, timeout=timeout) + accounts_info = json.loads(accounts_info.content) + + return accounts_info + + @Exception_Handler def get_account_utxos(self, *args, content_range="0-999", extended=False): """ @@ -92,27 +116,41 @@ def get_account_utxos(self, *args, content_range="0-999", extended=False): @Exception_Handler -def get_account_info_cached(self, *args): +def get_account_txs(self, stake_address, after_block=None): """ - Get the account information for given stake addresses (accounts). + Get the transaction hash list of input payment credential array (stake key), optionally + filtering after specified block height (inclusive). - :param str args: staking address/es in bech32 format (stake1...). - :return: list with all address data. + :param str stake_address: str stake address (stake1...) + :param int after_block: filtering after block (inclusive) defaul is None, from the beginning + :return: list of address transactions. :rtype: list. """ timeout = get_timeout() - - if self.BEARER is None: - get_format = {"_stake_addresses": [args] } - accounts_info = requests.post(self.ACCOUNT_INFO_CACHED_URL, json=get_format, timeout=timeout) - accounts_info = json.loads(accounts_info.content) - else: - get_format = {"_stake_addresses": [args] } + + if self.BEARER is None and after_block is None: + get_format = {"_stake_address": stake_address} + txs_list = requests.post(self.ACCOUNT_TX_URL, json = get_format, timeout=timeout) + txs_list = json.loads(txs_list.content) + + if self.BEARER is None and after_block is not None: + get_format = {"_stake_address": stake_address, "_after_block_height": after_block} + txs_list = requests.post(self.ACCOUNT_TXS_URL, json = get_format, timeout=timeout) + txs_list = json.loads(txs_list.content) + + if self.BEARER is not None and after_block is None: + get_format = {"_stake_address": stake_address} custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - accounts_info = requests.post(self.ACCOUNT_INFO_CACHED_URL, json=get_format, headers = custom_headers, timeout=timeout) - accounts_info = json.loads(accounts_info.content) + txs_list = requests.post(self.ACCOUNT_TX_URL, json = get_format, headers = custom_headers, timeout=timeout) + txs_list = json.loads(txs_list.content) - return accounts_info + if self.BEARER is not None and after_block is not None: + get_format = {"_stake_address": stake_address, "_after_block_height": after_block} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + txs_list = requests.post(self.ACCOUNT_TXS_URL, json = get_format, headers = custom_headers, timeout=timeout) + txs_list = json.loads(txs_list.content) + + return txs_list @Exception_Handler @@ -185,7 +223,6 @@ def get_account_addresses(self, *args, content_range="0-999", first_only=False, :return: list with all account addresses. :rtype: list. """ - timeout = get_timeout() if self.BEARER is None and first_only is False and empty is False: @@ -308,6 +345,7 @@ def get_account_assets_paginated(self, *args): return total_assets + @Exception_Handler def get_account_history(self, *args, epoch_no=None, content_range="0-999"): """ @@ -344,39 +382,3 @@ def get_account_history(self, *args, epoch_no=None, content_range="0-999"): return history -@Exception_Handler -def get_account_txs(self, stake_address, after_block=None): - """ - Get the transaction hash list of input payment credential array (stake key), optionally - filtering after specified block height (inclusive). - - :param str stake_address: str stake address (stake1...) - :param int after_block: filtering after block (inclusive) defaul is None, from the beginning - :return: list of address transactions. - :rtype: list. - """ - timeout = get_timeout() - - if self.BEARER is None and after_block is None: - get_format = {"_stake_address": stake_address} - txs_list = requests.post(self.ACCOUNT_TX_URL, json = get_format, timeout=timeout) - txs_list = json.loads(txs_list.content) - - if self.BEARER is None and after_block is not None: - get_format = {"_stake_address": stake_address, "_after_block_height": after_block} - txs_list = requests.post(self.ACCOUNT_TXS_URL, json = get_format, timeout=timeout) - txs_list = json.loads(txs_list.content) - - if self.BEARER is not None and after_block is None: - get_format = {"_stake_address": stake_address} - custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - txs_list = requests.post(self.ACCOUNT_TX_URL, json = get_format, headers = custom_headers, timeout=timeout) - txs_list = json.loads(txs_list.content) - - if self.BEARER is not None and after_block is not None: - get_format = {"_stake_address": stake_address, "_after_block_height": after_block} - custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - txs_list = requests.post(self.ACCOUNT_TXS_URL, json = get_format, headers = custom_headers, timeout=timeout) - txs_list = json.loads(txs_list.content) - - return txs_list \ No newline at end of file diff --git a/koios_python/address.py b/koios_python/address.py index 6b83fe2..f9a20a2 100644 --- a/koios_python/address.py +++ b/koios_python/address.py @@ -32,29 +32,50 @@ def get_address_info(self, *args): @Exception_Handler -def get_address_txs(self, *address_tx, after_block=0): +def get_address_utxos(self, *addresses, extended=False, content_range="0-999"): """ - Get the transaction hash list of input address array, optionally filtering after specified - block height (inclusive) + Get the UTxO set for a given address. - :param tx_hash: list or single transaction hash to search and read utxos data - :param after_block: filtering after block (inclusive) defaul is 0, from the beginning - :return: hash list of address transactions + :param list address: Array of Cardano payment address(es) + :param bool extended: extended flag to toggle additional fields (optional, default is False) + return: list of utxos + :rtype: list. """ - timeout = get_timeout() - if self.BEARER is None: - get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} - hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, timeout=timeout) - hash_list = json.loads(hash_list.content) - - if self.BEARER is not None: - get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} - custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, headers=custom_headers, timeout=timeout) - hash_list = json.loads(hash_list.content) + if self.BEARER is None and extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is None and extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range)} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_addresses": [addresses], "_extended": extended} + utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + return utxos - return hash_list @Exception_Handler def get_credential_utxos(self, *payment_credentials, extended=False, content_range="0-999"): @@ -99,32 +120,33 @@ def get_credential_utxos(self, *payment_credentials, extended=False, content_ran @Exception_Handler -def get_address_assets(self, *args): +def get_address_txs(self, *address_tx, after_block=0): """ - Get the list of all the assets (policy, name and quantity) for a given address. + Get the transaction hash list of input address array, optionally filtering after specified + block height (inclusive) - :param str address: wallet used public address - return: list of all the assets - :rtype: list. + :param tx_hash: list or single transaction hash to search and read utxos data + :param after_block: filtering after block (inclusive) defaul is 0, from the beginning + :return: hash list of address transactions """ timeout = get_timeout() - if self.BEARER is None: - get_format = {"_addresses": [args]} - assets = requests.post(self.ADDRESS_ASSETS_URL, json = get_format, timeout=timeout) - assets = json.loads(assets.content) - + if self.BEARER is None: + get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} + hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, timeout=timeout) + hash_list = json.loads(hash_list.content) + if self.BEARER is not None: - get_format = {"_addresses": [args]} + get_format = {"_addresses": [address_tx], "_after_block_height": str(after_block)} custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - assets = requests.post(self.ADDRESS_ASSETS_URL, json = get_format, headers=custom_headers, timeout=timeout) - assets = json.loads(assets.content) + hash_list = requests.post(self.ADDRESS_TXS_URL, json = get_format, headers=custom_headers, timeout=timeout) + hash_list = json.loads(hash_list.content) - return assets + return hash_list @Exception_Handler -def get_credential_txs(self, *payment_credentials, after_block=0, content_range="0-999"): +def get_credential_txs(self, *payment_credentials, after_block_height=0, content_range="0-999"): """ Get the transaction hash list of input payment credential array (stake key), optionally filtering after specified block height (inclusive). @@ -138,59 +160,39 @@ def get_credential_txs(self, *payment_credentials, after_block=0, content_range= if self.BEARER is None: custom_headers = {"Range": str(content_range)} - get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": str(after_block)} + get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": str(after_block_height)} txs_list = requests.post(self.ADDRESS_CREDENTIAL_TXS_URL, json = get_format, headers = custom_headers, timeout=timeout) txs_list = json.loads(txs_list.content) if self.BEARER is not None: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": str(after_block)} + get_format = {"_payment_credentials": [payment_credentials], "_after_block_height": str(after_block_height)} txs_list = requests.post(self.ADDRESS_CREDENTIAL_TXS_URL, json = get_format, headers = custom_headers, timeout=timeout) txs_list = json.loads(txs_list.content) return txs_list + @Exception_Handler -def get_address_utxos(self, *addresses, extended=False, content_range="0-999"): +def get_address_assets(self, *args): """ - Get the UTxO set for a given address. + Get the list of all the assets (policy, name and quantity) for a given address. - :param list address: Array of Cardano payment address(es) - :param bool extended: extended flag to toggle additional fields (optional, default is False) - return: list of utxos + :param str address: wallet used public address + return: list of all the assets :rtype: list. """ + timeout = get_timeout() - if self.BEARER is None and extended is True: - extended = "true" - timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - get_format = {"_addresses": [addresses], "_extended": extended} - utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) - - if self.BEARER is None and extended is False: - extended = "false" - timeout = get_timeout() - custom_headers = {"Range": str(content_range)} - get_format = {"_addresses": [addresses], "_extended": extended} - utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) + if self.BEARER is None: + get_format = {"_addresses": [args]} + assets = requests.post(self.ADDRESS_ASSETS_URL, json = get_format, timeout=timeout) + assets = json.loads(assets.content) - if self.BEARER is not None and extended is True: - extended = "true" - timeout = get_timeout() - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_addresses": [addresses], "_extended": extended} - utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) + if self.BEARER is not None: + get_format = {"_addresses": [args]} + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + assets = requests.post(self.ADDRESS_ASSETS_URL, json = get_format, headers=custom_headers, timeout=timeout) + assets = json.loads(assets.content) - if self.BEARER is not None and extended is False: - extended = "false" - timeout = get_timeout() - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_addresses": [addresses], "_extended": extended} - utxos = requests.post(self.ADDRESS_UTXOS_URL, json = get_format, headers=custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) - - return utxos \ No newline at end of file + return assets \ No newline at end of file diff --git a/koios_python/asset.py b/koios_python/asset.py index 26f7278..82a5745 100644 --- a/koios_python/asset.py +++ b/koios_python/asset.py @@ -33,81 +33,56 @@ def get_asset_list(self, content_range="0-999"): @Exception_Handler -def get_asset_token_registry(self, content_range="0-999"): - """ - Get a list of assets registered via token registry on Github - - :return: list of all asset token registry. - :param str content_range: number of selected elements to return - :rtype: list. - """ - timeout = get_timeout() - - if self.BEARER is None: - custom_headers = {"Range": str(content_range)} - token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) - token_registry = json.loads(token_registry.content) - else: - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) - token_registry = json.loads(token_registry.content) - - return token_registry - - -@Exception_Handler -def get_asset_addresses(self, asset_policy, asset_name, content_range="0-999"): +def get_policy_asset_list(self, asset_policy, content_range="0-999"): """ - Get the list of all addresses holding a given asset. + Get the list of asset under the given policy (including balances) :param str asset_policy: asset Policy ID in hexadecimal format (hex). - :param str asset_name: string with Asset Name in hexadecimal format (hex). :param str content_range: number of selected elements to return - :return: list of all addresses. + :return: list of all assets under the same policy. :rtype: list. """ timeout = get_timeout() if self.BEARER is None: custom_headers = {"Range": str(content_range)} - custom_params = {"order": "payment_address.asc"} - info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ - headers = custom_headers, params = custom_params, timeout=timeout) + custom_params = {"order": "asset_name.asc"} + info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", + headers = custom_headers, params = custom_params, timeout = timeout) info = json.loads(info.content) else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - custom_params = {"order": "payment_address.asc"} - info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ - headers = custom_headers, params = custom_params, timeout=timeout) + custom_params = {"order": "asset_name.asc"} + info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", + headers = custom_headers, params = custom_params, timeout = timeout) info = json.loads(info.content) - + return info @Exception_Handler -def get_asset_nft_address(self, asset_policy, asset_name): +def get_asset_token_registry(self, content_range="0-999"): """ - Get the address where specified NFT currently reside on. + Get a list of assets registered via token registry on Github - :param str asset_policy: asset Policy ID in hexadecimal format (hex). - :param str asset_name: string with Asset Name in hexadecimal format (hex). - :return: list with payment addresses. - :rtype: list. + :return: list of all asset token registry. + :param str content_range: number of selected elements to return + :rtype: list. """ timeout = get_timeout() if self.BEARER is None: - info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) - info = json.loads(info.content) + custom_headers = {"Range": str(content_range)} + token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) + token_registry = json.loads(token_registry.content) else: - custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", \ - headers = custom_headers, timeout=timeout) - info = json.loads(info.content) + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + token_registry = requests.get(self.ASSET_TOKEN_REGISTRY_URL, headers = custom_headers, timeout=timeout) + token_registry = json.loads(token_registry.content) + + return token_registry - return info -# DEPRECATED ENDPOINT REMOVE IN FUTURE VERSIONS @Exception_Handler def get_asset_info(self, asset_policy, asset_name): """ @@ -155,6 +130,51 @@ def get_asset_info_bulk(self, *asset_list): return asset_info +@Exception_Handler +def get_asset_utxos(self, *asset_list, extended=False, content_range="0-999"): + """ + Get the UTXO information of a list of assets including + + :param list of assets + :param bool extended: extended UTXO information + :return: list of utxos + :rtype: list. + """ + if self.BEARER is None and extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range),} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is None and extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range),} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is True: + extended = "true" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + if self.BEARER is not None and extended is False: + extended = "false" + timeout = get_timeout() + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_asset_list": asset_list, "_extended": extended} + utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) + utxos = json.loads(utxos.content) + + return utxos + + @Exception_Handler def get_asset_history(self, asset_policy, asset_name, content_range="0-999"): """ @@ -182,11 +202,12 @@ def get_asset_history(self, asset_policy, asset_name, content_range="0-999"): @Exception_Handler -def get_policy_asset_addresses(self, asset_policy, content_range="0-999"): +def get_asset_addresses(self, asset_policy, asset_name, content_range="0-999"): """ - Get the list of addresses with quantity for each asset on the given policy + Get the list of all addresses holding a given asset. :param str asset_policy: asset Policy ID in hexadecimal format (hex). + :param str asset_name: string with Asset Name in hexadecimal format (hex). :param str content_range: number of selected elements to return :return: list of all addresses. :rtype: list. @@ -195,37 +216,38 @@ def get_policy_asset_addresses(self, asset_policy, content_range="0-999"): if self.BEARER is None: custom_headers = {"Range": str(content_range)} - custom_params = {"order": "asset_name.asc"} - info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", - headers = custom_headers, params = custom_params, timeout = timeout) + custom_params = {"order": "payment_address.asc"} + info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ + headers = custom_headers, params = custom_params, timeout=timeout) info = json.loads(info.content) else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - custom_params = {"order": "asset_name.asc"} - info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", - headers = custom_headers, params = custom_params, timeout = timeout) + custom_params = {"order": "payment_address.asc"} + info = requests.get(f"{self.ASSET_ADDRESSES_URL}{asset_policy}&_asset_name={asset_name}", \ + headers = custom_headers, params = custom_params, timeout=timeout) info = json.loads(info.content) return info @Exception_Handler -def get_policy_asset_info(self, asset_policy): +def get_asset_nft_address(self, asset_policy, asset_name): """ - Get the information for all assets under the same policy. + Get the address where specified NFT currently reside on. :param str asset_policy: asset Policy ID in hexadecimal format (hex). - :return: list of all mint/burn transactions for an asset + :param str asset_name: string with Asset Name in hexadecimal format (hex). + :return: list with payment addresses. :rtype: list. """ timeout = get_timeout() if self.BEARER is None: - info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", timeout=timeout) + info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", timeout=timeout) info = json.loads(info.content) else: custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", \ + info = requests.get(f"{self.ASSET_NFT_ADDRESS_URL}{asset_policy}&_asset_name={asset_name}", \ headers = custom_headers, timeout=timeout) info = json.loads(info.content) @@ -233,13 +255,13 @@ def get_policy_asset_info(self, asset_policy): @Exception_Handler -def get_policy_asset_list(self, asset_policy, content_range="0-999"): +def get_policy_asset_addresses(self, asset_policy, content_range="0-999"): """ - Get the list of asset under the given policy (including balances) + Get the list of addresses with quantity for each asset on the given policy :param str asset_policy: asset Policy ID in hexadecimal format (hex). :param str content_range: number of selected elements to return - :return: list of all assets under the same policy. + :return: list of all addresses. :rtype: list. """ timeout = get_timeout() @@ -247,16 +269,39 @@ def get_policy_asset_list(self, asset_policy, content_range="0-999"): if self.BEARER is None: custom_headers = {"Range": str(content_range)} custom_params = {"order": "asset_name.asc"} - info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", + info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", headers = custom_headers, params = custom_params, timeout = timeout) info = json.loads(info.content) else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} custom_params = {"order": "asset_name.asc"} - info = requests.get(f"{self.POLICY_ASSET_LIST_URL}{asset_policy}", + info = requests.get(f"{self.POLICY_ASSET_ADDRESSES_LIST_URL}{asset_policy}", headers = custom_headers, params = custom_params, timeout = timeout) info = json.loads(info.content) - + + return info + + +@Exception_Handler +def get_policy_asset_info(self, asset_policy): + """ + Get the information for all assets under the same policy. + + :param str asset_policy: asset Policy ID in hexadecimal format (hex). + :return: list of all mint/burn transactions for an asset + :rtype: list. + """ + timeout = get_timeout() + + if self.BEARER is None: + info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", timeout=timeout) + info = json.loads(info.content) + else: + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + info = requests.get(f"{self.POLICY_ASSET_INFO_URL}{asset_policy}", \ + headers = custom_headers, timeout=timeout) + info = json.loads(info.content) + return info @@ -333,45 +378,3 @@ def get_asset_txs(self, asset_policy, asset_name, after_block=0, history=False, txs = json.loads(txs.content) return txs - -@Exception_Handler -def get_asset_utxos(self, *asset_list, extended=False, content_range="0-999"): - """ - Get the UTXO information of a list of assets including - - :param list of assets - :param bool extended: extended UTXO information - :return: list of utxos - :rtype: list. - """ - if self.BEARER is None and extended is True: - extended = "true" - timeout = get_timeout() - custom_headers = {"Range": str(content_range),} - get_format = {"_asset_list": asset_list, "_extended": extended} - utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) - if self.BEARER is None and extended is False: - extended = "false" - timeout = get_timeout() - custom_headers = {"Range": str(content_range),} - get_format = {"_asset_list": asset_list, "_extended": extended} - utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) - - if self.BEARER is not None and extended is True: - extended = "true" - timeout = get_timeout() - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_asset_list": asset_list, "_extended": extended} - utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) - if self.BEARER is not None and extended is False: - extended = "false" - timeout = get_timeout() - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_asset_list": asset_list, "_extended": extended} - utxos = requests.post(self.ASSET_UTXOS_URL, json = get_format, headers = custom_headers, timeout=timeout) - utxos = json.loads(utxos.content) - - return utxos \ No newline at end of file diff --git a/koios_python/environment.py b/koios_python/environment.py index c94b22b..fcf6c73 100644 --- a/koios_python/environment.py +++ b/koios_python/environment.py @@ -17,7 +17,6 @@ LIMIT_RETRYING_TIMES= 10 - def init_timeout(): ''' Function to initialize timeout diff --git a/koios_python/epoch.py b/koios_python/epoch.py index 1101fdb..cfe42b3 100644 --- a/koios_python/epoch.py +++ b/koios_python/epoch.py @@ -33,6 +33,7 @@ def get_epoch_info(self, epoch_no=None, include_next_epoch=False): info = requests.get(f"{self.EPOCH_INFO_URL}?_epoch_no={epoch_no}&_include_next_epoch=true",\ timeout=timeout) info = json.loads(info.content) + else: if epoch_no is None and include_next_epoch is False: diff --git a/koios_python/network.py b/koios_python/network.py index 1c1a73e..0133a8f 100644 --- a/koios_python/network.py +++ b/koios_python/network.py @@ -96,45 +96,48 @@ def get_param_updates(self, content_range="0-999"): network_params = json.loads(network_params.content) return network_params - + + @Exception_Handler -def get_treasury_withdrawals(self, content_range="0-999"): +def get_reserve_withdrawals(self, content_range="0-999"): """ - Get all treasury withdrawals from the chain starting Shelley era + Get all reserve withdrawals from the chain starting Shelley era - :return: list of treasury withdrawals starting from Shelley era. + :return: list of reserve withdrawals starting from Shelley era. :rtype: list """ timeout = get_timeout() if self.BEARER is None: custom_headers = {"Range": str(content_range)} - treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) - treasury_withdrawals = json.loads(treasury_withdrawals.content) + reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) + reserve_withdrawals = json.loads(reserve_withdrawals.content) else: custom_headers = {"Range": str(content_range), "Authorizatoin": f"Bearer {self.BEARER}"} - treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) - treasury_withdrawals = json.loads(treasury_withdrawals.content) + reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout, headers=custom_headers) + reserve_withdrawals = json.loads(reserve_withdrawals.content) + + return reserve_withdrawals - return treasury_withdrawals @Exception_Handler -def get_reserve_withdrawals(self, content_range="0-999"): +def get_treasury_withdrawals(self, content_range="0-999"): """ - Get all reserve withdrawals from the chain starting Shelley era + Get all treasury withdrawals from the chain starting Shelley era - :return: list of reserve withdrawals starting from Shelley era. + :return: list of treasury withdrawals starting from Shelley era. :rtype: list """ timeout = get_timeout() if self.BEARER is None: custom_headers = {"Range": str(content_range)} - reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout) - reserve_withdrawals = json.loads(reserve_withdrawals.content) + treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) + treasury_withdrawals = json.loads(treasury_withdrawals.content) else: custom_headers = {"Range": str(content_range), "Authorizatoin": f"Bearer {self.BEARER}"} - reserve_withdrawals = requests.get(self.RESERVE_WITHDRAWALS_URL, timeout=timeout, headers=custom_headers) - reserve_withdrawals = json.loads(reserve_withdrawals.content) - - return reserve_withdrawals \ No newline at end of file + treasury_withdrawals = requests.get(self.TREASURY_WITHDRAWALS_URL, headers=custom_headers, timeout=timeout) + treasury_withdrawals = json.loads(treasury_withdrawals.content) + + return treasury_withdrawals + diff --git a/koios_python/pool.py b/koios_python/pool.py index 66f82b8..bda92aa 100644 --- a/koios_python/pool.py +++ b/koios_python/pool.py @@ -280,6 +280,9 @@ def get_pool_metadata(self, *args): pool_list = requests.get(self.POOL_METADATA_URL, headers = custom_headers, timeout=timeout) pool_list = json.loads(pool_list.content) + if len(args) == 0: + pool_list = args + return pool_list @Exception_Handler diff --git a/koios_python/scripts.py b/koios_python/scripts.py index 7ece831..3fe25c8 100644 --- a/koios_python/scripts.py +++ b/koios_python/scripts.py @@ -7,6 +7,33 @@ import requests from .environment import * + +@Exception_Handler +def get_script_info(self, *script_hashes, content_range="0-999"): + """ + Get list of script information for given script hashes + + :params list script_hashes: Array of script hashes in hexadecimal format (hex) to search and read data. + :return: list of script information for given script hashes. + :rtype: list. + """ + timeout = get_timeout() + + if self.BEARER is None: + custom_headers = {"Range": str(content_range)} + get_format = {"_script_hashes": [script_hashes]} + script_info = requests.post(self.SCRIPT_INFO_URL, json = get_format, timeout=timeout, headers=custom_headers) + script_info = json.loads(script_info.content) + + else: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_script_hashes": [script_hashes]} + script_info = requests.post(self.SCRIPT_INFO_URL, json = get_format, headers = custom_headers, timeout=timeout) + script_info = json.loads(script_info.content) + + return script_info + + @Exception_Handler def get_native_script_list(self, content_range="0-999"): """ @@ -22,6 +49,7 @@ def get_native_script_list(self, content_range="0-999"): custom_headers = {"Range": str(content_range)} script_list = requests.post(self.NATIVE_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) script_list = json.loads(script_list.content) + else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} script_list = requests.post(self.NATIVE_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) @@ -45,6 +73,7 @@ def get_plutus_script_list(self, content_range="0-999"): custom_headers = {"Range": str(content_range)} script_list = requests.post(self.PLUTUS_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) script_list = json.loads(script_list.content) + else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} script_list = requests.post(self.PLUTUS_SCRIPT_LIST_URL, headers = custom_headers, timeout=timeout) @@ -68,6 +97,7 @@ def get_script_redeemers(self, script_hash, content_range="0-999"): custom_headers = {"Range": str(content_range)} script_redeemers = requests.get(self.SCRIPT_REDEEMERS_URL + script_hash, timeout=timeout, headers = custom_headers) script_redeemers = json.loads(script_redeemers.content) + else: custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} script_redeemers = requests.get(self.SCRIPT_REDEEMERS_URL + script_hash, headers = custom_headers, timeout=timeout) @@ -76,29 +106,6 @@ def get_script_redeemers(self, script_hash, content_range="0-999"): return script_redeemers -@Exception_Handler -def get_datum_info(self, *datum_hash): - ''' - Get list of datum information for given datum hashes - - :params string datum_hash: The Hash of the Plutus Data. - :return: the actual data in json form. - :rtype: list. - ''' - timeout = get_timeout() - - if self.BEARER is None: - get_format = {"_datum_hashes": [datum_hash]} - datum_info = requests.post(self.DATUM_INFO_URL, json = get_format, timeout=timeout) - datum_info = json.loads(datum_info.content) - else: - custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - get_format = {"_datum_hashes": [datum_hash]} - datum_info = requests.post(self.DATUM_INFO_URL, json = get_format, headers = custom_headers, timeout=timeout) - datum_info = json.loads(datum_info.content) - - return datum_info - @Exception_Handler def get_script_utxos(self, script_hash, extended=False, content_range="0-999"): """ @@ -117,7 +124,6 @@ def get_script_utxos(self, script_hash, extended=False, content_range="0-999"): utxos_list = requests.get(f"{self.SCRIPT_UTXOS_URL}{script_hash}&_extended={extended}", timeout=timeout, headers = custom_headers) utxos_list = json.loads(utxos_list.content) - if self.BEARER is None and extended is True: extended = "true" timeout = get_timeout() @@ -139,29 +145,30 @@ def get_script_utxos(self, script_hash, extended=False, content_range="0-999"): utxos_list = requests.get(f"{self.SCRIPT_UTXOS_URL}{script_hash}&_extended={extended}", timeout=timeout, headers = custom_headers) utxos_list = json.loads(utxos_list.content) - return utxos_list + + @Exception_Handler -def get_script_info(self, *script_hashes, content_range="0-999"): - """ - Get list of script information for given script hashes +def get_datum_info(self, *datum_hash): + ''' + Get list of datum information for given datum hashes - :params list script_hashes: Array of script hashes in hexadecimal format (hex) to search and read data. - :return: list of script information for given script hashes. + :params string datum_hash: The Hash of the Plutus Data. + :return: the actual data in json form. :rtype: list. - """ + ''' timeout = get_timeout() if self.BEARER is None: - custom_headers = {"Range": str(content_range)} - get_format = {"_script_hashes": [script_hashes]} - script_info = requests.post(self.SCRIPT_INFO_URL, json = get_format, timeout=timeout, headers=custom_headers) - script_info = json.loads(script_info.content) + get_format = {"_datum_hashes": [datum_hash]} + datum_info = requests.post(self.DATUM_INFO_URL, json = get_format, timeout=timeout) + datum_info = json.loads(datum_info.content) + else: - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_script_hashes": [script_hashes]} - script_info = requests.post(self.SCRIPT_INFO_URL, json = get_format, headers = custom_headers, timeout=timeout) - script_info = json.loads(script_info.content) + custom_headers = {"Authorization": f"Bearer {self.BEARER}"} + get_format = {"_datum_hashes": [datum_hash]} + datum_info = requests.post(self.DATUM_INFO_URL, json = get_format, headers = custom_headers, timeout=timeout) + datum_info = json.loads(datum_info.content) - return script_info \ No newline at end of file + return datum_info diff --git a/koios_python/transactions.py b/koios_python/transactions.py index a15c0a5..5016215 100644 --- a/koios_python/transactions.py +++ b/koios_python/transactions.py @@ -6,6 +6,46 @@ import requests from .environment import * + +@Exception_Handler +def get_utxo_info(self, *args, extended=False, content_range="0-999"): + """ + Get UTxO set for requested UTxO references. + + :param list utxo_hash: Array of Cardano utxo references in the form "hash#index" + :return: list of all info about UTxO(s). + :rtype: list. + """ + timeout = get_timeout() + + if self.BEARER is None and extended is False: + custom_headers = {"Range": str(content_range)} + get_format = {"_utxo_refs": [args], "_extended": "false"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + + if self.BEARER is None and extended is True: + custom_headers = {"Range": str(content_range)} + get_format = {"_utxo_refs": [args], "_extended": "true"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + + if self.BEARER is not None and extended is False: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_utxo_refs": [args], "_extended": "false"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + print('LOL') + + if self.BEARER is not None and extended is True: + custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} + get_format = {"_utxo_refs": [args], "_extended": "true"} + utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) + utxo_info = json.loads(utxo_info.content) + + return utxo_info + + @Exception_Handler def get_tx_info(self, *args): """ @@ -30,6 +70,7 @@ def get_tx_info(self, *args): return tx_info +## [DEPRECATED - Use /utxo_info instead] @Exception_Handler def get_tx_utxos(self, *args): """ @@ -145,40 +186,3 @@ def get_tx_status(self, *args): tx_status = requests.post(self.TX_STATUS_URL, json = get_format, timeout=timeout) tx_status = json.loads(tx_status.content) return tx_status - -@Exception_Handler -def get_utxo_info(self, *args, extended=False, content_range="0-999"): - """ - Get UTxO set for requested UTxO references. - - :param list utxo_hash: Array of Cardano utxo references in the form "hash#index" - :return: list of all info about UTxO(s). - :rtype: list. - """ - timeout = get_timeout() - - if self.BEARER is None and extended is False: - custom_headers = {"Range": str(content_range)} - get_format = {"_utxo_refs": [args], "_extended": "false"} - utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) - utxo_info = json.loads(utxo_info.content) - - if self.BEARER is None and extended is True: - custom_headers = {"Range": str(content_range)} - get_format = {"_utxo_refs": [args], "_extended": "true"} - utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) - utxo_info = json.loads(utxo_info.content) - - if self.BEARER is not None and extended is False: - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_utxo_refs": [args], "_extended": "false"} - utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) - utxo_info = json.loads(utxo_info.content) - - if self.BEARER is not None and extended is True: - custom_headers = {"Range": str(content_range), "Authorization": f"Bearer {self.BEARER}"} - get_format = {"_utxo_refs": [args], "_extended": "true"} - utxo_info = requests.post(self.UTXO_INFO_URL, json = get_format, timeout=timeout, headers = custom_headers) - utxo_info = json.loads(utxo_info.content) - - return utxo_info \ No newline at end of file diff --git a/koios_python/urls.py b/koios_python/urls.py index dcea504..2277aad 100644 --- a/koios_python/urls.py +++ b/koios_python/urls.py @@ -24,7 +24,7 @@ class URLs: def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', server='koios', bearer=None): - self.version = 'koios-python v1.3.1' + self.version = 'koios-python v2.0.0' self.url = url self.network = network self.server = server @@ -52,8 +52,8 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', serv self.GENESIS_URL = self.url + "genesis" self.TOTALS_URL = self.url + "totals" self.NETWORK_PARAM_UPDATES_URL = self.url + "param_updates" - self.TREASURY_WITHDRAWALS_URL = self.url + "treasury_withdrawals" self.RESERVE_WITHDRAWALS_URL = self.url + "reserve_withdrawals" + self.TREASURY_WITHDRAWALS_URL = self.url + "treasury_withdrawals" # Epoch URLs self.EPOCH_INFO_URL = self.url + "epoch_info" @@ -66,13 +66,14 @@ def __init__(self, url='https://api.koios.rest/api/v1/', network='mainnet', serv self.BLOCK_TXS_URL = self.url + "block_txs" # Transaction URLs + self.UTXO_INFO_URL = self.url + "utxo_info" self.TX_INFO_URL = self.url + "tx_info" self.TX_UTXOS_URL = self.url + "tx_utxos" self.TX_METADATA_URL = self.url + "tx_metadata" self.TX_METALABELS_URL = self.url + "tx_metalabels" self.SUBMIT_TX_URL = self.url + "submittx" self.TX_STATUS_URL = self.url + "tx_status" - self.UTXO_INFO_URL = self.url + "utxo_info" + # Address URLs self.ADDRESS_INFO_URL = self.url + "address_info" diff --git a/tests.py b/tests.py index 7d0e97f..9860c18 100644 --- a/tests.py +++ b/tests.py @@ -14,20 +14,20 @@ token = os.getenv("TOKEN") - ########################################################################################## ## MAINNET PARAMETERS (simple TESTS) -# Default Koios Endpoint -kp = URLs() # We need to create an instance of the class URLs (no bearer token) +# Public Tier with Default Koios Endpoint +#kp = URLs() # We need to create an instance of the class URLs (no bearer token) FREE TIER -kp_token = URLs(bearer=token) # We need to create an instance of the class URLs (with bearer token) -# pp.pprint(kp_token.BEARER) +# Select this if you are usinf Bearer Token. We need to create an instance of the class URLs (with bearer token) +kp = URLs(bearer=token) +#pp.pprint(kp.BEARER) ########################################################################################## # Network Endpoint Tests ########################################################################################## # # Get tip (no bearer token) -# pp.pprint(kp.get_tip()) +#pp.pprint(kp.get_tip()) # # Get tip (with bearer token) # pp.pprint(kp_token.get_tip()) @@ -130,26 +130,18 @@ # Transaction Endpoint Tests ########################################################################################## -# # Get UTxO info (no bearer token) +# # Get UTxO info +# pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0"])) + # pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ # "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"])) -# # Get UTxO info (no bearer token, extended) +# # Get UTxO info ( extended) # pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ # "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=True, content_range="0-9")) # pp.pprint(kp.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ # "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=False, content_range="0-9")) -# # Get UTxO info (with bearer token) -# pp.pprint(kp_token.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ -# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"])) - -# # Get UTxO info (with bearer token, extended) -# pp.pprint(kp_token.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ -# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=True, content_range="0-9")) -# pp.pprint(kp_token.get_utxo_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e#0", \ -# "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94#0"], extended=False, content_range="0-9")) - # # Get Tx Info (no bearer token) # pp.pprint(kp.get_tx_info(["f144a8264acf4bdfe2e1241170969c930d64ab6b0996a4a45237b623f1dd670e", \ # "0b8ba3bed976fa4913f19adc9f6dd9063138db5b4dd29cecde369456b5155e94"])) @@ -266,39 +258,33 @@ # Pool Endpoint Tests ########################################################################################## -# # Get Pool List (no bearer token) -# pp.pprint(kp.get_pool_list()) - -# # Get Pool List (with bearer token) -# pp.pprint(kp_token.get_pool_list()) +# # Get Pool List +# pp.pprint(kp.get_pool_list('0-10')) -# # Get Pool Info (no bearer token) +# # Get Pool Info # pp.pprint(kp.get_pool_info(["pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", # "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m", # "pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm"])) -# # Get Pool Info (with bearer token) -# pp.pprint(kp_token.get_pool_info(["pool100wj94uzf54vup2hdzk0afng4dhjaqggt7j434mtgm8v2gfvfgp", -# "pool102s2nqtea2hf5q0s4amj0evysmfnhrn4apyyhd4azcmsclzm96m", -# "pool102vsulhfx8ua2j9fwl2u7gv57fhhutc3tp6juzaefgrn7ae35wm"])) - -# # Get Pool Stake Snapshot (no bearer token) +# # Get Pool Stake Snapshot # pp.pprint(kp.get_pool_stake_snapshot("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc")) -# # Get Pool Stake Snapshot (with bearer token) -# pp.pprint(kp_token.get_pool_stake_snapshot("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc")) - -# # Get Pool Delegators (no bearer token) +# # Get Pool Delegators # pp.pprint(kp.get_pool_delegators("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", content_range="0-9")) -# # Get Pool Delegators (with bearer token) -# pp.pprint(kp_token.get_pool_delegators("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", content_range="0-9")) - -# # Get Pool Delegators History (no bearer token) +# # Get Pool Delegators History # pp.pprint(kp.get_pool_delegators_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", epoch_no=320)) -# # Get Pool Delegators History (with bearer token) -# pp.pprint(kp_token.get_pool_delegators_history("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc", epoch_no=320)) +# # Get Pool Metadata +# pp.pprint(kp.get_pool_metadata()) +# pp.pprint(kp.get_pool_metadata("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc")) + +# # Get Pool Relays +# pp.pprint(kp.get_pool_relays()) +# pp.pprint(kp.get_pool_relays('0-70')) + +# # Get Pool Updates +# pp.pprint(kp.get_pool_updates("pool155efqn9xpcf73pphkk88cmlkdwx4ulkg606tne970qswczg3asc")) ########################################################################################## # Asset Endpoint Tests From fac724c8acfba6643cc757a136cd4e7b2a43f269 Mon Sep 17 00:00:00 2001 From: Quixote Date: Sat, 2 Mar 2024 17:56:26 +0100 Subject: [PATCH 13/14] fixing pool_metadata method --- .../test_koios.cpython-310-pytest-7.2.0.pyc | Bin 22997 -> 23328 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 491 bytes .../__pycache__/account.cpython-310.pyc | Bin 8721 -> 8721 bytes .../__pycache__/account.cpython-312.pyc | Bin 0 -> 17532 bytes .../__pycache__/address.cpython-310.pyc | Bin 5109 -> 5109 bytes .../__pycache__/address.cpython-312.pyc | Bin 0 -> 8996 bytes .../__pycache__/asset.cpython-310.pyc | Bin 9623 -> 9623 bytes .../__pycache__/asset.cpython-312.pyc | Bin 0 -> 17104 bytes .../__pycache__/block.cpython-312.pyc | Bin 0 -> 3339 bytes .../__pycache__/environment.cpython-312.pyc | Bin 0 -> 3639 bytes .../__pycache__/epoch.cpython-310.pyc | Bin 2735 -> 2735 bytes .../__pycache__/epoch.cpython-312.pyc | Bin 0 -> 5931 bytes .../__pycache__/network.cpython-312.pyc | Bin 0 -> 6462 bytes .../__pycache__/ogmios.cpython-310.pyc | Bin 1035 -> 1035 bytes .../__pycache__/ogmios.cpython-312.pyc | Bin 0 -> 1443 bytes koios_python/__pycache__/pool.cpython-310.pyc | Bin 8375 -> 8393 bytes koios_python/__pycache__/pool.cpython-312.pyc | Bin 0 -> 15719 bytes .../__pycache__/scripts.cpython-312.pyc | Bin 0 -> 7775 bytes .../__pycache__/transactions.cpython-312.pyc | Bin 0 -> 8458 bytes koios_python/__pycache__/urls.cpython-312.pyc | Bin 0 -> 9959 bytes koios_python/pool.py | 10 +++++----- tests.py | 6 +++--- 22 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 koios_python/__pycache__/__init__.cpython-312.pyc create mode 100644 koios_python/__pycache__/account.cpython-312.pyc create mode 100644 koios_python/__pycache__/address.cpython-312.pyc create mode 100644 koios_python/__pycache__/asset.cpython-312.pyc create mode 100644 koios_python/__pycache__/block.cpython-312.pyc create mode 100644 koios_python/__pycache__/environment.cpython-312.pyc create mode 100644 koios_python/__pycache__/epoch.cpython-312.pyc create mode 100644 koios_python/__pycache__/network.cpython-312.pyc create mode 100644 koios_python/__pycache__/ogmios.cpython-312.pyc create mode 100644 koios_python/__pycache__/pool.cpython-312.pyc create mode 100644 koios_python/__pycache__/scripts.cpython-312.pyc create mode 100644 koios_python/__pycache__/transactions.cpython-312.pyc create mode 100644 koios_python/__pycache__/urls.cpython-312.pyc diff --git a/__pycache__/test_koios.cpython-310-pytest-7.2.0.pyc b/__pycache__/test_koios.cpython-310-pytest-7.2.0.pyc index 7fb14f2b313cb6d4f5b6b74c9102a1c22b408091..8adebc64dea770143fea3b1ed63b7b63230630da 100644 GIT binary patch delta 2122 zcmZ9Ldu-cR6~}+)XXj@(KRdOXw9d1SByEx=cKt}xc4c)6oW3@!j*!TzW>W3xi1F?AU(a>U$ez|`=)$J;!cAy5e zHy~V%Rj6!8VHI_#CmL`ERuhe=qJdb0Myw(3#GPm&n$V29h-R$CI^r(ejeCf-Xu*17 z9X4PiaW^($GjR{L;9jBy_u+nGJs!Z;jgk~@z&30rM#95pp zx^N!P5_@q0!^ETbFg`-;!*lo<;xSyr^Td9P;6#)RH^vZ&4`Cdahy!>56U5_~#1!!a zF5^YwNnF7+@f5CNhB%0qFiRXlc}D8W@kaSAxm5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 z^~wU3@<63rsbusV9%!BQyqMB(&I-oM+^Y!MDl-<&8SyIf_=(RDYX+WPm<}^wCM*QA zU{P2EX2W7xhqb-hwdPjrO#MO)!q1e$f2^hA$|W>S4o$kdT{>Ca)G~XbbHGhEOwVK* zrluQI-qq!%U6C3>Z_-fdNh?_HannKGb24!-oxUfPS?umBEceOy_!hk?St)17D@C#v zsFl;>+gg*(@a%~@7jNn8zc%aYT#|Ljk+F(G!=ahf(Sw<;?!|^ewqZ%uyCmzEe_B^7 zzZ{R%pTk#8m*Mo5h>}Ty%&U#!dpe^zS5xN-&%`pheaFZ4^Xgf7RQ)DT7S{LBZ{)%D za_LM&RM?2=nsW$q($mD)9xC=aJEHV^1ov3IS9KWzJAMgYCESkc~ZHjlzUpaIpv;FF0b4L z<(^gUIr(6+Ii5ji(5h;SEZvIAi^=tyOe>6!W0_VY@FB}ath{AKgIXBT;*|(sS~2wE H7u%R*MlH^wFW4QPNE)G74 zZxHGrPHu`$PUc$884kZcB;=etwcAY;>h}IctYU;-tMFgRA3nzccZj2N#4%44eoXL8 zNmMN=jjBgAqOz#DsQIX7RIAdY)=O_zn#Tslk_+2qN_8)RmrB^?TbLI0u*Vxmy#=39 z$|0xJ*9Qvnk*|va@}bYPa93bPe!&^0Ez6w*ZGFZ#H^NrPb11d*b!M$_J}m&0&ungF z;jB+fqpWWUJ(dRarO@sHeO90HJtSvV7)zKE*W^GB3^Nn5tDxkk4h*{xWY0h`fNOHd zMnLwZ8|tanZ literal 0 HcmV?d00001 diff --git a/koios_python/__pycache__/account.cpython-310.pyc b/koios_python/__pycache__/account.cpython-310.pyc index b42d8f375cfa73a27d4497c0feab1e399af822d3..3ba8ebc8e55fbf7a12482015d7009b4878f7dc8f 100644 GIT binary patch delta 41 vcmbQ}GSP)ApO=@50SLZwZRARlV#+I?oG0bOl;<;fk5nB~9?xbQ>8or2<=qR+ delta 41 rcmbQ}GSP)ApO=@50SLIbH*zIOF%{03oG0Z2qV`DD0jbS4(pT94*2)X$ diff --git a/koios_python/__pycache__/account.cpython-312.pyc b/koios_python/__pycache__/account.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e59b42d2da5219376422353f52b5c12df76c40df GIT binary patch literal 17532 zcmeG@TTC2RmeubU&8wSdY*QEqyB!05L2P0tgALeN20PGpY?8QBPz5w@x|v(m20BfG zN0AoI!OqM|mR2iO$1QN=!?m73?J@5OkUay;i<4^AY;{Mn|QU8rE)WfDU9{w2`vlL79 zQmlzJM@+pY__ajLBbHu^Nxo<8wX#;$7P0-xY@#?jTgEy*GJUEb=ykvy=SP%w?SyNW z?%D;{cGk^$ZkXA;kIWjJ8}660UL7V6+%dEHH%x4S4lWPw7V7YM6?|^C=!S(Y)MbN#?Q9A3U#f#HnlJ|{614j)id_k_98WWm2+j2O$Kp|e9*9T#g>Wp& zyT8VKb_Gn5jgN5L=+`E=ge%kTN4C9nhYug_H!A~yfAFYU;QR2W05(er7?>O?*OTTX zHLQO^`G4vxYZBBsp^~Ogl_$fdNsHi6fT&@o+RFR_J~GRhJGhm!B+Z|hKgG1bF=-XN za*Lvd^VL@7H)$O%%v`B0m4-=c(%M5AQO8=0x%q_pg_*V9Fuy3Y2W*L-xoJ2~a01QH zkuWdNu>t*r^Yv~5(2O`Cj-t&pFQ9OAFaxT*7rS_Yxy;cF%OZ~FF&JF#tFN!8={~N1 z=)it@AcjU5AwYMu0#4j#GZH37xn_b&z9ZSXndl%FFiVahj$t{(OAaAC!o}jkBgZk0 zK^&rQn-QLD$=ebahGHn3VDRf0a7ms)P6#Q`lKog)OLtqhWC3y|C*pn_=XimaEC3@F zwj4ix=3G}Wbh@J_7&_N|TCxuFv8ZH=#26NO?2knSE-D0Ul9lHo1Cm#{5kiLU;&y{Jvri=|_VN=XhYFfr)VA4X49>h(Qw#$0M;g+atsfGsrcx zqS$C(Y`me9xg2Xa5f+BxeGT2*Xp9d7KseTLITnubb)yr&Y_x8ld>N828s8~1r{ob^k{&G!qL@ogO&vhmMDM*uPsd?5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Km$s0*JDeH;`Abl-BLO*l`ZZp&;C8?)1@1zVR zqk(r}8y+Y38aju6B@fH8kG&l0UGp()-5*T-3KK2)7_RAWu8D12^I)k&q|yN_J?6Hs T5vLDJrFN&Up7xQ^dK&T{z;@`w literal 0 HcmV?d00001 diff --git a/koios_python/__pycache__/environment.cpython-312.pyc b/koios_python/__pycache__/environment.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ccdb5e86101ff201143c14d7ce57e438b2bca424 GIT binary patch literal 3639 zcmai0OKcm*8J^wc`z@2!gSM)1ttw`1i}gcJ>i7X$Udgg0QKslNQd2N1?OIxi+Er(l zl1Wg40tBcF1Vw_jaEdgA4n=_=7ZvECx4LQU7U+cvR7hPLD2nvrnskV{g2 zAOq~oKQsT#_rG@j{~y7i4?+9G+JBU<{0MzTCwAkj#G|)>xQ%2qj$}^ebKD$1&U2I& za>BU4M#s2Ac8oh^=eUcFj&ZlljeBI*xEJO=+5H|G_sbsW1F{$TpzMP_R1gyWqUakT z`hqGe29|O;tY`}=(dQJ+#0wHprHLHf&}2NRYlbOlrh)T@B4bs<=Cp!y>I9KU!S|3# zo8T;`kyDiU;fGYOhi7QVK{p9stg{A#nvR!50ttFtonBHfgFlpy+_5 znyQpjiwZW?IYrN#jAb~%TY-xgM#XGqU`R||&sgs2_NV9(z4hsA^17iABPr#So5{h7 zsL9@(o|i{Wok&wk@)FVKC-j@iA!$}m_N(S}ej=Gx=5<2_231ea>Z)!WoiCWvx_0zf zWty!_lND2G)K=Z|1uHD6AiZ zuPWp=m@RIbtx-t&cd#JZ1H?~3%vDWJ^B;i{EBOI%@S`?Y}P)jjvO+bRT9~2OM(}95s!Z6 zDINz`=&!Xl+~=&H2Kikt*vYl*DhLhy?vem}o|o}y_radP z4|+D+xHGLbRUc>Kb=syt&*GB10moZ%@7B|7w|UKP*;L&MUR2^`UlIJi#A}@pIoRfb zn_HJW4LAEsp4~UIcy5y~|#vC5&|~Kj7Z~ zb0S9p9J!57886if$GsjC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M*~8S)e=8mvCZ>1&{}*RqzM6qY-~sZJLc^u{vC}PS~Bp!nj}fOhT&&7vRO;6)(&hSDBy2wf|3D$ zeOF6IyPY|3Ppv&gW^^g7`?0}*hI!8&wE`@#7$5#PA0HmMJ&JqdOm@CfxGRxe`6#=< z3_4jHizD%EN0hBcCtsS(Rmx6f!U$YshRud_Rj8T?0uDgRoaY2Zyqxg9V~+|yz`*|# z3|M}WriU8TpPCK9kH=nQ5Wqi&BQmCi0MrZ$ltIx^3;sT(M98bDc~^_Sv8}Pa%TCGB zDHxb)^Ls7oY{-T>py&SOEAyfFwnNI+!w;@J7*NVul+Nyi_oBVlJ-srg%y||{f8>NW zYCo+-nSJyVSJkcq2M+j{c61un<)hnuYm@FkfER;-fLerK2<^!{A#yo{#0cJ=Uiy$VbD%VRRP8z*7eM3y!l6nx?;TGPH9pi=x;3jq=P;n;+BbzGb}h`Z)*16wTtZ z*$O!O#~VZLFq0t literal 0 HcmV?d00001 diff --git a/koios_python/__pycache__/scripts.cpython-312.pyc b/koios_python/__pycache__/scripts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..620f26adf99d39a99a4fa9b4a39d995b02d3297a GIT binary patch literal 7775 zcmeHMU2GHC6`mQ7e`4ov0ed$IERzO8yu08m1OzTW3J`wEZykqi1FU!O+$0lhk9%i^ zO@gClC8S2J`Vh5hb_LZ&RUd+&>h`HTRr^$-_GK(01x-^4wNEScA=~g$o_g+`u|0O| zKp|aiSG|(2@0_{!+;eB78RU^XlJ^cP`EGIdY$bzUkTyznx7eb@Mf4g4v8NmO;Wu>5&%iVEvBfYew+(8PYC{tSh*ofNEO6XN>Gzn&T6VKq-T|4*=-8&B)H~{U2q>|B4MoVBZGmMg?2Px#=13xePR(=In zvy4`_S2SbNm19OZ=uuIoE=jEBE(mk%J$t0gPVy3$mF~(Cp}t2p~q-rp;h|Nc}AN{SA|x=o=H#6)6Z11RN||z>^AdDPIBMj z)?pod&UN3jp6dvEMe^GG0+f?T6H>C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)~A@|5aX-2(?K7P&F{@`?S8zmb=tSIVav~UPJ1gdL`%UfvsY%W%*7YCNAugG#7p!+;ULV)S1%zV*H_qAWuU$9{)<$}pib97!Zu$)eW9_C5LbJ&!^?)BaKh3a0GI zZ;d?O*z#3P`R3gIc|G6J<6PxZN9P(TtMy(qu|Ugr>~SvotFa&uH29#!>UOLSAA;kE z0fV&a5ksx~*(r(5vGgFp!RVtTP^u`v3)PMnD)VI|T}jI*3H>Tcj<0sOP>3ETX}(Ny zt#xQX4m@7jVmIXY+{GgUUVCMmA-aFC3VtCwucvDq7g+aJXTXXmOgqryf~XK5LBc7B zZ^?N9gSIV(+119x)fV*%l7 z&CYYS*JZ7DrdAqlWm5qcv*KWixMbObtm zOgjD+s_LE@uP*rHJ2Oow+*Kv)HjO-?8t(gwa2^5WGxow9F3949@u%h242! z_oLvRX+Oz-Lv}j29AMhsnt$)J`0p?O?(%2njJJ;(EyqaOdo8^KNh7T-1oi5wpOoA- z%wpnPVeW+W-(Y$Z2}wyN64sFhPmV({iMVM_(F~x>4H+w$G@LD(ul0>3QI=#<6Q>}N zkwTar5zrJMCP@OiccBD<$&|wZ#kM|#0VM6TdD=xTL=AgB_8(RP5HWg*iTHdvWY_mOf6T8{& X*U5%#8MKz;EDZjV3)({3q5$`Ak)^#) literal 0 HcmV?d00001 diff --git a/koios_python/__pycache__/transactions.cpython-312.pyc b/koios_python/__pycache__/transactions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..006a5741bb26b290c1ae03be870fb6370c0470f5 GIT binary patch literal 8458 zcmeHMS!^4}8QvwAhe%NeMO}=KwT{?~BT-81z*3x~vgJdDWG6c8SZU0xxGQO8lFQ64 zZAzgK1qcwL%|p~aP)1XjK-)BdQZ#+4AB(mRMh}351W?%OK}GYDH>GkBz(9fiGrK%Q zuVvW@3O!^5u4ZOu{+Zd?@03Eh|EsLB3jPz z6`t0`uV}dXXqA5E?0rjDM^8_W&!pOgxFSS&fmdBYDFRs~05+zCAa0D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GiVA5N-jOi9@Dc_63B;W zHT3jSh-^@dY|_g{FaeL~Jq4?>Y&6L-&ZhP=Q1;65PxqCKXmK(zfWWs0fwMIN2V?x} z1&+Q5oNEy{v?6dKMc}xJz*&;vWYPeE^CAL=K?F{E43~I)BXFKW;IM|kNeqEw76NA| z1P(|j#{b&^fnyK?XB-5+H%KpB;OK$CxdMSh0|F-k1mu3=hYJYxhLgSN5fI}EDD4Df zbTSSX5Woqj+XSR*0=hH-(V2jvOh7Ispal~UdJPA>B@xha2?(_WR9FHMD*^qKfH+D( z`6M7~63{FO2$BTUMsky03>Sa3(Fh2J1k^wRQXc^wkAO%=?$C?j%@bu$Q+C+-I{~qc zfRaW)CL^GM5eY7!UJ;O{NE|L8K9N7t%dw688!tmIUcRvXmm{G&5`S@g z{%6PMe{tN=9d~}Hvpai#u))P)cdpk#(Y$`o%Z@tdn*9e``TD=S++cV9Bej>WA9&ee zbAC+wVb?mFQ(|SQ?t5yH>i*L)@IMXM?wsS9LXsQ7I>RN)sqBs{^Q?=IdTAs-y65?> kyiE++V5k2y*dE{2+wJ!69d&lc5AHj4_PPJI!Ik;_AGn=H7ytkO literal 0 HcmV?d00001 diff --git a/koios_python/pool.py b/koios_python/pool.py index bda92aa..29b7e38 100644 --- a/koios_python/pool.py +++ b/koios_python/pool.py @@ -275,13 +275,13 @@ def get_pool_metadata(self, *args): pool_list = requests.post(self.POOL_METADATA_URL, json = get_format, timeout=timeout) pool_list = json.loads(pool_list.content) - if self.BEARER is not None and len(args) == 0: + if self.BEARER is not None and len(args) != 0: + get_format = {"_pool_bech32_ids": [args] } custom_headers = {"Authorization": f"Bearer {self.BEARER}"} - pool_list = requests.get(self.POOL_METADATA_URL, headers = custom_headers, timeout=timeout) + pool_list = requests.get(self.POOL_METADATA_URL, headers = custom_headers, json = get_format, timeout=timeout) pool_list = json.loads(pool_list.content) - - if len(args) == 0: - pool_list = args + else: + pool_list = None return pool_list diff --git a/tests.py b/tests.py index 9860c18..b3e7961 100644 --- a/tests.py +++ b/tests.py @@ -7,9 +7,9 @@ # from koios_python import block, epochs # alternative if we just need some functions import time import os -from dotenv import load_dotenv +#from dotenv import load_dotenv # load the environment variables -load_dotenv() +#load_dotenv() # Get api token token = os.getenv("TOKEN") @@ -20,7 +20,7 @@ #kp = URLs() # We need to create an instance of the class URLs (no bearer token) FREE TIER # Select this if you are usinf Bearer Token. We need to create an instance of the class URLs (with bearer token) -kp = URLs(bearer=token) +#kp = URLs(bearer=token) #pp.pprint(kp.BEARER) ########################################################################################## From c802a27bb45c6c31548c3bbca34247dcdba28ed6 Mon Sep 17 00:00:00 2001 From: Quixote Date: Sat, 2 Mar 2024 17:58:44 +0100 Subject: [PATCH 14/14] cleaning data