{"version":3,"file":"static/chunks/2267893a-91e3e8c197b00922.js","mappings":"2lBAAA,wBACA,kCACA,UACA,eACA,OAA8B,uBAAkC,CAChE,EACA,cAEA,UADA,wBACA,aAAiD,KAAQ,IACzD,UACA,yBAGA,OAFA,MACA,SACA,CACA,EAcA,oBACA,uBAEA,aACA,MAEA,MADY,GAAI,QAAQ,IAAM,CAH9B,gBAIA,OAAqB,QAAU,cAG/B,OACA,IAHA,cAIA,UAHA,WAIA,CACA,EACA,IAAiB,kBAAgB,MACjC,yBACA,+BACA,wBACA,sBACA,mCACA,EAAY,GAAI,QAAQ,IAAM,uBAG9B,OACA,IAHA,cAIA,UAHA,WAIA,CACA,EAOA,KACA,aAGA,iDAEA,cACA,SACA,uCAEA,IAAU,mBAAiB,KAE3B,OADA,oDACA,4BAA2F,cAAgB,CAC3G,EAMA,oBACA,uBACA,eACA,CAAG,CACH,CAeA,mCAIA,cACA,MACA,EACA,EAQA,MAPA,oBACA,iBACA,UACA,UAEA,IAEA,UACA,iBACA,8BACM,eACN,0BAEA,0EAEA,CACA,CACA,gBACA,UACA,QACA,cACA,CAAG,CACH,CACA,cAgBA,sBACA,iCACA,0BACA,EACA,KACA,mBACA,sBAFA,KAEA,GACA,gBACA,cACA,YACA,aACA,CAAO,EAEP,cACA,oBACA,eACA,SACA,iBAEA,aAIA,2BACA,EAEA,EADA,OACA,iCACQ,EACR,QAxBA,KAwBA,GAEA,KAEA,SAA8B,EAAQ,aACtC,KACA,QACA,YAEU,CACV,eACA,gBACA,MAJA,KAMA,aACA,YAEA,UAzCA,KAyCA,GACA,WACA,KACA,oBAGA,EAAM,IAEN,MAjDA,MAkDA,QAlDA,OAoDA,UApDA,KAoDA,GACA,MArDA,KAqDA,IAGA,QACA,CACA,CAMA,0BACA,mBACA,SACA,0BACA,eACA,qBACA,6BACA,iBACA,cACA,CACA,EAGA,GACA,kBACA,mBACA,gBACA,gBACA,wBACA,4BACA,kBACA,yBACA,EACA,8BACA,OACA,4BACA,iCAAsC,MACtC,EAD8C,aAC9C,4BACA,EAKA,MAJA,0BACA,2BAAsC,wBAA6C,EAEnF,MAAyB,OAAW,MAAG,iDAA+C,CAEtF,CACA,oBACA,QAAU,iEAA8D,EACxE,KAA0B,EAAI,GAAG,aAAiC,EAClE,uBACA,GACA,gBACA,wBACA,YACA,kBACA,gBACA,KACA,EACA,+BACA,SAEA,wBACA,oCACA,CAGA,oBAEA,OADA,SAAwC,kBAA2B,CAEnE,CAGA,oBAEA,OADA,SAAwC,mBAA4B,CAEpE,CAGA,wBAEA,EADA,SAEA,WACA,QACA,UACA,eACA,UACA,oBACA,SACA,4BACA,sBACK,EAIL,GAHA,8BACA,iBACA,kBACA,QACA,KAEA,CACA,QACA,CAGA,OACA,2DACA,sEACA,oEACA,wCACA,EACA,GACA,oDACA,oDACA,kDACA,gCACA,EACA,GACA,sDACA,sDACA,oDACA,kCACA,EACA,OACA,oBACA,oBACA,kBACA,gBACA,EACA,CAAC,MAAe,EAIhB,UAMA,qBACA,0BACA,CAMA,yBACA,aAA0B,QAAU,IACpC,CAaA,uBACA,mBACA,SAEA,CACA,CAWA,eACA,mBACA,iBAEA,oBAA4B,EAAU,EAOtC,MACA,qBACA,CAUA,WACA,8BACA,CAKA,WACA,iBACA,CASA,gBACA,yCACA,WAAgB,EAAQ,EAMxB,eACA,uBAA2B,QAAW,kBACtC,CACA,EAGA,KACA,KACA,sBACA,4BACA,mCACA,wCACA,mBACA,yBACA,eACA,iBACA,wBACA,wBACA,qBACA,wBACA,8BACA,kBACA,cACA,gBACA,gCACA,6BACA,6BACA,gBACA,kCACA,sBACA,8BACA,8BACA,cACA,iBACA,yBACA,iBACA,mBACA,2BACA,kCACA,+BACA,+BACA,8BACA,+BACA,8BACA,8BACA,6BACA,mCACA,gCACA,uCACA,wCACA,0CACA,4CACA,0BACA,uCACA,kCACA,gCACA,4BACA,uBACA,eACA,sBACA,mBACA,qBACA,0BACA,qBACA,qBACA,mBACA,kBACA,mBACA,kBACA,kBACA,iBACA,qBACA,uBACA,gBACA,uBACA,uBACA,sBACA,CAAC,EAGD,SACA,KACA,mBACA,iBACA,wBACA,yBACA,8BACA,uBACA,wBACA,uBACA,wBACA,uBACA,sBACA,0BACA,iBACA,wBACA,sBACA,6BACA,CAAC,EAKD,oBACA,uCACA,wCACA,wCAGA,QACA,cACA,gCACA,aACA,CACA,8BACA,4CACA,gDACA,mDACA,aACA,CACA,CACA,aACA,0CACA,+CACA,sBAEA,6BACA,mCACA,4CACA,oBACA,cACA,CAgBA,gBACA,sBACA,gCACA,CAOA,kBACA,qCACA,iBACA,CAMA,uBACA,iBACA,CAMA,iBACA,uBACA,2CAGA,+BADA,MACA,EACA,CACA,eACA,mCACA,CACA,gBACA,4DACA,CACA,gBACA,4DACA,CACA,gBACA,qCACA,mCACA,6BACA,4BACA,CACA,iBACA,6BACA,mCACA,qBACA,oBACA,CACA,iBACA,6BACA,oCACA,sBACA,qBACA,CACA,yBACA,QACA,KACA,eACA,kBACA,OAEA,UACA,iCACA,CAIA,WACA,uDACA,CACA,EAsBA,kBACA,gBACA,cAQA,OAPA,oBACA,2BACA,kDACA,wCAEA,iBACA,EACA,CACA,CACA,CAjCA,GACA,IA7HA,KA8HA,8BACA,GACA,IA/HA,OAgIA,+BACA,GACA,OACA,+BACA,GACA,eACA,+BACA,GACA,eACA,gCACA,GACA,eACA,gCACA,GACA,OACA,wCAgBA,YACA,eACA,sCACA,qCACA,aACA,CACA,QACA,wCACA,4CAEA,mDAEA,OADA,eACA,CACA,CAeA,iBACA,8BAEA,OADA,kBACA,SACA,CAOA,mBACA,qCACA,mCACA,CAKA,yBACA,mCACA,CAMA,kBACA,sCACA,gBACA,qCAEA,YACA,CAMA,gBACA,6CACA,CAWA,iBACA,iDACA,CAWA,iBACA,iDACA,CAWA,iBACA,4BAEA,qBADA,wBACA,qBACA,CAMA,kBACA,4BAEA,cADA,uBACA,aACA,CAMA,kBACA,6BAEA,kBADA,oBACA,cACA,CAMA,0BACA,gBACA,IACA,WACA,2BAEA,GADA,4BACA,WACA,MAEA,IACA,CACA,OACA,mEAEA,gBACA,CACA,EAGA,gBACA,kCACA,cACA,cACA,CAAG,CACH,CACA,gBACA,YACA,kCACA,WAIA,OAHA,cACA,WACA,CAAG,EACH,YACA,CACA,gBACA,kCACA,KACA,YAAkB,IAAY,KAC9B,yBAEA,QACA,CACA,cACA,YAEA,OADA,eACA,YACA,CACA,eACA,YAEA,OADA,kBACA,YACA,CACA,eACA,YAEA,OADA,iBACA,YACA,CACA,eACA,YAEA,OADA,kBACA,YACA,CACA,eACA,YAEA,OADA,kBACA,YACA,CACA,eACA,YAEA,OADA,mBACA,YACA,CACA,eACA,YAEA,OADA,mBACA,YACA,CACA,eACA,YAEA,OADA,mBACA,YACA,CACA,eACA,YAEA,OADA,kBACA,YACA,CACA,eACA,YAEA,OADA,oBACA,YACA,CACA,eACA,YAEA,OADA,yBACA,YACA,CAMA,eACA,eACA,uBACA,4CAEA,eACA,CAMA,kBACA,iBACA,2BACA,aAAkC,aAAmB,IAErD,uBACA,qBACA,qEACM,uBACN,gBAEA,+BAEA,OADA,2BACA,QACA,CAMA,kBACA,UACA,SAEA,kBAKA,OAJA,0BACA,aAAkC,aAAmB,IAErD,iBACA,iBAKA,cACA,2CACA,CACA,aACA,mCACA,CACA,sBACA,+CACA,CAIA,6BACA,sBAEA,EADA,kCACA,iBACA,WAAgB,EAAmB,EAEnC,EACA,aACA,uCACA,UAGA,WACA,eACA,uBACA,iDAA2D,SAAyB,EAEpF,aACA,CACA,UACA,kBAEA,aACA,4BACA,CACA,sBAEA,aADA,qBAEA,CACA,EACA,aACA,UACA,WACA,eAEA,GADA,aACA,oBACA,iDAA2D,SAAyB,EAEpF,CACA,aACA,4BACA,CACA,sBAEA,aADA,qBAEA,CACA,EACA,aACA,UAIA,WAYA,iBAGA,GAFA,mBACA,iBACA,EAhBA,GAiBA,iDAA2D,EAE3D,CAIA,UACA,YAPoF,SAOpF,qCAKA,OAJA,iCACA,0BACA,CAAK,EACL,oDACA,CACA,CACA,aACA,gCACA,CACA,sBACA,2BACA,gBACA,KACA,YAAoB,aAAsB,cAC1C,QACA,yCACA,CACA,iBACA,CACA,EACA,WAWA,iBAGA,GAFA,kBACA,cACA,wBACA,yCAAmD,aAAkC,EAErF,CAIA,UACA,oEAKA,OAJA,gCACA,0BACA,CAAK,EACL,oDACA,CACA,CAeA,uBAEA,gCACA,UAcA,OAbA,cACA,MA7FA,GA8FA,iCAA6C,EAAI,IAEjD,YACA,yCAEA,SACA,sBACA,OACA,YACA,MACA,CAAK,EACL,CACA,CACA,aACA,gCACA,CACA,sBACA,2BACA,yBACA,KACA,YAAoB,oBAAkC,cACtD,QACA,yCACA,CACA,iBACA,CACA,EACA,gBACA,UAGA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,SACA,mEAA+E,EAAM,EACrF,CACA,CACA,EACA,sBASA,iBACA,QACA,kBACA,gBACA,CACA,aACA,2BACA,6BACA,2BACA,CACA,eAGA,aAFA,kBACA,kBAEA,CACA,EACA,sBAQA,iBACA,QACA,kBACA,gBACA,CACA,aACA,2BACA,6BACA,2BACA,CACA,eAGA,aAFA,kBACA,kBAEA,CACA,EACA,sBACA,mBACA,QACA,cACA,kCACA,wBACA,CACA,aACA,2BACA,yBACA,qCACA,2BACA,CACA,eAIA,aAHA,kBACA,QACA,QAEA,CACA,EACA,sBACA,qBACA,QACA,cACA,kCACA,yBACA,gBACA,CACA,aACA,2BACA,yBACA,qCACA,4BACA,oCACA,yCACA,CACA,eACA,wBACA,UACA,UAIA,mBADA,CAAwB,QAFxB,kBAEwB,cADxB,iBACwB,EAExB,CACA,EACA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,SACA,+DAA2E,EAAM,EACjF,CACA,CACA,EACA,sBACA,iBACA,QACA,kBACA,gBACA,CACA,aACA,2BACA,6BACA,2BACA,CACA,eAGA,aAFA,kBACA,kBAEA,CACA,EACA,sBACA,iBACA,QACA,kBACA,gBACA,CACA,aACA,2BACA,6BACA,2BACA,CACA,eAGA,aAFA,kBACA,kBAEA,CACA,EAGA,WACA,eACA,YACA,CACA,aACA,0BACA,CACA,sBAEA,aADA,mBAEA,CACA,EAGA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,SACA,iBACA,SACA,kDAA8D,EAAM,EACpE,CACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,2BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,aACA,0BACA,CACA,eACA,YACA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,uBACA,CACA,eAEA,aADA,kBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,uBACA,CACA,eAEA,aADA,kBAEA,CACA,wBACA,gJAIA,CACA,EACA,WACA,qBACA,eACA,mBACA,YACA,gBACA,CAOA,qBACA,+BACA,aACA,gBACA,oBACA,aACA,kBAEA,CACA,aACA,0BACA,8BACA,uBACA,mBACA,CACA,sBACA,wBAIA,eAHA,kBACA,kBACA,QAEA,CACA,EACA,UACA,kBACA,iBACA,iBACA,IAEA,eACA,sEACA,CACA,eACA,sEACA,CACA,eACA,eACA,CACA,uBACA,aAIA,CACA,uBACA,wBAIA,CA4DA,eACA,iBACA,iBACA,qBAfA,GACA,QACA,KACA,kBACA,SA7CA,cACA,WACA,YACA,yBACA,yBAEA,yBACA,EAAI,eACJ,0BACI,WACJ,0BACI,WACJ,6BACI,UACJ,SACA,YAAsB,WAAmB,MACzC,WACA,SACA,KAAiB,EAAI,EAAE,EAAK,OAE5B,KAEA,CACA,8BACI,cACJ,SACA,YAAsB,WAAmB,MACzC,WACA,SACA,KAAiB,EAAI,EAAE,EAAK,OAE5B,KAEA,QACA,EAvCA,eAwCA,yBAEA,uBAEA,kCACA,EAKA,IACA,iBACA,UAEA,IACA,CACA,QACA,EAIA,GACA,oBAEA,WACA,0BACA,aACA,uBAEA,CAOA,sBAEA,IADA,kBACA,yBACA,wBACA,2BAEA,oBAGA,iBACA,CACA,oBACA,SAIA,IAHA,uBACA,wBAEA,wBACA,4BACA,kDAGA,kBACA,qDAGA,uBACA,wBAGA,QACA,CACA,eACA,wBACA,wBAEA,6BACA,YACA,cAEA,aACA,cAEA,aACA,cAEA,aACA,cAEA,cACA,cAEA,cACA,cAEA,cACA,cAEA,iBACA,cAEA,iBACA,kBACA,0BAEA,OADA,kBACA,SACA,CACA,gBACA,kBAEA,0DACA,oBACA,mBACA,4BACA,cACA,wBAEA,mBACA,6BAIA,GAHA,aACA,wBAEA,iFAEA,OADA,2BACA,OAEA,SAOA,OANA,gDACA,kBACA,8BACA,mBAGA,OADA,gCAEA,CACA,kBACA,0BACA,mEAEA,kCACA,6CACA,CACA,gCACA,CACA,EACA,uBACA,eACA,SACA,8BACA,CACA,EAGA,WAgBA,2BACA,cACA,uBACA,eACA,sBACA,sBACA,iCACA,eACA,CACA,aACA,yBACA,qCACA,0BACA,oCACA,oCACA,+CACA,0BACA,CACA,sBACA,wBACA,qBACA,oBACA,qBAIA,aACA,EACA,EACA,EACA,EAPA,mBACA,mBACA,kBAUA,CACA,EACA,WAmBA,mBACA,YACA,eACA,WACA,CACA,aACA,4BACA,kBACA,cACA,CACA,sBAIA,aAHA,qBACA,QACA,QAEA,CACA,EACA,WAoBA,qBACA,mBACA,qBACA,eACA,WACA,CAqBA,wBACA,yCACA,CAMA,uBACA,yBACA,CACA,aACA,8BACA,gCACA,kBACA,0CACA,sBACA,mBACA,CAAK,CACL,CACA,sBACA,wBACA,oBACA,UACA,8BACA,KACA,YAAoB,IAAY,KAChC,6BAGA,mBADA,EAEA,CACA,EACA,WAMA,eACA,0BACA,CACA,aACA,2BACA,qCACA,CACA,sBAEA,OADA,4BACA,wBACA,CACA,EACA,WAOA,iBACA,wBACA,0BACA,CACA,aACA,mCACA,kCACA,qBAEA,oBACA,sCAEA,CACA,0BAGA,EAFA,wBAMA,OALA,qBAGA,sBAEA,UACA,CACA,EACA,WAKA,eACA,WACA,CACA,aACA,2BACA,CACA,sBAEA,aADA,qBAEA,CACA,EACA,WAMA,iBACA,eACA,WACA,CAMA,kBACA,oBACA,gBACA,kCAEA,kDACA,CACA,aACA,0BACA,sBACA,CACA,sBAGA,aAFA,kBACA,kBAEA,CACA,EACA,SACA,aACA,+BACA,CACA,sBACA,+BACA,CACA,EACA,SACA,aACA,8BACA,CACA,sBACA,8BACA,CACA,EACA,WAYA,iBACA,eACA,oBACA,CACA,aACA,0BACA,+BACA,CACA,sBAGA,aAFA,kBACA,kBAEA,CACA,EACA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,SACA,iEAA6E,EAAM,EACnF,CACA,CACA,EACA,sBACA,iBACA,QACA,eACA,iCACA,CACA,aACA,2BACA,0BACA,oCACA,CACA,eAGA,aAFA,kBACA,QAEA,CACA,EACA,sBACA,mBACA,QACA,eACA,kCACA,wBACA,CACA,aACA,2BACA,0BACA,qCACA,mCACA,CACA,eAIA,aAHA,kBACA,QACA,kBAEA,CACA,EACA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,QACA,iBACA,SACA,6DAAyE,EAAM,EAC/E,CACA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,uBACA,CACA,eAEA,aADA,kBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,uBACA,CACA,eAEA,aADA,kBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,uBACA,CACA,eAEA,aADA,kBAEA,CACA,EACA,WACA,eACA,YACA,CACA,aACA,yBACA,CACA,sBAEA,aADA,kBAEA,CACA,EACA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,QACA,iBACA,SACA,8DAA0E,EAAM,EAChF,CACA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,yBACA,CACA,eAEA,aADA,kBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,0BACA,CACA,eAEA,aADA,mBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,0BACA,CACA,eAEA,aADA,mBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,0BACA,CACA,eAEA,aADA,mBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,2BACA,CACA,eAEA,aADA,oBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,2BACA,CACA,eAEA,aADA,oBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,uBACA,CACA,eAEA,aADA,kBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,4BACA,CACA,eAEA,aADA,qBAEA,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,aACA,2BACA,2BACA,CACA,eAEA,aADA,oBAEA,CACA,EACA,SACA,cACA,MAAiB,IAAQ,UAEzB,OADA,+BACA,UACA,CACA,sBACA,kCACA,GACA,IADA,EAEA,iBAEA,uDAAkE,EAAM,EAExE,CACA,EACA,sBACA,eACA,QACA,YACA,CACA,OACA,MAAiB,IAAQ,UAGzB,OAFA,6BACA,kBACA,UACA,CACA,aACA,2BACA,uBACA,CACA,eACA,+BACA,CACA,EAGA,WAKA,eACA,WACA,CACA,aACA,yBACA,CACA,sBAEA,aADA,mBAEA,CACA,EACA,WAMA,iBACA,YACA,eACA,CACA,aACA,0BACA,0BACA,CACA,sBAGA,aAFA,mBACA,kBAEA,CACA,EACA,SACA,sBACA,kCACA,UACA,OACA,iBACA,QACA,iBACA,SACA,6DAAyE,EAAM,EAC/E,CACA,CACA,EACA,sBASA,uBACA,QACA,YACA,WACA,YACA,eACA,WACA,CACA,aACA,2BACA,0BACA,yBACA,4BACA,kBACA,cACA,CACA,eACA,yBACA,qBAIA,iBAHA,qBACA,QACA,QAEA,CACA,EACA,sBASA,uBACA,QACA,YACA,mBACA,WACA,eACA,WACA,CACA,aACA,2BACA,0BACA,8BACA,yBACA,kBACA,cACA,CACA,eACA,yBACA,oBAIA,iBAHA,mBACA,QACA,QAEA,CACA,EAIA,WACA,eACA,uBACA,iDAEA,aACA,CAMA,oCACA,kBACA,6BACA,SACA,yCACA,MAAiB,IAAS,UAE1B,OADA,YACA,iBACA,CACA,+BACA,cACA,6BACA,SACA,mCACA,MAAiB,IAAS,UAE1B,OADA,YACA,iBACA,CAKA,iBACA,mCACA,CACA,CACA,cACA,0BACA,oBACA,sCACA,UAGA,SACA,2BACA,sBACA,kBACA,kBACA,sBACA,kBACA,sBACA,mBACA,CACA,aACA,iCACA,gCACA,gCACA,oCACA,6BACA,iCACA,mCACA,CACA,EAGA,WACA,iCACA,gEACA,CAIA,sBACA,0DACA,CAQA,2BACA,qBACA,uCAEA,8DACA,KAAY,GAAM,IAAmB,QAAW,CAAC,IAAwB,MACzE,eACA,CASA,iBACA,EACA,gBAAwB,MAAU,iCAElC,gBAAwB,MAAU,WAElC,qDACA,CAOA,UACA,2BAEA,UACA,wCAEA,OADA,2BACA,gBACA,CAOA,sCAEA,yBADA,oBACA,sCACA,EAAiB,IAAS,UAE1B,OADA,YACA,4BACA,CASA,4BACA,kCAA6C,EAAe,IAAI,EAAe,GAC/E,EAAiB,GAAM,UAEvB,OADA,YACA,4BACA,CAMA,SACA,kDACA,CAMA,cACA,MAAsB,MAAU,uCAChC,0BACA,CAMA,iBACA,iCACA,yBACA,CAMA,qBACA,iCACA,6BACA,OAAW,MAAU,+CACrB,CAcA,qBACA,OACA,6BACA,iCACA,2EACA,CACA,CACA,EAKA,eACA,oBAFA,GAEA,uBACA,CANA,GACA,IACA,2BAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA,YAAY,gBAAgB,cAAc,WAAW;AACrD,gBAAgB,+BAA+B,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,UAAU;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,EAAE,GAAgC,EAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA,yCAAyC,kBAAkB,eAAe;AAC1E;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAiC,EACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA,YAAY,oBAAoB,uBAAuB,iBAAiB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA,YAAY,eAAe,kBAAkB,yBAAyB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAuC,EAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAuC,EAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAiC,EACvC;AACA;AACA,wCAAwC,gBAAgB,gBAAgB;AACxE;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAuC,EAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAuC,EAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAuC,EAC7C;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA,MACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAMA,mBACA,0CACA,YACA,mBAAiC,GAAK,iBAAiB,oCAAoD,EAG3G,CACA,eAEA,GADA,2BACA,oBACA,SAEA,cACA,SAEA,eACA,QAEA,uCACA,CACA,eAEA,GADA,0BACA,mBACA,SAEA,4BACA,mBACA,sCAEA,QACA,CACA,eAEA,OADA,mCACA,SACA,CA6BA,iBACA,MACA,sCACA,qBACI,mBACJ,SAEA,wCAEA,cACA,CA2FA,uCACA,SACA,iBACA,qBACA,sBACA,CAOA,aACA,uBACA,iDAEA,sCACA,CAEA,4BACA,MAAiB,IAAS,UAC1B,mBACA,SAvBA,8BAwBM,mBACN,kBACM,mBACN,kBAEA,yCAEA,iBACA,OACA,oCAGA,OAFA,SACA,kBACA,CACA,CACA,EACA,oBACA,mBACA,WACA,gBACA,CACA,eACA,8BACA,0BAKA,gBAJA,OACA,uBACA,GAGA,CAEA,QACA,6BACA,CACA,EACA,oBACA,iBACA,SACA,gBACA,CACA,eACA,8BACA,0BAEA,gBADA,yBAEA,CAEA,QACA,6BACA,CACA,EACA,WAMA,iBACA,oBACA,kBAGA,EAFA,eACA,oBAEA,oBAEA,IAAgB,kBADhB,EACkD,YAClD,KAAe,4CAAuD,IAAI,QAAiB,IAAI,OAAa,GACpG,IAER,EADA,EACA,KAEA,sBACA,gDAEA,oBACA,CAAK,EACL,oBACA,oBAxtGA,KAytGA,cAxtGA,GAytGA,IACA,CACA,CACA,sBACA,uBACA,8CAEA,qBACA,YAEA,OA/OA,SAEA,WACA,mBACA,4BACI,mBACJ,0BACI,mBACJ,2BACI,mBACJ,2BACI,mBACJ,2BACI,mBACJ,4BACI,mBACJ,4BACI,mBACJ,aACI,oBACJ,SAkBA,SACA,0BACA,4BACA,oBACA,MACA,CACA,mBACA,mCACA,MACA,CACA,uBACA,kBACA,MACA,CACA,CACA,qBACA,oCAEA,kCACA,gCACA,EAtCA,cACI,oBACJ,SAqCA,SACA,YAAU,oCAA8D,QACxE,KAAwB,4CAA0D,IAAI,QAAiB,IAAI,QAAW,EACtH,6BACA,iBACA,uBACI,6BACJ,aACI,kCASJ,EARA,gBACA,6DAAuE,SAAgB,GAOvF,EALA,KAMA,MANA,IAOA,0BAEA,2BACA,EAVA,EAUA,EAVA,IAUA,GATA,EAAI,IACJ,2DAEA,EArDA,cAEA,oCAEA,EAoNA,kBA9OA,GA+OA,YACA,CAAK,CACL,CACA,mCACA,uBACA,8CAEA,8BAlKA,KACA,mBACA,qBAEA,mBACA,qBAEA,mBACA,qBAEA,mBACA,qBAEA,mBACA,qBAEA,mBACA,qBAEA,mBACA,qBAEA,oBACA,MACA,sCACA,qBACM,mBACN,SAEA,wCAEA,gBACA,CACA,2CACA,8BACA,eAAyB,GAAQ,sCAEjC,gBACA,CACA,qDACA,EA0HA,iBACA,CACA,qBACA,2CACA,CAUA,mCAEA,EADA,yCAEA,uBACA,qCAA+C,EAAK,GAEpD,yBACA,oBAEA,4BACA,SACA,4BAHA,EAGA,WAEA,EAAM,wBAEN,+BADA,EACA,QACA,gBAFA,EAEA,UACA,EAAM,IACN,mCAEA,QACA,CAuBA,aACA,WAAY,4EAA6E,mBACzF,MACA,yCAEA,sCACA,+CACA,sCACA,KACA,cACA,EACA,UACA,EACA,UACA,UACA,EACA,kBAGA,4BACA,CACA,EACA,SAEA,iBACA,mBACA,oBACA,CACA,kBAEA,MADA,8CACA,sBACA,iDACA,KACA,YAAuB,UAAY,IAAI,OAAS,IAAI,OAAQ,EAC5D,IACA,EAAS,GAGT,UAIA,OAHA,cACA,mBACA,CAAK,EACL,CACA,CASA,mBAIA,OAFA,KADA,yBACA,EACA,YACA,OACA,YAEA,0HAGA,uBACA,yBACA,aACA,eAAyB,GAAM,iBAE/B,eAEA,EADA,gDACA,IACA,oBAA2C,EAAE,+BAE7C,SACA,OACA,cAA0B,EAAK,IAAI,EAAO,GAC1C,GAEA,2CAAuE,EAAE,IACzE,GAEA,QAAY,QAAkB,mBAC9B,gDACA,EAAa,kBAAiC,IAAa,eAA4B,qBACvF,mDAAwE,gDAA8D,iCACtI,mGACA,iDAAsE,2CAAyD,sCAC/H,EAQA,OAPA,eACA,SACA,iBACA,UACA,uBACA,KACK,EACL,YACA,CACA,EACA,GACA,OACA,4BAGA,eAWA,sBACA,MACA,yCAEA,EACA,eAEA,aAv6GA,YACA,SAAe,EAAQ,EAOvB,OANA,iBACA,8BAEA,WANA,QAOA,MAAa,IAAI,EAA4B,EAE7C,CACA,EA85GA,GAEA,uBAA4D,CAAI,KAChE,CACA,oBACA,SAAY,GAAO,SACnB,iBACA,qBAA4B,kBAAuC,EACnE,0BACA,WAAmB,eACnB,CAAK,EACL,QACA,CACA,kCACA,SAAY,GAAO,SACnB,iBACA,qBAA4B,kBAAuC,eACnE,sCACA,QAAgB,0DAA0F,CAC1G,WAAmB,eACnB,CAAK,EACL,QACA,CACA,6BAQA,OAPA,SACA,iBACA,qBAA4B,EAAe,UAC3C,QAAgB,wDAA0E,CAC1F,iCACA,WAAmB,eACnB,CAAK,CAEL,CACA,8BACA,IAAY,QAAO,SACnB,iBACA,qBAA4B,kBAAuC,UAAU,EAAW,EACxF,gCACA,QAAgB,8CAA8D,CAC9E,WAAmB,eACnB,CAAK,EACL,QACA,CACA,+BAQA,OAPA,SACA,iBACA,qBAA4B,EAAe,YAC3C,QAAgB,yDAA2E,CAC3F,mCACA,WAAmB,eACnB,CAAK,CAEL,CACA,gCACA,SAAY,GAAO,SACnB,iBACA,qBAA4B,kBAAuC,YAAY,EAAa,EAC5F,kCACA,QAAgB,8CAA8D,CAC9E,WAAmB,eACnB,CAAK,EACL,QACA,CAEA,mCAKA,OAJA,WACA,sBACA,+CACA,CAAK,4BACL,OACA,CAcA,kCAKA,OAJA,WACA,yBACA,gCACA,CAAK,4BACL,OACA,CAUA,iCACA,cAAqB,GAUrB,GATA,oCACA,qCAEA,mCACA,kCAEA,mCACA,kCAEA,4CACA,qDACA,6CACA,CAEA,OADA,eACA,8CACA,CAUA,gDACA,4CACA,0BAEA,OADA,+CAEA,CAUA,4CACA,6CACA,EACA,6BACA,EACA,CAAQ,8CAER,IACA,sCAGA,OADA,wCAEA,CAUA,gCACA,6BACA,sDAMA,uBAJA,kCACA,+CACA,GAGA,CAQA,2BACA,qDACA,CACA,uCACA,IAAY,QAAO,SACnB,iBACA,qBAA4B,kBAAgC,UAAU,EAAe,EACrF,yCACA,QAAgB,0DAA0F,CAC1G,WAAmB,eACnB,CAAK,EACL,QACA,CACA,sCACA,SAAY,GAAO,SACnB,iBACA,qBAA4B,kBAAgC,UAAU,EAAkB,GAAG,EAAU,EACrG,sCACA,QAAgB,0DAA0F,CAC1G,WAAmB,eACnB,CAAK,EACL,QACA,CAMA,2BACA,yCACA,CAmBA,iCACA,MAuBA,OArBA,EADA,aAznCA,GA0nCA,6BACM,gBACN,YACA,cAAgB,GAAY,EAC5B,KACA,KACA,YAAwB,IAAe,KACvC,UACA,mDAEA,8CACA,uCACA,CAAO,IACP,QAEA,YACA,yBACA,gCACA,CAAO,cACP,QAEA,6BACA,CACA,oCACA,SAAY,GAAO,SACnB,iBACA,OACA,wBACA,0CACA,yDACA,WAAmB,eACnB,CAAK,EACL,QACA,CACA,+BACA,UACA,OACA,2EACA,2EACA,iGACA,EACA,MAAY,GAAO,SACnB,iBACA,OACA,iCACA,SACA,mCACA,yDACA,WAAmB,eACnB,CAAK,EACL,QACA,CACA,yBACA,MACA,SAAY,GAAO,SACnB,iBACA,wBACA,+BACA,QAAgB,wFAAkI,CAClJ,WAAmB,eACnB,CAAK,EACL,QACA,CACA,8BACA,SAAY,GAAO,SACnB,iBACA,iCAAwC,EAAQ,EAChD,oCACA,WAAmB,eACnB,CAAK,EACL,QACA,CACA,iCACA,SAAY,GAAO,SACnB,iBACA,oCAA2C,EAAW,EACtD,uCACA,WAAmB,eACnB,CAAK,EACL,QACA,CAaA,4BACA,IACA,yCACA,qCACM,SACN,mCACA,QAEA,QACA,CACA,CAsCA,4CACA,QAKA,EAJA,+CAnxHA,GAoxHA,6CACA,KACA,IAEA,SACA,QADA,CAIA,IAGA,GAFA,qCAEA,CADA,mCAEA,KAEA,CAAQ,SACR,sBACA,iDACA,SACA,OAEA,CACA,aACA,IACA,CACA,cACA,uCAAiD,GAAS,SAE1D,KACA,aACA,2BAAmC,GAAS,kBAAkB,GAAa,SAC3E,GAGA,MACA,SAEA,+BACA,aACA,eAAuB,GAAS,wBAAwB,YAAkB,EAC1E,GAGA,QACA,CAMA,8BACA,4CACA,CACA,sBACA,SAAY,GAAO,SACnB,iBACA,6BACA,WAAmB,eACnB,CAAK,EACL,QACA,CACA,mBAEA,MADA,6BACA,SAEA,0BACA,MASA,MARA,UACA,iBACA,OACA,mBAA0B,EAAO,OACjC,4BACA,QAAgB,4EAAsG,CACtH,WAAmB,eACnB,EAAK,EACL,KASA,oCACA,KAAa,kBAAiC,IAAa,eAA2B,qBACtF,2DAA0F,yCAAmD,qBAC7I,kBACA,iDAAgF,4BAAsC,0BACtH,EACA,cAAY,oCAA8C,CAC1D,oBAh3HA,KAi3HA,uBACA,kDAj3HA,IAk3HA,MAEA,4BACA,4BACA,UACA,EACA,EACA,EACA,EACA,iBAEA,CASA,2CACA,yDACA,gCAEA,MADA,2CACA,KASA,oCACA,oCAEA,MADA,2CACA,KAWA,8BACA,YACA,OACA,4CACA,wBACA,YACA,sBACA,GACA,uBAGA,gDACA,CAaA,wDACA,YACA,OACA,4CACA,wBACA,wBACA,8CACA,GACA,6BAGA,gDACA,CAOA,kDACA,sDACA,6CACA,CACA,yBACA,IAAY,QAAO,SACnB,iBACA,8BACA,gCACA,WAAmB,eACnB,CAAK,EACL,QACA,CACA,8BACA,8BAA4C,EAAW,GACvD,EAAa,eAA4B,uBACzC,wBACA,4BACA,EAGA,OADA,OADA,sBACA,iBACA,SACA,CAUA,kCACA,IAAY,wCAA+D,sBAC3E,aAEA,MAt+CA,GAs+CA,GACA,+BACA,mCACA,UACA,yBACA,UACA,sCACA,8CACA,2BAEA,yBACA,qBACA,qBACA,wCACA,wBACA,eACA,4BACA,GACA,CACA,MAEA,8BACA,MAEA,8BACA,qBACA,qBACA,GAGA,qDACA,gCACA,yCACA,CAMA,+BAEA,IACA,oBAAqB,GACrB,CAHA,0EAGM,KACN,6BACA,mBACA,qBACA,qBACA,CAAK,EACL,eACA,CACA,4BACA,IAAY,QAAO,SACnB,iBACA,6BAAoC,EAAY,EAChD,gCACA,QAAgB,oBAAqC,CACrD,WAAmB,eACnB,CAAK,EACL,QACA,CACA,6BACA,SAAY,GAAO,SACnB,iBACA,8BAAqC,EAAQ,EAC7C,iCACA,QAAgB,oBAAqC,CACrD,WAAmB,eACnB,CAAK,EACL,QACA,CACA,gBACA,SAAY,GAAO,SACnB,iBACA,OACA,gBACA,4BACA,uBAAgB,EAAgB,CAChC,WAAmB,eACnB,CAAK,EACL,QACA,CAEA,eAliIA,YACA,cACA,gBACA,eACA,KACA,eACA,WACA,UACA,SAIA,CACA,MACA,EAqhIA,EACA,CACA,EACA,GACA,GACA,8BACA,GACA,GACA,0CACA,GACA,GACA,OACA,qCACA,GACA,GACA,oCACA,GACA,GACA,uCACA,GACA,GACA,sCACA,GACA,GACA,6CACA,GACA,GACA,0CACA,GACA,GACA,8CACA,GACA,GACA,uCACA,GACA,GACA,mCACA,GACA,GACA,wCACA,GACA,GACA,2CACA,GACA,GACA,iCACA,GACA,IACA,8BACA,GACA,GACA,gCACA,GACA,GACA,GACA,UAEA,uBACG,EACH,oCACA,GACA,GACA,wCACA,GACA,GACA,oCACA,GACA,GACA,qCACA,GACA,GACA,wBACA,UACA,uBACA,iBACA,SACA,+BACA,CACA,EACA,uBACA,iBACA,SACA,kBACA,CACA,EACA,uBACA,qBACA,SACA,cACA,eACA,iBACA,kBACA,CACA,EACA,mBACA,cAkBA,OAjBA,6BACA,QACA,IAEA,OADA,0BAEA,CAAM,SACN,kBACA,aACA,SACA,gBAA2B,4BAA+B,EAC1D,qCACA,wCAGA,QACA,CACA,EACA,CACA,CAGA,eAIA,iBACA,gBACA,aACA,CAMA,0BACA,eACA,eAAyB,GAAS,6BAElC,CAMA,sBACA,eACA,kBACA,OACA,WAAmB,mCACnB,CAAK,EACL,iBACA,aACA,iCACA,gBACA,iCACA,2CACA,CAAS,GAGT,mBAOA,6BAIA,yBAHA,CACA,QACA,EAEA,CAUA,0BACA,wBACA,qBACA,OACA,SACA,mBAAmB,8DACnB,EACA,2BACA,CAOA,8BACA,QACA,wBACA,qBACA,OACA,eAAuB,MACvB,EACA,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAOA,iCAKA,yBAJA,CACA,SACA,WAAmB,WACnB,EAEA,CAOA,iCACA,QACA,OACA,eAAuB,MAAmB,CAC1C,QAAgB,QAChB,EACA,kCACA,mBAAwC,qCAExC,wBACA,qBACA,OACA,SACA,WACA,kBACA,0DACA,wDAEA,EACA,2BACA,CAQA,wBACA,QACA,wBACA,qBACA,OACA,eAAuB,MACvB,EACA,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAaA,gCACA,QACA,wBACA,qBACA,OACA,eAAuB,MAAmB,CAC1C,QAAgB,QAChB,EACA,GACA,wBAA6C,QAE7C,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAYA,sCACA,QACA,wBACA,qBACA,OACA,eAAuB,MAAmB,CAC1C,QAAgB,QAChB,EACA,GACA,wBAA6C,QAE7C,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CASA,0BACA,QACA,wBACA,qBACA,OACA,eAAuB,MAAc,CACrC,QAAgB,MAChB,EACA,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAOA,qCACA,QACA,wBACA,qBACA,OACA,eAAuB,MAAc,CACrC,QAAgB,MAChB,EACA,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAQA,gDACA,QACA,wBACA,qBACA,wBACA,qBACA,OACA,eAAuB,MAAsB,CAC7C,oBAA4B,eAAiB,OAA6B,CAC1E,QAAgB,MAChB,EACA,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAUA,gEACA,6CAEA,OADA,oDAEA,CAWA,+BACA,QACA,wBACA,qBACA,OACA,iBAAyB,MAAqB,CAC9C,iBAAyB,MACzB,EACA,kCACA,mBAAwC,qCAExC,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAQA,kCACA,oFAQA,yCACA,QACA,wBACA,qBACA,OACA,eAAuB,MACvB,EACA,kCACA,uBAA4C,gBAAkB,sCAE9D,OACA,SACA,WACA,kBACA,0DACA,wDACA,kCAEA,EACA,2BACA,CAQA,qCACA,+BACA,qBAKA,kBAJA,CACA,SACA,mBAAmB,EACnB,EAEA,CAOA,sCACA,QACA,wBACA,qBAIA,OACA,SACA,WACA,gBANA,CACA,iBAAyB,MACzB,EAKA,0DACA,wDACA,iCACA,CACA,EACA,2BACA,CAOA,gCAKA,yBAJA,CACA,SACA,iBAAmB,EACnB,EAEA,CAOA,6BACA,QAIA,OACA,SACA,WACA,gBANA,CACA,SAAiB,mCACjB,EAKA,0DACA,wDACA,iCACA,CACA,EACA,2BACA,CASA,yCACA,wBACA,2BACA,qBACA,qBAQA,kBAPA,CACA,SACA,WACA,mBACA,aACA,CACA,EAEA,CAMA,+BACA,+BACA,qBAKA,kBAJA,CACA,SACA,WAAmB,cACnB,EAEA,CAQA,+BACA,QACA,wBACA,qBAIA,OACA,SACA,WACA,gBANA,CACA,eAAuB,MACvB,EAKA,0DACA,wDACA,kCAEA,EACA,2BACA,CAOA,kCACA,+BACA,qBAOA,kBANA,CACA,SACA,WACA,SACA,CACA,EAEA,CAOA,kCACA,QACA,wBACA,qBAIA,OACA,SACA,WACA,gBANA,CACA,eAAuB,MACvB,EAKA,0DACA,wDACA,iCACA,CACA,EACA,2BACA,CACA,EAGA,SACA,sBACA,WACA,OAUA,GATA,6BA2CA,GACA,+DA5CA,IACA,gBACA,eACA,wBAEA,OACA,OACA,gBAEA,4BACA,4CAEA,GACA,iCAEA,8BACA,CACA,EACA,mBACA,oDACA,qDACA,IAEA,uBACA,uBACA,EACA,uCACA,CAAG,EACH,0CACA,2CACA,MAKA,GAHA,uBACA,uBACA,EACA,2BACA,OAEA,6BACA,CAAG,CACH,CACA,wBACA,0BAMA,aACA,iBACA,YACA,YACA,CACA,EACA,SACA,cACA,YACA,CACA,iBACA,cACA,CACA,EAwCA,eACA,iBACA,SAUA,OATA,kBA1CA,EA2CA,QAAY,GAAM,EAClB,gBACA,eAEA,WAMA,KACA,qCAiBA,OAfA,gBACA,6BACI,gBACJ,8BACI,gBACJ,+BACI,gBACJ,mCACI,gBACJ,oDACI,qCACJ,mBAEA,CAGA,EAtEA,YAFA,EA8CA,IA5CA,aACA,WAEA,yBA0CA,GACA,cACA,kBACA,CAAG,EACH,CACA,CAwBA,EADA,GACA,CACA,mBACA,qBACA,aACA,gBACA,CAAC,EACD,aACA,6BACA,kBACA,mBACA,YACA,eACA,cACA,WACA,8BACA,wBACA,CACA,EACA,SACA,mBACA,UACA,cACA,2BACA,CACA,EAwiBA,SAMA,eACA,+CACA,eACA,CAaA,0BACA,kCACA,EACA,EACA,EACA,EACA,GAGA,OADA,iDAEA,CAQA,6BACA,OACA,gDACA,gCACA,iDAGA,cADA,6BACA,IACA,CAgBA,kCACA,4BACA,mBACA,KACK,EAML,OALA,cACA,wCACA,iBACA,wCAGA,CACA,EA2YA,wCAEA,SAKA,eACA,kBACA,CAyBA,4BACA,UAkBA,EAjBA,2EACA,4DACA,mGAKA,aAJA,QACA,qCACA,+EACO,GAQP,OANA,iBACA,EACA,0BACA,MACA,EAGA,CACA,8CAGA,EADA,oDACA,GAEA,8CAxDA,sBA0DA,YACA,2BAAwE,wBAAsC,EAC9G,6BACA,iCAEA,MADA,uDACA,KAmBA,wBACA,UACA,2EACA,4DACA,2GAKA,aAJA,QACA,qCACA,+EACO,GAMP,OAJA,0BACA,MACA,0BAGA,CACA,8CACA,0BAA4C,EAAS,GACrD,QAEA,cADA,iDACA,gBACA,CAEA,EAGA,oBAQA,mBAEA,GADA,WACA,GACA,0CAEA,kBACA,aACA,CASA,wBAjjMA,EAijMA,EACA,SAAY,GAAO,SACnB,mBACA,gBACA,UACA,QACA,+BACA,QACA,CAAO,CACP,WAAmB,eAAgB,CACnC,0BACA,CAAK,EACL,KACA,YAAoB,WAAiB,MACrC,WACA,8CAAuD,EAAa,EACpE,CAEA,OADA,qBACA,CACA,CACA,EAydA,QACA,oCACA,gDACA,4CACA,0DACA,EACA,CAAC,OAA+B,EACM,GAAY,CA0MlD,EADA,GACA,CACA,sBACA,8BACA,eACA,CAAC,EAGD,YACA,wCACA,0CACA,sCACA,kDACA,wCACA,gDACA,8CACA,oCACA,gDACA,kCACA,8BACA,gCACA,0DACA,oDACA,sBACA,4CACA,oCACA,kCACA,4CACA,wCACA,8BACA,EACA,CAAC,OAAsB,EAGvB,QACA,oBACA,kBACA,kBACA,EACA,CAAC,OAA8B,EAG/B,QACA,wBACA,wBACA,EACA,CAAC,OAAgB,EAGjB,QACA,mCACA,2CACA,EACA,CAAC,OAA0C,EAC3C,QACA,mCACA,oCACA,8CACA,EACA,CAAC,OAA4C,EAC7C,QACA,mCACA,2CACA,EACA,CAAC,OAAiD,EAClD,QACA,oBACA,2CACA,EACA,CAAC,OAAyD,EAC1D,QACA,6BACA,gBACA,kDACA,UACA,yDACA,sBACA,gBACA,wBACA,oBACA,EACA,CAAC,OAAiD,EAClD,QACA,+BACA,kBACA,6BACA,uBACA,6CACA,8CACA,8CACA,2BACA,8CACA,wBACA,gDACA,+BACA,8CACA,+CACA,2CACA,EACA,CAAC,OAAqC,EACtC,QACA,kBACA,uBACA,gCACA,+BACA,+CACA,2CACA,EACA,CAAC,OAAmC,EACpC,QACA,uBACA,gCACA,mCACA,sBACA,cACA,+DACA,yDACA,kBACA,8DACA,0DACA,EACA,CAAC,OAAgC,EACjC,QACA,uBACA,gCACA,kBACA,uCACA,+CACA,2CACA,EACA,CAAC,OAAiC,EAClC,QACA,iDACA,mCACA,mCACA,4BACA,2CACA,oBACA,mCACA,6BACA,kBACA,6BACA,+CACA,2CACA,2BACA,EACA,CAAC,OAAsC,EACvC,QACA,kBACA,6CACA,yBACA,oDACA,yCACA,wBACA,yBACA,EACA,CAAC,OAAwC,EACzC,QACA,kBACA,6CACA,yBACA,oDACA,yCACA,wBACA,yBACA,iCACA,EACA,CAAC,OAA2C,EAC5C,QACA,kBACA,wCACA,6CACA,uBACA,yBACA,oDACA,+BACA,yCACA,wBACA,yBACA,iCACA,EACA,CAAC,OAAyC,EAC1C,QACA,kBACA,uBACA,gCACA,wDACA,oDACA,+BACA,EACA,CAAC,OAA2C,EAC5C,QACA,iDACA,mCACA,mCACA,4BACA,2CACA,wDACA,oDACA,oBACA,mCACA,6BACA,kBACA,6BACA,2BACA,EACA,CAAC,OAA8C,EAC/C,QACA,+BACA,mCACA,iCACA,mCACA,mCACA,oDACA,+BACA,oCACA,EACA,CAAC,OAA0D,EAC3D,QACA,+BACA,mCACA,mCACA,iCACA,4BACA,wDACA,oDACA,yBACA,2CACA,2BACA,kCACA,iCACA,kCACA,YACA,EACA,CAAC,OAA4C,EAC7C,QACA,0CACA,8CACA,oDACA,gEACA,4CACA,2BACA,6BACA,EACA,CAAC,OAA6D,EAC9D,QACA,kDACA,uCACA,wDACA,oDACA,+BACA,6BACA,gBACA,EACA,CAAC,OAA6C,EAC9C,QACA,uCACA,oDACA,0CACA,6BACA,uBACA,kBACA,6BACA,EACA,CAAC,OAAgD,EACjD,QACA,kBACA,yBACA,uBACA,yBACA,wDACA,oDACA,+BACA,yBACA,iCACA,EACA,CAAC,OAAqD,EACtD,QACA,gDACA,yBACA,+CACA,oDACA,iCACA,+BACA,gCACA,EACA,CAAC,OAAqC,EACtC,QACA,oDACA,qCACA,4CACA,+BACA,EACA,CAAC,OAAgD,EACjD,QACA,2BACA,+BACA,yBACA,YACA,qBACA,oDACA,6BACA,EACA,CAAC,OAAyC,EAC1C,QACA,iDACA,mCACA,mCACA,yCACA,4BACA,2CACA,oDACA,wDACA,oDACA,oBACA,mCACA,6BACA,cACA,+BACA,yCACA,mCACA,wDACA,oDACA,kBACA,uCACA,2BACA,EACA,CAAC,OAAyC,EAC1C,QACA,+BACA,4BACA,gCACA,yDACA,wDACA,oDACA,oBACA,kBACA,8BACA,yBACA,qCACA,iCACA,uBACA,EACA,CAAC,OAA4C,EAC7C,QACA,kBACA,iDACA,mCACA,mCACA,wDACA,oDACA,cACA,+BACA,qCACA,yBACA,uCACA,qCACA,EACA,CAAC,OAA8C,EAC/C,QACA,kBACA,gCACA,kCACA,wDACA,oDACA,+BACA,0CACA,yBACA,8BACA,8BACA,yDACA,iCACA,EACA,CAAC,OAAiD,EAClD,QACA,kBACA,iDACA,+BACA,mCACA,mCACA,6BACA,wDACA,oDACA,cACA,qCACA,6BACA,yBACA,8BACA,uCACA,EACA,CAAC,OAAkD,EACnD,QACA,YACA,cACA,EACA,CAAC,OAAuB,EACxB,QACA,kBACA,uCACA,2BACA,yBACA,6BACA,2CACA,EACA,CAAC,OAAkD,EACnD,QACA,sDACA,4CACA,EACA,CAAC,OAA6C,EAC9C,QACA,uCACA,6BACA,EACA,CAAC,OAA6C,EAC9C,QACA,mCACA,mCACA,cACA,2BACA,6BACA,mCACA,oDACA,2CACA,cACA,EACA,CAAC,OAA4B,EAC7B,QACA,kBACA,yBACA,6BACA,6CACA,2BACA,6CACA,uBACA,wBACA,gDACA,+BACA,yBACA,8CACA,iCACA,+CACA,2CACA,cACA,EACA,CAAC,OAA+C,EAChD,QACA,yBACA,mCACA,sBACA,qBACA,wDACA,oDACA,cACA,2BACA,oEACA,8DACA,kBACA,iCACA,EACA,CAAC,OAA6C,EAC9C,QACA,UACA,8BACA,EACA,CAAC,OAAoC,EACrC,QACA,qBACA,EACA,CAAC,OAAkC,EACnC,QACA,oBACA,2CACA,EACA,CAAC,OAAoC,EACrC,QACA,mCACA,uBACA,+BACA,qCACA,sCACA,iCACA,6CACA,mCACA,kCACA,yBACA,wDACA,oDACA,yBACA,4BACA,kBACA,wCACA,6BACA,8BACA,iCACA,EACA,CAAC,OAAyE,EAC1E,QACA,gBACA,uBACA,+BACA,0CACA,qCACA,6CACA,mCACA,kCACA,yBACA,yBACA,wDACA,oDACA,4BACA,gDACA,iCACA,EACA,CAAC,OAAkF,EACnF,QACA,uBACA,+BACA,qCACA,6CACA,kCACA,yBACA,wDACA,oDACA,yBACA,4BACA,gBACA,kBACA,6BACA,8BACA,iCACA,EACA,CAAC,OAAyE,EAC1E,QACA,gBACA,uBACA,+BACA,qCACA,6CACA,mCACA,kCACA,yBACA,wDACA,oDACA,4BACA,qBACA,gBACA,6BACA,8BACA,iCACA,EACA,CAAC,OAA6E,EAC9E,QACA,gBACA,uBACA,+BACA,mCACA,qCACA,mCACA,6CACA,2BACA,yBACA,kCACA,4BACA,yCACA,gBACA,qCACA,kBACA,6BACA,8BACA,yBACA,iCACA,+CACA,2CACA,EACA,CAAC,OAAmE,EACpE,QACA,iEACA,uBACA,sCACA,8BACA,4BACA,yDACA,iDACA,sCACA,8BACA,EACA,CAAC,OAA4D,EAC7D,QACA,4CACA,6BACA,EACA,CAAC,OAAmD,EACpD,QACA,YACA,kCACA,gCACA,cACA,oCACA,kCACA,EACA,CAAC,OAAgB,EACjB,QACA,4CACA,6BACA,wBACA,EACA,CAAC,OAAsC,EACvC,QACA,uBACA,2BACA,2BACA,4CACA,+CACA,2CACA,+BACA,EACA,CAAC,OAAoC,EACrC,QACA,2BACA,+BACA,YACA,6BACA,2CACA,+CACA,EACA,CAAC,OAAiC,EAClC,QACA,kBACA,qBACA,yBACA,EACA,CAAC,OAAqC,EACtC,QACA,2BACA,uBACA,iDACA,mCACA,mCACA,8CACA,8CACA,2BACA,8CACA,6BACA,cACA,qCACA,yBACA,6BACA,uCACA,+CACA,2CACA,+BACA,EACA,CAAC,OAAsC,EACvC,QACA,2BACA,6BACA,6CACA,8CACA,2BACA,6BACA,gCACA,0CACA,yBACA,6BACA,8BACA,iCACA,+CACA,2CACA,cACA,EACA,CAAC,OAAyC,EAC1C,QACA,iDACA,mCACA,mCACA,yCACA,4BACA,2CACA,oDACA,oBACA,mCACA,6BACA,cACA,+BACA,yCACA,mCACA,wDACA,oDACA,kBACA,uCACA,+CACA,2CACA,2BACA,EACA,CAAC,OAAiC,EAClC,QACA,kBACA,iDACA,mCACA,mCACA,cACA,+BACA,qCACA,6BACA,yBACA,uCACA,+CACA,2CACA,EACA,CAAC,OAAsC,EACvC,QACA,iDACA,mCACA,mCACA,cACA,qCACA,uCACA,qCACA,+CACA,2CACA,EACA,CAAC,OAA4B,EAC7B,QACA,6BACA,6CACA,gBACA,sDACA,gCACA,gCACA,8CACA,kBACA,mCACA,wBACA,oBACA,EACA,CAAC,OAAuC","sources":["webpack://_N_E/./node_modules/.pnpm/aptos@1.21.0/node_modules/aptos/dist/index.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __decorateClass = (decorators, target, key, kind) => {\n var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;\n for (var i = decorators.length - 1, decorator; i >= 0; i--)\n if (decorator = decorators[i])\n result = (kind ? decorator(target, key, result) : decorator(result)) || result;\n if (kind && result)\n __defProp(target, key, result);\n return result;\n};\n\n// src/account/aptos_account.ts\nimport nacl2 from \"tweetnacl\";\nimport * as bip39 from \"@scure/bip39\";\nimport { bytesToHex as bytesToHex2 } from \"@noble/hashes/utils\";\nimport { sha256 } from \"@noble/hashes/sha256\";\nimport { sha3_256 as sha3Hash3 } from \"@noble/hashes/sha3\";\n\n// src/utils/hd-key.ts\nimport nacl from \"tweetnacl\";\nimport { hmac } from \"@noble/hashes/hmac\";\nimport { sha512 } from \"@noble/hashes/sha512\";\nimport { hexToBytes } from \"@noble/hashes/utils\";\nvar pathRegex = /^m(\\/[0-9]+')+$/;\nvar replaceDerive = (val) => val.replace(\"'\", \"\");\nvar HMAC_KEY = \"ed25519 seed\";\nvar HARDENED_OFFSET = 2147483648;\nvar getMasterKeyFromSeed = (seed) => {\n const h = hmac.create(sha512, HMAC_KEY);\n const I = h.update(hexToBytes(seed)).digest();\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n return {\n key: IL,\n chainCode: IR\n };\n};\nvar CKDPriv = ({ key, chainCode }, index) => {\n const buffer = new ArrayBuffer(4);\n new DataView(buffer).setUint32(0, index);\n const indexBytes = new Uint8Array(buffer);\n const zero = new Uint8Array([0]);\n const data = new Uint8Array([...zero, ...key, ...indexBytes]);\n const I = hmac.create(sha512, chainCode).update(data).digest();\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n return {\n key: IL,\n chainCode: IR\n };\n};\nvar getPublicKey = (privateKey, withZeroByte = true) => {\n const keyPair = nacl.sign.keyPair.fromSeed(privateKey);\n const signPk = keyPair.secretKey.subarray(32);\n const zero = new Uint8Array([0]);\n return withZeroByte ? new Uint8Array([...zero, ...signPk]) : signPk;\n};\nvar isValidPath = (path) => {\n if (!pathRegex.test(path)) {\n return false;\n }\n return !path.split(\"/\").slice(1).map(replaceDerive).some(Number.isNaN);\n};\nvar derivePath = (path, seed, offset = HARDENED_OFFSET) => {\n if (!isValidPath(path)) {\n throw new Error(\"Invalid derivation path\");\n }\n const { key, chainCode } = getMasterKeyFromSeed(seed);\n const segments = path.split(\"/\").slice(1).map(replaceDerive).map((el) => parseInt(el, 10));\n return segments.reduce((parentKeys, segment) => CKDPriv(parentKeys, segment + offset), { key, chainCode });\n};\n\n// src/version.ts\nvar VERSION = \"1.21.0\";\n\n// src/utils/misc.ts\nasync function sleep(timeMs) {\n return new Promise((resolve) => {\n setTimeout(resolve, timeMs);\n });\n}\nvar DEFAULT_VERSION_PATH_BASE = \"/v1\";\nfunction fixNodeUrl(nodeUrl) {\n let out = `${nodeUrl}`;\n if (out.endsWith(\"/\")) {\n out = out.substring(0, out.length - 1);\n }\n if (!out.endsWith(DEFAULT_VERSION_PATH_BASE)) {\n out = `${out}${DEFAULT_VERSION_PATH_BASE}`;\n }\n return out;\n}\nvar DEFAULT_MAX_GAS_AMOUNT = 2e5;\nvar DEFAULT_TXN_EXP_SEC_FROM_NOW = 20;\nvar DEFAULT_TXN_TIMEOUT_SEC = 20;\nvar APTOS_COIN = \"0x1::aptos_coin::AptosCoin\";\nvar CUSTOM_REQUEST_HEADER = { \"x-aptos-client\": `aptos-ts-sdk/${VERSION}` };\n\n// src/utils/memoize-decorator.ts\nfunction Memoize(args) {\n let hashFunction;\n let ttlMs;\n let tags;\n if (typeof args === \"object\") {\n hashFunction = args.hashFunction;\n ttlMs = args.ttlMs;\n tags = args.tags;\n } else {\n hashFunction = args;\n }\n return (target, propertyKey, descriptor) => {\n if (descriptor.value != null) {\n descriptor.value = getNewFunction(descriptor.value, hashFunction, ttlMs, tags);\n } else if (descriptor.get != null) {\n descriptor.get = getNewFunction(descriptor.get, hashFunction, ttlMs, tags);\n } else {\n throw new Error(\"Only put a Memoize() decorator on a method or get accessor.\");\n }\n };\n}\nfunction MemoizeExpiring(ttlMs, hashFunction) {\n return Memoize({\n ttlMs,\n hashFunction\n });\n}\nvar clearCacheTagsMap = /* @__PURE__ */ new Map();\nfunction clear(tags) {\n const cleared = /* @__PURE__ */ new Set();\n for (const tag of tags) {\n const maps = clearCacheTagsMap.get(tag);\n if (maps) {\n for (const mp of maps) {\n if (!cleared.has(mp)) {\n mp.clear();\n cleared.add(mp);\n }\n }\n }\n }\n return cleared.size;\n}\nfunction getNewFunction(originalMethod, hashFunction, ttlMs = 0, tags) {\n const propMapName = Symbol(\"__memoized_map__\");\n return function(...args) {\n let returnedValue;\n const that = this;\n if (!that.hasOwnProperty(propMapName)) {\n Object.defineProperty(that, propMapName, {\n configurable: false,\n enumerable: false,\n writable: false,\n value: /* @__PURE__ */ new Map()\n });\n }\n const myMap = that[propMapName];\n if (Array.isArray(tags)) {\n for (const tag of tags) {\n if (clearCacheTagsMap.has(tag)) {\n clearCacheTagsMap.get(tag).push(myMap);\n } else {\n clearCacheTagsMap.set(tag, [myMap]);\n }\n }\n }\n if (hashFunction || args.length > 0 || ttlMs > 0) {\n let hashKey;\n if (hashFunction === true) {\n hashKey = args.map((a) => a.toString()).join(\"!\");\n } else if (hashFunction) {\n hashKey = hashFunction.apply(that, args);\n } else {\n hashKey = args[0];\n }\n const timestampKey = `${hashKey}__timestamp`;\n let isExpired = false;\n if (ttlMs > 0) {\n if (!myMap.has(timestampKey)) {\n isExpired = true;\n } else {\n const timestamp = myMap.get(timestampKey);\n isExpired = Date.now() - timestamp > ttlMs;\n }\n }\n if (myMap.has(hashKey) && !isExpired) {\n returnedValue = myMap.get(hashKey);\n } else {\n returnedValue = originalMethod.apply(that, args);\n myMap.set(hashKey, returnedValue);\n if (ttlMs > 0) {\n myMap.set(timestampKey, Date.now());\n }\n }\n } else {\n const hashKey = that;\n if (myMap.has(hashKey)) {\n returnedValue = myMap.get(hashKey);\n } else {\n returnedValue = originalMethod.apply(that, args);\n myMap.set(hashKey, returnedValue);\n }\n }\n return returnedValue;\n };\n}\n\n// src/client/core.ts\nimport aptosClient from \"@aptos-labs/aptos-client\";\n\n// src/client/types.ts\nvar AptosApiError = class extends Error {\n constructor(request2, response, message) {\n super(message);\n this.name = \"AptosApiError\";\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.data = response.data;\n this.request = request2;\n }\n};\n\n// src/client/core.ts\nvar errors = {\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 429: \"Too Many Requests\",\n 500: \"Internal Server Error\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\"\n};\nasync function request(url, method, body, contentType, params, overrides) {\n const headers = {\n ...overrides == null ? void 0 : overrides.HEADERS,\n \"x-aptos-client\": `aptos-ts-sdk/${VERSION}`,\n \"content-type\": contentType != null ? contentType : \"application/json\"\n };\n if (overrides == null ? void 0 : overrides.TOKEN) {\n headers.Authorization = `Bearer ${overrides == null ? void 0 : overrides.TOKEN}`;\n }\n const response = await aptosClient({ url, method, body, params, headers, overrides });\n return response;\n}\nasync function aptosRequest(options) {\n const { url, endpoint, method, body, contentType, params, overrides } = options;\n const fullEndpoint = `${url}/${endpoint != null ? endpoint : \"\"}`;\n const response = await request(fullEndpoint, method, body, contentType, params, overrides);\n const result = {\n status: response.status,\n statusText: response.statusText,\n data: response.data,\n headers: response.headers,\n config: response.config,\n url: fullEndpoint\n };\n if (result.status >= 200 && result.status < 300) {\n return result;\n }\n const errorMessage = errors[result.status];\n throw new AptosApiError(options, result, errorMessage != null ? errorMessage : \"Generic Error\");\n}\n\n// src/client/get.ts\nasync function get(options) {\n const response = await aptosRequest({ ...options, method: \"GET\" });\n return response;\n}\n\n// src/client/post.ts\nasync function post(options) {\n const response = await aptosRequest({ ...options, method: \"POST\" });\n return response;\n}\n\n// src/utils/pagination_helpers.ts\nasync function paginateWithCursor(options) {\n const out = [];\n let cursor;\n const requestParams = options.params;\n while (true) {\n requestParams.start = cursor;\n const response = await get({\n url: options.url,\n endpoint: options.endpoint,\n params: requestParams,\n originMethod: options.originMethod,\n overrides: options.overrides\n });\n cursor = response.headers[\"x-aptos-cursor\"];\n delete response.headers;\n out.push(...response.data);\n if (cursor === null || cursor === void 0) {\n break;\n }\n }\n return out;\n}\n\n// src/utils/api-endpoints.ts\nvar NetworkToIndexerAPI = {\n mainnet: \"https://indexer.mainnet.aptoslabs.com/v1/graphql\",\n testnet: \"https://indexer-testnet.staging.gcp.aptosdev.com/v1/graphql\",\n devnet: \"https://indexer-devnet.staging.gcp.aptosdev.com/v1/graphql\",\n local: \"http://127.0.0.1:8090/v1/graphql\"\n};\nvar NetworkToNodeAPI = {\n mainnet: \"https://fullnode.mainnet.aptoslabs.com/v1\",\n testnet: \"https://fullnode.testnet.aptoslabs.com/v1\",\n devnet: \"https://fullnode.devnet.aptoslabs.com/v1\",\n local: \"http://127.0.0.1:8080/v1\"\n};\nvar NodeAPIToNetwork = {\n \"https://fullnode.mainnet.aptoslabs.com/v1\": \"mainnet\",\n \"https://fullnode.testnet.aptoslabs.com/v1\": \"testnet\",\n \"https://fullnode.devnet.aptoslabs.com/v1\": \"devnet\",\n \"http://127.0.0.1:8080/v1\": \"local\"\n};\nvar Network = /* @__PURE__ */ ((Network3) => {\n Network3[\"MAINNET\"] = \"mainnet\";\n Network3[\"TESTNET\"] = \"testnet\";\n Network3[\"DEVNET\"] = \"devnet\";\n Network3[\"LOCAL\"] = \"local\";\n return Network3;\n})(Network || {});\n\n// src/utils/hex_string.ts\nimport { bytesToHex, hexToBytes as hexToBytes2 } from \"@noble/hashes/utils\";\nvar HexString = class _HexString {\n /**\n * Creates new hex string from Buffer\n * @param buffer A buffer to convert\n * @returns New HexString\n */\n static fromBuffer(buffer) {\n return _HexString.fromUint8Array(buffer);\n }\n /**\n * Creates new hex string from Uint8Array\n * @param arr Uint8Array to convert\n * @returns New HexString\n */\n static fromUint8Array(arr) {\n return new _HexString(bytesToHex(arr));\n }\n /**\n * Ensures `hexString` is instance of `HexString` class\n * @param hexString String to check\n * @returns New HexString if `hexString` is regular string or `hexString` if it is HexString instance\n * @example\n * ```\n * const regularString = \"string\";\n * const hexString = new HexString(\"string\"); // \"0xstring\"\n * HexString.ensure(regularString); // \"0xstring\"\n * HexString.ensure(hexString); // \"0xstring\"\n * ```\n */\n static ensure(hexString) {\n if (typeof hexString === \"string\") {\n return new _HexString(hexString);\n }\n return hexString;\n }\n /**\n * Creates new HexString instance from regular string. If specified string already starts with \"0x\" prefix,\n * it will not add another one\n * @param hexString String to convert\n * @example\n * ```\n * const string = \"string\";\n * new HexString(string); // \"0xstring\"\n * ```\n */\n constructor(hexString) {\n if (hexString.startsWith(\"0x\")) {\n this.hexString = hexString;\n } else {\n this.hexString = `0x${hexString}`;\n }\n }\n /**\n * Getter for inner hexString\n * @returns Inner hex string\n */\n hex() {\n return this.hexString;\n }\n /**\n * Getter for inner hexString without prefix\n * @returns Inner hex string without prefix\n * @example\n * ```\n * const hexString = new HexString(\"string\"); // \"0xstring\"\n * hexString.noPrefix(); // \"string\"\n * ```\n */\n noPrefix() {\n return this.hexString.slice(2);\n }\n /**\n * Overrides default `toString` method\n * @returns Inner hex string\n */\n toString() {\n return this.hex();\n }\n /**\n * Trimmes extra zeroes in the begining of a string\n * @returns Inner hexString without leading zeroes\n * @example\n * ```\n * new HexString(\"0x000000string\").toShortString(); // result = \"0xstring\"\n * ```\n */\n toShortString() {\n const trimmed = this.hexString.replace(/^0x0*/, \"\");\n return `0x${trimmed}`;\n }\n /**\n * Converts hex string to a Uint8Array\n * @returns Uint8Array from inner hexString without prefix\n */\n toUint8Array() {\n return Uint8Array.from(hexToBytes2(this.noPrefix()));\n }\n};\n\n// src/aptos_types/index.ts\nvar aptos_types_exports = {};\n__export(aptos_types_exports, {\n AccountAddress: () => AccountAddress,\n AccountAuthenticator: () => AccountAuthenticator,\n AccountAuthenticatorEd25519: () => AccountAuthenticatorEd25519,\n AccountAuthenticatorMultiEd25519: () => AccountAuthenticatorMultiEd25519,\n ArgumentABI: () => ArgumentABI,\n AuthenticationKey: () => AuthenticationKey,\n ChainId: () => ChainId,\n ChangeSet: () => ChangeSet,\n Ed25519PublicKey: () => Ed25519PublicKey,\n Ed25519Signature: () => Ed25519Signature,\n EntryFunction: () => EntryFunction,\n EntryFunctionABI: () => EntryFunctionABI,\n FeePayerRawTransaction: () => FeePayerRawTransaction,\n Identifier: () => Identifier,\n Module: () => Module,\n ModuleId: () => ModuleId,\n MultiAgentRawTransaction: () => MultiAgentRawTransaction,\n MultiEd25519PublicKey: () => MultiEd25519PublicKey,\n MultiEd25519Signature: () => MultiEd25519Signature,\n MultiSig: () => MultiSig,\n MultiSigTransactionPayload: () => MultiSigTransactionPayload,\n RawTransaction: () => RawTransaction,\n RawTransactionWithData: () => RawTransactionWithData,\n RotationProofChallenge: () => RotationProofChallenge,\n Script: () => Script,\n ScriptABI: () => ScriptABI,\n SignedTransaction: () => SignedTransaction,\n StructTag: () => StructTag,\n Transaction: () => Transaction,\n TransactionArgument: () => TransactionArgument,\n TransactionArgumentAddress: () => TransactionArgumentAddress,\n TransactionArgumentBool: () => TransactionArgumentBool,\n TransactionArgumentU128: () => TransactionArgumentU128,\n TransactionArgumentU16: () => TransactionArgumentU16,\n TransactionArgumentU256: () => TransactionArgumentU256,\n TransactionArgumentU32: () => TransactionArgumentU32,\n TransactionArgumentU64: () => TransactionArgumentU64,\n TransactionArgumentU8: () => TransactionArgumentU8,\n TransactionArgumentU8Vector: () => TransactionArgumentU8Vector,\n TransactionAuthenticator: () => TransactionAuthenticator,\n TransactionAuthenticatorEd25519: () => TransactionAuthenticatorEd25519,\n TransactionAuthenticatorFeePayer: () => TransactionAuthenticatorFeePayer,\n TransactionAuthenticatorMultiAgent: () => TransactionAuthenticatorMultiAgent,\n TransactionAuthenticatorMultiEd25519: () => TransactionAuthenticatorMultiEd25519,\n TransactionPayload: () => TransactionPayload,\n TransactionPayloadEntryFunction: () => TransactionPayloadEntryFunction,\n TransactionPayloadMultisig: () => TransactionPayloadMultisig,\n TransactionPayloadScript: () => TransactionPayloadScript,\n TransactionScriptABI: () => TransactionScriptABI,\n TypeArgumentABI: () => TypeArgumentABI,\n TypeTag: () => TypeTag,\n TypeTagAddress: () => TypeTagAddress,\n TypeTagBool: () => TypeTagBool,\n TypeTagParser: () => TypeTagParser,\n TypeTagParserError: () => TypeTagParserError,\n TypeTagSigner: () => TypeTagSigner,\n TypeTagStruct: () => TypeTagStruct,\n TypeTagU128: () => TypeTagU128,\n TypeTagU16: () => TypeTagU16,\n TypeTagU256: () => TypeTagU256,\n TypeTagU32: () => TypeTagU32,\n TypeTagU64: () => TypeTagU64,\n TypeTagU8: () => TypeTagU8,\n TypeTagVector: () => TypeTagVector,\n UserTransaction: () => UserTransaction,\n WriteSet: () => WriteSet,\n objectStructTag: () => objectStructTag,\n optionStructTag: () => optionStructTag,\n stringStructTag: () => stringStructTag\n});\n\n// src/bcs/index.ts\nvar bcs_exports = {};\n__export(bcs_exports, {\n Deserializer: () => Deserializer,\n Serializer: () => Serializer,\n bcsSerializeBool: () => bcsSerializeBool,\n bcsSerializeBytes: () => bcsSerializeBytes,\n bcsSerializeFixedBytes: () => bcsSerializeFixedBytes,\n bcsSerializeStr: () => bcsSerializeStr,\n bcsSerializeU128: () => bcsSerializeU128,\n bcsSerializeU16: () => bcsSerializeU16,\n bcsSerializeU256: () => bcsSerializeU256,\n bcsSerializeU32: () => bcsSerializeU32,\n bcsSerializeU8: () => bcsSerializeU8,\n bcsSerializeUint64: () => bcsSerializeUint64,\n bcsToBytes: () => bcsToBytes,\n deserializeVector: () => deserializeVector,\n serializeVector: () => serializeVector,\n serializeVectorWithFunc: () => serializeVectorWithFunc\n});\n\n// src/bcs/consts.ts\nvar MAX_U8_NUMBER = 2 ** 8 - 1;\nvar MAX_U16_NUMBER = 2 ** 16 - 1;\nvar MAX_U32_NUMBER = 2 ** 32 - 1;\nvar MAX_U64_BIG_INT = BigInt(2 ** 64) - BigInt(1);\nvar MAX_U128_BIG_INT = BigInt(2 ** 128) - BigInt(1);\nvar MAX_U256_BIG_INT = BigInt(2 ** 256) - BigInt(1);\n\n// src/bcs/serializer.ts\nvar Serializer = class {\n constructor() {\n this.buffer = new ArrayBuffer(64);\n this.offset = 0;\n }\n ensureBufferWillHandleSize(bytes) {\n while (this.buffer.byteLength < this.offset + bytes) {\n const newBuffer = new ArrayBuffer(this.buffer.byteLength * 2);\n new Uint8Array(newBuffer).set(new Uint8Array(this.buffer));\n this.buffer = newBuffer;\n }\n }\n serialize(values) {\n this.ensureBufferWillHandleSize(values.length);\n new Uint8Array(this.buffer, this.offset).set(values);\n this.offset += values.length;\n }\n serializeWithFunction(fn, bytesLength, value) {\n this.ensureBufferWillHandleSize(bytesLength);\n const dv = new DataView(this.buffer, this.offset);\n fn.apply(dv, [0, value, true]);\n this.offset += bytesLength;\n }\n /**\n * Serializes a string. UTF8 string is supported. Serializes the string's bytes length \"l\" first,\n * and then serializes \"l\" bytes of the string content.\n *\n * BCS layout for \"string\": string_length | string_content. string_length is the bytes length of\n * the string that is uleb128 encoded. string_length is a u32 integer.\n *\n * @example\n * ```ts\n * const serializer = new Serializer();\n * serializer.serializeStr(\"çå∞≠¢õß∂ƒ∫\");\n * assert(serializer.getBytes() === new Uint8Array([24, 0xc3, 0xa7, 0xc3, 0xa5, 0xe2, 0x88, 0x9e,\n * 0xe2, 0x89, 0xa0, 0xc2, 0xa2, 0xc3, 0xb5, 0xc3, 0x9f, 0xe2, 0x88, 0x82, 0xc6, 0x92, 0xe2, 0x88, 0xab]));\n * ```\n */\n serializeStr(value) {\n const textEncoder = new TextEncoder();\n this.serializeBytes(textEncoder.encode(value));\n }\n /**\n * Serializes an array of bytes.\n *\n * BCS layout for \"bytes\": bytes_length | bytes. bytes_length is the length of the bytes array that is\n * uleb128 encoded. bytes_length is a u32 integer.\n */\n serializeBytes(value) {\n this.serializeU32AsUleb128(value.length);\n this.serialize(value);\n }\n /**\n * Serializes an array of bytes with known length. Therefore length doesn't need to be\n * serialized to help deserialization. When deserializing, the number of\n * bytes to deserialize needs to be passed in.\n */\n serializeFixedBytes(value) {\n this.serialize(value);\n }\n /**\n * Serializes a boolean value.\n *\n * BCS layout for \"boolean\": One byte. \"0x01\" for True and \"0x00\" for False.\n */\n serializeBool(value) {\n if (typeof value !== \"boolean\") {\n throw new Error(\"Value needs to be a boolean\");\n }\n const byteValue = value ? 1 : 0;\n this.serialize(new Uint8Array([byteValue]));\n }\n serializeU8(value) {\n this.serialize(new Uint8Array([value]));\n }\n serializeU16(value) {\n this.serializeWithFunction(DataView.prototype.setUint16, 2, value);\n }\n serializeU32(value) {\n this.serializeWithFunction(DataView.prototype.setUint32, 4, value);\n }\n serializeU64(value) {\n const low = BigInt(value.toString()) & BigInt(MAX_U32_NUMBER);\n const high = BigInt(value.toString()) >> BigInt(32);\n this.serializeU32(Number(low));\n this.serializeU32(Number(high));\n }\n serializeU128(value) {\n const low = BigInt(value.toString()) & MAX_U64_BIG_INT;\n const high = BigInt(value.toString()) >> BigInt(64);\n this.serializeU64(low);\n this.serializeU64(high);\n }\n serializeU256(value) {\n const low = BigInt(value.toString()) & MAX_U128_BIG_INT;\n const high = BigInt(value.toString()) >> BigInt(128);\n this.serializeU128(low);\n this.serializeU128(high);\n }\n serializeU32AsUleb128(val) {\n let value = val;\n const valueArray = [];\n while (value >>> 7 !== 0) {\n valueArray.push(value & 127 | 128);\n value >>>= 7;\n }\n valueArray.push(value);\n this.serialize(new Uint8Array(valueArray));\n }\n /**\n * Returns the buffered bytes\n */\n getBytes() {\n return new Uint8Array(this.buffer).slice(0, this.offset);\n }\n};\n__decorateClass([\n checkNumberRange(0, MAX_U8_NUMBER)\n], Serializer.prototype, \"serializeU8\", 1);\n__decorateClass([\n checkNumberRange(0, MAX_U16_NUMBER)\n], Serializer.prototype, \"serializeU16\", 1);\n__decorateClass([\n checkNumberRange(0, MAX_U32_NUMBER)\n], Serializer.prototype, \"serializeU32\", 1);\n__decorateClass([\n checkNumberRange(BigInt(0), MAX_U64_BIG_INT)\n], Serializer.prototype, \"serializeU64\", 1);\n__decorateClass([\n checkNumberRange(BigInt(0), MAX_U128_BIG_INT)\n], Serializer.prototype, \"serializeU128\", 1);\n__decorateClass([\n checkNumberRange(BigInt(0), MAX_U256_BIG_INT)\n], Serializer.prototype, \"serializeU256\", 1);\n__decorateClass([\n checkNumberRange(0, MAX_U32_NUMBER)\n], Serializer.prototype, \"serializeU32AsUleb128\", 1);\nfunction checkNumberRange(minValue, maxValue, message) {\n return (target, propertyKey, descriptor) => {\n const childFunction = descriptor.value;\n descriptor.value = function deco(value) {\n const valueBigInt = BigInt(value.toString());\n if (valueBigInt > BigInt(maxValue.toString()) || valueBigInt < BigInt(minValue.toString())) {\n throw new Error(message || \"Value is out of range\");\n }\n childFunction.apply(this, [value]);\n };\n return descriptor;\n };\n}\n\n// src/bcs/deserializer.ts\nvar Deserializer = class {\n constructor(data) {\n this.buffer = new ArrayBuffer(data.length);\n new Uint8Array(this.buffer).set(data, 0);\n this.offset = 0;\n }\n read(length) {\n if (this.offset + length > this.buffer.byteLength) {\n throw new Error(\"Reached to the end of buffer\");\n }\n const bytes = this.buffer.slice(this.offset, this.offset + length);\n this.offset += length;\n return bytes;\n }\n /**\n * Deserializes a string. UTF8 string is supported. Reads the string's bytes length \"l\" first,\n * and then reads \"l\" bytes of content. Decodes the byte array into a string.\n *\n * BCS layout for \"string\": string_length | string_content. string_length is the bytes length of\n * the string that is uleb128 encoded. string_length is a u32 integer.\n *\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([24, 0xc3, 0xa7, 0xc3, 0xa5, 0xe2, 0x88, 0x9e,\n * 0xe2, 0x89, 0xa0, 0xc2, 0xa2, 0xc3, 0xb5, 0xc3, 0x9f, 0xe2, 0x88, 0x82, 0xc6, 0x92, 0xe2, 0x88, 0xab]));\n * assert(deserializer.deserializeStr() === \"çå∞≠¢õß∂ƒ∫\");\n * ```\n */\n deserializeStr() {\n const value = this.deserializeBytes();\n const textDecoder = new TextDecoder();\n return textDecoder.decode(value);\n }\n /**\n * Deserializes an array of bytes.\n *\n * BCS layout for \"bytes\": bytes_length | bytes. bytes_length is the length of the bytes array that is\n * uleb128 encoded. bytes_length is a u32 integer.\n */\n deserializeBytes() {\n const len = this.deserializeUleb128AsU32();\n return new Uint8Array(this.read(len));\n }\n /**\n * Deserializes an array of bytes. The number of bytes to read is already known.\n *\n */\n deserializeFixedBytes(len) {\n return new Uint8Array(this.read(len));\n }\n /**\n * Deserializes a boolean value.\n *\n * BCS layout for \"boolean\": One byte. \"0x01\" for True and \"0x00\" for False.\n */\n deserializeBool() {\n const bool = new Uint8Array(this.read(1))[0];\n if (bool !== 1 && bool !== 0) {\n throw new Error(\"Invalid boolean value\");\n }\n return bool === 1;\n }\n /**\n * Deserializes a uint8 number.\n *\n * BCS layout for \"uint8\": One byte. Binary format in little-endian representation.\n */\n deserializeU8() {\n return new DataView(this.read(1)).getUint8(0);\n }\n /**\n * Deserializes a uint16 number.\n *\n * BCS layout for \"uint16\": Two bytes. Binary format in little-endian representation.\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x34, 0x12]));\n * assert(deserializer.deserializeU16() === 4660);\n * ```\n */\n deserializeU16() {\n return new DataView(this.read(2)).getUint16(0, true);\n }\n /**\n * Deserializes a uint32 number.\n *\n * BCS layout for \"uint32\": Four bytes. Binary format in little-endian representation.\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU32() === 305419896);\n * ```\n */\n deserializeU32() {\n return new DataView(this.read(4)).getUint32(0, true);\n }\n /**\n * Deserializes a uint64 number.\n *\n * BCS layout for \"uint64\": Eight bytes. Binary format in little-endian representation.\n * @example\n * ```ts\n * const deserializer = new Deserializer(new Uint8Array([0x00, 0xEF, 0xCD, 0xAB, 0x78, 0x56, 0x34, 0x12]));\n * assert(deserializer.deserializeU64() === 1311768467750121216);\n * ```\n */\n deserializeU64() {\n const low = this.deserializeU32();\n const high = this.deserializeU32();\n return BigInt(BigInt(high) << BigInt(32) | BigInt(low));\n }\n /**\n * Deserializes a uint128 number.\n *\n * BCS layout for \"uint128\": Sixteen bytes. Binary format in little-endian representation.\n */\n deserializeU128() {\n const low = this.deserializeU64();\n const high = this.deserializeU64();\n return BigInt(high << BigInt(64) | low);\n }\n /**\n * Deserializes a uint256 number.\n *\n * BCS layout for \"uint256\": Thirty-two bytes. Binary format in little-endian representation.\n */\n deserializeU256() {\n const low = this.deserializeU128();\n const high = this.deserializeU128();\n return BigInt(high << BigInt(128) | low);\n }\n /**\n * Deserializes a uleb128 encoded uint32 number.\n *\n * BCS use uleb128 encoding in two cases: (1) lengths of variable-length sequences and (2) tags of enum values\n */\n deserializeUleb128AsU32() {\n let value = BigInt(0);\n let shift = 0;\n while (value < MAX_U32_NUMBER) {\n const byte = this.deserializeU8();\n value |= BigInt(byte & 127) << BigInt(shift);\n if ((byte & 128) === 0) {\n break;\n }\n shift += 7;\n }\n if (value > MAX_U32_NUMBER) {\n throw new Error(\"Overflow while parsing uleb128-encoded uint32 value\");\n }\n return Number(value);\n }\n};\n\n// src/bcs/helper.ts\nfunction serializeVector(value, serializer) {\n serializer.serializeU32AsUleb128(value.length);\n value.forEach((item) => {\n item.serialize(serializer);\n });\n}\nfunction serializeVectorWithFunc(value, func) {\n const serializer = new Serializer();\n serializer.serializeU32AsUleb128(value.length);\n const f = serializer[func];\n value.forEach((item) => {\n f.call(serializer, item);\n });\n return serializer.getBytes();\n}\nfunction deserializeVector(deserializer, cls) {\n const length = deserializer.deserializeUleb128AsU32();\n const list = [];\n for (let i = 0; i < length; i += 1) {\n list.push(cls.deserialize(deserializer));\n }\n return list;\n}\nfunction bcsToBytes(value) {\n const serializer = new Serializer();\n value.serialize(serializer);\n return serializer.getBytes();\n}\nfunction bcsSerializeUint64(value) {\n const serializer = new Serializer();\n serializer.serializeU64(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeU8(value) {\n const serializer = new Serializer();\n serializer.serializeU8(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeU16(value) {\n const serializer = new Serializer();\n serializer.serializeU16(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeU32(value) {\n const serializer = new Serializer();\n serializer.serializeU32(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeU128(value) {\n const serializer = new Serializer();\n serializer.serializeU128(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeU256(value) {\n const serializer = new Serializer();\n serializer.serializeU256(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeBool(value) {\n const serializer = new Serializer();\n serializer.serializeBool(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeStr(value) {\n const serializer = new Serializer();\n serializer.serializeStr(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeBytes(value) {\n const serializer = new Serializer();\n serializer.serializeBytes(value);\n return serializer.getBytes();\n}\nfunction bcsSerializeFixedBytes(value) {\n const serializer = new Serializer();\n serializer.serializeFixedBytes(value);\n return serializer.getBytes();\n}\n\n// src/aptos_types/transaction.ts\nimport { sha3_256 as sha3Hash } from \"@noble/hashes/sha3\";\n\n// src/aptos_types/account_address.ts\nvar _AccountAddress = class _AccountAddress {\n constructor(address) {\n if (address.length !== _AccountAddress.LENGTH) {\n throw new Error(\"Expected address of length 32\");\n }\n this.address = address;\n }\n /**\n * Creates AccountAddress from a hex string.\n * @param addr Hex string can be with a prefix or without a prefix,\n * e.g. '0x1aa' or '1aa'. Hex string will be left padded with 0s if too short.\n */\n static fromHex(addr) {\n let address = HexString.ensure(addr);\n if (address.noPrefix().length % 2 !== 0) {\n address = new HexString(`0${address.noPrefix()}`);\n }\n const addressBytes = address.toUint8Array();\n if (addressBytes.length > _AccountAddress.LENGTH) {\n throw new Error(\"Hex string is too long. Address's length is 32 bytes.\");\n } else if (addressBytes.length === _AccountAddress.LENGTH) {\n return new _AccountAddress(addressBytes);\n }\n const res = new Uint8Array(_AccountAddress.LENGTH);\n res.set(addressBytes, _AccountAddress.LENGTH - addressBytes.length);\n return new _AccountAddress(res);\n }\n /**\n * Checks if the string is a valid AccountAddress\n * @param addr Hex string can be with a prefix or without a prefix,\n * e.g. '0x1aa' or '1aa'. Hex string will be left padded with 0s if too short.\n */\n static isValid(addr) {\n if (addr === \"\") {\n return false;\n }\n let address = HexString.ensure(addr);\n if (address.noPrefix().length % 2 !== 0) {\n address = new HexString(`0${address.noPrefix()}`);\n }\n const addressBytes = address.toUint8Array();\n return addressBytes.length <= _AccountAddress.LENGTH;\n }\n /**\n * Return a hex string from account Address.\n */\n toHexString() {\n return HexString.fromUint8Array(this.address).hex();\n }\n serialize(serializer) {\n serializer.serializeFixedBytes(this.address);\n }\n static deserialize(deserializer) {\n return new _AccountAddress(deserializer.deserializeFixedBytes(_AccountAddress.LENGTH));\n }\n /**\n * Standardizes an address to the format \"0x\" followed by 64 lowercase hexadecimal digits.\n */\n static standardizeAddress(address) {\n const lowercaseAddress = address.toLowerCase();\n const addressWithoutPrefix = lowercaseAddress.startsWith(\"0x\") ? lowercaseAddress.slice(2) : lowercaseAddress;\n const addressWithPadding = addressWithoutPrefix.padStart(64, \"0\");\n return `0x${addressWithPadding}`;\n }\n};\n_AccountAddress.LENGTH = 32;\n_AccountAddress.CORE_CODE_ADDRESS = _AccountAddress.fromHex(\"0x1\");\nvar AccountAddress = _AccountAddress;\n\n// src/aptos_types/ed25519.ts\nvar _Ed25519PublicKey = class _Ed25519PublicKey {\n constructor(value) {\n if (value.length !== _Ed25519PublicKey.LENGTH) {\n throw new Error(`Ed25519PublicKey length should be ${_Ed25519PublicKey.LENGTH}`);\n }\n this.value = value;\n }\n toBytes() {\n return this.value;\n }\n serialize(serializer) {\n serializer.serializeBytes(this.value);\n }\n static deserialize(deserializer) {\n const value = deserializer.deserializeBytes();\n return new _Ed25519PublicKey(value);\n }\n};\n_Ed25519PublicKey.LENGTH = 32;\nvar Ed25519PublicKey = _Ed25519PublicKey;\nvar _Ed25519Signature = class _Ed25519Signature {\n constructor(value) {\n this.value = value;\n if (value.length !== _Ed25519Signature.LENGTH) {\n throw new Error(`Ed25519Signature length should be ${_Ed25519Signature.LENGTH}`);\n }\n }\n serialize(serializer) {\n serializer.serializeBytes(this.value);\n }\n static deserialize(deserializer) {\n const value = deserializer.deserializeBytes();\n return new _Ed25519Signature(value);\n }\n};\n_Ed25519Signature.LENGTH = 64;\nvar Ed25519Signature = _Ed25519Signature;\n\n// src/aptos_types/multi_ed25519.ts\nvar MAX_SIGNATURES_SUPPORTED = 32;\nvar MultiEd25519PublicKey = class _MultiEd25519PublicKey {\n /**\n * Public key for a K-of-N multisig transaction. A K-of-N multisig transaction means that for such a\n * transaction to be executed, at least K out of the N authorized signers have signed the transaction\n * and passed the check conducted by the chain.\n *\n * @see {@link\n * https://aptos.dev/guides/creating-a-signed-transaction#multisignature-transactions | Creating a Signed Transaction}\n *\n * @param public_keys A list of public keys\n * @param threshold At least \"threshold\" signatures must be valid\n */\n constructor(public_keys, threshold) {\n this.public_keys = public_keys;\n this.threshold = threshold;\n if (threshold > MAX_SIGNATURES_SUPPORTED) {\n throw new Error(`\"threshold\" cannot be larger than ${MAX_SIGNATURES_SUPPORTED}`);\n }\n }\n /**\n * Converts a MultiEd25519PublicKey into bytes with: bytes = p1_bytes | ... | pn_bytes | threshold\n */\n toBytes() {\n const bytes = new Uint8Array(this.public_keys.length * Ed25519PublicKey.LENGTH + 1);\n this.public_keys.forEach((k, i) => {\n bytes.set(k.value, i * Ed25519PublicKey.LENGTH);\n });\n bytes[this.public_keys.length * Ed25519PublicKey.LENGTH] = this.threshold;\n return bytes;\n }\n serialize(serializer) {\n serializer.serializeBytes(this.toBytes());\n }\n static deserialize(deserializer) {\n const bytes = deserializer.deserializeBytes();\n const threshold = bytes[bytes.length - 1];\n const keys = [];\n for (let i = 0; i < bytes.length - 1; i += Ed25519PublicKey.LENGTH) {\n const begin = i;\n keys.push(new Ed25519PublicKey(bytes.subarray(begin, begin + Ed25519PublicKey.LENGTH)));\n }\n return new _MultiEd25519PublicKey(keys, threshold);\n }\n};\nvar _MultiEd25519Signature = class _MultiEd25519Signature {\n /**\n * Signature for a K-of-N multisig transaction.\n *\n * @see {@link\n * https://aptos.dev/guides/creating-a-signed-transaction#multisignature-transactions | Creating a Signed Transaction}\n *\n * @param signatures A list of ed25519 signatures\n * @param bitmap 4 bytes, at most 32 signatures are supported. If Nth bit value is `1`, the Nth\n * signature should be provided in `signatures`. Bits are read from left to right\n */\n constructor(signatures, bitmap) {\n this.signatures = signatures;\n this.bitmap = bitmap;\n if (bitmap.length !== _MultiEd25519Signature.BITMAP_LEN) {\n throw new Error(`\"bitmap\" length should be ${_MultiEd25519Signature.BITMAP_LEN}`);\n }\n }\n /**\n * Converts a MultiEd25519Signature into bytes with `bytes = s1_bytes | ... | sn_bytes | bitmap`\n */\n toBytes() {\n const bytes = new Uint8Array(this.signatures.length * Ed25519Signature.LENGTH + _MultiEd25519Signature.BITMAP_LEN);\n this.signatures.forEach((k, i) => {\n bytes.set(k.value, i * Ed25519Signature.LENGTH);\n });\n bytes.set(this.bitmap, this.signatures.length * Ed25519Signature.LENGTH);\n return bytes;\n }\n /**\n * Helper method to create a bitmap out of the specified bit positions\n * @param bits The bitmap positions that should be set. A position starts at index 0.\n * Valid position should range between 0 and 31.\n * @example\n * Here's an example of valid `bits`\n * ```\n * [0, 2, 31]\n * ```\n * `[0, 2, 31]` means the 1st, 3rd and 32nd bits should be set in the bitmap.\n * The result bitmap should be 0b1010000000000000000000000000001\n *\n * @returns bitmap that is 32bit long\n */\n static createBitmap(bits) {\n const firstBitInByte = 128;\n const bitmap = new Uint8Array([0, 0, 0, 0]);\n const dupCheckSet = /* @__PURE__ */ new Set();\n bits.forEach((bit) => {\n if (bit >= MAX_SIGNATURES_SUPPORTED) {\n throw new Error(`Invalid bit value ${bit}.`);\n }\n if (dupCheckSet.has(bit)) {\n throw new Error(\"Duplicated bits detected.\");\n }\n dupCheckSet.add(bit);\n const byteOffset = Math.floor(bit / 8);\n let byte = bitmap[byteOffset];\n byte |= firstBitInByte >> bit % 8;\n bitmap[byteOffset] = byte;\n });\n return bitmap;\n }\n serialize(serializer) {\n serializer.serializeBytes(this.toBytes());\n }\n static deserialize(deserializer) {\n const bytes = deserializer.deserializeBytes();\n const bitmap = bytes.subarray(bytes.length - 4);\n const sigs = [];\n for (let i = 0; i < bytes.length - bitmap.length; i += Ed25519Signature.LENGTH) {\n const begin = i;\n sigs.push(new Ed25519Signature(bytes.subarray(begin, begin + Ed25519Signature.LENGTH)));\n }\n return new _MultiEd25519Signature(sigs, bitmap);\n }\n};\n_MultiEd25519Signature.BITMAP_LEN = 4;\nvar MultiEd25519Signature = _MultiEd25519Signature;\n\n// src/aptos_types/authenticator.ts\nvar TransactionAuthenticator = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return TransactionAuthenticatorEd25519.load(deserializer);\n case 1:\n return TransactionAuthenticatorMultiEd25519.load(deserializer);\n case 2:\n return TransactionAuthenticatorMultiAgent.load(deserializer);\n case 3:\n return TransactionAuthenticatorFeePayer.load(deserializer);\n default:\n throw new Error(`Unknown variant index for TransactionAuthenticator: ${index}`);\n }\n }\n};\nvar TransactionAuthenticatorEd25519 = class _TransactionAuthenticatorEd25519 extends TransactionAuthenticator {\n /**\n * An authenticator for single signature.\n *\n * @param public_key Client's public key.\n * @param signature Signature of a raw transaction.\n * @see {@link https://aptos.dev/guides/creating-a-signed-transaction/ | Creating a Signed Transaction}\n * for details about generating a signature.\n */\n constructor(public_key, signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n static load(deserializer) {\n const public_key = Ed25519PublicKey.deserialize(deserializer);\n const signature = Ed25519Signature.deserialize(deserializer);\n return new _TransactionAuthenticatorEd25519(public_key, signature);\n }\n};\nvar TransactionAuthenticatorMultiEd25519 = class _TransactionAuthenticatorMultiEd25519 extends TransactionAuthenticator {\n /**\n * An authenticator for multiple signatures.\n *\n * @param public_key\n * @param signature\n *\n */\n constructor(public_key, signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(1);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n static load(deserializer) {\n const public_key = MultiEd25519PublicKey.deserialize(deserializer);\n const signature = MultiEd25519Signature.deserialize(deserializer);\n return new _TransactionAuthenticatorMultiEd25519(public_key, signature);\n }\n};\nvar TransactionAuthenticatorMultiAgent = class _TransactionAuthenticatorMultiAgent extends TransactionAuthenticator {\n constructor(sender, secondary_signer_addresses, secondary_signers) {\n super();\n this.sender = sender;\n this.secondary_signer_addresses = secondary_signer_addresses;\n this.secondary_signers = secondary_signers;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(2);\n this.sender.serialize(serializer);\n serializeVector(this.secondary_signer_addresses, serializer);\n serializeVector(this.secondary_signers, serializer);\n }\n static load(deserializer) {\n const sender = AccountAuthenticator.deserialize(deserializer);\n const secondary_signer_addresses = deserializeVector(deserializer, AccountAddress);\n const secondary_signers = deserializeVector(deserializer, AccountAuthenticator);\n return new _TransactionAuthenticatorMultiAgent(sender, secondary_signer_addresses, secondary_signers);\n }\n};\nvar TransactionAuthenticatorFeePayer = class _TransactionAuthenticatorFeePayer extends TransactionAuthenticator {\n constructor(sender, secondary_signer_addresses, secondary_signers, fee_payer) {\n super();\n this.sender = sender;\n this.secondary_signer_addresses = secondary_signer_addresses;\n this.secondary_signers = secondary_signers;\n this.fee_payer = fee_payer;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(3);\n this.sender.serialize(serializer);\n serializeVector(this.secondary_signer_addresses, serializer);\n serializeVector(this.secondary_signers, serializer);\n this.fee_payer.address.serialize(serializer);\n this.fee_payer.authenticator.serialize(serializer);\n }\n static load(deserializer) {\n const sender = AccountAuthenticator.deserialize(deserializer);\n const secondary_signer_addresses = deserializeVector(deserializer, AccountAddress);\n const secondary_signers = deserializeVector(deserializer, AccountAuthenticator);\n const address = AccountAddress.deserialize(deserializer);\n const authenticator = AccountAuthenticator.deserialize(deserializer);\n const fee_payer = { address, authenticator };\n return new _TransactionAuthenticatorFeePayer(sender, secondary_signer_addresses, secondary_signers, fee_payer);\n }\n};\nvar AccountAuthenticator = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return AccountAuthenticatorEd25519.load(deserializer);\n case 1:\n return AccountAuthenticatorMultiEd25519.load(deserializer);\n default:\n throw new Error(`Unknown variant index for AccountAuthenticator: ${index}`);\n }\n }\n};\nvar AccountAuthenticatorEd25519 = class _AccountAuthenticatorEd25519 extends AccountAuthenticator {\n constructor(public_key, signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n static load(deserializer) {\n const public_key = Ed25519PublicKey.deserialize(deserializer);\n const signature = Ed25519Signature.deserialize(deserializer);\n return new _AccountAuthenticatorEd25519(public_key, signature);\n }\n};\nvar AccountAuthenticatorMultiEd25519 = class _AccountAuthenticatorMultiEd25519 extends AccountAuthenticator {\n constructor(public_key, signature) {\n super();\n this.public_key = public_key;\n this.signature = signature;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(1);\n this.public_key.serialize(serializer);\n this.signature.serialize(serializer);\n }\n static load(deserializer) {\n const public_key = MultiEd25519PublicKey.deserialize(deserializer);\n const signature = MultiEd25519Signature.deserialize(deserializer);\n return new _AccountAuthenticatorMultiEd25519(public_key, signature);\n }\n};\n\n// src/aptos_types/identifier.ts\nvar Identifier = class _Identifier {\n constructor(value) {\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeStr(this.value);\n }\n static deserialize(deserializer) {\n const value = deserializer.deserializeStr();\n return new _Identifier(value);\n }\n};\n\n// src/aptos_types/type_tag.ts\nvar TypeTag = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return TypeTagBool.load(deserializer);\n case 1:\n return TypeTagU8.load(deserializer);\n case 2:\n return TypeTagU64.load(deserializer);\n case 3:\n return TypeTagU128.load(deserializer);\n case 4:\n return TypeTagAddress.load(deserializer);\n case 5:\n return TypeTagSigner.load(deserializer);\n case 6:\n return TypeTagVector.load(deserializer);\n case 7:\n return TypeTagStruct.load(deserializer);\n case 8:\n return TypeTagU16.load(deserializer);\n case 9:\n return TypeTagU32.load(deserializer);\n case 10:\n return TypeTagU256.load(deserializer);\n default:\n throw new Error(`Unknown variant index for TypeTag: ${index}`);\n }\n }\n};\nvar TypeTagBool = class _TypeTagBool extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n }\n static load(_deserializer) {\n return new _TypeTagBool();\n }\n};\nvar TypeTagU8 = class _TypeTagU8 extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(1);\n }\n static load(_deserializer) {\n return new _TypeTagU8();\n }\n};\nvar TypeTagU16 = class _TypeTagU16 extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(8);\n }\n static load(_deserializer) {\n return new _TypeTagU16();\n }\n};\nvar TypeTagU32 = class _TypeTagU32 extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(9);\n }\n static load(_deserializer) {\n return new _TypeTagU32();\n }\n};\nvar TypeTagU64 = class _TypeTagU64 extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(2);\n }\n static load(_deserializer) {\n return new _TypeTagU64();\n }\n};\nvar TypeTagU128 = class _TypeTagU128 extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(3);\n }\n static load(_deserializer) {\n return new _TypeTagU128();\n }\n};\nvar TypeTagU256 = class _TypeTagU256 extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(10);\n }\n static load(_deserializer) {\n return new _TypeTagU256();\n }\n};\nvar TypeTagAddress = class _TypeTagAddress extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(4);\n }\n static load(_deserializer) {\n return new _TypeTagAddress();\n }\n};\nvar TypeTagSigner = class _TypeTagSigner extends TypeTag {\n serialize(serializer) {\n serializer.serializeU32AsUleb128(5);\n }\n static load(_deserializer) {\n return new _TypeTagSigner();\n }\n};\nvar TypeTagVector = class _TypeTagVector extends TypeTag {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(6);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n const value = TypeTag.deserialize(deserializer);\n return new _TypeTagVector(value);\n }\n};\nvar TypeTagStruct = class _TypeTagStruct extends TypeTag {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(7);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n const value = StructTag.deserialize(deserializer);\n return new _TypeTagStruct(value);\n }\n isStringTypeTag() {\n if (this.value.module_name.value === \"string\" && this.value.name.value === \"String\" && this.value.address.toHexString() === AccountAddress.CORE_CODE_ADDRESS.toHexString()) {\n return true;\n }\n return false;\n }\n};\nvar StructTag = class _StructTag {\n constructor(address, module_name, name, type_args) {\n this.address = address;\n this.module_name = module_name;\n this.name = name;\n this.type_args = type_args;\n }\n /**\n * Converts a string literal to a StructTag\n * @param structTag String literal in format \"AcountAddress::module_name::ResourceName\",\n * e.g. \"0x1::aptos_coin::AptosCoin\"\n * @returns\n */\n static fromString(structTag) {\n const typeTagStruct = new TypeTagParser(structTag).parseTypeTag();\n return new _StructTag(\n typeTagStruct.value.address,\n typeTagStruct.value.module_name,\n typeTagStruct.value.name,\n typeTagStruct.value.type_args\n );\n }\n serialize(serializer) {\n this.address.serialize(serializer);\n this.module_name.serialize(serializer);\n this.name.serialize(serializer);\n serializeVector(this.type_args, serializer);\n }\n static deserialize(deserializer) {\n const address = AccountAddress.deserialize(deserializer);\n const moduleName = Identifier.deserialize(deserializer);\n const name = Identifier.deserialize(deserializer);\n const typeArgs = deserializeVector(deserializer, TypeTag);\n return new _StructTag(address, moduleName, name, typeArgs);\n }\n};\nvar stringStructTag = new StructTag(\n AccountAddress.fromHex(\"0x1\"),\n new Identifier(\"string\"),\n new Identifier(\"String\"),\n []\n);\nfunction optionStructTag(typeArg) {\n return new StructTag(AccountAddress.fromHex(\"0x1\"), new Identifier(\"option\"), new Identifier(\"Option\"), [typeArg]);\n}\nfunction objectStructTag(typeArg) {\n return new StructTag(AccountAddress.fromHex(\"0x1\"), new Identifier(\"object\"), new Identifier(\"Object\"), [typeArg]);\n}\nfunction bail(message) {\n throw new TypeTagParserError(message);\n}\nfunction isWhiteSpace(c) {\n if (c.match(/\\s/)) {\n return true;\n }\n return false;\n}\nfunction isValidAlphabetic(c) {\n if (c.match(/[_A-Za-z0-9]/g)) {\n return true;\n }\n return false;\n}\nfunction isGeneric(c) {\n if (c.match(/T\\d+/g)) {\n return true;\n }\n return false;\n}\nfunction nextToken(tagStr, pos) {\n const c = tagStr[pos];\n if (c === \":\") {\n if (tagStr.slice(pos, pos + 2) === \"::\") {\n return [[\"COLON\", \"::\"], 2];\n }\n bail(\"Unrecognized token.\");\n } else if (c === \"<\") {\n return [[\"LT\", \"<\"], 1];\n } else if (c === \">\") {\n return [[\"GT\", \">\"], 1];\n } else if (c === \",\") {\n return [[\"COMMA\", \",\"], 1];\n } else if (isWhiteSpace(c)) {\n let res = \"\";\n for (let i = pos; i < tagStr.length; i += 1) {\n const char = tagStr[i];\n if (isWhiteSpace(char)) {\n res = `${res}${char}`;\n } else {\n break;\n }\n }\n return [[\"SPACE\", res], res.length];\n } else if (isValidAlphabetic(c)) {\n let res = \"\";\n for (let i = pos; i < tagStr.length; i += 1) {\n const char = tagStr[i];\n if (isValidAlphabetic(char)) {\n res = `${res}${char}`;\n } else {\n break;\n }\n }\n if (isGeneric(res)) {\n return [[\"GENERIC\", res], res.length];\n }\n return [[\"IDENT\", res], res.length];\n }\n throw new Error(\"Unrecognized token.\");\n}\nfunction tokenize(tagStr) {\n let pos = 0;\n const tokens = [];\n while (pos < tagStr.length) {\n const [token, size] = nextToken(tagStr, pos);\n if (token[0] !== \"SPACE\") {\n tokens.push(token);\n }\n pos += size;\n }\n return tokens;\n}\nvar TypeTagParser = class _TypeTagParser {\n constructor(tagStr, typeTags) {\n this.typeTags = [];\n this.tokens = tokenize(tagStr);\n this.typeTags = typeTags || [];\n }\n consume(targetToken) {\n const token = this.tokens.shift();\n if (!token || token[1] !== targetToken) {\n bail(\"Invalid type tag.\");\n }\n }\n /**\n * Consumes all of an unused generic field, mostly applicable to object\n *\n * Note: This is recursive. it can be problematic if there's bad input\n * @private\n */\n consumeWholeGeneric() {\n this.consume(\"<\");\n while (this.tokens[0][1] !== \">\") {\n if (this.tokens[0][1] === \"<\") {\n this.consumeWholeGeneric();\n } else {\n this.tokens.shift();\n }\n }\n this.consume(\">\");\n }\n parseCommaList(endToken, allowTraillingComma) {\n const res = [];\n if (this.tokens.length <= 0) {\n bail(\"Invalid type tag.\");\n }\n while (this.tokens[0][1] !== endToken) {\n res.push(this.parseTypeTag());\n if (this.tokens.length > 0 && this.tokens[0][1] === endToken) {\n break;\n }\n this.consume(\",\");\n if (this.tokens.length > 0 && this.tokens[0][1] === endToken && allowTraillingComma) {\n break;\n }\n if (this.tokens.length <= 0) {\n bail(\"Invalid type tag.\");\n }\n }\n return res;\n }\n parseTypeTag() {\n if (this.tokens.length === 0) {\n bail(\"Invalid type tag.\");\n }\n const [tokenTy, tokenVal] = this.tokens.shift();\n if (tokenVal === \"u8\") {\n return new TypeTagU8();\n }\n if (tokenVal === \"u16\") {\n return new TypeTagU16();\n }\n if (tokenVal === \"u32\") {\n return new TypeTagU32();\n }\n if (tokenVal === \"u64\") {\n return new TypeTagU64();\n }\n if (tokenVal === \"u128\") {\n return new TypeTagU128();\n }\n if (tokenVal === \"u256\") {\n return new TypeTagU256();\n }\n if (tokenVal === \"bool\") {\n return new TypeTagBool();\n }\n if (tokenVal === \"address\") {\n return new TypeTagAddress();\n }\n if (tokenVal === \"vector\") {\n this.consume(\"<\");\n const res = this.parseTypeTag();\n this.consume(\">\");\n return new TypeTagVector(res);\n }\n if (tokenVal === \"string\") {\n return new TypeTagStruct(stringStructTag);\n }\n if (tokenTy === \"IDENT\" && (tokenVal.startsWith(\"0x\") || tokenVal.startsWith(\"0X\"))) {\n const address = AccountAddress.fromHex(tokenVal);\n this.consume(\"::\");\n const [moduleTokenTy, module] = this.tokens.shift();\n if (moduleTokenTy !== \"IDENT\") {\n bail(\"Invalid type tag.\");\n }\n this.consume(\"::\");\n const [nameTokenTy, name] = this.tokens.shift();\n if (nameTokenTy !== \"IDENT\") {\n bail(\"Invalid type tag.\");\n }\n if (AccountAddress.CORE_CODE_ADDRESS.toHexString() === address.toHexString() && module === \"object\" && name === \"Object\") {\n this.consumeWholeGeneric();\n return new TypeTagAddress();\n }\n let tyTags = [];\n if (this.tokens.length > 0 && this.tokens[0][1] === \"<\") {\n this.consume(\"<\");\n tyTags = this.parseCommaList(\">\", true);\n this.consume(\">\");\n }\n const structTag = new StructTag(address, new Identifier(module), new Identifier(name), tyTags);\n return new TypeTagStruct(structTag);\n }\n if (tokenTy === \"GENERIC\") {\n if (this.typeTags.length === 0) {\n bail(\"Can't convert generic type since no typeTags were specified.\");\n }\n const idx = parseInt(tokenVal.substring(1), 10);\n return new _TypeTagParser(this.typeTags[idx]).parseTypeTag();\n }\n throw new Error(\"Invalid type tag.\");\n }\n};\nvar TypeTagParserError = class extends Error {\n constructor(message) {\n super(message);\n this.name = \"TypeTagParserError\";\n }\n};\n\n// src/aptos_types/transaction.ts\nvar RawTransaction = class _RawTransaction {\n /**\n * RawTransactions contain the metadata and payloads that can be submitted to Aptos chain for execution.\n * RawTransactions must be signed before Aptos chain can execute them.\n *\n * @param sender Account address of the sender.\n * @param sequence_number Sequence number of this transaction. This must match the sequence number stored in\n * the sender's account at the time the transaction executes.\n * @param payload Instructions for the Aptos Blockchain, including publishing a module,\n * execute a entry function or execute a script payload.\n * @param max_gas_amount Maximum total gas to spend for this transaction. The account must have more\n * than this gas or the transaction will be discarded during validation.\n * @param gas_unit_price Price to be paid per gas unit.\n * @param expiration_timestamp_secs The blockchain timestamp at which the blockchain would discard this transaction.\n * @param chain_id The chain ID of the blockchain that this transaction is intended to be run on.\n */\n constructor(sender, sequence_number, payload, max_gas_amount, gas_unit_price, expiration_timestamp_secs, chain_id) {\n this.sender = sender;\n this.sequence_number = sequence_number;\n this.payload = payload;\n this.max_gas_amount = max_gas_amount;\n this.gas_unit_price = gas_unit_price;\n this.expiration_timestamp_secs = expiration_timestamp_secs;\n this.chain_id = chain_id;\n }\n serialize(serializer) {\n this.sender.serialize(serializer);\n serializer.serializeU64(this.sequence_number);\n this.payload.serialize(serializer);\n serializer.serializeU64(this.max_gas_amount);\n serializer.serializeU64(this.gas_unit_price);\n serializer.serializeU64(this.expiration_timestamp_secs);\n this.chain_id.serialize(serializer);\n }\n static deserialize(deserializer) {\n const sender = AccountAddress.deserialize(deserializer);\n const sequence_number = deserializer.deserializeU64();\n const payload = TransactionPayload.deserialize(deserializer);\n const max_gas_amount = deserializer.deserializeU64();\n const gas_unit_price = deserializer.deserializeU64();\n const expiration_timestamp_secs = deserializer.deserializeU64();\n const chain_id = ChainId.deserialize(deserializer);\n return new _RawTransaction(\n sender,\n sequence_number,\n payload,\n max_gas_amount,\n gas_unit_price,\n expiration_timestamp_secs,\n chain_id\n );\n }\n};\nvar Script = class _Script {\n /**\n * Scripts contain the Move bytecodes payload that can be submitted to Aptos chain for execution.\n * @param code Move bytecode\n * @param ty_args Type arguments that bytecode requires.\n *\n * @example\n * A coin transfer function has one type argument \"CoinType\".\n * ```\n * public(script) fun transfer(from: &signer, to: address, amount: u64,)\n * ```\n * @param args Arugments to bytecode function.\n *\n * @example\n * A coin transfer function has three arugments \"from\", \"to\" and \"amount\".\n * ```\n * public(script) fun transfer(from: &signer, to: address, amount: u64,)\n * ```\n */\n constructor(code, ty_args, args) {\n this.code = code;\n this.ty_args = ty_args;\n this.args = args;\n }\n serialize(serializer) {\n serializer.serializeBytes(this.code);\n serializeVector(this.ty_args, serializer);\n serializeVector(this.args, serializer);\n }\n static deserialize(deserializer) {\n const code = deserializer.deserializeBytes();\n const ty_args = deserializeVector(deserializer, TypeTag);\n const args = deserializeVector(deserializer, TransactionArgument);\n return new _Script(code, ty_args, args);\n }\n};\nvar EntryFunction = class _EntryFunction {\n /**\n * Contains the payload to run a function within a module.\n * @param module_name Fully qualified module name. ModuleId consists of account address and module name.\n * @param function_name The function to run.\n * @param ty_args Type arguments that move function requires.\n *\n * @example\n * A coin transfer function has one type argument \"CoinType\".\n * ```\n * public(script) fun transfer(from: &signer, to: address, amount: u64,)\n * ```\n * @param args Arugments to the move function.\n *\n * @example\n * A coin transfer function has three arugments \"from\", \"to\" and \"amount\".\n * ```\n * public(script) fun transfer(from: &signer, to: address, amount: u64,)\n * ```\n */\n constructor(module_name, function_name, ty_args, args) {\n this.module_name = module_name;\n this.function_name = function_name;\n this.ty_args = ty_args;\n this.args = args;\n }\n /**\n *\n * @param module Fully qualified module name in format \"AccountAddress::module_name\" e.g. \"0x1::coin\"\n * @param func Function name\n * @param ty_args Type arguments that move function requires.\n *\n * @example\n * A coin transfer function has one type argument \"CoinType\".\n * ```\n * public(script) fun transfer(from: &signer, to: address, amount: u64,)\n * ```\n * @param args Arugments to the move function.\n *\n * @example\n * A coin transfer function has three arugments \"from\", \"to\" and \"amount\".\n * ```\n * public(script) fun transfer(from: &signer, to: address, amount: u64,)\n * ```\n * @returns\n */\n static natural(module, func, ty_args, args) {\n return new _EntryFunction(ModuleId.fromStr(module), new Identifier(func), ty_args, args);\n }\n /**\n * `natual` is deprecated, please use `natural`\n *\n * @deprecated.\n */\n static natual(module, func, ty_args, args) {\n return _EntryFunction.natural(module, func, ty_args, args);\n }\n serialize(serializer) {\n this.module_name.serialize(serializer);\n this.function_name.serialize(serializer);\n serializeVector(this.ty_args, serializer);\n serializer.serializeU32AsUleb128(this.args.length);\n this.args.forEach((item) => {\n serializer.serializeBytes(item);\n });\n }\n static deserialize(deserializer) {\n const module_name = ModuleId.deserialize(deserializer);\n const function_name = Identifier.deserialize(deserializer);\n const ty_args = deserializeVector(deserializer, TypeTag);\n const length = deserializer.deserializeUleb128AsU32();\n const list = [];\n for (let i = 0; i < length; i += 1) {\n list.push(deserializer.deserializeBytes());\n }\n const args = list;\n return new _EntryFunction(module_name, function_name, ty_args, args);\n }\n};\nvar MultiSigTransactionPayload = class _MultiSigTransactionPayload {\n /**\n * Contains the payload to run a multisig account transaction.\n * @param transaction_payload The payload of the multisig transaction. This can only be EntryFunction for now but\n * Script might be supported in the future.\n */\n constructor(transaction_payload) {\n this.transaction_payload = transaction_payload;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n this.transaction_payload.serialize(serializer);\n }\n static deserialize(deserializer) {\n deserializer.deserializeUleb128AsU32();\n return new _MultiSigTransactionPayload(EntryFunction.deserialize(deserializer));\n }\n};\nvar MultiSig = class _MultiSig {\n /**\n * Contains the payload to run a multisig account transaction.\n * @param multisig_address The multisig account address the transaction will be executed as.\n * @param transaction_payload The payload of the multisig transaction. This is optional when executing a multisig\n * transaction whose payload is already stored on chain.\n */\n constructor(multisig_address, transaction_payload) {\n this.multisig_address = multisig_address;\n this.transaction_payload = transaction_payload;\n }\n serialize(serializer) {\n this.multisig_address.serialize(serializer);\n if (this.transaction_payload === void 0) {\n serializer.serializeBool(false);\n } else {\n serializer.serializeBool(true);\n this.transaction_payload.serialize(serializer);\n }\n }\n static deserialize(deserializer) {\n const multisig_address = AccountAddress.deserialize(deserializer);\n const payloadPresent = deserializer.deserializeBool();\n let transaction_payload;\n if (payloadPresent) {\n transaction_payload = MultiSigTransactionPayload.deserialize(deserializer);\n }\n return new _MultiSig(multisig_address, transaction_payload);\n }\n};\nvar Module = class _Module {\n /**\n * Contains the bytecode of a Move module that can be published to the Aptos chain.\n * @param code Move bytecode of a module.\n */\n constructor(code) {\n this.code = code;\n }\n serialize(serializer) {\n serializer.serializeBytes(this.code);\n }\n static deserialize(deserializer) {\n const code = deserializer.deserializeBytes();\n return new _Module(code);\n }\n};\nvar ModuleId = class _ModuleId {\n /**\n * Full name of a module.\n * @param address The account address.\n * @param name The name of the module under the account at \"address\".\n */\n constructor(address, name) {\n this.address = address;\n this.name = name;\n }\n /**\n * Converts a string literal to a ModuleId\n * @param moduleId String literal in format \"AccountAddress::module_name\", e.g. \"0x1::coin\"\n * @returns\n */\n static fromStr(moduleId) {\n const parts = moduleId.split(\"::\");\n if (parts.length !== 2) {\n throw new Error(\"Invalid module id.\");\n }\n return new _ModuleId(AccountAddress.fromHex(new HexString(parts[0])), new Identifier(parts[1]));\n }\n serialize(serializer) {\n this.address.serialize(serializer);\n this.name.serialize(serializer);\n }\n static deserialize(deserializer) {\n const address = AccountAddress.deserialize(deserializer);\n const name = Identifier.deserialize(deserializer);\n return new _ModuleId(address, name);\n }\n};\nvar ChangeSet = class {\n serialize(serializer) {\n throw new Error(\"Not implemented.\");\n }\n static deserialize(deserializer) {\n throw new Error(\"Not implemented.\");\n }\n};\nvar WriteSet = class {\n serialize(serializer) {\n throw new Error(\"Not implmented.\");\n }\n static deserialize(deserializer) {\n throw new Error(\"Not implmented.\");\n }\n};\nvar SignedTransaction = class _SignedTransaction {\n /**\n * A SignedTransaction consists of a raw transaction and an authenticator. The authenticator\n * contains a client's public key and the signature of the raw transaction.\n *\n * @see {@link https://aptos.dev/guides/creating-a-signed-transaction/ | Creating a Signed Transaction}\n *\n * @param raw_txn\n * @param authenticator Contains a client's public key and the signature of the raw transaction.\n * Authenticator has 3 flavors: single signature, multi-signature and multi-agent.\n * @see authenticator.ts for details.\n */\n constructor(raw_txn, authenticator) {\n this.raw_txn = raw_txn;\n this.authenticator = authenticator;\n }\n serialize(serializer) {\n this.raw_txn.serialize(serializer);\n this.authenticator.serialize(serializer);\n }\n static deserialize(deserializer) {\n const raw_txn = RawTransaction.deserialize(deserializer);\n const authenticator = TransactionAuthenticator.deserialize(deserializer);\n return new _SignedTransaction(raw_txn, authenticator);\n }\n};\nvar RawTransactionWithData = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return MultiAgentRawTransaction.load(deserializer);\n case 1:\n return FeePayerRawTransaction.load(deserializer);\n default:\n throw new Error(`Unknown variant index for RawTransactionWithData: ${index}`);\n }\n }\n};\nvar MultiAgentRawTransaction = class _MultiAgentRawTransaction extends RawTransactionWithData {\n constructor(raw_txn, secondary_signer_addresses) {\n super();\n this.raw_txn = raw_txn;\n this.secondary_signer_addresses = secondary_signer_addresses;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n this.raw_txn.serialize(serializer);\n serializeVector(this.secondary_signer_addresses, serializer);\n }\n static load(deserializer) {\n const rawTxn = RawTransaction.deserialize(deserializer);\n const secondarySignerAddresses = deserializeVector(deserializer, AccountAddress);\n return new _MultiAgentRawTransaction(rawTxn, secondarySignerAddresses);\n }\n};\nvar FeePayerRawTransaction = class _FeePayerRawTransaction extends RawTransactionWithData {\n constructor(raw_txn, secondary_signer_addresses, fee_payer_address) {\n super();\n this.raw_txn = raw_txn;\n this.secondary_signer_addresses = secondary_signer_addresses;\n this.fee_payer_address = fee_payer_address;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(1);\n this.raw_txn.serialize(serializer);\n serializeVector(this.secondary_signer_addresses, serializer);\n this.fee_payer_address.serialize(serializer);\n }\n static load(deserializer) {\n const rawTxn = RawTransaction.deserialize(deserializer);\n const secondarySignerAddresses = deserializeVector(deserializer, AccountAddress);\n const feePayerAddress = AccountAddress.deserialize(deserializer);\n return new _FeePayerRawTransaction(rawTxn, secondarySignerAddresses, feePayerAddress);\n }\n};\nvar TransactionPayload = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return TransactionPayloadScript.load(deserializer);\n case 2:\n return TransactionPayloadEntryFunction.load(deserializer);\n case 3:\n return TransactionPayloadMultisig.load(deserializer);\n default:\n throw new Error(`Unknown variant index for TransactionPayload: ${index}`);\n }\n }\n};\nvar TransactionPayloadScript = class _TransactionPayloadScript extends TransactionPayload {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n const value = Script.deserialize(deserializer);\n return new _TransactionPayloadScript(value);\n }\n};\nvar TransactionPayloadEntryFunction = class _TransactionPayloadEntryFunction extends TransactionPayload {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(2);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n const value = EntryFunction.deserialize(deserializer);\n return new _TransactionPayloadEntryFunction(value);\n }\n};\nvar TransactionPayloadMultisig = class _TransactionPayloadMultisig extends TransactionPayload {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(3);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n const value = MultiSig.deserialize(deserializer);\n return new _TransactionPayloadMultisig(value);\n }\n};\nvar ChainId = class _ChainId {\n constructor(value) {\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU8(this.value);\n }\n static deserialize(deserializer) {\n const value = deserializer.deserializeU8();\n return new _ChainId(value);\n }\n};\nvar TransactionArgument = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return TransactionArgumentU8.load(deserializer);\n case 1:\n return TransactionArgumentU64.load(deserializer);\n case 2:\n return TransactionArgumentU128.load(deserializer);\n case 3:\n return TransactionArgumentAddress.load(deserializer);\n case 4:\n return TransactionArgumentU8Vector.load(deserializer);\n case 5:\n return TransactionArgumentBool.load(deserializer);\n case 6:\n return TransactionArgumentU16.load(deserializer);\n case 7:\n return TransactionArgumentU32.load(deserializer);\n case 8:\n return TransactionArgumentU256.load(deserializer);\n default:\n throw new Error(`Unknown variant index for TransactionArgument: ${index}`);\n }\n }\n};\nvar TransactionArgumentU8 = class _TransactionArgumentU8 extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n serializer.serializeU8(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeU8();\n return new _TransactionArgumentU8(value);\n }\n};\nvar TransactionArgumentU16 = class _TransactionArgumentU16 extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(6);\n serializer.serializeU16(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeU16();\n return new _TransactionArgumentU16(value);\n }\n};\nvar TransactionArgumentU32 = class _TransactionArgumentU32 extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(7);\n serializer.serializeU32(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeU32();\n return new _TransactionArgumentU32(value);\n }\n};\nvar TransactionArgumentU64 = class _TransactionArgumentU64 extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(1);\n serializer.serializeU64(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeU64();\n return new _TransactionArgumentU64(value);\n }\n};\nvar TransactionArgumentU128 = class _TransactionArgumentU128 extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(2);\n serializer.serializeU128(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeU128();\n return new _TransactionArgumentU128(value);\n }\n};\nvar TransactionArgumentU256 = class _TransactionArgumentU256 extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(8);\n serializer.serializeU256(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeU256();\n return new _TransactionArgumentU256(value);\n }\n};\nvar TransactionArgumentAddress = class _TransactionArgumentAddress extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(3);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n const value = AccountAddress.deserialize(deserializer);\n return new _TransactionArgumentAddress(value);\n }\n};\nvar TransactionArgumentU8Vector = class _TransactionArgumentU8Vector extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(4);\n serializer.serializeBytes(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeBytes();\n return new _TransactionArgumentU8Vector(value);\n }\n};\nvar TransactionArgumentBool = class _TransactionArgumentBool extends TransactionArgument {\n constructor(value) {\n super();\n this.value = value;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(5);\n serializer.serializeBool(this.value);\n }\n static load(deserializer) {\n const value = deserializer.deserializeBool();\n return new _TransactionArgumentBool(value);\n }\n};\nvar Transaction = class {\n getHashSalt() {\n const hash = sha3Hash.create();\n hash.update(\"APTOS::Transaction\");\n return hash.digest();\n }\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return UserTransaction.load(deserializer);\n default:\n throw new Error(`Unknown variant index for Transaction: ${index}`);\n }\n }\n};\nvar UserTransaction = class _UserTransaction extends Transaction {\n constructor(value) {\n super();\n this.value = value;\n }\n hash() {\n const hash = sha3Hash.create();\n hash.update(this.getHashSalt());\n hash.update(bcsToBytes(this));\n return hash.digest();\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n this.value.serialize(serializer);\n }\n static load(deserializer) {\n return new _UserTransaction(SignedTransaction.deserialize(deserializer));\n }\n};\n\n// src/aptos_types/abi.ts\nvar TypeArgumentABI = class _TypeArgumentABI {\n /**\n * Constructs a TypeArgumentABI instance.\n * @param name\n */\n constructor(name) {\n this.name = name;\n }\n serialize(serializer) {\n serializer.serializeStr(this.name);\n }\n static deserialize(deserializer) {\n const name = deserializer.deserializeStr();\n return new _TypeArgumentABI(name);\n }\n};\nvar ArgumentABI = class _ArgumentABI {\n /**\n * Constructs an ArgumentABI instance.\n * @param name\n * @param type_tag\n */\n constructor(name, type_tag) {\n this.name = name;\n this.type_tag = type_tag;\n }\n serialize(serializer) {\n serializer.serializeStr(this.name);\n this.type_tag.serialize(serializer);\n }\n static deserialize(deserializer) {\n const name = deserializer.deserializeStr();\n const typeTag = TypeTag.deserialize(deserializer);\n return new _ArgumentABI(name, typeTag);\n }\n};\nvar ScriptABI = class {\n static deserialize(deserializer) {\n const index = deserializer.deserializeUleb128AsU32();\n switch (index) {\n case 0:\n return TransactionScriptABI.load(deserializer);\n case 1:\n return EntryFunctionABI.load(deserializer);\n default:\n throw new Error(`Unknown variant index for TransactionPayload: ${index}`);\n }\n }\n};\nvar TransactionScriptABI = class _TransactionScriptABI extends ScriptABI {\n /**\n * Constructs a TransactionScriptABI instance.\n * @param name Entry function name\n * @param doc\n * @param code\n * @param ty_args\n * @param args\n */\n constructor(name, doc, code, ty_args, args) {\n super();\n this.name = name;\n this.doc = doc;\n this.code = code;\n this.ty_args = ty_args;\n this.args = args;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(0);\n serializer.serializeStr(this.name);\n serializer.serializeStr(this.doc);\n serializer.serializeBytes(this.code);\n serializeVector(this.ty_args, serializer);\n serializeVector(this.args, serializer);\n }\n static load(deserializer) {\n const name = deserializer.deserializeStr();\n const doc = deserializer.deserializeStr();\n const code = deserializer.deserializeBytes();\n const tyArgs = deserializeVector(deserializer, TypeArgumentABI);\n const args = deserializeVector(deserializer, ArgumentABI);\n return new _TransactionScriptABI(name, doc, code, tyArgs, args);\n }\n};\nvar EntryFunctionABI = class _EntryFunctionABI extends ScriptABI {\n /**\n * Constructs a EntryFunctionABI instance\n * @param name\n * @param module_name Fully qualified module id\n * @param doc\n * @param ty_args\n * @param args\n */\n constructor(name, module_name, doc, ty_args, args) {\n super();\n this.name = name;\n this.module_name = module_name;\n this.doc = doc;\n this.ty_args = ty_args;\n this.args = args;\n }\n serialize(serializer) {\n serializer.serializeU32AsUleb128(1);\n serializer.serializeStr(this.name);\n this.module_name.serialize(serializer);\n serializer.serializeStr(this.doc);\n serializeVector(this.ty_args, serializer);\n serializeVector(this.args, serializer);\n }\n static load(deserializer) {\n const name = deserializer.deserializeStr();\n const moduleName = ModuleId.deserialize(deserializer);\n const doc = deserializer.deserializeStr();\n const tyArgs = deserializeVector(deserializer, TypeArgumentABI);\n const args = deserializeVector(deserializer, ArgumentABI);\n return new _EntryFunctionABI(name, moduleName, doc, tyArgs, args);\n }\n};\n\n// src/aptos_types/authentication_key.ts\nimport { sha3_256 as sha3Hash2 } from \"@noble/hashes/sha3\";\nvar _AuthenticationKey = class _AuthenticationKey {\n constructor(bytes) {\n if (bytes.length !== _AuthenticationKey.LENGTH) {\n throw new Error(\"Expected a byte array of length 32\");\n }\n this.bytes = bytes;\n }\n /**\n * Converts a K-of-N MultiEd25519PublicKey to AuthenticationKey with:\n * `auth_key = sha3-256(p_1 | … | p_n | K | 0x01)`. `K` represents the K-of-N required for\n * authenticating the transaction. `0x01` is the 1-byte scheme for multisig.\n */\n static fromMultiEd25519PublicKey(publicKey) {\n const pubKeyBytes = publicKey.toBytes();\n const bytes = new Uint8Array(pubKeyBytes.length + 1);\n bytes.set(pubKeyBytes);\n bytes.set([_AuthenticationKey.MULTI_ED25519_SCHEME], pubKeyBytes.length);\n const hash = sha3Hash2.create();\n hash.update(bytes);\n return new _AuthenticationKey(hash.digest());\n }\n static fromEd25519PublicKey(publicKey) {\n const pubKeyBytes = publicKey.value;\n const bytes = new Uint8Array(pubKeyBytes.length + 1);\n bytes.set(pubKeyBytes);\n bytes.set([_AuthenticationKey.ED25519_SCHEME], pubKeyBytes.length);\n const hash = sha3Hash2.create();\n hash.update(bytes);\n return new _AuthenticationKey(hash.digest());\n }\n /**\n * Derives an account address from AuthenticationKey. Since current AccountAddress is 32 bytes,\n * AuthenticationKey bytes are directly translated to AccountAddress.\n */\n derivedAddress() {\n return HexString.fromUint8Array(this.bytes);\n }\n};\n_AuthenticationKey.LENGTH = 32;\n_AuthenticationKey.MULTI_ED25519_SCHEME = 1;\n_AuthenticationKey.ED25519_SCHEME = 0;\n_AuthenticationKey.DERIVE_RESOURCE_ACCOUNT_SCHEME = 255;\nvar AuthenticationKey = _AuthenticationKey;\n\n// src/aptos_types/rotation_proof_challenge.ts\nvar RotationProofChallenge = class {\n constructor(accountAddress, moduleName, structName, sequenceNumber, originator, currentAuthKey, newPublicKey) {\n this.accountAddress = accountAddress;\n this.moduleName = moduleName;\n this.structName = structName;\n this.sequenceNumber = sequenceNumber;\n this.originator = originator;\n this.currentAuthKey = currentAuthKey;\n this.newPublicKey = newPublicKey;\n }\n serialize(serializer) {\n this.accountAddress.serialize(serializer);\n serializer.serializeStr(this.moduleName);\n serializer.serializeStr(this.structName);\n serializer.serializeU64(this.sequenceNumber);\n this.originator.serialize(serializer);\n this.currentAuthKey.serialize(serializer);\n serializer.serializeBytes(this.newPublicKey);\n }\n};\n\n// src/account/aptos_account.ts\nvar _AptosAccount = class _AptosAccount {\n static fromAptosAccountObject(obj) {\n return new _AptosAccount(HexString.ensure(obj.privateKeyHex).toUint8Array(), obj.address);\n }\n /**\n * Check's if the derive path is valid\n */\n static isValidPath(path) {\n return /^m\\/44'\\/637'\\/[0-9]+'\\/[0-9]+'\\/[0-9]+'+$/.test(path);\n }\n /**\n * Creates new account with bip44 path and mnemonics,\n * @param path. (e.g. m/44'/637'/0'/0'/0')\n * Detailed description: {@link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki}\n * @param mnemonics.\n * @returns AptosAccount\n */\n static fromDerivePath(path, mnemonics) {\n if (!_AptosAccount.isValidPath(path)) {\n throw new Error(\"Invalid derivation path\");\n }\n const normalizeMnemonics = mnemonics.trim().split(/\\s+/).map((part) => part.toLowerCase()).join(\" \");\n const { key } = derivePath(path, bytesToHex2(bip39.mnemonicToSeedSync(normalizeMnemonics)));\n return new _AptosAccount(key);\n }\n /**\n * Creates new account instance. Constructor allows passing in an address,\n * to handle account key rotation, where auth_key != public_key\n * @param privateKeyBytes Private key from which account key pair will be generated.\n * If not specified, new key pair is going to be created.\n * @param address Account address (e.g. 0xe8012714cd17606cee7188a2a365eef3fe760be598750678c8c5954eb548a591).\n * If not specified, a new one will be generated from public key\n */\n constructor(privateKeyBytes, address) {\n if (privateKeyBytes) {\n this.signingKey = nacl2.sign.keyPair.fromSeed(privateKeyBytes.slice(0, 32));\n } else {\n this.signingKey = nacl2.sign.keyPair();\n }\n this.accountAddress = HexString.ensure(address || this.authKey().hex());\n }\n /**\n * This is the key by which Aptos account is referenced.\n * It is the 32-byte of the SHA-3 256 cryptographic hash\n * of the public key(s) concatenated with a signature scheme identifier byte\n * @returns Address associated with the given account\n */\n address() {\n return this.accountAddress;\n }\n authKey() {\n const pubKey = new Ed25519PublicKey(this.signingKey.publicKey);\n const authKey = AuthenticationKey.fromEd25519PublicKey(pubKey);\n return authKey.derivedAddress();\n }\n /**\n * Takes source address and seeds and returns the resource account address\n * @param sourceAddress Address used to derive the resource account\n * @param seed The seed bytes\n * @returns The resource account address\n */\n static getResourceAccountAddress(sourceAddress, seed) {\n const source = bcsToBytes(AccountAddress.fromHex(sourceAddress));\n const bytes = new Uint8Array([...source, ...seed, AuthenticationKey.DERIVE_RESOURCE_ACCOUNT_SCHEME]);\n const hash = sha3Hash3.create();\n hash.update(bytes);\n return HexString.fromUint8Array(hash.digest());\n }\n /**\n * Takes creator address and collection name and returns the collection id hash.\n * Collection id hash are generated as sha256 hash of (`creator_address::collection_name`)\n *\n * @param creatorAddress Collection creator address\n * @param collectionName The collection name\n * @returns The collection id hash\n */\n static getCollectionID(creatorAddress, collectionName) {\n const seed = new TextEncoder().encode(`${creatorAddress}::${collectionName}`);\n const hash = sha256.create();\n hash.update(seed);\n return HexString.fromUint8Array(hash.digest());\n }\n /**\n * This key is generated with Ed25519 scheme.\n * Public key is used to check a signature of transaction, signed by given account\n * @returns The public key for the associated account\n */\n pubKey() {\n return HexString.fromUint8Array(this.signingKey.publicKey);\n }\n /**\n * Signs specified `buffer` with account's private key\n * @param buffer A buffer to sign\n * @returns A signature HexString\n */\n signBuffer(buffer) {\n const signature = nacl2.sign.detached(buffer, this.signingKey.secretKey);\n return HexString.fromUint8Array(signature);\n }\n /**\n * Signs specified `hexString` with account's private key\n * @param hexString A regular string or HexString to sign\n * @returns A signature HexString\n */\n signHexString(hexString) {\n const toSign = HexString.ensure(hexString).toUint8Array();\n return this.signBuffer(toSign);\n }\n /**\n * Verifies the signature of the message with the public key of the account\n * @param message a signed message\n * @param signature the signature of the message\n */\n verifySignature(message, signature) {\n const rawMessage = HexString.ensure(message).toUint8Array();\n const rawSignature = HexString.ensure(signature).toUint8Array();\n return nacl2.sign.detached.verify(rawMessage, rawSignature, this.signingKey.publicKey);\n }\n /**\n * Derives account address, public key and private key\n * @returns AptosAccountObject instance.\n * @example An example of the returned AptosAccountObject object\n * ```\n * {\n * address: \"0xe8012714cd17606cee7188a2a365eef3fe760be598750678c8c5954eb548a591\",\n * publicKeyHex: \"0xf56d8524faf79fbc0f48c13aeed3b0ce5dd376b4db93b8130a107c0a5e04ba04\",\n * privateKeyHex: `0x009c9f7c992a06cfafe916f125d8adb7a395fca243e264a8e56a4b3e6accf940\n * d2b11e9ece3049ce60e3c7b4a1c58aebfa9298e29a30a58a67f1998646135204`\n * }\n * ```\n */\n toPrivateKeyObject() {\n return {\n address: this.address().hex(),\n publicKeyHex: this.pubKey().hex(),\n privateKeyHex: HexString.fromUint8Array(this.signingKey.secretKey.slice(0, 32)).hex()\n };\n }\n};\n__decorateClass([\n Memoize()\n], _AptosAccount.prototype, \"authKey\", 1);\nvar AptosAccount = _AptosAccount;\nfunction getAddressFromAccountOrAddress(accountOrAddress) {\n return accountOrAddress instanceof AptosAccount ? accountOrAddress.address() : HexString.ensure(accountOrAddress);\n}\n\n// src/indexer/generated/queries.ts\nvar CurrentTokenOwnershipFieldsFragmentDoc = `\n fragment CurrentTokenOwnershipFields on current_token_ownerships_v2 {\n token_standard\n token_properties_mutated_v1\n token_data_id\n table_type_v1\n storage_id\n property_version_v1\n owner_address\n last_transaction_version\n last_transaction_timestamp\n is_soulbound_v2\n is_fungible_v2\n amount\n current_token_data {\n collection_id\n description\n is_fungible_v2\n largest_property_version_v1\n last_transaction_timestamp\n last_transaction_version\n maximum\n supply\n token_data_id\n token_name\n token_properties\n token_standard\n token_uri\n current_collection {\n collection_id\n collection_name\n creator_address\n current_supply\n description\n last_transaction_timestamp\n last_transaction_version\n max_supply\n mutable_description\n mutable_uri\n table_handle_v1\n token_standard\n total_minted_v2\n uri\n }\n }\n}\n `;\nvar TokenDataFieldsFragmentDoc = `\n fragment TokenDataFields on current_token_datas {\n creator_address\n collection_name\n description\n metadata_uri\n name\n token_data_id_hash\n collection_data_id_hash\n}\n `;\nvar CollectionDataFieldsFragmentDoc = `\n fragment CollectionDataFields on current_collection_datas {\n metadata_uri\n supply\n description\n collection_name\n collection_data_id_hash\n table_handle\n creator_address\n}\n `;\nvar TokenActivitiesFieldsFragmentDoc = `\n fragment TokenActivitiesFields on token_activities_v2 {\n after_value\n before_value\n entry_function_id_str\n event_account_address\n event_index\n from_address\n is_fungible_v2\n property_version_v1\n to_address\n token_amount\n token_data_id\n token_standard\n transaction_timestamp\n transaction_version\n type\n}\n `;\nvar GetAccountCoinsDataCount = `\n query getAccountCoinsDataCount($address: String) {\n current_fungible_asset_balances_aggregate(\n where: {owner_address: {_eq: $address}}\n ) {\n aggregate {\n count\n }\n }\n}\n `;\nvar GetAccountCoinsData = `\n query getAccountCoinsData($where_condition: current_fungible_asset_balances_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_fungible_asset_balances_order_by!]) {\n current_fungible_asset_balances(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n amount\n asset_type\n is_frozen\n is_primary\n last_transaction_timestamp\n last_transaction_version\n owner_address\n storage_id\n token_standard\n metadata {\n token_standard\n symbol\n supply_aggregator_table_key_v1\n supply_aggregator_table_handle_v1\n project_uri\n name\n last_transaction_version\n last_transaction_timestamp\n icon_uri\n decimals\n creator_address\n asset_type\n }\n }\n}\n `;\nvar GetAccountCurrentTokens = `\n query getAccountCurrentTokens($address: String!, $offset: Int, $limit: Int) {\n current_token_ownerships(\n where: {owner_address: {_eq: $address}, amount: {_gt: 0}}\n order_by: [{last_transaction_version: desc}, {creator_address: asc}, {collection_name: asc}, {name: asc}]\n offset: $offset\n limit: $limit\n ) {\n amount\n current_token_data {\n ...TokenDataFields\n }\n current_collection_data {\n ...CollectionDataFields\n }\n last_transaction_version\n property_version\n }\n}\n ${TokenDataFieldsFragmentDoc}\n${CollectionDataFieldsFragmentDoc}`;\nvar GetAccountTokensCount = `\n query getAccountTokensCount($where_condition: current_token_ownerships_v2_bool_exp, $offset: Int, $limit: Int) {\n current_token_ownerships_v2_aggregate(\n where: $where_condition\n offset: $offset\n limit: $limit\n ) {\n aggregate {\n count\n }\n }\n}\n `;\nvar GetAccountTransactionsCount = `\n query getAccountTransactionsCount($address: String) {\n account_transactions_aggregate(where: {account_address: {_eq: $address}}) {\n aggregate {\n count\n }\n }\n}\n `;\nvar GetAccountTransactionsData = `\n query getAccountTransactionsData($where_condition: account_transactions_bool_exp!, $offset: Int, $limit: Int, $order_by: [account_transactions_order_by!]) {\n account_transactions(\n where: $where_condition\n order_by: $order_by\n limit: $limit\n offset: $offset\n ) {\n token_activities_v2 {\n ...TokenActivitiesFields\n }\n transaction_version\n account_address\n }\n}\n ${TokenActivitiesFieldsFragmentDoc}`;\nvar GetCollectionData = `\n query getCollectionData($where_condition: current_collections_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_collections_v2_order_by!]) {\n current_collections_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n collection_id\n collection_name\n creator_address\n current_supply\n description\n last_transaction_timestamp\n last_transaction_version\n max_supply\n mutable_description\n mutable_uri\n table_handle_v1\n token_standard\n total_minted_v2\n uri\n }\n}\n `;\nvar GetCollectionsWithOwnedTokens = `\n query getCollectionsWithOwnedTokens($where_condition: current_collection_ownership_v2_view_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_collection_ownership_v2_view_order_by!]) {\n current_collection_ownership_v2_view(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n current_collection {\n collection_id\n collection_name\n creator_address\n current_supply\n description\n last_transaction_timestamp\n last_transaction_version\n mutable_description\n max_supply\n mutable_uri\n table_handle_v1\n token_standard\n total_minted_v2\n uri\n }\n collection_id\n collection_name\n collection_uri\n creator_address\n distinct_tokens\n last_transaction_version\n owner_address\n single_token_uri\n }\n}\n `;\nvar GetCurrentObjects = `\n query getCurrentObjects($where_condition: current_objects_bool_exp, $offset: Int, $limit: Int, $order_by: [current_objects_order_by!]) {\n current_objects(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n allow_ungated_transfer\n state_key_hash\n owner_address\n object_address\n last_transaction_version\n last_guid_creation_num\n is_deleted\n }\n}\n `;\nvar GetDelegatedStakingActivities = `\n query getDelegatedStakingActivities($delegatorAddress: String, $poolAddress: String) {\n delegated_staking_activities(\n where: {delegator_address: {_eq: $delegatorAddress}, pool_address: {_eq: $poolAddress}}\n ) {\n amount\n delegator_address\n event_index\n event_type\n pool_address\n transaction_version\n }\n}\n `;\nvar GetIndexerLedgerInfo = `\n query getIndexerLedgerInfo {\n ledger_infos {\n chain_id\n }\n}\n `;\nvar GetNumberOfDelegators = `\n query getNumberOfDelegators($poolAddress: String) {\n num_active_delegator_per_pool(\n where: {pool_address: {_eq: $poolAddress}, num_active_delegator: {_gt: \"0\"}}\n distinct_on: pool_address\n ) {\n num_active_delegator\n pool_address\n }\n}\n `;\nvar GetOwnedTokens = `\n query getOwnedTokens($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) {\n current_token_ownerships_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n ...CurrentTokenOwnershipFields\n }\n}\n ${CurrentTokenOwnershipFieldsFragmentDoc}`;\nvar GetOwnedTokensByTokenData = `\n query getOwnedTokensByTokenData($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) {\n current_token_ownerships_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n ...CurrentTokenOwnershipFields\n }\n}\n ${CurrentTokenOwnershipFieldsFragmentDoc}`;\nvar GetTokenActivities = `\n query getTokenActivities($where_condition: token_activities_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [token_activities_v2_order_by!]) {\n token_activities_v2(\n where: $where_condition\n order_by: $order_by\n offset: $offset\n limit: $limit\n ) {\n ...TokenActivitiesFields\n }\n}\n ${TokenActivitiesFieldsFragmentDoc}`;\nvar GetTokenActivitiesCount = `\n query getTokenActivitiesCount($token_id: String) {\n token_activities_v2_aggregate(where: {token_data_id: {_eq: $token_id}}) {\n aggregate {\n count\n }\n }\n}\n `;\nvar GetTokenCurrentOwnerData = `\n query getTokenCurrentOwnerData($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) {\n current_token_ownerships_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n ...CurrentTokenOwnershipFields\n }\n}\n ${CurrentTokenOwnershipFieldsFragmentDoc}`;\nvar GetTokenData = `\n query getTokenData($where_condition: current_token_datas_v2_bool_exp, $offset: Int, $limit: Int, $order_by: [current_token_datas_v2_order_by!]) {\n current_token_datas_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n collection_id\n description\n is_fungible_v2\n largest_property_version_v1\n last_transaction_timestamp\n last_transaction_version\n maximum\n supply\n token_data_id\n token_name\n token_properties\n token_standard\n token_uri\n current_collection {\n collection_id\n collection_name\n creator_address\n current_supply\n description\n last_transaction_timestamp\n last_transaction_version\n max_supply\n mutable_description\n mutable_uri\n table_handle_v1\n token_standard\n total_minted_v2\n uri\n }\n }\n}\n `;\nvar GetTokenOwnedFromCollection = `\n query getTokenOwnedFromCollection($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) {\n current_token_ownerships_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n ...CurrentTokenOwnershipFields\n }\n}\n ${CurrentTokenOwnershipFieldsFragmentDoc}`;\nvar GetTokenOwnersData = `\n query getTokenOwnersData($where_condition: current_token_ownerships_v2_bool_exp!, $offset: Int, $limit: Int, $order_by: [current_token_ownerships_v2_order_by!]) {\n current_token_ownerships_v2(\n where: $where_condition\n offset: $offset\n limit: $limit\n order_by: $order_by\n ) {\n ...CurrentTokenOwnershipFields\n }\n}\n ${CurrentTokenOwnershipFieldsFragmentDoc}`;\nvar GetTopUserTransactions = `\n query getTopUserTransactions($limit: Int) {\n user_transactions(limit: $limit, order_by: {version: desc}) {\n version\n }\n}\n `;\nvar GetUserTransactions = `\n query getUserTransactions($where_condition: user_transactions_bool_exp!, $offset: Int, $limit: Int, $order_by: [user_transactions_order_by!]) {\n user_transactions(\n order_by: $order_by\n where: $where_condition\n limit: $limit\n offset: $offset\n ) {\n version\n }\n}\n `;\n\n// src/transaction_builder/builder.ts\nimport { sha3_256 as sha3Hash4 } from \"@noble/hashes/sha3\";\n\n// src/transaction_builder/builder_utils.ts\nfunction assertType(val, types, message) {\n if (!(types == null ? void 0 : types.includes(typeof val))) {\n throw new Error(\n message || `Invalid arg: ${val} type should be ${types instanceof Array ? types.join(\" or \") : types}`\n );\n }\n}\nfunction ensureBoolean(val) {\n assertType(val, [\"boolean\", \"string\"]);\n if (typeof val === \"boolean\") {\n return val;\n }\n if (val === \"true\") {\n return true;\n }\n if (val === \"false\") {\n return false;\n }\n throw new Error(\"Invalid boolean string.\");\n}\nfunction ensureNumber(val) {\n assertType(val, [\"number\", \"string\"]);\n if (typeof val === \"number\") {\n return val;\n }\n const res = Number.parseInt(val, 10);\n if (Number.isNaN(res)) {\n throw new Error(\"Invalid number string.\");\n }\n return res;\n}\nfunction ensureBigInt(val) {\n assertType(val, [\"number\", \"bigint\", \"string\"]);\n return BigInt(val);\n}\nfunction serializeArg(argVal, argType, serializer) {\n serializeArgInner(argVal, argType, serializer, 0);\n}\nfunction serializeArgInner(argVal, argType, serializer, depth) {\n if (argType instanceof TypeTagBool) {\n serializer.serializeBool(ensureBoolean(argVal));\n } else if (argType instanceof TypeTagU8) {\n serializer.serializeU8(ensureNumber(argVal));\n } else if (argType instanceof TypeTagU16) {\n serializer.serializeU16(ensureNumber(argVal));\n } else if (argType instanceof TypeTagU32) {\n serializer.serializeU32(ensureNumber(argVal));\n } else if (argType instanceof TypeTagU64) {\n serializer.serializeU64(ensureBigInt(argVal));\n } else if (argType instanceof TypeTagU128) {\n serializer.serializeU128(ensureBigInt(argVal));\n } else if (argType instanceof TypeTagU256) {\n serializer.serializeU256(ensureBigInt(argVal));\n } else if (argType instanceof TypeTagAddress) {\n serializeAddress(argVal, serializer);\n } else if (argType instanceof TypeTagVector) {\n serializeVector2(argVal, argType, serializer, depth);\n } else if (argType instanceof TypeTagStruct) {\n serializeStruct(argVal, argType, serializer, depth);\n } else {\n throw new Error(\"Unsupported arg type.\");\n }\n}\nfunction serializeAddress(argVal, serializer) {\n let addr;\n if (typeof argVal === \"string\" || argVal instanceof HexString) {\n addr = AccountAddress.fromHex(argVal);\n } else if (argVal instanceof AccountAddress) {\n addr = argVal;\n } else {\n throw new Error(\"Invalid account address.\");\n }\n addr.serialize(serializer);\n}\nfunction serializeVector2(argVal, argType, serializer, depth) {\n if (argType.value instanceof TypeTagU8) {\n if (argVal instanceof Uint8Array) {\n serializer.serializeBytes(argVal);\n return;\n }\n if (argVal instanceof HexString) {\n serializer.serializeBytes(argVal.toUint8Array());\n return;\n }\n if (typeof argVal === \"string\") {\n serializer.serializeStr(argVal);\n return;\n }\n }\n if (!Array.isArray(argVal)) {\n throw new Error(\"Invalid vector args.\");\n }\n serializer.serializeU32AsUleb128(argVal.length);\n argVal.forEach((arg) => serializeArgInner(arg, argType.value, serializer, depth + 1));\n}\nfunction serializeStruct(argVal, argType, serializer, depth) {\n const { address, module_name: moduleName, name, type_args: typeArgs } = argType.value;\n const structType = `${HexString.fromUint8Array(address.address).toShortString()}::${moduleName.value}::${name.value}`;\n if (structType === \"0x1::string::String\") {\n assertType(argVal, [\"string\"]);\n serializer.serializeStr(argVal);\n } else if (structType === \"0x1::object::Object\") {\n serializeAddress(argVal, serializer);\n } else if (structType === \"0x1::option::Option\") {\n if (typeArgs.length !== 1) {\n throw new Error(`Option has the wrong number of type arguments ${typeArgs.length}`);\n }\n serializeOption(argVal, typeArgs[0], serializer, depth);\n } else {\n throw new Error(\"Unsupported struct type in function argument\");\n }\n}\nfunction serializeOption(argVal, argType, serializer, depth) {\n if (argVal === void 0 || argVal === null) {\n serializer.serializeU32AsUleb128(0);\n } else {\n serializer.serializeU32AsUleb128(1);\n serializeArgInner(argVal, argType, serializer, depth + 1);\n }\n}\nfunction argToTransactionArgument(argVal, argType) {\n if (argType instanceof TypeTagBool) {\n return new TransactionArgumentBool(ensureBoolean(argVal));\n }\n if (argType instanceof TypeTagU8) {\n return new TransactionArgumentU8(ensureNumber(argVal));\n }\n if (argType instanceof TypeTagU16) {\n return new TransactionArgumentU16(ensureNumber(argVal));\n }\n if (argType instanceof TypeTagU32) {\n return new TransactionArgumentU32(ensureNumber(argVal));\n }\n if (argType instanceof TypeTagU64) {\n return new TransactionArgumentU64(ensureBigInt(argVal));\n }\n if (argType instanceof TypeTagU128) {\n return new TransactionArgumentU128(ensureBigInt(argVal));\n }\n if (argType instanceof TypeTagU256) {\n return new TransactionArgumentU256(ensureBigInt(argVal));\n }\n if (argType instanceof TypeTagAddress) {\n let addr;\n if (typeof argVal === \"string\" || argVal instanceof HexString) {\n addr = AccountAddress.fromHex(argVal);\n } else if (argVal instanceof AccountAddress) {\n addr = argVal;\n } else {\n throw new Error(\"Invalid account address.\");\n }\n return new TransactionArgumentAddress(addr);\n }\n if (argType instanceof TypeTagVector && argType.value instanceof TypeTagU8) {\n if (!(argVal instanceof Uint8Array)) {\n throw new Error(`${argVal} should be an instance of Uint8Array`);\n }\n return new TransactionArgumentU8Vector(argVal);\n }\n throw new Error(\"Unknown type for TransactionArgument.\");\n}\n\n// src/transaction_builder/builder.ts\nvar RAW_TRANSACTION_SALT = \"APTOS::RawTransaction\";\nvar RAW_TRANSACTION_WITH_DATA_SALT = \"APTOS::RawTransactionWithData\";\nvar TransactionBuilder = class {\n constructor(signingFunction, rawTxnBuilder) {\n this.rawTxnBuilder = rawTxnBuilder;\n this.signingFunction = signingFunction;\n }\n /**\n * Builds a RawTransaction. Relays the call to TransactionBuilderABI.build\n * @param func\n * @param ty_tags\n * @param args\n */\n build(func, ty_tags, args) {\n if (!this.rawTxnBuilder) {\n throw new Error(\"this.rawTxnBuilder doesn't exist.\");\n }\n return this.rawTxnBuilder.build(func, ty_tags, args);\n }\n /** Generates a Signing Message out of a raw transaction. */\n static getSigningMessage(rawTxn) {\n const hash = sha3Hash4.create();\n if (rawTxn instanceof RawTransaction) {\n hash.update(RAW_TRANSACTION_SALT);\n } else if (rawTxn instanceof MultiAgentRawTransaction) {\n hash.update(RAW_TRANSACTION_WITH_DATA_SALT);\n } else if (rawTxn instanceof FeePayerRawTransaction) {\n hash.update(RAW_TRANSACTION_WITH_DATA_SALT);\n } else {\n throw new Error(\"Unknown transaction type.\");\n }\n const prefix = hash.digest();\n const body = bcsToBytes(rawTxn);\n const mergedArray = new Uint8Array(prefix.length + body.length);\n mergedArray.set(prefix);\n mergedArray.set(body, prefix.length);\n return mergedArray;\n }\n};\nvar TransactionBuilderEd25519 = class extends TransactionBuilder {\n constructor(signingFunction, publicKey, rawTxnBuilder) {\n super(signingFunction, rawTxnBuilder);\n this.publicKey = publicKey;\n }\n rawToSigned(rawTxn) {\n const signingMessage = TransactionBuilder.getSigningMessage(rawTxn);\n const signature = this.signingFunction(signingMessage);\n const authenticator = new TransactionAuthenticatorEd25519(\n new Ed25519PublicKey(this.publicKey),\n signature\n );\n return new SignedTransaction(rawTxn, authenticator);\n }\n /** Signs a raw transaction and returns a bcs serialized transaction. */\n sign(rawTxn) {\n return bcsToBytes(this.rawToSigned(rawTxn));\n }\n};\nvar TransactionBuilderMultiEd25519 = class extends TransactionBuilder {\n constructor(signingFunction, publicKey) {\n super(signingFunction);\n this.publicKey = publicKey;\n }\n rawToSigned(rawTxn) {\n const signingMessage = TransactionBuilder.getSigningMessage(rawTxn);\n const signature = this.signingFunction(signingMessage);\n const authenticator = new TransactionAuthenticatorMultiEd25519(this.publicKey, signature);\n return new SignedTransaction(rawTxn, authenticator);\n }\n /** Signs a raw transaction and returns a bcs serialized transaction. */\n sign(rawTxn) {\n return bcsToBytes(this.rawToSigned(rawTxn));\n }\n};\nvar TransactionBuilderABI = class _TransactionBuilderABI {\n /**\n * Constructs a TransactionBuilderABI instance\n * @param abis List of binary ABIs.\n * @param builderConfig Configs for creating a raw transaction.\n */\n constructor(abis, builderConfig) {\n this.abiMap = /* @__PURE__ */ new Map();\n abis.forEach((abi) => {\n const deserializer = new Deserializer(abi);\n const scriptABI = ScriptABI.deserialize(deserializer);\n let k;\n if (scriptABI instanceof EntryFunctionABI) {\n const funcABI = scriptABI;\n const { address: addr, name: moduleName } = funcABI.module_name;\n k = `${HexString.fromUint8Array(addr.address).toShortString()}::${moduleName.value}::${funcABI.name}`;\n } else {\n const funcABI = scriptABI;\n k = funcABI.name;\n }\n if (this.abiMap.has(k)) {\n throw new Error(\"Found conflicting ABI interfaces\");\n }\n this.abiMap.set(k, scriptABI);\n });\n this.builderConfig = {\n maxGasAmount: BigInt(DEFAULT_MAX_GAS_AMOUNT),\n expSecFromNow: DEFAULT_TXN_EXP_SEC_FROM_NOW,\n ...builderConfig\n };\n }\n static toBCSArgs(abiArgs, args) {\n if (abiArgs.length !== args.length) {\n throw new Error(\"Wrong number of args provided.\");\n }\n return args.map((arg, i) => {\n const serializer = new Serializer();\n serializeArg(arg, abiArgs[i].type_tag, serializer);\n return serializer.getBytes();\n });\n }\n static toTransactionArguments(abiArgs, args) {\n if (abiArgs.length !== args.length) {\n throw new Error(\"Wrong number of args provided.\");\n }\n return args.map((arg, i) => argToTransactionArgument(arg, abiArgs[i].type_tag));\n }\n setSequenceNumber(seqNumber) {\n this.builderConfig.sequenceNumber = BigInt(seqNumber);\n }\n /**\n * Builds a TransactionPayload. For dApps, chain ID and account sequence numbers are only known to the wallet.\n * Instead of building a RawTransaction (requires chainID and sequenceNumber), dApps can build a TransactionPayload\n * and pass the payload to the wallet for signing and sending.\n * @param func Fully qualified func names, e.g. 0x1::aptos_account::transfer\n * @param ty_tags TypeTag strings\n * @param args Function arguments\n * @returns TransactionPayload\n */\n buildTransactionPayload(func, ty_tags, args) {\n const typeTags = ty_tags.map((ty_arg) => new TypeTagParser(ty_arg).parseTypeTag());\n let payload;\n if (!this.abiMap.has(func)) {\n throw new Error(`Cannot find function: ${func}`);\n }\n const scriptABI = this.abiMap.get(func);\n if (scriptABI instanceof EntryFunctionABI) {\n const funcABI = scriptABI;\n const bcsArgs = _TransactionBuilderABI.toBCSArgs(funcABI.args, args);\n payload = new TransactionPayloadEntryFunction(\n new EntryFunction(funcABI.module_name, new Identifier(funcABI.name), typeTags, bcsArgs)\n );\n } else if (scriptABI instanceof TransactionScriptABI) {\n const funcABI = scriptABI;\n const scriptArgs = _TransactionBuilderABI.toTransactionArguments(funcABI.args, args);\n payload = new TransactionPayloadScript(new Script(funcABI.code, typeTags, scriptArgs));\n } else {\n throw new Error(\"Unknown ABI format.\");\n }\n return payload;\n }\n /**\n * Builds a RawTransaction\n * @param func Fully qualified func names, e.g. 0x1::aptos_account::transfer\n * @param ty_tags TypeTag strings.\n * @example Below are valid value examples\n * ```\n * // Structs are in format `AccountAddress::ModuleName::StructName`\n * 0x1::aptos_coin::AptosCoin\n * // Vectors are in format `vector`\n * vector<0x1::aptos_coin::AptosCoin>\n * bool\n * u8\n * u16\n * u32\n * u64\n * u128\n * u256\n * address\n * ```\n * @param args Function arguments\n * @returns RawTransaction\n */\n build(func, ty_tags, args) {\n const { sender, sequenceNumber, gasUnitPrice, maxGasAmount, expSecFromNow, chainId } = this.builderConfig;\n if (!gasUnitPrice) {\n throw new Error(\"No gasUnitPrice provided.\");\n }\n const senderAccount = sender instanceof AccountAddress ? sender : AccountAddress.fromHex(sender);\n const expTimestampSec = BigInt(Math.floor(Date.now() / 1e3) + Number(expSecFromNow));\n const payload = this.buildTransactionPayload(func, ty_tags, args);\n if (payload) {\n return new RawTransaction(\n senderAccount,\n BigInt(sequenceNumber),\n payload,\n BigInt(maxGasAmount),\n BigInt(gasUnitPrice),\n expTimestampSec,\n new ChainId(Number(chainId))\n );\n }\n throw new Error(\"Invalid ABI.\");\n }\n};\nvar TransactionBuilderRemoteABI = class {\n // We don't want the builder to depend on the actual AptosClient. There might be circular dependencies.\n constructor(aptosClient2, builderConfig) {\n this.aptosClient = aptosClient2;\n this.builderConfig = builderConfig;\n }\n async fetchABI(addr) {\n const modules = await this.aptosClient.getAccountModules(addr);\n const abis = modules.map((module) => module.abi).flatMap(\n (abi) => abi.exposed_functions.filter((ef) => ef.is_entry).map(\n (ef) => ({\n fullName: `${abi.address}::${abi.name}::${ef.name}`,\n ...ef\n })\n )\n );\n const abiMap = /* @__PURE__ */ new Map();\n abis.forEach((abi) => {\n abiMap.set(abi.fullName, abi);\n });\n return abiMap;\n }\n /**\n * Builds a raw transaction. Only support script function a.k.a entry function payloads\n *\n * @param func fully qualified function name in format
::::, e.g. 0x1::coin::transfer\n * @param ty_tags\n * @param args\n * @returns RawTransaction\n */\n async build(func, ty_tags, args) {\n const normlize = (s) => s.replace(/^0[xX]0*/g, \"0x\");\n func = normlize(func);\n const funcNameParts = func.split(\"::\");\n if (funcNameParts.length !== 3) {\n throw new Error(\n // eslint-disable-next-line max-len\n \"'func' needs to be a fully qualified function name in format
::::, e.g. 0x1::coin::transfer\"\n );\n }\n const [addr, module] = func.split(\"::\");\n const abiMap = await this.fetchABI(addr);\n if (!abiMap.has(func)) {\n throw new Error(`${func} doesn't exist.`);\n }\n const funcAbi = abiMap.get(func);\n const abiArgs = funcAbi.params.filter((param) => param !== \"signer\" && param !== \"&signer\");\n const typeArgABIs = abiArgs.map(\n (abiArg, i) => new ArgumentABI(`var${i}`, new TypeTagParser(abiArg, ty_tags).parseTypeTag())\n );\n const entryFunctionABI = new EntryFunctionABI(\n funcAbi.name,\n ModuleId.fromStr(`${addr}::${module}`),\n \"\",\n // Doc string\n funcAbi.generic_type_params.map((_, i) => new TypeArgumentABI(`${i}`)),\n typeArgABIs\n );\n const { sender, ...rest } = this.builderConfig;\n const senderAddress = sender instanceof AccountAddress ? HexString.fromUint8Array(sender.address) : sender;\n const [{ sequence_number: sequenceNumber }, chainId, { gas_estimate: gasUnitPrice }] = await Promise.all([\n (rest == null ? void 0 : rest.sequenceNumber) ? Promise.resolve({ sequence_number: rest == null ? void 0 : rest.sequenceNumber }) : this.aptosClient.getAccount(senderAddress),\n (rest == null ? void 0 : rest.chainId) ? Promise.resolve(rest == null ? void 0 : rest.chainId) : this.aptosClient.getChainId(),\n (rest == null ? void 0 : rest.gasUnitPrice) ? Promise.resolve({ gas_estimate: rest == null ? void 0 : rest.gasUnitPrice }) : this.aptosClient.estimateGasPrice()\n ]);\n const builderABI = new TransactionBuilderABI([bcsToBytes(entryFunctionABI)], {\n sender,\n sequenceNumber,\n chainId,\n gasUnitPrice: BigInt(gasUnitPrice),\n ...rest\n });\n return builderABI.build(func, ty_tags, args);\n }\n};\n__decorateClass([\n MemoizeExpiring(10 * 60 * 1e3)\n], TransactionBuilderRemoteABI.prototype, \"fetchABI\", 1);\n\n// src/providers/aptos_client.ts\nvar _AptosClient = class _AptosClient {\n /**\n * Build a client configured to connect to an Aptos node at the given URL.\n *\n * Note: If you forget to append `/v1` to the URL, the client constructor\n * will automatically append it. If you don't want this URL processing to\n * take place, set doNotFixNodeUrl to true.\n *\n * @param nodeUrl URL of the Aptos Node API endpoint.\n * @param config Additional configuration options for the generated Axios client.\n */\n constructor(nodeUrl, config, doNotFixNodeUrl = false) {\n if (!nodeUrl) {\n throw new Error(\"Node URL cannot be empty.\");\n }\n if (doNotFixNodeUrl) {\n this.nodeUrl = nodeUrl;\n } else {\n this.nodeUrl = fixNodeUrl(nodeUrl);\n }\n this.config = config === void 0 || config === null ? {} : { ...config };\n }\n async getAccount(accountAddress) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `accounts/${HexString.ensure(accountAddress).hex()}`,\n originMethod: \"getAccount\",\n overrides: { ...this.config }\n });\n return data;\n }\n async getAccountTransactions(accountAddress, query) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `accounts/${HexString.ensure(accountAddress).hex()}/transactions`,\n originMethod: \"getAccountTransactions\",\n params: { start: query == null ? void 0 : query.start, limit: query == null ? void 0 : query.limit },\n overrides: { ...this.config }\n });\n return data;\n }\n async getAccountModules(accountAddress, query) {\n const out = await paginateWithCursor({\n url: this.nodeUrl,\n endpoint: `accounts/${accountAddress}/modules`,\n params: { ledger_version: query == null ? void 0 : query.ledgerVersion, limit: 1e3 },\n originMethod: \"getAccountModules\",\n overrides: { ...this.config }\n });\n return out;\n }\n async getAccountModule(accountAddress, moduleName, query) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `accounts/${HexString.ensure(accountAddress).hex()}/module/${moduleName}`,\n originMethod: \"getAccountModule\",\n params: { ledger_version: query == null ? void 0 : query.ledgerVersion },\n overrides: { ...this.config }\n });\n return data;\n }\n async getAccountResources(accountAddress, query) {\n const out = await paginateWithCursor({\n url: this.nodeUrl,\n endpoint: `accounts/${accountAddress}/resources`,\n params: { ledger_version: query == null ? void 0 : query.ledgerVersion, limit: 9999 },\n originMethod: \"getAccountResources\",\n overrides: { ...this.config }\n });\n return out;\n }\n async getAccountResource(accountAddress, resourceType, query) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `accounts/${HexString.ensure(accountAddress).hex()}/resource/${resourceType}`,\n originMethod: \"getAccountResource\",\n params: { ledger_version: query == null ? void 0 : query.ledgerVersion },\n overrides: { ...this.config }\n });\n return data;\n }\n /** Generates a signed transaction that can be submitted to the chain for execution. */\n static generateBCSTransaction(accountFrom, rawTxn) {\n const txnBuilder = new TransactionBuilderEd25519((signingMessage) => {\n const sigHexStr = accountFrom.signBuffer(signingMessage);\n return new aptos_types_exports.Ed25519Signature(sigHexStr.toUint8Array());\n }, accountFrom.pubKey().toUint8Array());\n return txnBuilder.sign(rawTxn);\n }\n /**\n * Note: Unless you have a specific reason for using this, it'll probably be simpler\n * to use `simulateTransaction`.\n *\n * Generates a BCS transaction that can be submitted to the chain for simulation.\n *\n * @param accountFrom The account that will be used to send the transaction\n * for simulation.\n * @param rawTxn The raw transaction to be simulated, likely created by calling\n * the `generateTransaction` function.\n * @returns The BCS encoded signed transaction, which you should then pass into\n * the `submitBCSSimulation` function.\n */\n static generateBCSSimulation(accountFrom, rawTxn) {\n const txnBuilder = new TransactionBuilderEd25519((_signingMessage) => {\n const invalidSigBytes = new Uint8Array(64);\n return new aptos_types_exports.Ed25519Signature(invalidSigBytes);\n }, accountFrom.pubKey().toUint8Array());\n return txnBuilder.sign(rawTxn);\n }\n /** Generates an entry function transaction request that can be submitted to produce a raw transaction that\n * can be signed, which upon being signed can be submitted to the blockchain\n * This function fetches the remote ABI and uses it to serialized the data, therefore\n * users don't need to handle serialization by themselves.\n * @param sender Hex-encoded 32 byte Aptos account address of transaction sender\n * @param payload Entry function transaction payload type\n * @param options Options allow to overwrite default transaction options.\n * @returns A raw transaction object\n */\n async generateTransaction(sender, payload, options) {\n const config = { sender };\n if (options == null ? void 0 : options.sequence_number) {\n config.sequenceNumber = options.sequence_number;\n }\n if (options == null ? void 0 : options.gas_unit_price) {\n config.gasUnitPrice = options.gas_unit_price;\n }\n if (options == null ? void 0 : options.max_gas_amount) {\n config.maxGasAmount = options.max_gas_amount;\n }\n if (options == null ? void 0 : options.expiration_timestamp_secs) {\n const timestamp = Number.parseInt(options.expiration_timestamp_secs, 10);\n config.expSecFromNow = timestamp - Math.floor(Date.now() / 1e3);\n }\n const builder = new TransactionBuilderRemoteABI(this, config);\n return builder.build(payload.function, payload.type_arguments, payload.arguments);\n }\n /**\n * Generates a fee payer transaction that can be signed and submitted to chain\n *\n * @param sender the sender's account address\n * @param payload the transaction payload\n * @param fee_payer the fee payer account\n * @param secondarySignerAccounts an optional array of the secondary signers accounts\n * @returns a fee payer raw transaction that can be signed and submitted to chain\n */\n async generateFeePayerTransaction(sender, payload, feePayer, secondarySignerAccounts = [], options) {\n const rawTxn = await this.generateTransaction(sender, payload, options);\n const signers = secondarySignerAccounts.map((signer) => AccountAddress.fromHex(signer));\n const feePayerTxn = new aptos_types_exports.FeePayerRawTransaction(rawTxn, signers, AccountAddress.fromHex(feePayer));\n return feePayerTxn;\n }\n /**\n * Submits fee payer transaction to chain\n *\n * @param feePayerTransaction the raw transaction to be submitted, of type FeePayerRawTransaction\n * @param senderAuthenticator the sender account authenticator (can get from signMultiTransaction() method)\n * @param feePayerAuthenticator the feepayer account authenticator (can get from signMultiTransaction() method)\n * @param signersAuthenticators an optional array of the signer account authenticators\n * @returns The pending transaction\n */\n async submitFeePayerTransaction(feePayerTransaction, senderAuthenticator, feePayerAuthenticator, additionalSignersAuthenticators = []) {\n const txAuthenticatorFeePayer = new aptos_types_exports.TransactionAuthenticatorFeePayer(\n senderAuthenticator,\n feePayerTransaction.secondary_signer_addresses,\n additionalSignersAuthenticators,\n { address: feePayerTransaction.fee_payer_address, authenticator: feePayerAuthenticator }\n );\n const bcsTxn = bcsToBytes(\n new aptos_types_exports.SignedTransaction(feePayerTransaction.raw_txn, txAuthenticatorFeePayer)\n );\n const transactionRes = await this.submitSignedBCSTransaction(bcsTxn);\n return transactionRes;\n }\n /**\n * Signs a multi transaction type (multi agent / fee payer) and returns the\n * signer authenticator to be used to submit the transaction.\n *\n * @param signer the account to sign on the transaction\n * @param rawTxn a MultiAgentRawTransaction or FeePayerRawTransaction\n * @returns signer authenticator\n */\n // eslint-disable-next-line class-methods-use-this\n async signMultiTransaction(signer, rawTxn) {\n const signerSignature = new aptos_types_exports.Ed25519Signature(\n signer.signBuffer(TransactionBuilder.getSigningMessage(rawTxn)).toUint8Array()\n );\n const signerAuthenticator = new aptos_types_exports.AccountAuthenticatorEd25519(\n new aptos_types_exports.Ed25519PublicKey(signer.signingKey.publicKey),\n signerSignature\n );\n return Promise.resolve(signerAuthenticator);\n }\n /** Converts a transaction request produced by `generateTransaction` into a properly\n * signed transaction, which can then be submitted to the blockchain\n * @param accountFrom AptosAccount of transaction sender\n * @param rawTransaction A raw transaction generated by `generateTransaction` method\n * @returns A transaction, signed with sender account\n */\n // eslint-disable-next-line class-methods-use-this\n async signTransaction(accountFrom, rawTransaction) {\n return Promise.resolve(_AptosClient.generateBCSTransaction(accountFrom, rawTransaction));\n }\n async getEventsByCreationNumber(address, creationNumber, query) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `accounts/${HexString.ensure(address).hex()}/events/${creationNumber}`,\n originMethod: \"getEventsByCreationNumber\",\n params: { start: query == null ? void 0 : query.start, limit: query == null ? void 0 : query.limit },\n overrides: { ...this.config }\n });\n return data;\n }\n async getEventsByEventHandle(address, eventHandleStruct, fieldName, query) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `accounts/${HexString.ensure(address).hex()}/events/${eventHandleStruct}/${fieldName}`,\n originMethod: \"getEventsByEventHandle\",\n params: { start: query == null ? void 0 : query.start, limit: query == null ? void 0 : query.limit },\n overrides: { ...this.config }\n });\n return data;\n }\n /**\n * Submits a signed transaction to the transaction endpoint.\n * @param signedTxn A transaction, signed by `signTransaction` method\n * @returns Transaction that is accepted and submitted to mempool\n */\n async submitTransaction(signedTxn) {\n return this.submitSignedBCSTransaction(signedTxn);\n }\n /**\n * Generates and submits a transaction to the transaction simulation\n * endpoint. For this we generate a transaction with a fake signature.\n *\n * @param accountOrPubkey The sender or sender's public key. When private key is available, `AptosAccount` instance\n * can be used to send the transaction for simulation. If private key is not available, sender's public key can be\n * used to send the transaction for simulation.\n * @param rawTransaction The raw transaction to be simulated, likely created\n * by calling the `generateTransaction` function.\n * @param query.estimateGasUnitPrice If set to true, the gas unit price in the\n * transaction will be ignored and the estimated value will be used.\n * @param query.estimateMaxGasAmount If set to true, the max gas value in the\n * transaction will be ignored and the maximum possible gas will be used.\n * @param query.estimatePrioritizedGasUnitPrice If set to true, the transaction will use a higher price than the\n * original estimate.\n * @returns The BCS encoded signed transaction, which you should then provide\n *\n */\n async simulateTransaction(accountOrPubkey, rawTransaction, query) {\n let signedTxn;\n if (accountOrPubkey instanceof AptosAccount) {\n signedTxn = _AptosClient.generateBCSSimulation(accountOrPubkey, rawTransaction);\n } else if (accountOrPubkey instanceof MultiEd25519PublicKey) {\n const txnBuilder = new TransactionBuilderMultiEd25519(() => {\n const { threshold } = accountOrPubkey;\n const bits = [];\n const signatures = [];\n for (let i = 0; i < threshold; i += 1) {\n bits.push(i);\n signatures.push(new aptos_types_exports.Ed25519Signature(new Uint8Array(64)));\n }\n const bitmap = aptos_types_exports.MultiEd25519Signature.createBitmap(bits);\n return new aptos_types_exports.MultiEd25519Signature(signatures, bitmap);\n }, accountOrPubkey);\n signedTxn = txnBuilder.sign(rawTransaction);\n } else {\n const txnBuilder = new TransactionBuilderEd25519(() => {\n const invalidSigBytes = new Uint8Array(64);\n return new aptos_types_exports.Ed25519Signature(invalidSigBytes);\n }, accountOrPubkey.toBytes());\n signedTxn = txnBuilder.sign(rawTransaction);\n }\n return this.submitBCSSimulation(signedTxn, query);\n }\n async submitSignedBCSTransaction(signedTxn) {\n const { data } = await post({\n url: this.nodeUrl,\n body: signedTxn,\n endpoint: \"transactions\",\n originMethod: \"submitSignedBCSTransaction\",\n contentType: \"application/x.aptos.signed_transaction+bcs\",\n overrides: { ...this.config }\n });\n return data;\n }\n async submitBCSSimulation(bcsBody, query) {\n var _a, _b, _c;\n const queryParams = {\n estimate_gas_unit_price: (_a = query == null ? void 0 : query.estimateGasUnitPrice) != null ? _a : false,\n estimate_max_gas_amount: (_b = query == null ? void 0 : query.estimateMaxGasAmount) != null ? _b : false,\n estimate_prioritized_gas_unit_price: (_c = query == null ? void 0 : query.estimatePrioritizedGasUnitPrice) != null ? _c : false\n };\n const { data } = await post({\n url: this.nodeUrl,\n body: bcsBody,\n endpoint: \"transactions/simulate\",\n params: queryParams,\n originMethod: \"submitBCSSimulation\",\n contentType: \"application/x.aptos.signed_transaction+bcs\",\n overrides: { ...this.config }\n });\n return data;\n }\n async getTransactions(query) {\n var _a;\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: \"transactions\",\n originMethod: \"getTransactions\",\n params: { start: (_a = query == null ? void 0 : query.start) == null ? void 0 : _a.toString(), limit: query == null ? void 0 : query.limit },\n overrides: { ...this.config }\n });\n return data;\n }\n async getTransactionByHash(txnHash) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `transactions/by_hash/${txnHash}`,\n originMethod: \"getTransactionByHash\",\n overrides: { ...this.config }\n });\n return data;\n }\n async getTransactionByVersion(txnVersion) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `transactions/by_version/${txnVersion}`,\n originMethod: \"getTransactionByVersion\",\n overrides: { ...this.config }\n });\n return data;\n }\n /**\n * Defines if specified transaction is currently in pending state\n * @param txnHash A hash of transaction\n *\n * To create a transaction hash:\n *\n * 1. Create hash message bytes: \"Aptos::Transaction\" bytes + BCS bytes of Transaction.\n * 2. Apply hash algorithm SHA3-256 to the hash message bytes.\n * 3. Hex-encode the hash bytes with 0x prefix.\n *\n * @returns `true` if transaction is in pending state and `false` otherwise\n */\n async transactionPending(txnHash) {\n try {\n const response = await this.getTransactionByHash(txnHash);\n return response.type === \"pending_transaction\";\n } catch (e) {\n if ((e == null ? void 0 : e.status) === 404) {\n return true;\n }\n throw e;\n }\n }\n /**\n * Wait for a transaction to move past pending state.\n *\n * There are 4 possible outcomes:\n * 1. Transaction is processed and successfully committed to the blockchain.\n * 2. Transaction is rejected for some reason, and is therefore not committed\n * to the blockchain.\n * 3. Transaction is committed but execution failed, meaning no changes were\n * written to the blockchain state.\n * 4. Transaction is not processed within the specified timeout.\n *\n * In case 1, this function resolves with the transaction response returned\n * by the API.\n *\n * In case 2, the function will throw an ApiError, likely with an HTTP status\n * code indicating some problem with the request (e.g. 400).\n *\n * In case 3, if `checkSuccess` is false (the default), this function returns\n * the transaction response just like in case 1, in which the `success` field\n * will be false. If `checkSuccess` is true, it will instead throw a\n * FailedTransactionError.\n *\n * In case 4, this function throws a WaitForTransactionError.\n *\n * @param txnHash The hash of a transaction previously submitted to the blockchain.\n * @param extraArgs.timeoutSecs Timeout in seconds. Defaults to 20 seconds.\n * @param extraArgs.checkSuccess See above. Defaults to false.\n * @returns See above.\n *\n * @example\n * ```\n * const rawTransaction = await this.generateRawTransaction(sender.address(), payload, extraArgs);\n * const bcsTxn = AptosClient.generateBCSTransaction(sender, rawTransaction);\n * const pendingTransaction = await this.submitSignedBCSTransaction(bcsTxn);\n * const transasction = await this.aptosClient.waitForTransactionWithResult(pendingTransaction.hash);\n * ```\n */\n async waitForTransactionWithResult(txnHash, extraArgs) {\n var _a, _b;\n const timeoutSecs = (_a = extraArgs == null ? void 0 : extraArgs.timeoutSecs) != null ? _a : DEFAULT_TXN_TIMEOUT_SEC;\n const checkSuccess = (_b = extraArgs == null ? void 0 : extraArgs.checkSuccess) != null ? _b : false;\n let isPending = true;\n let count = 0;\n let lastTxn;\n while (isPending) {\n if (count >= timeoutSecs) {\n break;\n }\n try {\n lastTxn = await this.getTransactionByHash(txnHash);\n isPending = lastTxn.type === \"pending_transaction\";\n if (!isPending) {\n break;\n }\n } catch (e) {\n const isApiError = e instanceof ApiError;\n const isRequestError = isApiError && e.status !== 404 && e.status >= 400 && e.status < 500;\n if (!isApiError || isRequestError) {\n throw e;\n }\n }\n await sleep(1e3);\n count += 1;\n }\n if (lastTxn === void 0) {\n throw new Error(`Waiting for transaction ${txnHash} failed`);\n }\n if (isPending) {\n throw new WaitForTransactionError(\n `Waiting for transaction ${txnHash} timed out after ${timeoutSecs} seconds`,\n lastTxn\n );\n }\n if (!checkSuccess) {\n return lastTxn;\n }\n if (!(lastTxn == null ? void 0 : lastTxn.success)) {\n throw new FailedTransactionError(\n `Transaction ${txnHash} failed with an error: ${lastTxn.vm_status}`,\n lastTxn\n );\n }\n return lastTxn;\n }\n /**\n * This function works the same as `waitForTransactionWithResult` except it\n * doesn't return the transaction in those cases, it returns nothing. For\n * more information, see the documentation for `waitForTransactionWithResult`.\n */\n async waitForTransaction(txnHash, extraArgs) {\n await this.waitForTransactionWithResult(txnHash, extraArgs);\n }\n async getLedgerInfo() {\n const { data } = await get({\n url: this.nodeUrl,\n originMethod: \"getLedgerInfo\",\n overrides: { ...this.config }\n });\n return data;\n }\n async getChainId() {\n const result = await this.getLedgerInfo();\n return result.chain_id;\n }\n async getTableItem(handle, data, query) {\n var _a;\n const response = await post({\n url: this.nodeUrl,\n body: data,\n endpoint: `tables/${handle}/item`,\n originMethod: \"getTableItem\",\n params: { ledger_version: (_a = query == null ? void 0 : query.ledgerVersion) == null ? void 0 : _a.toString() },\n overrides: { ...this.config }\n });\n return response.data;\n }\n /**\n * Generates a raw transaction out of a transaction payload\n * @param accountFrom\n * @param payload\n * @param extraArgs\n * @returns A raw transaction object\n */\n async generateRawTransaction(accountFrom, payload, extraArgs) {\n const [{ sequence_number: sequenceNumber }, chainId, { gas_estimate: gasEstimate }] = await Promise.all([\n (extraArgs == null ? void 0 : extraArgs.providedSequenceNumber) ? Promise.resolve({ sequence_number: extraArgs.providedSequenceNumber }) : this.getAccount(accountFrom),\n this.getChainId(),\n (extraArgs == null ? void 0 : extraArgs.gasUnitPrice) ? Promise.resolve({ gas_estimate: extraArgs.gasUnitPrice }) : this.estimateGasPrice()\n ]);\n const { maxGasAmount, gasUnitPrice, expireTimestamp } = {\n maxGasAmount: BigInt(DEFAULT_MAX_GAS_AMOUNT),\n gasUnitPrice: BigInt(gasEstimate),\n expireTimestamp: BigInt(Math.floor(Date.now() / 1e3) + DEFAULT_TXN_EXP_SEC_FROM_NOW),\n ...extraArgs\n };\n return new aptos_types_exports.RawTransaction(\n aptos_types_exports.AccountAddress.fromHex(accountFrom),\n BigInt(sequenceNumber),\n payload,\n maxGasAmount,\n gasUnitPrice,\n expireTimestamp,\n new aptos_types_exports.ChainId(chainId)\n );\n }\n /**\n * Helper for generating, signing, and submitting a transaction.\n *\n * @param sender AptosAccount of transaction sender.\n * @param payload Transaction payload.\n * @param extraArgs Extra args for building the transaction payload.\n * @returns The transaction response from the API.\n */\n async generateSignSubmitTransaction(sender, payload, extraArgs) {\n const rawTransaction = await this.generateRawTransaction(sender.address(), payload, extraArgs);\n const bcsTxn = _AptosClient.generateBCSTransaction(sender, rawTransaction);\n const pendingTransaction = await this.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Helper for signing and submitting a transaction.\n *\n * @param sender AptosAccount of transaction sender.\n * @param transaction A generated Raw transaction payload.\n * @returns The transaction response from the API.\n */\n async signAndSubmitTransaction(sender, transaction) {\n const bcsTxn = _AptosClient.generateBCSTransaction(sender, transaction);\n const pendingTransaction = await this.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Publishes a move package. `packageMetadata` and `modules` can be generated with command\n * `aptos move compile --save-metadata [ --included-artifacts=<...> ]`.\n * @param sender\n * @param packageMetadata package metadata bytes\n * @param modules bytecodes of modules\n * @param extraArgs\n * @returns Transaction hash\n */\n async publishPackage(sender, packageMetadata, modules, extraArgs) {\n const codeSerializer = new Serializer();\n serializeVector(modules, codeSerializer);\n const payload = new aptos_types_exports.TransactionPayloadEntryFunction(\n aptos_types_exports.EntryFunction.natural(\n \"0x1::code\",\n \"publish_package_txn\",\n [],\n [bcsSerializeBytes(packageMetadata), codeSerializer.getBytes()]\n )\n );\n return this.generateSignSubmitTransaction(sender, payload, extraArgs);\n }\n /**\n * Publishes a move packages by creating a resource account.\n * The package cannot be upgraded since it is deployed by resource account\n * `packageMetadata` and `modules` can be generated with command\n * `aptos move compile --save-metadata [ --included-artifacts=<...> ]`.\n * @param sender\n * @param seed seeds for creation of resource address\n * @param packageMetadata package metadata bytes\n * @param modules bytecodes of modules\n * @param extraArgs\n * @returns Transaction hash\n */\n async createResourceAccountAndPublishPackage(sender, seed, packageMetadata, modules, extraArgs) {\n const codeSerializer = new Serializer();\n serializeVector(modules, codeSerializer);\n const payload = new aptos_types_exports.TransactionPayloadEntryFunction(\n aptos_types_exports.EntryFunction.natural(\n \"0x1::resource_account\",\n \"create_resource_account_and_publish_package\",\n [],\n [bcsSerializeBytes(seed), bcsSerializeBytes(packageMetadata), codeSerializer.getBytes()]\n )\n );\n return this.generateSignSubmitTransaction(sender, payload, extraArgs);\n }\n /**\n * Helper for generating, submitting, and waiting for a transaction, and then\n * checking whether it was committed successfully. Under the hood this is just\n * `generateSignSubmitTransaction` and then `waitForTransactionWithResult`, see\n * those for information about the return / error semantics of this function.\n */\n async generateSignSubmitWaitForTransaction(sender, payload, extraArgs) {\n const txnHash = await this.generateSignSubmitTransaction(sender, payload, extraArgs);\n return this.waitForTransactionWithResult(txnHash, extraArgs);\n }\n async estimateGasPrice() {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: \"estimate_gas_price\",\n originMethod: \"estimateGasPrice\",\n overrides: { ...this.config }\n });\n return data;\n }\n async estimateMaxGasAmount(forAccount) {\n const typeTag = `0x1::coin::CoinStore<${APTOS_COIN}>`;\n const [{ gas_estimate: gasUnitPrice }, resources] = await Promise.all([\n this.estimateGasPrice(),\n this.getAccountResources(forAccount)\n ]);\n const accountResource = resources.find((r) => r.type === typeTag);\n const balance = BigInt(accountResource.data.coin.value);\n return balance / BigInt(gasUnitPrice);\n }\n /**\n * Rotate an account's auth key. After rotation, only the new private key can be used to sign txns for\n * the account.\n * WARNING: You must create a new instance of AptosAccount after using this function.\n * @param forAccount Account of which the auth key will be rotated\n * @param toPrivateKeyBytes New private key\n * @param extraArgs Extra args for building the transaction payload.\n * @returns PendingTransaction\n */\n async rotateAuthKeyEd25519(forAccount, toPrivateKeyBytes, extraArgs) {\n const { sequence_number: sequenceNumber, authentication_key: authKey } = await this.getAccount(\n forAccount.address()\n );\n const helperAccount = new AptosAccount(toPrivateKeyBytes);\n const challenge = new aptos_types_exports.RotationProofChallenge(\n aptos_types_exports.AccountAddress.CORE_CODE_ADDRESS,\n \"account\",\n \"RotationProofChallenge\",\n BigInt(sequenceNumber),\n aptos_types_exports.AccountAddress.fromHex(forAccount.address()),\n new aptos_types_exports.AccountAddress(new HexString(authKey).toUint8Array()),\n helperAccount.pubKey().toUint8Array()\n );\n const challengeHex = HexString.fromUint8Array(bcsToBytes(challenge));\n const proofSignedByCurrentPrivateKey = forAccount.signHexString(challengeHex);\n const proofSignedByNewPrivateKey = helperAccount.signHexString(challengeHex);\n const payload = new aptos_types_exports.TransactionPayloadEntryFunction(\n aptos_types_exports.EntryFunction.natural(\n \"0x1::account\",\n \"rotate_authentication_key\",\n [],\n [\n bcsSerializeU8(0),\n // ed25519 scheme\n bcsSerializeBytes(forAccount.pubKey().toUint8Array()),\n bcsSerializeU8(0),\n // ed25519 scheme\n bcsSerializeBytes(helperAccount.pubKey().toUint8Array()),\n bcsSerializeBytes(proofSignedByCurrentPrivateKey.toUint8Array()),\n bcsSerializeBytes(proofSignedByNewPrivateKey.toUint8Array())\n ]\n )\n );\n const rawTransaction = await this.generateRawTransaction(forAccount.address(), payload, extraArgs);\n const bcsTxn = _AptosClient.generateBCSTransaction(forAccount, rawTransaction);\n return this.submitSignedBCSTransaction(bcsTxn);\n }\n /**\n * Lookup the original address by the current derived address\n * @param addressOrAuthKey\n * @returns original address\n */\n async lookupOriginalAddress(addressOrAuthKey) {\n const resource = await this.getAccountResource(\"0x1\", \"0x1::account::OriginatingAddress\");\n const {\n address_map: { handle }\n } = resource.data;\n const origAddress = await this.getTableItem(handle, {\n key_type: \"address\",\n value_type: \"address\",\n key: HexString.ensure(addressOrAuthKey).hex()\n });\n return new HexString(origAddress);\n }\n async getBlockByHeight(blockHeight, withTransactions) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `blocks/by_height/${blockHeight}`,\n originMethod: \"getBlockByHeight\",\n params: { with_transactions: withTransactions },\n overrides: { ...this.config }\n });\n return data;\n }\n async getBlockByVersion(version, withTransactions) {\n const { data } = await get({\n url: this.nodeUrl,\n endpoint: `blocks/by_version/${version}`,\n originMethod: \"getBlockByVersion\",\n params: { with_transactions: withTransactions },\n overrides: { ...this.config }\n });\n return data;\n }\n async view(payload, ledger_version) {\n const { data } = await post({\n url: this.nodeUrl,\n body: payload,\n endpoint: \"view\",\n originMethod: \"getTableItem\",\n params: { ledger_version },\n overrides: { ...this.config }\n });\n return data;\n }\n // eslint-disable-next-line class-methods-use-this\n clearCache(tags) {\n clear(tags);\n }\n};\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getAccount\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getAccountTransactions\", 1);\n__decorateClass([\n parseApiError,\n MemoizeExpiring(10 * 60 * 1e3)\n], _AptosClient.prototype, \"getAccountModules\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getAccountModule\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getAccountResources\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getAccountResource\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getEventsByCreationNumber\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getEventsByEventHandle\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"submitSignedBCSTransaction\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"submitBCSSimulation\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getTransactions\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getTransactionByHash\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getTransactionByVersion\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getLedgerInfo\", 1);\n__decorateClass([\n Memoize()\n], _AptosClient.prototype, \"getChainId\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getTableItem\", 1);\n__decorateClass([\n parseApiError,\n Memoize({\n ttlMs: 5 * 60 * 1e3,\n // cache result for 5min\n tags: [\"gas_estimates\"]\n })\n], _AptosClient.prototype, \"estimateGasPrice\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"estimateMaxGasAmount\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getBlockByHeight\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"getBlockByVersion\", 1);\n__decorateClass([\n parseApiError\n], _AptosClient.prototype, \"view\", 1);\nvar AptosClient = _AptosClient;\nvar WaitForTransactionError = class extends Error {\n constructor(message, lastSubmittedTransaction) {\n super(message);\n this.lastSubmittedTransaction = lastSubmittedTransaction;\n }\n};\nvar FailedTransactionError = class extends Error {\n constructor(message, transaction) {\n super(message);\n this.transaction = transaction;\n }\n};\nvar ApiError = class extends Error {\n constructor(status, message, errorCode, vmErrorCode) {\n super(message);\n this.status = status;\n this.message = message;\n this.errorCode = errorCode;\n this.vmErrorCode = vmErrorCode;\n }\n};\nfunction parseApiError(target, propertyKey, descriptor) {\n const childFunction = descriptor.value;\n descriptor.value = async function wrapper(...args) {\n var _a, _b;\n try {\n const res = await childFunction.apply(this, [...args]);\n return res;\n } catch (e) {\n if (e instanceof AptosApiError) {\n throw new ApiError(\n e.status,\n JSON.stringify({ message: e.message, ...e.data }),\n (_a = e.data) == null ? void 0 : _a.error_code,\n (_b = e.data) == null ? void 0 : _b.vm_error_code\n );\n }\n throw e;\n }\n };\n return descriptor;\n}\n\n// src/providers/indexer.ts\nvar IndexerClient = class _IndexerClient {\n /**\n * @param endpoint URL of the Aptos Indexer API endpoint.\n */\n constructor(endpoint, config) {\n this.endpoint = endpoint;\n this.config = config;\n }\n /**\n * Indexer only accepts address in the long format, i.e a 66 chars long -> 0x<64 chars>\n * This method makes sure address is 66 chars long.\n * @param address\n */\n static validateAddress(address) {\n if (address.length < 66) {\n throw new Error(`${address} is less than 66 chars long.`);\n }\n }\n /**\n * Makes axios client call to fetch data from Aptos Indexer.\n *\n * @param graphqlQuery A GraphQL query to pass in the `data` axios call.\n */\n async queryIndexer(graphqlQuery) {\n const response = await post({\n url: this.endpoint,\n body: graphqlQuery,\n overrides: { WITH_CREDENTIALS: false, ...this.config }\n });\n if (response.data.errors) {\n throw new ApiError(\n response.data.errors[0].extensions.code,\n JSON.stringify({\n message: response.data.errors[0].message,\n error_code: response.data.errors[0].extensions.code\n })\n );\n }\n return response.data.data;\n }\n /**\n * Queries Indexer Ledger Info\n *\n * @returns GetLedgerInfoQuery response type\n */\n async getIndexerLedgerInfo() {\n const graphqlQuery = {\n query: GetIndexerLedgerInfo\n };\n return this.queryIndexer(graphqlQuery);\n }\n // TOKENS //\n /**\n * @deprecated please use `getOwnedTokens` query\n *\n * Queries an Aptos account's NFTs by owner address\n *\n * @param ownerAddress Hex-encoded 32 byte Aptos account address\n * @returns GetAccountCurrentTokensQuery response type\n */\n async getAccountNFTs(ownerAddress, options) {\n const address = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(address);\n const graphqlQuery = {\n query: GetAccountCurrentTokens,\n variables: { address, offset: options == null ? void 0 : options.offset, limit: options == null ? void 0 : options.limit }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries a token activities by token address (v2) or token data id (v1)\n *\n * @param idHash token address (v2) or token data id (v1)\n * @returns GetTokenActivitiesQuery response type\n */\n async getTokenActivities(token, extraArgs) {\n var _a, _b;\n const tokenAddress = HexString.ensure(token).hex();\n _IndexerClient.validateAddress(tokenAddress);\n const whereCondition = {\n token_data_id: { _eq: tokenAddress }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetTokenActivities,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Gets the count of token's activities by token address (v2) or token data id (v1)\n *\n * @param token token address (v2) or token data id (v1)\n * @returns GetTokenActivitiesCountQuery response type\n */\n async getTokenActivitiesCount(token) {\n const graphqlQuery = {\n query: GetTokenActivitiesCount,\n variables: { token_id: token }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Gets the count of tokens owned by an account\n *\n * @param ownerAddress Owner address\n * @returns AccountTokensCountQuery response type\n */\n async getAccountTokensCount(ownerAddress, extraArgs) {\n var _a, _b;\n const whereCondition = {\n owner_address: { _eq: ownerAddress },\n amount: { _gt: \"0\" }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const address = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(address);\n const graphqlQuery = {\n query: GetAccountTokensCount,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries token data by token address (v2) or token data id (v1)\n *\n * @param token token address (v2) or token data id (v1)\n * @returns GetTokenDataQuery response type\n */\n // :!:>getTokenData\n async getTokenData(token, extraArgs) {\n var _a, _b;\n const tokenAddress = HexString.ensure(token).hex();\n _IndexerClient.validateAddress(tokenAddress);\n const whereCondition = {\n token_data_id: { _eq: tokenAddress }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetTokenData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n // <:!:getTokenData\n /**\n * Queries token owners data by token address (v2) or token data id (v1).\n * This query returns historical owners data.\n *\n * To fetch token v2 standard, pass in the optional `tokenStandard` parameter and\n * dont pass `propertyVersion` parameter (as propertyVersion only compatible with v1 standard)\n *\n * @param token token address (v2) or token data id (v1)\n * @param propertyVersion Property version (optional) - only compatible with token v1 standard\n * @returns GetTokenOwnersDataQuery response type\n */\n async getTokenOwnersData(token, propertyVersion, extraArgs) {\n var _a, _b;\n const tokenAddress = HexString.ensure(token).hex();\n _IndexerClient.validateAddress(tokenAddress);\n const whereCondition = {\n token_data_id: { _eq: tokenAddress },\n amount: { _gt: \"0\" }\n };\n if (propertyVersion) {\n whereCondition.property_version_v1 = { _eq: propertyVersion };\n }\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetTokenOwnersData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries current token owner data by token address (v2) or token data id (v1).\n * This query returns the current token owner data.\n *\n * To fetch token v2 standard, pass in the optional `tokenStandard` parameter and\n * dont pass `propertyVersion` parameter (as propertyVersion only compatible with v1 standard)\n *\n * @param token token address (v2) or token data id (v1)\n * @param propertyVersion Property version (optional) - only compatible with token v1 standard\n * @returns GetTokenCurrentOwnerDataQuery response type\n */\n async getTokenCurrentOwnerData(token, propertyVersion, extraArgs) {\n var _a, _b;\n const tokenAddress = HexString.ensure(token).hex();\n _IndexerClient.validateAddress(tokenAddress);\n const whereCondition = {\n token_data_id: { _eq: tokenAddress },\n amount: { _gt: \"0\" }\n };\n if (propertyVersion) {\n whereCondition.property_version_v1 = { _eq: propertyVersion };\n }\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetTokenCurrentOwnerData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries account's current owned tokens.\n * This query returns all tokens (v1 and v2 standards) an account owns, including NFTs, fungible, soulbound, etc.\n * If you want to get only the token from a specific standrd, you can pass an optional tokenStandard param\n *\n * @param ownerAddress The token owner address we want to get the tokens for\n * @returns GetOwnedTokensQuery response type\n */\n async getOwnedTokens(ownerAddress, extraArgs) {\n var _a, _b;\n const address = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(address);\n const whereCondition = {\n owner_address: { _eq: address },\n amount: { _gt: 0 }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetOwnedTokens,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries account's current owned tokens by token address (v2) or token data id (v1).\n *\n * @param token token address (v2) or token data id (v1)\n * @returns GetOwnedTokensByTokenDataQuery response type\n */\n async getOwnedTokensByTokenData(token, extraArgs) {\n var _a, _b;\n const address = HexString.ensure(token).hex();\n _IndexerClient.validateAddress(address);\n const whereCondition = {\n token_data_id: { _eq: address },\n amount: { _gt: 0 }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetOwnedTokensByTokenData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries all tokens of a specific collection that an account owns by the collection address\n *\n * @param ownerAddress owner address that owns the tokens\n * @param collectionAddress the collection address\n * @returns GetTokenOwnedFromCollectionQuery response type\n */\n async getTokenOwnedFromCollectionAddress(ownerAddress, collectionAddress, extraArgs) {\n var _a, _b;\n const ownerHexAddress = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(ownerHexAddress);\n const collectionHexAddress = HexString.ensure(collectionAddress).hex();\n _IndexerClient.validateAddress(collectionHexAddress);\n const whereCondition = {\n owner_address: { _eq: ownerHexAddress },\n current_token_data: { collection_id: { _eq: collectionHexAddress } },\n amount: { _gt: 0 }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetTokenOwnedFromCollection,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries all tokens of a specific collection that an account owns by the collection name and collection\n * creator address\n *\n * @param ownerAddress owner address that owns the tokens\n * @param collectionName the collection name\n * @param creatorAddress the collection creator address\n * @returns GetTokenOwnedFromCollectionQuery response type\n */\n async getTokenOwnedFromCollectionNameAndCreatorAddress(ownerAddress, collectionName, creatorAddress, extraArgs) {\n const collectionAddress = await this.getCollectionAddress(creatorAddress, collectionName, extraArgs);\n const tokens = await this.getTokenOwnedFromCollectionAddress(ownerAddress, collectionAddress, extraArgs);\n return tokens;\n }\n /**\n * Queries data of a specific collection by the collection creator address and the collection name.\n *\n * if, for some reason, a creator account has 2 collections with the same name in v1 and v2,\n * can pass an optional `tokenStandard` parameter to query a specific standard\n *\n * @param creatorAddress the collection creator address\n * @param collectionName the collection name\n * @returns GetCollectionDataQuery response type\n */\n async getCollectionData(creatorAddress, collectionName, extraArgs) {\n var _a, _b;\n const address = HexString.ensure(creatorAddress).hex();\n _IndexerClient.validateAddress(address);\n const whereCondition = {\n collection_name: { _eq: collectionName },\n creator_address: { _eq: address }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.token_standard = { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard };\n }\n const graphqlQuery = {\n query: GetCollectionData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries a collection address.\n *\n * @param creatorAddress the collection creator address\n * @param collectionName the collection name\n * @returns the collection address\n */\n async getCollectionAddress(creatorAddress, collectionName, extraArgs) {\n return (await this.getCollectionData(creatorAddress, collectionName, extraArgs)).current_collections_v2[0].collection_id;\n }\n /**\n * Queries for all collections that an account has tokens for.\n *\n * @param ownerAddress the account address that owns the tokens\n * @returns GetCollectionsWithOwnedTokensQuery response type\n */\n async getCollectionsWithOwnedTokens(ownerAddress, extraArgs) {\n var _a, _b;\n const ownerHexAddress = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(ownerHexAddress);\n const whereCondition = {\n owner_address: { _eq: ownerHexAddress }\n };\n if (extraArgs == null ? void 0 : extraArgs.tokenStandard) {\n whereCondition.current_collection = { token_standard: { _eq: extraArgs == null ? void 0 : extraArgs.tokenStandard } };\n }\n const graphqlQuery = {\n query: GetCollectionsWithOwnedTokens,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n // TRANSACTIONS //\n /**\n * Gets the count of transactions submitted by an account\n *\n * @param address Account address\n * @returns GetAccountTransactionsCountQuery response type\n */\n async getAccountTransactionsCount(accountAddress) {\n const address = HexString.ensure(accountAddress).hex();\n _IndexerClient.validateAddress(address);\n const graphqlQuery = {\n query: GetAccountTransactionsCount,\n variables: { address }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries an account transactions data\n *\n * @param address Account address\n * @returns GetAccountTransactionsDataQuery response type\n */\n async getAccountTransactionsData(accountAddress, extraArgs) {\n var _a, _b;\n const address = HexString.ensure(accountAddress).hex();\n _IndexerClient.validateAddress(address);\n const whereCondition = {\n account_address: { _eq: address }\n };\n const graphqlQuery = {\n query: GetAccountTransactionsData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries top user transactions\n *\n * @param limit\n * @returns GetTopUserTransactionsQuery response type\n */\n async getTopUserTransactions(limit) {\n const graphqlQuery = {\n query: GetTopUserTransactions,\n variables: { limit }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries top user transactions\n *\n * @param startVersion optional - can be set to tell indexer what version to start from\n * @returns GetUserTransactionsQuery response type\n */\n async getUserTransactions(extraArgs) {\n var _a, _b;\n const whereCondition = {\n version: { _lte: extraArgs == null ? void 0 : extraArgs.startVersion }\n };\n const graphqlQuery = {\n query: GetUserTransactions,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n // STAKING //\n /**\n * Queries delegated staking activities\n *\n * @param delegatorAddress Delegator address\n * @param poolAddress Pool address\n * @returns GetDelegatedStakingActivitiesQuery response type\n */\n async getDelegatedStakingActivities(delegatorAddress, poolAddress) {\n const delegator = HexString.ensure(delegatorAddress).hex();\n const pool = HexString.ensure(poolAddress).hex();\n _IndexerClient.validateAddress(delegator);\n _IndexerClient.validateAddress(pool);\n const graphqlQuery = {\n query: GetDelegatedStakingActivities,\n variables: {\n delegatorAddress: delegator,\n poolAddress: pool\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries current number of delegators in a pool\n *\n * @returns GetNumberOfDelegatorsQuery response type\n */\n async getNumberOfDelegators(poolAddress) {\n const address = HexString.ensure(poolAddress).hex();\n _IndexerClient.validateAddress(address);\n const graphqlQuery = {\n query: GetNumberOfDelegators,\n variables: { poolAddress: address }\n };\n return this.queryIndexer(graphqlQuery);\n }\n // ACCOUNT //\n /**\n * Queries an account coin data\n *\n * @param ownerAddress Owner address\n * @returns GetAccountCoinsDataQuery response type\n */\n async getAccountCoinsData(ownerAddress, extraArgs) {\n var _a, _b;\n const address = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(address);\n const whereCondition = {\n owner_address: { _eq: address }\n };\n const graphqlQuery = {\n query: GetAccountCoinsData,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries an account coin data count\n *\n * @param ownerAddress Owner address\n * @returns GetAccountCoinsDataCountQuery response type\n */\n async getAccountCoinsDataCount(ownerAddress) {\n const address = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(address);\n const graphqlQuery = {\n query: GetAccountCoinsDataCount,\n variables: {\n address\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n /**\n * Queries an account owned objects\n *\n * @param ownerAddress Owner address\n * @returns GetCurrentObjectsQuery response type\n */\n async getAccountOwnedObjects(ownerAddress, extraArgs) {\n var _a, _b;\n const address = HexString.ensure(ownerAddress).hex();\n _IndexerClient.validateAddress(address);\n const whereCondition = {\n owner_address: { _eq: address }\n };\n const graphqlQuery = {\n query: GetCurrentObjects,\n variables: {\n where_condition: whereCondition,\n offset: (_a = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _a.offset,\n limit: (_b = extraArgs == null ? void 0 : extraArgs.options) == null ? void 0 : _b.limit,\n order_by: extraArgs == null ? void 0 : extraArgs.orderBy\n }\n };\n return this.queryIndexer(graphqlQuery);\n }\n};\n\n// src/providers/provider.ts\nvar Provider = class {\n constructor(network, config, doNotFixNodeUrl = false) {\n let fullNodeUrl = null;\n let indexerUrl = null;\n if (typeof network === \"object\" && isCustomEndpoints(network)) {\n fullNodeUrl = network.fullnodeUrl;\n indexerUrl = network.indexerUrl;\n this.network = \"CUSTOM\";\n } else {\n fullNodeUrl = NetworkToNodeAPI[network];\n indexerUrl = NetworkToIndexerAPI[network];\n this.network = network;\n }\n if (this.network === \"CUSTOM\" && !fullNodeUrl) {\n throw new Error(\"fullnode url is not provided\");\n }\n if (indexerUrl) {\n this.indexerClient = new IndexerClient(indexerUrl, config);\n }\n this.aptosClient = new AptosClient(fullNodeUrl, config, doNotFixNodeUrl);\n }\n};\nfunction applyMixin(targetClass, baseClass, baseClassProp) {\n Object.getOwnPropertyNames(baseClass.prototype).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass.prototype, propertyName);\n if (!propertyDescriptor)\n return;\n propertyDescriptor.value = function(...args) {\n return this[baseClassProp][propertyName](...args);\n };\n Object.defineProperty(targetClass.prototype, propertyName, propertyDescriptor);\n });\n Object.getOwnPropertyNames(baseClass).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(baseClass, propertyName);\n if (!propertyDescriptor)\n return;\n propertyDescriptor.value = function(...args) {\n return this[baseClassProp][propertyName](...args);\n };\n if (targetClass.hasOwnProperty.call(targetClass, propertyName)) {\n return;\n }\n Object.defineProperty(targetClass, propertyName, propertyDescriptor);\n });\n}\napplyMixin(Provider, AptosClient, \"aptosClient\");\napplyMixin(Provider, IndexerClient, \"indexerClient\");\nfunction isCustomEndpoints(network) {\n return network.fullnodeUrl !== void 0 && typeof network.fullnodeUrl === \"string\";\n}\n\n// src/utils/property_map_serde.ts\nvar PropertyValue = class {\n constructor(type, value) {\n this.type = type;\n this.value = value;\n }\n};\nvar PropertyMap = class {\n constructor() {\n this.data = {};\n }\n setProperty(key, value) {\n this.data[key] = value;\n }\n};\nfunction getPropertyType(typ) {\n let typeTag;\n if (typ === \"string\" || typ === \"String\") {\n typeTag = new TypeTagStruct(stringStructTag);\n } else {\n typeTag = new TypeTagParser(typ).parseTypeTag();\n }\n return typeTag;\n}\nfunction getPropertyValueRaw(values, types) {\n if (values.length !== types.length) {\n throw new Error(\"Length of property values and types not match\");\n }\n const results = new Array();\n types.forEach((typ, index) => {\n try {\n const typeTag = getPropertyType(typ);\n const serializer = new Serializer();\n serializeArg(values[index], typeTag, serializer);\n results.push(serializer.getBytes());\n } catch (error) {\n results.push(new TextEncoder().encode(values[index]));\n }\n });\n return results;\n}\nfunction getSinglePropertyValueRaw(value, type) {\n if (!value || !type) {\n throw new Error(\"value or type can not be empty\");\n }\n try {\n const typeTag = getPropertyType(type);\n const serializer = new Serializer();\n serializeArg(value, typeTag, serializer);\n return serializer.getBytes();\n } catch (error) {\n return new TextEncoder().encode(value);\n }\n}\nfunction deserializePropertyMap(rawPropertyMap) {\n const entries = rawPropertyMap.map.data;\n const pm = new PropertyMap();\n entries.forEach((prop) => {\n const { key } = prop;\n const val = prop.value.value;\n const typ = prop.value.type;\n const typeTag = getPropertyType(typ);\n const newValue = deserializeValueBasedOnTypeTag(typeTag, val);\n const pv = new PropertyValue(typ, newValue);\n pm.setProperty(key, pv);\n });\n return pm;\n}\nfunction deserializeValueBasedOnTypeTag(tag, val) {\n const de = new Deserializer(new HexString(val).toUint8Array());\n let res = \"\";\n if (tag instanceof TypeTagU8) {\n res = de.deserializeU8().toString();\n } else if (tag instanceof TypeTagU64) {\n res = de.deserializeU64().toString();\n } else if (tag instanceof TypeTagU128) {\n res = de.deserializeU128().toString();\n } else if (tag instanceof TypeTagBool) {\n res = de.deserializeBool() ? \"true\" : \"false\";\n } else if (tag instanceof TypeTagAddress) {\n res = HexString.fromUint8Array(de.deserializeFixedBytes(32)).hex();\n } else if (tag instanceof TypeTagStruct && tag.isStringTypeTag()) {\n res = de.deserializeStr();\n } else {\n res = val;\n }\n return res;\n}\n\n// src/aptos_types/token_types.ts\nvar token_types_exports = {};\n__export(token_types_exports, {\n PropertyMap: () => PropertyMap,\n PropertyValue: () => PropertyValue,\n Token: () => Token,\n TokenData: () => TokenData\n});\nvar TokenData = class {\n constructor(collection, description, name, maximum, supply, uri, default_properties, mutability_config) {\n this.collection = collection;\n this.description = description;\n this.name = name;\n this.maximum = maximum;\n this.supply = supply;\n this.uri = uri;\n this.default_properties = deserializePropertyMap(default_properties);\n this.mutability_config = mutability_config;\n }\n};\nvar Token = class {\n constructor(id, amount, token_properties) {\n this.id = id;\n this.amount = amount;\n this.token_properties = deserializePropertyMap(token_properties);\n }\n};\n\n// src/plugins/token_client.ts\nvar TokenClient = class {\n /**\n * Creates new TokenClient instance\n *\n * @param aptosClient AptosClient instance\n */\n constructor(aptosClient2) {\n this.aptosClient = aptosClient2;\n }\n /**\n * Creates a new NFT collection within the specified account\n *\n * @param account AptosAccount where collection will be created\n * @param name Collection name\n * @param description Collection description\n * @param uri URL to additional info about collection\n * @param maxAmount Maximum number of `token_data` allowed within this collection\n * @returns The hash of the transaction submitted to the API\n */\n // :!:>createCollection\n async createCollection(account, name, description, uri, maxAmount = MAX_U64_BIG_INT, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::create_collection_script\",\n [],\n [name, description, uri, maxAmount, [false, false, false]]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Creates a new NFT within the specified account\n *\n * @param account AptosAccount where token will be created\n * @param collectionName Name of collection, that token belongs to\n * @param name Token name\n * @param description Token description\n * @param supply Token supply\n * @param uri URL to additional info about token\n * @param max The maxium of tokens can be minted from this token\n * @param royalty_payee_address the address to receive the royalty, the address can be a shared account address.\n * @param royalty_points_denominator the denominator for calculating royalty\n * @param royalty_points_numerator the numerator for calculating royalty\n * @param property_keys the property keys for storing on-chain properties\n * @param property_values the property values to be stored on-chain\n * @param property_types the type of property values\n * @returns The hash of the transaction submitted to the API\n */\n // :!:>createToken\n async createToken(account, collectionName, name, description, supply, uri, max = MAX_U64_BIG_INT, royalty_payee_address = account.address(), royalty_points_denominator = 0, royalty_points_numerator = 0, property_keys = [], property_values = [], property_types = [], extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::create_token_script\",\n [],\n [\n collectionName,\n name,\n description,\n supply,\n max,\n uri,\n royalty_payee_address,\n royalty_points_denominator,\n royalty_points_numerator,\n [false, false, false, false, false],\n property_keys,\n getPropertyValueRaw(property_values, property_types),\n property_types\n ]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Creates a new NFT within the specified account\n *\n * @param account AptosAccount where token will be created\n * @param collectionName Name of collection, that token belongs to\n * @param name Token name\n * @param description Token description\n * @param supply Token supply\n * @param uri URL to additional info about token\n * @param max The maxium of tokens can be minted from this token\n * @param royalty_payee_address the address to receive the royalty, the address can be a shared account address.\n * @param royalty_points_denominator the denominator for calculating royalty\n * @param royalty_points_numerator the numerator for calculating royalty\n * @param property_keys the property keys for storing on-chain properties\n * @param property_values the property values to be stored on-chain\n * @param property_types the type of property values\n * @param mutability_config configs which field is mutable\n * @returns The hash of the transaction submitted to the API\n */\n // :!:>createToken\n async createTokenWithMutabilityConfig(account, collectionName, name, description, supply, uri, max = MAX_U64_BIG_INT, royalty_payee_address = account.address(), royalty_points_denominator = 0, royalty_points_numerator = 0, property_keys = [], property_values = [], property_types = [], mutability_config = [false, false, false, false, false], extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::create_token_script\",\n [],\n [\n collectionName,\n name,\n description,\n supply,\n max,\n uri,\n royalty_payee_address,\n royalty_points_denominator,\n royalty_points_numerator,\n mutability_config,\n property_keys,\n property_values,\n property_types\n ]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Transfers specified amount of tokens from account to receiver\n *\n * @param account AptosAccount where token from which tokens will be transfered\n * @param receiver Hex-encoded 32 byte Aptos account address to which tokens will be transfered\n * @param creator Hex-encoded 32 byte Aptos account address to which created tokens\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param amount Amount of tokens which will be transfered\n * @param property_version the version of token PropertyMap with a default value 0.\n * @returns The hash of the transaction submitted to the API\n */\n async offerToken(account, receiver, creator, collectionName, name, amount, property_version = 0, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token_transfers::offer_script\",\n [],\n [receiver, creator, collectionName, name, property_version, amount]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Claims a token on specified account\n *\n * @param account AptosAccount which will claim token\n * @param sender Hex-encoded 32 byte Aptos account address which holds a token\n * @param creator Hex-encoded 32 byte Aptos account address which created a token\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param property_version the version of token PropertyMap with a default value 0.\n * @returns The hash of the transaction submitted to the API\n */\n async claimToken(account, sender, creator, collectionName, name, property_version = 0, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token_transfers::claim_script\",\n [],\n [sender, creator, collectionName, name, property_version]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Removes a token from pending claims list\n *\n * @param account AptosAccount which will remove token from pending list\n * @param receiver Hex-encoded 32 byte Aptos account address which had to claim token\n * @param creator Hex-encoded 32 byte Aptos account address which created a token\n * @param collectionName Name of collection where token is strored\n * @param name Token name\n * @param property_version the version of token PropertyMap with a default value 0.\n * @returns The hash of the transaction submitted to the API\n */\n async cancelTokenOffer(account, receiver, creator, collectionName, name, property_version = 0, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token_transfers::cancel_offer_script\",\n [],\n [receiver, creator, collectionName, name, property_version]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Directly transfer the specified amount of tokens from account to receiver\n * using a single multi signature transaction.\n *\n * @param sender AptosAccount where token from which tokens will be transferred\n * @param receiver Hex-encoded 32 byte Aptos account address to which tokens will be transferred\n * @param creator Hex-encoded 32 byte Aptos account address to which created tokens\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param amount Amount of tokens which will be transferred\n * @param property_version the version of token PropertyMap with a default value 0.\n * @returns The hash of the transaction submitted to the API\n */\n async directTransferToken(sender, receiver, creator, collectionName, name, amount, propertyVersion = 0, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: sender.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::direct_transfer_script\",\n [],\n [creator, collectionName, name, propertyVersion, amount]\n );\n const multiAgentTxn = new aptos_types_exports.MultiAgentRawTransaction(rawTxn, [\n aptos_types_exports.AccountAddress.fromHex(receiver.address())\n ]);\n const senderSignature = new aptos_types_exports.Ed25519Signature(\n sender.signBuffer(TransactionBuilder.getSigningMessage(multiAgentTxn)).toUint8Array()\n );\n const senderAuthenticator = new aptos_types_exports.AccountAuthenticatorEd25519(\n new aptos_types_exports.Ed25519PublicKey(sender.signingKey.publicKey),\n senderSignature\n );\n const receiverSignature = new aptos_types_exports.Ed25519Signature(\n receiver.signBuffer(TransactionBuilder.getSigningMessage(multiAgentTxn)).toUint8Array()\n );\n const receiverAuthenticator = new aptos_types_exports.AccountAuthenticatorEd25519(\n new aptos_types_exports.Ed25519PublicKey(receiver.signingKey.publicKey),\n receiverSignature\n );\n const multiAgentAuthenticator = new aptos_types_exports.TransactionAuthenticatorMultiAgent(\n senderAuthenticator,\n [aptos_types_exports.AccountAddress.fromHex(receiver.address())],\n // Secondary signer addresses\n [receiverAuthenticator]\n // Secondary signer authenticators\n );\n const bcsTxn = bcsToBytes(new aptos_types_exports.SignedTransaction(rawTxn, multiAgentAuthenticator));\n const transactionRes = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return transactionRes.hash;\n }\n /**\n * Directly transfer the specified amount of tokens from account to receiver\n * using a single multi signature transaction.\n *\n * @param sender AptosAccount where token from which tokens will be transferred\n * @param receiver Hex-encoded 32 byte Aptos account address to which tokens will be transferred\n * @param creator Hex-encoded 32 byte Aptos account address to which created tokens\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param amount Amount of tokens which will be transferred\n * @param fee_payer AptosAccount which will pay fee for transaction\n * @param property_version the version of token PropertyMap with a default value 0.\n * @returns The hash of the transaction submitted to the API\n */\n async directTransferTokenWithFeePayer(sender, receiver, creator, collectionName, name, amount, fee_payer, propertyVersion = 0, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: sender.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::direct_transfer_script\",\n [],\n [creator, collectionName, name, propertyVersion, amount]\n );\n const feePayerTxn = new aptos_types_exports.FeePayerRawTransaction(\n rawTxn,\n [aptos_types_exports.AccountAddress.fromHex(receiver.address())],\n aptos_types_exports.AccountAddress.fromHex(fee_payer.address())\n );\n const senderSignature = new aptos_types_exports.Ed25519Signature(\n sender.signBuffer(TransactionBuilder.getSigningMessage(feePayerTxn)).toUint8Array()\n );\n const senderAuthenticator = new aptos_types_exports.AccountAuthenticatorEd25519(\n new aptos_types_exports.Ed25519PublicKey(sender.signingKey.publicKey),\n senderSignature\n );\n const receiverSignature = new aptos_types_exports.Ed25519Signature(\n receiver.signBuffer(TransactionBuilder.getSigningMessage(feePayerTxn)).toUint8Array()\n );\n const receiverAuthenticator = new aptos_types_exports.AccountAuthenticatorEd25519(\n new aptos_types_exports.Ed25519PublicKey(receiver.signingKey.publicKey),\n receiverSignature\n );\n const feePayerSignature = new aptos_types_exports.Ed25519Signature(\n fee_payer.signBuffer(TransactionBuilder.getSigningMessage(feePayerTxn)).toUint8Array()\n );\n const feePayerAuthenticator = new aptos_types_exports.AccountAuthenticatorEd25519(\n new aptos_types_exports.Ed25519PublicKey(fee_payer.signingKey.publicKey),\n feePayerSignature\n );\n const txAuthenticatorFeePayer = new aptos_types_exports.TransactionAuthenticatorFeePayer(\n senderAuthenticator,\n [aptos_types_exports.AccountAddress.fromHex(receiver.address())],\n [receiverAuthenticator],\n { address: aptos_types_exports.AccountAddress.fromHex(fee_payer.address()), authenticator: feePayerAuthenticator }\n );\n const bcsTxn = bcsToBytes(new aptos_types_exports.SignedTransaction(rawTxn, txAuthenticatorFeePayer));\n const transactionRes = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return transactionRes.hash;\n }\n /**\n * User opt-in or out direct transfer through a boolean flag\n *\n * @param sender AptosAccount where the token will be transferred\n * @param optIn boolean value indicates user want to opt-in or out of direct transfer\n * @returns The hash of the transaction submitted to the API\n */\n async optInTokenTransfer(sender, optIn, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: sender.address(), ...extraArgs });\n const rawTxn = await builder.build(\"0x3::token::opt_in_direct_transfer\", [], [optIn]);\n const bcsTxn = AptosClient.generateBCSTransaction(sender, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Directly transfer token to a receiver. The receiver should have opted in to direct transfer\n *\n * @param sender AptosAccount where the token will be transferred\n * @param creator address of the token creator\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param property_version the version of token PropertyMap\n * @param amount Amount of tokens which will be transfered\n * @returns The hash of the transaction submitted to the API\n */\n async transferWithOptIn(sender, creator, collectionName, tokenName, propertyVersion, receiver, amount, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: sender.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::transfer_with_opt_in\",\n [],\n [creator, collectionName, tokenName, propertyVersion, receiver, amount]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(sender, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * BurnToken by Creator\n *\n * @param creator creator of the token\n * @param ownerAddress address of the token owner\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param amount Amount of tokens which will be transfered\n * @param property_version the version of token PropertyMap\n * @returns The hash of the transaction submitted to the API\n */\n async burnByCreator(creator, ownerAddress, collection, name, PropertyVersion, amount, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: creator.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::burn_by_creator\",\n [],\n [ownerAddress, collection, name, PropertyVersion, amount]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(creator, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * BurnToken by Owner\n *\n * @param owner creator of the token\n * @param creatorAddress address of the token creator\n * @param collectionName Name of collection where token is stored\n * @param name Token name\n * @param amount Amount of tokens which will be transfered\n * @param property_version the version of token PropertyMap\n * @returns The hash of the transaction submitted to the API\n */\n async burnByOwner(owner, creatorAddress, collection, name, PropertyVersion, amount, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: owner.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::burn\",\n [],\n [creatorAddress, collection, name, PropertyVersion, amount]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(owner, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * creator mutates the properties of the tokens\n *\n * @param account AptosAccount who modifies the token properties\n * @param tokenOwner the address of account owning the token\n * @param creator the creator of the token\n * @param collection_name the name of the token collection\n * @param tokenName the name of created token\n * @param propertyVersion the property_version of the token to be modified\n * @param amount the number of tokens to be modified\n *\n * @returns The hash of the transaction submitted to the API\n */\n async mutateTokenProperties(account, tokenOwner, creator, collection_name, tokenName, propertyVersion, amount, keys, values, types, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: account.address(), ...extraArgs });\n const rawTxn = await builder.build(\n \"0x3::token::mutate_token_properties\",\n [],\n [tokenOwner, creator, collection_name, tokenName, propertyVersion, amount, keys, values, types]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Queries collection data\n * @param creator Hex-encoded 32 byte Aptos account address which created a collection\n * @param collectionName Collection name\n * @returns Collection data in below format\n * ```\n * Collection {\n * // Describes the collection\n * description: string,\n * // Unique name within this creators account for this collection\n * name: string,\n * // URL for additional information/media\n * uri: string,\n * // Total number of distinct Tokens tracked by the collection\n * count: number,\n * // Optional maximum number of tokens allowed within this collections\n * maximum: number\n * }\n * ```\n */\n async getCollectionData(creator, collectionName) {\n const resources = await this.aptosClient.getAccountResources(creator);\n const accountResource = resources.find(\n (r) => r.type === \"0x3::token::Collections\"\n );\n const { handle } = accountResource.data.collection_data;\n const getCollectionTableItemRequest = {\n key_type: \"0x1::string::String\",\n value_type: \"0x3::token::CollectionData\",\n key: collectionName\n };\n const collectionTable = await this.aptosClient.getTableItem(handle, getCollectionTableItemRequest);\n return collectionTable;\n }\n /**\n * Queries token data from collection\n *\n * @param creator Hex-encoded 32 byte Aptos account address which created a token\n * @param collectionName Name of collection, which holds a token\n * @param tokenName Token name\n * @returns Token data in below format\n * ```\n * TokenData {\n * // Unique name within this creators account for this Token's collection\n * collection: string;\n * // Describes this Token\n * description: string;\n * // The name of this Token\n * name: string;\n * // Optional maximum number of this type of Token.\n * maximum: number;\n * // Total number of this type of Token\n * supply: number;\n * /// URL for additional information / media\n * uri: string;\n * }\n * ```\n */\n // :!:>getTokenData\n async getTokenData(creator, collectionName, tokenName) {\n const creatorHex = creator instanceof HexString ? creator.hex() : creator;\n const collection = await this.aptosClient.getAccountResource(\n creatorHex,\n \"0x3::token::Collections\"\n );\n const { handle } = collection.data.token_data;\n const tokenDataId = {\n creator: creatorHex,\n collection: collectionName,\n name: tokenName\n };\n const getTokenTableItemRequest = {\n key_type: \"0x3::token::TokenDataId\",\n value_type: \"0x3::token::TokenData\",\n key: tokenDataId\n };\n const rawTokenData = await this.aptosClient.getTableItem(handle, getTokenTableItemRequest);\n return new TokenData(\n rawTokenData.collection,\n rawTokenData.description,\n rawTokenData.name,\n rawTokenData.maximum,\n rawTokenData.supply,\n rawTokenData.uri,\n rawTokenData.default_properties,\n rawTokenData.mutability_config\n );\n }\n // <:!:getTokenData\n /**\n * Queries token balance for the token creator\n */\n async getToken(creator, collectionName, tokenName, property_version = \"0\") {\n const tokenDataId = {\n creator: creator instanceof HexString ? creator.hex() : creator,\n collection: collectionName,\n name: tokenName\n };\n return this.getTokenForAccount(creator, {\n token_data_id: tokenDataId,\n property_version\n });\n }\n /**\n * Queries token balance for a token account\n * @param account Hex-encoded 32 byte Aptos account address which created a token\n * @param tokenId token id\n *\n * TODO: Update this:\n * @example\n * ```\n * {\n * creator: '0x1',\n * collection: 'Some collection',\n * name: 'Awesome token'\n * }\n * ```\n * @returns Token object in below format\n * ```\n * Token {\n * id: TokenId;\n * value: number;\n * }\n * ```\n */\n async getTokenForAccount(account, tokenId) {\n const tokenStore = await this.aptosClient.getAccountResource(\n account instanceof HexString ? account.hex() : account,\n \"0x3::token::TokenStore\"\n );\n const { handle } = tokenStore.data.tokens;\n const getTokenTableItemRequest = {\n key_type: \"0x3::token::TokenId\",\n value_type: \"0x3::token::Token\",\n key: tokenId\n };\n try {\n const rawToken = await this.aptosClient.getTableItem(handle, getTokenTableItemRequest);\n return new Token(rawToken.id, rawToken.amount, rawToken.token_properties);\n } catch (error) {\n if ((error == null ? void 0 : error.status) === 404) {\n return {\n id: tokenId,\n amount: \"0\",\n token_properties: new PropertyMap()\n };\n }\n return error;\n }\n }\n};\n\n// src/plugins/fungible_asset_client.ts\nvar FungibleAssetClient = class {\n /**\n * Creates new FungibleAssetClient instance\n *\n * @param provider Provider instance\n */\n constructor(provider) {\n this.assetType = \"0x1::fungible_asset::Metadata\";\n this.provider = provider;\n }\n /**\n * Transfer `amount` of fungible asset from sender's primary store to recipient's primary store.\n *\n * Use this method to transfer any fungible asset including fungible token.\n *\n * @param sender The sender account\n * @param fungibleAssetMetadataAddress The fungible asset address.\n * For example if you’re transferring USDT this would be the USDT address\n * @param recipient Recipient address\n * @param amount Number of assets to transfer\n * @returns The hash of the transaction submitted to the API\n */\n async transfer(sender, fungibleAssetMetadataAddress, recipient, amount, extraArgs) {\n const rawTransaction = await this.generateTransfer(\n sender,\n fungibleAssetMetadataAddress,\n recipient,\n amount,\n extraArgs\n );\n const txnHash = await this.provider.signAndSubmitTransaction(sender, rawTransaction);\n return txnHash;\n }\n /**\n * Get the balance of a fungible asset from the account's primary fungible store.\n *\n * @param account Account that you want to get the balance of.\n * @param fungibleAssetMetadataAddress The fungible asset address you want to check the balance of\n * @returns Promise that resolves to the balance\n */\n async getPrimaryBalance(account, fungibleAssetMetadataAddress) {\n const payload = {\n function: \"0x1::primary_fungible_store::balance\",\n type_arguments: [this.assetType],\n arguments: [HexString.ensure(account).hex(), HexString.ensure(fungibleAssetMetadataAddress).hex()]\n };\n const response = await this.provider.view(payload);\n return BigInt(response[0]);\n }\n /**\n *\n * Generate a transfer transaction that can be used to sign and submit to transfer an asset amount\n * from the sender primary fungible store to the recipient primary fungible store.\n *\n * This method can be used if you want/need to get the raw transaction so you can\n * first simulate the transaction and then sign and submit it.\n *\n * @param sender The sender account\n * @param fungibleAssetMetadataAddress The fungible asset address.\n * For example if you’re transferring USDT this would be the USDT address\n * @param recipient Recipient address\n * @param amount Number of assets to transfer\n * @returns Raw Transaction\n */\n async generateTransfer(sender, fungibleAssetMetadataAddress, recipient, amount, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.provider, {\n sender: sender.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(\n \"0x1::primary_fungible_store::transfer\",\n [this.assetType],\n [HexString.ensure(fungibleAssetMetadataAddress).hex(), HexString.ensure(recipient).hex(), amount]\n );\n return rawTxn;\n }\n};\n\n// src/plugins/aptos_token.ts\nvar PropertyTypeMap = {\n BOOLEAN: \"bool\",\n U8: \"u8\",\n U16: \"u16\",\n U32: \"u32\",\n U64: \"u64\",\n U128: \"u128\",\n U256: \"u256\",\n ADDRESS: \"address\",\n VECTOR: \"vector\",\n STRING: \"string\"\n};\nvar AptosToken = class {\n /**\n * Creates new AptosToken instance\n *\n * @param provider Provider instance\n */\n constructor(provider) {\n this.tokenType = \"0x4::token::Token\";\n this.provider = provider;\n }\n async submitTransaction(account, funcName, typeArgs, args, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.provider, {\n sender: account.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(`0x4::aptos_token::${funcName}`, typeArgs, args);\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Creates a new collection within the specified account\n *\n * @param creator AptosAccount where collection will be created\n * @param description Collection description\n * @param name Collection name\n * @param uri URL to additional info about collection\n * @param options CreateCollectionOptions type. By default all values set to `true` or `0`\n * @returns The hash of the transaction submitted to the API\n */\n // :!:>createCollection\n async createCollection(creator, description, name, uri, maxSupply = MAX_U64_BIG_INT, options, extraArgs) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;\n return this.submitTransaction(\n creator,\n \"create_collection\",\n [],\n [\n description,\n maxSupply,\n name,\n uri,\n (_a = options == null ? void 0 : options.mutableDescription) != null ? _a : true,\n (_b = options == null ? void 0 : options.mutableRoyalty) != null ? _b : true,\n (_c = options == null ? void 0 : options.mutableURI) != null ? _c : true,\n (_d = options == null ? void 0 : options.mutableTokenDescription) != null ? _d : true,\n (_e = options == null ? void 0 : options.mutableTokenName) != null ? _e : true,\n (_f = options == null ? void 0 : options.mutableTokenProperties) != null ? _f : true,\n (_g = options == null ? void 0 : options.mutableTokenURI) != null ? _g : true,\n (_h = options == null ? void 0 : options.tokensBurnableByCreator) != null ? _h : true,\n (_i = options == null ? void 0 : options.tokensFreezableByCreator) != null ? _i : true,\n (_j = options == null ? void 0 : options.royaltyNumerator) != null ? _j : 0,\n (_k = options == null ? void 0 : options.royaltyDenominator) != null ? _k : 1\n ],\n extraArgs\n );\n }\n /**\n * Mint a new token within the specified account\n *\n * @param account AptosAccount where token will be created\n * @param collection Name of collection, that token belongs to\n * @param description Token description\n * @param name Token name\n * @param uri URL to additional info about token\n * @param propertyKeys the property keys for storing on-chain properties\n * @param propertyTypes the type of property values\n * @param propertyValues the property values to be stored on-chain\n * @returns The hash of the transaction submitted to the API\n */\n // :!:>mint\n async mint(account, collection, description, name, uri, propertyKeys = [], propertyTypes = [], propertyValues = [], extraArgs) {\n return this.submitTransaction(\n account,\n \"mint\",\n [],\n [\n collection,\n description,\n name,\n uri,\n propertyKeys,\n propertyTypes,\n getPropertyValueRaw(propertyValues, propertyTypes)\n ],\n extraArgs\n );\n }\n /**\n * Mint a soul bound token into a recipient's account\n *\n * @param account AptosAccount that mints the token\n * @param collection Name of collection, that token belongs to\n * @param description Token description\n * @param name Token name\n * @param uri URL to additional info about token\n * @param recipient AptosAccount where token will be created\n * @param propertyKeys the property keys for storing on-chain properties\n * @param propertyTypes the type of property values\n * @param propertyValues the property values to be stored on-chain\n * @returns The hash of the transaction submitted to the API\n */\n async mintSoulBound(account, collection, description, name, uri, recipient, propertyKeys = [], propertyTypes = [], propertyValues = [], extraArgs) {\n return this.submitTransaction(\n account,\n \"mint_soul_bound\",\n [],\n [\n collection,\n description,\n name,\n uri,\n propertyKeys,\n propertyTypes,\n getPropertyValueRaw(propertyValues, propertyTypes),\n recipient.address().hex()\n ],\n extraArgs\n );\n }\n /**\n * Burn a token by its creator\n * @param creator Creator account\n * @param token Token address\n * @returns The hash of the transaction submitted to the API\n */\n async burnToken(creator, token, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"burn\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex()],\n extraArgs\n );\n }\n /**\n * Freeze token transfer ability\n * @param creator Creator account\n * @param token Token address\n * @returns The hash of the transaction submitted to the API\n */\n async freezeTokenTransafer(creator, token, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"freeze_transfer\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex()],\n extraArgs\n );\n }\n /**\n * Unfreeze token transfer ability\n * @param creator Creator account\n * @param token Token address\n * @returns The hash of the transaction submitted to the API\n */\n async unfreezeTokenTransafer(creator, token, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"unfreeze_transfer\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex()],\n extraArgs\n );\n }\n /**\n * Set token description\n * @param creator Creator account\n * @param token Token address\n * @param description Token description\n * @returns The hash of the transaction submitted to the API\n */\n async setTokenDescription(creator, token, description, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"set_description\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex(), description],\n extraArgs\n );\n }\n /**\n * Set token name\n * @param creator Creator account\n * @param token Token address\n * @param name Token name\n * @returns The hash of the transaction submitted to the API\n */\n async setTokenName(creator, token, name, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"set_name\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex(), name],\n extraArgs\n );\n }\n /**\n * Set token URI\n * @param creator Creator account\n * @param token Token address\n * @param uri Token uri\n * @returns The hash of the transaction submitted to the API\n */\n async setTokenURI(creator, token, uri, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"set_uri\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex(), uri],\n extraArgs\n );\n }\n /**\n * Add token property\n * @param creator Creator account\n * @param token Token address\n * @param key the property key for storing on-chain property\n * @param type the type of property value\n * @param value the property value to be stored on-chain\n * @returns The hash of the transaction submitted to the API\n */\n async addTokenProperty(creator, token, propertyKey, propertyType, propertyValue, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"add_property\",\n [tokenType || this.tokenType],\n [\n HexString.ensure(token).hex(),\n propertyKey,\n PropertyTypeMap[propertyType],\n getSinglePropertyValueRaw(propertyValue, PropertyTypeMap[propertyType])\n ],\n extraArgs\n );\n }\n /**\n * Remove token property\n * @param creator Creator account\n * @param token Token address\n * @param key the property key stored on-chain\n * @returns The hash of the transaction submitted to the API\n */\n async removeTokenProperty(creator, token, propertyKey, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"remove_property\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex(), propertyKey],\n extraArgs\n );\n }\n /**\n * Update token property\n * @param creator Creator account\n * @param token Token address\n * @param key the property key stored on-chain\n * @param type the property typed stored on-chain\n * @param value the property value to be stored on-chain\n * @returns The hash of the transaction submitted to the API\n */\n async updateTokenProperty(creator, token, propertyKey, propertyType, propertyValue, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"update_property\",\n [tokenType || this.tokenType],\n [\n HexString.ensure(token).hex(),\n propertyKey,\n PropertyTypeMap[propertyType],\n getSinglePropertyValueRaw(propertyValue, PropertyTypeMap[propertyType])\n ],\n extraArgs\n );\n }\n async addTypedProperty(creator, token, propertyKey, propertyType, propertyValue, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"add_typed_property\",\n [tokenType || this.tokenType, PropertyTypeMap[propertyType]],\n [HexString.ensure(token).hex(), propertyKey, propertyValue],\n extraArgs\n );\n }\n async updateTypedProperty(creator, token, propertyKey, propertyType, propertyValue, tokenType, extraArgs) {\n return this.submitTransaction(\n creator,\n \"update_typed_property\",\n [tokenType || this.tokenType, PropertyTypeMap[propertyType]],\n [HexString.ensure(token).hex(), propertyKey, propertyValue],\n extraArgs\n );\n }\n /**\n * Transfer a non fungible token ownership.\n * We can transfer a token only when the token is not frozen (i.e. owner transfer is not disabled such as for soul bound tokens)\n * @param owner The account of the current token owner\n * @param token Token address\n * @param recipient Recipient address\n * @returns The hash of the transaction submitted to the API\n */\n async transferTokenOwnership(owner, token, recipient, tokenType, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.provider, {\n sender: owner.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(\n \"0x1::object::transfer\",\n [tokenType || this.tokenType],\n [HexString.ensure(token).hex(), HexString.ensure(recipient).hex()]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(owner, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Transfer a token. This function supports transfer non-fungible token and fungible token.\n *\n * To set the token type, set isFungibleToken param to true or false.\n * If isFungibleToken param is not set, the function would query Indexer\n * for the token data and check whether it is a non-fungible or a fungible token.\n *\n * Note: this function supports only token v2 standard (it does not support the token v1 standard)\n *\n * @param data NonFungibleTokenParameters | FungibleTokenParameters type\n * @param isFungibleToken (optional) The token type, non-fungible or fungible token.\n * @returns The hash of the transaction submitted to the API\n */\n async transfer(data, isFungibleToken) {\n let isFungible = isFungibleToken;\n if (isFungible === void 0 || isFungible === null) {\n const tokenData = await this.provider.getTokenData(HexString.ensure(data.tokenAddress).hex());\n isFungible = tokenData.current_token_datas_v2[0].is_fungible_v2;\n }\n if (isFungible) {\n const token2 = data;\n const fungibleAsset = new FungibleAssetClient(this.provider);\n const txnHash2 = await fungibleAsset.transfer(\n token2.owner,\n token2.tokenAddress,\n token2.recipient,\n token2.amount,\n token2.extraArgs\n );\n return txnHash2;\n }\n const token = data;\n const txnHash = await this.transferTokenOwnership(\n token.owner,\n token.tokenAddress,\n token.recipient,\n token.tokenType,\n token.extraArgs\n );\n return txnHash;\n }\n /**\n * Burn an object by the object owner\n * @param owner The object owner account\n * @param objectId The object address\n * @optional objectType. The object type, default to \"0x1::object::ObjectCore\"\n * @returns The hash of the transaction submitted to the API\n */\n async burnObject(owner, objectId, objectType, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.provider, {\n sender: owner.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(\n \"0x1::object::burn\",\n [objectType || \"0x1::object::ObjectCore\"],\n [HexString.ensure(objectId).hex()]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(owner, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n};\n\n// src/plugins/coin_client.ts\nvar TRANSFER_COINS = \"0x1::aptos_account::transfer_coins\";\nvar COIN_TRANSFER = \"0x1::coin::transfer\";\nvar CoinClient = class {\n /**\n * Creates new CoinClient instance\n * @param aptosClient AptosClient instance\n */\n constructor(aptosClient2) {\n this.aptosClient = aptosClient2;\n }\n /**\n * Generate, sign, and submit a transaction to the Aptos blockchain API to\n * transfer coins from one account to another. By default it transfers\n * 0x1::aptos_coin::AptosCoin, but you can specify a different coin type\n * with the `coinType` argument.\n *\n * You may set `createReceiverIfMissing` to true if you want to create the\n * receiver account if it does not exist on chain yet. If you do not set\n * this to true, the transaction will fail if the receiver account does not\n * exist on-chain.\n *\n * The TS SDK supports fungible assets operations. If you want to use CoinClient\n * with this feature, set the `coinType` to be the fungible asset metadata address.\n * This option uses the `FungibleAssetClient` class and queries the\n * fungible asset primary store.\n *\n * @param from Account sending the coins\n * @param to Account to receive the coins\n * @param amount Number of coins to transfer\n * @param extraArgs Extra args for building the transaction or configuring how\n * the client should submit and wait for the transaction\n * @returns The hash of the transaction submitted to the API\n */\n // :!:>transfer\n async transfer(from, to, amount, extraArgs) {\n var _a, _b, _c;\n const isTypeTag = ((_a = extraArgs == null ? void 0 : extraArgs.coinType) != null ? _a : \"\").toString().includes(\"::\");\n if ((extraArgs == null ? void 0 : extraArgs.coinType) && !isTypeTag && AccountAddress.isValid(extraArgs.coinType)) {\n console.warn(\"to transfer a fungible asset, use `FungibleAssetClient()` class for better support\");\n const provider = new Provider({\n fullnodeUrl: this.aptosClient.nodeUrl,\n indexerUrl: (_b = NetworkToIndexerAPI[NodeAPIToNetwork[this.aptosClient.nodeUrl]]) != null ? _b : this.aptosClient.nodeUrl\n });\n const fungibleAsset = new FungibleAssetClient(provider);\n const txnHash = await fungibleAsset.transfer(\n from,\n extraArgs == null ? void 0 : extraArgs.coinType,\n getAddressFromAccountOrAddress(to),\n amount\n );\n return txnHash;\n }\n const coinTypeToTransfer = (_c = extraArgs == null ? void 0 : extraArgs.coinType) != null ? _c : APTOS_COIN;\n let func;\n if ((extraArgs == null ? void 0 : extraArgs.createReceiverIfMissing) === void 0) {\n func = TRANSFER_COINS;\n } else {\n func = (extraArgs == null ? void 0 : extraArgs.createReceiverIfMissing) ? TRANSFER_COINS : COIN_TRANSFER;\n }\n const toAddress = getAddressFromAccountOrAddress(to);\n const builder = new TransactionBuilderRemoteABI(this.aptosClient, { sender: from.address(), ...extraArgs });\n const rawTxn = await builder.build(func, [coinTypeToTransfer], [toAddress, amount]);\n const bcsTxn = AptosClient.generateBCSTransaction(from, rawTxn);\n const pendingTransaction = await this.aptosClient.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n // <:!:transfer\n /**\n * Get the balance of the account. By default it checks the balance of\n * 0x1::aptos_coin::AptosCoin, but you can specify a different coin type.\n *\n * to use a different type, set the `coinType` to be the fungible asset type.\n *\n * The TS SDK supports fungible assets operations. If you want to use CoinClient\n * with this feature, set the `coinType` to be the fungible asset metadata address.\n * This option uses the FungibleAssetClient class and queries the\n * fungible asset primary store.\n *\n * @param account Account that you want to get the balance of.\n * @param extraArgs Extra args for checking the balance.\n * @returns Promise that resolves to the balance as a bigint.\n */\n // :!:>checkBalance\n async checkBalance(account, extraArgs) {\n var _a, _b, _c;\n const isTypeTag = ((_a = extraArgs == null ? void 0 : extraArgs.coinType) != null ? _a : \"\").toString().includes(\"::\");\n if ((extraArgs == null ? void 0 : extraArgs.coinType) && !isTypeTag && AccountAddress.isValid(extraArgs.coinType)) {\n console.warn(\"to check balance of a fungible asset, use `FungibleAssetClient()` class for better support\");\n const provider = new Provider({\n fullnodeUrl: this.aptosClient.nodeUrl,\n indexerUrl: (_b = NetworkToIndexerAPI[NodeAPIToNetwork[this.aptosClient.nodeUrl]]) != null ? _b : this.aptosClient.nodeUrl\n });\n const fungibleAsset = new FungibleAssetClient(provider);\n const balance = await fungibleAsset.getPrimaryBalance(\n getAddressFromAccountOrAddress(account),\n extraArgs == null ? void 0 : extraArgs.coinType\n );\n return balance;\n }\n const coinType = (_c = extraArgs == null ? void 0 : extraArgs.coinType) != null ? _c : APTOS_COIN;\n const typeTag = `0x1::coin::CoinStore<${coinType}>`;\n const address = getAddressFromAccountOrAddress(account);\n const accountResource = await this.aptosClient.getAccountResource(address, typeTag);\n return BigInt(accountResource.data.coin.value);\n }\n // <:!:checkBalance\n};\n\n// src/plugins/faucet_client.ts\nvar FaucetClient = class extends AptosClient {\n /**\n * Establishes a connection to Aptos node\n * @param nodeUrl A url of the Aptos Node API endpoint\n * @param faucetUrl A faucet url\n * @param config An optional config for inner axios instance\n * Detailed config description: {@link https://github.com/axios/axios#request-config}\n */\n constructor(nodeUrl, faucetUrl, config) {\n super(nodeUrl, config);\n if (!faucetUrl) {\n throw new Error(\"Faucet URL cannot be empty.\");\n }\n this.faucetUrl = faucetUrl;\n this.config = config;\n }\n /**\n * This creates an account if it does not exist and mints the specified amount of\n * coins into that account\n * @param address Hex-encoded 16 bytes Aptos account address wich mints tokens\n * @param amount Amount of tokens to mint\n * @param timeoutSecs\n * @returns Hashes of submitted transactions\n */\n async fundAccount(address, amount, timeoutSecs = DEFAULT_TXN_TIMEOUT_SEC) {\n const { data } = await post({\n url: this.faucetUrl,\n endpoint: \"mint\",\n body: null,\n params: {\n address: HexString.ensure(address).noPrefix(),\n amount\n },\n overrides: { ...this.config },\n originMethod: \"fundAccount\"\n });\n const promises = [];\n for (let i = 0; i < data.length; i += 1) {\n const tnxHash = data[i];\n promises.push(this.waitForTransaction(tnxHash, { timeoutSecs }));\n }\n await Promise.all(promises);\n return data;\n }\n};\n\n// src/plugins/ans_client.ts\nvar ansContractsMap = {\n testnet: \"0x5f8fd2347449685cf41d4db97926ec3a096eaf381332be4f1318ad4d16a8497c\",\n mainnet: \"0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c\"\n};\nvar nameComponentPattern = /^[a-z\\d][a-z\\d-]{1,61}[a-z\\d]$/;\nvar namePattern = new RegExp(\n \"^(?:(?[^.]+)\\\\.(?!apt$))?(?[^.]+)(?:\\\\.apt)?$\"\n);\nvar AnsClient = class {\n /**\n * Creates new AnsClient instance\n * @param provider Provider instance\n * @param contractAddress An optional contract address.\n * If there is no contract address matching to the provided network\n * then the AnsClient class expects a contract address -\n * this is to support both mainnet/testnet networks and local development.\n */\n constructor(provider, contractAddress) {\n var _a;\n this.provider = provider;\n if (!ansContractsMap[this.provider.network] && !contractAddress) {\n throw new Error(\"Error: For custom providers, you must pass in a contract address\");\n }\n this.contractAddress = (_a = ansContractsMap[this.provider.network]) != null ? _a : contractAddress;\n }\n /**\n * Returns the primary name for the given account address\n * @param address An account address\n * @returns Account's primary name | null if there is no primary name defined\n */\n async getPrimaryNameByAddress(address) {\n const ansResource = await this.provider.getAccountResource(\n this.contractAddress,\n `${this.contractAddress}::domains::ReverseLookupRegistryV1`\n );\n const data = ansResource.data;\n const { handle } = data.registry;\n const domainsTableItemRequest = {\n key_type: \"address\",\n value_type: `${this.contractAddress}::domains::NameRecordKeyV1`,\n key: address\n };\n try {\n const item = await this.provider.getTableItem(handle, domainsTableItemRequest);\n return item.subdomain_name.vec[0] ? `${item.subdomain_name.vec[0]}.${item.domain_name}` : item.domain_name;\n } catch (error) {\n if (error.status === 404) {\n return null;\n }\n throw new Error(error);\n }\n }\n /**\n * Returns the target account address for the given name\n * @param name ANS name\n * @returns Account address | null\n */\n async getAddressByName(name) {\n var _a, _b;\n const { domain, subdomain } = (_b = (_a = name.match(namePattern)) == null ? void 0 : _a.groups) != null ? _b : {};\n if (!domain)\n return null;\n const registration = subdomain ? await this.getRegistrationForSubdomainName(domain, subdomain) : await this.getRegistrationForDomainName(domain);\n return registration === null ? null : registration.target;\n }\n /**\n * Mint a new Aptos name\n *\n * @param account AptosAccount where collection will be created\n * @param domainName Aptos domain name to mint\n * @param years year duration of the domain name\n * @returns The hash of the pending transaction submitted to the API\n */\n async mintAptosName(account, domainName, years = 1, extraArgs) {\n if (domainName.match(nameComponentPattern) === null) {\n throw new ApiError(400, `Name ${domainName} is not valid`);\n }\n const registration = await this.getRegistrationForDomainName(domainName);\n if (registration) {\n const now2 = Math.ceil(Date.now() / 1e3);\n if (now2 < registration.expirationTimestampSeconds) {\n throw new ApiError(400, `Name ${domainName} is not available`);\n }\n }\n const builder = new TransactionBuilderRemoteABI(this.provider.aptosClient, {\n sender: account.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(`${this.contractAddress}::domains::register_domain`, [], [domainName, years]);\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Mint a new Aptos Subdomain\n *\n * @param account AptosAccount the owner of the domain name\n * @param subdomainName subdomain name to mint\n * @param domainName Aptos domain name to mint under\n * @param expirationTimestampSeconds must be set between the domains expiration and the current time\n * @returns The hash of the pending transaction submitted to the API\n */\n async mintAptosSubdomain(account, subdomainName, domainName, expirationTimestampSeconds, extraArgs) {\n if (domainName.match(nameComponentPattern) === null) {\n throw new ApiError(400, `Domain name ${domainName} is not valid`);\n }\n if (subdomainName.match(nameComponentPattern) === null) {\n throw new ApiError(400, `Subdomain name ${subdomainName} is not valid`);\n }\n const subdomainRegistration = await this.getRegistrationForSubdomainName(domainName, subdomainName);\n if (subdomainRegistration) {\n const now3 = Math.ceil(Date.now() / 1e3);\n if (now3 < subdomainRegistration.expirationTimestampSeconds) {\n throw new ApiError(400, `Name ${subdomainName}.${domainName} is not available`);\n }\n }\n const domainRegistration = await this.getRegistrationForDomainName(domainName);\n if (domainRegistration === null) {\n throw new ApiError(400, `Domain name ${domainName} does not exist`);\n }\n const now2 = Math.ceil(Date.now() / 1e3);\n if (domainRegistration.expirationTimestampSeconds < now2) {\n throw new ApiError(400, `Domain name ${domainName} expired`);\n }\n const actualExpirationTimestampSeconds = expirationTimestampSeconds || domainRegistration.expirationTimestampSeconds;\n if (actualExpirationTimestampSeconds < now2) {\n throw new ApiError(400, `Expiration for ${subdomainName}.${domainName} is before now`);\n }\n const builder = new TransactionBuilderRemoteABI(this.provider.aptosClient, {\n sender: account.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(\n `${this.contractAddress}::domains::register_subdomain`,\n [],\n [subdomainName, domainName, actualExpirationTimestampSeconds]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * @param account AptosAccount the owner of the domain name\n * @param subdomainName subdomain name to mint\n * @param domainName Aptos domain name to mint\n * @param target the target address for the subdomain\n * @returns The hash of the pending transaction submitted to the API\n */\n async setSubdomainAddress(account, subdomainName, domainName, target, extraArgs) {\n const standardizeAddress = AccountAddress.standardizeAddress(target);\n if (domainName.match(nameComponentPattern) === null) {\n throw new ApiError(400, `Name ${domainName} is not valid`);\n }\n if (subdomainName.match(nameComponentPattern) === null) {\n throw new ApiError(400, `Name ${subdomainName} is not valid`);\n }\n const builder = new TransactionBuilderRemoteABI(this.provider.aptosClient, {\n sender: account.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(\n `${this.contractAddress}::domains::set_subdomain_address`,\n [],\n [subdomainName, domainName, standardizeAddress]\n );\n const bcsTxn = AptosClient.generateBCSTransaction(account, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Initialize reverse lookup for contract owner\n *\n * @param owner the `aptos_names` AptosAccount\n * @returns The hash of the pending transaction submitted to the API\n */\n async initReverseLookupRegistry(owner, extraArgs) {\n const builder = new TransactionBuilderRemoteABI(this.provider.aptosClient, {\n sender: owner.address(),\n ...extraArgs\n });\n const rawTxn = await builder.build(`${this.contractAddress}::domains::init_reverse_lookup_registry_v1`, [], []);\n const bcsTxn = AptosClient.generateBCSTransaction(owner, rawTxn);\n const pendingTransaction = await this.provider.submitSignedBCSTransaction(bcsTxn);\n return pendingTransaction.hash;\n }\n /**\n * Returns the AnsRegistry for the given domain name\n * @param domain domain name\n * @example\n * if name is `aptos.apt`\n * domain = aptos\n *\n * @returns AnsRegistry | null\n */\n async getRegistrationForDomainName(domain) {\n if (domain.match(nameComponentPattern) === null)\n return null;\n const ansResource = await this.provider.getAccountResource(\n this.contractAddress,\n `${this.contractAddress}::domains::NameRegistryV1`\n );\n const data = ansResource.data;\n const { handle } = data.registry;\n const domainsTableItemRequest = {\n key_type: `${this.contractAddress}::domains::NameRecordKeyV1`,\n value_type: `${this.contractAddress}::domains::NameRecordV1`,\n key: {\n subdomain_name: { vec: [] },\n domain_name: domain\n }\n };\n try {\n const item = await this.provider.getTableItem(handle, domainsTableItemRequest);\n return {\n target: item.target_address.vec.length === 1 ? item.target_address.vec[0] : null,\n expirationTimestampSeconds: item.expiration_time_sec\n };\n } catch (error) {\n if (error.status === 404) {\n return null;\n }\n throw new Error(error);\n }\n }\n /**\n * Returns the AnsRegistry for the given subdomain_name\n * @param domain domain name\n * @param subdomain subdomain name\n * @example\n * if name is `dev.aptos.apt`\n * domain = aptos\n * subdomain = dev\n *\n * @returns AnsRegistry | null\n */\n async getRegistrationForSubdomainName(domain, subdomain) {\n if (domain.match(nameComponentPattern) === null)\n return null;\n if (subdomain.match(nameComponentPattern) === null)\n return null;\n const ansResource = await this.provider.getAccountResource(\n this.contractAddress,\n `${this.contractAddress}::domains::NameRegistryV1`\n );\n const data = ansResource.data;\n const { handle } = data.registry;\n const domainsTableItemRequest = {\n key_type: `${this.contractAddress}::domains::NameRecordKeyV1`,\n value_type: `${this.contractAddress}::domains::NameRecordV1`,\n key: {\n subdomain_name: { vec: [subdomain] },\n domain_name: domain\n }\n };\n try {\n const item = await this.provider.getTableItem(handle, domainsTableItemRequest);\n return {\n target: item.target_address.vec.length === 1 ? item.target_address.vec[0] : null,\n expirationTimestampSeconds: item.expiration_time_sec\n };\n } catch (error) {\n if (error.status === 404) {\n return null;\n }\n throw new Error(error);\n }\n }\n};\n\n// src/transactions/account_sequence_number.ts\nvar now = () => Math.floor(Date.now() / 1e3);\nvar AccountSequenceNumber = class {\n constructor(provider, account, maxWaitTime, maximumInFlight, sleepTime) {\n // sequence number on chain\n this.lastUncommintedNumber = null;\n // local sequence number\n this.currentNumber = null;\n /**\n * We want to guarantee that we preserve ordering of workers to requests.\n *\n * `lock` is used to try to prevent multiple coroutines from accessing a shared resource at the same time,\n * which can result in race conditions and data inconsistency.\n * This code actually doesn't do it though, since we aren't giving out a slot, it is still somewhat a race condition.\n *\n * The ideal solution is likely that each thread grabs the next number from a incremental integer.\n * When they complete, they increment that number and that entity is able to enter the `lock`.\n * That would guarantee ordering.\n */\n this.lock = false;\n this.provider = provider;\n this.account = account;\n this.maxWaitTime = maxWaitTime;\n this.maximumInFlight = maximumInFlight;\n this.sleepTime = sleepTime;\n }\n /**\n * Returns the next available sequence number for this account\n *\n * @returns next available sequence number\n */\n async nextSequenceNumber() {\n while (this.lock) {\n await sleep(this.sleepTime);\n }\n this.lock = true;\n let nextNumber = BigInt(0);\n try {\n if (this.lastUncommintedNumber === null || this.currentNumber === null) {\n await this.initialize();\n }\n if (this.currentNumber - this.lastUncommintedNumber >= this.maximumInFlight) {\n await this.update();\n const startTime = now();\n while (this.currentNumber - this.lastUncommintedNumber >= this.maximumInFlight) {\n await sleep(this.sleepTime);\n if (now() - startTime > this.maxWaitTime) {\n console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.address()}`);\n await this.initialize();\n } else {\n await this.update();\n }\n }\n }\n nextNumber = this.currentNumber;\n this.currentNumber += BigInt(1);\n } catch (e) {\n console.error(\"error in getting next sequence number for this account\", e);\n } finally {\n this.lock = false;\n }\n return nextNumber;\n }\n /**\n * Initializes this account with the sequence number on chain\n */\n async initialize() {\n const { sequence_number: sequenceNumber } = await this.provider.getAccount(this.account.address());\n this.currentNumber = BigInt(sequenceNumber);\n this.lastUncommintedNumber = BigInt(sequenceNumber);\n }\n /**\n * Updates this account sequence number with the one on-chain\n *\n * @returns on-chain sequence number for this account\n */\n async update() {\n const { sequence_number: sequenceNumber } = await this.provider.getAccount(this.account.address());\n this.lastUncommintedNumber = BigInt(sequenceNumber);\n return this.lastUncommintedNumber;\n }\n /**\n * Synchronizes local sequence number with the seqeunce number on chain for this account.\n *\n * Poll the network until all submitted transactions have either been committed or until\n * the maximum wait time has elapsed\n */\n async synchronize() {\n if (this.lastUncommintedNumber === this.currentNumber)\n return;\n while (this.lock) {\n await sleep(this.sleepTime);\n }\n this.lock = true;\n try {\n await this.update();\n const startTime = now();\n while (this.lastUncommintedNumber !== this.currentNumber) {\n if (now() - startTime > this.maxWaitTime) {\n console.warn(`Waited over 30 seconds for a transaction to commit, resyncing ${this.account.address()}`);\n await this.initialize();\n } else {\n await sleep(this.sleepTime);\n await this.update();\n }\n }\n } catch (e) {\n console.error(\"error in synchronizing this account sequence number with the one on chain\", e);\n } finally {\n this.lock = false;\n }\n }\n};\n\n// src/transactions/transaction_worker.ts\nimport EventEmitter from \"eventemitter3\";\n\n// src/transactions/async_queue.ts\nvar AsyncQueue = class {\n constructor() {\n this.queue = [];\n // The pendingDequeue is used to handle the resolution of promises when items are enqueued and dequeued.\n this.pendingDequeue = [];\n this.cancelled = false;\n }\n /**\n * The enqueue method adds an item to the queue. If there are pending dequeued promises,\n * in the pendingDequeue, it resolves the oldest promise with the enqueued item immediately.\n * Otherwise, it adds the item to the queue.\n *\n * @param item T\n */\n enqueue(item) {\n this.cancelled = false;\n if (this.pendingDequeue.length > 0) {\n const promise = this.pendingDequeue.shift();\n promise == null ? void 0 : promise.resolve(item);\n return;\n }\n this.queue.push(item);\n }\n /**\n * The dequeue method returns a promise that resolves to the next item in the queue.\n * If the queue is not empty, it resolves the promise immediately with the next item.\n * Otherwise, it creates a new promise. The promise's resolve function is stored\n * in the pendingDequeue with a unique counter value as the key.\n * The newly created promise is then returned, and it will be resolved later when an item is enqueued.\n *\n * @returns Promise\n */\n async dequeue() {\n if (this.queue.length > 0) {\n return Promise.resolve(this.queue.shift());\n }\n return new Promise((resolve, reject) => {\n this.pendingDequeue.push({ resolve, reject });\n });\n }\n /**\n * The isEmpty method returns whether the queue is empty or not.\n *\n * @returns boolean\n */\n isEmpty() {\n return this.queue.length === 0;\n }\n /**\n * The cancel method cancels all pending promises in the queue.\n * It rejects the promises with a AsyncQueueCancelledError error,\n * ensuring that any awaiting code can handle the cancellation appropriately.\n */\n cancel() {\n this.cancelled = true;\n this.pendingDequeue.forEach(async ({ reject }) => {\n reject(new AsyncQueueCancelledError(\"Task cancelled\"));\n });\n this.pendingDequeue = [];\n this.queue.length = 0;\n }\n /**\n * The isCancelled method returns whether the queue is cancelled or not.\n *\n * @returns boolean\n */\n isCancelled() {\n return this.cancelled;\n }\n /**\n * The pendingDequeueLength method returns the length of the pendingDequeue.\n *\n * @returns number\n */\n pendingDequeueLength() {\n return this.pendingDequeue.length;\n }\n};\nvar AsyncQueueCancelledError = class extends Error {\n};\n\n// src/transactions/transaction_worker.ts\nvar promiseFulfilledStatus = \"fulfilled\";\nvar TransactionWorkerEvents = /* @__PURE__ */ ((TransactionWorkerEvents2) => {\n TransactionWorkerEvents2[\"TransactionSent\"] = \"transactionSent\";\n TransactionWorkerEvents2[\"TransactionSendFailed\"] = \"transactionsendFailed\";\n TransactionWorkerEvents2[\"TransactionExecuted\"] = \"transactionExecuted\";\n TransactionWorkerEvents2[\"TransactionExecutionFailed\"] = \"transactionexecutionFailed\";\n return TransactionWorkerEvents2;\n})(TransactionWorkerEvents || {});\nvar TransactionWorker = class extends EventEmitter {\n /**\n * Provides a simple framework for receiving payloads to be processed.\n *\n * @param provider - a client provider\n * @param sender - a sender as AptosAccount\n * @param maxWaitTime - the max wait time to wait before resyncing the sequence number\n * to the current on-chain state, default to 30\n * @param maximumInFlight - submit up to `maximumInFlight` transactions per account.\n * Mempool limits the number of transactions per account to 100, hence why we default to 100.\n * @param sleepTime - If `maximumInFlight` are in flight, wait `sleepTime` seconds before re-evaluating, default to 10\n */\n constructor(provider, account, maxWaitTime = 30, maximumInFlight = 100, sleepTime = 10) {\n super();\n this.taskQueue = new AsyncQueue();\n /**\n * transactions payloads waiting to be generated and signed\n *\n * TODO support entry function payload from ABI builder\n */\n this.transactionsQueue = new AsyncQueue();\n /**\n * signed transactions waiting to be submitted\n */\n this.outstandingTransactions = new AsyncQueue();\n /**\n * transactions that have been submitted to chain\n */\n this.sentTransactions = [];\n /**\n * transactions that have been committed to chain\n */\n this.executedTransactions = [];\n this.provider = provider;\n this.account = account;\n this.started = false;\n this.accountSequnceNumber = new AccountSequenceNumber(provider, account, maxWaitTime, maximumInFlight, sleepTime);\n }\n /**\n * Gets the current account sequence number,\n * generates the transaction with the account sequence number,\n * adds the transaction to the outstanding transaction queue\n * to be processed later.\n */\n async submitNextTransaction() {\n try {\n while (true) {\n if (this.transactionsQueue.isEmpty())\n return;\n const sequenceNumber = await this.accountSequnceNumber.nextSequenceNumber();\n if (sequenceNumber === null)\n return;\n const transaction = await this.generateNextTransaction(this.account, sequenceNumber);\n if (!transaction)\n return;\n const pendingTransaction = this.provider.submitSignedBCSTransaction(transaction);\n await this.outstandingTransactions.enqueue([pendingTransaction, sequenceNumber]);\n }\n } catch (error) {\n if (error instanceof AsyncQueueCancelledError) {\n return;\n }\n console.log(error);\n }\n }\n /**\n * Reads the outstanding transaction queue and submits the transaction to chain.\n *\n * If the transaction has fulfilled, it pushes the transaction to the processed\n * transactions queue and fires a transactionsFulfilled event.\n *\n * If the transaction has failed, it pushes the transaction to the processed\n * transactions queue with the failure reason and fires a transactionsFailed event.\n */\n async processTransactions() {\n try {\n while (true) {\n const awaitingTransactions = [];\n const sequenceNumbers = [];\n let [pendingTransaction, sequenceNumber] = await this.outstandingTransactions.dequeue();\n awaitingTransactions.push(pendingTransaction);\n sequenceNumbers.push(sequenceNumber);\n while (!this.outstandingTransactions.isEmpty()) {\n [pendingTransaction, sequenceNumber] = await this.outstandingTransactions.dequeue();\n awaitingTransactions.push(pendingTransaction);\n sequenceNumbers.push(sequenceNumber);\n }\n const sentTransactions = await Promise.allSettled(awaitingTransactions);\n for (let i = 0; i < sentTransactions.length && i < sequenceNumbers.length; i += 1) {\n const sentTransaction = sentTransactions[i];\n sequenceNumber = sequenceNumbers[i];\n if (sentTransaction.status === promiseFulfilledStatus) {\n this.sentTransactions.push([sentTransaction.value.hash, sequenceNumber, null]);\n this.emit(\"transactionSent\" /* TransactionSent */, [\n this.sentTransactions.length,\n sentTransaction.value.hash\n ]);\n await this.checkTransaction(sentTransaction, sequenceNumber);\n } else {\n this.sentTransactions.push([sentTransaction.status, sequenceNumber, sentTransaction.reason]);\n this.emit(\"transactionsendFailed\" /* TransactionSendFailed */, [\n this.sentTransactions.length,\n sentTransaction.reason\n ]);\n }\n }\n }\n } catch (error) {\n if (error instanceof AsyncQueueCancelledError) {\n return;\n }\n console.log(error);\n }\n }\n /**\n * Once transaction has been sent to chain, we check for its execution status.\n * @param sentTransaction transactions that were sent to chain and are now waiting to be executed\n * @param sequenceNumber the account's sequence number that was sent with the transaction\n */\n async checkTransaction(sentTransaction, sequenceNumber) {\n const waitFor = [];\n waitFor.push(this.provider.waitForTransactionWithResult(sentTransaction.value.hash, { checkSuccess: true }));\n const sentTransactions = await Promise.allSettled(waitFor);\n for (let i = 0; i < sentTransactions.length; i += 1) {\n const executedTransaction = sentTransactions[i];\n if (executedTransaction.status === promiseFulfilledStatus) {\n this.executedTransactions.push([executedTransaction.value.hash, sequenceNumber, null]);\n this.emit(\"transactionExecuted\" /* TransactionExecuted */, [\n this.executedTransactions.length,\n executedTransaction.value.hash\n ]);\n } else {\n this.executedTransactions.push([executedTransaction.status, sequenceNumber, executedTransaction.reason]);\n this.emit(\"transactionexecutionFailed\" /* TransactionExecutionFailed */, [\n this.executedTransactions.length,\n executedTransaction.reason\n ]);\n }\n }\n }\n /**\n * Push transaction to the transactions queue\n * @param payload Transaction payload\n */\n async push(payload) {\n await this.transactionsQueue.enqueue(payload);\n }\n /**\n * Generates a signed transaction that can be submitted to chain\n * @param account an Aptos account\n * @param sequenceNumber a sequence number the transaction will be generated with\n * @returns\n */\n async generateNextTransaction(account, sequenceNumber) {\n if (this.transactionsQueue.isEmpty())\n return void 0;\n const payload = await this.transactionsQueue.dequeue();\n const rawTransaction = await this.provider.generateRawTransaction(account.address(), payload, {\n providedSequenceNumber: sequenceNumber\n });\n const signedTransaction = AptosClient.generateBCSTransaction(account, rawTransaction);\n return signedTransaction;\n }\n /**\n * Starts transaction submission and transaction processing.\n */\n async run() {\n try {\n while (!this.taskQueue.isCancelled()) {\n const task = await this.taskQueue.dequeue();\n await task();\n }\n } catch (error) {\n throw new Error(error);\n }\n }\n /**\n * Starts the transaction management process.\n */\n start() {\n if (this.started) {\n throw new Error(\"worker has already started\");\n }\n this.started = true;\n this.taskQueue.enqueue(() => this.submitNextTransaction());\n this.taskQueue.enqueue(() => this.processTransactions());\n this.run();\n }\n /**\n * Stops the the transaction management process.\n */\n stop() {\n if (this.taskQueue.isCancelled()) {\n throw new Error(\"worker has already stopped\");\n }\n this.started = false;\n this.taskQueue.cancel();\n }\n};\n\n// src/generated/index.ts\nvar generated_exports = {};\n__export(generated_exports, {\n AptosErrorCode: () => AptosErrorCode,\n MoveFunctionVisibility: () => MoveFunctionVisibility,\n RoleType: () => RoleType\n});\n\n// src/generated/models/AptosErrorCode.ts\nvar AptosErrorCode = /* @__PURE__ */ ((AptosErrorCode2) => {\n AptosErrorCode2[\"ACCOUNT_NOT_FOUND\"] = \"account_not_found\";\n AptosErrorCode2[\"RESOURCE_NOT_FOUND\"] = \"resource_not_found\";\n AptosErrorCode2[\"MODULE_NOT_FOUND\"] = \"module_not_found\";\n AptosErrorCode2[\"STRUCT_FIELD_NOT_FOUND\"] = \"struct_field_not_found\";\n AptosErrorCode2[\"VERSION_NOT_FOUND\"] = \"version_not_found\";\n AptosErrorCode2[\"TRANSACTION_NOT_FOUND\"] = \"transaction_not_found\";\n AptosErrorCode2[\"TABLE_ITEM_NOT_FOUND\"] = \"table_item_not_found\";\n AptosErrorCode2[\"BLOCK_NOT_FOUND\"] = \"block_not_found\";\n AptosErrorCode2[\"STATE_VALUE_NOT_FOUND\"] = \"state_value_not_found\";\n AptosErrorCode2[\"VERSION_PRUNED\"] = \"version_pruned\";\n AptosErrorCode2[\"BLOCK_PRUNED\"] = \"block_pruned\";\n AptosErrorCode2[\"INVALID_INPUT\"] = \"invalid_input\";\n AptosErrorCode2[\"INVALID_TRANSACTION_UPDATE\"] = \"invalid_transaction_update\";\n AptosErrorCode2[\"SEQUENCE_NUMBER_TOO_OLD\"] = \"sequence_number_too_old\";\n AptosErrorCode2[\"VM_ERROR\"] = \"vm_error\";\n AptosErrorCode2[\"HEALTH_CHECK_FAILED\"] = \"health_check_failed\";\n AptosErrorCode2[\"MEMPOOL_IS_FULL\"] = \"mempool_is_full\";\n AptosErrorCode2[\"INTERNAL_ERROR\"] = \"internal_error\";\n AptosErrorCode2[\"WEB_FRAMEWORK_ERROR\"] = \"web_framework_error\";\n AptosErrorCode2[\"BCS_NOT_SUPPORTED\"] = \"bcs_not_supported\";\n AptosErrorCode2[\"API_DISABLED\"] = \"api_disabled\";\n return AptosErrorCode2;\n})(AptosErrorCode || {});\n\n// src/generated/models/MoveFunctionVisibility.ts\nvar MoveFunctionVisibility = /* @__PURE__ */ ((MoveFunctionVisibility2) => {\n MoveFunctionVisibility2[\"PRIVATE\"] = \"private\";\n MoveFunctionVisibility2[\"PUBLIC\"] = \"public\";\n MoveFunctionVisibility2[\"FRIEND\"] = \"friend\";\n return MoveFunctionVisibility2;\n})(MoveFunctionVisibility || {});\n\n// src/generated/models/RoleType.ts\nvar RoleType = /* @__PURE__ */ ((RoleType2) => {\n RoleType2[\"VALIDATOR\"] = \"validator\";\n RoleType2[\"FULL_NODE\"] = \"full_node\";\n return RoleType2;\n})(RoleType || {});\n\n// src/indexer/generated/types.ts\nvar Account_Transactions_Select_Column = /* @__PURE__ */ ((Account_Transactions_Select_Column2) => {\n Account_Transactions_Select_Column2[\"AccountAddress\"] = \"account_address\";\n Account_Transactions_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Account_Transactions_Select_Column2;\n})(Account_Transactions_Select_Column || {});\nvar Address_Events_Summary_Select_Column = /* @__PURE__ */ ((Address_Events_Summary_Select_Column2) => {\n Address_Events_Summary_Select_Column2[\"AccountAddress\"] = \"account_address\";\n Address_Events_Summary_Select_Column2[\"MinBlockHeight\"] = \"min_block_height\";\n Address_Events_Summary_Select_Column2[\"NumDistinctVersions\"] = \"num_distinct_versions\";\n return Address_Events_Summary_Select_Column2;\n})(Address_Events_Summary_Select_Column || {});\nvar Address_Version_From_Events_Select_Column = /* @__PURE__ */ ((Address_Version_From_Events_Select_Column2) => {\n Address_Version_From_Events_Select_Column2[\"AccountAddress\"] = \"account_address\";\n Address_Version_From_Events_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Address_Version_From_Events_Select_Column2;\n})(Address_Version_From_Events_Select_Column || {});\nvar Address_Version_From_Move_Resources_Select_Column = /* @__PURE__ */ ((Address_Version_From_Move_Resources_Select_Column2) => {\n Address_Version_From_Move_Resources_Select_Column2[\"Address\"] = \"address\";\n Address_Version_From_Move_Resources_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Address_Version_From_Move_Resources_Select_Column2;\n})(Address_Version_From_Move_Resources_Select_Column || {});\nvar Block_Metadata_Transactions_Select_Column = /* @__PURE__ */ ((Block_Metadata_Transactions_Select_Column2) => {\n Block_Metadata_Transactions_Select_Column2[\"BlockHeight\"] = \"block_height\";\n Block_Metadata_Transactions_Select_Column2[\"Epoch\"] = \"epoch\";\n Block_Metadata_Transactions_Select_Column2[\"FailedProposerIndices\"] = \"failed_proposer_indices\";\n Block_Metadata_Transactions_Select_Column2[\"Id\"] = \"id\";\n Block_Metadata_Transactions_Select_Column2[\"PreviousBlockVotesBitvec\"] = \"previous_block_votes_bitvec\";\n Block_Metadata_Transactions_Select_Column2[\"Proposer\"] = \"proposer\";\n Block_Metadata_Transactions_Select_Column2[\"Round\"] = \"round\";\n Block_Metadata_Transactions_Select_Column2[\"Timestamp\"] = \"timestamp\";\n Block_Metadata_Transactions_Select_Column2[\"Version\"] = \"version\";\n return Block_Metadata_Transactions_Select_Column2;\n})(Block_Metadata_Transactions_Select_Column || {});\nvar Coin_Activities_Select_Column = /* @__PURE__ */ ((Coin_Activities_Select_Column2) => {\n Coin_Activities_Select_Column2[\"ActivityType\"] = \"activity_type\";\n Coin_Activities_Select_Column2[\"Amount\"] = \"amount\";\n Coin_Activities_Select_Column2[\"BlockHeight\"] = \"block_height\";\n Coin_Activities_Select_Column2[\"CoinType\"] = \"coin_type\";\n Coin_Activities_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Coin_Activities_Select_Column2[\"EventAccountAddress\"] = \"event_account_address\";\n Coin_Activities_Select_Column2[\"EventCreationNumber\"] = \"event_creation_number\";\n Coin_Activities_Select_Column2[\"EventIndex\"] = \"event_index\";\n Coin_Activities_Select_Column2[\"EventSequenceNumber\"] = \"event_sequence_number\";\n Coin_Activities_Select_Column2[\"IsGasFee\"] = \"is_gas_fee\";\n Coin_Activities_Select_Column2[\"IsTransactionSuccess\"] = \"is_transaction_success\";\n Coin_Activities_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Coin_Activities_Select_Column2[\"StorageRefundAmount\"] = \"storage_refund_amount\";\n Coin_Activities_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Coin_Activities_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Coin_Activities_Select_Column2;\n})(Coin_Activities_Select_Column || {});\nvar Coin_Balances_Select_Column = /* @__PURE__ */ ((Coin_Balances_Select_Column2) => {\n Coin_Balances_Select_Column2[\"Amount\"] = \"amount\";\n Coin_Balances_Select_Column2[\"CoinType\"] = \"coin_type\";\n Coin_Balances_Select_Column2[\"CoinTypeHash\"] = \"coin_type_hash\";\n Coin_Balances_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Coin_Balances_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Coin_Balances_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Coin_Balances_Select_Column2;\n})(Coin_Balances_Select_Column || {});\nvar Coin_Infos_Select_Column = /* @__PURE__ */ ((Coin_Infos_Select_Column2) => {\n Coin_Infos_Select_Column2[\"CoinType\"] = \"coin_type\";\n Coin_Infos_Select_Column2[\"CoinTypeHash\"] = \"coin_type_hash\";\n Coin_Infos_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Coin_Infos_Select_Column2[\"Decimals\"] = \"decimals\";\n Coin_Infos_Select_Column2[\"Name\"] = \"name\";\n Coin_Infos_Select_Column2[\"SupplyAggregatorTableHandle\"] = \"supply_aggregator_table_handle\";\n Coin_Infos_Select_Column2[\"SupplyAggregatorTableKey\"] = \"supply_aggregator_table_key\";\n Coin_Infos_Select_Column2[\"Symbol\"] = \"symbol\";\n Coin_Infos_Select_Column2[\"TransactionCreatedTimestamp\"] = \"transaction_created_timestamp\";\n Coin_Infos_Select_Column2[\"TransactionVersionCreated\"] = \"transaction_version_created\";\n return Coin_Infos_Select_Column2;\n})(Coin_Infos_Select_Column || {});\nvar Coin_Supply_Select_Column = /* @__PURE__ */ ((Coin_Supply_Select_Column2) => {\n Coin_Supply_Select_Column2[\"CoinType\"] = \"coin_type\";\n Coin_Supply_Select_Column2[\"CoinTypeHash\"] = \"coin_type_hash\";\n Coin_Supply_Select_Column2[\"Supply\"] = \"supply\";\n Coin_Supply_Select_Column2[\"TransactionEpoch\"] = \"transaction_epoch\";\n Coin_Supply_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Coin_Supply_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Coin_Supply_Select_Column2;\n})(Coin_Supply_Select_Column || {});\nvar Collection_Datas_Select_Column = /* @__PURE__ */ ((Collection_Datas_Select_Column2) => {\n Collection_Datas_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Collection_Datas_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Collection_Datas_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Collection_Datas_Select_Column2[\"Description\"] = \"description\";\n Collection_Datas_Select_Column2[\"DescriptionMutable\"] = \"description_mutable\";\n Collection_Datas_Select_Column2[\"Maximum\"] = \"maximum\";\n Collection_Datas_Select_Column2[\"MaximumMutable\"] = \"maximum_mutable\";\n Collection_Datas_Select_Column2[\"MetadataUri\"] = \"metadata_uri\";\n Collection_Datas_Select_Column2[\"Supply\"] = \"supply\";\n Collection_Datas_Select_Column2[\"TableHandle\"] = \"table_handle\";\n Collection_Datas_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Collection_Datas_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Collection_Datas_Select_Column2[\"UriMutable\"] = \"uri_mutable\";\n return Collection_Datas_Select_Column2;\n})(Collection_Datas_Select_Column || {});\nvar Current_Ans_Lookup_Select_Column = /* @__PURE__ */ ((Current_Ans_Lookup_Select_Column2) => {\n Current_Ans_Lookup_Select_Column2[\"Domain\"] = \"domain\";\n Current_Ans_Lookup_Select_Column2[\"ExpirationTimestamp\"] = \"expiration_timestamp\";\n Current_Ans_Lookup_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Current_Ans_Lookup_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Ans_Lookup_Select_Column2[\"RegisteredAddress\"] = \"registered_address\";\n Current_Ans_Lookup_Select_Column2[\"Subdomain\"] = \"subdomain\";\n Current_Ans_Lookup_Select_Column2[\"TokenName\"] = \"token_name\";\n return Current_Ans_Lookup_Select_Column2;\n})(Current_Ans_Lookup_Select_Column || {});\nvar Current_Ans_Lookup_V2_Select_Column = /* @__PURE__ */ ((Current_Ans_Lookup_V2_Select_Column2) => {\n Current_Ans_Lookup_V2_Select_Column2[\"Domain\"] = \"domain\";\n Current_Ans_Lookup_V2_Select_Column2[\"ExpirationTimestamp\"] = \"expiration_timestamp\";\n Current_Ans_Lookup_V2_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Current_Ans_Lookup_V2_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Ans_Lookup_V2_Select_Column2[\"RegisteredAddress\"] = \"registered_address\";\n Current_Ans_Lookup_V2_Select_Column2[\"Subdomain\"] = \"subdomain\";\n Current_Ans_Lookup_V2_Select_Column2[\"TokenName\"] = \"token_name\";\n Current_Ans_Lookup_V2_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Current_Ans_Lookup_V2_Select_Column2;\n})(Current_Ans_Lookup_V2_Select_Column || {});\nvar Current_Aptos_Names_Select_Column = /* @__PURE__ */ ((Current_Aptos_Names_Select_Column2) => {\n Current_Aptos_Names_Select_Column2[\"Domain\"] = \"domain\";\n Current_Aptos_Names_Select_Column2[\"DomainWithSuffix\"] = \"domain_with_suffix\";\n Current_Aptos_Names_Select_Column2[\"ExpirationTimestamp\"] = \"expiration_timestamp\";\n Current_Aptos_Names_Select_Column2[\"IsActive\"] = \"is_active\";\n Current_Aptos_Names_Select_Column2[\"IsPrimary\"] = \"is_primary\";\n Current_Aptos_Names_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Aptos_Names_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Current_Aptos_Names_Select_Column2[\"RegisteredAddress\"] = \"registered_address\";\n Current_Aptos_Names_Select_Column2[\"Subdomain\"] = \"subdomain\";\n Current_Aptos_Names_Select_Column2[\"TokenName\"] = \"token_name\";\n Current_Aptos_Names_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Current_Aptos_Names_Select_Column2;\n})(Current_Aptos_Names_Select_Column || {});\nvar Current_Coin_Balances_Select_Column = /* @__PURE__ */ ((Current_Coin_Balances_Select_Column2) => {\n Current_Coin_Balances_Select_Column2[\"Amount\"] = \"amount\";\n Current_Coin_Balances_Select_Column2[\"CoinType\"] = \"coin_type\";\n Current_Coin_Balances_Select_Column2[\"CoinTypeHash\"] = \"coin_type_hash\";\n Current_Coin_Balances_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Coin_Balances_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Coin_Balances_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n return Current_Coin_Balances_Select_Column2;\n})(Current_Coin_Balances_Select_Column || {});\nvar Current_Collection_Datas_Select_Column = /* @__PURE__ */ ((Current_Collection_Datas_Select_Column2) => {\n Current_Collection_Datas_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Current_Collection_Datas_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Current_Collection_Datas_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Current_Collection_Datas_Select_Column2[\"Description\"] = \"description\";\n Current_Collection_Datas_Select_Column2[\"DescriptionMutable\"] = \"description_mutable\";\n Current_Collection_Datas_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Collection_Datas_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Collection_Datas_Select_Column2[\"Maximum\"] = \"maximum\";\n Current_Collection_Datas_Select_Column2[\"MaximumMutable\"] = \"maximum_mutable\";\n Current_Collection_Datas_Select_Column2[\"MetadataUri\"] = \"metadata_uri\";\n Current_Collection_Datas_Select_Column2[\"Supply\"] = \"supply\";\n Current_Collection_Datas_Select_Column2[\"TableHandle\"] = \"table_handle\";\n Current_Collection_Datas_Select_Column2[\"UriMutable\"] = \"uri_mutable\";\n return Current_Collection_Datas_Select_Column2;\n})(Current_Collection_Datas_Select_Column || {});\nvar Current_Collection_Ownership_V2_View_Select_Column = /* @__PURE__ */ ((Current_Collection_Ownership_V2_View_Select_Column2) => {\n Current_Collection_Ownership_V2_View_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"CollectionUri\"] = \"collection_uri\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"DistinctTokens\"] = \"distinct_tokens\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Current_Collection_Ownership_V2_View_Select_Column2[\"SingleTokenUri\"] = \"single_token_uri\";\n return Current_Collection_Ownership_V2_View_Select_Column2;\n})(Current_Collection_Ownership_V2_View_Select_Column || {});\nvar Current_Collections_V2_Select_Column = /* @__PURE__ */ ((Current_Collections_V2_Select_Column2) => {\n Current_Collections_V2_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Current_Collections_V2_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Current_Collections_V2_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Current_Collections_V2_Select_Column2[\"CurrentSupply\"] = \"current_supply\";\n Current_Collections_V2_Select_Column2[\"Description\"] = \"description\";\n Current_Collections_V2_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Collections_V2_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Collections_V2_Select_Column2[\"MaxSupply\"] = \"max_supply\";\n Current_Collections_V2_Select_Column2[\"MutableDescription\"] = \"mutable_description\";\n Current_Collections_V2_Select_Column2[\"MutableUri\"] = \"mutable_uri\";\n Current_Collections_V2_Select_Column2[\"TableHandleV1\"] = \"table_handle_v1\";\n Current_Collections_V2_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n Current_Collections_V2_Select_Column2[\"TotalMintedV2\"] = \"total_minted_v2\";\n Current_Collections_V2_Select_Column2[\"Uri\"] = \"uri\";\n return Current_Collections_V2_Select_Column2;\n})(Current_Collections_V2_Select_Column || {});\nvar Current_Delegated_Staking_Pool_Balances_Select_Column = /* @__PURE__ */ ((Current_Delegated_Staking_Pool_Balances_Select_Column2) => {\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"ActiveTableHandle\"] = \"active_table_handle\";\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"InactiveTableHandle\"] = \"inactive_table_handle\";\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"OperatorCommissionPercentage\"] = \"operator_commission_percentage\";\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"StakingPoolAddress\"] = \"staking_pool_address\";\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"TotalCoins\"] = \"total_coins\";\n Current_Delegated_Staking_Pool_Balances_Select_Column2[\"TotalShares\"] = \"total_shares\";\n return Current_Delegated_Staking_Pool_Balances_Select_Column2;\n})(Current_Delegated_Staking_Pool_Balances_Select_Column || {});\nvar Current_Delegated_Voter_Select_Column = /* @__PURE__ */ ((Current_Delegated_Voter_Select_Column2) => {\n Current_Delegated_Voter_Select_Column2[\"DelegationPoolAddress\"] = \"delegation_pool_address\";\n Current_Delegated_Voter_Select_Column2[\"DelegatorAddress\"] = \"delegator_address\";\n Current_Delegated_Voter_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Delegated_Voter_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Delegated_Voter_Select_Column2[\"PendingVoter\"] = \"pending_voter\";\n Current_Delegated_Voter_Select_Column2[\"TableHandle\"] = \"table_handle\";\n Current_Delegated_Voter_Select_Column2[\"Voter\"] = \"voter\";\n return Current_Delegated_Voter_Select_Column2;\n})(Current_Delegated_Voter_Select_Column || {});\nvar Current_Delegator_Balances_Select_Column = /* @__PURE__ */ ((Current_Delegator_Balances_Select_Column2) => {\n Current_Delegator_Balances_Select_Column2[\"DelegatorAddress\"] = \"delegator_address\";\n Current_Delegator_Balances_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Delegator_Balances_Select_Column2[\"ParentTableHandle\"] = \"parent_table_handle\";\n Current_Delegator_Balances_Select_Column2[\"PoolAddress\"] = \"pool_address\";\n Current_Delegator_Balances_Select_Column2[\"PoolType\"] = \"pool_type\";\n Current_Delegator_Balances_Select_Column2[\"Shares\"] = \"shares\";\n Current_Delegator_Balances_Select_Column2[\"TableHandle\"] = \"table_handle\";\n return Current_Delegator_Balances_Select_Column2;\n})(Current_Delegator_Balances_Select_Column || {});\nvar Current_Fungible_Asset_Balances_Select_Column = /* @__PURE__ */ ((Current_Fungible_Asset_Balances_Select_Column2) => {\n Current_Fungible_Asset_Balances_Select_Column2[\"Amount\"] = \"amount\";\n Current_Fungible_Asset_Balances_Select_Column2[\"AssetType\"] = \"asset_type\";\n Current_Fungible_Asset_Balances_Select_Column2[\"IsFrozen\"] = \"is_frozen\";\n Current_Fungible_Asset_Balances_Select_Column2[\"IsPrimary\"] = \"is_primary\";\n Current_Fungible_Asset_Balances_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Fungible_Asset_Balances_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Fungible_Asset_Balances_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Current_Fungible_Asset_Balances_Select_Column2[\"StorageId\"] = \"storage_id\";\n Current_Fungible_Asset_Balances_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Current_Fungible_Asset_Balances_Select_Column2;\n})(Current_Fungible_Asset_Balances_Select_Column || {});\nvar Current_Objects_Select_Column = /* @__PURE__ */ ((Current_Objects_Select_Column2) => {\n Current_Objects_Select_Column2[\"AllowUngatedTransfer\"] = \"allow_ungated_transfer\";\n Current_Objects_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Current_Objects_Select_Column2[\"LastGuidCreationNum\"] = \"last_guid_creation_num\";\n Current_Objects_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Objects_Select_Column2[\"ObjectAddress\"] = \"object_address\";\n Current_Objects_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Current_Objects_Select_Column2[\"StateKeyHash\"] = \"state_key_hash\";\n return Current_Objects_Select_Column2;\n})(Current_Objects_Select_Column || {});\nvar Current_Staking_Pool_Voter_Select_Column = /* @__PURE__ */ ((Current_Staking_Pool_Voter_Select_Column2) => {\n Current_Staking_Pool_Voter_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Staking_Pool_Voter_Select_Column2[\"OperatorAddress\"] = \"operator_address\";\n Current_Staking_Pool_Voter_Select_Column2[\"StakingPoolAddress\"] = \"staking_pool_address\";\n Current_Staking_Pool_Voter_Select_Column2[\"VoterAddress\"] = \"voter_address\";\n return Current_Staking_Pool_Voter_Select_Column2;\n})(Current_Staking_Pool_Voter_Select_Column || {});\nvar Current_Table_Items_Select_Column = /* @__PURE__ */ ((Current_Table_Items_Select_Column2) => {\n Current_Table_Items_Select_Column2[\"DecodedKey\"] = \"decoded_key\";\n Current_Table_Items_Select_Column2[\"DecodedValue\"] = \"decoded_value\";\n Current_Table_Items_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Current_Table_Items_Select_Column2[\"Key\"] = \"key\";\n Current_Table_Items_Select_Column2[\"KeyHash\"] = \"key_hash\";\n Current_Table_Items_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Table_Items_Select_Column2[\"TableHandle\"] = \"table_handle\";\n return Current_Table_Items_Select_Column2;\n})(Current_Table_Items_Select_Column || {});\nvar Current_Token_Datas_Select_Column = /* @__PURE__ */ ((Current_Token_Datas_Select_Column2) => {\n Current_Token_Datas_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Current_Token_Datas_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Current_Token_Datas_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Current_Token_Datas_Select_Column2[\"DefaultProperties\"] = \"default_properties\";\n Current_Token_Datas_Select_Column2[\"Description\"] = \"description\";\n Current_Token_Datas_Select_Column2[\"DescriptionMutable\"] = \"description_mutable\";\n Current_Token_Datas_Select_Column2[\"LargestPropertyVersion\"] = \"largest_property_version\";\n Current_Token_Datas_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Token_Datas_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Token_Datas_Select_Column2[\"Maximum\"] = \"maximum\";\n Current_Token_Datas_Select_Column2[\"MaximumMutable\"] = \"maximum_mutable\";\n Current_Token_Datas_Select_Column2[\"MetadataUri\"] = \"metadata_uri\";\n Current_Token_Datas_Select_Column2[\"Name\"] = \"name\";\n Current_Token_Datas_Select_Column2[\"PayeeAddress\"] = \"payee_address\";\n Current_Token_Datas_Select_Column2[\"PropertiesMutable\"] = \"properties_mutable\";\n Current_Token_Datas_Select_Column2[\"RoyaltyMutable\"] = \"royalty_mutable\";\n Current_Token_Datas_Select_Column2[\"RoyaltyPointsDenominator\"] = \"royalty_points_denominator\";\n Current_Token_Datas_Select_Column2[\"RoyaltyPointsNumerator\"] = \"royalty_points_numerator\";\n Current_Token_Datas_Select_Column2[\"Supply\"] = \"supply\";\n Current_Token_Datas_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n Current_Token_Datas_Select_Column2[\"UriMutable\"] = \"uri_mutable\";\n return Current_Token_Datas_Select_Column2;\n})(Current_Token_Datas_Select_Column || {});\nvar Current_Token_Datas_V2_Select_Column = /* @__PURE__ */ ((Current_Token_Datas_V2_Select_Column2) => {\n Current_Token_Datas_V2_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Current_Token_Datas_V2_Select_Column2[\"Description\"] = \"description\";\n Current_Token_Datas_V2_Select_Column2[\"IsFungibleV2\"] = \"is_fungible_v2\";\n Current_Token_Datas_V2_Select_Column2[\"LargestPropertyVersionV1\"] = \"largest_property_version_v1\";\n Current_Token_Datas_V2_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Token_Datas_V2_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Token_Datas_V2_Select_Column2[\"Maximum\"] = \"maximum\";\n Current_Token_Datas_V2_Select_Column2[\"Supply\"] = \"supply\";\n Current_Token_Datas_V2_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Current_Token_Datas_V2_Select_Column2[\"TokenName\"] = \"token_name\";\n Current_Token_Datas_V2_Select_Column2[\"TokenProperties\"] = \"token_properties\";\n Current_Token_Datas_V2_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n Current_Token_Datas_V2_Select_Column2[\"TokenUri\"] = \"token_uri\";\n return Current_Token_Datas_V2_Select_Column2;\n})(Current_Token_Datas_V2_Select_Column || {});\nvar Current_Token_Ownerships_Select_Column = /* @__PURE__ */ ((Current_Token_Ownerships_Select_Column2) => {\n Current_Token_Ownerships_Select_Column2[\"Amount\"] = \"amount\";\n Current_Token_Ownerships_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Current_Token_Ownerships_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Current_Token_Ownerships_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Current_Token_Ownerships_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Token_Ownerships_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Token_Ownerships_Select_Column2[\"Name\"] = \"name\";\n Current_Token_Ownerships_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Current_Token_Ownerships_Select_Column2[\"PropertyVersion\"] = \"property_version\";\n Current_Token_Ownerships_Select_Column2[\"TableType\"] = \"table_type\";\n Current_Token_Ownerships_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n Current_Token_Ownerships_Select_Column2[\"TokenProperties\"] = \"token_properties\";\n return Current_Token_Ownerships_Select_Column2;\n})(Current_Token_Ownerships_Select_Column || {});\nvar Current_Token_Ownerships_V2_Select_Column = /* @__PURE__ */ ((Current_Token_Ownerships_V2_Select_Column2) => {\n Current_Token_Ownerships_V2_Select_Column2[\"Amount\"] = \"amount\";\n Current_Token_Ownerships_V2_Select_Column2[\"IsFungibleV2\"] = \"is_fungible_v2\";\n Current_Token_Ownerships_V2_Select_Column2[\"IsSoulboundV2\"] = \"is_soulbound_v2\";\n Current_Token_Ownerships_V2_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Token_Ownerships_V2_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Token_Ownerships_V2_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Current_Token_Ownerships_V2_Select_Column2[\"PropertyVersionV1\"] = \"property_version_v1\";\n Current_Token_Ownerships_V2_Select_Column2[\"StorageId\"] = \"storage_id\";\n Current_Token_Ownerships_V2_Select_Column2[\"TableTypeV1\"] = \"table_type_v1\";\n Current_Token_Ownerships_V2_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Current_Token_Ownerships_V2_Select_Column2[\"TokenPropertiesMutatedV1\"] = \"token_properties_mutated_v1\";\n Current_Token_Ownerships_V2_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Current_Token_Ownerships_V2_Select_Column2;\n})(Current_Token_Ownerships_V2_Select_Column || {});\nvar Current_Token_Pending_Claims_Select_Column = /* @__PURE__ */ ((Current_Token_Pending_Claims_Select_Column2) => {\n Current_Token_Pending_Claims_Select_Column2[\"Amount\"] = \"amount\";\n Current_Token_Pending_Claims_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Current_Token_Pending_Claims_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Current_Token_Pending_Claims_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Current_Token_Pending_Claims_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Current_Token_Pending_Claims_Select_Column2[\"FromAddress\"] = \"from_address\";\n Current_Token_Pending_Claims_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Current_Token_Pending_Claims_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Current_Token_Pending_Claims_Select_Column2[\"Name\"] = \"name\";\n Current_Token_Pending_Claims_Select_Column2[\"PropertyVersion\"] = \"property_version\";\n Current_Token_Pending_Claims_Select_Column2[\"TableHandle\"] = \"table_handle\";\n Current_Token_Pending_Claims_Select_Column2[\"ToAddress\"] = \"to_address\";\n Current_Token_Pending_Claims_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Current_Token_Pending_Claims_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n return Current_Token_Pending_Claims_Select_Column2;\n})(Current_Token_Pending_Claims_Select_Column || {});\nvar Cursor_Ordering = /* @__PURE__ */ ((Cursor_Ordering2) => {\n Cursor_Ordering2[\"Asc\"] = \"ASC\";\n Cursor_Ordering2[\"Desc\"] = \"DESC\";\n return Cursor_Ordering2;\n})(Cursor_Ordering || {});\nvar Delegated_Staking_Activities_Select_Column = /* @__PURE__ */ ((Delegated_Staking_Activities_Select_Column2) => {\n Delegated_Staking_Activities_Select_Column2[\"Amount\"] = \"amount\";\n Delegated_Staking_Activities_Select_Column2[\"DelegatorAddress\"] = \"delegator_address\";\n Delegated_Staking_Activities_Select_Column2[\"EventIndex\"] = \"event_index\";\n Delegated_Staking_Activities_Select_Column2[\"EventType\"] = \"event_type\";\n Delegated_Staking_Activities_Select_Column2[\"PoolAddress\"] = \"pool_address\";\n Delegated_Staking_Activities_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Delegated_Staking_Activities_Select_Column2;\n})(Delegated_Staking_Activities_Select_Column || {});\nvar Delegated_Staking_Pools_Select_Column = /* @__PURE__ */ ((Delegated_Staking_Pools_Select_Column2) => {\n Delegated_Staking_Pools_Select_Column2[\"FirstTransactionVersion\"] = \"first_transaction_version\";\n Delegated_Staking_Pools_Select_Column2[\"StakingPoolAddress\"] = \"staking_pool_address\";\n return Delegated_Staking_Pools_Select_Column2;\n})(Delegated_Staking_Pools_Select_Column || {});\nvar Delegator_Distinct_Pool_Select_Column = /* @__PURE__ */ ((Delegator_Distinct_Pool_Select_Column2) => {\n Delegator_Distinct_Pool_Select_Column2[\"DelegatorAddress\"] = \"delegator_address\";\n Delegator_Distinct_Pool_Select_Column2[\"PoolAddress\"] = \"pool_address\";\n return Delegator_Distinct_Pool_Select_Column2;\n})(Delegator_Distinct_Pool_Select_Column || {});\nvar Events_Select_Column = /* @__PURE__ */ ((Events_Select_Column2) => {\n Events_Select_Column2[\"AccountAddress\"] = \"account_address\";\n Events_Select_Column2[\"CreationNumber\"] = \"creation_number\";\n Events_Select_Column2[\"Data\"] = \"data\";\n Events_Select_Column2[\"EventIndex\"] = \"event_index\";\n Events_Select_Column2[\"IndexedType\"] = \"indexed_type\";\n Events_Select_Column2[\"SequenceNumber\"] = \"sequence_number\";\n Events_Select_Column2[\"TransactionBlockHeight\"] = \"transaction_block_height\";\n Events_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Events_Select_Column2[\"Type\"] = \"type\";\n return Events_Select_Column2;\n})(Events_Select_Column || {});\nvar Fungible_Asset_Activities_Select_Column = /* @__PURE__ */ ((Fungible_Asset_Activities_Select_Column2) => {\n Fungible_Asset_Activities_Select_Column2[\"Amount\"] = \"amount\";\n Fungible_Asset_Activities_Select_Column2[\"AssetType\"] = \"asset_type\";\n Fungible_Asset_Activities_Select_Column2[\"BlockHeight\"] = \"block_height\";\n Fungible_Asset_Activities_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Fungible_Asset_Activities_Select_Column2[\"EventIndex\"] = \"event_index\";\n Fungible_Asset_Activities_Select_Column2[\"GasFeePayerAddress\"] = \"gas_fee_payer_address\";\n Fungible_Asset_Activities_Select_Column2[\"IsFrozen\"] = \"is_frozen\";\n Fungible_Asset_Activities_Select_Column2[\"IsGasFee\"] = \"is_gas_fee\";\n Fungible_Asset_Activities_Select_Column2[\"IsTransactionSuccess\"] = \"is_transaction_success\";\n Fungible_Asset_Activities_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Fungible_Asset_Activities_Select_Column2[\"StorageId\"] = \"storage_id\";\n Fungible_Asset_Activities_Select_Column2[\"StorageRefundAmount\"] = \"storage_refund_amount\";\n Fungible_Asset_Activities_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n Fungible_Asset_Activities_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Fungible_Asset_Activities_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Fungible_Asset_Activities_Select_Column2[\"Type\"] = \"type\";\n return Fungible_Asset_Activities_Select_Column2;\n})(Fungible_Asset_Activities_Select_Column || {});\nvar Fungible_Asset_Metadata_Select_Column = /* @__PURE__ */ ((Fungible_Asset_Metadata_Select_Column2) => {\n Fungible_Asset_Metadata_Select_Column2[\"AssetType\"] = \"asset_type\";\n Fungible_Asset_Metadata_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Fungible_Asset_Metadata_Select_Column2[\"Decimals\"] = \"decimals\";\n Fungible_Asset_Metadata_Select_Column2[\"IconUri\"] = \"icon_uri\";\n Fungible_Asset_Metadata_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Fungible_Asset_Metadata_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Fungible_Asset_Metadata_Select_Column2[\"Name\"] = \"name\";\n Fungible_Asset_Metadata_Select_Column2[\"ProjectUri\"] = \"project_uri\";\n Fungible_Asset_Metadata_Select_Column2[\"SupplyAggregatorTableHandleV1\"] = \"supply_aggregator_table_handle_v1\";\n Fungible_Asset_Metadata_Select_Column2[\"SupplyAggregatorTableKeyV1\"] = \"supply_aggregator_table_key_v1\";\n Fungible_Asset_Metadata_Select_Column2[\"Symbol\"] = \"symbol\";\n Fungible_Asset_Metadata_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Fungible_Asset_Metadata_Select_Column2;\n})(Fungible_Asset_Metadata_Select_Column || {});\nvar Indexer_Status_Select_Column = /* @__PURE__ */ ((Indexer_Status_Select_Column2) => {\n Indexer_Status_Select_Column2[\"Db\"] = \"db\";\n Indexer_Status_Select_Column2[\"IsIndexerUp\"] = \"is_indexer_up\";\n return Indexer_Status_Select_Column2;\n})(Indexer_Status_Select_Column || {});\nvar Ledger_Infos_Select_Column = /* @__PURE__ */ ((Ledger_Infos_Select_Column2) => {\n Ledger_Infos_Select_Column2[\"ChainId\"] = \"chain_id\";\n return Ledger_Infos_Select_Column2;\n})(Ledger_Infos_Select_Column || {});\nvar Move_Resources_Select_Column = /* @__PURE__ */ ((Move_Resources_Select_Column2) => {\n Move_Resources_Select_Column2[\"Address\"] = \"address\";\n Move_Resources_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Move_Resources_Select_Column2;\n})(Move_Resources_Select_Column || {});\nvar Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column = /* @__PURE__ */ ((Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2) => {\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"BuyItNowPrice\"] = \"buy_it_now_price\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"CoinType\"] = \"coin_type\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"ContractAddress\"] = \"contract_address\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"CurrentBidPrice\"] = \"current_bid_price\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"CurrentBidder\"] = \"current_bidder\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"ExpirationTime\"] = \"expiration_time\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"FeeScheduleId\"] = \"fee_schedule_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"ListingId\"] = \"listing_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"Marketplace\"] = \"marketplace\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"Seller\"] = \"seller\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"StartingBidPrice\"] = \"starting_bid_price\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"TokenAmount\"] = \"token_amount\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column2;\n})(Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column || {});\nvar Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column = /* @__PURE__ */ ((Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2) => {\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"Buyer\"] = \"buyer\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"CoinType\"] = \"coin_type\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"CollectionOfferId\"] = \"collection_offer_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"ContractAddress\"] = \"contract_address\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"ExpirationTime\"] = \"expiration_time\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"FeeScheduleId\"] = \"fee_schedule_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"ItemPrice\"] = \"item_price\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"Marketplace\"] = \"marketplace\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"RemainingTokenAmount\"] = \"remaining_token_amount\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column2;\n})(Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column || {});\nvar Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column = /* @__PURE__ */ ((Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2) => {\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"CoinType\"] = \"coin_type\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"ContractAddress\"] = \"contract_address\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"FeeScheduleId\"] = \"fee_schedule_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"ListingId\"] = \"listing_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"Marketplace\"] = \"marketplace\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"Price\"] = \"price\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"Seller\"] = \"seller\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"TokenAmount\"] = \"token_amount\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column2;\n})(Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column || {});\nvar Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column = /* @__PURE__ */ ((Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2) => {\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"Buyer\"] = \"buyer\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"CoinType\"] = \"coin_type\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"ContractAddress\"] = \"contract_address\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"ExpirationTime\"] = \"expiration_time\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"FeeScheduleId\"] = \"fee_schedule_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"IsDeleted\"] = \"is_deleted\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"LastTransactionTimestamp\"] = \"last_transaction_timestamp\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"LastTransactionVersion\"] = \"last_transaction_version\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"Marketplace\"] = \"marketplace\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"OfferId\"] = \"offer_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"Price\"] = \"price\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"TokenAmount\"] = \"token_amount\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n return Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column2;\n})(Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column || {});\nvar Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column = /* @__PURE__ */ ((Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2) => {\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"Buyer\"] = \"buyer\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"CoinType\"] = \"coin_type\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"CollectionId\"] = \"collection_id\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"ContractAddress\"] = \"contract_address\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"EventIndex\"] = \"event_index\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"EventType\"] = \"event_type\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"FeeScheduleId\"] = \"fee_schedule_id\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"Marketplace\"] = \"marketplace\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"OfferOrListingId\"] = \"offer_or_listing_id\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"Price\"] = \"price\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"PropertyVersion\"] = \"property_version\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"Seller\"] = \"seller\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"TokenAmount\"] = \"token_amount\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"TokenName\"] = \"token_name\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column2;\n})(Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column || {});\nvar Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column = /* @__PURE__ */ ((Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2) => {\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"AnimationOptimizerRetryCount\"] = \"animation_optimizer_retry_count\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"AssetUri\"] = \"asset_uri\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"CdnAnimationUri\"] = \"cdn_animation_uri\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"CdnImageUri\"] = \"cdn_image_uri\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"CdnJsonUri\"] = \"cdn_json_uri\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"ImageOptimizerRetryCount\"] = \"image_optimizer_retry_count\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"JsonParserRetryCount\"] = \"json_parser_retry_count\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"RawAnimationUri\"] = \"raw_animation_uri\";\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2[\"RawImageUri\"] = \"raw_image_uri\";\n return Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column2;\n})(Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column || {});\nvar Num_Active_Delegator_Per_Pool_Select_Column = /* @__PURE__ */ ((Num_Active_Delegator_Per_Pool_Select_Column2) => {\n Num_Active_Delegator_Per_Pool_Select_Column2[\"NumActiveDelegator\"] = \"num_active_delegator\";\n Num_Active_Delegator_Per_Pool_Select_Column2[\"PoolAddress\"] = \"pool_address\";\n return Num_Active_Delegator_Per_Pool_Select_Column2;\n})(Num_Active_Delegator_Per_Pool_Select_Column || {});\nvar Order_By = /* @__PURE__ */ ((Order_By2) => {\n Order_By2[\"Asc\"] = \"asc\";\n Order_By2[\"AscNullsFirst\"] = \"asc_nulls_first\";\n Order_By2[\"AscNullsLast\"] = \"asc_nulls_last\";\n Order_By2[\"Desc\"] = \"desc\";\n Order_By2[\"DescNullsFirst\"] = \"desc_nulls_first\";\n Order_By2[\"DescNullsLast\"] = \"desc_nulls_last\";\n return Order_By2;\n})(Order_By || {});\nvar Processor_Status_Select_Column = /* @__PURE__ */ ((Processor_Status_Select_Column2) => {\n Processor_Status_Select_Column2[\"LastSuccessVersion\"] = \"last_success_version\";\n Processor_Status_Select_Column2[\"LastUpdated\"] = \"last_updated\";\n Processor_Status_Select_Column2[\"Processor\"] = \"processor\";\n return Processor_Status_Select_Column2;\n})(Processor_Status_Select_Column || {});\nvar Proposal_Votes_Select_Column = /* @__PURE__ */ ((Proposal_Votes_Select_Column2) => {\n Proposal_Votes_Select_Column2[\"NumVotes\"] = \"num_votes\";\n Proposal_Votes_Select_Column2[\"ProposalId\"] = \"proposal_id\";\n Proposal_Votes_Select_Column2[\"ShouldPass\"] = \"should_pass\";\n Proposal_Votes_Select_Column2[\"StakingPoolAddress\"] = \"staking_pool_address\";\n Proposal_Votes_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Proposal_Votes_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Proposal_Votes_Select_Column2[\"VoterAddress\"] = \"voter_address\";\n return Proposal_Votes_Select_Column2;\n})(Proposal_Votes_Select_Column || {});\nvar Table_Items_Select_Column = /* @__PURE__ */ ((Table_Items_Select_Column2) => {\n Table_Items_Select_Column2[\"DecodedKey\"] = \"decoded_key\";\n Table_Items_Select_Column2[\"DecodedValue\"] = \"decoded_value\";\n Table_Items_Select_Column2[\"Key\"] = \"key\";\n Table_Items_Select_Column2[\"TableHandle\"] = \"table_handle\";\n Table_Items_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Table_Items_Select_Column2[\"WriteSetChangeIndex\"] = \"write_set_change_index\";\n return Table_Items_Select_Column2;\n})(Table_Items_Select_Column || {});\nvar Table_Metadatas_Select_Column = /* @__PURE__ */ ((Table_Metadatas_Select_Column2) => {\n Table_Metadatas_Select_Column2[\"Handle\"] = \"handle\";\n Table_Metadatas_Select_Column2[\"KeyType\"] = \"key_type\";\n Table_Metadatas_Select_Column2[\"ValueType\"] = \"value_type\";\n return Table_Metadatas_Select_Column2;\n})(Table_Metadatas_Select_Column || {});\nvar Token_Activities_Select_Column = /* @__PURE__ */ ((Token_Activities_Select_Column2) => {\n Token_Activities_Select_Column2[\"CoinAmount\"] = \"coin_amount\";\n Token_Activities_Select_Column2[\"CoinType\"] = \"coin_type\";\n Token_Activities_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Token_Activities_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Token_Activities_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Token_Activities_Select_Column2[\"EventAccountAddress\"] = \"event_account_address\";\n Token_Activities_Select_Column2[\"EventCreationNumber\"] = \"event_creation_number\";\n Token_Activities_Select_Column2[\"EventIndex\"] = \"event_index\";\n Token_Activities_Select_Column2[\"EventSequenceNumber\"] = \"event_sequence_number\";\n Token_Activities_Select_Column2[\"FromAddress\"] = \"from_address\";\n Token_Activities_Select_Column2[\"Name\"] = \"name\";\n Token_Activities_Select_Column2[\"PropertyVersion\"] = \"property_version\";\n Token_Activities_Select_Column2[\"ToAddress\"] = \"to_address\";\n Token_Activities_Select_Column2[\"TokenAmount\"] = \"token_amount\";\n Token_Activities_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n Token_Activities_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Token_Activities_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Token_Activities_Select_Column2[\"TransferType\"] = \"transfer_type\";\n return Token_Activities_Select_Column2;\n})(Token_Activities_Select_Column || {});\nvar Token_Activities_V2_Select_Column = /* @__PURE__ */ ((Token_Activities_V2_Select_Column2) => {\n Token_Activities_V2_Select_Column2[\"AfterValue\"] = \"after_value\";\n Token_Activities_V2_Select_Column2[\"BeforeValue\"] = \"before_value\";\n Token_Activities_V2_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n Token_Activities_V2_Select_Column2[\"EventAccountAddress\"] = \"event_account_address\";\n Token_Activities_V2_Select_Column2[\"EventIndex\"] = \"event_index\";\n Token_Activities_V2_Select_Column2[\"FromAddress\"] = \"from_address\";\n Token_Activities_V2_Select_Column2[\"IsFungibleV2\"] = \"is_fungible_v2\";\n Token_Activities_V2_Select_Column2[\"PropertyVersionV1\"] = \"property_version_v1\";\n Token_Activities_V2_Select_Column2[\"ToAddress\"] = \"to_address\";\n Token_Activities_V2_Select_Column2[\"TokenAmount\"] = \"token_amount\";\n Token_Activities_V2_Select_Column2[\"TokenDataId\"] = \"token_data_id\";\n Token_Activities_V2_Select_Column2[\"TokenStandard\"] = \"token_standard\";\n Token_Activities_V2_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Token_Activities_V2_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Token_Activities_V2_Select_Column2[\"Type\"] = \"type\";\n return Token_Activities_V2_Select_Column2;\n})(Token_Activities_V2_Select_Column || {});\nvar Token_Datas_Select_Column = /* @__PURE__ */ ((Token_Datas_Select_Column2) => {\n Token_Datas_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Token_Datas_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Token_Datas_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Token_Datas_Select_Column2[\"DefaultProperties\"] = \"default_properties\";\n Token_Datas_Select_Column2[\"Description\"] = \"description\";\n Token_Datas_Select_Column2[\"DescriptionMutable\"] = \"description_mutable\";\n Token_Datas_Select_Column2[\"LargestPropertyVersion\"] = \"largest_property_version\";\n Token_Datas_Select_Column2[\"Maximum\"] = \"maximum\";\n Token_Datas_Select_Column2[\"MaximumMutable\"] = \"maximum_mutable\";\n Token_Datas_Select_Column2[\"MetadataUri\"] = \"metadata_uri\";\n Token_Datas_Select_Column2[\"Name\"] = \"name\";\n Token_Datas_Select_Column2[\"PayeeAddress\"] = \"payee_address\";\n Token_Datas_Select_Column2[\"PropertiesMutable\"] = \"properties_mutable\";\n Token_Datas_Select_Column2[\"RoyaltyMutable\"] = \"royalty_mutable\";\n Token_Datas_Select_Column2[\"RoyaltyPointsDenominator\"] = \"royalty_points_denominator\";\n Token_Datas_Select_Column2[\"RoyaltyPointsNumerator\"] = \"royalty_points_numerator\";\n Token_Datas_Select_Column2[\"Supply\"] = \"supply\";\n Token_Datas_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n Token_Datas_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Token_Datas_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n Token_Datas_Select_Column2[\"UriMutable\"] = \"uri_mutable\";\n return Token_Datas_Select_Column2;\n})(Token_Datas_Select_Column || {});\nvar Token_Ownerships_Select_Column = /* @__PURE__ */ ((Token_Ownerships_Select_Column2) => {\n Token_Ownerships_Select_Column2[\"Amount\"] = \"amount\";\n Token_Ownerships_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Token_Ownerships_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Token_Ownerships_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Token_Ownerships_Select_Column2[\"Name\"] = \"name\";\n Token_Ownerships_Select_Column2[\"OwnerAddress\"] = \"owner_address\";\n Token_Ownerships_Select_Column2[\"PropertyVersion\"] = \"property_version\";\n Token_Ownerships_Select_Column2[\"TableHandle\"] = \"table_handle\";\n Token_Ownerships_Select_Column2[\"TableType\"] = \"table_type\";\n Token_Ownerships_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n Token_Ownerships_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Token_Ownerships_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Token_Ownerships_Select_Column2;\n})(Token_Ownerships_Select_Column || {});\nvar Tokens_Select_Column = /* @__PURE__ */ ((Tokens_Select_Column2) => {\n Tokens_Select_Column2[\"CollectionDataIdHash\"] = \"collection_data_id_hash\";\n Tokens_Select_Column2[\"CollectionName\"] = \"collection_name\";\n Tokens_Select_Column2[\"CreatorAddress\"] = \"creator_address\";\n Tokens_Select_Column2[\"Name\"] = \"name\";\n Tokens_Select_Column2[\"PropertyVersion\"] = \"property_version\";\n Tokens_Select_Column2[\"TokenDataIdHash\"] = \"token_data_id_hash\";\n Tokens_Select_Column2[\"TokenProperties\"] = \"token_properties\";\n Tokens_Select_Column2[\"TransactionTimestamp\"] = \"transaction_timestamp\";\n Tokens_Select_Column2[\"TransactionVersion\"] = \"transaction_version\";\n return Tokens_Select_Column2;\n})(Tokens_Select_Column || {});\nvar User_Transactions_Select_Column = /* @__PURE__ */ ((User_Transactions_Select_Column2) => {\n User_Transactions_Select_Column2[\"BlockHeight\"] = \"block_height\";\n User_Transactions_Select_Column2[\"EntryFunctionIdStr\"] = \"entry_function_id_str\";\n User_Transactions_Select_Column2[\"Epoch\"] = \"epoch\";\n User_Transactions_Select_Column2[\"ExpirationTimestampSecs\"] = \"expiration_timestamp_secs\";\n User_Transactions_Select_Column2[\"GasUnitPrice\"] = \"gas_unit_price\";\n User_Transactions_Select_Column2[\"MaxGasAmount\"] = \"max_gas_amount\";\n User_Transactions_Select_Column2[\"ParentSignatureType\"] = \"parent_signature_type\";\n User_Transactions_Select_Column2[\"Sender\"] = \"sender\";\n User_Transactions_Select_Column2[\"SequenceNumber\"] = \"sequence_number\";\n User_Transactions_Select_Column2[\"Timestamp\"] = \"timestamp\";\n User_Transactions_Select_Column2[\"Version\"] = \"version\";\n return User_Transactions_Select_Column2;\n})(User_Transactions_Select_Column || {});\nexport {\n APTOS_COIN,\n AccountSequenceNumber,\n Account_Transactions_Select_Column,\n Address_Events_Summary_Select_Column,\n Address_Version_From_Events_Select_Column,\n Address_Version_From_Move_Resources_Select_Column,\n AnsClient,\n ApiError,\n AptosAccount,\n AptosApiError,\n AptosClient,\n AptosToken,\n bcs_exports as BCS,\n Block_Metadata_Transactions_Select_Column,\n CKDPriv,\n COIN_TRANSFER,\n CoinClient,\n Coin_Activities_Select_Column,\n Coin_Balances_Select_Column,\n Coin_Infos_Select_Column,\n Coin_Supply_Select_Column,\n Collection_Datas_Select_Column,\n Current_Ans_Lookup_Select_Column,\n Current_Ans_Lookup_V2_Select_Column,\n Current_Aptos_Names_Select_Column,\n Current_Coin_Balances_Select_Column,\n Current_Collection_Datas_Select_Column,\n Current_Collection_Ownership_V2_View_Select_Column,\n Current_Collections_V2_Select_Column,\n Current_Delegated_Staking_Pool_Balances_Select_Column,\n Current_Delegated_Voter_Select_Column,\n Current_Delegator_Balances_Select_Column,\n Current_Fungible_Asset_Balances_Select_Column,\n Current_Objects_Select_Column,\n Current_Staking_Pool_Voter_Select_Column,\n Current_Table_Items_Select_Column,\n Current_Token_Datas_Select_Column,\n Current_Token_Datas_V2_Select_Column,\n Current_Token_Ownerships_Select_Column,\n Current_Token_Ownerships_V2_Select_Column,\n Current_Token_Pending_Claims_Select_Column,\n Cursor_Ordering,\n Delegated_Staking_Activities_Select_Column,\n Delegated_Staking_Pools_Select_Column,\n Delegator_Distinct_Pool_Select_Column,\n Events_Select_Column,\n FailedTransactionError,\n FaucetClient,\n FungibleAssetClient,\n Fungible_Asset_Activities_Select_Column,\n Fungible_Asset_Metadata_Select_Column,\n HexString,\n IndexerClient,\n Indexer_Status_Select_Column,\n Ledger_Infos_Select_Column,\n Move_Resources_Select_Column,\n Network,\n NetworkToIndexerAPI,\n NetworkToNodeAPI,\n Nft_Marketplace_V2_Current_Nft_Marketplace_Auctions_Select_Column,\n Nft_Marketplace_V2_Current_Nft_Marketplace_Collection_Offers_Select_Column,\n Nft_Marketplace_V2_Current_Nft_Marketplace_Listings_Select_Column,\n Nft_Marketplace_V2_Current_Nft_Marketplace_Token_Offers_Select_Column,\n Nft_Marketplace_V2_Nft_Marketplace_Activities_Select_Column,\n Nft_Metadata_Crawler_Parsed_Asset_Uris_Select_Column,\n NodeAPIToNetwork,\n Num_Active_Delegator_Per_Pool_Select_Column,\n Order_By,\n Processor_Status_Select_Column,\n PropertyMap,\n PropertyValue,\n Proposal_Votes_Select_Column,\n Provider,\n TRANSFER_COINS,\n Table_Items_Select_Column,\n Table_Metadatas_Select_Column,\n TokenClient,\n token_types_exports as TokenTypes,\n Token_Activities_Select_Column,\n Token_Activities_V2_Select_Column,\n Token_Datas_Select_Column,\n Token_Ownerships_Select_Column,\n Tokens_Select_Column,\n TransactionBuilder,\n TransactionBuilderABI,\n TransactionBuilderEd25519,\n TransactionBuilderMultiEd25519,\n TransactionBuilderRemoteABI,\n TransactionWorker,\n TransactionWorkerEvents,\n aptos_types_exports as TxnBuilderTypes,\n TypeTagParser,\n generated_exports as Types,\n User_Transactions_Select_Column,\n WaitForTransactionError,\n ansContractsMap,\n aptosRequest,\n argToTransactionArgument,\n derivePath,\n deserializePropertyMap,\n deserializeValueBasedOnTypeTag,\n ensureBigInt,\n ensureBoolean,\n ensureNumber,\n get,\n getAddressFromAccountOrAddress,\n getMasterKeyFromSeed,\n getPropertyType,\n getPropertyValueRaw,\n getPublicKey,\n getSinglePropertyValueRaw,\n isValidPath,\n nameComponentPattern,\n namePattern,\n post,\n serializeArg\n};\n//# sourceMappingURL=index.mjs.map"],"names":[],"sourceRoot":"","ignoreList":[0]}