@arcblock/payment-service 1.29.7 → 1.29.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/dist/cf.d.ts +31 -0
  2. package/dist/cf.js +79 -60
  3. package/dist/index.d.ts +17 -0
  4. package/dist/index.js +264 -73
  5. package/package.json +4 -4
  6. package/web/assets/{account-DETfFe4_.js → account-Clbqiiw3.js} +1 -1
  7. package/web/assets/{action-B_DQJlip.js → action-DENqSeOa.js} +1 -1
  8. package/web/assets/{actions-BtaoyTWt.js → actions-0iWP2mcx.js} +1 -1
  9. package/web/assets/{actions-QPa-8lfB.js → actions-BD9BAp3M.js} +1 -1
  10. package/web/assets/{actions-jxGAdGfb.js → actions-BJDN6Op2.js} +1 -1
  11. package/web/assets/{actions-DJyfN5OU.js → actions-BSNy5bOd.js} +1 -1
  12. package/web/assets/{actions-Bt_jST94.js → actions-CDsj5j8l.js} +1 -1
  13. package/web/assets/{actions-D9MHLBFH.js → actions-CSpJGOX7.js} +1 -1
  14. package/web/assets/{actions-BknL4OyZ.js → actions-CZL47E9r.js} +1 -1
  15. package/web/assets/{actions-EPYeS5p4.js → actions-D3tJgrUn.js} +1 -1
  16. package/web/assets/{actions-BaDh4xWX.js → actions-DGQs8fFF.js} +1 -1
  17. package/web/assets/{add-price-CD-utowo.js → add-price-BpnICuHO.js} +1 -1
  18. package/web/assets/{admin-_nEB-lHn.js → admin-CD8ViZ7D.js} +1 -1
  19. package/web/assets/{assign-CkV5Q2LP.js → assign-0vMUDW_C.js} +1 -1
  20. package/web/assets/{attempts-DySeqBYU.js → attempts-CKlxkJuE.js} +1 -1
  21. package/web/assets/browser-DDv4_sgY.js +1 -0
  22. package/web/assets/{change-payment-CPUCUEER.js → change-payment-gAlRmJpv.js} +1 -1
  23. package/web/assets/{change-plan-CxE-XfWc.js → change-plan-C47wfWH8.js} +1 -1
  24. package/web/assets/{click-boundary-y8dVA_tr.js → click-boundary-CafubiPp.js} +1 -1
  25. package/web/assets/{connect-CC_l_f6Q.js → connect-BHHzrwLA.js} +1 -1
  26. package/web/assets/{copyable-DpX04wZz.js → copyable-QrCyyiou.js} +1 -1
  27. package/web/assets/{create-3SsWCAOC.js → create-0PUtkJZY.js} +1 -1
  28. package/web/assets/{create-BkQAaSvD.js → create-BJ1asdcy.js} +1 -1
  29. package/web/assets/{create-kG09X9gl.js → create-Bgv5ux17.js} +1 -1
  30. package/web/assets/{create-BmcRybZ5.js → create-C7GOgZZM.js} +1 -1
  31. package/web/assets/{create-tYebjhr9.js → create-DNar5UQD.js} +1 -1
  32. package/web/assets/{create-Bs65p5Ne.js → create-ke4FrPx1.js} +1 -1
  33. package/web/assets/{credit-grant-item-list-Bk27jIc7.js → credit-grant-item-list-CeDAM3qV.js} +1 -1
  34. package/web/assets/{credit-overview-DmMSEs14.js → credit-overview-4zh0H02x.js} +2 -2
  35. package/web/assets/{currency-restrictions-DYLv4YyW.js → currency-restrictions-BcEm8W45.js} +1 -1
  36. package/web/assets/{currency-select-DGS-62-L.js → currency-select-B4ieQBvv.js} +1 -1
  37. package/web/assets/{dayjs-B9tvQIKg.js → dayjs-DUTDpcNU.js} +1 -1
  38. package/web/assets/{description-Ym17DL48.js → description-SnR5WxWT.js} +1 -1
  39. package/web/assets/detail-46aLUdJj.js +1 -0
  40. package/web/assets/{detail-Cr2wG4Th.js → detail-B-ceWfZr.js} +1 -1
  41. package/web/assets/detail-B0IHl4MI.js +1 -0
  42. package/web/assets/detail-B8eOBVSQ.js +15 -0
  43. package/web/assets/{detail-DE3OOC5M.js → detail-BO3zglCn.js} +1 -1
  44. package/web/assets/{detail-DG4l2CqN.js → detail-BQpDGZJQ.js} +1 -1
  45. package/web/assets/{detail-CxYQYu_l.js → detail-BXTsnQny.js} +1 -1
  46. package/web/assets/{detail-CT9Unyrf.js → detail-B_lpOomD.js} +1 -1
  47. package/web/assets/{detail-Do9QO5L2.js → detail-Bfnkg0A1.js} +1 -1
  48. package/web/assets/detail-BwH0DwAi.js +1 -0
  49. package/web/assets/{detail-OZeeKI69.js → detail-C1FupF1D.js} +2 -2
  50. package/web/assets/{detail-cwHZbY62.js → detail-CMBRd4Ct.js} +1 -1
  51. package/web/assets/detail-C_Zdfa0y.js +1 -0
  52. package/web/assets/{detail-Cb9HBSMw.js → detail-Cg505nKX.js} +1 -1
  53. package/web/assets/{detail-DB56SG-k.js → detail-CsGZMimg.js} +1 -1
  54. package/web/assets/{detail-K9EVY3r2.js → detail-Ct5QNBqu.js} +1 -1
  55. package/web/assets/{detail-DuO_Jn5X.js → detail-CyMhK5K_.js} +1 -1
  56. package/web/assets/{detail-DuWdZIyp.js → detail-DACnmls3.js} +1 -1
  57. package/web/assets/{detail-BJTcK7mx.js → detail-DCTb8R7F.js} +1 -1
  58. package/web/assets/{detail-DPCTQLOx.js → detail-DNcp_u5S.js} +1 -1
  59. package/web/assets/detail-DbU3p040.js +1 -0
  60. package/web/assets/{detail-D5KRrQDx.js → detail-Tn2R5C8i.js} +1 -1
  61. package/web/assets/{detail-15zxCbV9.js → detail-wU4wNf4s.js} +1 -1
  62. package/web/assets/{drawer-form-Cl0T1Yyt.js → drawer-form-DspWWj3x.js} +1 -1
  63. package/web/assets/{edit-3HUAnaXW.js → edit-Bkj-OTJh.js} +1 -1
  64. package/web/assets/{editor-BF5I0siU.js → editor-AmthipP2.js} +1 -1
  65. package/web/assets/{embed-CsNqeCd0.js → embed-rRKjDoHi.js} +1 -1
  66. package/web/assets/{filter-toolbar-BydfQ-79.js → filter-toolbar-DXGSTq57.js} +1 -1
  67. package/web/assets/{form-DSzMo9UD.js → form-B5WW-lS5.js} +1 -1
  68. package/web/assets/form-BmQlJZ84.js +9 -0
  69. package/web/assets/{form-BGm5NPDn.js → form-CAPjlw7l.js} +1 -1
  70. package/web/assets/{form-CKfKLGXP.js → form-DD-EiA7W.js} +3 -3
  71. package/web/assets/{form-P4luyUpY.js → form-cX026J4G.js} +1 -1
  72. package/web/assets/{gas-Qf0SSUfS.js → gas-nyR96dB0.js} +1 -1
  73. package/web/assets/{generateCategoricalChart-BaWwaXky.js → generateCategoricalChart-BadryV3H.js} +1 -1
  74. package/web/assets/{home-HbrLyxJL.js → home-_eX1aim8.js} +1 -1
  75. package/web/assets/index-BBHMsIxJ.js +1 -0
  76. package/web/assets/{index-Dr_MwbKt.js → index-BQjlhCSt.js} +1 -1
  77. package/web/assets/{index-DPodCQ9c.js → index-BRENdB5m.js} +1 -1
  78. package/web/assets/{index-9xBRL_33.js → index-BTfJ08JU.js} +1 -1
  79. package/web/assets/{index-DgSc1Qy8.js → index-BarN7DfU.js} +17 -17
  80. package/web/assets/index-BhcoukR2.js +1 -0
  81. package/web/assets/index-BturOfxo.js +1 -0
  82. package/web/assets/{index-SYTpMMMH.js → index-BzABukCz.js} +1 -1
  83. package/web/assets/{index-2l22EYw9.js → index-C-RT84yb.js} +1 -1
  84. package/web/assets/{index-C0JaS08f.js → index-C136x0O2.js} +1 -1
  85. package/web/assets/{index-Cw0ugaQL.js → index-CCVDDX0c.js} +1 -1
  86. package/web/assets/index-CDVogp6E.js +1 -0
  87. package/web/assets/{index-Br7_mvEw.js → index-CW8VfoJO.js} +1 -1
  88. package/web/assets/{index-BIoSdRvX.js → index-CbSXdD6E.js} +3 -3
  89. package/web/assets/{index-CdkYrABk.js → index-Cd_BD9TM.js} +1 -1
  90. package/web/assets/index-D-bx9Kam.js +1 -0
  91. package/web/assets/index-D0mynT6_.js +1 -0
  92. package/web/assets/index-DEiuhiEo.js +14 -0
  93. package/web/assets/{index-DE2KzqXl.js → index-DNGmCIRP.js} +1 -1
  94. package/web/assets/{index-CI_EY4YS.js → index-DSe7Dot_.js} +1 -1
  95. package/web/assets/{index-BFML4-2u.js → index-DcddP3R9.js} +1 -1
  96. package/web/assets/index-DcrGSDby.js +1 -0
  97. package/web/assets/{index-fByZjxLy.js → index-DeK5Pqjv.js} +1 -1
  98. package/web/assets/{index-Clbt8nRm.js → index-DoX0A-rP.js} +1 -1
  99. package/web/assets/index-Du0Ieh1F.js +49 -0
  100. package/web/assets/index-Dybqd298.js +1 -0
  101. package/web/assets/index-EXZPddtw.js +1 -0
  102. package/web/assets/{index-Drav4oDH.js → index-Kd_qCyRG.js} +2 -2
  103. package/web/assets/{index-Dc954mDP.js → index-SOzRg0yJ.js} +1 -1
  104. package/web/assets/{index-BMKZToMM.js → index-UYeD8rTJ.js} +2 -2
  105. package/web/assets/{index-DZpJPE1Z.js → index-W2uZUlFs.js} +1 -1
  106. package/web/assets/{index-1y9kjPIr.js → index-XaFn2ySq.js} +1 -1
  107. package/web/assets/{index-fswPX_qe.js → index-YG5oc8O3.js} +1 -1
  108. package/web/assets/{index-B1pTTyGZ.js → index-ajD9Iotk.js} +1 -1
  109. package/web/assets/index-brUCsnBA.js +1 -0
  110. package/web/assets/{index-BP53rZV9.js → index-mn5Zdrtn.js} +1 -1
  111. package/web/assets/index-qulrJQ4J.js +1 -0
  112. package/web/assets/{index.es-BWnfUzLb.js → index.es-C8dcCHdW.js} +1 -1
  113. package/web/assets/{info-card-C1yxhxJG.js → info-card-BvIMFQo5.js} +1 -1
  114. package/web/assets/{info-metric-CNse3r66.js → info-metric-Dl4ZDm0Z.js} +1 -1
  115. package/web/assets/{info-row-group-BeUhWnnY.js → info-row-group-CFuMWJf1.js} +1 -1
  116. package/web/assets/{info-row-DOK2whMn.js → info-row-jI0h_hv4.js} +1 -1
  117. package/web/assets/{libphonenumber-CyphiuxQ.js → libphonenumber-Qs8PCdM-.js} +1 -1
  118. package/web/assets/{link-3eeclTeS.js → link-CmPoIweR.js} +1 -1
  119. package/web/assets/{list-DnePqZ2K.js → list-BdSkPjIa.js} +1 -1
  120. package/web/assets/{list-jHj_5yy3.js → list-CWMEf-_C.js} +1 -1
  121. package/web/assets/{list-C521zE_7.js → list-CkHExntK.js} +1 -1
  122. package/web/assets/{list-CO0X4L3-.js → list-DLB_hd0Q.js} +1 -1
  123. package/web/assets/{list-D-I0msRW.js → list-DVFJwd_I.js} +2 -2
  124. package/web/assets/{list-D1aevUOI.js → list-DaK9287Y.js} +2 -2
  125. package/web/assets/{list-1OG83xc4.js → list-DghnUOc4.js} +1 -1
  126. package/web/assets/{list-CNmzJKIQ.js → list-eFkvVlp5.js} +1 -1
  127. package/web/assets/metadata-BmQTVFku.js +55 -0
  128. package/web/assets/{meter-event-lmNMgmIu.js → meter-event-B1JIhVpb.js} +1 -1
  129. package/web/assets/{metrics-C7U41HWk.js → metrics-UvxyQbUF.js} +1 -1
  130. package/web/assets/{overview-Cs3-8n4e.js → overview-Cxc6WKba.js} +1 -1
  131. package/web/assets/{overview-CH1HnSP-.js → overview-DrMaIptb.js} +1 -1
  132. package/web/assets/{past-due-CGGRZmXY.js → past-due-CUXkxns0.js} +1 -1
  133. package/web/assets/pay-omLYkqRA.js +4 -0
  134. package/web/assets/{payment-method-info-BsOBbA3m.js → payment-method-info-Bsf89VxV.js} +2 -2
  135. package/web/assets/{preview-DjYRpRA8.js → preview-BifsgUGT.js} +1 -1
  136. package/web/assets/{preview-CjYh9dTg.js → preview-C-H8pGVw.js} +1 -1
  137. package/web/assets/{pricing-table-C3Lkhq46.js → pricing-table-B3QOaAB5.js} +2 -2
  138. package/web/assets/{pricing-table-edE6TJGX.js → pricing-table-BUJdtkMq.js} +1 -1
  139. package/web/assets/{product-select-0ScZE2e8.js → product-select-ChEyoJqJ.js} +1 -1
  140. package/web/assets/{recharge-DcPtT8vt.js → recharge-BVT4USAO.js} +1 -1
  141. package/web/assets/{related-credit-grants-BygNGPfb.js → related-credit-grants-JV2ICsR5.js} +22 -22
  142. package/web/assets/{safe-did-address-B0fFbUph.js → safe-did-address-CiG_V6Gy.js} +1 -1
  143. package/web/assets/{source-data-viewer-By_Utay-.js → source-data-viewer-i1q9wNIG.js} +1 -1
  144. package/web/assets/{status-l6pD08fw.js → status-CUVYrUIG.js} +1 -1
  145. package/web/assets/subscription-BYz_k9dq.js +1 -0
  146. package/web/assets/{subscription-Dq22e3D1.js → subscription-DrnSPIfs.js} +1 -1
  147. package/web/assets/table-BrtHemkA.js +1 -0
  148. package/web/assets/{tax-code-select-CWhIIiXi.js → tax-code-select-TS07I0rB.js} +1 -1
  149. package/web/assets/{tax-utils-DqNX34-r.js → tax-utils-bPjALcVG.js} +1 -1
  150. package/web/assets/{uploader-DRXDz_r0.js → uploader-CsQNHG4I.js} +1 -1
  151. package/web/assets/{usage-records-jjJMZ6DI.js → usage-records-DAUQMJAW.js} +1 -1
  152. package/web/assets/{util-mDHAL0lx.js → util-DxXTXkeY.js} +1 -1
  153. package/web/assets/{vendor-arcblock-ChFCRdyx.js → vendor-arcblock-BTCAQSUK.js} +1 -1
  154. package/web/assets/{vendor-blocklet-D_i_QeSo.js → vendor-blocklet-DcLR2Cyf.js} +43 -43
  155. package/web/index.html +1 -1
  156. package/web/assets/browser-DSLTxXlL.js +0 -1
  157. package/web/assets/detail-ASPdMJoW.js +0 -1
  158. package/web/assets/detail-CIx9vkir.js +0 -1
  159. package/web/assets/detail-D5NbV29V.js +0 -1
  160. package/web/assets/detail-DVVzYhdV.js +0 -1
  161. package/web/assets/detail-Dqc0OfCQ.js +0 -1
  162. package/web/assets/detail-uhlID8jD.js +0 -15
  163. package/web/assets/form-BXAuSawq.js +0 -9
  164. package/web/assets/index-0HK7CYm4.js +0 -1
  165. package/web/assets/index-BJ_E6bEO.js +0 -1
  166. package/web/assets/index-Bnyh4rlV.js +0 -1
  167. package/web/assets/index-BoQ7wf3O.js +0 -1
  168. package/web/assets/index-C68x-aau.js +0 -1
  169. package/web/assets/index-C8s2QKoe.js +0 -1
  170. package/web/assets/index-Cn7O-OP7.js +0 -49
  171. package/web/assets/index-DU39aG5u.js +0 -1
  172. package/web/assets/index-DtbqgSK4.js +0 -1
  173. package/web/assets/index-DuRu9NWB.js +0 -14
  174. package/web/assets/index-WMKOiUez.js +0 -1
  175. package/web/assets/index-dmHgoplS.js +0 -1
  176. package/web/assets/index-txVTkoDD.js +0 -1
  177. package/web/assets/metadata-CMSHcSXi.js +0 -55
  178. package/web/assets/pay-CSpHBUh_.js +0 -4
  179. package/web/assets/subscription-DcwhSOpa.js +0 -1
  180. package/web/assets/table-BRU4Enia.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as Zr,r as Jt,j as X,B as ue,q as Te,a3 as St,aR as Oe,be as Qr,aQ as Yr,aT as zr,ad as nt,aY as en,a_ as tn,aX as bt,a$ as kt,a2 as Ke,ck as rn}from"./vendor-mui-BXZut9Pz.js";import{cI as xe,cJ as nn,cK as rt,cL as ke,cM as we,V as sn,O as on}from"./vendor-blocklet-D_i_QeSo.js";import{E as an,X as Gt,a as dn,aX as Ne,aW as un,C as cn}from"./index-DgSc1Qy8.js";import{I as pn}from"./collapse-CSrlJ0eG.js";import{M as $n}from"./form-BGm5NPDn.js";var et={exports:{}};var ln=et.exports,_t;function An(){return _t||(_t=1,(function(d){(function(u){function c(){}var g=c.prototype,E=u.EventEmitter;function b(o,s){for(var p=o.length;p--;)if(o[p].listener===s)return p;return-1}function I(o){return function(){return this[o].apply(this,arguments)}}g.getListeners=function(s){var p=this._getEvents(),a,l;if(s instanceof RegExp){a={};for(l in p)p.hasOwnProperty(l)&&s.test(l)&&(a[l]=p[l])}else a=p[s]||(p[s]=[]);return a},g.flattenListeners=function(s){var p=[],a;for(a=0;a<s.length;a+=1)p.push(s[a].listener);return p},g.getListenersAsObject=function(s){var p=this.getListeners(s),a;return p instanceof Array&&(a={},a[s]=p),a||p};function S(o){return typeof o=="function"||o instanceof RegExp?!0:o&&typeof o=="object"?S(o.listener):!1}g.addListener=function(s,p){if(!S(p))throw new TypeError("listener must be a function");var a=this.getListenersAsObject(s),l=typeof p=="object",e;for(e in a)a.hasOwnProperty(e)&&b(a[e],p)===-1&&a[e].push(l?p:{listener:p,once:!1});return this},g.on=I("addListener"),g.addOnceListener=function(s,p){return this.addListener(s,{listener:p,once:!0})},g.once=I("addOnceListener"),g.defineEvent=function(s){return this.getListeners(s),this},g.defineEvents=function(s){for(var p=0;p<s.length;p+=1)this.defineEvent(s[p]);return this},g.removeListener=function(s,p){var a=this.getListenersAsObject(s),l,e;for(e in a)a.hasOwnProperty(e)&&(l=b(a[e],p),l!==-1&&a[e].splice(l,1));return this},g.off=I("removeListener"),g.addListeners=function(s,p){return this.manipulateListeners(!1,s,p)},g.removeListeners=function(s,p){return this.manipulateListeners(!0,s,p)},g.manipulateListeners=function(s,p,a){var l,e,t=s?this.removeListener:this.addListener,r=s?this.removeListeners:this.addListeners;if(typeof p=="object"&&!(p instanceof RegExp))for(l in p)p.hasOwnProperty(l)&&(e=p[l])&&(typeof e=="function"?t.call(this,l,e):r.call(this,l,e));else for(l=a.length;l--;)t.call(this,p,a[l]);return this},g.removeEvent=function(s){var p=typeof s,a=this._getEvents(),l;if(p==="string")delete a[s];else if(s instanceof RegExp)for(l in a)a.hasOwnProperty(l)&&s.test(l)&&delete a[l];else delete this._events;return this},g.removeAllListeners=I("removeEvent"),g.emitEvent=function(s,p){var a=this.getListenersAsObject(s),l,e,t,r,n;for(r in a)if(a.hasOwnProperty(r))for(l=a[r].slice(0),t=0;t<l.length;t++)e=l[t],e.once===!0&&this.removeListener(s,e.listener),n=e.listener.apply(this,p||[]),n===this._getOnceReturnValue()&&this.removeListener(s,e.listener);return this},g.trigger=I("emitEvent"),g.emit=function(s){var p=Array.prototype.slice.call(arguments,1);return this.emitEvent(s,p)},g.setOnceReturnValue=function(s){return this._onceReturnValue=s,this},g._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},g._getEvents=function(){return this._events||(this._events={})},c.noConflict=function(){return u.EventEmitter=E,c},d.exports?d.exports=c:u.EventEmitter=c})(typeof window<"u"?window:ln||{})})(et)),et.exports}var it,Ot;function kr(){if(Ot)return it;Ot=1;function d(I){return I==null?"":String(I).replace(/[_-](\w)/g,(S,o)=>o.toUpperCase())}function u(I,S){const o={};if(!I)return o;for(const s of S)Object.prototype.hasOwnProperty.call(I,s)&&(o[s]=I[s]);return o}function c(I,S){const o={};if(!I)return o;const s=new Set(S);for(const p of Object.keys(I))s.has(p)||(o[p]=I[p]);return o}function g(I){return Array.isArray(I)?I:String(I).split(".")}function E(I,S,o){if(I==null)return o;const s=g(S);let p=I;for(const a of s){if(p==null)return o;p=p[a]}return p===void 0?o:p}function b(I,S,o){if(I==null)return I;const s=g(S);let p=I;for(let a=0;a<s.length-1;a++){const l=s[a];(p[l]==null||typeof p[l]!="object")&&(p[l]={}),p=p[l]}return p[s[s.length-1]]=o,I}return it={camelCase:d,pick:u,omit:c,get:E,set:b},it}const yn=JSON.parse('{"ocap":{"nested":{"StatusCode":{"values":{"OK":0,"INVALID_NONCE":1,"INVALID_SIGNATURE":2,"INVALID_SENDER_STATE":3,"INVALID_RECEIVER_STATE":4,"INSUFFICIENT_DATA":5,"INSUFFICIENT_FUND":6,"INVALID_OWNER":7,"INVALID_TX":8,"UNSUPPORTED_TX":9,"EXPIRED_TX":10,"TOO_MANY_TXS":11,"INVALID_LOCK_STATUS":12,"INVALID_REQUEST":13,"INVALID_MONIKER":16,"INVALID_PASSPHRASE":17,"INVALID_MULTISIG":20,"INVALID_WALLET":21,"INVALID_CHAIN_ID":22,"CONSENSUS_RPC_ERROR":24,"STORAGE_RPC_ERROR":25,"NOENT":26,"ACCOUNT_MIGRATED":27,"RPC_CONNECTION_ERROR":28,"UNSUPPORTED_STAKE":30,"INSUFFICIENT_STAKE":31,"INVALID_STAKE_STATE":32,"EXPIRED_WALLET_TOKEN":33,"BANNED_UNSTAKE":34,"INVALID_ASSET":35,"INVALID_TX_SIZE":36,"INVALID_SIGNER_STATE":37,"INVALID_FORGE_STATE":38,"EXPIRED_ASSET":39,"UNTRANSFERRABLE_ASSET":40,"READONLY_ASSET":41,"CONSUMED_ASSET":42,"INVALID_DEPOSIT_VALUE":43,"EXCEED_DEPOSIT_CAP":44,"INVALID_DEPOSIT_TARGET":45,"INVALID_DEPOSITOR":46,"INVALID_WITHDRAWER":47,"INVALID_EXPIRY_DATE":49,"INVALID_CUSTODIAN":51,"INSUFFICIENT_GAS":52,"INVALID_SWAP":53,"INVALID_HASHKEY":54,"INVALID_DELEGATION":55,"INSUFFICIENT_DELEGATION":56,"INVALID_DELEGATION_RULE":57,"INVALID_DELEGATION_TYPE_URL":58,"SENDER_NOT_AUTHORIZED":59,"PROTOCOL_NOT_RUNNING":60,"PROTOCOL_NOT_PAUSED":61,"PROTOCOL_NOT_ACTIVATED":62,"INVALID_DEACTIVATION":63,"SENDER_WITHDRAW_ITEMS_FULL":64,"WITHDRAW_ITEM_MISSING":65,"INVALID_WITHDRAW_TX":66,"INVALID_CHAIN_TYPE":67,"INVALID_TIME":68,"INVALID_SUBSCRIBE":69,"INVALID_DID_TYPE":70,"INVALID_CANDIDATE_STATE":71,"VALIDATOR_NOT_FOUND":72,"VALIDATOR_NOT_CHANGED":73,"INVALID_FACTORY_STATE":74,"INVALID_FACTORY_PROPS":75,"INVALID_FACTORY_INPUT":76,"INVALID_TOKEN":77,"INVALID_ROLLUP":78,"INVALID_BLOCK":79,"FORBIDDEN":403,"INTERNAL":500,"TIMEOUT":504}},"KeyType":{"values":{"ED25519":0,"SECP256K1":1,"ETHEREUM":2}},"HashType":{"values":{"KECCAK":0,"SHA3":1,"SHA2":2,"KECCAK_384":6,"SHA3_384":7,"KECCAK_512":13,"SHA3_512":14}},"EncodingType":{"values":{"BASE16":0,"BASE58":1}},"RoleType":{"values":{"ROLE_ACCOUNT":0,"ROLE_NODE":1,"ROLE_DEVICE":2,"ROLE_APPLICATION":3,"ROLE_SMART_CONTRACT":4,"ROLE_BOT":5,"ROLE_ASSET":6,"ROLE_STAKE":7,"ROLE_VALIDATOR":8,"ROLE_GROUP":9,"ROLE_TX":10,"ROLE_TETHER":11,"ROLE_SWAP":12,"ROLE_DELEGATION":13,"ROLE_VC":14,"ROLE_BLOCKLET":15,"ROLE_STORE":16,"ROLE_TOKEN":17,"ROLE_FACTORY":18,"ROLE_ROLLUP":19,"ROLE_STORAGE":20,"ROLE_ANY":63}},"UpgradeType":{"values":{"CONFIG_APP":0,"CONFIG_FORGE":1,"CONFIG_DFS":2,"CONFIG_CONSENSUS":3,"CONFIG_P2P":4,"EXE_APP":10,"EXE_FORGE":11,"EXE_DFS":12,"EXE_CONSENSUS":13,"EXE_P2P":14}},"UpgradeAction":{"values":{"VERIFY":0,"BACKUP":1,"REPLACE":2,"RESTART_APP":10,"RESTART_DFS":11,"RESTART_CONSENSUS":12,"RESTART_P2P":13,"RESTART_FORGE":14,"ROLLBACK_IF_FAIL":30,"RESTART_ALL_IF_FAIL":31,"CRASH_IF_FAIL":33,"DROP_ADDRESS_BOOK":50}},"StateType":{"values":{"STATE_ACCOUNT":0,"STATE_ASSET":1,"STATE_CHANNEL":2,"STATE_FORGE":3,"STATE_STAKE":4}},"StakeType":{"values":{"STAKE_NODE":0,"STAKE_USER":1,"STAKE_ASSET":2,"STAKE_CHAIN":3}},"ProtocolStatus":{"values":{"RUNNING":0,"PAUSED":1,"TERMINATED":2}},"BigUint":{"fields":{"value":{"type":"bytes","id":1}}},"BigSint":{"fields":{"value":{"type":"bytes","id":1},"minus":{"type":"bool","id":2}}},"TokenSymbol":{"fields":{"address":{"type":"string","id":1},"symbol":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4}}},"TokenInfo":{"fields":{"address":{"type":"string","id":1},"symbol":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4},"name":{"type":"string","id":5},"description":{"type":"string","id":6},"icon":{"type":"string","id":7},"maxTotalSupply":{"type":"string","id":8},"metadata":{"type":"google.protobuf.Any","id":9},"website":{"type":"string","id":10},"spenders":{"rule":"repeated","type":"string","id":11},"minters":{"rule":"repeated","type":"string","id":12},"type":{"type":"string","id":13}}},"WalletType":{"fields":{"pk":{"type":"KeyType","id":1},"hash":{"type":"HashType","id":2},"address":{"type":"EncodingType","id":3},"role":{"type":"RoleType","id":4}}},"WalletInfo":{"fields":{"type":{"type":"WalletType","id":1,"options":{"deprecated":true}},"sk":{"type":"bytes","id":2},"pk":{"type":"bytes","id":3},"address":{"type":"string","id":4}}},"ChainInfo":{"fields":{"id":{"type":"string","id":1},"network":{"type":"string","id":2},"moniker":{"type":"string","id":3},"consensusVersion":{"type":"string","id":4},"synced":{"type":"bool","id":5},"appHash":{"type":"bytes","id":6},"blockHash":{"type":"bytes","id":7},"blockHeight":{"type":"string","id":8},"blockTime":{"type":"google.protobuf.Timestamp","id":9},"address":{"type":"string","id":10},"votingPower":{"type":"string","id":11},"totalTxs":{"type":"string","id":12},"version":{"type":"string","id":13},"forgeAppsVersion":{"keyType":"string","type":"string","id":15},"supportedTxs":{"rule":"repeated","type":"string","id":16}}},"NodeInfo":{"fields":{"id":{"type":"string","id":1},"network":{"type":"string","id":2},"moniker":{"type":"string","id":3},"consensusVersion":{"type":"string","id":4},"synced":{"type":"bool","id":5},"appHash":{"type":"bytes","id":6},"blockHash":{"type":"bytes","id":7},"blockHeight":{"type":"string","id":8},"blockTime":{"type":"google.protobuf.Timestamp","id":9},"address":{"type":"string","id":10},"votingPower":{"type":"string","id":11},"totalTxs":{"type":"string","id":12},"version":{"type":"string","id":13},"forgeAppsVersion":{"keyType":"string","type":"string","id":15},"supportedTxs":{"rule":"repeated","type":"string","id":16},"ip":{"type":"string","id":17},"geoInfo":{"type":"GeoInfo","id":18},"p2pAddress":{"type":"string","id":19}}},"Validator":{"fields":{"address":{"type":"string","id":1},"power":{"type":"string","id":2}}},"ConsensusParams":{"fields":{"maxBytes":{"type":"string","id":1},"maxGas":{"type":"string","id":2},"maxValidators":{"type":"uint32","id":3},"maxCandidates":{"type":"uint32","id":4},"pubKeyTypes":{"rule":"repeated","type":"string","id":5},"validators":{"rule":"repeated","type":"Validator","id":6},"validatorChanged":{"type":"bool","id":7},"paramChanged":{"type":"bool","id":8}}},"UpgradeTask":{"fields":{"type":{"type":"UpgradeType","id":1},"dataHash":{"type":"string","id":2},"actions":{"rule":"repeated","type":"UpgradeAction","id":4}}},"UpgradeTasks":{"fields":{"item":{"rule":"repeated","type":"UpgradeTask","id":1}}},"Multisig":{"fields":{"signer":{"type":"string","id":1},"pk":{"type":"bytes","id":2},"signature":{"type":"bytes","id":3},"delegator":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"Transaction":{"fields":{"from":{"type":"string","id":1},"nonce":{"type":"uint64","id":2},"chainId":{"type":"string","id":3},"pk":{"type":"bytes","id":4},"gas":{"type":"uint32","id":5},"delegator":{"type":"string","id":6},"signature":{"type":"bytes","id":13},"signatures":{"rule":"repeated","type":"Multisig","id":14},"itx":{"type":"google.protobuf.Any","id":15},"receipts":{"rule":"repeated","type":"TransactionReceipt","id":16},"serviceFee":{"type":"string","id":17}}},"TransactionInfo":{"fields":{"tx":{"type":"Transaction","id":1},"height":{"type":"string","id":2},"index":{"type":"uint32","id":3},"hash":{"type":"string","id":4},"tags":{"rule":"repeated","type":"vendor.KVPair","id":5},"code":{"type":"StatusCode","id":6},"time":{"type":"google.protobuf.Timestamp","id":7},"receipts":{"rule":"repeated","type":"TransactionReceipt","id":8},"sender":{"type":"string","id":9},"receiver":{"type":"string","id":10},"tokenSymbols":{"rule":"repeated","type":"TokenSymbol","id":22}}},"TransactionReceipt":{"fields":{"address":{"type":"string","id":1},"changes":{"rule":"repeated","type":"ReceiptChange","id":2}}},"ReceiptChange":{"fields":{"target":{"type":"string","id":1},"action":{"type":"string","id":2},"value":{"type":"string","id":3}}},"TokenInput":{"fields":{"address":{"type":"string","id":1},"value":{"type":"string","id":2}}},"TransactionInput":{"fields":{"owner":{"type":"string","id":1},"tokens":{"rule":"repeated","type":"TokenInput","id":2},"assets":{"rule":"repeated","type":"string","id":3}}},"VariableInput":{"fields":{"name":{"type":"string","id":1},"value":{"type":"string","id":2},"description":{"type":"string","id":3},"required":{"type":"bool","id":4}}},"DelegateConfig":{"fields":{"deltaInterval":{"type":"uint32","id":1},"typeUrls":{"rule":"repeated","type":"string","id":2}}},"VaultConfig":{"fields":{"slashedStake":{"type":"string","id":1},"txFee":{"type":"string","id":2},"txGas":{"rule":"repeated","type":"string","id":3}}},"TxFeeConfig":{"fields":{"typeUrl":{"type":"string","id":1},"fee":{"type":"string","id":2}}},"TxGasConfig":{"fields":{"price":{"type":"uint64","id":1},"createState":{"type":"uint64","id":2},"updateState":{"type":"uint64","id":3},"dataStorage":{"type":"uint64","id":4},"minStake":{"type":"string","id":5},"maxStake":{"type":"string","id":6},"stakeLockPeriod":{"type":"uint64","id":7}}},"TxStakeConfig":{"fields":{"createToken":{"type":"uint64","id":1},"createTokenLockPeriod":{"type":"uint64","id":2}}},"TransactionConfig":{"fields":{"maxAssetSize":{"type":"uint32","id":1},"maxListSize":{"type":"uint32","id":2},"maxMultisig":{"type":"uint32","id":3},"delegate":{"type":"DelegateConfig","id":4},"txFee":{"rule":"repeated","type":"TxFeeConfig","id":5},"txGas":{"type":"TxGasConfig","id":6},"txStake":{"type":"TxStakeConfig","id":7}}},"BlockInfo":{"fields":{"height":{"type":"string","id":1},"numTxs":{"type":"uint32","id":2},"time":{"type":"google.protobuf.Timestamp","id":3},"appHash":{"type":"bytes","id":4},"proposer":{"type":"bytes","id":5},"txs":{"rule":"repeated","type":"TransactionInfo","id":6},"totalTxs":{"type":"string","id":7},"invalidTxs":{"rule":"repeated","type":"TransactionInfo","id":8},"txsHashes":{"rule":"repeated","type":"string","id":9},"invalidTxsHashes":{"rule":"repeated","type":"string","id":10},"consensusHash":{"type":"bytes","id":11},"dataHash":{"type":"bytes","id":12},"evidenceHash":{"type":"bytes","id":13},"lastCommitHash":{"type":"bytes","id":14},"lastResultsHash":{"type":"bytes","id":15},"nextValidatorsHash":{"type":"bytes","id":16},"validatorsHash":{"type":"bytes","id":17},"version":{"type":"vendor.Version","id":18},"lastBlockId":{"type":"vendor.BlockID","id":19}}},"BlockInfoSimple":{"fields":{"height":{"type":"string","id":1},"numTxs":{"type":"uint32","id":2},"time":{"type":"google.protobuf.Timestamp","id":3},"appHash":{"type":"bytes","id":4},"proposer":{"type":"bytes","id":5},"totalTxs":{"type":"string","id":6},"txsHashes":{"rule":"repeated","type":"string","id":7},"invalidTxsHashes":{"rule":"repeated","type":"string","id":8},"consensusHash":{"type":"bytes","id":9},"dataHash":{"type":"bytes","id":10},"evidenceHash":{"type":"bytes","id":11},"lastCommitHash":{"type":"bytes","id":12},"lastResultsHash":{"type":"bytes","id":13},"nextValidatorsHash":{"type":"bytes","id":14},"validatorsHash":{"type":"bytes","id":15},"version":{"type":"vendor.Version","id":16},"lastBlockId":{"type":"vendor.BlockID","id":17}}},"StateContext":{"fields":{"genesisTx":{"type":"string","id":1},"renaissanceTx":{"type":"string","id":2},"genesisTime":{"type":"google.protobuf.Timestamp","id":3},"renaissanceTime":{"type":"google.protobuf.Timestamp","id":4}}},"StakeSummary":{"fields":{"totalStakes":{"type":"BigUint","id":1},"totalUnstakes":{"type":"BigUint","id":2},"context":{"type":"StateContext","id":3}}},"UnconfirmedTxs":{"fields":{"nTxs":{"type":"uint32","id":1},"txs":{"rule":"repeated","type":"Transaction","id":2}}},"NetInfo":{"fields":{"listening":{"type":"bool","id":1},"listeners":{"rule":"repeated","type":"string","id":2},"nPeers":{"type":"uint32","id":3},"peers":{"rule":"repeated","type":"PeerInfo","id":4}}},"GeoInfo":{"fields":{"city":{"type":"string","id":1},"country":{"type":"string","id":2},"latitude":{"type":"float","id":3},"longitude":{"type":"float","id":4}}},"PeerInfo":{"fields":{"id":{"type":"string","id":1},"network":{"type":"string","id":2},"consensusVersion":{"type":"string","id":3},"moniker":{"type":"string","id":4},"ip":{"type":"string","id":5},"geoInfo":{"type":"GeoInfo","id":6}}},"ValidatorsInfo":{"fields":{"blockHeight":{"type":"string","id":1},"validators":{"rule":"repeated","type":"ValidatorInfo","id":2}}},"ValidatorInfo":{"fields":{"address":{"type":"string","id":1},"pubKey":{"type":"vendor.PubKey","id":2},"votingPower":{"type":"string","id":3},"proposerPriority":{"type":"string","id":4},"name":{"type":"string","id":5},"geoInfo":{"type":"GeoInfo","id":6}}},"ForgeToken":{"fields":{"name":{"type":"string","id":1},"symbol":{"type":"string","id":2},"unit":{"type":"string","id":3},"description":{"type":"string","id":4},"icon":{"type":"bytes","id":5},"decimal":{"type":"uint32","id":6},"initialSupply":{"type":"string","id":7},"totalSupply":{"type":"string","id":8},"inflationRate":{"type":"uint32","id":9},"address":{"type":"string","id":10}}},"UpgradeInfo":{"fields":{"height":{"type":"string","id":1},"version":{"type":"string","id":2}}},"WithdrawItem":{"fields":{"hash":{"type":"string","id":1},"value":{"type":"BigUint","id":2}}},"AccountConfig":{"fields":{"address":{"type":"string","id":1},"pk":{"type":"bytes","id":2},"balance":{"type":"BigUint","id":3}}},"Evidence":{"fields":{"hash":{"type":"string","id":1}}},"NFTEndpoint":{"fields":{"id":{"type":"string","id":1},"scope":{"type":"string","id":2}}},"NFTDisplay":{"fields":{"type":{"type":"string","id":1},"content":{"type":"string","id":2}}},"NFTIssuer":{"fields":{"id":{"type":"string","id":1},"pk":{"type":"string","id":2},"name":{"type":"string","id":3}}},"AssetFactoryHook":{"fields":{"name":{"type":"string","id":1},"type":{"type":"string","id":2},"hook":{"type":"string","id":3}}},"IndexedTokenInput":{"fields":{"address":{"type":"string","id":1},"value":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4},"symbol":{"type":"string","id":5}}},"IndexedFactoryInput":{"fields":{"value":{"type":"string","id":1},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4}}},"RollupValidator":{"fields":{"pk":{"type":"string","id":1},"address":{"type":"string","id":2},"endpoint":{"type":"string","id":3}}},"RollupSignature":{"fields":{"signer":{"type":"string","id":1},"signature":{"type":"string","id":2}}},"ForeignToken":{"fields":{"type":{"type":"string","id":1},"contractAddress":{"type":"string","id":2},"chainType":{"type":"string","id":3},"chainName":{"type":"string","id":4},"chainId":{"type":"int32","id":5}}},"RevokedStake":{"fields":{"tokens":{"rule":"repeated","type":"TokenInput","id":1},"assets":{"rule":"repeated","type":"string","id":2}}},"ForgeStats":{"fields":{"numBlocks":{"rule":"repeated","type":"string","id":1},"numTxs":{"rule":"repeated","type":"string","id":2},"numStakes":{"rule":"repeated","type":"BigUint","id":3},"numValidators":{"rule":"repeated","type":"uint32","id":4},"numAccountMigrateTxs":{"rule":"repeated","type":"string","id":5},"numCreateAssetTxs":{"rule":"repeated","type":"string","id":6},"numConsensusUpgradeTxs":{"rule":"repeated","type":"uint32","id":7},"numDeclareTxs":{"rule":"repeated","type":"string","id":8},"numDeclareFileTxs":{"rule":"repeated","type":"string","id":9},"numExchangeTxs":{"rule":"repeated","type":"string","id":10},"numStakeTxs":{"rule":"repeated","type":"string","id":11},"numSysUpgradeTxs":{"rule":"repeated","type":"uint32","id":12},"numTransferTxs":{"rule":"repeated","type":"string","id":13},"numUpdateAssetTxs":{"rule":"repeated","type":"string","id":14},"numConsumeAssetTxs":{"rule":"repeated","type":"string","id":15},"tps":{"rule":"repeated","type":"uint32","id":16},"maxTps":{"type":"uint32","id":17},"avgTps":{"type":"uint32","id":18},"avgBlockTime":{"type":"float","id":19}}},"GasEstimate":{"fields":{"max":{"type":"string","id":1}}},"RateLimit":{"fields":{"interval":{"type":"uint64","id":1},"anchor":{"type":"uint64","id":3}}},"TokenLimit":{"fields":{"address":{"type":"string","id":1},"to":{"rule":"repeated","type":"string","id":2},"txCount":{"type":"uint32","id":3},"txAllowance":{"type":"string","id":4},"totalAllowance":{"type":"string","id":5},"validUntil":{"type":"uint64","id":6},"rate":{"type":"RateLimit","id":7},"txSent":{"type":"uint32","id":8},"spentAllowance":{"type":"string","id":9},"lastTx":{"type":"uint64","id":10},"decimal":{"type":"uint32","id":11},"symbol":{"type":"string","id":12}}},"AssetLimit":{"fields":{"address":{"rule":"repeated","type":"string","id":1},"to":{"rule":"repeated","type":"string","id":2},"txCount":{"type":"uint32","id":3},"validUntil":{"type":"uint64","id":4},"rate":{"type":"RateLimit","id":5},"txSent":{"type":"uint32","id":6},"lastTx":{"type":"uint64","id":7}}},"DelegateLimit":{"fields":{"tokens":{"rule":"repeated","type":"TokenLimit","id":1},"assets":{"rule":"repeated","type":"AssetLimit","id":2}}},"CurveConfig":{"fields":{"type":{"type":"string","id":1},"basePrice":{"type":"string","id":2},"slope":{"type":"string","id":3},"fixedPrice":{"type":"string","id":4},"constant":{"type":"uint32","id":5}}},"AccountState":{"fields":{"balance":{"type":"BigUint","id":1},"nonce":{"type":"string","id":2},"numTxs":{"type":"string","id":3},"address":{"type":"string","id":4},"pk":{"type":"bytes","id":5},"type":{"type":"WalletType","id":6,"options":{"deprecated":true}},"moniker":{"type":"string","id":7},"context":{"type":"StateContext","id":8},"issuer":{"type":"string","id":9},"gasBalance":{"type":"BigUint","id":10},"migratedTo":{"rule":"repeated","type":"string","id":13},"migratedFrom":{"rule":"repeated","type":"string","id":14},"numAssets":{"type":"string","id":15,"options":{"deprecated":true}},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":21},"data":{"type":"google.protobuf.Any","id":50}}},"AssetState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"moniker":{"type":"string","id":3},"readonly":{"type":"bool","id":4},"transferrable":{"type":"bool","id":5},"ttl":{"type":"uint32","id":6},"consumedTime":{"type":"google.protobuf.Timestamp","id":7},"issuer":{"type":"string","id":8},"parent":{"type":"string","id":9},"endpoint":{"type":"NFTEndpoint","id":10},"display":{"type":"NFTDisplay","id":11},"tags":{"rule":"repeated","type":"string","id":12},"context":{"type":"StateContext","id":14},"data":{"type":"google.protobuf.Any","id":50}}},"ForgeState":{"fields":{"address":{"type":"string","id":1},"consensus":{"type":"ConsensusParams","id":2},"tasks":{"keyType":"uint64","type":"UpgradeTasks","id":3},"version":{"type":"string","id":4},"token":{"type":"ForgeToken","id":5},"txConfig":{"type":"TransactionConfig","id":6},"upgradeInfo":{"type":"UpgradeInfo","id":7},"accountConfig":{"rule":"repeated","type":"AccountConfig","id":8},"vaults":{"type":"VaultConfig","id":9},"reservedSymbols":{"rule":"repeated","type":"string","id":10},"data":{"type":"google.protobuf.Any","id":2047}}},"RootState":{"fields":{"address":{"type":"string","id":1},"account":{"type":"bytes","id":2},"asset":{"type":"bytes","id":3},"receipt":{"type":"bytes","id":4},"protocol":{"type":"bytes","id":5},"governance":{"type":"bytes","id":6},"custom":{"type":"bytes","id":7}}},"DelegateOpState":{"fields":{"rule":{"type":"string","id":1,"options":{"deprecated":true}},"numTxs":{"type":"uint64","id":2,"options":{"deprecated":true}},"numTxsDelta":{"type":"uint64","id":3,"options":{"deprecated":true}},"balance":{"type":"BigUint","id":4,"options":{"deprecated":true}},"balanceDelta":{"type":"BigUint","id":5,"options":{"deprecated":true}},"limit":{"type":"DelegateLimit","id":6}}},"DelegateState":{"fields":{"address":{"type":"string","id":1},"ops":{"keyType":"string","type":"DelegateOpState","id":2},"from":{"type":"string","id":3},"to":{"type":"string","id":4},"deny":{"rule":"repeated","type":"string","id":5},"validUntil":{"type":"uint64","id":6},"context":{"type":"StateContext","id":14},"data":{"type":"google.protobuf.Any","id":15}}},"TokenState":{"fields":{"address":{"type":"string","id":1},"issuer":{"type":"string","id":2},"name":{"type":"string","id":3},"description":{"type":"string","id":4},"symbol":{"type":"string","id":5},"unit":{"type":"string","id":6},"decimal":{"type":"uint32","id":7},"icon":{"type":"string","id":8},"totalSupply":{"type":"string","id":9},"foreignToken":{"type":"ForeignToken","id":10},"tokenFactoryAddress":{"type":"string","id":11},"initialSupply":{"type":"string","id":12},"maxTotalSupply":{"type":"string","id":13},"metadata":{"type":"google.protobuf.Any","id":14},"context":{"type":"StateContext","id":15},"website":{"type":"string","id":16},"spenders":{"rule":"repeated","type":"string","id":17},"minters":{"rule":"repeated","type":"string","id":18},"type":{"type":"string","id":19},"data":{"type":"google.protobuf.Any","id":20}}},"AssetFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"name":{"type":"string","id":3},"description":{"type":"string","id":4},"settlement":{"type":"string","id":5},"limit":{"type":"uint32","id":6},"trustedIssuers":{"rule":"repeated","type":"string","id":7},"input":{"type":"IndexedFactoryInput","id":8},"output":{"type":"CreateAssetTx","id":9},"hooks":{"rule":"repeated","type":"AssetFactoryHook","id":10},"data":{"type":"google.protobuf.Any","id":11},"context":{"type":"StateContext","id":12},"balance":{"type":"BigUint","id":13},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":14},"numMinted":{"type":"uint32","id":15},"display":{"type":"NFTDisplay","id":16},"lastSettlement":{"type":"google.protobuf.Timestamp","id":17}}},"StakeState":{"fields":{"address":{"type":"string","id":1},"sender":{"type":"string","id":2},"receiver":{"type":"string","id":3},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":4},"assets":{"rule":"repeated","type":"string","id":5},"revocable":{"type":"bool","id":6},"message":{"type":"string","id":7},"revokeWaitingPeriod":{"type":"uint32","id":8},"revokedTokens":{"rule":"repeated","type":"IndexedTokenInput","id":9},"revokedAssets":{"rule":"repeated","type":"string","id":10},"slashers":{"rule":"repeated","type":"string","id":11},"nonce":{"type":"string","id":12},"context":{"type":"StateContext","id":30},"data":{"type":"google.protobuf.Any","id":50}}},"RollupState":{"fields":{"address":{"type":"string","id":1},"tokenAddress":{"type":"string","id":2},"vaultAddress":{"type":"string","id":3},"contractAddress":{"type":"string","id":4},"seedValidators":{"rule":"repeated","type":"RollupValidator","id":5},"validators":{"rule":"repeated","type":"RollupValidator","id":6},"minStakeAmount":{"type":"string","id":7},"maxStakeAmount":{"type":"string","id":8},"minSignerCount":{"type":"uint32","id":9},"maxSignerCount":{"type":"uint32","id":10},"minBlockSize":{"type":"uint32","id":11},"maxBlockSize":{"type":"uint32","id":12},"minBlockInterval":{"type":"uint32","id":13},"minBlockConfirmation":{"type":"uint32","id":14},"issuer":{"type":"string","id":17},"depositFeeRate":{"type":"uint32","id":18},"withdrawFeeRate":{"type":"uint32","id":19},"proposerFeeShare":{"type":"uint32","id":20},"publisherFeeShare":{"type":"uint32","id":21},"minDepositAmount":{"type":"string","id":22},"minWithdrawAmount":{"type":"string","id":23},"blockHeight":{"type":"uint64","id":24},"blockHash":{"type":"string","id":25},"tokenInfo":{"type":"IndexedTokenInput","id":26},"totalDepositAmount":{"type":"string","id":27},"totalWithdrawAmount":{"type":"string","id":28},"maxDepositAmount":{"type":"string","id":29},"maxWithdrawAmount":{"type":"string","id":30},"minDepositFee":{"type":"string","id":31},"maxDepositFee":{"type":"string","id":32},"minWithdrawFee":{"type":"string","id":33},"maxWithdrawFee":{"type":"string","id":34},"paused":{"type":"bool","id":35},"foreignToken":{"type":"ForeignToken","id":36},"leaveWaitingPeriod":{"type":"uint32","id":37},"publishWaitingPeriod":{"type":"uint32","id":38},"publishSlashRate":{"type":"uint32","id":39},"migrateHistory":{"rule":"repeated","type":"string","id":40},"closed":{"type":"bool","id":41},"vaultHistory":{"rule":"repeated","type":"string","id":42},"context":{"type":"StateContext","id":43},"data":{"type":"google.protobuf.Any","id":50}}},"RollupBlock":{"fields":{"hash":{"type":"string","id":1},"height":{"type":"uint64","id":2},"merkleRoot":{"type":"string","id":3},"previousHash":{"type":"string","id":4},"txsHash":{"type":"string","id":5},"txs":{"rule":"repeated","type":"string","id":6},"proposer":{"type":"string","id":7},"signatures":{"rule":"repeated","type":"Multisig","id":8},"rollup":{"type":"string","id":10},"mintedAmount":{"type":"string","id":11},"burnedAmount":{"type":"string","id":12},"rewardAmount":{"type":"string","id":13},"minReward":{"type":"string","id":14},"governance":{"type":"bool","id":15},"context":{"type":"StateContext","id":30},"data":{"type":"google.protobuf.Any","id":50}}},"EvidenceState":{"fields":{"hash":{"type":"string","id":1},"data":{"type":"string","id":2},"context":{"type":"StateContext","id":30}}},"TokenFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"tokenAddress":{"type":"string","id":3},"reserveAddress":{"type":"string","id":4},"curve":{"type":"CurveConfig","id":5},"currentSupply":{"type":"string","id":6},"reserveBalance":{"type":"string","id":7},"feeRate":{"type":"int32","id":8},"status":{"type":"string","id":9},"token":{"type":"TokenState","id":10},"reserveToken":{"type":"TokenState","id":11},"context":{"type":"StateContext","id":30},"data":{"type":"google.protobuf.Any","id":50}}},"AccountMigrateTx":{"fields":{"pk":{"type":"bytes","id":1},"type":{"type":"WalletType","id":2,"options":{"deprecated":true}},"address":{"type":"string","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"DeclareTx":{"fields":{"moniker":{"type":"string","id":1},"issuer":{"type":"string","id":2},"data":{"type":"google.protobuf.Any","id":15}}},"DelegateOp":{"fields":{"typeUrl":{"type":"string","id":1},"rules":{"rule":"repeated","type":"string","id":2,"options":{"deprecated":true}},"limit":{"type":"DelegateLimit","id":3}}},"DelegateTx":{"fields":{"address":{"type":"string","id":1},"to":{"type":"string","id":2},"ops":{"rule":"repeated","type":"DelegateOp","id":3},"deny":{"rule":"repeated","type":"string","id":4},"validUntil":{"type":"uint64","id":5},"data":{"type":"google.protobuf.Any","id":15}}},"RevokeDelegateTx":{"fields":{"address":{"type":"string","id":1},"to":{"type":"string","id":2},"typeUrls":{"rule":"repeated","type":"string","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"UpgradeNodeTx":{"fields":{"height":{"type":"uint64","id":1},"version":{"type":"string","id":2},"override":{"type":"bool","id":3}}},"ExchangeInfo":{"fields":{"value":{"type":"BigUint","id":1},"assets":{"rule":"repeated","type":"string","id":2}}},"ExchangeInfoV2":{"fields":{"value":{"type":"BigUint","id":1},"assets":{"rule":"repeated","type":"string","id":2},"tokens":{"rule":"repeated","type":"TokenInput","id":3}}},"ExchangeTx":{"fields":{"to":{"type":"string","id":1},"sender":{"type":"ExchangeInfo","id":2},"receiver":{"type":"ExchangeInfo","id":3},"expiredAt":{"type":"google.protobuf.Timestamp","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"ExchangeV2Tx":{"fields":{"to":{"type":"string","id":1},"sender":{"type":"ExchangeInfoV2","id":2},"receiver":{"type":"ExchangeInfoV2","id":3},"expiredAt":{"type":"google.protobuf.Timestamp","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"TransferTx":{"fields":{"to":{"type":"string","id":1},"value":{"type":"BigUint","id":2},"assets":{"rule":"repeated","type":"string","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"TransferV2Tx":{"fields":{"to":{"type":"string","id":1},"value":{"type":"BigUint","id":2},"assets":{"rule":"repeated","type":"string","id":3},"tokens":{"rule":"repeated","type":"TokenInput","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"TransferV3Tx":{"fields":{"inputs":{"rule":"repeated","type":"TransactionInput","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"data":{"type":"google.protobuf.Any","id":15}}},"CreateTokenTx":{"fields":{"name":{"type":"string","id":1},"description":{"type":"string","id":2},"symbol":{"type":"string","id":3},"unit":{"type":"string","id":4},"decimal":{"type":"int32","id":5},"icon":{"type":"string","id":6},"totalSupply":{"type":"string","id":7},"address":{"type":"string","id":8},"initialSupply":{"type":"string","id":9},"maxTotalSupply":{"type":"string","id":10},"foreignToken":{"type":"ForeignToken","id":16},"spenders":{"rule":"repeated","type":"string","id":17},"data":{"type":"google.protobuf.Any","id":20}}},"AssetFactoryInput":{"fields":{"value":{"type":"string","id":1},"tokens":{"rule":"repeated","type":"TokenInput","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4}}},"AcquireAssetV2Tx":{"fields":{"factory":{"type":"string","id":1},"address":{"type":"string","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4},"issuer":{"type":"NFTIssuer","id":5},"data":{"type":"google.protobuf.Any","id":15}}},"AcquireAssetV3Tx":{"fields":{"factory":{"type":"string","id":1},"address":{"type":"string","id":2},"inputs":{"rule":"repeated","type":"TransactionInput","id":3},"owner":{"type":"string","id":4},"variables":{"rule":"repeated","type":"VariableInput","id":5},"issuer":{"type":"NFTIssuer","id":6},"data":{"type":"google.protobuf.Any","id":15}}},"MintAssetTx":{"fields":{"factory":{"type":"string","id":1},"address":{"type":"string","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4},"owner":{"type":"string","id":5},"data":{"type":"google.protobuf.Any","id":15}}},"CreateAssetTx":{"fields":{"moniker":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":2},"readonly":{"type":"bool","id":3},"transferrable":{"type":"bool","id":4},"ttl":{"type":"uint32","id":5},"parent":{"type":"string","id":6},"address":{"type":"string","id":7},"issuer":{"type":"string","id":8},"endpoint":{"type":"NFTEndpoint","id":9},"display":{"type":"NFTDisplay","id":10},"tags":{"rule":"repeated","type":"string","id":11}}},"UpdateAssetTx":{"fields":{"address":{"type":"string","id":1},"moniker":{"type":"string","id":2},"consumed":{"type":"bool","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"ConsumeAssetTx":{"fields":{"address":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":15}}},"CreateFactoryTx":{"fields":{"name":{"type":"string","id":1},"description":{"type":"string","id":2},"settlement":{"type":"string","id":3},"limit":{"type":"uint32","id":4},"trustedIssuers":{"rule":"repeated","type":"string","id":5},"input":{"type":"AssetFactoryInput","id":6},"output":{"type":"CreateAssetTx","id":7},"hooks":{"rule":"repeated","type":"AssetFactoryHook","id":8},"address":{"type":"string","id":9},"display":{"type":"NFTDisplay","id":10},"data":{"type":"google.protobuf.Any","id":15}}},"StakeTx":{"fields":{"address":{"type":"string","id":1},"receiver":{"type":"string","id":2},"inputs":{"rule":"repeated","type":"TransactionInput","id":3},"locked":{"type":"bool","id":4},"message":{"type":"string","id":5},"revokeWaitingPeriod":{"type":"uint32","id":6},"slashers":{"rule":"repeated","type":"string","id":7},"nonce":{"type":"string","id":8},"data":{"type":"google.protobuf.Any","id":50}}},"RevokeStakeTx":{"fields":{"address":{"type":"string","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"data":{"type":"google.protobuf.Any","id":50}}},"ClaimStakeTx":{"fields":{"address":{"type":"string","id":1},"evidence":{"type":"Evidence","id":2},"data":{"type":"google.protobuf.Any","id":50}}},"SlashStakeTx":{"fields":{"address":{"type":"string","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"message":{"type":"string","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"ReturnStakeTx":{"fields":{"address":{"type":"string","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"message":{"type":"string","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"CreateRollupTx":{"fields":{"address":{"type":"string","id":1},"tokenAddress":{"type":"string","id":2},"vaultAddress":{"type":"string","id":3},"contractAddress":{"type":"string","id":4},"seedValidators":{"rule":"repeated","type":"RollupValidator","id":5},"minStakeAmount":{"type":"string","id":6},"maxStakeAmount":{"type":"string","id":7},"minSignerCount":{"type":"uint32","id":8},"maxSignerCount":{"type":"uint32","id":9},"minBlockSize":{"type":"uint32","id":10},"maxBlockSize":{"type":"uint32","id":11},"minBlockInterval":{"type":"uint32","id":12},"minBlockConfirmation":{"type":"uint32","id":13},"foreignChainType":{"type":"string","id":14},"foreignChainId":{"type":"string","id":15},"depositFeeRate":{"type":"uint32","id":16},"withdrawFeeRate":{"type":"uint32","id":17},"proposerFeeShare":{"type":"uint32","id":18},"minDepositAmount":{"type":"string","id":19},"minWithdrawAmount":{"type":"string","id":20},"maxDepositAmount":{"type":"string","id":21},"maxWithdrawAmount":{"type":"string","id":22},"minDepositFee":{"type":"string","id":23},"maxDepositFee":{"type":"string","id":24},"minWithdrawFee":{"type":"string","id":25},"maxWithdrawFee":{"type":"string","id":26},"paused":{"type":"bool","id":27},"leaveWaitingPeriod":{"type":"uint32","id":28},"publisherFeeShare":{"type":"uint32","id":29},"publishWaitingPeriod":{"type":"uint32","id":30},"publishSlashRate":{"type":"uint32","id":31},"data":{"type":"google.protobuf.Any","id":50}}},"UpdateRollupTx":{"fields":{"minStakeAmount":{"type":"string","id":1},"maxStakeAmount":{"type":"string","id":2},"minSignerCount":{"type":"uint32","id":3},"maxSignerCount":{"type":"uint32","id":4},"minBlockSize":{"type":"uint32","id":5},"maxBlockSize":{"type":"uint32","id":6},"minBlockInterval":{"type":"uint32","id":7},"minBlockConfirmation":{"type":"uint32","id":8},"depositFeeRate":{"type":"uint32","id":9},"withdrawFeeRate":{"type":"uint32","id":10},"proposerFeeShare":{"type":"uint32","id":11},"minDepositAmount":{"type":"string","id":12},"minWithdrawAmount":{"type":"string","id":13},"maxDepositAmount":{"type":"string","id":14},"maxWithdrawAmount":{"type":"string","id":15},"minDepositFee":{"type":"string","id":16},"maxDepositFee":{"type":"string","id":17},"minWithdrawFee":{"type":"string","id":18},"maxWithdrawFee":{"type":"string","id":19},"publisherFeeShare":{"type":"uint32","id":20},"leaveWaitingPeriod":{"type":"uint32","id":21},"publishWaitingPeriod":{"type":"uint32","id":22},"publishSlashRate":{"type":"uint32","id":23},"rollup":{"type":"string","id":40},"data":{"type":"google.protobuf.Any","id":50}}},"JoinRollupTx":{"fields":{"rollup":{"type":"string","id":1},"endpoint":{"type":"string","id":2},"evidence":{"type":"Evidence","id":3},"signatures":{"rule":"repeated","type":"Multisig","id":4},"data":{"type":"google.protobuf.Any","id":50}}},"LeaveRollupTx":{"fields":{"rollup":{"type":"string","id":1},"evidence":{"type":"Evidence","id":2},"signatures":{"rule":"repeated","type":"Multisig","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"CreateRollupBlockTx":{"fields":{"hash":{"type":"string","id":1},"height":{"type":"uint64","id":2},"merkleRoot":{"type":"string","id":3},"previousHash":{"type":"string","id":4},"txsHash":{"type":"string","id":5},"txs":{"rule":"repeated","type":"string","id":6},"proposer":{"type":"string","id":7},"signatures":{"rule":"repeated","type":"Multisig","id":8},"rollup":{"type":"string","id":10},"minReward":{"type":"string","id":11},"governance":{"type":"bool","id":12},"data":{"type":"google.protobuf.Any","id":50}}},"ClaimBlockRewardTx":{"fields":{"rollup":{"type":"string","id":1},"blockHeight":{"type":"uint64","id":2},"blockHash":{"type":"string","id":3},"evidence":{"type":"Evidence","id":4},"publisher":{"type":"string","id":5},"data":{"type":"google.protobuf.Any","id":50}}},"PauseRollupTx":{"fields":{"rollup":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":10}}},"ResumeRollupTx":{"fields":{"rollup":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":10}}},"CloseRollupTx":{"fields":{"rollup":{"type":"string","id":1},"message":{"type":"string","id":2},"data":{"type":"google.protobuf.Any","id":10}}},"MigrateRollupTx":{"fields":{"rollup":{"type":"string","id":1},"to":{"type":"string","id":2},"type":{"type":"string","id":3},"message":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":10}}},"DepositTokenV2Tx":{"fields":{"token":{"type":"TokenInput","id":1},"to":{"type":"string","id":2},"proposer":{"type":"string","id":3},"evidence":{"type":"Evidence","id":4},"rollup":{"type":"string","id":5},"actualFee":{"type":"string","id":7},"data":{"type":"google.protobuf.Any","id":15}}},"WithdrawTokenV2Tx":{"fields":{"token":{"type":"TokenInput","id":1},"to":{"type":"string","id":2},"rollup":{"type":"string","id":3},"proposer":{"type":"string","id":5},"maxFee":{"type":"string","id":6},"actualFee":{"type":"string","id":7},"data":{"type":"google.protobuf.Any","id":15}}},"CreateTokenFactoryTx":{"fields":{"address":{"type":"string","id":1},"feeRate":{"type":"uint32","id":2},"token":{"type":"TokenInfo","id":3},"reserveAddress":{"type":"string","id":4},"curve":{"type":"CurveConfig","id":5},"data":{"type":"google.protobuf.Any","id":50}}},"UpdateTokenFactoryTx":{"fields":{"address":{"type":"string","id":1},"feeRate":{"type":"uint32","id":2},"token":{"type":"TokenInfo","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"MintTokenTx":{"fields":{"tokenFactory":{"type":"string","id":1},"amount":{"type":"string","id":2},"inputs":{"rule":"repeated","type":"TransactionInput","id":3},"receiver":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":50}}},"BurnTokenTx":{"fields":{"tokenFactory":{"type":"string","id":1},"inputs":{"rule":"repeated","type":"TransactionInput","id":2},"minReserve":{"type":"string","id":3},"receiver":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":50}}},"ItxStub":{"oneofs":{"value":{"oneof":["declare","delegate","revokeDelegate","accountMigrate","createAsset","updateAsset","consumeAsset","exchange","exchangeV2","transfer","transferV2","transferV3","createToken","depositToken","withdrawToken","createTokenFactory","updateTokenFactory","mintToken","burnToken","createFactory","acquireAssetV2","acquireAssetV3","mintAsset","stake","revokeStake","claimStake","slashStake","returnStake","upgradeNode","createRollup","updateRollup","joinRollup","leaveRollup","createRollupBlock","claimBlockReward","pauseRollup","resumeRollup","migrateRollup","closeRollup"]}},"fields":{"declare":{"type":"DeclareTx","id":1},"delegate":{"type":"DelegateTx","id":2},"revokeDelegate":{"type":"RevokeDelegateTx","id":3},"accountMigrate":{"type":"AccountMigrateTx","id":4},"createAsset":{"type":"CreateAssetTx","id":5},"updateAsset":{"type":"UpdateAssetTx","id":6},"consumeAsset":{"type":"ConsumeAssetTx","id":7},"exchange":{"type":"ExchangeTx","id":10},"exchangeV2":{"type":"ExchangeV2Tx","id":12},"transfer":{"type":"TransferTx","id":13},"transferV2":{"type":"TransferV2Tx","id":14},"transferV3":{"type":"TransferV3Tx","id":15},"createToken":{"type":"CreateTokenTx","id":20},"depositToken":{"type":"DepositTokenV2Tx","id":21},"withdrawToken":{"type":"WithdrawTokenV2Tx","id":22},"createTokenFactory":{"type":"CreateTokenFactoryTx","id":23},"updateTokenFactory":{"type":"UpdateTokenFactoryTx","id":24},"mintToken":{"type":"MintTokenTx","id":25},"burnToken":{"type":"BurnTokenTx","id":26},"createFactory":{"type":"CreateFactoryTx","id":30},"acquireAssetV2":{"type":"AcquireAssetV2Tx","id":31},"acquireAssetV3":{"type":"AcquireAssetV3Tx","id":32},"mintAsset":{"type":"MintAssetTx","id":33},"stake":{"type":"StakeTx","id":40},"revokeStake":{"type":"RevokeStakeTx","id":41},"claimStake":{"type":"ClaimStakeTx","id":42},"slashStake":{"type":"SlashStakeTx","id":43},"returnStake":{"type":"ReturnStakeTx","id":44},"upgradeNode":{"type":"UpgradeNodeTx","id":49},"createRollup":{"type":"CreateRollupTx","id":50},"updateRollup":{"type":"UpdateRollupTx","id":51},"joinRollup":{"type":"JoinRollupTx","id":52},"leaveRollup":{"type":"LeaveRollupTx","id":53},"createRollupBlock":{"type":"CreateRollupBlockTx","id":54},"claimBlockReward":{"type":"ClaimBlockRewardTx","id":55},"pauseRollup":{"type":"PauseRollupTx","id":56},"resumeRollup":{"type":"ResumeRollupTx","id":57},"migrateRollup":{"type":"MigrateRollupTx","id":58},"closeRollup":{"type":"CloseRollupTx","id":60}}},"PageOrder":{"fields":{"field":{"type":"string","id":1},"type":{"type":"string","id":2}}},"Page":{"fields":{"cursor":{"type":"string","id":1},"size":{"type":"uint32","id":2},"order":{"rule":"repeated","type":"PageOrder","id":3}}},"TypeFilter":{"fields":{"types":{"rule":"repeated","type":"string","id":1}}},"AssetFilter":{"fields":{"assets":{"rule":"repeated","type":"string","id":1}}},"FactoryFilter":{"fields":{"factories":{"rule":"repeated","type":"string","id":1}}},"DelegationFilter":{"fields":{"delegations":{"rule":"repeated","type":"string","id":1}}},"TokenFilter":{"fields":{"tokens":{"rule":"repeated","type":"string","id":1}}},"StakeFilter":{"fields":{"stakes":{"rule":"repeated","type":"string","id":1}}},"AccountFilter":{"fields":{"accounts":{"rule":"repeated","type":"string","id":1}}},"TxFilter":{"fields":{"txs":{"rule":"repeated","type":"string","id":1}}},"RollupFilter":{"fields":{"rollups":{"rule":"repeated","type":"string","id":1}}},"ValidatorFilter":{"fields":{"validators":{"rule":"repeated","type":"string","id":1}}},"TokenFactoryFilter":{"fields":{"tokenFactories":{"rule":"repeated","type":"string","id":1}}},"TimeFilter":{"fields":{"startDateTime":{"type":"string","id":1},"endDateTime":{"type":"string","id":2},"field":{"type":"string","id":3}}},"Direction":{"values":{"MUTUAL":0,"ONE_WAY":1,"UNION":2}},"AddressFilter":{"fields":{"sender":{"type":"string","id":1},"receiver":{"type":"string","id":2},"direction":{"type":"Direction","id":3}}},"PageInfo":{"fields":{"cursor":{"type":"string","id":1},"next":{"type":"bool","id":2},"total":{"type":"uint32","id":3}}},"TokenMeta":{"fields":{"address":{"type":"string","id":1},"balance":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4},"symbol":{"type":"string","id":5}}},"Validity":{"values":{"BOTH":0,"VALID":1,"INVALID":2}},"ValidityFilter":{"fields":{"validity":{"type":"Validity","id":1}}},"RangeFilter":{"fields":{"from":{"type":"string","id":1},"to":{"type":"string","id":2}}},"AccountToken":{"fields":{"address":{"type":"string","id":1},"symbol":{"type":"string","id":2},"balance":{"type":"string","id":3},"decimal":{"type":"uint32","id":4}}},"ByDay":{"fields":{"startDate":{"type":"string","id":1},"endDate":{"type":"string","id":2}}},"ByHour":{"fields":{"date":{"type":"string","id":1}}},"IndexedTransaction":{"fields":{"hash":{"type":"string","id":1},"sender":{"type":"string","id":2},"receiver":{"type":"string","id":3},"time":{"type":"string","id":4},"type":{"type":"string","id":5},"tx":{"type":"Transaction","id":6},"valid":{"type":"bool","id":20},"code":{"type":"StatusCode","id":21},"tokenSymbols":{"rule":"repeated","type":"TokenMeta","id":22},"receipts":{"rule":"repeated","type":"TransactionReceipt","id":16}}},"IndexedAccountState":{"fields":{"address":{"type":"string","id":1},"balance":{"type":"BigUint","id":2},"numAssets":{"type":"string","id":3},"numTxs":{"type":"string","id":4},"nonce":{"type":"string","id":5},"genesisTime":{"type":"string","id":6},"renaissanceTime":{"type":"string","id":7},"moniker":{"type":"string","id":8},"migratedFrom":{"type":"string","id":9},"migratedTo":{"type":"string","id":10},"totalReceivedStakes":{"type":"BigUint","id":11},"totalStakes":{"type":"BigUint","id":12},"totalUnstakes":{"type":"BigUint","id":13},"recentNumTxs":{"rule":"repeated","type":"string","id":14},"tokens":{"rule":"repeated","type":"TokenMeta","id":15}}},"IndexedAssetState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"genesisTime":{"type":"string","id":3},"renaissanceTime":{"type":"string","id":4},"moniker":{"type":"string","id":5},"readonly":{"type":"bool","id":6},"consumedTime":{"type":"string","id":7},"issuer":{"type":"string","id":8},"parent":{"type":"string","id":9},"transferrable":{"type":"bool","id":10},"ttl":{"type":"string","id":11},"display":{"type":"NFTDisplay","id":12},"endpoint":{"type":"NFTEndpoint","id":13},"tags":{"rule":"repeated","type":"string","id":14},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedBlock":{"fields":{"height":{"type":"string","id":1},"time":{"type":"string","id":2},"proposer":{"type":"string","id":3},"numTxs":{"type":"string","id":4},"numInvalidTxs":{"type":"string","id":5}}},"IndexedTokenState":{"fields":{"name":{"type":"string","id":1},"description":{"type":"string","id":2},"symbol":{"type":"string","id":3},"unit":{"type":"string","id":4},"decimal":{"type":"int32","id":5},"issuer":{"type":"string","id":6},"icon":{"type":"string","id":7},"totalSupply":{"type":"string","id":8},"address":{"type":"string","id":9},"genesisTime":{"type":"string","id":10},"renaissanceTime":{"type":"string","id":11},"foreignToken":{"type":"ForeignToken","id":13},"tokenFactoryAddress":{"type":"string","id":14},"maxTotalSupply":{"type":"string","id":15},"initialSupply":{"type":"string","id":16},"metadata":{"type":"google.protobuf.Any","id":17},"website":{"type":"string","id":18},"spenders":{"rule":"repeated","type":"string","id":19},"minters":{"rule":"repeated","type":"string","id":20},"type":{"type":"string","id":21},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedTokenFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"tokenAddress":{"type":"string","id":3},"reserveAddress":{"type":"string","id":4},"curve":{"type":"CurveConfig","id":5},"feeRate":{"type":"int32","id":6},"currentSupply":{"type":"string","id":7},"reserveBalance":{"type":"string","id":8},"status":{"type":"string","id":9},"genesisTime":{"type":"string","id":10},"renaissanceTime":{"type":"string","id":11},"token":{"type":"IndexedTokenInput","id":12},"reserveToken":{"type":"IndexedTokenInput","id":13},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"name":{"type":"string","id":3},"description":{"type":"string","id":4},"settlement":{"type":"string","id":5},"limit":{"type":"string","id":6},"trustedIssuers":{"rule":"repeated","type":"string","id":7},"input":{"type":"IndexedFactoryInput","id":8},"output":{"type":"CreateAssetTx","id":9},"hooks":{"rule":"repeated","type":"AssetFactoryHook","id":10},"data":{"type":"google.protobuf.Any","id":11},"balance":{"type":"string","id":13},"tokens":{"rule":"repeated","type":"TokenMeta","id":14},"numMinted":{"type":"uint32","id":15},"lastSettlement":{"type":"string","id":16},"genesisTime":{"type":"string","id":17},"renaissanceTime":{"type":"string","id":18},"display":{"type":"NFTDisplay","id":19}}},"IndexedStakeState":{"fields":{"address":{"type":"string","id":1},"sender":{"type":"string","id":2},"receiver":{"type":"string","id":3},"tokens":{"rule":"repeated","type":"TokenMeta","id":4},"assets":{"rule":"repeated","type":"string","id":5},"revocable":{"type":"bool","id":6},"genesisTime":{"type":"string","id":7},"renaissanceTime":{"type":"string","id":8},"message":{"type":"string","id":9},"revokeWaitingPeriod":{"type":"uint32","id":10},"revokedTokens":{"rule":"repeated","type":"TokenMeta","id":11},"revokedAssets":{"rule":"repeated","type":"string","id":12},"slashers":{"rule":"repeated","type":"string","id":13},"nonce":{"type":"string","id":14},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedRollupState":{"fields":{"address":{"type":"string","id":1},"tokenAddress":{"type":"string","id":2},"vaultAddress":{"type":"string","id":3},"contractAddress":{"type":"string","id":4},"seedValidators":{"rule":"repeated","type":"RollupValidator","id":5},"validators":{"rule":"repeated","type":"RollupValidator","id":6},"minStakeAmount":{"type":"string","id":7},"maxStakeAmount":{"type":"string","id":8},"minSignerCount":{"type":"uint32","id":9},"maxSignerCount":{"type":"uint32","id":10},"minBlockSize":{"type":"uint32","id":11},"maxBlockSize":{"type":"uint32","id":12},"minBlockInterval":{"type":"uint32","id":13},"genesisTime":{"type":"string","id":16},"renaissanceTime":{"type":"string","id":17},"tokenInfo":{"type":"IndexedTokenInput","id":18},"issuer":{"type":"string","id":19},"depositFeeRate":{"type":"uint32","id":20},"withdrawFeeRate":{"type":"uint32","id":21},"proposerFeeShare":{"type":"uint32","id":22},"minDepositAmount":{"type":"string","id":23},"minWithdrawAmount":{"type":"string","id":24},"blockHeight":{"type":"uint64","id":25},"blockHash":{"type":"string","id":26},"minBlockConfirmation":{"type":"uint32","id":27},"totalDepositAmount":{"type":"string","id":28},"totalWithdrawAmount":{"type":"string","id":29},"maxDepositAmount":{"type":"string","id":30},"maxWithdrawAmount":{"type":"string","id":31},"minDepositFee":{"type":"string","id":32},"maxDepositFee":{"type":"string","id":33},"minWithdrawFee":{"type":"string","id":34},"maxWithdrawFee":{"type":"string","id":35},"paused":{"type":"bool","id":36},"foreignToken":{"type":"ForeignToken","id":37},"leaveWaitingPeriod":{"type":"uint32","id":38},"publisherFeeShare":{"type":"uint32","id":39},"publishWaitingPeriod":{"type":"uint32","id":40},"publishSlashRate":{"type":"uint32","id":41},"migrateHistory":{"rule":"repeated","type":"string","id":42},"closed":{"type":"bool","id":43},"vaultHistory":{"rule":"repeated","type":"string","id":44},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedRollupBlock":{"fields":{"hash":{"type":"string","id":1},"height":{"type":"uint64","id":2},"merkleRoot":{"type":"string","id":3},"previousHash":{"type":"string","id":4},"txsHash":{"type":"string","id":5},"txs":{"rule":"repeated","type":"string","id":6},"proposer":{"type":"string","id":7},"signatures":{"rule":"repeated","type":"Multisig","id":8},"genesisTime":{"type":"string","id":10},"renaissanceTime":{"type":"string","id":11},"rollup":{"type":"string","id":12},"mintedAmount":{"type":"string","id":13},"burnedAmount":{"type":"string","id":14},"rewardAmount":{"type":"string","id":15},"governance":{"type":"bool","id":16},"tokenInfo":{"type":"IndexedTokenInput","id":18},"data":{"type":"google.protobuf.Any","id":50}}},"SearchResult":{"fields":{"type":{"type":"string","id":1},"id":{"type":"string","id":2},"title":{"type":"string","id":3},"subtitle":{"type":"string","id":4},"description":{"type":"string","id":5},"tags":{"rule":"repeated","type":"string","id":6},"timestamp":{"type":"string","id":7}}},"IndexedRollupValidator":{"fields":{"pk":{"type":"string","id":1},"address":{"type":"string","id":2},"moniker":{"type":"string","id":3},"endpoint":{"type":"string","id":4},"joinTime":{"type":"string","id":5},"leaveTime":{"type":"string","id":6},"genesisTime":{"type":"string","id":7},"renaissanceTime":{"type":"string","id":8},"totalStake":{"type":"string","id":9},"revokedStake":{"type":"string","id":10},"availableStake":{"type":"string","id":11},"totalGain":{"type":"string","id":12},"proposedBlockCount":{"type":"uint64","id":13},"verifiedBlockCount":{"type":"uint64","id":14},"latestBlockHeight":{"type":"uint64","id":15},"latestBlockHash":{"type":"string","id":16},"rollup":{"type":"string","id":17}}},"IndexedDelegationState":{"fields":{"address":{"type":"string","id":1},"from":{"type":"string","id":2},"to":{"type":"string","id":3},"genesisTime":{"type":"string","id":4},"renaissanceTime":{"type":"string","id":5},"ops":{"keyType":"string","type":"DelegateOpState","id":6},"data":{"type":"google.protobuf.Any","id":7}}},"TokenFlowDirection":{"values":{"IN":0,"OUT":1}},"IndexedTokenFlow":{"fields":{"value":{"type":"string","id":1},"hash":{"type":"string","id":2},"from":{"type":"string","id":3},"to":{"type":"string","id":4}}},"VerifyAccountRiskResult":{"fields":{"isRisky":{"type":"bool","id":1},"reason":{"type":"string","id":2},"data":{"type":"BalanceRisky","id":3}},"nested":{"BalanceRisky":{"fields":{"address":{"type":"string","id":1},"balance":{"type":"string","id":2},"transferIn":{"type":"string","id":3},"transferOut":{"type":"string","id":4},"accountCount":{"type":"uint32","id":5},"txCount":{"type":"uint32","id":6}}}}},"TokenDistribution":{"fields":{"tokenAddress":{"type":"string","id":1},"txTime":{"type":"string","id":2},"account":{"type":"string","id":3},"gas":{"type":"string","id":4},"fee":{"type":"string","id":5},"slashedVault":{"type":"string","id":6},"stake":{"type":"string","id":7},"revokedStake":{"type":"string","id":8},"gasStake":{"type":"string","id":9}}}}},"google":{"nested":{"protobuf":{"nested":{"Timestamp":{"fields":{"seconds":{"type":"int64","id":1},"nanos":{"type":"int32","id":2}}},"Any":{"fields":{"type_url":{"type":"string","id":1},"value":{"type":"bytes","id":2}}}}}}},"vendor":{"nested":{"KVPair":{"fields":{"key":{"type":"bytes","id":1},"value":{"type":"bytes","id":2}}},"BlockParams":{"fields":{"maxBytes":{"type":"int64","id":1},"maxGas":{"type":"int64","id":2}}},"EvidenceParams":{"fields":{"maxAge":{"type":"int64","id":1}}},"ValidatorParams":{"fields":{"pubKeyTypes":{"rule":"repeated","type":"string","id":1}}},"ConsensusParams":{"fields":{"block":{"type":"BlockParams","id":1},"evidence":{"type":"EvidenceParams","id":2},"validator":{"type":"ValidatorParams","id":3}}},"LastCommitInfo":{"fields":{"round":{"type":"int32","id":1},"votes":{"rule":"repeated","type":"VoteInfo","id":2}}},"Version":{"fields":{"Block":{"type":"uint64","id":1},"App":{"type":"uint64","id":2}}},"BlockID":{"fields":{"hash":{"type":"bytes","id":1},"partsHeader":{"type":"PartSetHeader","id":2}}},"PartSetHeader":{"fields":{"total":{"type":"int32","id":1},"hash":{"type":"bytes","id":2}}},"Validator":{"fields":{"address":{"type":"bytes","id":1},"power":{"type":"int64","id":3}}},"ValidatorUpdate":{"fields":{"pubKey":{"type":"PubKey","id":1},"power":{"type":"int64","id":2}}},"VoteInfo":{"fields":{"validator":{"type":"Validator","id":1},"signedLastBlock":{"type":"bool","id":2}}},"PubKey":{"fields":{"type":{"type":"string","id":1},"data":{"type":"bytes","id":2}}},"Evidence":{"fields":{"type":{"type":"string","id":1},"validator":{"type":"Validator","id":2},"height":{"type":"int64","id":3},"time":{"type":"google.protobuf.Timestamp","id":4},"totalVotingPower":{"type":"int64","id":5}}},"Header":{"fields":{"version":{"type":"Version","id":1},"chainId":{"type":"string","id":2},"height":{"type":"int64","id":3},"time":{"type":"google.protobuf.Timestamp","id":4},"numTxs":{"type":"int64","id":5},"totalTxs":{"type":"int64","id":6},"lastBlockId":{"type":"BlockID","id":7},"lastCommitHash":{"type":"bytes","id":8},"dataHash":{"type":"bytes","id":9},"validatorsHash":{"type":"bytes","id":10},"nextValidatorsHash":{"type":"bytes","id":11},"consensusHash":{"type":"bytes","id":12},"appHash":{"type":"bytes","id":13},"lastResultsHash":{"type":"bytes","id":14},"evidenceHash":{"type":"bytes","id":15},"proposerAddress":{"type":"bytes","id":16}}},"RequestBeginBlock":{"fields":{"hash":{"type":"bytes","id":1},"header":{"type":"Header","id":2},"lastCommitInfo":{"type":"LastCommitInfo","id":3},"byzantineValidators":{"rule":"repeated","type":"Evidence","id":4}}},"RequestEndBlock":{"fields":{"height":{"type":"int64","id":1}}}}}}'),fn={nested:yn};var st,Nt;function Ft(){if(Nt)return st;Nt=1;const d=structuredClone(fn),u=(f,J)=>{if(!(!f||!J))return Object.prototype.hasOwnProperty.call(f,J)?f[J]:J.split(".").reduce((h,H)=>h==null?h:h[H],f)},c=/Tx$/,g=/State$/,E=/^StakeFor/i,b=/^Request/i,I=/^Response/i,S=f=>f.split(/(?=[A-Z])/).join("_").toLowerCase(),o=f=>(f.nested&&(f=f.nested),Object.keys(f).forEach(J=>{f[J]&&typeof f[J]=="object"&&(f[J]=o(f[J]))}),f),s=o(d),p="ocap",{[p]:a}=s;Object.assign(s,s[p]);const l={},e=Object.keys(a).filter(f=>a[f].values).reduce((f,J)=>(l[J]={},f[J]=Object.keys(a[J].values).reduce((h,H)=>(h[H.toUpperCase()]=a[J].values[H],l[J][a[J].values[H]]=H.toUpperCase(),h),{}),f),{});function t(f){return Object.keys(f).reduce((J,h)=>{let H=h;return!b.test(h)&&!I.test(h)&&(c.test(h)&&(H=`fg:t:${S(h.replace(c,""))}`),g.test(h)&&(H=`fg:s:${S(h.replace(g,""))}`),E.test(h)&&(H=`fg:x:${S(`Stake${h.replace(E,"")}`)}`),["TransactionInfo"].includes(h)&&(H=`fg:x:${S(h)}`),h==="AssetFactoryState"&&(H="fg:s:asset_factory_state"),h==="AssetFactory"&&(H="fg:x:asset_factory"),h==="DummyCodec"&&(H="fg:x:address")),J[h]=H,J},{})}const r=t(a),n=Object.keys(a).filter(f=>c.test(f)&&!b.test(f)&&!I.test(f)),A=Object.keys(a).filter(f=>E.test(f));e.SupportedTxs=n,e.SupportedStakes=A;const i=["ExchangeV2Tx"].filter(f=>n.includes(f)),D=["TransferV3Tx","AcquireAssetV3Tx","StakeTx","UpdateRollupTx","JoinRollupTx","LeaveRollupTx","PauseRollupTx","CloseRollupTx","MigrateRollupTx","ResumeRollupTx","DepositTokenV2Tx","WithdrawTokenV2Tx","CreateRollupBlockTx","ClaimBlockRewardTx","CreateAssetTx","ConsumeAssetTx","MintTokenTx","BurnTokenTx"].filter(f=>n.includes(f));function k(f){const h=(u(s,f)||u(s,`vendor.${f}`)||{}).fields;return h?Object.keys(h).map(H=>Object.assign({name:H},h[H])):[]}function B(f){return e[f]}function v(){return n.slice()}function m(f){const J=u(s,f)||u(s,`vendor.${f}`)||{};return{fields:J.fields,oneofs:J.oneofs}}function O(f){return r[f]||f}function T(f){const J=Object.entries(r).find(([,h])=>h===f);return J?J[0]:f}return st={enums:e,messages:l,typeUrls:r,transactions:n,stakes:A,multiSignTxs:i,multiSignV2Txs:D,compactSpec:o,getFields:k,getEnum:B,listTxTypes:v,getMessageType:m,getTypeUrl:O,fromTypeUrl:T,toTypeUrl:O},st}var Re={},Pe={},Xe={},Rt;function Gr(){if(Rt)return Xe;Rt=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(s,p)=>()=>(p||s((p={exports:{}}).exports,p),p.exports),S=(s,p,a,l)=>{if(p&&typeof p=="object"||typeof p=="function")for(var e=g(p),t=0,r=e.length,n;t<r;t++)n=e[t],!b.call(s,n)&&n!==a&&u(s,n,{get:(A=>p[A]).bind(null,n),enumerable:!(l=c(p,n))||l.enumerable});return s},o=(s,p,a)=>(a=s!=null?d(E(s)):{},S(p||!s||!s.__esModule?u(a,"default",{value:s,enumerable:!0}):a,s));return Xe.__commonJSMin=I,Xe.__toESM=o,Xe}var Ue={},ot={},vt;function gn(){if(vt)return ot;vt=1;const d=["Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","Tagged"];function u(g){if(g===null)return"null";if(g===void 0)return"undefined";if(g===!0||g===!1)return"boolean";const E=typeof g;if(E==="string"||E==="number"||E==="bigint"||E==="symbol")return E;if(E==="function")return"Function";if(Array.isArray(g))return"Array";if(g instanceof Uint8Array)return"Uint8Array";if(g.constructor===Object)return"Object";const b=c(g);return b||"Object"}function c(g){const E=Object.prototype.toString.call(g).slice(8,-1);if(d.includes(E))return E}return ot.is=u,ot}var Ze={},xt;function ye(){if(xt)return Ze;xt=1;var d=class{constructor(c,g,E){this.major=c,this.majorEncoded=c<<5,this.name=g,this.terminal=E}toString(){return`Type[${this.major}].${this.name}`}compare(c){return this.major<c.major?-1:this.major>c.major?1:0}static equals(c,g){return c===g||c.major===g.major&&c.name===g.name}};d.uint=new d(0,"uint",!0),d.negint=new d(1,"negint",!0),d.bytes=new d(2,"bytes",!0),d.string=new d(3,"string",!0),d.array=new d(4,"array",!1),d.map=new d(5,"map",!1),d.tag=new d(6,"tag",!1),d.float=new d(7,"float",!0),d.false=new d(7,"false",!0),d.true=new d(7,"true",!0),d.null=new d(7,"null",!0),d.undefined=new d(7,"undefined",!0),d.break=new d(7,"break",!0);var u=class{constructor(c,g,E){this.type=c,this.value=g,this.encodedLength=E,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}};return Ze.Token=u,Ze.Type=d,Ze}var He={},wt;function je(){if(wt)return He;wt=1;const d=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",u=new TextEncoder;function c(e){return d&&globalThis.Buffer.isBuffer(e)}function g(e){return e instanceof Uint8Array?c(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e:Uint8Array.from(e)}const E=24,b=200,I=d?e=>e.length>=E?globalThis.Buffer.from(e):l(e):e=>e.length>=b?u.encode(e):l(e),S=e=>Uint8Array.from(e),o=d?(e,t,r)=>c(e)?new Uint8Array(e.subarray(t,r)):e.slice(t,r):(e,t,r)=>e.slice(t,r),s=d?(e,t)=>(e=e.map(r=>r instanceof Uint8Array?r:globalThis.Buffer.from(r)),g(globalThis.Buffer.concat(e,t))):(e,t)=>{const r=new Uint8Array(t);let n=0;for(let A of e)n+A.length>r.length&&(A=A.subarray(0,r.length-n)),r.set(A,n),n+=A.length;return r},p=d?e=>globalThis.Buffer.allocUnsafe(e):e=>new Uint8Array(e);function a(e,t){if(c(e)&&c(t))return e.compare(t);for(let r=0;r<e.length;r++)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return 0}function l(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let A=e.charCodeAt(n);A<128?t[r++]=A:A<2048?(t[r++]=A>>6|192,t[r++]=A&63|128):(A&64512)===55296&&n+1<e.length&&(e.charCodeAt(n+1)&64512)===56320?(A=65536+((A&1023)<<10)+(e.charCodeAt(++n)&1023),t[r++]=A>>18|240,t[r++]=A>>12&63|128,t[r++]=A>>6&63|128,t[r++]=A&63|128):(A>=55296&&A<=57343&&(A=65533),t[r++]=A>>12|224,t[r++]=A>>6&63|128,t[r++]=A&63|128)}return t}return He.alloc=p,He.asU8A=g,He.compare=a,He.concat=s,He.fromArray=S,He.fromString=I,He.slice=o,He}var Qe={},Ct;function En(){if(Ct)return Qe;Ct=1;const d=je(),u=256;var c=class{constructor(E=u){this.chunkSize=E,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(E){let b=this.chunks[this.chunks.length-1];if(this.cursor+E.length<=this.maxCursor+1){const I=b.length-(this.maxCursor-this.cursor)-1;b.set(E,I)}else{if(b){const I=b.length-(this.maxCursor-this.cursor)-1;I<b.length&&(this.chunks[this.chunks.length-1]=b.subarray(0,I),this.maxCursor=this.cursor-1)}E.length<64&&E.length<this.chunkSize?(b=d.alloc(this.chunkSize),this.chunks.push(b),this.maxCursor+=b.length,this._initReuseChunk===null&&(this._initReuseChunk=b),b.set(E,0)):(this.chunks.push(E),this.maxCursor+=E.length)}this.cursor+=E.length}toBytes(E=!1){let b;if(this.chunks.length===1){const I=this.chunks[0];E&&this.cursor>I.length/2?(b=this.cursor===I.length?I:I.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):b=d.slice(I,0,this.cursor)}else b=d.concat(this.chunks,this.cursor);return E&&this.reset(),b}},g=class{constructor(E){this.dest=E,this.cursor=0,this.chunks=[E]}reset(){this.cursor=0}push(E){if(this.cursor+E.length>this.dest.length)throw new Error("write out of bounds, destination buffer is too small");this.dest.set(E,this.cursor),this.cursor+=E.length}toBytes(E=!1){const b=this.dest.subarray(0,this.cursor);return E&&this.reset(),b}};return Qe.Bl=c,Qe.U8Bl=g,Qe}var Me={},Bt;function Ie(){if(Bt)return Me;Bt=1;const d="CBOR decode error:",u="CBOR encode error:";function c(g,E,b){if(g.length-E<b)throw new Error(`${d} not enough data for type`)}return Me.assertEnoughData=c,Me.decodeErrPrefix=d,Me.encodeErrPrefix=u,Me}var le={},Pt;function Fe(){if(Pt)return le;Pt=1;const d=ye(),u=Ie(),c=[24,256,65536,4294967296,BigInt("18446744073709551616")];function g(e,t,r){u.assertEnoughData(e,t,1);const n=e[t];if(r.strict===!0&&n<c[0])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);return n}function E(e,t,r){u.assertEnoughData(e,t,2);const n=e[t]<<8|e[t+1];if(r.strict===!0&&n<c[1])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);return n}function b(e,t,r){u.assertEnoughData(e,t,4);const n=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];if(r.strict===!0&&n<c[2])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);return n}function I(e,t,r){u.assertEnoughData(e,t,8);const n=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3],A=e[t+4]*16777216+(e[t+5]<<16)+(e[t+6]<<8)+e[t+7],i=(BigInt(n)<<BigInt(32))+BigInt(A);if(r.strict===!0&&i<c[3])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);if(i<=Number.MAX_SAFE_INTEGER)return Number(i);if(r.allowBigInt===!0)return i;throw new Error(`${u.decodeErrPrefix} integers outside of the safe integer range are not supported`)}function S(e,t,r,n){return new d.Token(d.Type.uint,g(e,t+1,n),2)}function o(e,t,r,n){return new d.Token(d.Type.uint,E(e,t+1,n),3)}function s(e,t,r,n){return new d.Token(d.Type.uint,b(e,t+1,n),5)}function p(e,t,r,n){return new d.Token(d.Type.uint,I(e,t+1,n),9)}function a(e,t){return l(e,0,t.value)}function l(e,t,r){if(r<c[0]){const n=Number(r);e.push([t|n])}else if(r<c[1]){const n=Number(r);e.push([t|24,n])}else if(r<c[2]){const n=Number(r);e.push([t|25,n>>>8,n&255])}else if(r<c[3]){const n=Number(r);e.push([t|26,n>>>24&255,n>>>16&255,n>>>8&255,n&255])}else{const n=BigInt(r);if(n<c[4]){const A=[t|27,0,0,0,0,0,0,0];let i=Number(n&BigInt(4294967295)),D=Number(n>>BigInt(32)&BigInt(4294967295));A[8]=i&255,i=i>>8,A[7]=i&255,i=i>>8,A[6]=i&255,i=i>>8,A[5]=i&255,A[4]=D&255,D=D>>8,A[3]=D&255,D=D>>8,A[2]=D&255,D=D>>8,A[1]=D&255,e.push(A)}else throw new Error(`${u.decodeErrPrefix} encountered BigInt larger than allowable range`)}}return a.encodedSize=function(t){return l.encodedSize(t.value)},l.encodedSize=function(t){return t<c[0]?1:t<c[1]?2:t<c[2]?3:t<c[3]?5:9},a.compareTokens=function(t,r){return t.value<r.value?-1:t.value>r.value?1:0},le.decodeUint16=o,le.decodeUint32=s,le.decodeUint64=p,le.decodeUint8=S,le.encodeUint=a,le.encodeUintValue=l,le.readUint16=E,le.readUint32=b,le.readUint64=I,le.readUint8=g,le.uintBoundaries=c,le}var ve={},Ut;function _r(){if(Ut)return ve;Ut=1;const d=ye(),u=Ie(),c=Fe();function g(p,a,l,e){return new d.Token(d.Type.negint,-1-c.readUint8(p,a+1,e),2)}function E(p,a,l,e){return new d.Token(d.Type.negint,-1-c.readUint16(p,a+1,e),3)}function b(p,a,l,e){return new d.Token(d.Type.negint,-1-c.readUint32(p,a+1,e),5)}const I=BigInt(-1),S=BigInt(1);function o(p,a,l,e){const t=c.readUint64(p,a+1,e);if(typeof t!="bigint"){const r=-1-t;if(r>=Number.MIN_SAFE_INTEGER)return new d.Token(d.Type.negint,r,9)}if(e.allowBigInt!==!0)throw new Error(`${u.decodeErrPrefix} integers outside of the safe integer range are not supported`);return new d.Token(d.Type.negint,I-BigInt(t),9)}function s(p,a){const l=a.value,e=typeof l=="bigint"?l*I-S:l*-1-1;c.encodeUintValue(p,a.type.majorEncoded,e)}return s.encodedSize=function(a){const l=a.value,e=typeof l=="bigint"?l*I-S:l*-1-1;return e<c.uintBoundaries[0]?1:e<c.uintBoundaries[1]?2:e<c.uintBoundaries[2]?3:e<c.uintBoundaries[3]?5:9},s.compareTokens=function(a,l){return a.value<l.value?1:a.value>l.value?-1:0},ve.decodeNegint16=E,ve.decodeNegint32=b,ve.decodeNegint64=o,ve.decodeNegint8=g,ve.encodeNegint=s,ve}var Je={},Mt;function Tt(){if(Mt)return Je;Mt=1;const d=ye(),u=je(),c=Ie(),g=Fe();function E(e,t,r,n){c.assertEnoughData(e,t,r+n);const A=e.slice(t+r,t+r+n);return new d.Token(d.Type.bytes,A,r+n)}function b(e,t,r,n){return E(e,t,1,r)}function I(e,t,r,n){return E(e,t,2,g.readUint8(e,t+1,n))}function S(e,t,r,n){return E(e,t,3,g.readUint16(e,t+1,n))}function o(e,t,r,n){return E(e,t,5,g.readUint32(e,t+1,n))}function s(e,t,r,n){const A=g.readUint64(e,t+1,n);if(typeof A=="bigint")throw new Error(`${c.decodeErrPrefix} 64-bit integer bytes lengths not supported`);return E(e,t,9,A)}function p(e){return e.encodedBytes===void 0&&(e.encodedBytes=d.Type.equals(e.type,d.Type.string)?u.fromString(e.value):e.value),e.encodedBytes}function a(e,t){const r=p(t);g.encodeUintValue(e,t.type.majorEncoded,r.length),e.push(r)}a.encodedSize=function(t){const r=p(t);return g.encodeUintValue.encodedSize(r.length)+r.length},a.compareTokens=function(t,r){return l(p(t),p(r))};function l(e,t){return e.length<t.length?-1:e.length>t.length?1:u.compare(e,t)}return Je.decodeBytes16=S,Je.decodeBytes32=o,Je.decodeBytes64=s,Je.decodeBytes8=I,Je.decodeBytesCompact=b,Je.encodeBytes=a,Je}var Se={},Lt;function Or(){if(Lt)return Se;Lt=1;const d=ye(),u=Ie(),c=Fe(),g=Tt(),E=new TextDecoder,b=32;function I(t,r,n){if(n-r<b){let A="";for(let i=r;i<n;i++){const D=t[i];if(D&128)return E.decode(t.subarray(r,n));A+=String.fromCharCode(D)}return A}return E.decode(t.subarray(r,n))}function S(t,r,n,A,i){const D=n+A;u.assertEnoughData(t,r,D);const k=new d.Token(d.Type.string,I(t,r+n,r+D),D);return i.retainStringBytes===!0&&(k.byteValue=t.slice(r+n,r+D)),k}function o(t,r,n,A){return S(t,r,1,n,A)}function s(t,r,n,A){return S(t,r,2,c.readUint8(t,r+1,A),A)}function p(t,r,n,A){return S(t,r,3,c.readUint16(t,r+1,A),A)}function a(t,r,n,A){return S(t,r,5,c.readUint32(t,r+1,A),A)}function l(t,r,n,A){const i=c.readUint64(t,r+1,A);if(typeof i=="bigint")throw new Error(`${u.decodeErrPrefix} 64-bit integer string lengths not supported`);return S(t,r,9,i,A)}const e=g.encodeBytes;return Se.decodeString16=p,Se.decodeString32=a,Se.decodeString64=l,Se.decodeString8=s,Se.decodeStringCompact=o,Se.encodeString=e,Se}var he={},Vt;function Nr(){if(Vt)return he;Vt=1;const d=ye(),u=Ie(),c=Fe();function g(a,l,e,t){return new d.Token(d.Type.array,t,e)}function E(a,l,e,t){return g(a,l,1,e)}function b(a,l,e,t){return g(a,l,2,c.readUint8(a,l+1,t))}function I(a,l,e,t){return g(a,l,3,c.readUint16(a,l+1,t))}function S(a,l,e,t){return g(a,l,5,c.readUint32(a,l+1,t))}function o(a,l,e,t){const r=c.readUint64(a,l+1,t);if(typeof r=="bigint")throw new Error(`${u.decodeErrPrefix} 64-bit integer array lengths not supported`);return g(a,l,9,r)}function s(a,l,e,t){if(t.allowIndefinite===!1)throw new Error(`${u.decodeErrPrefix} indefinite length items not allowed`);return g(a,l,1,1/0)}function p(a,l){c.encodeUintValue(a,d.Type.array.majorEncoded,l.value)}return p.compareTokens=c.encodeUint.compareTokens,p.encodedSize=function(l){return c.encodeUintValue.encodedSize(l.value)},he.decodeArray16=I,he.decodeArray32=S,he.decodeArray64=o,he.decodeArray8=b,he.decodeArrayCompact=E,he.decodeArrayIndefinite=s,he.encodeArray=p,he}var De={},Wt;function Rr(){if(Wt)return De;Wt=1;const d=ye(),u=Ie(),c=Fe();function g(a,l,e,t){return new d.Token(d.Type.map,t,e)}function E(a,l,e,t){return g(a,l,1,e)}function b(a,l,e,t){return g(a,l,2,c.readUint8(a,l+1,t))}function I(a,l,e,t){return g(a,l,3,c.readUint16(a,l+1,t))}function S(a,l,e,t){return g(a,l,5,c.readUint32(a,l+1,t))}function o(a,l,e,t){const r=c.readUint64(a,l+1,t);if(typeof r=="bigint")throw new Error(`${u.decodeErrPrefix} 64-bit integer map lengths not supported`);return g(a,l,9,r)}function s(a,l,e,t){if(t.allowIndefinite===!1)throw new Error(`${u.decodeErrPrefix} indefinite length items not allowed`);return g(a,l,1,1/0)}function p(a,l){c.encodeUintValue(a,d.Type.map.majorEncoded,l.value)}return p.compareTokens=c.encodeUint.compareTokens,p.encodedSize=function(l){return c.encodeUintValue.encodedSize(l.value)},De.decodeMap16=I,De.decodeMap32=S,De.decodeMap64=o,De.decodeMap8=b,De.decodeMapCompact=E,De.decodeMapIndefinite=s,De.encodeMap=p,De}var be={},jt;function vr(){if(jt)return be;jt=1;const d=ye(),u=Fe();function c(o,s,p,a){return new d.Token(d.Type.tag,p,1)}function g(o,s,p,a){return new d.Token(d.Type.tag,u.readUint8(o,s+1,a),2)}function E(o,s,p,a){return new d.Token(d.Type.tag,u.readUint16(o,s+1,a),3)}function b(o,s,p,a){return new d.Token(d.Type.tag,u.readUint32(o,s+1,a),5)}function I(o,s,p,a){return new d.Token(d.Type.tag,u.readUint64(o,s+1,a),9)}function S(o,s){u.encodeUintValue(o,d.Type.tag.majorEncoded,s.value)}return S.compareTokens=u.encodeUint.compareTokens,S.encodedSize=function(s){return u.encodeUintValue.encodedSize(s.value)},be.decodeTag16=E,be.decodeTag32=b,be.decodeTag64=I,be.decodeTag8=g,be.decodeTagCompact=c,be.encodeTag=S,be}var Ae={},qt;function xr(){if(qt)return Ae;qt=1;const d=ye(),u=Ie(),c=Fe(),g=20,E=21,b=22,I=23;function S(m,O,T,f){if(f.allowUndefined===!1)throw new Error(`${u.decodeErrPrefix} undefined values are not supported`);return f.coerceUndefinedToNull===!0?new d.Token(d.Type.null,null,1):new d.Token(d.Type.undefined,void 0,1)}function o(m,O,T,f){if(f.allowIndefinite===!1)throw new Error(`${u.decodeErrPrefix} indefinite length items not allowed`);return new d.Token(d.Type.break,void 0,1)}function s(m,O,T){if(T){if(T.allowNaN===!1&&Number.isNaN(m))throw new Error(`${u.decodeErrPrefix} NaN values are not supported`);if(T.allowInfinity===!1&&(m===1/0||m===-1/0))throw new Error(`${u.decodeErrPrefix} Infinity values are not supported`)}return new d.Token(d.Type.float,m,O)}function p(m,O,T,f){return s(i(m,O+1),3,f)}function a(m,O,T,f){return s(k(m,O+1),5,f)}function l(m,O,T,f){return s(v(m,O+1),9,f)}function e(m,O,T){const f=O.value;if(f===!1)m.push([d.Type.float.majorEncoded|g]);else if(f===!0)m.push([d.Type.float.majorEncoded|E]);else if(f===null)m.push([d.Type.float.majorEncoded|b]);else if(f===void 0)m.push([d.Type.float.majorEncoded|I]);else{let J,h=!1;(!T||T.float64!==!0)&&(A(f),J=i(n,1),f===J||Number.isNaN(f)?(n[0]=249,m.push(n.slice(0,3)),h=!0):(D(f),J=k(n,1),f===J&&(n[0]=250,m.push(n.slice(0,5)),h=!0))),h||(B(f),J=v(n,1),n[0]=251,m.push(n.slice(0,9)))}}e.encodedSize=function(O,T){const f=O.value;if(f===!1||f===!0||f===null||f===void 0)return 1;if(!T||T.float64!==!0){A(f);let J=i(n,1);if(f===J||Number.isNaN(f))return 3;if(D(f),J=k(n,1),f===J)return 5}return 9};const t=new ArrayBuffer(9),r=new DataView(t,1),n=new Uint8Array(t,0);function A(m){if(m===1/0)r.setUint16(0,31744,!1);else if(m===-1/0)r.setUint16(0,64512,!1);else if(Number.isNaN(m))r.setUint16(0,32256,!1);else{r.setFloat32(0,m);const O=r.getUint32(0),T=(O&2139095040)>>23,f=O&8388607;if(T===255)r.setUint16(0,31744,!1);else if(T===0)r.setUint16(0,(O&2147483648)>>16|f>>13,!1);else{const J=T-127;J<-24?r.setUint16(0,0):J<-14?r.setUint16(0,(O&2147483648)>>16|1<<24+J,!1):r.setUint16(0,(O&2147483648)>>16|J+15<<10|f>>13,!1)}}}function i(m,O){if(m.length-O<2)throw new Error(`${u.decodeErrPrefix} not enough data for float16`);const T=(m[O]<<8)+m[O+1];if(T===31744)return 1/0;if(T===64512)return-1/0;if(T===32256)return NaN;const f=T>>10&31,J=T&1023;let h;return f===0?h=J*2**-24:f!==31?h=(J+1024)*2**(f-25):h=J===0?1/0:NaN,T&32768?-h:h}function D(m){r.setFloat32(0,m,!1)}function k(m,O){if(m.length-O<4)throw new Error(`${u.decodeErrPrefix} not enough data for float32`);const T=(m.byteOffset||0)+O;return new DataView(m.buffer,T,4).getFloat32(0,!1)}function B(m){r.setFloat64(0,m,!1)}function v(m,O){if(m.length-O<8)throw new Error(`${u.decodeErrPrefix} not enough data for float64`);const T=(m.byteOffset||0)+O;return new DataView(m.buffer,T,8).getFloat64(0,!1)}return e.compareTokens=c.encodeUint.compareTokens,Ae.MINOR_FALSE=g,Ae.MINOR_NULL=b,Ae.MINOR_TRUE=E,Ae.MINOR_UNDEFINED=I,Ae.decodeBreak=o,Ae.decodeFloat16=p,Ae.decodeFloat32=a,Ae.decodeFloat64=l,Ae.decodeUndefined=S,Ae.encodeFloat=e,Ae}var Le={},Kt;function wr(){if(Kt)return Le;Kt=1;const d=ye(),u=je(),c=Ie(),g=Fe(),E=_r(),b=Tt(),I=Or(),S=Nr(),o=Rr(),s=vr(),p=xr();function a(n,A,i){throw new Error(`${c.decodeErrPrefix} encountered invalid minor (${i}) for major ${n[A]>>>5}`)}function l(n){return()=>{throw new Error(`${c.decodeErrPrefix} ${n}`)}}const e=[];for(let n=0;n<=23;n++)e[n]=a;e[24]=g.decodeUint8,e[25]=g.decodeUint16,e[26]=g.decodeUint32,e[27]=g.decodeUint64,e[28]=a,e[29]=a,e[30]=a,e[31]=a;for(let n=32;n<=55;n++)e[n]=a;e[56]=E.decodeNegint8,e[57]=E.decodeNegint16,e[58]=E.decodeNegint32,e[59]=E.decodeNegint64,e[60]=a,e[61]=a,e[62]=a,e[63]=a;for(let n=64;n<=87;n++)e[n]=b.decodeBytesCompact;e[88]=b.decodeBytes8,e[89]=b.decodeBytes16,e[90]=b.decodeBytes32,e[91]=b.decodeBytes64,e[92]=a,e[93]=a,e[94]=a,e[95]=l("indefinite length bytes/strings are not supported");for(let n=96;n<=119;n++)e[n]=I.decodeStringCompact;e[120]=I.decodeString8,e[121]=I.decodeString16,e[122]=I.decodeString32,e[123]=I.decodeString64,e[124]=a,e[125]=a,e[126]=a,e[127]=l("indefinite length bytes/strings are not supported");for(let n=128;n<=151;n++)e[n]=S.decodeArrayCompact;e[152]=S.decodeArray8,e[153]=S.decodeArray16,e[154]=S.decodeArray32,e[155]=S.decodeArray64,e[156]=a,e[157]=a,e[158]=a,e[159]=S.decodeArrayIndefinite;for(let n=160;n<=183;n++)e[n]=o.decodeMapCompact;e[184]=o.decodeMap8,e[185]=o.decodeMap16,e[186]=o.decodeMap32,e[187]=o.decodeMap64,e[188]=a,e[189]=a,e[190]=a,e[191]=o.decodeMapIndefinite;for(let n=192;n<=215;n++)e[n]=s.decodeTagCompact;e[216]=s.decodeTag8,e[217]=s.decodeTag16,e[218]=s.decodeTag32,e[219]=s.decodeTag64,e[220]=a,e[221]=a,e[222]=a,e[223]=a;for(let n=224;n<=243;n++)e[n]=l("simple values are not supported");e[244]=a,e[245]=a,e[246]=a,e[247]=p.decodeUndefined,e[248]=l("simple values are not supported"),e[249]=p.decodeFloat16,e[250]=p.decodeFloat32,e[251]=p.decodeFloat64,e[252]=a,e[253]=a,e[254]=a,e[255]=p.decodeBreak;const t=[];for(let n=0;n<24;n++)t[n]=new d.Token(d.Type.uint,n,1);for(let n=-1;n>=-24;n--)t[31-n]=new d.Token(d.Type.negint,n,1);t[64]=new d.Token(d.Type.bytes,new Uint8Array(0),1),t[96]=new d.Token(d.Type.string,"",1),t[128]=new d.Token(d.Type.array,0,1),t[160]=new d.Token(d.Type.map,0,1),t[244]=new d.Token(d.Type.false,!1,1),t[245]=new d.Token(d.Type.true,!0,1),t[246]=new d.Token(d.Type.null,null,1);function r(n){switch(n.type){case d.Type.false:return u.fromArray([244]);case d.Type.true:return u.fromArray([245]);case d.Type.null:return u.fromArray([246]);case d.Type.bytes:return n.value.length?void 0:u.fromArray([64]);case d.Type.string:return n.value===""?u.fromArray([96]):void 0;case d.Type.array:return n.value===0?u.fromArray([128]):void 0;case d.Type.map:return n.value===0?u.fromArray([160]):void 0;case d.Type.uint:return n.value<24?u.fromArray([Number(n.value)]):void 0;case d.Type.negint:if(n.value>=-24)return u.fromArray([31-Number(n.value)])}}return Le.jump=e,Le.quick=t,Le.quickEncodeToken=r,Le}var Xt;function Br(){if(Xt)return Ue;Xt=1;const d=gn(),u=ye(),c=je(),g=En(),E=Ie(),b=Fe(),I=_r(),S=Tt(),o=Or(),s=Nr(),p=Rr(),a=vr(),l=xr(),e=wr(),t={float64:!1,mapSorter:O,quickEncodeToken:e.quickEncodeToken},r=Object.freeze({float64:!0,mapSorter:T,quickEncodeToken:e.quickEncodeToken});function n(){const _=[];return _[u.Type.uint.major]=b.encodeUint,_[u.Type.negint.major]=I.encodeNegint,_[u.Type.bytes.major]=S.encodeBytes,_[u.Type.string.major]=o.encodeString,_[u.Type.array.major]=s.encodeArray,_[u.Type.map.major]=p.encodeMap,_[u.Type.tag.major]=a.encodeTag,_[u.Type.float.major]=l.encodeFloat,_}const A=n(),i=new g.Bl;var D=class Cr{constructor(M,V){this.obj=M,this.parent=V}includes(M){let V=this;do if(V.obj===M)return!0;while(V=V.parent);return!1}static createCheck(M,V){if(M&&M.includes(V))throw new Error(`${E.encodeErrPrefix} object contains circular references`);return new Cr(V,M)}};const k={null:new u.Token(u.Type.null,null),undefined:new u.Token(u.Type.undefined,void 0),true:new u.Token(u.Type.true,!0),false:new u.Token(u.Type.false,!1),emptyArray:new u.Token(u.Type.array,0),emptyMap:new u.Token(u.Type.map,0)},B={number(_,M,V,F){return!Number.isInteger(_)||!Number.isSafeInteger(_)?new u.Token(u.Type.float,_):_>=0?new u.Token(u.Type.uint,_):new u.Token(u.Type.negint,_)},bigint(_,M,V,F){return _>=BigInt(0)?new u.Token(u.Type.uint,_):new u.Token(u.Type.negint,_)},Uint8Array(_,M,V,F){return new u.Token(u.Type.bytes,_)},string(_,M,V,F){return new u.Token(u.Type.string,_)},boolean(_,M,V,F){return _?k.true:k.false},null(_,M,V,F){return k.null},undefined(_,M,V,F){return k.undefined},ArrayBuffer(_,M,V,F){return new u.Token(u.Type.bytes,new Uint8Array(_))},DataView(_,M,V,F){return new u.Token(u.Type.bytes,new Uint8Array(_.buffer,_.byteOffset,_.byteLength))},Array(_,M,V,F){if(!_.length)return V.addBreakTokens===!0?[k.emptyArray,new u.Token(u.Type.break)]:k.emptyArray;F=D.createCheck(F,_);const N=[];let P=0;for(const w of _)N[P++]=v(w,V,F);return V.addBreakTokens?[new u.Token(u.Type.array,_.length),N,new u.Token(u.Type.break)]:[new u.Token(u.Type.array,_.length),N]},Object(_,M,V,F){const N=M!=="Object",P=N?_.keys():Object.keys(_),w=N?_.size:P.length;let q;if(w){q=new Array(w),F=D.createCheck(F,_);const Q=!N&&V.ignoreUndefinedProperties;let Y=0;for(const z of P){const j=N?_.get(z):_[z];Q&&j===void 0||(q[Y++]=[v(z,V,F),v(j,V,F)])}Y<w&&(q.length=Y)}return q?.length?(m(q,V),V.addBreakTokens?[new u.Token(u.Type.map,q.length),q,new u.Token(u.Type.break)]:[new u.Token(u.Type.map,q.length),q]):V.addBreakTokens===!0?[k.emptyMap,new u.Token(u.Type.break)]:k.emptyMap},Tagged(_,M,V,F){return[new u.Token(u.Type.tag,_.tag),v(_.value,V,F)]}};B.Map=B.Object,B.Buffer=B.Uint8Array;for(const _ of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))B[`${_}Array`]=B.DataView;function v(_,M={},V){const F=d.is(_),N=M&&M.typeEncoders&&M.typeEncoders[F]||B[F];if(typeof N=="function"){const w=N(_,F,M,V);if(w!=null)return w}const P=B[F];if(!P)throw new Error(`${E.encodeErrPrefix} unsupported type: ${F}`);return P(_,F,M,V)}function m(_,M){M.mapSorter&&_.sort(M.mapSorter)}function O(_,M){const V=Array.isArray(_[0])?_[0][0]:_[0],F=Array.isArray(M[0])?M[0][0]:M[0];if(V.type!==F.type)return V.type.compare(F.type);const N=A[V.type.major].compareTokens(V,F);return N===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),N}function T(_,M){if(_[0]instanceof u.Token&&M[0]instanceof u.Token){const V=_[0],F=M[0];return V._keyBytes||(V._keyBytes=f(V.value)),F._keyBytes||(F._keyBytes=f(F.value)),c.compare(V._keyBytes,F._keyBytes)}throw new Error("rfc8949MapSorter: complex key types are not supported yet")}function f(_){return ee(_,A,r)}function J(_,M,V,F){if(Array.isArray(M))for(const N of M)J(_,N,V,F);else V[M.type.major](_,M,F)}const h=u.Type.uint.majorEncoded,H=u.Type.negint.majorEncoded,G=u.Type.bytes.majorEncoded,x=u.Type.string.majorEncoded,U=u.Type.array.majorEncoded,L=u.Type.float.majorEncoded|l.MINOR_FALSE,y=u.Type.float.majorEncoded|l.MINOR_TRUE,$=u.Type.float.majorEncoded|l.MINOR_NULL,R=u.Type.float.majorEncoded|l.MINOR_UNDEFINED,C=BigInt(-1),K=BigInt(1);function W(_){return _.addBreakTokens!==!0}function Z(_,M,V,F){const N=d.is(M),P=V.typeEncoders&&V.typeEncoders[N];if(P){const w=P(M,N,V,F);if(w!=null){J(_,w,A,V);return}}switch(N){case"null":_.push([$]);return;case"undefined":_.push([R]);return;case"boolean":_.push([M?y:L]);return;case"number":!Number.isInteger(M)||!Number.isSafeInteger(M)?l.encodeFloat(_,new u.Token(u.Type.float,M),V):M>=0?b.encodeUintValue(_,h,M):b.encodeUintValue(_,H,M*-1-1);return;case"bigint":M>=BigInt(0)?b.encodeUintValue(_,h,M):b.encodeUintValue(_,H,M*C-K);return;case"string":{const w=c.fromString(M);b.encodeUintValue(_,x,w.length),_.push(w);return}case"Uint8Array":b.encodeUintValue(_,G,M.length),_.push(M);return;case"Array":if(!M.length){_.push([U]);return}F=D.createCheck(F,M),b.encodeUintValue(_,U,M.length);for(const w of M)Z(_,w,V,F);return;case"Object":case"Map":J(_,B.Object(M,N,V,F),A,V);return;default:{const w=B[N];if(!w)throw new Error(`${E.encodeErrPrefix} unsupported type: ${N}`);J(_,w(M,N,V,F),A,V)}}}function ee(_,M,V,F){const N=F instanceof Uint8Array;let P=N?new g.U8Bl(F):i;const w=v(_,V);if(!Array.isArray(w)&&V.quickEncodeToken){const q=V.quickEncodeToken(w);if(q)return N?(P.push(q),P.toBytes()):q;const Q=M[w.type.major];if(Q.encodedSize){const Y=Q.encodedSize(w,V);if(N||(P=new g.Bl(Y)),Q(P,w,V),P.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${w} was wrong`);return N?P.toBytes():c.asU8A(P.chunks[0])}}return P.reset(),J(P,w,M,V),P.toBytes(!0)}function ae(_,M){return M=Object.assign({},t,M),W(M)?(i.reset(),Z(i,_,M,void 0),i.toBytes(!0)):ee(_,A,M)}return Ue.encode=ae,Ue.objectToTokens=v,Ue.rfc8949EncodeOptions=r,Ue}var Ce={},Zt;function Pr(){if(Zt)return Ce;Zt=1;const d=ye(),u=je(),c=Ie(),g=wr(),E={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};var b=class{constructor(r,n={}){this._pos=0,this.data=r,this.options=n}pos(){return this._pos}done(){return this._pos>=this.data.length}next(){const r=this.data[this._pos];let n=g.quick[r];if(n===void 0){const A=g.jump[r];if(!A)throw new Error(`${c.decodeErrPrefix} no decoder for major type ${r>>>5} (byte 0x${r.toString(16).padStart(2,"0")})`);const i=r&31;n=A(this.data,this._pos,i,this.options)}return this._pos+=n.encodedLength,n}};const I=Symbol.for("DONE"),S=Symbol.for("BREAK");function o(r,n,A){const i=[];for(let D=0;D<r.value;D++){const k=l(n,A);if(k===S){if(r.value===1/0)break;throw new Error(`${c.decodeErrPrefix} got unexpected break to lengthed array`)}if(k===I)throw new Error(`${c.decodeErrPrefix} found array but not enough entries (got ${D}, expected ${r.value})`);i[D]=k}return i}function s(r,n,A){const i=A.useMaps===!0,D=A.rejectDuplicateMapKeys===!0,k=i?void 0:{},B=i?new Map:void 0;for(let v=0;v<r.value;v++){const m=l(n,A);if(m===S){if(r.value===1/0)break;throw new Error(`${c.decodeErrPrefix} got unexpected break to lengthed map`)}if(m===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${v} [no key], expected ${r.value})`);if(!i&&typeof m!="string")throw new Error(`${c.decodeErrPrefix} non-string keys not supported (got ${typeof m})`);if(D&&(i&&B.has(m)||!i&&Object.hasOwn(k,m)))throw new Error(`${c.decodeErrPrefix} found repeat map key "${m}"`);const O=l(n,A);if(O===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${v} [no value], expected ${r.value})`);i?B.set(m,O):k[m]=O}return i?B:k}function*p(r,n,A){for(let i=0;i<r.value;i++){const D=l(n,A);if(D===S){if(r.value===1/0)break;throw new Error(`${c.decodeErrPrefix} got unexpected break to lengthed map`)}if(D===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${i} [no key], expected ${r.value})`);const k=l(n,A);if(k===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${i} [no value], expected ${r.value})`);yield[D,k]}}function a(r,n){let A=!1;const i=function(){if(A)throw new Error(`${c.decodeErrPrefix} tag decode() may only be called once`);A=!0;const D=l(r,n);if(D===I)throw new Error(`${c.decodeErrPrefix} tag content missing`);if(D===S)throw new Error(`${c.decodeErrPrefix} got unexpected break in tag content`);return D};return i.entries=function(){if(A)throw new Error(`${c.decodeErrPrefix} tag decode() may only be called once`);A=!0;const D=r.next();if(!d.Type.equals(D.type,d.Type.map))throw new Error(`${c.decodeErrPrefix} entries() requires map content, got ${D.type.name}`);const k=[];for(const B of p(D,r,n))k.push(B);return k},Object.defineProperty(i,"_called",{get(){return A},enumerable:!1}),i}function l(r,n){if(r.done())return I;const A=r.next();if(d.Type.equals(A.type,d.Type.break))return S;if(A.type.terminal)return A.value;if(d.Type.equals(A.type,d.Type.array))return o(A,r,n);if(d.Type.equals(A.type,d.Type.map))return s(A,r,n);if(d.Type.equals(A.type,d.Type.tag)){if(n.tags&&typeof n.tags[A.value]=="function"){const i=a(r,n),D=n.tags[A.value](i);if(!i._called)throw new Error(`${c.decodeErrPrefix} tag decoder must call decode() or entries()`);return D}throw new Error(`${c.decodeErrPrefix} tag not supported (${A.value})`)}throw new Error("unsupported")}function e(r,n){if(!(r instanceof Uint8Array))throw new Error(`${c.decodeErrPrefix} data to decode must be a Uint8Array`);n=Object.assign({},E,n);const A=u.asU8A(r),i=n.tokenizer||new b(A,n),D=l(i,n);if(D===I)throw new Error(`${c.decodeErrPrefix} did not find any content to decode`);if(D===S)throw new Error(`${c.decodeErrPrefix} got unexpected break`);return[D,r.subarray(i.pos())]}function t(r,n){const[A,i]=e(r,n);if(i.length>0)throw new Error(`${c.decodeErrPrefix} too many terminals, data makes no sense`);return A}return Ce.Tokeniser=b,Ce.decode=t,Ce.decodeFirst=e,Ce.tokensToObject=l,Ce}var at={},Qt;function Ur(){if(Qt)return at;Qt=1;var d=class mt{constructor(c,g){if(typeof c!="number"||!Number.isInteger(c)||c<0)throw new TypeError("Tagged: tag must be a non-negative integer");this.tag=c,this.value=g}static decoder(c){return g=>new mt(c,g())}static preserve(...c){const g={};for(const E of c)g[E]=mt.decoder(E);return g}};return Object.defineProperty(d.prototype,Symbol.toStringTag,{value:"Tagged"}),at.Tagged=d,at}var Yt={},zt;function In(){return zt||(zt=1,ye(),Br(),Pr(),Ur()),Yt}var me={},er;function Mr(){if(er)return me;er=1;const d=[],u={},c={};function g(o){const s=d.find(a=>a.getMessageType(o).fn);if(s)return s.getMessageType(o);const p=d.find(a=>a.getMessageType(o).fields);return p?p.getMessageType(o):{}}function E(o){const s=d.find(p=>p.toTypeUrl(o)!==o);return s?s.toTypeUrl(o):o}function b(o){const s=d.find(p=>p.fromTypeUrl(o)!==o);return s?s.fromTypeUrl(o):o}function I(o){if(["getMessageType","toTypeUrl","fromTypeUrl"].some(s=>typeof o[s]!="function"))throw new Error("addProvider requires a valid proto provider");d.includes(o)===!1&&(d.push(o),o.enums&&Object.assign(u,o.enums),o.messages&&Object.assign(c,o.messages))}function S(){for(;d.length;)d.pop()}return me.addProvider=I,me.enums=u,me.fromTypeUrl=b,me.getMessageType=g,me.messages=c,me.resetProviders=S,me.toTypeUrl=E,me}var tr;function Hn(){if(tr)return Pe;tr=1,Gr();const d=Br(),u=Pr(),c=Ur();In();const g=Mr();let E=xe();const b=55799,I=2,S=3,o=new Uint8Array([217,217,247]),s=new Set(["int32","sint32","uint32","sfixed32","fixed32","int64","sint64","uint64","sfixed64","fixed64"]),p=new Set(["double","float"]),a=new Set(["BigUint","BigSint"]),l=new Set(["google.protobuf.Timestamp","Timestamp"]),e=new Set(["google.protobuf.Any","Any"]);function t(y){const $=g.getMessageType(y);if(!$||!$.fields)throw new Error(`canonical-cbor: unknown message type "${y}"`);return $.fields}function r(y){return Object.prototype.hasOwnProperty.call(g.enums,y)}function n(y){let $=0;for(;$<y.length-1&&y[$]===0;)$+=1;return $===0?y:y.slice($)}function A(y,$){if(y==null)return null;if(typeof y=="object"&&y!==null&&"value"in y){const C=y;if(C.value===void 0||C.value===null)return null;const K=(0,E.toUint8Array)(C.value);if(!K||K.length===0)return null;const W=n(K);return W.length===1&&W[0]===0?null:{bytes:W,negative:$==="BigSint"&&C.minus===!0}}if(typeof y=="bigint"){if(y===0n)return null;const C=y<0n,K=(C?-y:y).toString(16),W=K.length%2===0?K:`0${K}`,Z=new Uint8Array(W.length/2);for(let ee=0;ee<Z.length;ee+=1)Z[ee]=Number.parseInt(W.slice(ee*2,ee*2+2),16);return{bytes:Z,negative:C&&$==="BigSint"}}const R=(0,E.toBN)(y);return R.isZero()?null:{bytes:n(new Uint8Array(R.toArray())),negative:R.isNeg()&&$==="BigSint"}}function i(y){if(typeof y=="bigint")return y;if(typeof y=="number"){if(!Number.isInteger(y))throw new Error(`canonical-cbor: non-integer value for integer field: ${y}`);return y}if(typeof y=="string")return y===""?0n:BigInt(y);throw new Error(`canonical-cbor: cannot encode integer value of type ${typeof y}`)}function D(y,$){if(y==null)return!0;if(s.has($))return typeof y=="number"?y===0:typeof y=="bigint"?y===0n:typeof y=="string"?y===""||y==="0":!1;if(p.has($))return y===0;if($==="bool")return y===!1;if($==="string")return y==="";if($==="bytes"){if(typeof y=="string")return y.length===0;const R=(0,E.toUint8Array)(y);return!R||R.length===0}return r($)?y===0||y===""||y===void 0:!1}function k(y){if(y==null||y==="")return"";if(typeof y=="string"){const $=Date.parse(y);if(Number.isNaN($))throw new Error("canonical-cbor: invalid timestamp string (unparseable)");return new Date(Math.trunc($)).toISOString()}if(typeof y=="object"){const{seconds:$=0,nanos:R=0}=y,C=(typeof $=="string"?Number.parseInt($,10):$)*1e3+Math.trunc((R||0)/1e6);return new Date(C).toISOString()}throw new Error(`canonical-cbor: unsupported timestamp input type ${typeof y}`)}function B(y){const $=y.typeUrl||y.type_url||g.toTypeUrl(y.type);if(!$)throw new Error("canonical-cbor: Any value missing typeUrl/type");const R=g.fromTypeUrl($),C=!y.typeUrl&&!y.type_url&&typeof y.type=="string";return{typeUrl:$,type:R,inner:C?y.value:y,wasUnwrapped:C}}function v(y){if(y==null)return y;if(y instanceof Date)return y.toISOString();if(y instanceof Uint8Array)return y;if(Array.isArray(y))return y.map(v);if(typeof y=="object"){const $={};for(const[R,C]of Object.entries(y))C!==void 0&&($[R]=v(C));return $}return y}function m(y){const{typeUrl:$,type:R,inner:C,wasUnwrapped:K}=B(y),W=new Map;if(W.set(0,$),$==="json"||$==="vc"||$==="fg:x:address"){const ee=K?C:y.value??C;return W.set(1,v(ee)),W}let Z={};if(C&&typeof C=="object"&&(Z={...C},!K&&(delete Z.typeUrl,delete Z.type_url,typeof Z.type=="string"))){let ee;try{ee=t(R)}catch{ee=null}(!ee||!("type"in ee))&&delete Z.type}try{const ee=T(R,Z);for(const[ae,_]of ee.entries())W.set(ae,_)}catch(ee){if(ee instanceof Error&&ee.message.startsWith("canonical-cbor: unknown message type")&&"value"in y)return W.set(1,y.value),W;throw ee}return W}function O(y,$){const R=$.type;if($.keyType!==void 0)throw new Error(`canonical-cbor: map<${$.keyType},${R}> fields are not supported yet`);if($.rule==="repeated"){if(!Array.isArray(y))throw new Error(`canonical-cbor: repeated field expects array, got ${typeof y}`);const C={id:$.id,type:R};return y.map(K=>O(K,C))}if(a.has(R)){const C=A(y,R);return C?new c.Tagged(C.negative?S:I,C.bytes):void 0}if(l.has(R))return k(y);if(e.has(R))return y==null?void 0:m(y);if(r(R)){if(typeof y=="string"){const C=g.enums[R]?.[y];if(C===void 0)throw new Error(`canonical-cbor: unknown enum value "${y}" for ${R}`);return Number(C)}return Number(y)}if(s.has(R))return i(y);if(p.has(R))return Number(y);if(R==="bool")return!!y;if(R==="string")return String(y);if(R==="bytes")return y instanceof Uint8Array?y:(0,E.toUint8Array)(y)??new Uint8Array;if(typeof y!="object"||y===null)throw new Error(`canonical-cbor: expected object for nested ${R}, got ${typeof y}`);return T(R,y)}function T(y,$){if(a.has(y)){const K=A($,y),W=new Map;if(!K)return W;const Z=K.negative?S:I;return W.set(1,new c.Tagged(Z,K.bytes)),y==="BigSint"&&K.negative&&W.set(2,!0),W}const R=t(y),C=new Map;for(const[K,W]of Object.entries(R)){const Z=W.rule==="repeated"?`${K}List`:W.keyType?`${K}Map`:null,ee=K in $,ae=Z!==null&&Z in $;if(!ee&&!ae)continue;const _=ee?$[K]:$[Z];if(_===void 0)continue;if(W.rule==="repeated"){if(_===null)continue;if(!Array.isArray(_))throw new Error(`canonical-cbor: repeated field "${K}" expects array, got ${typeof _}`);if(_.length===0)continue;C.set(W.id,O(_,W));continue}if(D(_,W.type))continue;const M=O(_,W);M!==void 0&&C.set(W.id,M)}return C}function f(y,$){if(!$||typeof $!="object")throw new Error("canonical-cbor: data must be an object");return d.encode(new c.Tagged(b,T(y,$)),d.rfc8949EncodeOptions)}function J(y){const $=t(y),R=new Map;for(const[C,K]of Object.entries($))R.set(K.id,{name:C,field:K});return{idToName:R}}function h(y){if(y instanceof Map){const $={};for(const[R,C]of y.entries())$[String(R)]=h(C);return $}return Array.isArray(y)?y.map(h):y}function H(y){const $=y.get(0);if(!$||typeof $!="string")throw new Error("canonical-cbor: Any payload missing typeUrl at key 0");if($==="json"||$==="vc"||$==="fg:x:address")return{typeUrl:$,value:h(y.get(1))};const R=g.fromTypeUrl($);let C;try{C=t(R)}catch{C=null}if(!C)return{typeUrl:$,value:y.get(1)};const K={typeUrl:$};for(const[W,Z]of y.entries()){if(W===0)continue;const ee=Object.entries(C).find(([,M])=>M.id===W);if(!ee)continue;const[ae,_]=ee;K[ae]=G(Z,_)}return K}function G(y,$){const R=$.type;if($.rule==="repeated"){if(!Array.isArray(y))return y;const C={id:$.id,type:R};return y.map(K=>G(K,C))}if(a.has(R)){if(y instanceof c.Tagged){if(y.tag!==I&&y.tag!==S)throw new Error(`canonical-cbor: BigInt wrapper expects tag 2/3, got ${y.tag}`);const C=y.value,K=y.tag===S,W={value:C};return R==="BigSint"&&(W.minus=K),W}return y}if(l.has(R)){if(typeof y!="string")throw new Error("canonical-cbor: Timestamp expected string");return y}if(e.has(R)){if(!(y instanceof Map))throw new Error("canonical-cbor: Any expected nested map");return H(y)}return r(R)?typeof y=="bigint"?Number(y):y:s.has(R)?y:p.has(R)?Number(y):R==="bool"?!!y:R==="string"?String(y):R==="bytes"?y:y instanceof Map?x(R,y):y}function x(y,$){const R=J(y),C={};for(const[K,W]of $.entries()){const Z=R.idToName.get(K);if(!Z)continue;const ee=G(W,Z.field);C[Z.name]=ee,Z.field.rule==="repeated"?C[`${Z.name}List`]=ee:Z.field.keyType!==void 0&&(C[`${Z.name}Map`]=ee)}return C}function U(y,$){if(!$||!($ instanceof Uint8Array))throw new Error("canonical-cbor: input must be Uint8Array");if($.length<3||$[0]!==o[0]||$[1]!==o[1]||$[2]!==o[2])throw new Error("canonical-cbor: missing self-describe tag 55799 prefix");const R=u.decode($,{tags:{...c.Tagged.preserve(I,S),[b]:C=>C()},useMaps:!0});if(!(R instanceof Map))throw new Error("canonical-cbor: payload is not a CBOR map");return x(y,R)}const L=o;return Pe.CANONICAL_SELF_DESCRIBE_PREFIX=L,Pe.canonicalBytes=f,Pe.parseCanonical=U,Pe}var rr={},nr;function hn(){if(nr)return rr;nr=1;const d=Gr(),u=Mr();let c=Ft();return c=d.__toESM(c),u.addProvider(c.default),rr}var ir;function Lr(){if(ir)return Re;ir=1;const d=Hn();hn();function u(g){return d.canonicalBytes("Transaction",g)}function c(g){return d.parseCanonical("Transaction",g)}return Re.CANONICAL_SELF_DESCRIBE_PREFIX=d.CANONICAL_SELF_DESCRIBE_PREFIX,Re.canonicalBytes=d.canonicalBytes,Re.decodeTx=c,Re.encodeTx=u,Re.parseCanonical=d.parseCanonical,Re}var dt={},sr;function Dn(){if(sr)return dt;sr=1;const d=18;return dt.DEFAULT_TOKEN_DECIMAL=d,dt}var Ye={},ut={},or;function Vr(){if(or)return ut;or=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return ut.__toESM=S,ut}var Ve={},ze={},ar;function mn(){if(ar)return ze;ar=1;const d=Vr();let u=nn();u=d.__toESM(u);const c=E=>["ctx","data","input"].includes(E.split(".").shift()??""),g=(E,b)=>{const I=(0,u.default)(E,{safe:!0}),S=Object.keys(I).map(o=>o.split(".")).filter(o=>o.includes(b)).map(o=>o.slice(0,o.lastIndexOf(b)+1)).sort((o,s)=>s.length-o.length).map(o=>o.join("."));return Array.from(new Set(S))};return ze.findPrerenderKeys=g,ze.isValidNotation=c,ze}var fe={},ct={},dr;function Fn(){if(dr)return ct;dr=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return ct.__toESM=S,ct}var pt={},ur;function Tn(){return ur||(ur=1,(function(d){var u="@arcblock/vc";Object.defineProperty(d,"name",{enumerable:!0,get:function(){return u}})})(pt)),pt}var ge={},$t={},cr;function Jn(){if(cr)return $t;cr=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return $t.__toESM=S,$t}var $e={},lt={},pr;function Sn(){if(pr)return lt;pr=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return lt.__toESM=S,lt}var At,$r;function Wr(){return $r||($r=1,At=function(d,u){u||(u={}),typeof u=="function"&&(u={cmp:u});var c=typeof u.cycles=="boolean"?u.cycles:!1,g=u.cmp&&(function(b){return function(I){return function(S,o){var s={key:S,value:I[S]},p={key:o,value:I[o]};return b(s,p)}}})(u.cmp),E=[];return(function b(I){if(I&&I.toJSON&&typeof I.toJSON=="function"&&(I=I.toJSON()),I!==void 0){if(typeof I=="number")return isFinite(I)?""+I:"null";if(typeof I!="object")return JSON.stringify(I);var S,o;if(Array.isArray(I)){for(o="[",S=0;S<I.length;S++)S&&(o+=","),o+=b(I[S])||"null";return o+"]"}if(I===null)return"null";if(E.indexOf(I)!==-1){if(c)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=E.push(I)-1,p=Object.keys(I).sort(g&&g(I));for(o="",S=0;S<p.length;S++){var a=p[S],l=b(I[a]);l&&(o&&(o+=","),o+=JSON.stringify(a)+":"+l)}return E.splice(s,1),"{"+o+"}"}})(d)}),At}var lr;function bn(){if(lr)return $e;lr=1;const d=Sn();let u=we(),c=ke(),g=xe(),E=rt();E=d.__toESM(E);let b=Wr();b=d.__toESM(b);const I=(0,E.default)("@arcblock/jwt"),S="1.1.0",o=c.Hasher.SHA3.hash256;function s(T){const f=T.match(/(\d+\.\d+\.\d+)/);return f?f[1]:null}function p(T,f){const J=T.split(".").map(Number),h=f.split(".").map(Number);for(let H=0;H<3;H++){if((J[H]||0)>(h[H]||0))return!0;if((J[H]||0)<(h[H]||0))return!1}return!0}async function a(T,f,J={},h=!0,H="1.0.0"){if((0,u.isValid)(T)===!1)throw new Error("Cannot do sign with invalid signer");const G=(0,u.toTypeInfo)(T),x={[c.types.KeyType.SECP256K1]:{alg:"ES256K",type:"JWT"},[c.types.KeyType.ED25519]:{alg:"Ed25519",type:"JWT"},[c.types.KeyType.ETHEREUM]:{alg:"Ethereum",type:"JWT"},[c.types.KeyType.PASSKEY]:{alg:"Passkey",type:"JWT"}};if(G.pk===void 0)throw new Error("Cannot determine key type from signer");const U=x[G.pk],L=(0,g.toBase64)((0,b.default)(U)),y=(0,u.extractMethod)(T)||"abt",$=Math.floor(Date.now()/1e3),R={iss:(0,u.toDid)(T,y),iat:String($),nbf:String($),exp:String($+300),version:H,...J||{}};Object.keys(R).forEach(ee=>{(typeof R[ee]>"u"||R[ee]==null||R[ee]==="")&&delete R[ee]});const C=(0,g.toBase64)((0,b.default)(R));I("sign.body",R);const K=(0,g.toHex)(`${L}.${C}`),W=s(H),Z=W&&p(W,S)?o(K):K;return h?[L,C,(0,g.toBase64)((0,c.getSigner)(G.pk).sign(Z,f))].join("."):`${L}.${C}`}async function l(T,f,J={}){return a(T,f,J,!!f,"1.1.0")}function e(T){if(!T)throw new Error("Cannot compute challenge from empty token");const f=T.split(".");return o((0,g.toHex)(`${f[0]}.${f[1]}`))}function t(T,f){if(!T)throw new Error("Cannot assemble JWT from empty token");if(T.split(".").length!==2)throw new Error("Cannot assemble JWT: expected unsigned token with exactly 2 parts (headerB64.bodyB64)");if(!f||!f.authenticatorData||!f.clientDataJSON||!f.signature)throw new Error("Cannot assemble JWT: assertion must contain authenticatorData, clientDataJSON, and signature");return`${T}.${(0,g.toBase64)(JSON.stringify(f))}`}function r(T,f=!0){const[J,h,H]=T.split("."),G=JSON.parse((0,g.fromBase64)(J).toString()),x=JSON.parse((0,g.fromBase64)(h).toString()),U=Buffer.from(Uint8Array.from((0,g.fromBase64)(H))).toString("hex");return f?x:{header:G,body:x,signature:`0x${(0,u.toStrictHex)(U)}`}}async function n(T,f,J){const{tolerance:h,enforceTimestamp:H,signerKey:G}=Object.assign({tolerance:5,enforceTimestamp:!0,signerKey:"iss"},J);try{const[x,U]=T.split("."),{header:L,body:y,signature:$}=r(T,!1);if(!$)return I("verify.error.emptySig"),!1;if(!L.alg)return I("verify.error.emptyAlg"),!1;const R=y[G];if(!R)return I("verify.error.emptySignerDid"),!1;if((0,u.isFromPublicKey)(R,f)===!1)return I("verify.error.signerDidAndPkNotMatch"),!1;if(H){const W=Math.ceil(Date.now()/1e3),Z=Number(y.exp)||0,ee=Number(y.iat)||0,ae=Number(y.nbf)||0;if(I("verify.enforceTimestamp",{now:W,exp:Z,iat:ee,nbf:ae}),Z&&Z+h<W)return I("verify.error.expired"),!1;if(ee&&ee>W&&ee-W>h)return I("verify.error.issuedAt"),!1;if(ae&&ae>W&&ae-W>h)return I("verify.error.notBefore"),!1}const C=L.alg.toLowerCase();if(C==="passkey"){const[,,W]=T.split("."),Z=JSON.parse((0,g.fromBase64)(W).toString());if(!Z.authenticatorData||!Z.clientDataJSON||!Z.signature)return I("verify.error.incompletePasskeyAssertion"),!1;const ee=o((0,g.toHex)(`${x}.${U}`)),ae=JSON.stringify({authenticatorData:Z.authenticatorData,clientDataJSON:Z.clientDataJSON});return await(0,c.getSigner)(c.types.KeyType.PASSKEY).verify(ee,Z.signature,f,ae)}const K={secp256k1:(0,c.getSigner)(c.types.KeyType.SECP256K1),es256k:(0,c.getSigner)(c.types.KeyType.SECP256K1),ed25519:(0,c.getSigner)(c.types.KeyType.ED25519),ethereum:(0,c.getSigner)(c.types.KeyType.ETHEREUM)};if(K[C]){const W=(0,g.toHex)(`${x}.${U}`),Z=(y.version?s(y.version):null)||"";return Z&&Z===S?K[C].verify(o(W),$,f):K[C].verify(W,$,f)}return I("verify.error.crypto"),!1}catch(x){return I("verify.error.exception"),I(x),!1}}const A="1.1.0",i={[c.types.KeyType.ED25519]:{alg:"Ed25519",typ:"DelegationToken"},[c.types.KeyType.SECP256K1]:{alg:"ES256K",typ:"DelegationToken"},[c.types.KeyType.ETHEREUM]:{alg:"Ethereum",typ:"DelegationToken"},[c.types.KeyType.PASSKEY]:{alg:"Passkey",typ:"DelegationToken"}};async function D(T,f,J){if((0,u.isValid)(T)===!1)throw new Error("Cannot sign DelegationToken with invalid signer");const h=(0,u.toTypeInfo)(T);if(h.pk===void 0)throw new Error("Cannot determine key type from signer");const H=i[h.pk],G=(0,g.toBase64)((0,b.default)(H)),x=(0,u.extractMethod)(T)||"abt",U=Math.floor(Date.now()/1e3),L={iss:(0,u.toDid)(T,x),sub:J.sub,iat:J.iat||String(U),nbf:J.nbf||String(U),exp:J.exp||String(U+300),version:A,ops:J.ops,pk:(0,c.getSigner)(h.pk).getPublicKey(f,"hex")};if(J.deny&&J.deny.length>0){for(const R of J.deny)if(!R.startsWith("fg:"))throw new Error(`Invalid deny pattern "${R}": must start with "fg:"`);L.deny=J.deny}J.delegation&&(L.delegation=J.delegation);const y=(0,g.toBase64)((0,b.default)(L)),$=o((0,g.toHex)(`${G}.${y}`));return[G,y,(0,g.toBase64)((0,c.getSigner)(h.pk).sign($,f))].join(".")}async function k(T,f,J){if((0,u.isValid)(T)===!1)throw new Error("Cannot sign DelegationToken with invalid signer");const h=(0,u.toTypeInfo)(T);if(h.pk===void 0)throw new Error("Cannot determine key type from signer");const H=i[h.pk],G=(0,g.toBase64)((0,b.default)(H)),x=(0,u.extractMethod)(T)||"abt",U=Math.floor(Date.now()/1e3),L=typeof f=="string"?f:(0,g.toHex)(f),y={iss:(0,u.toDid)(T,x),sub:J.sub,iat:J.iat||String(U),nbf:J.nbf||String(U),exp:J.exp||String(U+300),version:A,ops:J.ops,pk:L};if(J.deny&&J.deny.length>0){for(const $ of J.deny)if(!$.startsWith("fg:"))throw new Error(`Invalid deny pattern "${$}": must start with "fg:"`);y.deny=J.deny}return J.delegation&&(y.delegation=J.delegation),`${G}.${(0,g.toBase64)((0,b.default)(y))}`}function B(T,f){if(!T)throw new Error("Cannot assemble DelegationToken from empty token");if(T.split(".").length!==2)throw new Error("Cannot assemble DelegationToken: expected unsigned token with exactly 2 parts (headerB64.bodyB64)");if(!f||!f.authenticatorData||!f.clientDataJSON||!f.signature)throw new Error("Cannot assemble DelegationToken: assertion must contain authenticatorData, clientDataJSON, and signature");return`${T}.${(0,g.toBase64)(JSON.stringify(f))}`}function v(T){const f=T.split(".");if(f.length!==3)throw new Error("Invalid delegation token format: expected 3 parts");const[J,h,H]=f;return{header:JSON.parse((0,g.fromBase64)(J).toString()),body:JSON.parse((0,g.fromBase64)(h).toString()),signature:`0x${(0,u.toStrictHex)(Buffer.from(Uint8Array.from((0,g.fromBase64)(H))).toString("hex"))}`}}async function m(T){try{const[f,J]=T.split("."),{header:h,body:H,signature:G}=v(T);if(h.typ!=="DelegationToken")return I("delegationToken.verify.error.wrongTyp"),!1;if(!G||!h.alg)return I("delegationToken.verify.error.missingSigOrAlg"),!1;if((0,u.isFromPublicKey)(H.iss,H.pk)===!1)return I("delegationToken.verify.error.pkIssMismatch"),!1;const x=Math.floor(Date.now()/1e3),U=Number(H.exp)||0,L=Number(H.nbf)||0,y=Number(H.iat)||0;if(U&&U<x)return I("delegationToken.verify.error.expired"),!1;if(L&&L>x)return I("delegationToken.verify.error.notYetValid"),!1;if(y&&y>x)return I("delegationToken.verify.error.futureIat"),!1;const $=h.alg.toLowerCase();if($==="passkey"){const[,,K]=T.split("."),W=JSON.parse((0,g.fromBase64)(K).toString());if(!W.authenticatorData||!W.clientDataJSON||!W.signature)return I("delegationToken.verify.error.incompletePasskeyAssertion"),!1;const Z=o((0,g.toHex)(`${f}.${J}`)),ee=JSON.stringify({authenticatorData:W.authenticatorData,clientDataJSON:W.clientDataJSON});return await(0,c.getSigner)(c.types.KeyType.PASSKEY).verify(Z,W.signature,H.pk,ee)}const R={ed25519:(0,c.getSigner)(c.types.KeyType.ED25519),es256k:(0,c.getSigner)(c.types.KeyType.SECP256K1),secp256k1:(0,c.getSigner)(c.types.KeyType.SECP256K1),ethereum:(0,c.getSigner)(c.types.KeyType.ETHEREUM)};if(!R[$])return I("delegationToken.verify.error.unknownAlg"),!1;const C=o((0,g.toHex)(`${f}.${J}`));return R[$].verify(C,G,H.pk)}catch(f){return I("delegationToken.verify.error.exception",f),!1}}function O(T,{ops:f,deny:J}){return J&&J.length>0&&(0,g.scopeMatchAny)(T,J)?!1:(0,g.scopeMatchAny)(T,f)}return $e.assemble=t,$e.assembleDelegationToken=B,$e.checkDelegationTokenScope=O,$e.decode=r,$e.decodeDelegationToken=v,$e.getChallenge=e,$e.sign=a,$e.signDelegationToken=D,$e.signDelegationTokenUnsigned=k,$e.signV2=l,$e.verify=n,$e.verifyDelegationToken=m,$e}var Ar;function kn(){if(Ar)return ge;Ar=1;const d=Jn();let u=we(),c=bn();c=d.__toESM(c);let g=ke(),E=xe();const b=u.DidType;function I(e,t="default"){const r=(0,u.DidType)(t),n=(0,g.getSigner)(r.pk),A=(0,g.getHasher)(r.hash);return{type:r,method:e.method&&(0,u.isCryptoMethod)(e.method)?e.method:"abt",secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,u.fromPublicKey)(e.pk,r):e.address,toDid(){return`did:${this.method}:${this.address}`},hash(i,D=1,k="hex"){return A(i,D,k)},async sign(i,D=!0,k="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(D){const B=A(i,1);return n.sign(B,e.sk,k)}return n.sign(i,e.sk,k)},async verify(i,D,k=!0,B){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const v=k?A(i,1):i;return n.verify(v,D,e.pk,B)},ethHash(i){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(i)},async signETH(i,D=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function"||typeof n.ethSign!="function")throw new Error("ethSign is not supported by signer");return D?n.ethSign(n.ethHash(i),(0,E.toHex)(e.sk)):n.ethSign(i,(0,E.toHex)(e.sk))},ethSign(i,D=!0){return this.signETH(i,D)},async ethVerify(i,D,k=!0){if(typeof n.ethHash!="function"||typeof n.ethRecover!="function")throw new Error("ethVerify is not supported by signer");const B=k?n.ethHash(i):i;return n.ethRecover(B,D)===this.address},async signJWT(i={},D=!0,k="1.0.0"){if(!e.sk)throw new Error("Cannot sign JWT without a secretKey");return c.sign(this.toDid(),e.sk,i,D,k)},toAddress(){return e.pk?(0,u.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:u.DidType.toJSON(r),sk:e.sk?(0,E.toHex)(e.sk):"",pk:e.pk?(0,E.toHex)(e.pk):"",address:this.address,method:this.method}}}}function S(e,t="default"){const r=(0,u.DidType)(t);return I({sk:e,pk:(0,g.getSigner)(r.pk).getPublicKey(e)},r)}function o(e,t="default"){return I({pk:e},(0,u.DidType)(t))}function s(e){return I({address:(0,u.toAddress)(e)},(0,u.toTypeInfo)(e))}function p(e="default"){const t=(0,u.DidType)(e),r=(0,g.getSigner)(t.pk).genKeyPair();return I({sk:r.secretKey,pk:r.publicKey},t)}function a(e){const t=u.DidType.fromJSON(e.type);return I({...e,method:e.method},t)}function l(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&typeof e.sign!="function")}return ge.Wallet=I,ge.WalletType=b,ge.fromAddress=s,ge.fromJSON=a,ge.fromPublicKey=o,ge.fromRandom=p,ge.fromSecretKey=S,ge.isValid=l,ge}var yt,yr;function jr(){return yr||(yr=1,yt=d=>{if(typeof d!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof d}\``);return/^[a-zA-Z]:\\/.test(d)?!1:/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(d)}),yt}var fr;function Gn(){if(fr)return fe;fr=1;const d=Fn(),u=Tn();let c=we(),g=ke(),E=xe(),b=kn(),I=rt();I=d.__toESM(I);let S=Wr();S=d.__toESM(S);let o=jr();o=d.__toESM(o);const s=(0,I.default)(u.name),p={[g.types.KeyType.ED25519]:"Ed25519Signature",[g.types.KeyType.SECP256K1]:"Secp256k1Signature",[g.types.KeyType.ETHEREUM]:"EthereumSignature"};async function a({type:i,subject:D,issuer:k,issuanceDate:B,expirationDate:v,tag:m="",endpoint:O="",endpointScope:T="public"}){const f=Array.isArray(i)?[...i]:i?[i]:[];if(f.length===0||f.some(W=>!W))throw new Error("Can not create verifiable credential without empty type");if(f.includes("VerifiableCredential")||f.unshift("VerifiableCredential"),!D)throw new Error("Can not create verifiable credential from empty subject");if(!D.id)throw new Error("Can not create verifiable credential without holder");if(!(0,c.isValid)(D.id))throw new Error("Can not create verifiable credential invalid holder did");if(O&&(0,o.default)(O)===!1)throw new Error("VC Endpoint must be absolute url");if(T&&["public","private"].includes(T)===!1)throw new Error("VC Endpoint scope must be either public or private");const{wallet:J,name:h}=k,H=J.address,G=(0,c.toTypeInfo)(H),x={...G,role:g.types.RoleType.ROLE_VC},U=(0,c.fromPublicKeyHash)(J.hash((0,S.default)(D)),x),L=G.pk;if(!p[L])throw new Error("Unsupported signer type when create verifiable credential");const y=B||new Date().toISOString(),$=(0,E.toBase58)(J.publicKey),R={"@context":["https://www.w3.org/2018/credentials/v1","https://schema.arcblock.io/v0.1/context.jsonld"],id:U,type:f,issuer:{id:H,pk:$,name:h||H},issuanceDate:y,expirationDate:v,credentialSubject:D};m&&(R.tag=m),O&&(R.credentialStatus={id:O,type:"NFTStatusList2021",scope:T||"public"});const C=await J.sign((0,S.default)(R)),K={proof:{type:p[L],created:y,proofPurpose:"assertionMethod",id:crypto.randomUUID(),signer:H,pk:$,jws:(0,E.toBase64)(C)},...R};return s("create",K),await l({vc:K,ownerDid:D.id,trustedIssuers:[H]})?K:null}async function l({vc:i,ownerDid:D,trustedIssuers:k,ignoreExpired:B=!1}){if(!i)throw new Error("Empty verifiable credential object");if(!i.issuer||!i.issuer.id||!i.issuer.pk||!(0,c.isValid)(i.issuer.id))throw new Error("Invalid verifiable credential issuer");if(!i.credentialSubject||!i.credentialSubject.id||!(0,c.isValid)(i.credentialSubject.id))throw new Error("Invalid verifiable credential subject");const v=Array.isArray(i.proof)?i.proof:i.proof?[i.proof]:[];if(v.length===0||v.some(O=>!O||!O.jws))throw new Error("Invalid verifiable credential proof");if(i.issuanceDate===void 0)throw Error("Invalid verifiable credential issue date");if(new Date(i.issuanceDate).getTime()>Date.now())throw Error("Verifiable credential has not take effect");if(!B&&i.expirationDate!==void 0&&new Date(i.expirationDate).getTime()<Date.now())throw Error("Verifiable credential has expired");const m=Array.isArray(k)?k:[k];if(!(0,c.isFromPublicKey)(i.issuer.id,i.issuer.pk))throw new Error("Verifiable credential not issuer pk not match with issuer did");if(D!==i.credentialSubject.id)throw new Error("Verifiable credential not owned by specified owner did");for(const O of v){const T=O.pk||i.issuer.pk,f=O.signer||i.issuer.id;if(!m.includes(f))throw new Error("Proof signer not in trusted issuers");if(O.signer&&O.pk&&!(0,c.isFromPublicKey)(O.signer,O.pk))throw new Error("Proof pk does not match signer");const J=structuredClone(i);delete J.signature;const h=O.previousProof;if(h&&(typeof h=="string"||Array.isArray(h)&&h.length>0)){const G=Array.isArray(h)?h:[h],x=v.filter(U=>U.id&&G.includes(U.id));if(x.length!==G.length)throw new Error("Referenced previous proof not found");J.proof=x}else delete J.proof;const H=(0,S.default)(J);if(await(0,b.fromPublicKey)(T,(0,c.toTypeInfo)(f)).verify(H,(0,E.fromBase64)(O.jws))!==!0)throw Error("Verifiable credential signature not valid")}return!0}async function e({vc:i,wallet:D,mode:k="set"}){if(!i)throw new Error("Cannot counter-sign empty verifiable credential");const B=Array.isArray(i.proof)?i.proof:i.proof?[i.proof]:[];if(B.length===0)throw new Error("Cannot counter-sign verifiable credential without existing proof");const v=D.address,m=(0,c.toTypeInfo)(v).pk;if(!p[m])throw new Error("Unsupported signer type when counter-signing verifiable credential");const O=(0,E.toBase58)(D.publicKey),T=B.map(H=>H.id?H:{...H,id:crypto.randomUUID()}),f=structuredClone(i);delete f.signature;const J={type:p[m],created:new Date().toISOString(),proofPurpose:"assertionMethod",id:crypto.randomUUID(),signer:v,pk:O,jws:""};if(k==="chain"){f.proof=T;const H=T.map(G=>G.id);J.previousProof=H.length===1?H[0]:H}else delete f.proof;const h=(0,S.default)(f);return J.jws=(0,E.toBase64)(await D.sign(h)),{...i,proof:[...T,J]}}async function t({presentation:i,trustedIssuers:D,challenge:k,ignoreExpired:B=!1}){if(!i.challenge||k!==i.challenge)throw Error("Invalid challenge included on vc presentation");const v=Array.isArray(i.verifiableCredential)?i.verifiableCredential:[i.verifiableCredential],m=Array.isArray(i.proof)?i.proof:[i.proof],O=structuredClone(i);return delete O.proof,await Promise.all(v.map(async T=>{const f=JSON.parse(T),J=m.find(H=>(0,c.isFromPublicKey)(f.credentialSubject.id,H.pk));if(!J)throw Error(`VC does not have corresponding proof: ${T}`);const h=J.jws;if(await(0,b.fromPublicKey)((0,E.fromBase58)(J.pk),(0,c.toTypeInfo)(f.credentialSubject.id)).verify((0,S.default)(O),(0,E.fromBase64)(h))!==!0)throw Error("Presentation signature invalid");await l({vc:f,ownerDid:f.credentialSubject.id,trustedIssuers:D,ignoreExpired:B})})),!0}async function r({claims:i,issuer:D,issuanceDate:k}){if(!i||!Array.isArray(i))throw new Error("Can not create credential list with empty claim list");if(!D||!D.wallet||!D.name)throw new Error("Can not create credential list with empty issuer name or wallet");if(typeof D.wallet.sign!="function")throw new Error("Can not create credential list with invalid issuer wallet");const{wallet:B,name:v}=D,m=B.address,O=(0,c.toTypeInfo)(m),T={...O,role:g.types.RoleType.ROLE_VC},f=k||new Date().toISOString(),J=O.pk,h=(0,E.toBase58)(B.publicKey);return await Promise.all(i.map(async H=>{const G={claim:H};G.id=(0,c.fromPublicKeyHash)(B.hash((0,S.default)(G.claim)),T),G.issued=f,G.issuer={id:m,pk:h,name:v||m};const x=await B.sign((0,S.default)(G));return G.proof={type:p[J],created:f,proofPurpose:"assertionMethod",id:crypto.randomUUID(),signer:m,pk:h,jws:(0,E.toBase64)(x)},G}))}async function n({credentials:i,trustedIssuers:D}){if(!i||!Array.isArray(i))throw new Error("Can not verify with empty credentials list");return Promise.all(i.map(async k=>{const B=Array.isArray(D)?D:[D],v=B.find(f=>f===k.issuer.id);if(!v)throw new Error("Credential not issued by trusted issuers");if(!(0,c.isFromPublicKey)(v,k.issuer.pk))throw new Error("Credential not issuer pk not match with issuer did");const m=Array.isArray(k.proof)?k.proof:k.proof?[k.proof]:[];if(m.length===0||m.some(f=>!f||!f.jws))throw new Error("Invalid credential proof");const O=structuredClone(k);delete O.proof;const T=(0,S.default)(O);for(const f of m){const J=f.pk||k.issuer.pk,h=f.signer||k.issuer.id;if(!B.includes(h))throw new Error("Proof signer not in trusted issuers");if(f.signer&&f.pk&&!(0,c.isFromPublicKey)(f.signer,f.pk))throw new Error("Proof pk does not match signer");if(await(0,b.fromPublicKey)(J,(0,c.toTypeInfo)(h)).verify(T,(0,E.fromBase64)(f.jws))!==!0)throw Error("Status credential signature not valid")}return k.claim}))}const A=S.default;return fe.counterSign=e,fe.create=a,fe.createCredentialList=r,fe.proofTypes=p,fe.stableStringify=A,fe.verify=l,fe.verifyCredentialList=n,fe.verifyPresentation=t,fe}var tt={exports:{}},_n=tt.exports,gr;function On(){return gr||(gr=1,(function(d,u){(function(c,g){d.exports=g()})(_n,(function(){var c=Object.prototype.toString,g=Array.isArray||function(H){return c.call(H)==="[object Array]"};function E(h){return typeof h=="function"}function b(h){return g(h)?"array":typeof h}function I(h){return h.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function S(h,H){return h!=null&&typeof h=="object"&&H in h}function o(h,H){return h!=null&&typeof h!="object"&&h.hasOwnProperty&&h.hasOwnProperty(H)}var s=RegExp.prototype.test;function p(h,H){return s.call(h,H)}var a=/\S/;function l(h){return!p(a,h)}var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function t(h){return String(h).replace(/[&<>"'`=\/]/g,function(G){return e[G]})}var r=/\s*/,n=/\s+/,A=/\s*=/,i=/\s*\}/,D=/#|\^|\/|>|\{|&|=|!/;function k(h,H){if(!h)return[];var G=!1,x=[],U=[],L=[],y=!1,$=!1,R="",C=0;function K(){if(y&&!$)for(;L.length;)delete U[L.pop()];else L=[];y=!1,$=!1}var W,Z,ee;function ae(Y){if(typeof Y=="string"&&(Y=Y.split(n,2)),!g(Y)||Y.length!==2)throw new Error("Invalid tags: "+Y);W=new RegExp(I(Y[0])+"\\s*"),Z=new RegExp("\\s*"+I(Y[1])),ee=new RegExp("\\s*"+I("}"+Y[1]))}ae(H||f.tags);for(var _=new m(h),M,V,F,N,P,w;!_.eos();){if(M=_.pos,F=_.scanUntil(W),F)for(var q=0,Q=F.length;q<Q;++q)N=F.charAt(q),l(N)?(L.push(U.length),R+=N):($=!0,G=!0,R+=" "),U.push(["text",N,M,M+1]),M+=1,N===`
1
+ import{g as Zr,r as Jt,j as X,B as ue,q as Te,a3 as St,aR as Oe,be as Qr,aQ as Yr,aT as zr,ad as nt,aY as en,a_ as tn,aX as bt,a$ as kt,a2 as Ke,ck as rn}from"./vendor-mui-BXZut9Pz.js";import{cI as xe,cJ as nn,cK as rt,cL as ke,cM as we,V as sn,P as on}from"./vendor-blocklet-DcLR2Cyf.js";import{E as an,X as Gt,a as dn,aX as Ne,aW as un,C as cn}from"./index-BarN7DfU.js";import{I as pn}from"./collapse-CSrlJ0eG.js";import{M as $n}from"./form-CAPjlw7l.js";var et={exports:{}};var ln=et.exports,_t;function An(){return _t||(_t=1,(function(d){(function(u){function c(){}var g=c.prototype,E=u.EventEmitter;function b(o,s){for(var p=o.length;p--;)if(o[p].listener===s)return p;return-1}function I(o){return function(){return this[o].apply(this,arguments)}}g.getListeners=function(s){var p=this._getEvents(),a,l;if(s instanceof RegExp){a={};for(l in p)p.hasOwnProperty(l)&&s.test(l)&&(a[l]=p[l])}else a=p[s]||(p[s]=[]);return a},g.flattenListeners=function(s){var p=[],a;for(a=0;a<s.length;a+=1)p.push(s[a].listener);return p},g.getListenersAsObject=function(s){var p=this.getListeners(s),a;return p instanceof Array&&(a={},a[s]=p),a||p};function S(o){return typeof o=="function"||o instanceof RegExp?!0:o&&typeof o=="object"?S(o.listener):!1}g.addListener=function(s,p){if(!S(p))throw new TypeError("listener must be a function");var a=this.getListenersAsObject(s),l=typeof p=="object",e;for(e in a)a.hasOwnProperty(e)&&b(a[e],p)===-1&&a[e].push(l?p:{listener:p,once:!1});return this},g.on=I("addListener"),g.addOnceListener=function(s,p){return this.addListener(s,{listener:p,once:!0})},g.once=I("addOnceListener"),g.defineEvent=function(s){return this.getListeners(s),this},g.defineEvents=function(s){for(var p=0;p<s.length;p+=1)this.defineEvent(s[p]);return this},g.removeListener=function(s,p){var a=this.getListenersAsObject(s),l,e;for(e in a)a.hasOwnProperty(e)&&(l=b(a[e],p),l!==-1&&a[e].splice(l,1));return this},g.off=I("removeListener"),g.addListeners=function(s,p){return this.manipulateListeners(!1,s,p)},g.removeListeners=function(s,p){return this.manipulateListeners(!0,s,p)},g.manipulateListeners=function(s,p,a){var l,e,t=s?this.removeListener:this.addListener,r=s?this.removeListeners:this.addListeners;if(typeof p=="object"&&!(p instanceof RegExp))for(l in p)p.hasOwnProperty(l)&&(e=p[l])&&(typeof e=="function"?t.call(this,l,e):r.call(this,l,e));else for(l=a.length;l--;)t.call(this,p,a[l]);return this},g.removeEvent=function(s){var p=typeof s,a=this._getEvents(),l;if(p==="string")delete a[s];else if(s instanceof RegExp)for(l in a)a.hasOwnProperty(l)&&s.test(l)&&delete a[l];else delete this._events;return this},g.removeAllListeners=I("removeEvent"),g.emitEvent=function(s,p){var a=this.getListenersAsObject(s),l,e,t,r,n;for(r in a)if(a.hasOwnProperty(r))for(l=a[r].slice(0),t=0;t<l.length;t++)e=l[t],e.once===!0&&this.removeListener(s,e.listener),n=e.listener.apply(this,p||[]),n===this._getOnceReturnValue()&&this.removeListener(s,e.listener);return this},g.trigger=I("emitEvent"),g.emit=function(s){var p=Array.prototype.slice.call(arguments,1);return this.emitEvent(s,p)},g.setOnceReturnValue=function(s){return this._onceReturnValue=s,this},g._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},g._getEvents=function(){return this._events||(this._events={})},c.noConflict=function(){return u.EventEmitter=E,c},d.exports?d.exports=c:u.EventEmitter=c})(typeof window<"u"?window:ln||{})})(et)),et.exports}var it,Ot;function kr(){if(Ot)return it;Ot=1;function d(I){return I==null?"":String(I).replace(/[_-](\w)/g,(S,o)=>o.toUpperCase())}function u(I,S){const o={};if(!I)return o;for(const s of S)Object.prototype.hasOwnProperty.call(I,s)&&(o[s]=I[s]);return o}function c(I,S){const o={};if(!I)return o;const s=new Set(S);for(const p of Object.keys(I))s.has(p)||(o[p]=I[p]);return o}function g(I){return Array.isArray(I)?I:String(I).split(".")}function E(I,S,o){if(I==null)return o;const s=g(S);let p=I;for(const a of s){if(p==null)return o;p=p[a]}return p===void 0?o:p}function b(I,S,o){if(I==null)return I;const s=g(S);let p=I;for(let a=0;a<s.length-1;a++){const l=s[a];(p[l]==null||typeof p[l]!="object")&&(p[l]={}),p=p[l]}return p[s[s.length-1]]=o,I}return it={camelCase:d,pick:u,omit:c,get:E,set:b},it}const yn=JSON.parse('{"ocap":{"nested":{"StatusCode":{"values":{"OK":0,"INVALID_NONCE":1,"INVALID_SIGNATURE":2,"INVALID_SENDER_STATE":3,"INVALID_RECEIVER_STATE":4,"INSUFFICIENT_DATA":5,"INSUFFICIENT_FUND":6,"INVALID_OWNER":7,"INVALID_TX":8,"UNSUPPORTED_TX":9,"EXPIRED_TX":10,"TOO_MANY_TXS":11,"INVALID_LOCK_STATUS":12,"INVALID_REQUEST":13,"INVALID_MONIKER":16,"INVALID_PASSPHRASE":17,"INVALID_MULTISIG":20,"INVALID_WALLET":21,"INVALID_CHAIN_ID":22,"CONSENSUS_RPC_ERROR":24,"STORAGE_RPC_ERROR":25,"NOENT":26,"ACCOUNT_MIGRATED":27,"RPC_CONNECTION_ERROR":28,"UNSUPPORTED_STAKE":30,"INSUFFICIENT_STAKE":31,"INVALID_STAKE_STATE":32,"EXPIRED_WALLET_TOKEN":33,"BANNED_UNSTAKE":34,"INVALID_ASSET":35,"INVALID_TX_SIZE":36,"INVALID_SIGNER_STATE":37,"INVALID_FORGE_STATE":38,"EXPIRED_ASSET":39,"UNTRANSFERRABLE_ASSET":40,"READONLY_ASSET":41,"CONSUMED_ASSET":42,"INVALID_DEPOSIT_VALUE":43,"EXCEED_DEPOSIT_CAP":44,"INVALID_DEPOSIT_TARGET":45,"INVALID_DEPOSITOR":46,"INVALID_WITHDRAWER":47,"INVALID_EXPIRY_DATE":49,"INVALID_CUSTODIAN":51,"INSUFFICIENT_GAS":52,"INVALID_SWAP":53,"INVALID_HASHKEY":54,"INVALID_DELEGATION":55,"INSUFFICIENT_DELEGATION":56,"INVALID_DELEGATION_RULE":57,"INVALID_DELEGATION_TYPE_URL":58,"SENDER_NOT_AUTHORIZED":59,"PROTOCOL_NOT_RUNNING":60,"PROTOCOL_NOT_PAUSED":61,"PROTOCOL_NOT_ACTIVATED":62,"INVALID_DEACTIVATION":63,"SENDER_WITHDRAW_ITEMS_FULL":64,"WITHDRAW_ITEM_MISSING":65,"INVALID_WITHDRAW_TX":66,"INVALID_CHAIN_TYPE":67,"INVALID_TIME":68,"INVALID_SUBSCRIBE":69,"INVALID_DID_TYPE":70,"INVALID_CANDIDATE_STATE":71,"VALIDATOR_NOT_FOUND":72,"VALIDATOR_NOT_CHANGED":73,"INVALID_FACTORY_STATE":74,"INVALID_FACTORY_PROPS":75,"INVALID_FACTORY_INPUT":76,"INVALID_TOKEN":77,"INVALID_ROLLUP":78,"INVALID_BLOCK":79,"FORBIDDEN":403,"INTERNAL":500,"TIMEOUT":504}},"KeyType":{"values":{"ED25519":0,"SECP256K1":1,"ETHEREUM":2}},"HashType":{"values":{"KECCAK":0,"SHA3":1,"SHA2":2,"KECCAK_384":6,"SHA3_384":7,"KECCAK_512":13,"SHA3_512":14}},"EncodingType":{"values":{"BASE16":0,"BASE58":1}},"RoleType":{"values":{"ROLE_ACCOUNT":0,"ROLE_NODE":1,"ROLE_DEVICE":2,"ROLE_APPLICATION":3,"ROLE_SMART_CONTRACT":4,"ROLE_BOT":5,"ROLE_ASSET":6,"ROLE_STAKE":7,"ROLE_VALIDATOR":8,"ROLE_GROUP":9,"ROLE_TX":10,"ROLE_TETHER":11,"ROLE_SWAP":12,"ROLE_DELEGATION":13,"ROLE_VC":14,"ROLE_BLOCKLET":15,"ROLE_STORE":16,"ROLE_TOKEN":17,"ROLE_FACTORY":18,"ROLE_ROLLUP":19,"ROLE_STORAGE":20,"ROLE_ANY":63}},"UpgradeType":{"values":{"CONFIG_APP":0,"CONFIG_FORGE":1,"CONFIG_DFS":2,"CONFIG_CONSENSUS":3,"CONFIG_P2P":4,"EXE_APP":10,"EXE_FORGE":11,"EXE_DFS":12,"EXE_CONSENSUS":13,"EXE_P2P":14}},"UpgradeAction":{"values":{"VERIFY":0,"BACKUP":1,"REPLACE":2,"RESTART_APP":10,"RESTART_DFS":11,"RESTART_CONSENSUS":12,"RESTART_P2P":13,"RESTART_FORGE":14,"ROLLBACK_IF_FAIL":30,"RESTART_ALL_IF_FAIL":31,"CRASH_IF_FAIL":33,"DROP_ADDRESS_BOOK":50}},"StateType":{"values":{"STATE_ACCOUNT":0,"STATE_ASSET":1,"STATE_CHANNEL":2,"STATE_FORGE":3,"STATE_STAKE":4}},"StakeType":{"values":{"STAKE_NODE":0,"STAKE_USER":1,"STAKE_ASSET":2,"STAKE_CHAIN":3}},"ProtocolStatus":{"values":{"RUNNING":0,"PAUSED":1,"TERMINATED":2}},"BigUint":{"fields":{"value":{"type":"bytes","id":1}}},"BigSint":{"fields":{"value":{"type":"bytes","id":1},"minus":{"type":"bool","id":2}}},"TokenSymbol":{"fields":{"address":{"type":"string","id":1},"symbol":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4}}},"TokenInfo":{"fields":{"address":{"type":"string","id":1},"symbol":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4},"name":{"type":"string","id":5},"description":{"type":"string","id":6},"icon":{"type":"string","id":7},"maxTotalSupply":{"type":"string","id":8},"metadata":{"type":"google.protobuf.Any","id":9},"website":{"type":"string","id":10},"spenders":{"rule":"repeated","type":"string","id":11},"minters":{"rule":"repeated","type":"string","id":12},"type":{"type":"string","id":13}}},"WalletType":{"fields":{"pk":{"type":"KeyType","id":1},"hash":{"type":"HashType","id":2},"address":{"type":"EncodingType","id":3},"role":{"type":"RoleType","id":4}}},"WalletInfo":{"fields":{"type":{"type":"WalletType","id":1,"options":{"deprecated":true}},"sk":{"type":"bytes","id":2},"pk":{"type":"bytes","id":3},"address":{"type":"string","id":4}}},"ChainInfo":{"fields":{"id":{"type":"string","id":1},"network":{"type":"string","id":2},"moniker":{"type":"string","id":3},"consensusVersion":{"type":"string","id":4},"synced":{"type":"bool","id":5},"appHash":{"type":"bytes","id":6},"blockHash":{"type":"bytes","id":7},"blockHeight":{"type":"string","id":8},"blockTime":{"type":"google.protobuf.Timestamp","id":9},"address":{"type":"string","id":10},"votingPower":{"type":"string","id":11},"totalTxs":{"type":"string","id":12},"version":{"type":"string","id":13},"forgeAppsVersion":{"keyType":"string","type":"string","id":15},"supportedTxs":{"rule":"repeated","type":"string","id":16}}},"NodeInfo":{"fields":{"id":{"type":"string","id":1},"network":{"type":"string","id":2},"moniker":{"type":"string","id":3},"consensusVersion":{"type":"string","id":4},"synced":{"type":"bool","id":5},"appHash":{"type":"bytes","id":6},"blockHash":{"type":"bytes","id":7},"blockHeight":{"type":"string","id":8},"blockTime":{"type":"google.protobuf.Timestamp","id":9},"address":{"type":"string","id":10},"votingPower":{"type":"string","id":11},"totalTxs":{"type":"string","id":12},"version":{"type":"string","id":13},"forgeAppsVersion":{"keyType":"string","type":"string","id":15},"supportedTxs":{"rule":"repeated","type":"string","id":16},"ip":{"type":"string","id":17},"geoInfo":{"type":"GeoInfo","id":18},"p2pAddress":{"type":"string","id":19}}},"Validator":{"fields":{"address":{"type":"string","id":1},"power":{"type":"string","id":2}}},"ConsensusParams":{"fields":{"maxBytes":{"type":"string","id":1},"maxGas":{"type":"string","id":2},"maxValidators":{"type":"uint32","id":3},"maxCandidates":{"type":"uint32","id":4},"pubKeyTypes":{"rule":"repeated","type":"string","id":5},"validators":{"rule":"repeated","type":"Validator","id":6},"validatorChanged":{"type":"bool","id":7},"paramChanged":{"type":"bool","id":8}}},"UpgradeTask":{"fields":{"type":{"type":"UpgradeType","id":1},"dataHash":{"type":"string","id":2},"actions":{"rule":"repeated","type":"UpgradeAction","id":4}}},"UpgradeTasks":{"fields":{"item":{"rule":"repeated","type":"UpgradeTask","id":1}}},"Multisig":{"fields":{"signer":{"type":"string","id":1},"pk":{"type":"bytes","id":2},"signature":{"type":"bytes","id":3},"delegator":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"Transaction":{"fields":{"from":{"type":"string","id":1},"nonce":{"type":"uint64","id":2},"chainId":{"type":"string","id":3},"pk":{"type":"bytes","id":4},"gas":{"type":"uint32","id":5},"delegator":{"type":"string","id":6},"signature":{"type":"bytes","id":13},"signatures":{"rule":"repeated","type":"Multisig","id":14},"itx":{"type":"google.protobuf.Any","id":15},"receipts":{"rule":"repeated","type":"TransactionReceipt","id":16},"serviceFee":{"type":"string","id":17}}},"TransactionInfo":{"fields":{"tx":{"type":"Transaction","id":1},"height":{"type":"string","id":2},"index":{"type":"uint32","id":3},"hash":{"type":"string","id":4},"tags":{"rule":"repeated","type":"vendor.KVPair","id":5},"code":{"type":"StatusCode","id":6},"time":{"type":"google.protobuf.Timestamp","id":7},"receipts":{"rule":"repeated","type":"TransactionReceipt","id":8},"sender":{"type":"string","id":9},"receiver":{"type":"string","id":10},"tokenSymbols":{"rule":"repeated","type":"TokenSymbol","id":22}}},"TransactionReceipt":{"fields":{"address":{"type":"string","id":1},"changes":{"rule":"repeated","type":"ReceiptChange","id":2}}},"ReceiptChange":{"fields":{"target":{"type":"string","id":1},"action":{"type":"string","id":2},"value":{"type":"string","id":3}}},"TokenInput":{"fields":{"address":{"type":"string","id":1},"value":{"type":"string","id":2}}},"TransactionInput":{"fields":{"owner":{"type":"string","id":1},"tokens":{"rule":"repeated","type":"TokenInput","id":2},"assets":{"rule":"repeated","type":"string","id":3}}},"VariableInput":{"fields":{"name":{"type":"string","id":1},"value":{"type":"string","id":2},"description":{"type":"string","id":3},"required":{"type":"bool","id":4}}},"DelegateConfig":{"fields":{"deltaInterval":{"type":"uint32","id":1},"typeUrls":{"rule":"repeated","type":"string","id":2}}},"VaultConfig":{"fields":{"slashedStake":{"type":"string","id":1},"txFee":{"type":"string","id":2},"txGas":{"rule":"repeated","type":"string","id":3}}},"TxFeeConfig":{"fields":{"typeUrl":{"type":"string","id":1},"fee":{"type":"string","id":2}}},"TxGasConfig":{"fields":{"price":{"type":"uint64","id":1},"createState":{"type":"uint64","id":2},"updateState":{"type":"uint64","id":3},"dataStorage":{"type":"uint64","id":4},"minStake":{"type":"string","id":5},"maxStake":{"type":"string","id":6},"stakeLockPeriod":{"type":"uint64","id":7}}},"TxStakeConfig":{"fields":{"createToken":{"type":"uint64","id":1},"createTokenLockPeriod":{"type":"uint64","id":2}}},"TransactionConfig":{"fields":{"maxAssetSize":{"type":"uint32","id":1},"maxListSize":{"type":"uint32","id":2},"maxMultisig":{"type":"uint32","id":3},"delegate":{"type":"DelegateConfig","id":4},"txFee":{"rule":"repeated","type":"TxFeeConfig","id":5},"txGas":{"type":"TxGasConfig","id":6},"txStake":{"type":"TxStakeConfig","id":7}}},"BlockInfo":{"fields":{"height":{"type":"string","id":1},"numTxs":{"type":"uint32","id":2},"time":{"type":"google.protobuf.Timestamp","id":3},"appHash":{"type":"bytes","id":4},"proposer":{"type":"bytes","id":5},"txs":{"rule":"repeated","type":"TransactionInfo","id":6},"totalTxs":{"type":"string","id":7},"invalidTxs":{"rule":"repeated","type":"TransactionInfo","id":8},"txsHashes":{"rule":"repeated","type":"string","id":9},"invalidTxsHashes":{"rule":"repeated","type":"string","id":10},"consensusHash":{"type":"bytes","id":11},"dataHash":{"type":"bytes","id":12},"evidenceHash":{"type":"bytes","id":13},"lastCommitHash":{"type":"bytes","id":14},"lastResultsHash":{"type":"bytes","id":15},"nextValidatorsHash":{"type":"bytes","id":16},"validatorsHash":{"type":"bytes","id":17},"version":{"type":"vendor.Version","id":18},"lastBlockId":{"type":"vendor.BlockID","id":19}}},"BlockInfoSimple":{"fields":{"height":{"type":"string","id":1},"numTxs":{"type":"uint32","id":2},"time":{"type":"google.protobuf.Timestamp","id":3},"appHash":{"type":"bytes","id":4},"proposer":{"type":"bytes","id":5},"totalTxs":{"type":"string","id":6},"txsHashes":{"rule":"repeated","type":"string","id":7},"invalidTxsHashes":{"rule":"repeated","type":"string","id":8},"consensusHash":{"type":"bytes","id":9},"dataHash":{"type":"bytes","id":10},"evidenceHash":{"type":"bytes","id":11},"lastCommitHash":{"type":"bytes","id":12},"lastResultsHash":{"type":"bytes","id":13},"nextValidatorsHash":{"type":"bytes","id":14},"validatorsHash":{"type":"bytes","id":15},"version":{"type":"vendor.Version","id":16},"lastBlockId":{"type":"vendor.BlockID","id":17}}},"StateContext":{"fields":{"genesisTx":{"type":"string","id":1},"renaissanceTx":{"type":"string","id":2},"genesisTime":{"type":"google.protobuf.Timestamp","id":3},"renaissanceTime":{"type":"google.protobuf.Timestamp","id":4}}},"StakeSummary":{"fields":{"totalStakes":{"type":"BigUint","id":1},"totalUnstakes":{"type":"BigUint","id":2},"context":{"type":"StateContext","id":3}}},"UnconfirmedTxs":{"fields":{"nTxs":{"type":"uint32","id":1},"txs":{"rule":"repeated","type":"Transaction","id":2}}},"NetInfo":{"fields":{"listening":{"type":"bool","id":1},"listeners":{"rule":"repeated","type":"string","id":2},"nPeers":{"type":"uint32","id":3},"peers":{"rule":"repeated","type":"PeerInfo","id":4}}},"GeoInfo":{"fields":{"city":{"type":"string","id":1},"country":{"type":"string","id":2},"latitude":{"type":"float","id":3},"longitude":{"type":"float","id":4}}},"PeerInfo":{"fields":{"id":{"type":"string","id":1},"network":{"type":"string","id":2},"consensusVersion":{"type":"string","id":3},"moniker":{"type":"string","id":4},"ip":{"type":"string","id":5},"geoInfo":{"type":"GeoInfo","id":6}}},"ValidatorsInfo":{"fields":{"blockHeight":{"type":"string","id":1},"validators":{"rule":"repeated","type":"ValidatorInfo","id":2}}},"ValidatorInfo":{"fields":{"address":{"type":"string","id":1},"pubKey":{"type":"vendor.PubKey","id":2},"votingPower":{"type":"string","id":3},"proposerPriority":{"type":"string","id":4},"name":{"type":"string","id":5},"geoInfo":{"type":"GeoInfo","id":6}}},"ForgeToken":{"fields":{"name":{"type":"string","id":1},"symbol":{"type":"string","id":2},"unit":{"type":"string","id":3},"description":{"type":"string","id":4},"icon":{"type":"bytes","id":5},"decimal":{"type":"uint32","id":6},"initialSupply":{"type":"string","id":7},"totalSupply":{"type":"string","id":8},"inflationRate":{"type":"uint32","id":9},"address":{"type":"string","id":10}}},"UpgradeInfo":{"fields":{"height":{"type":"string","id":1},"version":{"type":"string","id":2}}},"WithdrawItem":{"fields":{"hash":{"type":"string","id":1},"value":{"type":"BigUint","id":2}}},"AccountConfig":{"fields":{"address":{"type":"string","id":1},"pk":{"type":"bytes","id":2},"balance":{"type":"BigUint","id":3}}},"Evidence":{"fields":{"hash":{"type":"string","id":1}}},"NFTEndpoint":{"fields":{"id":{"type":"string","id":1},"scope":{"type":"string","id":2}}},"NFTDisplay":{"fields":{"type":{"type":"string","id":1},"content":{"type":"string","id":2}}},"NFTIssuer":{"fields":{"id":{"type":"string","id":1},"pk":{"type":"string","id":2},"name":{"type":"string","id":3}}},"AssetFactoryHook":{"fields":{"name":{"type":"string","id":1},"type":{"type":"string","id":2},"hook":{"type":"string","id":3}}},"IndexedTokenInput":{"fields":{"address":{"type":"string","id":1},"value":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4},"symbol":{"type":"string","id":5}}},"IndexedFactoryInput":{"fields":{"value":{"type":"string","id":1},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4}}},"RollupValidator":{"fields":{"pk":{"type":"string","id":1},"address":{"type":"string","id":2},"endpoint":{"type":"string","id":3}}},"RollupSignature":{"fields":{"signer":{"type":"string","id":1},"signature":{"type":"string","id":2}}},"ForeignToken":{"fields":{"type":{"type":"string","id":1},"contractAddress":{"type":"string","id":2},"chainType":{"type":"string","id":3},"chainName":{"type":"string","id":4},"chainId":{"type":"int32","id":5}}},"RevokedStake":{"fields":{"tokens":{"rule":"repeated","type":"TokenInput","id":1},"assets":{"rule":"repeated","type":"string","id":2}}},"ForgeStats":{"fields":{"numBlocks":{"rule":"repeated","type":"string","id":1},"numTxs":{"rule":"repeated","type":"string","id":2},"numStakes":{"rule":"repeated","type":"BigUint","id":3},"numValidators":{"rule":"repeated","type":"uint32","id":4},"numAccountMigrateTxs":{"rule":"repeated","type":"string","id":5},"numCreateAssetTxs":{"rule":"repeated","type":"string","id":6},"numConsensusUpgradeTxs":{"rule":"repeated","type":"uint32","id":7},"numDeclareTxs":{"rule":"repeated","type":"string","id":8},"numDeclareFileTxs":{"rule":"repeated","type":"string","id":9},"numExchangeTxs":{"rule":"repeated","type":"string","id":10},"numStakeTxs":{"rule":"repeated","type":"string","id":11},"numSysUpgradeTxs":{"rule":"repeated","type":"uint32","id":12},"numTransferTxs":{"rule":"repeated","type":"string","id":13},"numUpdateAssetTxs":{"rule":"repeated","type":"string","id":14},"numConsumeAssetTxs":{"rule":"repeated","type":"string","id":15},"tps":{"rule":"repeated","type":"uint32","id":16},"maxTps":{"type":"uint32","id":17},"avgTps":{"type":"uint32","id":18},"avgBlockTime":{"type":"float","id":19}}},"GasEstimate":{"fields":{"max":{"type":"string","id":1}}},"RateLimit":{"fields":{"interval":{"type":"uint64","id":1},"anchor":{"type":"uint64","id":3}}},"TokenLimit":{"fields":{"address":{"type":"string","id":1},"to":{"rule":"repeated","type":"string","id":2},"txCount":{"type":"uint32","id":3},"txAllowance":{"type":"string","id":4},"totalAllowance":{"type":"string","id":5},"validUntil":{"type":"uint64","id":6},"rate":{"type":"RateLimit","id":7},"txSent":{"type":"uint32","id":8},"spentAllowance":{"type":"string","id":9},"lastTx":{"type":"uint64","id":10},"decimal":{"type":"uint32","id":11},"symbol":{"type":"string","id":12}}},"AssetLimit":{"fields":{"address":{"rule":"repeated","type":"string","id":1},"to":{"rule":"repeated","type":"string","id":2},"txCount":{"type":"uint32","id":3},"validUntil":{"type":"uint64","id":4},"rate":{"type":"RateLimit","id":5},"txSent":{"type":"uint32","id":6},"lastTx":{"type":"uint64","id":7}}},"DelegateLimit":{"fields":{"tokens":{"rule":"repeated","type":"TokenLimit","id":1},"assets":{"rule":"repeated","type":"AssetLimit","id":2}}},"CurveConfig":{"fields":{"type":{"type":"string","id":1},"basePrice":{"type":"string","id":2},"slope":{"type":"string","id":3},"fixedPrice":{"type":"string","id":4},"constant":{"type":"uint32","id":5}}},"AccountState":{"fields":{"balance":{"type":"BigUint","id":1},"nonce":{"type":"string","id":2},"numTxs":{"type":"string","id":3},"address":{"type":"string","id":4},"pk":{"type":"bytes","id":5},"type":{"type":"WalletType","id":6,"options":{"deprecated":true}},"moniker":{"type":"string","id":7},"context":{"type":"StateContext","id":8},"issuer":{"type":"string","id":9},"gasBalance":{"type":"BigUint","id":10},"migratedTo":{"rule":"repeated","type":"string","id":13},"migratedFrom":{"rule":"repeated","type":"string","id":14},"numAssets":{"type":"string","id":15,"options":{"deprecated":true}},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":21},"data":{"type":"google.protobuf.Any","id":50}}},"AssetState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"moniker":{"type":"string","id":3},"readonly":{"type":"bool","id":4},"transferrable":{"type":"bool","id":5},"ttl":{"type":"uint32","id":6},"consumedTime":{"type":"google.protobuf.Timestamp","id":7},"issuer":{"type":"string","id":8},"parent":{"type":"string","id":9},"endpoint":{"type":"NFTEndpoint","id":10},"display":{"type":"NFTDisplay","id":11},"tags":{"rule":"repeated","type":"string","id":12},"context":{"type":"StateContext","id":14},"data":{"type":"google.protobuf.Any","id":50}}},"ForgeState":{"fields":{"address":{"type":"string","id":1},"consensus":{"type":"ConsensusParams","id":2},"tasks":{"keyType":"uint64","type":"UpgradeTasks","id":3},"version":{"type":"string","id":4},"token":{"type":"ForgeToken","id":5},"txConfig":{"type":"TransactionConfig","id":6},"upgradeInfo":{"type":"UpgradeInfo","id":7},"accountConfig":{"rule":"repeated","type":"AccountConfig","id":8},"vaults":{"type":"VaultConfig","id":9},"reservedSymbols":{"rule":"repeated","type":"string","id":10},"data":{"type":"google.protobuf.Any","id":2047}}},"RootState":{"fields":{"address":{"type":"string","id":1},"account":{"type":"bytes","id":2},"asset":{"type":"bytes","id":3},"receipt":{"type":"bytes","id":4},"protocol":{"type":"bytes","id":5},"governance":{"type":"bytes","id":6},"custom":{"type":"bytes","id":7}}},"DelegateOpState":{"fields":{"rule":{"type":"string","id":1,"options":{"deprecated":true}},"numTxs":{"type":"uint64","id":2,"options":{"deprecated":true}},"numTxsDelta":{"type":"uint64","id":3,"options":{"deprecated":true}},"balance":{"type":"BigUint","id":4,"options":{"deprecated":true}},"balanceDelta":{"type":"BigUint","id":5,"options":{"deprecated":true}},"limit":{"type":"DelegateLimit","id":6}}},"DelegateState":{"fields":{"address":{"type":"string","id":1},"ops":{"keyType":"string","type":"DelegateOpState","id":2},"from":{"type":"string","id":3},"to":{"type":"string","id":4},"deny":{"rule":"repeated","type":"string","id":5},"validUntil":{"type":"uint64","id":6},"context":{"type":"StateContext","id":14},"data":{"type":"google.protobuf.Any","id":15}}},"TokenState":{"fields":{"address":{"type":"string","id":1},"issuer":{"type":"string","id":2},"name":{"type":"string","id":3},"description":{"type":"string","id":4},"symbol":{"type":"string","id":5},"unit":{"type":"string","id":6},"decimal":{"type":"uint32","id":7},"icon":{"type":"string","id":8},"totalSupply":{"type":"string","id":9},"foreignToken":{"type":"ForeignToken","id":10},"tokenFactoryAddress":{"type":"string","id":11},"initialSupply":{"type":"string","id":12},"maxTotalSupply":{"type":"string","id":13},"metadata":{"type":"google.protobuf.Any","id":14},"context":{"type":"StateContext","id":15},"website":{"type":"string","id":16},"spenders":{"rule":"repeated","type":"string","id":17},"minters":{"rule":"repeated","type":"string","id":18},"type":{"type":"string","id":19},"data":{"type":"google.protobuf.Any","id":20}}},"AssetFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"name":{"type":"string","id":3},"description":{"type":"string","id":4},"settlement":{"type":"string","id":5},"limit":{"type":"uint32","id":6},"trustedIssuers":{"rule":"repeated","type":"string","id":7},"input":{"type":"IndexedFactoryInput","id":8},"output":{"type":"CreateAssetTx","id":9},"hooks":{"rule":"repeated","type":"AssetFactoryHook","id":10},"data":{"type":"google.protobuf.Any","id":11},"context":{"type":"StateContext","id":12},"balance":{"type":"BigUint","id":13},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":14},"numMinted":{"type":"uint32","id":15},"display":{"type":"NFTDisplay","id":16},"lastSettlement":{"type":"google.protobuf.Timestamp","id":17}}},"StakeState":{"fields":{"address":{"type":"string","id":1},"sender":{"type":"string","id":2},"receiver":{"type":"string","id":3},"tokens":{"rule":"repeated","type":"IndexedTokenInput","id":4},"assets":{"rule":"repeated","type":"string","id":5},"revocable":{"type":"bool","id":6},"message":{"type":"string","id":7},"revokeWaitingPeriod":{"type":"uint32","id":8},"revokedTokens":{"rule":"repeated","type":"IndexedTokenInput","id":9},"revokedAssets":{"rule":"repeated","type":"string","id":10},"slashers":{"rule":"repeated","type":"string","id":11},"nonce":{"type":"string","id":12},"context":{"type":"StateContext","id":30},"data":{"type":"google.protobuf.Any","id":50}}},"RollupState":{"fields":{"address":{"type":"string","id":1},"tokenAddress":{"type":"string","id":2},"vaultAddress":{"type":"string","id":3},"contractAddress":{"type":"string","id":4},"seedValidators":{"rule":"repeated","type":"RollupValidator","id":5},"validators":{"rule":"repeated","type":"RollupValidator","id":6},"minStakeAmount":{"type":"string","id":7},"maxStakeAmount":{"type":"string","id":8},"minSignerCount":{"type":"uint32","id":9},"maxSignerCount":{"type":"uint32","id":10},"minBlockSize":{"type":"uint32","id":11},"maxBlockSize":{"type":"uint32","id":12},"minBlockInterval":{"type":"uint32","id":13},"minBlockConfirmation":{"type":"uint32","id":14},"issuer":{"type":"string","id":17},"depositFeeRate":{"type":"uint32","id":18},"withdrawFeeRate":{"type":"uint32","id":19},"proposerFeeShare":{"type":"uint32","id":20},"publisherFeeShare":{"type":"uint32","id":21},"minDepositAmount":{"type":"string","id":22},"minWithdrawAmount":{"type":"string","id":23},"blockHeight":{"type":"uint64","id":24},"blockHash":{"type":"string","id":25},"tokenInfo":{"type":"IndexedTokenInput","id":26},"totalDepositAmount":{"type":"string","id":27},"totalWithdrawAmount":{"type":"string","id":28},"maxDepositAmount":{"type":"string","id":29},"maxWithdrawAmount":{"type":"string","id":30},"minDepositFee":{"type":"string","id":31},"maxDepositFee":{"type":"string","id":32},"minWithdrawFee":{"type":"string","id":33},"maxWithdrawFee":{"type":"string","id":34},"paused":{"type":"bool","id":35},"foreignToken":{"type":"ForeignToken","id":36},"leaveWaitingPeriod":{"type":"uint32","id":37},"publishWaitingPeriod":{"type":"uint32","id":38},"publishSlashRate":{"type":"uint32","id":39},"migrateHistory":{"rule":"repeated","type":"string","id":40},"closed":{"type":"bool","id":41},"vaultHistory":{"rule":"repeated","type":"string","id":42},"context":{"type":"StateContext","id":43},"data":{"type":"google.protobuf.Any","id":50}}},"RollupBlock":{"fields":{"hash":{"type":"string","id":1},"height":{"type":"uint64","id":2},"merkleRoot":{"type":"string","id":3},"previousHash":{"type":"string","id":4},"txsHash":{"type":"string","id":5},"txs":{"rule":"repeated","type":"string","id":6},"proposer":{"type":"string","id":7},"signatures":{"rule":"repeated","type":"Multisig","id":8},"rollup":{"type":"string","id":10},"mintedAmount":{"type":"string","id":11},"burnedAmount":{"type":"string","id":12},"rewardAmount":{"type":"string","id":13},"minReward":{"type":"string","id":14},"governance":{"type":"bool","id":15},"context":{"type":"StateContext","id":30},"data":{"type":"google.protobuf.Any","id":50}}},"EvidenceState":{"fields":{"hash":{"type":"string","id":1},"data":{"type":"string","id":2},"context":{"type":"StateContext","id":30}}},"TokenFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"tokenAddress":{"type":"string","id":3},"reserveAddress":{"type":"string","id":4},"curve":{"type":"CurveConfig","id":5},"currentSupply":{"type":"string","id":6},"reserveBalance":{"type":"string","id":7},"feeRate":{"type":"int32","id":8},"status":{"type":"string","id":9},"token":{"type":"TokenState","id":10},"reserveToken":{"type":"TokenState","id":11},"context":{"type":"StateContext","id":30},"data":{"type":"google.protobuf.Any","id":50}}},"AccountMigrateTx":{"fields":{"pk":{"type":"bytes","id":1},"type":{"type":"WalletType","id":2,"options":{"deprecated":true}},"address":{"type":"string","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"DeclareTx":{"fields":{"moniker":{"type":"string","id":1},"issuer":{"type":"string","id":2},"data":{"type":"google.protobuf.Any","id":15}}},"DelegateOp":{"fields":{"typeUrl":{"type":"string","id":1},"rules":{"rule":"repeated","type":"string","id":2,"options":{"deprecated":true}},"limit":{"type":"DelegateLimit","id":3}}},"DelegateTx":{"fields":{"address":{"type":"string","id":1},"to":{"type":"string","id":2},"ops":{"rule":"repeated","type":"DelegateOp","id":3},"deny":{"rule":"repeated","type":"string","id":4},"validUntil":{"type":"uint64","id":5},"data":{"type":"google.protobuf.Any","id":15}}},"RevokeDelegateTx":{"fields":{"address":{"type":"string","id":1},"to":{"type":"string","id":2},"typeUrls":{"rule":"repeated","type":"string","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"UpgradeNodeTx":{"fields":{"height":{"type":"uint64","id":1},"version":{"type":"string","id":2},"override":{"type":"bool","id":3}}},"ExchangeInfo":{"fields":{"value":{"type":"BigUint","id":1},"assets":{"rule":"repeated","type":"string","id":2}}},"ExchangeInfoV2":{"fields":{"value":{"type":"BigUint","id":1},"assets":{"rule":"repeated","type":"string","id":2},"tokens":{"rule":"repeated","type":"TokenInput","id":3}}},"ExchangeTx":{"fields":{"to":{"type":"string","id":1},"sender":{"type":"ExchangeInfo","id":2},"receiver":{"type":"ExchangeInfo","id":3},"expiredAt":{"type":"google.protobuf.Timestamp","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"ExchangeV2Tx":{"fields":{"to":{"type":"string","id":1},"sender":{"type":"ExchangeInfoV2","id":2},"receiver":{"type":"ExchangeInfoV2","id":3},"expiredAt":{"type":"google.protobuf.Timestamp","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"TransferTx":{"fields":{"to":{"type":"string","id":1},"value":{"type":"BigUint","id":2},"assets":{"rule":"repeated","type":"string","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"TransferV2Tx":{"fields":{"to":{"type":"string","id":1},"value":{"type":"BigUint","id":2},"assets":{"rule":"repeated","type":"string","id":3},"tokens":{"rule":"repeated","type":"TokenInput","id":4},"data":{"type":"google.protobuf.Any","id":15}}},"TransferV3Tx":{"fields":{"inputs":{"rule":"repeated","type":"TransactionInput","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"data":{"type":"google.protobuf.Any","id":15}}},"CreateTokenTx":{"fields":{"name":{"type":"string","id":1},"description":{"type":"string","id":2},"symbol":{"type":"string","id":3},"unit":{"type":"string","id":4},"decimal":{"type":"int32","id":5},"icon":{"type":"string","id":6},"totalSupply":{"type":"string","id":7},"address":{"type":"string","id":8},"initialSupply":{"type":"string","id":9},"maxTotalSupply":{"type":"string","id":10},"foreignToken":{"type":"ForeignToken","id":16},"spenders":{"rule":"repeated","type":"string","id":17},"data":{"type":"google.protobuf.Any","id":20}}},"AssetFactoryInput":{"fields":{"value":{"type":"string","id":1},"tokens":{"rule":"repeated","type":"TokenInput","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4}}},"AcquireAssetV2Tx":{"fields":{"factory":{"type":"string","id":1},"address":{"type":"string","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4},"issuer":{"type":"NFTIssuer","id":5},"data":{"type":"google.protobuf.Any","id":15}}},"AcquireAssetV3Tx":{"fields":{"factory":{"type":"string","id":1},"address":{"type":"string","id":2},"inputs":{"rule":"repeated","type":"TransactionInput","id":3},"owner":{"type":"string","id":4},"variables":{"rule":"repeated","type":"VariableInput","id":5},"issuer":{"type":"NFTIssuer","id":6},"data":{"type":"google.protobuf.Any","id":15}}},"MintAssetTx":{"fields":{"factory":{"type":"string","id":1},"address":{"type":"string","id":2},"assets":{"rule":"repeated","type":"string","id":3},"variables":{"rule":"repeated","type":"VariableInput","id":4},"owner":{"type":"string","id":5},"data":{"type":"google.protobuf.Any","id":15}}},"CreateAssetTx":{"fields":{"moniker":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":2},"readonly":{"type":"bool","id":3},"transferrable":{"type":"bool","id":4},"ttl":{"type":"uint32","id":5},"parent":{"type":"string","id":6},"address":{"type":"string","id":7},"issuer":{"type":"string","id":8},"endpoint":{"type":"NFTEndpoint","id":9},"display":{"type":"NFTDisplay","id":10},"tags":{"rule":"repeated","type":"string","id":11}}},"UpdateAssetTx":{"fields":{"address":{"type":"string","id":1},"moniker":{"type":"string","id":2},"consumed":{"type":"bool","id":3},"data":{"type":"google.protobuf.Any","id":15}}},"ConsumeAssetTx":{"fields":{"address":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":15}}},"CreateFactoryTx":{"fields":{"name":{"type":"string","id":1},"description":{"type":"string","id":2},"settlement":{"type":"string","id":3},"limit":{"type":"uint32","id":4},"trustedIssuers":{"rule":"repeated","type":"string","id":5},"input":{"type":"AssetFactoryInput","id":6},"output":{"type":"CreateAssetTx","id":7},"hooks":{"rule":"repeated","type":"AssetFactoryHook","id":8},"address":{"type":"string","id":9},"display":{"type":"NFTDisplay","id":10},"data":{"type":"google.protobuf.Any","id":15}}},"StakeTx":{"fields":{"address":{"type":"string","id":1},"receiver":{"type":"string","id":2},"inputs":{"rule":"repeated","type":"TransactionInput","id":3},"locked":{"type":"bool","id":4},"message":{"type":"string","id":5},"revokeWaitingPeriod":{"type":"uint32","id":6},"slashers":{"rule":"repeated","type":"string","id":7},"nonce":{"type":"string","id":8},"data":{"type":"google.protobuf.Any","id":50}}},"RevokeStakeTx":{"fields":{"address":{"type":"string","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"data":{"type":"google.protobuf.Any","id":50}}},"ClaimStakeTx":{"fields":{"address":{"type":"string","id":1},"evidence":{"type":"Evidence","id":2},"data":{"type":"google.protobuf.Any","id":50}}},"SlashStakeTx":{"fields":{"address":{"type":"string","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"message":{"type":"string","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"ReturnStakeTx":{"fields":{"address":{"type":"string","id":1},"outputs":{"rule":"repeated","type":"TransactionInput","id":2},"message":{"type":"string","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"CreateRollupTx":{"fields":{"address":{"type":"string","id":1},"tokenAddress":{"type":"string","id":2},"vaultAddress":{"type":"string","id":3},"contractAddress":{"type":"string","id":4},"seedValidators":{"rule":"repeated","type":"RollupValidator","id":5},"minStakeAmount":{"type":"string","id":6},"maxStakeAmount":{"type":"string","id":7},"minSignerCount":{"type":"uint32","id":8},"maxSignerCount":{"type":"uint32","id":9},"minBlockSize":{"type":"uint32","id":10},"maxBlockSize":{"type":"uint32","id":11},"minBlockInterval":{"type":"uint32","id":12},"minBlockConfirmation":{"type":"uint32","id":13},"foreignChainType":{"type":"string","id":14},"foreignChainId":{"type":"string","id":15},"depositFeeRate":{"type":"uint32","id":16},"withdrawFeeRate":{"type":"uint32","id":17},"proposerFeeShare":{"type":"uint32","id":18},"minDepositAmount":{"type":"string","id":19},"minWithdrawAmount":{"type":"string","id":20},"maxDepositAmount":{"type":"string","id":21},"maxWithdrawAmount":{"type":"string","id":22},"minDepositFee":{"type":"string","id":23},"maxDepositFee":{"type":"string","id":24},"minWithdrawFee":{"type":"string","id":25},"maxWithdrawFee":{"type":"string","id":26},"paused":{"type":"bool","id":27},"leaveWaitingPeriod":{"type":"uint32","id":28},"publisherFeeShare":{"type":"uint32","id":29},"publishWaitingPeriod":{"type":"uint32","id":30},"publishSlashRate":{"type":"uint32","id":31},"data":{"type":"google.protobuf.Any","id":50}}},"UpdateRollupTx":{"fields":{"minStakeAmount":{"type":"string","id":1},"maxStakeAmount":{"type":"string","id":2},"minSignerCount":{"type":"uint32","id":3},"maxSignerCount":{"type":"uint32","id":4},"minBlockSize":{"type":"uint32","id":5},"maxBlockSize":{"type":"uint32","id":6},"minBlockInterval":{"type":"uint32","id":7},"minBlockConfirmation":{"type":"uint32","id":8},"depositFeeRate":{"type":"uint32","id":9},"withdrawFeeRate":{"type":"uint32","id":10},"proposerFeeShare":{"type":"uint32","id":11},"minDepositAmount":{"type":"string","id":12},"minWithdrawAmount":{"type":"string","id":13},"maxDepositAmount":{"type":"string","id":14},"maxWithdrawAmount":{"type":"string","id":15},"minDepositFee":{"type":"string","id":16},"maxDepositFee":{"type":"string","id":17},"minWithdrawFee":{"type":"string","id":18},"maxWithdrawFee":{"type":"string","id":19},"publisherFeeShare":{"type":"uint32","id":20},"leaveWaitingPeriod":{"type":"uint32","id":21},"publishWaitingPeriod":{"type":"uint32","id":22},"publishSlashRate":{"type":"uint32","id":23},"rollup":{"type":"string","id":40},"data":{"type":"google.protobuf.Any","id":50}}},"JoinRollupTx":{"fields":{"rollup":{"type":"string","id":1},"endpoint":{"type":"string","id":2},"evidence":{"type":"Evidence","id":3},"signatures":{"rule":"repeated","type":"Multisig","id":4},"data":{"type":"google.protobuf.Any","id":50}}},"LeaveRollupTx":{"fields":{"rollup":{"type":"string","id":1},"evidence":{"type":"Evidence","id":2},"signatures":{"rule":"repeated","type":"Multisig","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"CreateRollupBlockTx":{"fields":{"hash":{"type":"string","id":1},"height":{"type":"uint64","id":2},"merkleRoot":{"type":"string","id":3},"previousHash":{"type":"string","id":4},"txsHash":{"type":"string","id":5},"txs":{"rule":"repeated","type":"string","id":6},"proposer":{"type":"string","id":7},"signatures":{"rule":"repeated","type":"Multisig","id":8},"rollup":{"type":"string","id":10},"minReward":{"type":"string","id":11},"governance":{"type":"bool","id":12},"data":{"type":"google.protobuf.Any","id":50}}},"ClaimBlockRewardTx":{"fields":{"rollup":{"type":"string","id":1},"blockHeight":{"type":"uint64","id":2},"blockHash":{"type":"string","id":3},"evidence":{"type":"Evidence","id":4},"publisher":{"type":"string","id":5},"data":{"type":"google.protobuf.Any","id":50}}},"PauseRollupTx":{"fields":{"rollup":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":10}}},"ResumeRollupTx":{"fields":{"rollup":{"type":"string","id":1},"data":{"type":"google.protobuf.Any","id":10}}},"CloseRollupTx":{"fields":{"rollup":{"type":"string","id":1},"message":{"type":"string","id":2},"data":{"type":"google.protobuf.Any","id":10}}},"MigrateRollupTx":{"fields":{"rollup":{"type":"string","id":1},"to":{"type":"string","id":2},"type":{"type":"string","id":3},"message":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":10}}},"DepositTokenV2Tx":{"fields":{"token":{"type":"TokenInput","id":1},"to":{"type":"string","id":2},"proposer":{"type":"string","id":3},"evidence":{"type":"Evidence","id":4},"rollup":{"type":"string","id":5},"actualFee":{"type":"string","id":7},"data":{"type":"google.protobuf.Any","id":15}}},"WithdrawTokenV2Tx":{"fields":{"token":{"type":"TokenInput","id":1},"to":{"type":"string","id":2},"rollup":{"type":"string","id":3},"proposer":{"type":"string","id":5},"maxFee":{"type":"string","id":6},"actualFee":{"type":"string","id":7},"data":{"type":"google.protobuf.Any","id":15}}},"CreateTokenFactoryTx":{"fields":{"address":{"type":"string","id":1},"feeRate":{"type":"uint32","id":2},"token":{"type":"TokenInfo","id":3},"reserveAddress":{"type":"string","id":4},"curve":{"type":"CurveConfig","id":5},"data":{"type":"google.protobuf.Any","id":50}}},"UpdateTokenFactoryTx":{"fields":{"address":{"type":"string","id":1},"feeRate":{"type":"uint32","id":2},"token":{"type":"TokenInfo","id":3},"data":{"type":"google.protobuf.Any","id":50}}},"MintTokenTx":{"fields":{"tokenFactory":{"type":"string","id":1},"amount":{"type":"string","id":2},"inputs":{"rule":"repeated","type":"TransactionInput","id":3},"receiver":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":50}}},"BurnTokenTx":{"fields":{"tokenFactory":{"type":"string","id":1},"inputs":{"rule":"repeated","type":"TransactionInput","id":2},"minReserve":{"type":"string","id":3},"receiver":{"type":"string","id":4},"data":{"type":"google.protobuf.Any","id":50}}},"ItxStub":{"oneofs":{"value":{"oneof":["declare","delegate","revokeDelegate","accountMigrate","createAsset","updateAsset","consumeAsset","exchange","exchangeV2","transfer","transferV2","transferV3","createToken","depositToken","withdrawToken","createTokenFactory","updateTokenFactory","mintToken","burnToken","createFactory","acquireAssetV2","acquireAssetV3","mintAsset","stake","revokeStake","claimStake","slashStake","returnStake","upgradeNode","createRollup","updateRollup","joinRollup","leaveRollup","createRollupBlock","claimBlockReward","pauseRollup","resumeRollup","migrateRollup","closeRollup"]}},"fields":{"declare":{"type":"DeclareTx","id":1},"delegate":{"type":"DelegateTx","id":2},"revokeDelegate":{"type":"RevokeDelegateTx","id":3},"accountMigrate":{"type":"AccountMigrateTx","id":4},"createAsset":{"type":"CreateAssetTx","id":5},"updateAsset":{"type":"UpdateAssetTx","id":6},"consumeAsset":{"type":"ConsumeAssetTx","id":7},"exchange":{"type":"ExchangeTx","id":10},"exchangeV2":{"type":"ExchangeV2Tx","id":12},"transfer":{"type":"TransferTx","id":13},"transferV2":{"type":"TransferV2Tx","id":14},"transferV3":{"type":"TransferV3Tx","id":15},"createToken":{"type":"CreateTokenTx","id":20},"depositToken":{"type":"DepositTokenV2Tx","id":21},"withdrawToken":{"type":"WithdrawTokenV2Tx","id":22},"createTokenFactory":{"type":"CreateTokenFactoryTx","id":23},"updateTokenFactory":{"type":"UpdateTokenFactoryTx","id":24},"mintToken":{"type":"MintTokenTx","id":25},"burnToken":{"type":"BurnTokenTx","id":26},"createFactory":{"type":"CreateFactoryTx","id":30},"acquireAssetV2":{"type":"AcquireAssetV2Tx","id":31},"acquireAssetV3":{"type":"AcquireAssetV3Tx","id":32},"mintAsset":{"type":"MintAssetTx","id":33},"stake":{"type":"StakeTx","id":40},"revokeStake":{"type":"RevokeStakeTx","id":41},"claimStake":{"type":"ClaimStakeTx","id":42},"slashStake":{"type":"SlashStakeTx","id":43},"returnStake":{"type":"ReturnStakeTx","id":44},"upgradeNode":{"type":"UpgradeNodeTx","id":49},"createRollup":{"type":"CreateRollupTx","id":50},"updateRollup":{"type":"UpdateRollupTx","id":51},"joinRollup":{"type":"JoinRollupTx","id":52},"leaveRollup":{"type":"LeaveRollupTx","id":53},"createRollupBlock":{"type":"CreateRollupBlockTx","id":54},"claimBlockReward":{"type":"ClaimBlockRewardTx","id":55},"pauseRollup":{"type":"PauseRollupTx","id":56},"resumeRollup":{"type":"ResumeRollupTx","id":57},"migrateRollup":{"type":"MigrateRollupTx","id":58},"closeRollup":{"type":"CloseRollupTx","id":60}}},"PageOrder":{"fields":{"field":{"type":"string","id":1},"type":{"type":"string","id":2}}},"Page":{"fields":{"cursor":{"type":"string","id":1},"size":{"type":"uint32","id":2},"order":{"rule":"repeated","type":"PageOrder","id":3}}},"TypeFilter":{"fields":{"types":{"rule":"repeated","type":"string","id":1}}},"AssetFilter":{"fields":{"assets":{"rule":"repeated","type":"string","id":1}}},"FactoryFilter":{"fields":{"factories":{"rule":"repeated","type":"string","id":1}}},"DelegationFilter":{"fields":{"delegations":{"rule":"repeated","type":"string","id":1}}},"TokenFilter":{"fields":{"tokens":{"rule":"repeated","type":"string","id":1}}},"StakeFilter":{"fields":{"stakes":{"rule":"repeated","type":"string","id":1}}},"AccountFilter":{"fields":{"accounts":{"rule":"repeated","type":"string","id":1}}},"TxFilter":{"fields":{"txs":{"rule":"repeated","type":"string","id":1}}},"RollupFilter":{"fields":{"rollups":{"rule":"repeated","type":"string","id":1}}},"ValidatorFilter":{"fields":{"validators":{"rule":"repeated","type":"string","id":1}}},"TokenFactoryFilter":{"fields":{"tokenFactories":{"rule":"repeated","type":"string","id":1}}},"TimeFilter":{"fields":{"startDateTime":{"type":"string","id":1},"endDateTime":{"type":"string","id":2},"field":{"type":"string","id":3}}},"Direction":{"values":{"MUTUAL":0,"ONE_WAY":1,"UNION":2}},"AddressFilter":{"fields":{"sender":{"type":"string","id":1},"receiver":{"type":"string","id":2},"direction":{"type":"Direction","id":3}}},"PageInfo":{"fields":{"cursor":{"type":"string","id":1},"next":{"type":"bool","id":2},"total":{"type":"uint32","id":3}}},"TokenMeta":{"fields":{"address":{"type":"string","id":1},"balance":{"type":"string","id":2},"decimal":{"type":"int32","id":3},"unit":{"type":"string","id":4},"symbol":{"type":"string","id":5}}},"Validity":{"values":{"BOTH":0,"VALID":1,"INVALID":2}},"ValidityFilter":{"fields":{"validity":{"type":"Validity","id":1}}},"RangeFilter":{"fields":{"from":{"type":"string","id":1},"to":{"type":"string","id":2}}},"AccountToken":{"fields":{"address":{"type":"string","id":1},"symbol":{"type":"string","id":2},"balance":{"type":"string","id":3},"decimal":{"type":"uint32","id":4}}},"ByDay":{"fields":{"startDate":{"type":"string","id":1},"endDate":{"type":"string","id":2}}},"ByHour":{"fields":{"date":{"type":"string","id":1}}},"IndexedTransaction":{"fields":{"hash":{"type":"string","id":1},"sender":{"type":"string","id":2},"receiver":{"type":"string","id":3},"time":{"type":"string","id":4},"type":{"type":"string","id":5},"tx":{"type":"Transaction","id":6},"valid":{"type":"bool","id":20},"code":{"type":"StatusCode","id":21},"tokenSymbols":{"rule":"repeated","type":"TokenMeta","id":22},"receipts":{"rule":"repeated","type":"TransactionReceipt","id":16}}},"IndexedAccountState":{"fields":{"address":{"type":"string","id":1},"balance":{"type":"BigUint","id":2},"numAssets":{"type":"string","id":3},"numTxs":{"type":"string","id":4},"nonce":{"type":"string","id":5},"genesisTime":{"type":"string","id":6},"renaissanceTime":{"type":"string","id":7},"moniker":{"type":"string","id":8},"migratedFrom":{"type":"string","id":9},"migratedTo":{"type":"string","id":10},"totalReceivedStakes":{"type":"BigUint","id":11},"totalStakes":{"type":"BigUint","id":12},"totalUnstakes":{"type":"BigUint","id":13},"recentNumTxs":{"rule":"repeated","type":"string","id":14},"tokens":{"rule":"repeated","type":"TokenMeta","id":15}}},"IndexedAssetState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"genesisTime":{"type":"string","id":3},"renaissanceTime":{"type":"string","id":4},"moniker":{"type":"string","id":5},"readonly":{"type":"bool","id":6},"consumedTime":{"type":"string","id":7},"issuer":{"type":"string","id":8},"parent":{"type":"string","id":9},"transferrable":{"type":"bool","id":10},"ttl":{"type":"string","id":11},"display":{"type":"NFTDisplay","id":12},"endpoint":{"type":"NFTEndpoint","id":13},"tags":{"rule":"repeated","type":"string","id":14},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedBlock":{"fields":{"height":{"type":"string","id":1},"time":{"type":"string","id":2},"proposer":{"type":"string","id":3},"numTxs":{"type":"string","id":4},"numInvalidTxs":{"type":"string","id":5}}},"IndexedTokenState":{"fields":{"name":{"type":"string","id":1},"description":{"type":"string","id":2},"symbol":{"type":"string","id":3},"unit":{"type":"string","id":4},"decimal":{"type":"int32","id":5},"issuer":{"type":"string","id":6},"icon":{"type":"string","id":7},"totalSupply":{"type":"string","id":8},"address":{"type":"string","id":9},"genesisTime":{"type":"string","id":10},"renaissanceTime":{"type":"string","id":11},"foreignToken":{"type":"ForeignToken","id":13},"tokenFactoryAddress":{"type":"string","id":14},"maxTotalSupply":{"type":"string","id":15},"initialSupply":{"type":"string","id":16},"metadata":{"type":"google.protobuf.Any","id":17},"website":{"type":"string","id":18},"spenders":{"rule":"repeated","type":"string","id":19},"minters":{"rule":"repeated","type":"string","id":20},"type":{"type":"string","id":21},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedTokenFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"tokenAddress":{"type":"string","id":3},"reserveAddress":{"type":"string","id":4},"curve":{"type":"CurveConfig","id":5},"feeRate":{"type":"int32","id":6},"currentSupply":{"type":"string","id":7},"reserveBalance":{"type":"string","id":8},"status":{"type":"string","id":9},"genesisTime":{"type":"string","id":10},"renaissanceTime":{"type":"string","id":11},"token":{"type":"IndexedTokenInput","id":12},"reserveToken":{"type":"IndexedTokenInput","id":13},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedFactoryState":{"fields":{"address":{"type":"string","id":1},"owner":{"type":"string","id":2},"name":{"type":"string","id":3},"description":{"type":"string","id":4},"settlement":{"type":"string","id":5},"limit":{"type":"string","id":6},"trustedIssuers":{"rule":"repeated","type":"string","id":7},"input":{"type":"IndexedFactoryInput","id":8},"output":{"type":"CreateAssetTx","id":9},"hooks":{"rule":"repeated","type":"AssetFactoryHook","id":10},"data":{"type":"google.protobuf.Any","id":11},"balance":{"type":"string","id":13},"tokens":{"rule":"repeated","type":"TokenMeta","id":14},"numMinted":{"type":"uint32","id":15},"lastSettlement":{"type":"string","id":16},"genesisTime":{"type":"string","id":17},"renaissanceTime":{"type":"string","id":18},"display":{"type":"NFTDisplay","id":19}}},"IndexedStakeState":{"fields":{"address":{"type":"string","id":1},"sender":{"type":"string","id":2},"receiver":{"type":"string","id":3},"tokens":{"rule":"repeated","type":"TokenMeta","id":4},"assets":{"rule":"repeated","type":"string","id":5},"revocable":{"type":"bool","id":6},"genesisTime":{"type":"string","id":7},"renaissanceTime":{"type":"string","id":8},"message":{"type":"string","id":9},"revokeWaitingPeriod":{"type":"uint32","id":10},"revokedTokens":{"rule":"repeated","type":"TokenMeta","id":11},"revokedAssets":{"rule":"repeated","type":"string","id":12},"slashers":{"rule":"repeated","type":"string","id":13},"nonce":{"type":"string","id":14},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedRollupState":{"fields":{"address":{"type":"string","id":1},"tokenAddress":{"type":"string","id":2},"vaultAddress":{"type":"string","id":3},"contractAddress":{"type":"string","id":4},"seedValidators":{"rule":"repeated","type":"RollupValidator","id":5},"validators":{"rule":"repeated","type":"RollupValidator","id":6},"minStakeAmount":{"type":"string","id":7},"maxStakeAmount":{"type":"string","id":8},"minSignerCount":{"type":"uint32","id":9},"maxSignerCount":{"type":"uint32","id":10},"minBlockSize":{"type":"uint32","id":11},"maxBlockSize":{"type":"uint32","id":12},"minBlockInterval":{"type":"uint32","id":13},"genesisTime":{"type":"string","id":16},"renaissanceTime":{"type":"string","id":17},"tokenInfo":{"type":"IndexedTokenInput","id":18},"issuer":{"type":"string","id":19},"depositFeeRate":{"type":"uint32","id":20},"withdrawFeeRate":{"type":"uint32","id":21},"proposerFeeShare":{"type":"uint32","id":22},"minDepositAmount":{"type":"string","id":23},"minWithdrawAmount":{"type":"string","id":24},"blockHeight":{"type":"uint64","id":25},"blockHash":{"type":"string","id":26},"minBlockConfirmation":{"type":"uint32","id":27},"totalDepositAmount":{"type":"string","id":28},"totalWithdrawAmount":{"type":"string","id":29},"maxDepositAmount":{"type":"string","id":30},"maxWithdrawAmount":{"type":"string","id":31},"minDepositFee":{"type":"string","id":32},"maxDepositFee":{"type":"string","id":33},"minWithdrawFee":{"type":"string","id":34},"maxWithdrawFee":{"type":"string","id":35},"paused":{"type":"bool","id":36},"foreignToken":{"type":"ForeignToken","id":37},"leaveWaitingPeriod":{"type":"uint32","id":38},"publisherFeeShare":{"type":"uint32","id":39},"publishWaitingPeriod":{"type":"uint32","id":40},"publishSlashRate":{"type":"uint32","id":41},"migrateHistory":{"rule":"repeated","type":"string","id":42},"closed":{"type":"bool","id":43},"vaultHistory":{"rule":"repeated","type":"string","id":44},"data":{"type":"google.protobuf.Any","id":50}}},"IndexedRollupBlock":{"fields":{"hash":{"type":"string","id":1},"height":{"type":"uint64","id":2},"merkleRoot":{"type":"string","id":3},"previousHash":{"type":"string","id":4},"txsHash":{"type":"string","id":5},"txs":{"rule":"repeated","type":"string","id":6},"proposer":{"type":"string","id":7},"signatures":{"rule":"repeated","type":"Multisig","id":8},"genesisTime":{"type":"string","id":10},"renaissanceTime":{"type":"string","id":11},"rollup":{"type":"string","id":12},"mintedAmount":{"type":"string","id":13},"burnedAmount":{"type":"string","id":14},"rewardAmount":{"type":"string","id":15},"governance":{"type":"bool","id":16},"tokenInfo":{"type":"IndexedTokenInput","id":18},"data":{"type":"google.protobuf.Any","id":50}}},"SearchResult":{"fields":{"type":{"type":"string","id":1},"id":{"type":"string","id":2},"title":{"type":"string","id":3},"subtitle":{"type":"string","id":4},"description":{"type":"string","id":5},"tags":{"rule":"repeated","type":"string","id":6},"timestamp":{"type":"string","id":7}}},"IndexedRollupValidator":{"fields":{"pk":{"type":"string","id":1},"address":{"type":"string","id":2},"moniker":{"type":"string","id":3},"endpoint":{"type":"string","id":4},"joinTime":{"type":"string","id":5},"leaveTime":{"type":"string","id":6},"genesisTime":{"type":"string","id":7},"renaissanceTime":{"type":"string","id":8},"totalStake":{"type":"string","id":9},"revokedStake":{"type":"string","id":10},"availableStake":{"type":"string","id":11},"totalGain":{"type":"string","id":12},"proposedBlockCount":{"type":"uint64","id":13},"verifiedBlockCount":{"type":"uint64","id":14},"latestBlockHeight":{"type":"uint64","id":15},"latestBlockHash":{"type":"string","id":16},"rollup":{"type":"string","id":17}}},"IndexedDelegationState":{"fields":{"address":{"type":"string","id":1},"from":{"type":"string","id":2},"to":{"type":"string","id":3},"genesisTime":{"type":"string","id":4},"renaissanceTime":{"type":"string","id":5},"ops":{"keyType":"string","type":"DelegateOpState","id":6},"data":{"type":"google.protobuf.Any","id":7}}},"TokenFlowDirection":{"values":{"IN":0,"OUT":1}},"IndexedTokenFlow":{"fields":{"value":{"type":"string","id":1},"hash":{"type":"string","id":2},"from":{"type":"string","id":3},"to":{"type":"string","id":4}}},"VerifyAccountRiskResult":{"fields":{"isRisky":{"type":"bool","id":1},"reason":{"type":"string","id":2},"data":{"type":"BalanceRisky","id":3}},"nested":{"BalanceRisky":{"fields":{"address":{"type":"string","id":1},"balance":{"type":"string","id":2},"transferIn":{"type":"string","id":3},"transferOut":{"type":"string","id":4},"accountCount":{"type":"uint32","id":5},"txCount":{"type":"uint32","id":6}}}}},"TokenDistribution":{"fields":{"tokenAddress":{"type":"string","id":1},"txTime":{"type":"string","id":2},"account":{"type":"string","id":3},"gas":{"type":"string","id":4},"fee":{"type":"string","id":5},"slashedVault":{"type":"string","id":6},"stake":{"type":"string","id":7},"revokedStake":{"type":"string","id":8},"gasStake":{"type":"string","id":9}}}}},"google":{"nested":{"protobuf":{"nested":{"Timestamp":{"fields":{"seconds":{"type":"int64","id":1},"nanos":{"type":"int32","id":2}}},"Any":{"fields":{"type_url":{"type":"string","id":1},"value":{"type":"bytes","id":2}}}}}}},"vendor":{"nested":{"KVPair":{"fields":{"key":{"type":"bytes","id":1},"value":{"type":"bytes","id":2}}},"BlockParams":{"fields":{"maxBytes":{"type":"int64","id":1},"maxGas":{"type":"int64","id":2}}},"EvidenceParams":{"fields":{"maxAge":{"type":"int64","id":1}}},"ValidatorParams":{"fields":{"pubKeyTypes":{"rule":"repeated","type":"string","id":1}}},"ConsensusParams":{"fields":{"block":{"type":"BlockParams","id":1},"evidence":{"type":"EvidenceParams","id":2},"validator":{"type":"ValidatorParams","id":3}}},"LastCommitInfo":{"fields":{"round":{"type":"int32","id":1},"votes":{"rule":"repeated","type":"VoteInfo","id":2}}},"Version":{"fields":{"Block":{"type":"uint64","id":1},"App":{"type":"uint64","id":2}}},"BlockID":{"fields":{"hash":{"type":"bytes","id":1},"partsHeader":{"type":"PartSetHeader","id":2}}},"PartSetHeader":{"fields":{"total":{"type":"int32","id":1},"hash":{"type":"bytes","id":2}}},"Validator":{"fields":{"address":{"type":"bytes","id":1},"power":{"type":"int64","id":3}}},"ValidatorUpdate":{"fields":{"pubKey":{"type":"PubKey","id":1},"power":{"type":"int64","id":2}}},"VoteInfo":{"fields":{"validator":{"type":"Validator","id":1},"signedLastBlock":{"type":"bool","id":2}}},"PubKey":{"fields":{"type":{"type":"string","id":1},"data":{"type":"bytes","id":2}}},"Evidence":{"fields":{"type":{"type":"string","id":1},"validator":{"type":"Validator","id":2},"height":{"type":"int64","id":3},"time":{"type":"google.protobuf.Timestamp","id":4},"totalVotingPower":{"type":"int64","id":5}}},"Header":{"fields":{"version":{"type":"Version","id":1},"chainId":{"type":"string","id":2},"height":{"type":"int64","id":3},"time":{"type":"google.protobuf.Timestamp","id":4},"numTxs":{"type":"int64","id":5},"totalTxs":{"type":"int64","id":6},"lastBlockId":{"type":"BlockID","id":7},"lastCommitHash":{"type":"bytes","id":8},"dataHash":{"type":"bytes","id":9},"validatorsHash":{"type":"bytes","id":10},"nextValidatorsHash":{"type":"bytes","id":11},"consensusHash":{"type":"bytes","id":12},"appHash":{"type":"bytes","id":13},"lastResultsHash":{"type":"bytes","id":14},"evidenceHash":{"type":"bytes","id":15},"proposerAddress":{"type":"bytes","id":16}}},"RequestBeginBlock":{"fields":{"hash":{"type":"bytes","id":1},"header":{"type":"Header","id":2},"lastCommitInfo":{"type":"LastCommitInfo","id":3},"byzantineValidators":{"rule":"repeated","type":"Evidence","id":4}}},"RequestEndBlock":{"fields":{"height":{"type":"int64","id":1}}}}}}'),fn={nested:yn};var st,Nt;function Ft(){if(Nt)return st;Nt=1;const d=structuredClone(fn),u=(f,J)=>{if(!(!f||!J))return Object.prototype.hasOwnProperty.call(f,J)?f[J]:J.split(".").reduce((h,H)=>h==null?h:h[H],f)},c=/Tx$/,g=/State$/,E=/^StakeFor/i,b=/^Request/i,I=/^Response/i,S=f=>f.split(/(?=[A-Z])/).join("_").toLowerCase(),o=f=>(f.nested&&(f=f.nested),Object.keys(f).forEach(J=>{f[J]&&typeof f[J]=="object"&&(f[J]=o(f[J]))}),f),s=o(d),p="ocap",{[p]:a}=s;Object.assign(s,s[p]);const l={},e=Object.keys(a).filter(f=>a[f].values).reduce((f,J)=>(l[J]={},f[J]=Object.keys(a[J].values).reduce((h,H)=>(h[H.toUpperCase()]=a[J].values[H],l[J][a[J].values[H]]=H.toUpperCase(),h),{}),f),{});function t(f){return Object.keys(f).reduce((J,h)=>{let H=h;return!b.test(h)&&!I.test(h)&&(c.test(h)&&(H=`fg:t:${S(h.replace(c,""))}`),g.test(h)&&(H=`fg:s:${S(h.replace(g,""))}`),E.test(h)&&(H=`fg:x:${S(`Stake${h.replace(E,"")}`)}`),["TransactionInfo"].includes(h)&&(H=`fg:x:${S(h)}`),h==="AssetFactoryState"&&(H="fg:s:asset_factory_state"),h==="AssetFactory"&&(H="fg:x:asset_factory"),h==="DummyCodec"&&(H="fg:x:address")),J[h]=H,J},{})}const r=t(a),n=Object.keys(a).filter(f=>c.test(f)&&!b.test(f)&&!I.test(f)),A=Object.keys(a).filter(f=>E.test(f));e.SupportedTxs=n,e.SupportedStakes=A;const i=["ExchangeV2Tx"].filter(f=>n.includes(f)),D=["TransferV3Tx","AcquireAssetV3Tx","StakeTx","UpdateRollupTx","JoinRollupTx","LeaveRollupTx","PauseRollupTx","CloseRollupTx","MigrateRollupTx","ResumeRollupTx","DepositTokenV2Tx","WithdrawTokenV2Tx","CreateRollupBlockTx","ClaimBlockRewardTx","CreateAssetTx","ConsumeAssetTx","MintTokenTx","BurnTokenTx"].filter(f=>n.includes(f));function k(f){const h=(u(s,f)||u(s,`vendor.${f}`)||{}).fields;return h?Object.keys(h).map(H=>Object.assign({name:H},h[H])):[]}function B(f){return e[f]}function v(){return n.slice()}function m(f){const J=u(s,f)||u(s,`vendor.${f}`)||{};return{fields:J.fields,oneofs:J.oneofs}}function O(f){return r[f]||f}function T(f){const J=Object.entries(r).find(([,h])=>h===f);return J?J[0]:f}return st={enums:e,messages:l,typeUrls:r,transactions:n,stakes:A,multiSignTxs:i,multiSignV2Txs:D,compactSpec:o,getFields:k,getEnum:B,listTxTypes:v,getMessageType:m,getTypeUrl:O,fromTypeUrl:T,toTypeUrl:O},st}var Re={},Pe={},Xe={},Rt;function Gr(){if(Rt)return Xe;Rt=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(s,p)=>()=>(p||s((p={exports:{}}).exports,p),p.exports),S=(s,p,a,l)=>{if(p&&typeof p=="object"||typeof p=="function")for(var e=g(p),t=0,r=e.length,n;t<r;t++)n=e[t],!b.call(s,n)&&n!==a&&u(s,n,{get:(A=>p[A]).bind(null,n),enumerable:!(l=c(p,n))||l.enumerable});return s},o=(s,p,a)=>(a=s!=null?d(E(s)):{},S(p||!s||!s.__esModule?u(a,"default",{value:s,enumerable:!0}):a,s));return Xe.__commonJSMin=I,Xe.__toESM=o,Xe}var Ue={},ot={},vt;function gn(){if(vt)return ot;vt=1;const d=["Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","Tagged"];function u(g){if(g===null)return"null";if(g===void 0)return"undefined";if(g===!0||g===!1)return"boolean";const E=typeof g;if(E==="string"||E==="number"||E==="bigint"||E==="symbol")return E;if(E==="function")return"Function";if(Array.isArray(g))return"Array";if(g instanceof Uint8Array)return"Uint8Array";if(g.constructor===Object)return"Object";const b=c(g);return b||"Object"}function c(g){const E=Object.prototype.toString.call(g).slice(8,-1);if(d.includes(E))return E}return ot.is=u,ot}var Ze={},xt;function ye(){if(xt)return Ze;xt=1;var d=class{constructor(c,g,E){this.major=c,this.majorEncoded=c<<5,this.name=g,this.terminal=E}toString(){return`Type[${this.major}].${this.name}`}compare(c){return this.major<c.major?-1:this.major>c.major?1:0}static equals(c,g){return c===g||c.major===g.major&&c.name===g.name}};d.uint=new d(0,"uint",!0),d.negint=new d(1,"negint",!0),d.bytes=new d(2,"bytes",!0),d.string=new d(3,"string",!0),d.array=new d(4,"array",!1),d.map=new d(5,"map",!1),d.tag=new d(6,"tag",!1),d.float=new d(7,"float",!0),d.false=new d(7,"false",!0),d.true=new d(7,"true",!0),d.null=new d(7,"null",!0),d.undefined=new d(7,"undefined",!0),d.break=new d(7,"break",!0);var u=class{constructor(c,g,E){this.type=c,this.value=g,this.encodedLength=E,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}};return Ze.Token=u,Ze.Type=d,Ze}var He={},wt;function je(){if(wt)return He;wt=1;const d=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",u=new TextEncoder;function c(e){return d&&globalThis.Buffer.isBuffer(e)}function g(e){return e instanceof Uint8Array?c(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e:Uint8Array.from(e)}const E=24,b=200,I=d?e=>e.length>=E?globalThis.Buffer.from(e):l(e):e=>e.length>=b?u.encode(e):l(e),S=e=>Uint8Array.from(e),o=d?(e,t,r)=>c(e)?new Uint8Array(e.subarray(t,r)):e.slice(t,r):(e,t,r)=>e.slice(t,r),s=d?(e,t)=>(e=e.map(r=>r instanceof Uint8Array?r:globalThis.Buffer.from(r)),g(globalThis.Buffer.concat(e,t))):(e,t)=>{const r=new Uint8Array(t);let n=0;for(let A of e)n+A.length>r.length&&(A=A.subarray(0,r.length-n)),r.set(A,n),n+=A.length;return r},p=d?e=>globalThis.Buffer.allocUnsafe(e):e=>new Uint8Array(e);function a(e,t){if(c(e)&&c(t))return e.compare(t);for(let r=0;r<e.length;r++)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return 0}function l(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let A=e.charCodeAt(n);A<128?t[r++]=A:A<2048?(t[r++]=A>>6|192,t[r++]=A&63|128):(A&64512)===55296&&n+1<e.length&&(e.charCodeAt(n+1)&64512)===56320?(A=65536+((A&1023)<<10)+(e.charCodeAt(++n)&1023),t[r++]=A>>18|240,t[r++]=A>>12&63|128,t[r++]=A>>6&63|128,t[r++]=A&63|128):(A>=55296&&A<=57343&&(A=65533),t[r++]=A>>12|224,t[r++]=A>>6&63|128,t[r++]=A&63|128)}return t}return He.alloc=p,He.asU8A=g,He.compare=a,He.concat=s,He.fromArray=S,He.fromString=I,He.slice=o,He}var Qe={},Ct;function En(){if(Ct)return Qe;Ct=1;const d=je(),u=256;var c=class{constructor(E=u){this.chunkSize=E,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(E){let b=this.chunks[this.chunks.length-1];if(this.cursor+E.length<=this.maxCursor+1){const I=b.length-(this.maxCursor-this.cursor)-1;b.set(E,I)}else{if(b){const I=b.length-(this.maxCursor-this.cursor)-1;I<b.length&&(this.chunks[this.chunks.length-1]=b.subarray(0,I),this.maxCursor=this.cursor-1)}E.length<64&&E.length<this.chunkSize?(b=d.alloc(this.chunkSize),this.chunks.push(b),this.maxCursor+=b.length,this._initReuseChunk===null&&(this._initReuseChunk=b),b.set(E,0)):(this.chunks.push(E),this.maxCursor+=E.length)}this.cursor+=E.length}toBytes(E=!1){let b;if(this.chunks.length===1){const I=this.chunks[0];E&&this.cursor>I.length/2?(b=this.cursor===I.length?I:I.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):b=d.slice(I,0,this.cursor)}else b=d.concat(this.chunks,this.cursor);return E&&this.reset(),b}},g=class{constructor(E){this.dest=E,this.cursor=0,this.chunks=[E]}reset(){this.cursor=0}push(E){if(this.cursor+E.length>this.dest.length)throw new Error("write out of bounds, destination buffer is too small");this.dest.set(E,this.cursor),this.cursor+=E.length}toBytes(E=!1){const b=this.dest.subarray(0,this.cursor);return E&&this.reset(),b}};return Qe.Bl=c,Qe.U8Bl=g,Qe}var Me={},Bt;function Ie(){if(Bt)return Me;Bt=1;const d="CBOR decode error:",u="CBOR encode error:";function c(g,E,b){if(g.length-E<b)throw new Error(`${d} not enough data for type`)}return Me.assertEnoughData=c,Me.decodeErrPrefix=d,Me.encodeErrPrefix=u,Me}var le={},Pt;function Fe(){if(Pt)return le;Pt=1;const d=ye(),u=Ie(),c=[24,256,65536,4294967296,BigInt("18446744073709551616")];function g(e,t,r){u.assertEnoughData(e,t,1);const n=e[t];if(r.strict===!0&&n<c[0])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);return n}function E(e,t,r){u.assertEnoughData(e,t,2);const n=e[t]<<8|e[t+1];if(r.strict===!0&&n<c[1])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);return n}function b(e,t,r){u.assertEnoughData(e,t,4);const n=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];if(r.strict===!0&&n<c[2])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);return n}function I(e,t,r){u.assertEnoughData(e,t,8);const n=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3],A=e[t+4]*16777216+(e[t+5]<<16)+(e[t+6]<<8)+e[t+7],i=(BigInt(n)<<BigInt(32))+BigInt(A);if(r.strict===!0&&i<c[3])throw new Error(`${u.decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`);if(i<=Number.MAX_SAFE_INTEGER)return Number(i);if(r.allowBigInt===!0)return i;throw new Error(`${u.decodeErrPrefix} integers outside of the safe integer range are not supported`)}function S(e,t,r,n){return new d.Token(d.Type.uint,g(e,t+1,n),2)}function o(e,t,r,n){return new d.Token(d.Type.uint,E(e,t+1,n),3)}function s(e,t,r,n){return new d.Token(d.Type.uint,b(e,t+1,n),5)}function p(e,t,r,n){return new d.Token(d.Type.uint,I(e,t+1,n),9)}function a(e,t){return l(e,0,t.value)}function l(e,t,r){if(r<c[0]){const n=Number(r);e.push([t|n])}else if(r<c[1]){const n=Number(r);e.push([t|24,n])}else if(r<c[2]){const n=Number(r);e.push([t|25,n>>>8,n&255])}else if(r<c[3]){const n=Number(r);e.push([t|26,n>>>24&255,n>>>16&255,n>>>8&255,n&255])}else{const n=BigInt(r);if(n<c[4]){const A=[t|27,0,0,0,0,0,0,0];let i=Number(n&BigInt(4294967295)),D=Number(n>>BigInt(32)&BigInt(4294967295));A[8]=i&255,i=i>>8,A[7]=i&255,i=i>>8,A[6]=i&255,i=i>>8,A[5]=i&255,A[4]=D&255,D=D>>8,A[3]=D&255,D=D>>8,A[2]=D&255,D=D>>8,A[1]=D&255,e.push(A)}else throw new Error(`${u.decodeErrPrefix} encountered BigInt larger than allowable range`)}}return a.encodedSize=function(t){return l.encodedSize(t.value)},l.encodedSize=function(t){return t<c[0]?1:t<c[1]?2:t<c[2]?3:t<c[3]?5:9},a.compareTokens=function(t,r){return t.value<r.value?-1:t.value>r.value?1:0},le.decodeUint16=o,le.decodeUint32=s,le.decodeUint64=p,le.decodeUint8=S,le.encodeUint=a,le.encodeUintValue=l,le.readUint16=E,le.readUint32=b,le.readUint64=I,le.readUint8=g,le.uintBoundaries=c,le}var ve={},Ut;function _r(){if(Ut)return ve;Ut=1;const d=ye(),u=Ie(),c=Fe();function g(p,a,l,e){return new d.Token(d.Type.negint,-1-c.readUint8(p,a+1,e),2)}function E(p,a,l,e){return new d.Token(d.Type.negint,-1-c.readUint16(p,a+1,e),3)}function b(p,a,l,e){return new d.Token(d.Type.negint,-1-c.readUint32(p,a+1,e),5)}const I=BigInt(-1),S=BigInt(1);function o(p,a,l,e){const t=c.readUint64(p,a+1,e);if(typeof t!="bigint"){const r=-1-t;if(r>=Number.MIN_SAFE_INTEGER)return new d.Token(d.Type.negint,r,9)}if(e.allowBigInt!==!0)throw new Error(`${u.decodeErrPrefix} integers outside of the safe integer range are not supported`);return new d.Token(d.Type.negint,I-BigInt(t),9)}function s(p,a){const l=a.value,e=typeof l=="bigint"?l*I-S:l*-1-1;c.encodeUintValue(p,a.type.majorEncoded,e)}return s.encodedSize=function(a){const l=a.value,e=typeof l=="bigint"?l*I-S:l*-1-1;return e<c.uintBoundaries[0]?1:e<c.uintBoundaries[1]?2:e<c.uintBoundaries[2]?3:e<c.uintBoundaries[3]?5:9},s.compareTokens=function(a,l){return a.value<l.value?1:a.value>l.value?-1:0},ve.decodeNegint16=E,ve.decodeNegint32=b,ve.decodeNegint64=o,ve.decodeNegint8=g,ve.encodeNegint=s,ve}var Je={},Mt;function Tt(){if(Mt)return Je;Mt=1;const d=ye(),u=je(),c=Ie(),g=Fe();function E(e,t,r,n){c.assertEnoughData(e,t,r+n);const A=e.slice(t+r,t+r+n);return new d.Token(d.Type.bytes,A,r+n)}function b(e,t,r,n){return E(e,t,1,r)}function I(e,t,r,n){return E(e,t,2,g.readUint8(e,t+1,n))}function S(e,t,r,n){return E(e,t,3,g.readUint16(e,t+1,n))}function o(e,t,r,n){return E(e,t,5,g.readUint32(e,t+1,n))}function s(e,t,r,n){const A=g.readUint64(e,t+1,n);if(typeof A=="bigint")throw new Error(`${c.decodeErrPrefix} 64-bit integer bytes lengths not supported`);return E(e,t,9,A)}function p(e){return e.encodedBytes===void 0&&(e.encodedBytes=d.Type.equals(e.type,d.Type.string)?u.fromString(e.value):e.value),e.encodedBytes}function a(e,t){const r=p(t);g.encodeUintValue(e,t.type.majorEncoded,r.length),e.push(r)}a.encodedSize=function(t){const r=p(t);return g.encodeUintValue.encodedSize(r.length)+r.length},a.compareTokens=function(t,r){return l(p(t),p(r))};function l(e,t){return e.length<t.length?-1:e.length>t.length?1:u.compare(e,t)}return Je.decodeBytes16=S,Je.decodeBytes32=o,Je.decodeBytes64=s,Je.decodeBytes8=I,Je.decodeBytesCompact=b,Je.encodeBytes=a,Je}var Se={},Lt;function Or(){if(Lt)return Se;Lt=1;const d=ye(),u=Ie(),c=Fe(),g=Tt(),E=new TextDecoder,b=32;function I(t,r,n){if(n-r<b){let A="";for(let i=r;i<n;i++){const D=t[i];if(D&128)return E.decode(t.subarray(r,n));A+=String.fromCharCode(D)}return A}return E.decode(t.subarray(r,n))}function S(t,r,n,A,i){const D=n+A;u.assertEnoughData(t,r,D);const k=new d.Token(d.Type.string,I(t,r+n,r+D),D);return i.retainStringBytes===!0&&(k.byteValue=t.slice(r+n,r+D)),k}function o(t,r,n,A){return S(t,r,1,n,A)}function s(t,r,n,A){return S(t,r,2,c.readUint8(t,r+1,A),A)}function p(t,r,n,A){return S(t,r,3,c.readUint16(t,r+1,A),A)}function a(t,r,n,A){return S(t,r,5,c.readUint32(t,r+1,A),A)}function l(t,r,n,A){const i=c.readUint64(t,r+1,A);if(typeof i=="bigint")throw new Error(`${u.decodeErrPrefix} 64-bit integer string lengths not supported`);return S(t,r,9,i,A)}const e=g.encodeBytes;return Se.decodeString16=p,Se.decodeString32=a,Se.decodeString64=l,Se.decodeString8=s,Se.decodeStringCompact=o,Se.encodeString=e,Se}var he={},Vt;function Nr(){if(Vt)return he;Vt=1;const d=ye(),u=Ie(),c=Fe();function g(a,l,e,t){return new d.Token(d.Type.array,t,e)}function E(a,l,e,t){return g(a,l,1,e)}function b(a,l,e,t){return g(a,l,2,c.readUint8(a,l+1,t))}function I(a,l,e,t){return g(a,l,3,c.readUint16(a,l+1,t))}function S(a,l,e,t){return g(a,l,5,c.readUint32(a,l+1,t))}function o(a,l,e,t){const r=c.readUint64(a,l+1,t);if(typeof r=="bigint")throw new Error(`${u.decodeErrPrefix} 64-bit integer array lengths not supported`);return g(a,l,9,r)}function s(a,l,e,t){if(t.allowIndefinite===!1)throw new Error(`${u.decodeErrPrefix} indefinite length items not allowed`);return g(a,l,1,1/0)}function p(a,l){c.encodeUintValue(a,d.Type.array.majorEncoded,l.value)}return p.compareTokens=c.encodeUint.compareTokens,p.encodedSize=function(l){return c.encodeUintValue.encodedSize(l.value)},he.decodeArray16=I,he.decodeArray32=S,he.decodeArray64=o,he.decodeArray8=b,he.decodeArrayCompact=E,he.decodeArrayIndefinite=s,he.encodeArray=p,he}var De={},Wt;function Rr(){if(Wt)return De;Wt=1;const d=ye(),u=Ie(),c=Fe();function g(a,l,e,t){return new d.Token(d.Type.map,t,e)}function E(a,l,e,t){return g(a,l,1,e)}function b(a,l,e,t){return g(a,l,2,c.readUint8(a,l+1,t))}function I(a,l,e,t){return g(a,l,3,c.readUint16(a,l+1,t))}function S(a,l,e,t){return g(a,l,5,c.readUint32(a,l+1,t))}function o(a,l,e,t){const r=c.readUint64(a,l+1,t);if(typeof r=="bigint")throw new Error(`${u.decodeErrPrefix} 64-bit integer map lengths not supported`);return g(a,l,9,r)}function s(a,l,e,t){if(t.allowIndefinite===!1)throw new Error(`${u.decodeErrPrefix} indefinite length items not allowed`);return g(a,l,1,1/0)}function p(a,l){c.encodeUintValue(a,d.Type.map.majorEncoded,l.value)}return p.compareTokens=c.encodeUint.compareTokens,p.encodedSize=function(l){return c.encodeUintValue.encodedSize(l.value)},De.decodeMap16=I,De.decodeMap32=S,De.decodeMap64=o,De.decodeMap8=b,De.decodeMapCompact=E,De.decodeMapIndefinite=s,De.encodeMap=p,De}var be={},jt;function vr(){if(jt)return be;jt=1;const d=ye(),u=Fe();function c(o,s,p,a){return new d.Token(d.Type.tag,p,1)}function g(o,s,p,a){return new d.Token(d.Type.tag,u.readUint8(o,s+1,a),2)}function E(o,s,p,a){return new d.Token(d.Type.tag,u.readUint16(o,s+1,a),3)}function b(o,s,p,a){return new d.Token(d.Type.tag,u.readUint32(o,s+1,a),5)}function I(o,s,p,a){return new d.Token(d.Type.tag,u.readUint64(o,s+1,a),9)}function S(o,s){u.encodeUintValue(o,d.Type.tag.majorEncoded,s.value)}return S.compareTokens=u.encodeUint.compareTokens,S.encodedSize=function(s){return u.encodeUintValue.encodedSize(s.value)},be.decodeTag16=E,be.decodeTag32=b,be.decodeTag64=I,be.decodeTag8=g,be.decodeTagCompact=c,be.encodeTag=S,be}var Ae={},qt;function xr(){if(qt)return Ae;qt=1;const d=ye(),u=Ie(),c=Fe(),g=20,E=21,b=22,I=23;function S(m,O,T,f){if(f.allowUndefined===!1)throw new Error(`${u.decodeErrPrefix} undefined values are not supported`);return f.coerceUndefinedToNull===!0?new d.Token(d.Type.null,null,1):new d.Token(d.Type.undefined,void 0,1)}function o(m,O,T,f){if(f.allowIndefinite===!1)throw new Error(`${u.decodeErrPrefix} indefinite length items not allowed`);return new d.Token(d.Type.break,void 0,1)}function s(m,O,T){if(T){if(T.allowNaN===!1&&Number.isNaN(m))throw new Error(`${u.decodeErrPrefix} NaN values are not supported`);if(T.allowInfinity===!1&&(m===1/0||m===-1/0))throw new Error(`${u.decodeErrPrefix} Infinity values are not supported`)}return new d.Token(d.Type.float,m,O)}function p(m,O,T,f){return s(i(m,O+1),3,f)}function a(m,O,T,f){return s(k(m,O+1),5,f)}function l(m,O,T,f){return s(v(m,O+1),9,f)}function e(m,O,T){const f=O.value;if(f===!1)m.push([d.Type.float.majorEncoded|g]);else if(f===!0)m.push([d.Type.float.majorEncoded|E]);else if(f===null)m.push([d.Type.float.majorEncoded|b]);else if(f===void 0)m.push([d.Type.float.majorEncoded|I]);else{let J,h=!1;(!T||T.float64!==!0)&&(A(f),J=i(n,1),f===J||Number.isNaN(f)?(n[0]=249,m.push(n.slice(0,3)),h=!0):(D(f),J=k(n,1),f===J&&(n[0]=250,m.push(n.slice(0,5)),h=!0))),h||(B(f),J=v(n,1),n[0]=251,m.push(n.slice(0,9)))}}e.encodedSize=function(O,T){const f=O.value;if(f===!1||f===!0||f===null||f===void 0)return 1;if(!T||T.float64!==!0){A(f);let J=i(n,1);if(f===J||Number.isNaN(f))return 3;if(D(f),J=k(n,1),f===J)return 5}return 9};const t=new ArrayBuffer(9),r=new DataView(t,1),n=new Uint8Array(t,0);function A(m){if(m===1/0)r.setUint16(0,31744,!1);else if(m===-1/0)r.setUint16(0,64512,!1);else if(Number.isNaN(m))r.setUint16(0,32256,!1);else{r.setFloat32(0,m);const O=r.getUint32(0),T=(O&2139095040)>>23,f=O&8388607;if(T===255)r.setUint16(0,31744,!1);else if(T===0)r.setUint16(0,(O&2147483648)>>16|f>>13,!1);else{const J=T-127;J<-24?r.setUint16(0,0):J<-14?r.setUint16(0,(O&2147483648)>>16|1<<24+J,!1):r.setUint16(0,(O&2147483648)>>16|J+15<<10|f>>13,!1)}}}function i(m,O){if(m.length-O<2)throw new Error(`${u.decodeErrPrefix} not enough data for float16`);const T=(m[O]<<8)+m[O+1];if(T===31744)return 1/0;if(T===64512)return-1/0;if(T===32256)return NaN;const f=T>>10&31,J=T&1023;let h;return f===0?h=J*2**-24:f!==31?h=(J+1024)*2**(f-25):h=J===0?1/0:NaN,T&32768?-h:h}function D(m){r.setFloat32(0,m,!1)}function k(m,O){if(m.length-O<4)throw new Error(`${u.decodeErrPrefix} not enough data for float32`);const T=(m.byteOffset||0)+O;return new DataView(m.buffer,T,4).getFloat32(0,!1)}function B(m){r.setFloat64(0,m,!1)}function v(m,O){if(m.length-O<8)throw new Error(`${u.decodeErrPrefix} not enough data for float64`);const T=(m.byteOffset||0)+O;return new DataView(m.buffer,T,8).getFloat64(0,!1)}return e.compareTokens=c.encodeUint.compareTokens,Ae.MINOR_FALSE=g,Ae.MINOR_NULL=b,Ae.MINOR_TRUE=E,Ae.MINOR_UNDEFINED=I,Ae.decodeBreak=o,Ae.decodeFloat16=p,Ae.decodeFloat32=a,Ae.decodeFloat64=l,Ae.decodeUndefined=S,Ae.encodeFloat=e,Ae}var Le={},Kt;function wr(){if(Kt)return Le;Kt=1;const d=ye(),u=je(),c=Ie(),g=Fe(),E=_r(),b=Tt(),I=Or(),S=Nr(),o=Rr(),s=vr(),p=xr();function a(n,A,i){throw new Error(`${c.decodeErrPrefix} encountered invalid minor (${i}) for major ${n[A]>>>5}`)}function l(n){return()=>{throw new Error(`${c.decodeErrPrefix} ${n}`)}}const e=[];for(let n=0;n<=23;n++)e[n]=a;e[24]=g.decodeUint8,e[25]=g.decodeUint16,e[26]=g.decodeUint32,e[27]=g.decodeUint64,e[28]=a,e[29]=a,e[30]=a,e[31]=a;for(let n=32;n<=55;n++)e[n]=a;e[56]=E.decodeNegint8,e[57]=E.decodeNegint16,e[58]=E.decodeNegint32,e[59]=E.decodeNegint64,e[60]=a,e[61]=a,e[62]=a,e[63]=a;for(let n=64;n<=87;n++)e[n]=b.decodeBytesCompact;e[88]=b.decodeBytes8,e[89]=b.decodeBytes16,e[90]=b.decodeBytes32,e[91]=b.decodeBytes64,e[92]=a,e[93]=a,e[94]=a,e[95]=l("indefinite length bytes/strings are not supported");for(let n=96;n<=119;n++)e[n]=I.decodeStringCompact;e[120]=I.decodeString8,e[121]=I.decodeString16,e[122]=I.decodeString32,e[123]=I.decodeString64,e[124]=a,e[125]=a,e[126]=a,e[127]=l("indefinite length bytes/strings are not supported");for(let n=128;n<=151;n++)e[n]=S.decodeArrayCompact;e[152]=S.decodeArray8,e[153]=S.decodeArray16,e[154]=S.decodeArray32,e[155]=S.decodeArray64,e[156]=a,e[157]=a,e[158]=a,e[159]=S.decodeArrayIndefinite;for(let n=160;n<=183;n++)e[n]=o.decodeMapCompact;e[184]=o.decodeMap8,e[185]=o.decodeMap16,e[186]=o.decodeMap32,e[187]=o.decodeMap64,e[188]=a,e[189]=a,e[190]=a,e[191]=o.decodeMapIndefinite;for(let n=192;n<=215;n++)e[n]=s.decodeTagCompact;e[216]=s.decodeTag8,e[217]=s.decodeTag16,e[218]=s.decodeTag32,e[219]=s.decodeTag64,e[220]=a,e[221]=a,e[222]=a,e[223]=a;for(let n=224;n<=243;n++)e[n]=l("simple values are not supported");e[244]=a,e[245]=a,e[246]=a,e[247]=p.decodeUndefined,e[248]=l("simple values are not supported"),e[249]=p.decodeFloat16,e[250]=p.decodeFloat32,e[251]=p.decodeFloat64,e[252]=a,e[253]=a,e[254]=a,e[255]=p.decodeBreak;const t=[];for(let n=0;n<24;n++)t[n]=new d.Token(d.Type.uint,n,1);for(let n=-1;n>=-24;n--)t[31-n]=new d.Token(d.Type.negint,n,1);t[64]=new d.Token(d.Type.bytes,new Uint8Array(0),1),t[96]=new d.Token(d.Type.string,"",1),t[128]=new d.Token(d.Type.array,0,1),t[160]=new d.Token(d.Type.map,0,1),t[244]=new d.Token(d.Type.false,!1,1),t[245]=new d.Token(d.Type.true,!0,1),t[246]=new d.Token(d.Type.null,null,1);function r(n){switch(n.type){case d.Type.false:return u.fromArray([244]);case d.Type.true:return u.fromArray([245]);case d.Type.null:return u.fromArray([246]);case d.Type.bytes:return n.value.length?void 0:u.fromArray([64]);case d.Type.string:return n.value===""?u.fromArray([96]):void 0;case d.Type.array:return n.value===0?u.fromArray([128]):void 0;case d.Type.map:return n.value===0?u.fromArray([160]):void 0;case d.Type.uint:return n.value<24?u.fromArray([Number(n.value)]):void 0;case d.Type.negint:if(n.value>=-24)return u.fromArray([31-Number(n.value)])}}return Le.jump=e,Le.quick=t,Le.quickEncodeToken=r,Le}var Xt;function Br(){if(Xt)return Ue;Xt=1;const d=gn(),u=ye(),c=je(),g=En(),E=Ie(),b=Fe(),I=_r(),S=Tt(),o=Or(),s=Nr(),p=Rr(),a=vr(),l=xr(),e=wr(),t={float64:!1,mapSorter:O,quickEncodeToken:e.quickEncodeToken},r=Object.freeze({float64:!0,mapSorter:T,quickEncodeToken:e.quickEncodeToken});function n(){const _=[];return _[u.Type.uint.major]=b.encodeUint,_[u.Type.negint.major]=I.encodeNegint,_[u.Type.bytes.major]=S.encodeBytes,_[u.Type.string.major]=o.encodeString,_[u.Type.array.major]=s.encodeArray,_[u.Type.map.major]=p.encodeMap,_[u.Type.tag.major]=a.encodeTag,_[u.Type.float.major]=l.encodeFloat,_}const A=n(),i=new g.Bl;var D=class Cr{constructor(M,V){this.obj=M,this.parent=V}includes(M){let V=this;do if(V.obj===M)return!0;while(V=V.parent);return!1}static createCheck(M,V){if(M&&M.includes(V))throw new Error(`${E.encodeErrPrefix} object contains circular references`);return new Cr(V,M)}};const k={null:new u.Token(u.Type.null,null),undefined:new u.Token(u.Type.undefined,void 0),true:new u.Token(u.Type.true,!0),false:new u.Token(u.Type.false,!1),emptyArray:new u.Token(u.Type.array,0),emptyMap:new u.Token(u.Type.map,0)},B={number(_,M,V,F){return!Number.isInteger(_)||!Number.isSafeInteger(_)?new u.Token(u.Type.float,_):_>=0?new u.Token(u.Type.uint,_):new u.Token(u.Type.negint,_)},bigint(_,M,V,F){return _>=BigInt(0)?new u.Token(u.Type.uint,_):new u.Token(u.Type.negint,_)},Uint8Array(_,M,V,F){return new u.Token(u.Type.bytes,_)},string(_,M,V,F){return new u.Token(u.Type.string,_)},boolean(_,M,V,F){return _?k.true:k.false},null(_,M,V,F){return k.null},undefined(_,M,V,F){return k.undefined},ArrayBuffer(_,M,V,F){return new u.Token(u.Type.bytes,new Uint8Array(_))},DataView(_,M,V,F){return new u.Token(u.Type.bytes,new Uint8Array(_.buffer,_.byteOffset,_.byteLength))},Array(_,M,V,F){if(!_.length)return V.addBreakTokens===!0?[k.emptyArray,new u.Token(u.Type.break)]:k.emptyArray;F=D.createCheck(F,_);const N=[];let P=0;for(const w of _)N[P++]=v(w,V,F);return V.addBreakTokens?[new u.Token(u.Type.array,_.length),N,new u.Token(u.Type.break)]:[new u.Token(u.Type.array,_.length),N]},Object(_,M,V,F){const N=M!=="Object",P=N?_.keys():Object.keys(_),w=N?_.size:P.length;let q;if(w){q=new Array(w),F=D.createCheck(F,_);const Q=!N&&V.ignoreUndefinedProperties;let Y=0;for(const z of P){const j=N?_.get(z):_[z];Q&&j===void 0||(q[Y++]=[v(z,V,F),v(j,V,F)])}Y<w&&(q.length=Y)}return q?.length?(m(q,V),V.addBreakTokens?[new u.Token(u.Type.map,q.length),q,new u.Token(u.Type.break)]:[new u.Token(u.Type.map,q.length),q]):V.addBreakTokens===!0?[k.emptyMap,new u.Token(u.Type.break)]:k.emptyMap},Tagged(_,M,V,F){return[new u.Token(u.Type.tag,_.tag),v(_.value,V,F)]}};B.Map=B.Object,B.Buffer=B.Uint8Array;for(const _ of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))B[`${_}Array`]=B.DataView;function v(_,M={},V){const F=d.is(_),N=M&&M.typeEncoders&&M.typeEncoders[F]||B[F];if(typeof N=="function"){const w=N(_,F,M,V);if(w!=null)return w}const P=B[F];if(!P)throw new Error(`${E.encodeErrPrefix} unsupported type: ${F}`);return P(_,F,M,V)}function m(_,M){M.mapSorter&&_.sort(M.mapSorter)}function O(_,M){const V=Array.isArray(_[0])?_[0][0]:_[0],F=Array.isArray(M[0])?M[0][0]:M[0];if(V.type!==F.type)return V.type.compare(F.type);const N=A[V.type.major].compareTokens(V,F);return N===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),N}function T(_,M){if(_[0]instanceof u.Token&&M[0]instanceof u.Token){const V=_[0],F=M[0];return V._keyBytes||(V._keyBytes=f(V.value)),F._keyBytes||(F._keyBytes=f(F.value)),c.compare(V._keyBytes,F._keyBytes)}throw new Error("rfc8949MapSorter: complex key types are not supported yet")}function f(_){return ee(_,A,r)}function J(_,M,V,F){if(Array.isArray(M))for(const N of M)J(_,N,V,F);else V[M.type.major](_,M,F)}const h=u.Type.uint.majorEncoded,H=u.Type.negint.majorEncoded,G=u.Type.bytes.majorEncoded,x=u.Type.string.majorEncoded,U=u.Type.array.majorEncoded,L=u.Type.float.majorEncoded|l.MINOR_FALSE,y=u.Type.float.majorEncoded|l.MINOR_TRUE,$=u.Type.float.majorEncoded|l.MINOR_NULL,R=u.Type.float.majorEncoded|l.MINOR_UNDEFINED,C=BigInt(-1),K=BigInt(1);function W(_){return _.addBreakTokens!==!0}function Z(_,M,V,F){const N=d.is(M),P=V.typeEncoders&&V.typeEncoders[N];if(P){const w=P(M,N,V,F);if(w!=null){J(_,w,A,V);return}}switch(N){case"null":_.push([$]);return;case"undefined":_.push([R]);return;case"boolean":_.push([M?y:L]);return;case"number":!Number.isInteger(M)||!Number.isSafeInteger(M)?l.encodeFloat(_,new u.Token(u.Type.float,M),V):M>=0?b.encodeUintValue(_,h,M):b.encodeUintValue(_,H,M*-1-1);return;case"bigint":M>=BigInt(0)?b.encodeUintValue(_,h,M):b.encodeUintValue(_,H,M*C-K);return;case"string":{const w=c.fromString(M);b.encodeUintValue(_,x,w.length),_.push(w);return}case"Uint8Array":b.encodeUintValue(_,G,M.length),_.push(M);return;case"Array":if(!M.length){_.push([U]);return}F=D.createCheck(F,M),b.encodeUintValue(_,U,M.length);for(const w of M)Z(_,w,V,F);return;case"Object":case"Map":J(_,B.Object(M,N,V,F),A,V);return;default:{const w=B[N];if(!w)throw new Error(`${E.encodeErrPrefix} unsupported type: ${N}`);J(_,w(M,N,V,F),A,V)}}}function ee(_,M,V,F){const N=F instanceof Uint8Array;let P=N?new g.U8Bl(F):i;const w=v(_,V);if(!Array.isArray(w)&&V.quickEncodeToken){const q=V.quickEncodeToken(w);if(q)return N?(P.push(q),P.toBytes()):q;const Q=M[w.type.major];if(Q.encodedSize){const Y=Q.encodedSize(w,V);if(N||(P=new g.Bl(Y)),Q(P,w,V),P.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${w} was wrong`);return N?P.toBytes():c.asU8A(P.chunks[0])}}return P.reset(),J(P,w,M,V),P.toBytes(!0)}function ae(_,M){return M=Object.assign({},t,M),W(M)?(i.reset(),Z(i,_,M,void 0),i.toBytes(!0)):ee(_,A,M)}return Ue.encode=ae,Ue.objectToTokens=v,Ue.rfc8949EncodeOptions=r,Ue}var Ce={},Zt;function Pr(){if(Zt)return Ce;Zt=1;const d=ye(),u=je(),c=Ie(),g=wr(),E={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0};var b=class{constructor(r,n={}){this._pos=0,this.data=r,this.options=n}pos(){return this._pos}done(){return this._pos>=this.data.length}next(){const r=this.data[this._pos];let n=g.quick[r];if(n===void 0){const A=g.jump[r];if(!A)throw new Error(`${c.decodeErrPrefix} no decoder for major type ${r>>>5} (byte 0x${r.toString(16).padStart(2,"0")})`);const i=r&31;n=A(this.data,this._pos,i,this.options)}return this._pos+=n.encodedLength,n}};const I=Symbol.for("DONE"),S=Symbol.for("BREAK");function o(r,n,A){const i=[];for(let D=0;D<r.value;D++){const k=l(n,A);if(k===S){if(r.value===1/0)break;throw new Error(`${c.decodeErrPrefix} got unexpected break to lengthed array`)}if(k===I)throw new Error(`${c.decodeErrPrefix} found array but not enough entries (got ${D}, expected ${r.value})`);i[D]=k}return i}function s(r,n,A){const i=A.useMaps===!0,D=A.rejectDuplicateMapKeys===!0,k=i?void 0:{},B=i?new Map:void 0;for(let v=0;v<r.value;v++){const m=l(n,A);if(m===S){if(r.value===1/0)break;throw new Error(`${c.decodeErrPrefix} got unexpected break to lengthed map`)}if(m===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${v} [no key], expected ${r.value})`);if(!i&&typeof m!="string")throw new Error(`${c.decodeErrPrefix} non-string keys not supported (got ${typeof m})`);if(D&&(i&&B.has(m)||!i&&Object.hasOwn(k,m)))throw new Error(`${c.decodeErrPrefix} found repeat map key "${m}"`);const O=l(n,A);if(O===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${v} [no value], expected ${r.value})`);i?B.set(m,O):k[m]=O}return i?B:k}function*p(r,n,A){for(let i=0;i<r.value;i++){const D=l(n,A);if(D===S){if(r.value===1/0)break;throw new Error(`${c.decodeErrPrefix} got unexpected break to lengthed map`)}if(D===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${i} [no key], expected ${r.value})`);const k=l(n,A);if(k===I)throw new Error(`${c.decodeErrPrefix} found map but not enough entries (got ${i} [no value], expected ${r.value})`);yield[D,k]}}function a(r,n){let A=!1;const i=function(){if(A)throw new Error(`${c.decodeErrPrefix} tag decode() may only be called once`);A=!0;const D=l(r,n);if(D===I)throw new Error(`${c.decodeErrPrefix} tag content missing`);if(D===S)throw new Error(`${c.decodeErrPrefix} got unexpected break in tag content`);return D};return i.entries=function(){if(A)throw new Error(`${c.decodeErrPrefix} tag decode() may only be called once`);A=!0;const D=r.next();if(!d.Type.equals(D.type,d.Type.map))throw new Error(`${c.decodeErrPrefix} entries() requires map content, got ${D.type.name}`);const k=[];for(const B of p(D,r,n))k.push(B);return k},Object.defineProperty(i,"_called",{get(){return A},enumerable:!1}),i}function l(r,n){if(r.done())return I;const A=r.next();if(d.Type.equals(A.type,d.Type.break))return S;if(A.type.terminal)return A.value;if(d.Type.equals(A.type,d.Type.array))return o(A,r,n);if(d.Type.equals(A.type,d.Type.map))return s(A,r,n);if(d.Type.equals(A.type,d.Type.tag)){if(n.tags&&typeof n.tags[A.value]=="function"){const i=a(r,n),D=n.tags[A.value](i);if(!i._called)throw new Error(`${c.decodeErrPrefix} tag decoder must call decode() or entries()`);return D}throw new Error(`${c.decodeErrPrefix} tag not supported (${A.value})`)}throw new Error("unsupported")}function e(r,n){if(!(r instanceof Uint8Array))throw new Error(`${c.decodeErrPrefix} data to decode must be a Uint8Array`);n=Object.assign({},E,n);const A=u.asU8A(r),i=n.tokenizer||new b(A,n),D=l(i,n);if(D===I)throw new Error(`${c.decodeErrPrefix} did not find any content to decode`);if(D===S)throw new Error(`${c.decodeErrPrefix} got unexpected break`);return[D,r.subarray(i.pos())]}function t(r,n){const[A,i]=e(r,n);if(i.length>0)throw new Error(`${c.decodeErrPrefix} too many terminals, data makes no sense`);return A}return Ce.Tokeniser=b,Ce.decode=t,Ce.decodeFirst=e,Ce.tokensToObject=l,Ce}var at={},Qt;function Ur(){if(Qt)return at;Qt=1;var d=class mt{constructor(c,g){if(typeof c!="number"||!Number.isInteger(c)||c<0)throw new TypeError("Tagged: tag must be a non-negative integer");this.tag=c,this.value=g}static decoder(c){return g=>new mt(c,g())}static preserve(...c){const g={};for(const E of c)g[E]=mt.decoder(E);return g}};return Object.defineProperty(d.prototype,Symbol.toStringTag,{value:"Tagged"}),at.Tagged=d,at}var Yt={},zt;function In(){return zt||(zt=1,ye(),Br(),Pr(),Ur()),Yt}var me={},er;function Mr(){if(er)return me;er=1;const d=[],u={},c={};function g(o){const s=d.find(a=>a.getMessageType(o).fn);if(s)return s.getMessageType(o);const p=d.find(a=>a.getMessageType(o).fields);return p?p.getMessageType(o):{}}function E(o){const s=d.find(p=>p.toTypeUrl(o)!==o);return s?s.toTypeUrl(o):o}function b(o){const s=d.find(p=>p.fromTypeUrl(o)!==o);return s?s.fromTypeUrl(o):o}function I(o){if(["getMessageType","toTypeUrl","fromTypeUrl"].some(s=>typeof o[s]!="function"))throw new Error("addProvider requires a valid proto provider");d.includes(o)===!1&&(d.push(o),o.enums&&Object.assign(u,o.enums),o.messages&&Object.assign(c,o.messages))}function S(){for(;d.length;)d.pop()}return me.addProvider=I,me.enums=u,me.fromTypeUrl=b,me.getMessageType=g,me.messages=c,me.resetProviders=S,me.toTypeUrl=E,me}var tr;function Hn(){if(tr)return Pe;tr=1,Gr();const d=Br(),u=Pr(),c=Ur();In();const g=Mr();let E=xe();const b=55799,I=2,S=3,o=new Uint8Array([217,217,247]),s=new Set(["int32","sint32","uint32","sfixed32","fixed32","int64","sint64","uint64","sfixed64","fixed64"]),p=new Set(["double","float"]),a=new Set(["BigUint","BigSint"]),l=new Set(["google.protobuf.Timestamp","Timestamp"]),e=new Set(["google.protobuf.Any","Any"]);function t(y){const $=g.getMessageType(y);if(!$||!$.fields)throw new Error(`canonical-cbor: unknown message type "${y}"`);return $.fields}function r(y){return Object.prototype.hasOwnProperty.call(g.enums,y)}function n(y){let $=0;for(;$<y.length-1&&y[$]===0;)$+=1;return $===0?y:y.slice($)}function A(y,$){if(y==null)return null;if(typeof y=="object"&&y!==null&&"value"in y){const C=y;if(C.value===void 0||C.value===null)return null;const K=(0,E.toUint8Array)(C.value);if(!K||K.length===0)return null;const W=n(K);return W.length===1&&W[0]===0?null:{bytes:W,negative:$==="BigSint"&&C.minus===!0}}if(typeof y=="bigint"){if(y===0n)return null;const C=y<0n,K=(C?-y:y).toString(16),W=K.length%2===0?K:`0${K}`,Z=new Uint8Array(W.length/2);for(let ee=0;ee<Z.length;ee+=1)Z[ee]=Number.parseInt(W.slice(ee*2,ee*2+2),16);return{bytes:Z,negative:C&&$==="BigSint"}}const R=(0,E.toBN)(y);return R.isZero()?null:{bytes:n(new Uint8Array(R.toArray())),negative:R.isNeg()&&$==="BigSint"}}function i(y){if(typeof y=="bigint")return y;if(typeof y=="number"){if(!Number.isInteger(y))throw new Error(`canonical-cbor: non-integer value for integer field: ${y}`);return y}if(typeof y=="string")return y===""?0n:BigInt(y);throw new Error(`canonical-cbor: cannot encode integer value of type ${typeof y}`)}function D(y,$){if(y==null)return!0;if(s.has($))return typeof y=="number"?y===0:typeof y=="bigint"?y===0n:typeof y=="string"?y===""||y==="0":!1;if(p.has($))return y===0;if($==="bool")return y===!1;if($==="string")return y==="";if($==="bytes"){if(typeof y=="string")return y.length===0;const R=(0,E.toUint8Array)(y);return!R||R.length===0}return r($)?y===0||y===""||y===void 0:!1}function k(y){if(y==null||y==="")return"";if(typeof y=="string"){const $=Date.parse(y);if(Number.isNaN($))throw new Error("canonical-cbor: invalid timestamp string (unparseable)");return new Date(Math.trunc($)).toISOString()}if(typeof y=="object"){const{seconds:$=0,nanos:R=0}=y,C=(typeof $=="string"?Number.parseInt($,10):$)*1e3+Math.trunc((R||0)/1e6);return new Date(C).toISOString()}throw new Error(`canonical-cbor: unsupported timestamp input type ${typeof y}`)}function B(y){const $=y.typeUrl||y.type_url||g.toTypeUrl(y.type);if(!$)throw new Error("canonical-cbor: Any value missing typeUrl/type");const R=g.fromTypeUrl($),C=!y.typeUrl&&!y.type_url&&typeof y.type=="string";return{typeUrl:$,type:R,inner:C?y.value:y,wasUnwrapped:C}}function v(y){if(y==null)return y;if(y instanceof Date)return y.toISOString();if(y instanceof Uint8Array)return y;if(Array.isArray(y))return y.map(v);if(typeof y=="object"){const $={};for(const[R,C]of Object.entries(y))C!==void 0&&($[R]=v(C));return $}return y}function m(y){const{typeUrl:$,type:R,inner:C,wasUnwrapped:K}=B(y),W=new Map;if(W.set(0,$),$==="json"||$==="vc"||$==="fg:x:address"){const ee=K?C:y.value??C;return W.set(1,v(ee)),W}let Z={};if(C&&typeof C=="object"&&(Z={...C},!K&&(delete Z.typeUrl,delete Z.type_url,typeof Z.type=="string"))){let ee;try{ee=t(R)}catch{ee=null}(!ee||!("type"in ee))&&delete Z.type}try{const ee=T(R,Z);for(const[ae,_]of ee.entries())W.set(ae,_)}catch(ee){if(ee instanceof Error&&ee.message.startsWith("canonical-cbor: unknown message type")&&"value"in y)return W.set(1,y.value),W;throw ee}return W}function O(y,$){const R=$.type;if($.keyType!==void 0)throw new Error(`canonical-cbor: map<${$.keyType},${R}> fields are not supported yet`);if($.rule==="repeated"){if(!Array.isArray(y))throw new Error(`canonical-cbor: repeated field expects array, got ${typeof y}`);const C={id:$.id,type:R};return y.map(K=>O(K,C))}if(a.has(R)){const C=A(y,R);return C?new c.Tagged(C.negative?S:I,C.bytes):void 0}if(l.has(R))return k(y);if(e.has(R))return y==null?void 0:m(y);if(r(R)){if(typeof y=="string"){const C=g.enums[R]?.[y];if(C===void 0)throw new Error(`canonical-cbor: unknown enum value "${y}" for ${R}`);return Number(C)}return Number(y)}if(s.has(R))return i(y);if(p.has(R))return Number(y);if(R==="bool")return!!y;if(R==="string")return String(y);if(R==="bytes")return y instanceof Uint8Array?y:(0,E.toUint8Array)(y)??new Uint8Array;if(typeof y!="object"||y===null)throw new Error(`canonical-cbor: expected object for nested ${R}, got ${typeof y}`);return T(R,y)}function T(y,$){if(a.has(y)){const K=A($,y),W=new Map;if(!K)return W;const Z=K.negative?S:I;return W.set(1,new c.Tagged(Z,K.bytes)),y==="BigSint"&&K.negative&&W.set(2,!0),W}const R=t(y),C=new Map;for(const[K,W]of Object.entries(R)){const Z=W.rule==="repeated"?`${K}List`:W.keyType?`${K}Map`:null,ee=K in $,ae=Z!==null&&Z in $;if(!ee&&!ae)continue;const _=ee?$[K]:$[Z];if(_===void 0)continue;if(W.rule==="repeated"){if(_===null)continue;if(!Array.isArray(_))throw new Error(`canonical-cbor: repeated field "${K}" expects array, got ${typeof _}`);if(_.length===0)continue;C.set(W.id,O(_,W));continue}if(D(_,W.type))continue;const M=O(_,W);M!==void 0&&C.set(W.id,M)}return C}function f(y,$){if(!$||typeof $!="object")throw new Error("canonical-cbor: data must be an object");return d.encode(new c.Tagged(b,T(y,$)),d.rfc8949EncodeOptions)}function J(y){const $=t(y),R=new Map;for(const[C,K]of Object.entries($))R.set(K.id,{name:C,field:K});return{idToName:R}}function h(y){if(y instanceof Map){const $={};for(const[R,C]of y.entries())$[String(R)]=h(C);return $}return Array.isArray(y)?y.map(h):y}function H(y){const $=y.get(0);if(!$||typeof $!="string")throw new Error("canonical-cbor: Any payload missing typeUrl at key 0");if($==="json"||$==="vc"||$==="fg:x:address")return{typeUrl:$,value:h(y.get(1))};const R=g.fromTypeUrl($);let C;try{C=t(R)}catch{C=null}if(!C)return{typeUrl:$,value:y.get(1)};const K={typeUrl:$};for(const[W,Z]of y.entries()){if(W===0)continue;const ee=Object.entries(C).find(([,M])=>M.id===W);if(!ee)continue;const[ae,_]=ee;K[ae]=G(Z,_)}return K}function G(y,$){const R=$.type;if($.rule==="repeated"){if(!Array.isArray(y))return y;const C={id:$.id,type:R};return y.map(K=>G(K,C))}if(a.has(R)){if(y instanceof c.Tagged){if(y.tag!==I&&y.tag!==S)throw new Error(`canonical-cbor: BigInt wrapper expects tag 2/3, got ${y.tag}`);const C=y.value,K=y.tag===S,W={value:C};return R==="BigSint"&&(W.minus=K),W}return y}if(l.has(R)){if(typeof y!="string")throw new Error("canonical-cbor: Timestamp expected string");return y}if(e.has(R)){if(!(y instanceof Map))throw new Error("canonical-cbor: Any expected nested map");return H(y)}return r(R)?typeof y=="bigint"?Number(y):y:s.has(R)?y:p.has(R)?Number(y):R==="bool"?!!y:R==="string"?String(y):R==="bytes"?y:y instanceof Map?x(R,y):y}function x(y,$){const R=J(y),C={};for(const[K,W]of $.entries()){const Z=R.idToName.get(K);if(!Z)continue;const ee=G(W,Z.field);C[Z.name]=ee,Z.field.rule==="repeated"?C[`${Z.name}List`]=ee:Z.field.keyType!==void 0&&(C[`${Z.name}Map`]=ee)}return C}function U(y,$){if(!$||!($ instanceof Uint8Array))throw new Error("canonical-cbor: input must be Uint8Array");if($.length<3||$[0]!==o[0]||$[1]!==o[1]||$[2]!==o[2])throw new Error("canonical-cbor: missing self-describe tag 55799 prefix");const R=u.decode($,{tags:{...c.Tagged.preserve(I,S),[b]:C=>C()},useMaps:!0});if(!(R instanceof Map))throw new Error("canonical-cbor: payload is not a CBOR map");return x(y,R)}const L=o;return Pe.CANONICAL_SELF_DESCRIBE_PREFIX=L,Pe.canonicalBytes=f,Pe.parseCanonical=U,Pe}var rr={},nr;function hn(){if(nr)return rr;nr=1;const d=Gr(),u=Mr();let c=Ft();return c=d.__toESM(c),u.addProvider(c.default),rr}var ir;function Lr(){if(ir)return Re;ir=1;const d=Hn();hn();function u(g){return d.canonicalBytes("Transaction",g)}function c(g){return d.parseCanonical("Transaction",g)}return Re.CANONICAL_SELF_DESCRIBE_PREFIX=d.CANONICAL_SELF_DESCRIBE_PREFIX,Re.canonicalBytes=d.canonicalBytes,Re.decodeTx=c,Re.encodeTx=u,Re.parseCanonical=d.parseCanonical,Re}var dt={},sr;function Dn(){if(sr)return dt;sr=1;const d=18;return dt.DEFAULT_TOKEN_DECIMAL=d,dt}var Ye={},ut={},or;function Vr(){if(or)return ut;or=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return ut.__toESM=S,ut}var Ve={},ze={},ar;function mn(){if(ar)return ze;ar=1;const d=Vr();let u=nn();u=d.__toESM(u);const c=E=>["ctx","data","input"].includes(E.split(".").shift()??""),g=(E,b)=>{const I=(0,u.default)(E,{safe:!0}),S=Object.keys(I).map(o=>o.split(".")).filter(o=>o.includes(b)).map(o=>o.slice(0,o.lastIndexOf(b)+1)).sort((o,s)=>s.length-o.length).map(o=>o.join("."));return Array.from(new Set(S))};return ze.findPrerenderKeys=g,ze.isValidNotation=c,ze}var fe={},ct={},dr;function Fn(){if(dr)return ct;dr=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return ct.__toESM=S,ct}var pt={},ur;function Tn(){return ur||(ur=1,(function(d){var u="@arcblock/vc";Object.defineProperty(d,"name",{enumerable:!0,get:function(){return u}})})(pt)),pt}var ge={},$t={},cr;function Jn(){if(cr)return $t;cr=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return $t.__toESM=S,$t}var $e={},lt={},pr;function Sn(){if(pr)return lt;pr=1;var d=Object.create,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,E=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,I=(o,s,p,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(var l=g(s),e=0,t=l.length,r;e<t;e++)r=l[e],!b.call(o,r)&&r!==p&&u(o,r,{get:(n=>s[n]).bind(null,r),enumerable:!(a=c(s,r))||a.enumerable});return o},S=(o,s,p)=>(p=o!=null?d(E(o)):{},I(s||!o||!o.__esModule?u(p,"default",{value:o,enumerable:!0}):p,o));return lt.__toESM=S,lt}var At,$r;function Wr(){return $r||($r=1,At=function(d,u){u||(u={}),typeof u=="function"&&(u={cmp:u});var c=typeof u.cycles=="boolean"?u.cycles:!1,g=u.cmp&&(function(b){return function(I){return function(S,o){var s={key:S,value:I[S]},p={key:o,value:I[o]};return b(s,p)}}})(u.cmp),E=[];return(function b(I){if(I&&I.toJSON&&typeof I.toJSON=="function"&&(I=I.toJSON()),I!==void 0){if(typeof I=="number")return isFinite(I)?""+I:"null";if(typeof I!="object")return JSON.stringify(I);var S,o;if(Array.isArray(I)){for(o="[",S=0;S<I.length;S++)S&&(o+=","),o+=b(I[S])||"null";return o+"]"}if(I===null)return"null";if(E.indexOf(I)!==-1){if(c)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=E.push(I)-1,p=Object.keys(I).sort(g&&g(I));for(o="",S=0;S<p.length;S++){var a=p[S],l=b(I[a]);l&&(o&&(o+=","),o+=JSON.stringify(a)+":"+l)}return E.splice(s,1),"{"+o+"}"}})(d)}),At}var lr;function bn(){if(lr)return $e;lr=1;const d=Sn();let u=we(),c=ke(),g=xe(),E=rt();E=d.__toESM(E);let b=Wr();b=d.__toESM(b);const I=(0,E.default)("@arcblock/jwt"),S="1.1.0",o=c.Hasher.SHA3.hash256;function s(T){const f=T.match(/(\d+\.\d+\.\d+)/);return f?f[1]:null}function p(T,f){const J=T.split(".").map(Number),h=f.split(".").map(Number);for(let H=0;H<3;H++){if((J[H]||0)>(h[H]||0))return!0;if((J[H]||0)<(h[H]||0))return!1}return!0}async function a(T,f,J={},h=!0,H="1.0.0"){if((0,u.isValid)(T)===!1)throw new Error("Cannot do sign with invalid signer");const G=(0,u.toTypeInfo)(T),x={[c.types.KeyType.SECP256K1]:{alg:"ES256K",type:"JWT"},[c.types.KeyType.ED25519]:{alg:"Ed25519",type:"JWT"},[c.types.KeyType.ETHEREUM]:{alg:"Ethereum",type:"JWT"},[c.types.KeyType.PASSKEY]:{alg:"Passkey",type:"JWT"}};if(G.pk===void 0)throw new Error("Cannot determine key type from signer");const U=x[G.pk],L=(0,g.toBase64)((0,b.default)(U)),y=(0,u.extractMethod)(T)||"abt",$=Math.floor(Date.now()/1e3),R={iss:(0,u.toDid)(T,y),iat:String($),nbf:String($),exp:String($+300),version:H,...J||{}};Object.keys(R).forEach(ee=>{(typeof R[ee]>"u"||R[ee]==null||R[ee]==="")&&delete R[ee]});const C=(0,g.toBase64)((0,b.default)(R));I("sign.body",R);const K=(0,g.toHex)(`${L}.${C}`),W=s(H),Z=W&&p(W,S)?o(K):K;return h?[L,C,(0,g.toBase64)((0,c.getSigner)(G.pk).sign(Z,f))].join("."):`${L}.${C}`}async function l(T,f,J={}){return a(T,f,J,!!f,"1.1.0")}function e(T){if(!T)throw new Error("Cannot compute challenge from empty token");const f=T.split(".");return o((0,g.toHex)(`${f[0]}.${f[1]}`))}function t(T,f){if(!T)throw new Error("Cannot assemble JWT from empty token");if(T.split(".").length!==2)throw new Error("Cannot assemble JWT: expected unsigned token with exactly 2 parts (headerB64.bodyB64)");if(!f||!f.authenticatorData||!f.clientDataJSON||!f.signature)throw new Error("Cannot assemble JWT: assertion must contain authenticatorData, clientDataJSON, and signature");return`${T}.${(0,g.toBase64)(JSON.stringify(f))}`}function r(T,f=!0){const[J,h,H]=T.split("."),G=JSON.parse((0,g.fromBase64)(J).toString()),x=JSON.parse((0,g.fromBase64)(h).toString()),U=Buffer.from(Uint8Array.from((0,g.fromBase64)(H))).toString("hex");return f?x:{header:G,body:x,signature:`0x${(0,u.toStrictHex)(U)}`}}async function n(T,f,J){const{tolerance:h,enforceTimestamp:H,signerKey:G}=Object.assign({tolerance:5,enforceTimestamp:!0,signerKey:"iss"},J);try{const[x,U]=T.split("."),{header:L,body:y,signature:$}=r(T,!1);if(!$)return I("verify.error.emptySig"),!1;if(!L.alg)return I("verify.error.emptyAlg"),!1;const R=y[G];if(!R)return I("verify.error.emptySignerDid"),!1;if((0,u.isFromPublicKey)(R,f)===!1)return I("verify.error.signerDidAndPkNotMatch"),!1;if(H){const W=Math.ceil(Date.now()/1e3),Z=Number(y.exp)||0,ee=Number(y.iat)||0,ae=Number(y.nbf)||0;if(I("verify.enforceTimestamp",{now:W,exp:Z,iat:ee,nbf:ae}),Z&&Z+h<W)return I("verify.error.expired"),!1;if(ee&&ee>W&&ee-W>h)return I("verify.error.issuedAt"),!1;if(ae&&ae>W&&ae-W>h)return I("verify.error.notBefore"),!1}const C=L.alg.toLowerCase();if(C==="passkey"){const[,,W]=T.split("."),Z=JSON.parse((0,g.fromBase64)(W).toString());if(!Z.authenticatorData||!Z.clientDataJSON||!Z.signature)return I("verify.error.incompletePasskeyAssertion"),!1;const ee=o((0,g.toHex)(`${x}.${U}`)),ae=JSON.stringify({authenticatorData:Z.authenticatorData,clientDataJSON:Z.clientDataJSON});return await(0,c.getSigner)(c.types.KeyType.PASSKEY).verify(ee,Z.signature,f,ae)}const K={secp256k1:(0,c.getSigner)(c.types.KeyType.SECP256K1),es256k:(0,c.getSigner)(c.types.KeyType.SECP256K1),ed25519:(0,c.getSigner)(c.types.KeyType.ED25519),ethereum:(0,c.getSigner)(c.types.KeyType.ETHEREUM)};if(K[C]){const W=(0,g.toHex)(`${x}.${U}`),Z=(y.version?s(y.version):null)||"";return Z&&Z===S?K[C].verify(o(W),$,f):K[C].verify(W,$,f)}return I("verify.error.crypto"),!1}catch(x){return I("verify.error.exception"),I(x),!1}}const A="1.1.0",i={[c.types.KeyType.ED25519]:{alg:"Ed25519",typ:"DelegationToken"},[c.types.KeyType.SECP256K1]:{alg:"ES256K",typ:"DelegationToken"},[c.types.KeyType.ETHEREUM]:{alg:"Ethereum",typ:"DelegationToken"},[c.types.KeyType.PASSKEY]:{alg:"Passkey",typ:"DelegationToken"}};async function D(T,f,J){if((0,u.isValid)(T)===!1)throw new Error("Cannot sign DelegationToken with invalid signer");const h=(0,u.toTypeInfo)(T);if(h.pk===void 0)throw new Error("Cannot determine key type from signer");const H=i[h.pk],G=(0,g.toBase64)((0,b.default)(H)),x=(0,u.extractMethod)(T)||"abt",U=Math.floor(Date.now()/1e3),L={iss:(0,u.toDid)(T,x),sub:J.sub,iat:J.iat||String(U),nbf:J.nbf||String(U),exp:J.exp||String(U+300),version:A,ops:J.ops,pk:(0,c.getSigner)(h.pk).getPublicKey(f,"hex")};if(J.deny&&J.deny.length>0){for(const R of J.deny)if(!R.startsWith("fg:"))throw new Error(`Invalid deny pattern "${R}": must start with "fg:"`);L.deny=J.deny}J.delegation&&(L.delegation=J.delegation);const y=(0,g.toBase64)((0,b.default)(L)),$=o((0,g.toHex)(`${G}.${y}`));return[G,y,(0,g.toBase64)((0,c.getSigner)(h.pk).sign($,f))].join(".")}async function k(T,f,J){if((0,u.isValid)(T)===!1)throw new Error("Cannot sign DelegationToken with invalid signer");const h=(0,u.toTypeInfo)(T);if(h.pk===void 0)throw new Error("Cannot determine key type from signer");const H=i[h.pk],G=(0,g.toBase64)((0,b.default)(H)),x=(0,u.extractMethod)(T)||"abt",U=Math.floor(Date.now()/1e3),L=typeof f=="string"?f:(0,g.toHex)(f),y={iss:(0,u.toDid)(T,x),sub:J.sub,iat:J.iat||String(U),nbf:J.nbf||String(U),exp:J.exp||String(U+300),version:A,ops:J.ops,pk:L};if(J.deny&&J.deny.length>0){for(const $ of J.deny)if(!$.startsWith("fg:"))throw new Error(`Invalid deny pattern "${$}": must start with "fg:"`);y.deny=J.deny}return J.delegation&&(y.delegation=J.delegation),`${G}.${(0,g.toBase64)((0,b.default)(y))}`}function B(T,f){if(!T)throw new Error("Cannot assemble DelegationToken from empty token");if(T.split(".").length!==2)throw new Error("Cannot assemble DelegationToken: expected unsigned token with exactly 2 parts (headerB64.bodyB64)");if(!f||!f.authenticatorData||!f.clientDataJSON||!f.signature)throw new Error("Cannot assemble DelegationToken: assertion must contain authenticatorData, clientDataJSON, and signature");return`${T}.${(0,g.toBase64)(JSON.stringify(f))}`}function v(T){const f=T.split(".");if(f.length!==3)throw new Error("Invalid delegation token format: expected 3 parts");const[J,h,H]=f;return{header:JSON.parse((0,g.fromBase64)(J).toString()),body:JSON.parse((0,g.fromBase64)(h).toString()),signature:`0x${(0,u.toStrictHex)(Buffer.from(Uint8Array.from((0,g.fromBase64)(H))).toString("hex"))}`}}async function m(T){try{const[f,J]=T.split("."),{header:h,body:H,signature:G}=v(T);if(h.typ!=="DelegationToken")return I("delegationToken.verify.error.wrongTyp"),!1;if(!G||!h.alg)return I("delegationToken.verify.error.missingSigOrAlg"),!1;if((0,u.isFromPublicKey)(H.iss,H.pk)===!1)return I("delegationToken.verify.error.pkIssMismatch"),!1;const x=Math.floor(Date.now()/1e3),U=Number(H.exp)||0,L=Number(H.nbf)||0,y=Number(H.iat)||0;if(U&&U<x)return I("delegationToken.verify.error.expired"),!1;if(L&&L>x)return I("delegationToken.verify.error.notYetValid"),!1;if(y&&y>x)return I("delegationToken.verify.error.futureIat"),!1;const $=h.alg.toLowerCase();if($==="passkey"){const[,,K]=T.split("."),W=JSON.parse((0,g.fromBase64)(K).toString());if(!W.authenticatorData||!W.clientDataJSON||!W.signature)return I("delegationToken.verify.error.incompletePasskeyAssertion"),!1;const Z=o((0,g.toHex)(`${f}.${J}`)),ee=JSON.stringify({authenticatorData:W.authenticatorData,clientDataJSON:W.clientDataJSON});return await(0,c.getSigner)(c.types.KeyType.PASSKEY).verify(Z,W.signature,H.pk,ee)}const R={ed25519:(0,c.getSigner)(c.types.KeyType.ED25519),es256k:(0,c.getSigner)(c.types.KeyType.SECP256K1),secp256k1:(0,c.getSigner)(c.types.KeyType.SECP256K1),ethereum:(0,c.getSigner)(c.types.KeyType.ETHEREUM)};if(!R[$])return I("delegationToken.verify.error.unknownAlg"),!1;const C=o((0,g.toHex)(`${f}.${J}`));return R[$].verify(C,G,H.pk)}catch(f){return I("delegationToken.verify.error.exception",f),!1}}function O(T,{ops:f,deny:J}){return J&&J.length>0&&(0,g.scopeMatchAny)(T,J)?!1:(0,g.scopeMatchAny)(T,f)}return $e.assemble=t,$e.assembleDelegationToken=B,$e.checkDelegationTokenScope=O,$e.decode=r,$e.decodeDelegationToken=v,$e.getChallenge=e,$e.sign=a,$e.signDelegationToken=D,$e.signDelegationTokenUnsigned=k,$e.signV2=l,$e.verify=n,$e.verifyDelegationToken=m,$e}var Ar;function kn(){if(Ar)return ge;Ar=1;const d=Jn();let u=we(),c=bn();c=d.__toESM(c);let g=ke(),E=xe();const b=u.DidType;function I(e,t="default"){const r=(0,u.DidType)(t),n=(0,g.getSigner)(r.pk),A=(0,g.getHasher)(r.hash);return{type:r,method:e.method&&(0,u.isCryptoMethod)(e.method)?e.method:"abt",secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,u.fromPublicKey)(e.pk,r):e.address,toDid(){return`did:${this.method}:${this.address}`},hash(i,D=1,k="hex"){return A(i,D,k)},async sign(i,D=!0,k="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(D){const B=A(i,1);return n.sign(B,e.sk,k)}return n.sign(i,e.sk,k)},async verify(i,D,k=!0,B){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const v=k?A(i,1):i;return n.verify(v,D,e.pk,B)},ethHash(i){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(i)},async signETH(i,D=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function"||typeof n.ethSign!="function")throw new Error("ethSign is not supported by signer");return D?n.ethSign(n.ethHash(i),(0,E.toHex)(e.sk)):n.ethSign(i,(0,E.toHex)(e.sk))},ethSign(i,D=!0){return this.signETH(i,D)},async ethVerify(i,D,k=!0){if(typeof n.ethHash!="function"||typeof n.ethRecover!="function")throw new Error("ethVerify is not supported by signer");const B=k?n.ethHash(i):i;return n.ethRecover(B,D)===this.address},async signJWT(i={},D=!0,k="1.0.0"){if(!e.sk)throw new Error("Cannot sign JWT without a secretKey");return c.sign(this.toDid(),e.sk,i,D,k)},toAddress(){return e.pk?(0,u.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:u.DidType.toJSON(r),sk:e.sk?(0,E.toHex)(e.sk):"",pk:e.pk?(0,E.toHex)(e.pk):"",address:this.address,method:this.method}}}}function S(e,t="default"){const r=(0,u.DidType)(t);return I({sk:e,pk:(0,g.getSigner)(r.pk).getPublicKey(e)},r)}function o(e,t="default"){return I({pk:e},(0,u.DidType)(t))}function s(e){return I({address:(0,u.toAddress)(e)},(0,u.toTypeInfo)(e))}function p(e="default"){const t=(0,u.DidType)(e),r=(0,g.getSigner)(t.pk).genKeyPair();return I({sk:r.secretKey,pk:r.publicKey},t)}function a(e){const t=u.DidType.fromJSON(e.type);return I({...e,method:e.method},t)}function l(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&typeof e.sign!="function")}return ge.Wallet=I,ge.WalletType=b,ge.fromAddress=s,ge.fromJSON=a,ge.fromPublicKey=o,ge.fromRandom=p,ge.fromSecretKey=S,ge.isValid=l,ge}var yt,yr;function jr(){return yr||(yr=1,yt=d=>{if(typeof d!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof d}\``);return/^[a-zA-Z]:\\/.test(d)?!1:/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(d)}),yt}var fr;function Gn(){if(fr)return fe;fr=1;const d=Fn(),u=Tn();let c=we(),g=ke(),E=xe(),b=kn(),I=rt();I=d.__toESM(I);let S=Wr();S=d.__toESM(S);let o=jr();o=d.__toESM(o);const s=(0,I.default)(u.name),p={[g.types.KeyType.ED25519]:"Ed25519Signature",[g.types.KeyType.SECP256K1]:"Secp256k1Signature",[g.types.KeyType.ETHEREUM]:"EthereumSignature"};async function a({type:i,subject:D,issuer:k,issuanceDate:B,expirationDate:v,tag:m="",endpoint:O="",endpointScope:T="public"}){const f=Array.isArray(i)?[...i]:i?[i]:[];if(f.length===0||f.some(W=>!W))throw new Error("Can not create verifiable credential without empty type");if(f.includes("VerifiableCredential")||f.unshift("VerifiableCredential"),!D)throw new Error("Can not create verifiable credential from empty subject");if(!D.id)throw new Error("Can not create verifiable credential without holder");if(!(0,c.isValid)(D.id))throw new Error("Can not create verifiable credential invalid holder did");if(O&&(0,o.default)(O)===!1)throw new Error("VC Endpoint must be absolute url");if(T&&["public","private"].includes(T)===!1)throw new Error("VC Endpoint scope must be either public or private");const{wallet:J,name:h}=k,H=J.address,G=(0,c.toTypeInfo)(H),x={...G,role:g.types.RoleType.ROLE_VC},U=(0,c.fromPublicKeyHash)(J.hash((0,S.default)(D)),x),L=G.pk;if(!p[L])throw new Error("Unsupported signer type when create verifiable credential");const y=B||new Date().toISOString(),$=(0,E.toBase58)(J.publicKey),R={"@context":["https://www.w3.org/2018/credentials/v1","https://schema.arcblock.io/v0.1/context.jsonld"],id:U,type:f,issuer:{id:H,pk:$,name:h||H},issuanceDate:y,expirationDate:v,credentialSubject:D};m&&(R.tag=m),O&&(R.credentialStatus={id:O,type:"NFTStatusList2021",scope:T||"public"});const C=await J.sign((0,S.default)(R)),K={proof:{type:p[L],created:y,proofPurpose:"assertionMethod",id:crypto.randomUUID(),signer:H,pk:$,jws:(0,E.toBase64)(C)},...R};return s("create",K),await l({vc:K,ownerDid:D.id,trustedIssuers:[H]})?K:null}async function l({vc:i,ownerDid:D,trustedIssuers:k,ignoreExpired:B=!1}){if(!i)throw new Error("Empty verifiable credential object");if(!i.issuer||!i.issuer.id||!i.issuer.pk||!(0,c.isValid)(i.issuer.id))throw new Error("Invalid verifiable credential issuer");if(!i.credentialSubject||!i.credentialSubject.id||!(0,c.isValid)(i.credentialSubject.id))throw new Error("Invalid verifiable credential subject");const v=Array.isArray(i.proof)?i.proof:i.proof?[i.proof]:[];if(v.length===0||v.some(O=>!O||!O.jws))throw new Error("Invalid verifiable credential proof");if(i.issuanceDate===void 0)throw Error("Invalid verifiable credential issue date");if(new Date(i.issuanceDate).getTime()>Date.now())throw Error("Verifiable credential has not take effect");if(!B&&i.expirationDate!==void 0&&new Date(i.expirationDate).getTime()<Date.now())throw Error("Verifiable credential has expired");const m=Array.isArray(k)?k:[k];if(!(0,c.isFromPublicKey)(i.issuer.id,i.issuer.pk))throw new Error("Verifiable credential not issuer pk not match with issuer did");if(D!==i.credentialSubject.id)throw new Error("Verifiable credential not owned by specified owner did");for(const O of v){const T=O.pk||i.issuer.pk,f=O.signer||i.issuer.id;if(!m.includes(f))throw new Error("Proof signer not in trusted issuers");if(O.signer&&O.pk&&!(0,c.isFromPublicKey)(O.signer,O.pk))throw new Error("Proof pk does not match signer");const J=structuredClone(i);delete J.signature;const h=O.previousProof;if(h&&(typeof h=="string"||Array.isArray(h)&&h.length>0)){const G=Array.isArray(h)?h:[h],x=v.filter(U=>U.id&&G.includes(U.id));if(x.length!==G.length)throw new Error("Referenced previous proof not found");J.proof=x}else delete J.proof;const H=(0,S.default)(J);if(await(0,b.fromPublicKey)(T,(0,c.toTypeInfo)(f)).verify(H,(0,E.fromBase64)(O.jws))!==!0)throw Error("Verifiable credential signature not valid")}return!0}async function e({vc:i,wallet:D,mode:k="set"}){if(!i)throw new Error("Cannot counter-sign empty verifiable credential");const B=Array.isArray(i.proof)?i.proof:i.proof?[i.proof]:[];if(B.length===0)throw new Error("Cannot counter-sign verifiable credential without existing proof");const v=D.address,m=(0,c.toTypeInfo)(v).pk;if(!p[m])throw new Error("Unsupported signer type when counter-signing verifiable credential");const O=(0,E.toBase58)(D.publicKey),T=B.map(H=>H.id?H:{...H,id:crypto.randomUUID()}),f=structuredClone(i);delete f.signature;const J={type:p[m],created:new Date().toISOString(),proofPurpose:"assertionMethod",id:crypto.randomUUID(),signer:v,pk:O,jws:""};if(k==="chain"){f.proof=T;const H=T.map(G=>G.id);J.previousProof=H.length===1?H[0]:H}else delete f.proof;const h=(0,S.default)(f);return J.jws=(0,E.toBase64)(await D.sign(h)),{...i,proof:[...T,J]}}async function t({presentation:i,trustedIssuers:D,challenge:k,ignoreExpired:B=!1}){if(!i.challenge||k!==i.challenge)throw Error("Invalid challenge included on vc presentation");const v=Array.isArray(i.verifiableCredential)?i.verifiableCredential:[i.verifiableCredential],m=Array.isArray(i.proof)?i.proof:[i.proof],O=structuredClone(i);return delete O.proof,await Promise.all(v.map(async T=>{const f=JSON.parse(T),J=m.find(H=>(0,c.isFromPublicKey)(f.credentialSubject.id,H.pk));if(!J)throw Error(`VC does not have corresponding proof: ${T}`);const h=J.jws;if(await(0,b.fromPublicKey)((0,E.fromBase58)(J.pk),(0,c.toTypeInfo)(f.credentialSubject.id)).verify((0,S.default)(O),(0,E.fromBase64)(h))!==!0)throw Error("Presentation signature invalid");await l({vc:f,ownerDid:f.credentialSubject.id,trustedIssuers:D,ignoreExpired:B})})),!0}async function r({claims:i,issuer:D,issuanceDate:k}){if(!i||!Array.isArray(i))throw new Error("Can not create credential list with empty claim list");if(!D||!D.wallet||!D.name)throw new Error("Can not create credential list with empty issuer name or wallet");if(typeof D.wallet.sign!="function")throw new Error("Can not create credential list with invalid issuer wallet");const{wallet:B,name:v}=D,m=B.address,O=(0,c.toTypeInfo)(m),T={...O,role:g.types.RoleType.ROLE_VC},f=k||new Date().toISOString(),J=O.pk,h=(0,E.toBase58)(B.publicKey);return await Promise.all(i.map(async H=>{const G={claim:H};G.id=(0,c.fromPublicKeyHash)(B.hash((0,S.default)(G.claim)),T),G.issued=f,G.issuer={id:m,pk:h,name:v||m};const x=await B.sign((0,S.default)(G));return G.proof={type:p[J],created:f,proofPurpose:"assertionMethod",id:crypto.randomUUID(),signer:m,pk:h,jws:(0,E.toBase64)(x)},G}))}async function n({credentials:i,trustedIssuers:D}){if(!i||!Array.isArray(i))throw new Error("Can not verify with empty credentials list");return Promise.all(i.map(async k=>{const B=Array.isArray(D)?D:[D],v=B.find(f=>f===k.issuer.id);if(!v)throw new Error("Credential not issued by trusted issuers");if(!(0,c.isFromPublicKey)(v,k.issuer.pk))throw new Error("Credential not issuer pk not match with issuer did");const m=Array.isArray(k.proof)?k.proof:k.proof?[k.proof]:[];if(m.length===0||m.some(f=>!f||!f.jws))throw new Error("Invalid credential proof");const O=structuredClone(k);delete O.proof;const T=(0,S.default)(O);for(const f of m){const J=f.pk||k.issuer.pk,h=f.signer||k.issuer.id;if(!B.includes(h))throw new Error("Proof signer not in trusted issuers");if(f.signer&&f.pk&&!(0,c.isFromPublicKey)(f.signer,f.pk))throw new Error("Proof pk does not match signer");if(await(0,b.fromPublicKey)(J,(0,c.toTypeInfo)(h)).verify(T,(0,E.fromBase64)(f.jws))!==!0)throw Error("Status credential signature not valid")}return k.claim}))}const A=S.default;return fe.counterSign=e,fe.create=a,fe.createCredentialList=r,fe.proofTypes=p,fe.stableStringify=A,fe.verify=l,fe.verifyCredentialList=n,fe.verifyPresentation=t,fe}var tt={exports:{}},_n=tt.exports,gr;function On(){return gr||(gr=1,(function(d,u){(function(c,g){d.exports=g()})(_n,(function(){var c=Object.prototype.toString,g=Array.isArray||function(H){return c.call(H)==="[object Array]"};function E(h){return typeof h=="function"}function b(h){return g(h)?"array":typeof h}function I(h){return h.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function S(h,H){return h!=null&&typeof h=="object"&&H in h}function o(h,H){return h!=null&&typeof h!="object"&&h.hasOwnProperty&&h.hasOwnProperty(H)}var s=RegExp.prototype.test;function p(h,H){return s.call(h,H)}var a=/\S/;function l(h){return!p(a,h)}var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function t(h){return String(h).replace(/[&<>"'`=\/]/g,function(G){return e[G]})}var r=/\s*/,n=/\s+/,A=/\s*=/,i=/\s*\}/,D=/#|\^|\/|>|\{|&|=|!/;function k(h,H){if(!h)return[];var G=!1,x=[],U=[],L=[],y=!1,$=!1,R="",C=0;function K(){if(y&&!$)for(;L.length;)delete U[L.pop()];else L=[];y=!1,$=!1}var W,Z,ee;function ae(Y){if(typeof Y=="string"&&(Y=Y.split(n,2)),!g(Y)||Y.length!==2)throw new Error("Invalid tags: "+Y);W=new RegExp(I(Y[0])+"\\s*"),Z=new RegExp("\\s*"+I(Y[1])),ee=new RegExp("\\s*"+I("}"+Y[1]))}ae(H||f.tags);for(var _=new m(h),M,V,F,N,P,w;!_.eos();){if(M=_.pos,F=_.scanUntil(W),F)for(var q=0,Q=F.length;q<Q;++q)N=F.charAt(q),l(N)?(L.push(U.length),R+=N):($=!0,G=!0,R+=" "),U.push(["text",N,M,M+1]),M+=1,N===`
2
2
  `&&(K(),R="",C=0,G=!1);if(!_.scan(W))break;if(y=!0,V=_.scan(D)||"name",_.scan(r),V==="="?(F=_.scanUntil(A),_.scan(A),_.scanUntil(Z)):V==="{"?(F=_.scanUntil(ee),_.scan(i),_.scanUntil(Z),V="&"):F=_.scanUntil(Z),!_.scan(Z))throw new Error("Unclosed tag at "+_.pos);if(V==">"?P=[V,F,M,_.pos,R,C,G]:P=[V,F,M,_.pos],C++,U.push(P),V==="#"||V==="^")x.push(P);else if(V==="/"){if(w=x.pop(),!w)throw new Error('Unopened section "'+F+'" at '+M);if(w[1]!==F)throw new Error('Unclosed section "'+w[1]+'" at '+M)}else V==="name"||V==="{"||V==="&"?$=!0:V==="="&&ae(F)}if(K(),w=x.pop(),w)throw new Error('Unclosed section "'+w[1]+'" at '+_.pos);return v(B(U))}function B(h){for(var H=[],G,x,U=0,L=h.length;U<L;++U)G=h[U],G&&(G[0]==="text"&&x&&x[0]==="text"?(x[1]+=G[1],x[3]=G[3]):(H.push(G),x=G));return H}function v(h){for(var H=[],G=H,x=[],U,L,y=0,$=h.length;y<$;++y)switch(U=h[y],U[0]){case"#":case"^":G.push(U),x.push(U),G=U[4]=[];break;case"/":L=x.pop(),L[5]=U[2],G=x.length>0?x[x.length-1][4]:H;break;default:G.push(U)}return H}function m(h){this.string=h,this.tail=h,this.pos=0}m.prototype.eos=function(){return this.tail===""},m.prototype.scan=function(H){var G=this.tail.match(H);if(!G||G.index!==0)return"";var x=G[0];return this.tail=this.tail.substring(x.length),this.pos+=x.length,x},m.prototype.scanUntil=function(H){var G=this.tail.search(H),x;switch(G){case-1:x=this.tail,this.tail="";break;case 0:x="";break;default:x=this.tail.substring(0,G),this.tail=this.tail.substring(G)}return this.pos+=x.length,x};function O(h,H){this.view=h,this.cache={".":this.view},this.parent=H}O.prototype.push=function(H){return new O(H,this)},O.prototype.lookup=function(H){var G=this.cache,x;if(G.hasOwnProperty(H))x=G[H];else{for(var U=this,L,y,$,R=!1;U;){if(H.indexOf(".")>0)for(L=U.view,y=H.split("."),$=0;L!=null&&$<y.length;)$===y.length-1&&(R=S(L,y[$])||o(L,y[$])),L=L[y[$++]];else L=U.view[H],R=S(U.view,H);if(R){x=L;break}U=U.parent}G[H]=x}return E(x)&&(x=x.call(this.view)),x};function T(){this.templateCache={_cache:{},set:function(H,G){this._cache[H]=G},get:function(H){return this._cache[H]},clear:function(){this._cache={}}}}T.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},T.prototype.parse=function(H,G){var x=this.templateCache,U=H+":"+(G||f.tags).join(":"),L=typeof x<"u",y=L?x.get(U):void 0;return y==null&&(y=k(H,G),L&&x.set(U,y)),y},T.prototype.render=function(H,G,x,U){var L=this.getConfigTags(U),y=this.parse(H,L),$=G instanceof O?G:new O(G,void 0);return this.renderTokens(y,$,x,H,U)},T.prototype.renderTokens=function(H,G,x,U,L){for(var y="",$,R,C,K=0,W=H.length;K<W;++K)C=void 0,$=H[K],R=$[0],R==="#"?C=this.renderSection($,G,x,U,L):R==="^"?C=this.renderInverted($,G,x,U,L):R===">"?C=this.renderPartial($,G,x,L):R==="&"?C=this.unescapedValue($,G):R==="name"?C=this.escapedValue($,G,L):R==="text"&&(C=this.rawValue($)),C!==void 0&&(y+=C);return y},T.prototype.renderSection=function(H,G,x,U,L){var y=this,$="",R=G.lookup(H[1]);function C(Z){return y.render(Z,G,x,L)}if(R){if(g(R))for(var K=0,W=R.length;K<W;++K)$+=this.renderTokens(H[4],G.push(R[K]),x,U,L);else if(typeof R=="object"||typeof R=="string"||typeof R=="number")$+=this.renderTokens(H[4],G.push(R),x,U,L);else if(E(R)){if(typeof U!="string")throw new Error("Cannot use higher-order sections without the original template");R=R.call(G.view,U.slice(H[3],H[5]),C),R!=null&&($+=R)}else $+=this.renderTokens(H[4],G,x,U,L);return $}},T.prototype.renderInverted=function(H,G,x,U,L){var y=G.lookup(H[1]);if(!y||g(y)&&y.length===0)return this.renderTokens(H[4],G,x,U,L)},T.prototype.indentPartial=function(H,G,x){for(var U=G.replace(/[^ \t]/g,""),L=H.split(`
3
3
  `),y=0;y<L.length;y++)L[y].length&&(y>0||!x)&&(L[y]=U+L[y]);return L.join(`
4
4
  `)},T.prototype.renderPartial=function(H,G,x,U){if(x){var L=this.getConfigTags(U),y=E(x)?x(H[1]):x[H[1]];if(y!=null){var $=H[6],R=H[5],C=H[4],K=y;R==0&&C&&(K=this.indentPartial(y,C,$));var W=this.parse(K,L);return this.renderTokens(W,G,x,K,U)}}},T.prototype.unescapedValue=function(H,G){var x=G.lookup(H[1]);if(x!=null)return x},T.prototype.escapedValue=function(H,G,x){var U=this.getConfigEscape(x)||f.escape,L=G.lookup(H[1]);if(L!=null)return typeof L=="number"&&U===f.escape?String(L):U(L)},T.prototype.rawValue=function(H){return H[1]},T.prototype.getConfigTags=function(H){return g(H)?H:H&&typeof H=="object"?H.tags:void 0},T.prototype.getConfigEscape=function(H){if(H&&typeof H=="object"&&!g(H))return H.escape};var f={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(h){J.templateCache=h},get templateCache(){return J.templateCache}},J=new T;return f.clearCache=function(){return J.clearCache()},f.parse=function(H,G){return J.parse(H,G)},f.render=function(H,G,x,U){if(typeof H!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+b(H)+'" was given as the first argument for mustache#render(template, view, partials)');return J.render(H,G,x,U)},f.escape=t,f.Scanner=m,f.Context=O,f.Writer=T,f}))})(tt)),tt.exports}var Er;function Nn(){if(Er)return Ve;Er=1;const d=Vr(),u=mn();let c=we(),g=Gn(),E=ke(),b=xe(),I=rt();I=d.__toESM(I);let S=On();S=d.__toESM(S);const o=(t,r)=>{if(t!=null)return r.split(".").reduce((n,A)=>n==null?n:n[A],t)},s=(t,r,n)=>{if(t==null)return t;const A=r.split(".");let i=t;for(let D=0;D<A.length-1;D++){const k=A[D];(i[k]==null||typeof i[k]!="object")&&(i[k]={}),i=i[k]}return i[A[A.length-1]]=n,t},p=(0,I.default)("@ocap/asset"),a=t=>{const{address:r,output:n,data:A,numMinted:i}=t,D=structuredClone(n),k=D.data;k.value=JSON.parse(k.value),k.type=k.typeUrl;const B=A;return{address:r,output:D,data:B?.value?JSON.parse(B.value):{},numMinted:i}},l=({factory:t,inputs:r,owner:n,issuer:A})=>{const{output:i,address:D,numMinted:k,data:B}=t;return p("renderMintAsset.args",JSON.stringify({output:i,factoryAddress:D,numMinted:k,inputs:r,owner:n,issuer:A,data:B},null,2)),JSON.parse(S.default.render(JSON.stringify(i),{input:r,data:B?.value||B,ctx:{factory:D,id:(k??0)+1,owner:n,issuer:A}}))},e=async({factory:t,inputs:r,owner:n,issuer:A})=>{if(Object.keys(r).some(G=>typeof r[G]!="string"))throw new Error("Failed to mint asset from factory: input values must be strings");if(!t)throw new Error("Failed to mint asset from factory: factory is required");if(!A)throw new Error("Failed to mint asset from factory: issuer is required");let i=null;const{output:D,numMinted:k,address:B,data:v}=t,{wallet:m,name:O}=A;p("preparePreMintAsset.args",JSON.stringify({output:D,factoryAddress:B,numMinted:k,inputs:r,owner:n,issuer:A,data:v},null,2));const T={},f={id:m.address,pk:(0,b.toBase58)(m.publicKey),name:O},J=G=>JSON.parse(S.default.render(JSON.stringify(G),{input:{...r,...T},data:v?.value||v,ctx:{factory:B,id:(k??0)+1,owner:n,issuer:f}})),h=structuredClone(D),H=u.findPrerenderKeys(h,"credentialSubject");if(H.length){T.issuanceDate=new Date().toISOString();for(const G of H){const x=o(h,G),U=Array.isArray(x)?x.map(ae=>J(ae)):J(x);s(h,G,U);const L=G.split(".").slice(0,-1).join("."),y=L.split(".").concat(["id"]).join("."),$=(0,c.toTypeInfo)(f.id),R=$.pk,C={...$,role:E.types.RoleType.ROLE_VC},K=(0,c.fromPublicKeyHash)(m.hash((0,g.stableStringify)(U)),C);if(T.id=K,T.proofType=g.proofTypes[R],s(h,y,K),!g.proofTypes[R])throw new Error("Unsupported signer type when create verifiable credential");let W=J(o(h,L));W.proof=void 0;const Z=(0,g.stableStringify)(W),ee=(0,b.toBase64)(await m.sign(Z));W.proof={type:g.proofTypes[R],created:T.issuanceDate,proofPurpose:"assertionMethod",jws:ee},T.signature=ee;try{i=J(structuredClone(D)),W=o(i,L),p("preparePreMintAsset.result",JSON.stringify(i,null,2)),await(0,g.verify)({vc:W,trustedIssuers:[f.id],ownerDid:n,ignoreExpired:!0})}catch(ae){throw console.error(ae),new Error("Failed to mint asset from factory: invalid verifiable credential minted")}}}else i=J(h),p("preparePreMintAsset.result",JSON.stringify(i,null,2));return{asset:i,issuer:f,variables:{...r,...T}}};return Ve.formatFactoryState=a,Ve.preparePreMintAsset=e,Ve.renderMintAsset=l,Ve}var Ee={},We={},Ir;function Rn(){if(Ir)return We;Ir=1;let d=we(),u=ke();function c(b){return(I,S)=>o=>b(o,I,S)}function g(b,I,S){const o=Buffer.concat([b,I,S].filter(s=>!!s).map(s=>Uint8Array.from(Buffer.from(s))));return(0,d.fromHash)(u.Hasher.SHA3.hash256(o),u.types.RoleType.ROLE_STAKE)}function E(b,I){const S=Buffer.concat([Uint8Array.from(Buffer.from(b)),Uint8Array.from(Buffer.from(I))]);return(0,d.fromHash)(u.Hasher.SHA3.hash256(S),u.types.RoleType.ROLE_DELEGATION)}return We.makeCurriedAddress=c,We.toDelegateAddress=E,We.toStakeAddress=g,We}var Hr;function qr(){if(Hr)return Ee;Hr=1;const d=Rn();let u=we(),c=ke(),g=Lr(),E=Ft();function b(l,e,t){if(E.transactions.indexOf(e)===-1)throw new Error(`Unsupported itx type ${e}`);const r=(0,g.canonicalBytes)(e,l);return(0,u.fromHash)(c.Hasher.SHA3.hash256(r),t)}const I=d.makeCurriedAddress(b),S=I("CreateAssetTx",c.types.RoleType.ROLE_ASSET),o=I("CreateFactoryTx",c.types.RoleType.ROLE_FACTORY),s=I("CreateTokenTx",c.types.RoleType.ROLE_TOKEN),p=I("CreateTokenFactoryTx",c.types.RoleType.ROLE_TOKEN_FACTORY),a=I("CreateRollupTx",c.types.RoleType.ROLE_ROLLUP);return Ee.toAssetAddress=S,Ee.toDelegateAddress=d.toDelegateAddress,Ee.toFactoryAddress=o,Ee.toItxAddress=b,Ee.toRollupAddress=a,Ee.toStakeAddress=d.toStakeAddress,Ee.toTokenAddress=s,Ee.toTokenFactoryAddress=p,Ee}var hr;function vn(){if(hr)return Ye;hr=1;const d=Nn();let u=qr();const c=async({factory:g,inputs:E,owner:b,issuer:I})=>{const{asset:S,issuer:o,variables:s}=await d.preparePreMintAsset({factory:g,inputs:E,owner:b,issuer:I});return{address:(0,u.toAssetAddress)(S),issuer:o,variables:s,asset:S}};return Ye.formatFactoryState=d.formatFactoryState,Ye.preMintFromFactory=c,Ye}const xn="@ocap/client",wn={name:xn};var ft,Dr;function Cn(){if(Dr)return ft;Dr=1;const{get:d,set:u,omit:c,camelCase:g}=kr(),{isValid:E}=we(),b=Ft(),{toTxHash:I}=ke(),{encodeTx:S,decodeTx:o}=Lr(),{bytesToHex:s,toBase58:p,toBase64:a,toHex:l,toBuffer:e,fromTokenToUnit:t,fromUnitToToken:r}=xe(),{DEFAULT_TOKEN_DECIMAL:n}=Dn(),{formatFactoryState:A,preMintFromFactory:i}=vn(),{toDelegateAddress:D,toAssetAddress:k,toFactoryAddress:B,toTokenAddress:v,toTokenFactoryAddress:m,toStakeAddress:O,toRollupAddress:T}=qr(),f=rt()(wn.name),{transactions:J,typeUrls:h,toTypeUrl:H,multiSignTxs:G,multiSignV2Txs:x}=b,U={encodeTx:S,decodeTx:o,preMintFromFactory:i,toAssetAddress:k,toFactoryAddress:B,toTokenAddress:v,toTokenFactoryAddress:m,toRollupAddress:T},L=J.filter($=>!["DeclareTx"].includes($));return ft={createExtensionMethods:($,R=U)=>{Object.defineProperty($,"ctx",{value:{loading:!1,ready:!1,callbacks:[]}});const{encodeTx:C,decodeTx:K,preMintFromFactory:W,toAssetAddress:Z,toFactoryAddress:ee,toTokenAddress:ae,toTokenFactoryAddress:_,toRollupAddress:M}=R;$.fromUnitToToken=async F=>{const{token:N}=await $.getContext();return r(F,N.decimal)},$.fromTokenToUnit=async F=>{const{token:N}=await $.getContext();return t(F,N.decimal)},$.getTxSendMethods=()=>L.map(F=>g(`send_${F}`)),$.getTxEncodeMethods=()=>L.map(F=>g(`encode_${F}`)),$.getTxSignMethods=()=>L.map(F=>g(`sign_${F}`)),$.getTxMultiSignMethods=()=>G.concat(x).map(F=>g(`multi_sign_${F}`)),$.decodeTx=F=>K(e(F)),$.getContext=async()=>{if($.ctx.ready)return $.context;if($.ctx.loading)return new Promise((N,P)=>{$.ctx.callbacks.push(w=>{w?P(w):N($.context)})});$.ctx.loading=!0,await new Promise(N=>setTimeout(N,0));let F;try{const[N,P]=await Promise.all([$.doRawQuery(`{