@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 495 B
JavaScript
import{i as u,s as i}from"./chunk-ZR7YL3KO.js";import{k as t,m as f}from"./chunk-HBP5N4FR.js";f();i();var d=r=>{let e=t.Buffer.from([0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);if(r.slice(0,e.length).equals(e))return!0;let s=t.Buffer.alloc(32).fill(0);return r.equals(s)},p=r=>{try{let a=parseInt("11",2),s=parseInt("01",2),o=t.Buffer.from(r,"hex"),c=o[31];if(d(o))return u;let n=c&a;return n>3-1&&(n=c&s),n}catch(e){return-1}};export{p as a};
//# sourceMappingURL=chunk-LL4VMPB2.js.map