PageSourceSearch

https://webauth.com/commons--tx.js.504e1b5338feb7d9b61b.js

js webauth.com collected 2026-09-24 12:48:52 UTC 11,700 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkproton=self.webpackChunkproton||[]).push([[9948],{6539(t,e,s){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Tx=e.UnsignedTx=e.SelectTxClass=void 0;const r=s(48287),i=n(s(25184)),a=s(97894),o=s(77801),d=s(78158),c=n(s(47108)),l=s(94826),u=s(44738),h=s(74317),f=s(37516),T=s(95934),g=s(96511),x=i.default.getInstance();e.SelectTxClass=(t,...e)=>{if(t===a.PlatformVMConstants.BASETX)return new l.BaseTx(...e);if(t===a.PlatformVMConstants.IMPORTTX)return new u.ImportTx(...e);if(t===a.PlatformVMConstants.EXPORTTX)return new h.ExportTx(...e);if(t===a.PlatformVMConstants.ADDDELEGATORTX)return new f.AddDelegatorTx(...e);if(t===a.PlatformVMConstants.ADDVALIDATORTX)return new f.AddValidatorTx(...e);if(t===a.PlatformVMConstants.CREATESUBNETTX)return new T.CreateSubnetTx(...e);if(t===a.PlatformVMConstants.ADDPERMISSIONLESSVALIDATORTX)return new f.AddPermissionlessValidatorTx(...e);if(t===a.PlatformVMConstants.ADDPERMISSIONLESSDELEGATORTX)return new f.AddPermissionlessDelegatorTx(...e);throw new g.TransactionError("Error - SelectTxClass: unknown txtype")};class p extends d.StandardUnsignedTx{constructor(){super(...arguments),this._typeName="UnsignedTx",this._typeID=void 0}deserialize(t,s="hex"){super.deserialize(t,s),this.transaction=(0,e.SelectTxClass)(t.transaction._typeID),this.transaction.deserialize(t.transaction,s)}getTransaction(){return this.transaction}fromBuffer(t,s=0){this.codecID=x.copyFrom(t,s,s+2).readUInt16BE(0),s+=2;const n=x.copyFrom(t,s,s+4).readUInt32BE(0);return s+=4,this.transaction=(0,e.SelectTxClass)(n),this.transaction.fromBuffer(t,s)}sign(t){const e=this.toBuffer(),s=r.Buffer.from((0,c.default)("sha256").update(e).digest()),n=this.transaction.sign(s,t);return new m(this,n)}}e.UnsignedTx=p;class m extends d.StandardTx{constructor(){super(...arguments),this._typeName="Tx",this._typeID=void 0}deserialize(t,e="hex"){super.deserialize(t,e),this.unsignedTx=new p,this.unsignedTx.deserialize(t.unsignedTx,e),this.credentials=[];for(let s=0;s<t.credentials.length;s++){const n=(0,o.SelectCredentialClass)(t.credentials[`${s}`]._typeID);n.deserialize(t.credentials[`${s}`],e),this.credentials.push(n)}}fromBuffer(t,e=0){this.unsignedTx=new p,e=this.unsignedTx.fromBuffer(t,e);const s=x.copyFrom(t,e,e+4).readUInt32BE(0);e+=4,this.credentials=[];for(let n=0;n<s;n++){const s=x.copyFrom(t,e,e+4).readUInt32BE(0);e+=4;const n=(0,o.SelectCredentialClass)(s);e=n.fromBuffer(t,e),this.credentials.push(n)}return e}}e.Tx=m},38481(t,e,s){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Tx=e.UnsignedTx=e.SelectTxClass=void 0;const r=s(48287),i=n(s(25184)),a=s(85320),o=s(81859),d=s(41718),c=n(s(47108)),l=s(59008),u=s(57296),h=i.default.getInstance();e.SelectTxClass=(t,...e)=>{if(t===a.EVMConstants.IMPORTTX)return new l.ImportTx(...e);if(t===a.EVMConstants.EXPORTTX)return new u.ExportTx(...e);throw new Error("TransactionError - SelectTxClass: unknown txType")};class f extends d.EVMStandardUnsignedTx{constructor(){super(...arguments),this._typeName="UnsignedTx",this._typeID=void 0}deserialize(t,s="hex"){super.deserialize(t,s),this.transaction=(0,e.SelectTxClass)(t.transaction._typeID),this.transaction.deserialize(t.transaction,s)}getTransaction(){return this.transaction}fromBuffer(t,s=0){this.codecID=h.copyFrom(t,s,s+2).readUInt16BE(0),s+=2;const n=h.copyFrom(t,s,s+4).readUInt32BE(0);return s+=4,this.transaction=(0,e.SelectTxClass)(n),this.transaction.fromBuffer(t,s)}sign(t){const e=this.toBuffer(),s=r.Buffer.from((0,c.default)("sha256").update(e).digest()),n=this.transaction.sign(s,t);return new T(this,n)}}e.UnsignedTx=f;class T extends d.EVMStandardTx{constructor(){super(...arguments),this._typeName="Tx",this._typeID=void 0}deserialize(t,e="hex"){super.deserialize(t,e),this.unsignedTx=new f,this.unsignedTx.deserialize(t.unsignedTx,e),this.credentials=[];for(let s=0;s<t.credentials.length;s++){const n=(0,o.SelectCredentialClass)(t.credentials[`${s}`]._typeID);n.deserialize(t.credentials[`${s}`],e),this.credentials.push(n)}}fromBuffer(t,e=0){this.unsignedTx=new f,e=this.unsignedTx.fromBuffer(t,e);const s=h.copyFrom(t,e,e+4).readUInt32BE(0);e+=4,this.credentials=[];for(let n=0;n<s;n++){const s=h.copyFrom(t,e,e+4).readUInt32BE(0);e+=4;
1const n=(0,o.SelectCredentialClass)(s);e=n.fromBuffer(t,e),this.credentials.push(n)}return e}}e.Tx=T},78158(t,e,s){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.StandardTx=e.StandardUnsignedTx=e.StandardBaseTx=void 0;const r=s(48287),i=n(s(25184)),a=n(s(69478)),o=s(38980),d=s(45663),c=s(67755),l=s(61446),u=i.default.getInstance(),h=l.Serialization.getInstance(),f="cb58",T="decimalString",g="Buffer";class x extends l.Serializable{constructor(t=c.DefaultNetworkID,e=r.Buffer.alloc(32,16),s=void 0,n=void 0,i=void 0){super(),this._typeName="StandardBaseTx",this._typeID=void 0,this.networkID=r.Buffer.alloc(4),this.blockchainID=r.Buffer.alloc(32),this.numouts=r.Buffer.alloc(4),this.numins=r.Buffer.alloc(4),this.memo=r.Buffer.alloc(0),this.networkID.writeUInt32BE(t,0),this.blockchainID=e,void 0!==i&&(this.memo=i),void 0!==n&&void 0!==s&&(this.numouts.writeUInt32BE(s.length,0),this.outs=s.sort(d.StandardTransferableOutput.comparator()),this.numins.writeUInt32BE(n.length,0),this.ins=n.sort(o.StandardTransferableInput.comparator()))}serialize(t="hex"){return{...super.serialize(t),networkID:h.encoder(this.networkID,t,g,T),blockchainID:h.encoder(this.blockchainID,t,g,f),outs:this.outs.map(e=>e.serialize(t)),ins:this.ins.map(e=>e.serialize(t)),memo:h.encoder(this.memo,t,g,"hex")}}deserialize(t,e="hex"){super.deserialize(t,e),this.networkID=h.decoder(t.networkID,e,T,g,4),this.blockchainID=h.decoder(t.blockchainID,e,f,g,32),this.memo=h.decoder(t.memo,e,"hex",g)}getNetworkID(){return this.networkID.readUInt32BE(0)}getBlockchainID(){return this.blockchainID}getMemo(){return this.memo}toBuffer(){this.outs.sort(d.StandardTransferableOutput.comparator()),this.ins.sort(o.StandardTransferableInput.comparator()),this.numouts.writeUInt32BE(this.outs.length,0),this.numins.writeUInt32BE(this.ins.length,0);let t=this.networkID.length+this.blockchainID.length+this.numouts.length;const e=[this.networkID,this.blockchainID,this.numouts];for(let s=0;s<this.outs.length;s++){const n=this.outs[`${s}`].toBuffer();e.push(n),t+=n.length}e.push(this.numins),t+=this.numins.length;for(let s=0;s<this.ins.length;s++){const n=this.ins[`${s}`].toBuffer();e.push(n),t+=n.length}let s=r.Buffer.alloc(4);return s.writeUInt32BE(this.memo.length,0),e.push(s),t+=4,e.push(this.memo),t+=this.memo.length,r.Buffer.concat(e,t)}toString(){return u.bufferToB58(this.toBuffer())}toStringHex(){return`0x${u.addChecksum(this.toBuffer()).toString("hex")}`}}e.StandardBaseTx=x;class p extends l.Serializable{constructor(t=void 0,e=0){super(),this._typeName="StandardUnsignedTx",this._typeID=void 0,this.codecID=0,this.codecID=e,this.transaction=t}serialize(t="hex"){return{...super.serialize(t),codecID:h.encoder(this.codecID,t,"number","decimalString",2),transaction:this.transaction.serialize(t)}}deserialize(t,e="hex"){super.deserialize(t,e),this.codecID=h.decoder(t.codecID,e,"decimalString","number")}getCodecID(){return this.codecID}getCodecIDBuffer(){let t=r.Buffer.alloc(2);return t.writeUInt16BE(this.codecID,0),t}getInputTotal(t){const e=this.getTransaction().getIns(),s=t.toString("hex");let n=new a.default(0);for(let t=0;t<e.length;t++)if(e[`${t}`].getInput()instanceof o.StandardAmountInput&&s===e[`${t}`].getAssetID().toString("hex")){const s=e[`${t}`].getInput();n=n.add(s.getAmount())}return n}getOutputTotal(t){const e=this.getTransaction().getTotalOuts(),s=t.toString("hex");let n=new a.default(0);for(let t=0;t<e.length;t++)if(e[`${t}`].getOutput()instanceof d.StandardAmountOutput&&s===e[`${t}`].getAssetID().toString("hex")){const s=e[`${t}`].getOutput();n=n.add(s.getAmount())}return n}getBurn(t){return this.getInputTotal(t).sub(this.getOutputTotal(t))}toBuffer(){const t=r.Buffer.alloc(2);t.writeUInt16BE(this.transaction.getCodecID(),0);const e=r.Buffer.alloc(4);e.writeUInt32BE(this.transaction.getTxType(),0);const s=this.transaction.toBuffer();return r.Buffer.concat([t,e,s],t.length+e.length+s.length)}}e.StandardUnsignedTx=p;class m extends l.Serializable{constructor(t=void 0,e=void 0){super(),this._typeName="StandardTx",this._typeID=void 0,this.unsignedTx=void 0,this.credentials=[],void 0!==t&&(this.unsignedTx=t,void 0!==e&&(this.credentials=e))}serialize(t="hex"){return{...super.serialize(t),unsignedTx:this.unsignedTx.serialize(t),credentials:this.credentials.map(e=>e.serialize(t))}}getCredentials(){return this.credentials}getUnsignedTx(){return this.unsignedTx}toBuffer(){const t=this.unsignedTx.getTransaction().getCodecID(),e=this.unsignedTx.toBuffer();let s=e.length;const n=r.Buffer.alloc(4);n.writeUInt32BE(this.credentials.length,0);const i=[e,n];s+=n.length;for(let e=0;e<this.credentials.length;e++){this.credentials[`${e}`].setCodecID(t);const n=r.Buffer.alloc(4);n.writeUInt32BE(this.credentials[`${e}`].getCredentialID(),0),i.push(n),s+=n.length;const a=this.credentials[`${e}`].toBuffer();s+=a.length,i.push(a)}return r.Buffer.concat(i,s)}fromString(t){return this.fromBuffer(u.cb58Decode(t))}toString(){return u.cb58Encode(this.toBuffer())}toStringHex(){return`0x${u.addChecksum(this.toBuffer()).toString("hex")}`}}e.StandardTx=m},88109(t,e,s){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0}),e.Tx=e.UnsignedTx=e.SelectTxClass=void 0;const r=s(48287),i=n(s(25184)),a=s(28060),o=s(45423),d=s(78158),c=n(s(47108)),l=s(77044),u=s(2525),h=s(18684),f=s(90628),T=s(44999),g=s(96511),x=i.default.getInstance();e.SelectTxClass=(t,...e)=>{if(t===a.AVMConstants.BASETX)return new l.BaseTx(...e);if(t===a.AVMConstants.CREATEASSETTX)return new u.CreateAssetTx(...e);if(t===a.AVMConstants.OPERATIONTX)return new h.OperationTx(...e);if(t===a.AVMConstants.IMPORTTX)return new f.ImportTx(...e);if(t===a.AVMConstants.EXPORTTX)return new T.ExportTx(...e);throw new g.TransactionError("Error - SelectTxClass: unknown txtype")};class p extends d.StandardUnsignedTx{constructor(){super(...arguments),this._typeName="UnsignedTx",this._typeID=void 0}deserialize(t,s="hex"){super.deserialize(t,s),this.transaction=(0,e.SelectTxClass)(t.transaction._typeID),this.transaction.deserialize(t.transaction,s)}getTransaction(){return this.transaction}fromBuffer(t,s=0){this.codecID=x.copyFrom(t,s,s+2).readUInt16BE(0),s+=2;const n=x.copyFrom(t,s,s+4).readUInt32BE(0);return s+=4,this.transaction=(0,e.SelectTxClass)(n),this.transaction.fromBuffer(t,s)}sign(t){const e=this.toBuffer(),s=r.Buffer.from((0,c.default)("sha256").update(e).digest()),n=this.transaction.sign(s,t);return new m(this,n)}}e.UnsignedTx=p;class m extends d.StandardTx{constructor(){super(...arguments),this._typeName="Tx",this._typeID=void 0}deserialize(t,e="hex"){super.deserialize(t,e),this.unsignedTx=new p,this.unsignedTx.deserialize(t.unsignedTx,e),this.credentials=[];for(let s=0;s<t.credentials.length;s++){const n=(0,o.SelectCredentialClass)(t.credentials[`${s}`]._typeID);n.deserialize(t.credentials[`${s}`],e),this.credentials.push(n)}}fromBuffer(t,e=0){this.unsignedTx=new p,e=this.unsignedTx.fromBuffer(t,e);const s=x.copyFrom(t,e,e+4).readUInt32BE(0);e+=4,this.credentials=[];for(let n=0;n<s;n++){const s=x.copyFrom(t,e,e+4).readUInt32BE(0);e+=4;const n=(0,o.SelectCredentialClass)(s);e=n.fromBuffer(t,e),this.credentials.push(n)}return e}}e.Tx=m}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.