edge-currency-accountbased 2.2.3 → 2.2.5
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.
- package/CHANGELOG.md +14 -0
- package/android/src/main/assets/edge-currency-accountbased/1944.chunk.js +4 -0
- package/android/src/main/assets/edge-currency-accountbased/2153.chunk.js +2 -0
- package/android/src/main/assets/edge-currency-accountbased/2821.chunk.js +2 -0
- package/android/src/main/assets/edge-currency-accountbased/2896.chunk.js +35 -0
- package/android/src/main/assets/edge-currency-accountbased/2945.chunk.js +25 -0
- package/android/src/main/assets/edge-currency-accountbased/3491.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/{620.chunk.js → 3620.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/{666.chunk.js → 3666.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/3720.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/{978.chunk.js → 3978.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/4251.chunk.js +4 -0
- package/android/src/main/assets/edge-currency-accountbased/4431.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/4618.chunk.js +20 -0
- package/android/src/main/assets/edge-currency-accountbased/{627.chunk.js → 4627.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/4650.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/{826.chunk.js → 5179.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/{835.chunk.js → 5835.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/5836.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/6266.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/6291.chunk.js +58 -0
- package/android/src/main/assets/edge-currency-accountbased/6341.chunk.js +44 -0
- package/android/src/main/assets/edge-currency-accountbased/7221.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/7428.chunk.js +6 -0
- package/android/src/main/assets/edge-currency-accountbased/{481.chunk.js → 7481.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/7542.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/7786.chunk.js +2 -0
- package/android/src/main/assets/edge-currency-accountbased/8190.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/{689.chunk.js → 8689.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/{726.chunk.js → 8726.chunk.js} +1 -1
- package/android/src/main/assets/edge-currency-accountbased/9068.chunk.js +1 -0
- package/android/src/main/assets/edge-currency-accountbased/{223.chunk.js → 9223.chunk.js} +2 -2
- package/android/src/main/assets/edge-currency-accountbased/9539.chunk.js +10 -0
- package/android/src/main/assets/edge-currency-accountbased/{645.chunk.js → 9645.chunk.js} +6 -6
- package/android/src/main/assets/edge-currency-accountbased/9669.chunk.js +7 -0
- package/android/src/main/assets/edge-currency-accountbased/algorand.chunk.js +1 -1
- package/android/src/main/assets/edge-currency-accountbased/bnb.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +2 -18
- package/android/src/main/assets/edge-currency-accountbased/eos.chunk.js +5 -5
- package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -1
- package/android/src/main/assets/edge-currency-accountbased/fio.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/hedera.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/polkadot.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/ripple.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/solana.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/stellar.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/tezos.chunk.js +2 -2
- package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
- package/android/src/main/assets/edge-currency-accountbased/zcash.chunk.js +2 -2
- package/lib/ethereum/info/avalancheInfo.js +8 -0
- package/lib/ethereum/info/ethereumInfo.js +8 -0
- package/lib/filecoin/FilecoinEngine.js +112 -79
- package/lib/filecoin/Filfox.js +68 -1
- package/lib/filecoin/filecoinInfo.js +8 -3
- package/lib/filecoin/filecoinTypes.js +1 -6
- package/lib/zcash/ZcashEngine.js +11 -9
- package/package.json +1 -1
- package/android/src/main/assets/edge-currency-accountbased/124.chunk.js +0 -35
- package/android/src/main/assets/edge-currency-accountbased/17.chunk.js +0 -58
- package/android/src/main/assets/edge-currency-accountbased/190.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/221.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/298.chunk.js +0 -44
- package/android/src/main/assets/edge-currency-accountbased/431.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/491.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/539.chunk.js +0 -10
- package/android/src/main/assets/edge-currency-accountbased/542.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/618.chunk.js +0 -20
- package/android/src/main/assets/edge-currency-accountbased/650.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/68.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/720.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/786.chunk.js +0 -2
- package/android/src/main/assets/edge-currency-accountbased/836.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/935.chunk.js +0 -1
- package/android/src/main/assets/edge-currency-accountbased/944.chunk.js +0 -4
- package/android/src/main/assets/edge-currency-accountbased/945.chunk.js +0 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[481],{39915:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(r,g,y,T){function m(F){return F instanceof y?F:new y(function(C){C(F)})}return new(y||(y=Promise))(function(F,C){function S(R){try{k(T.next(R))}catch(W){C(W)}}function E(R){try{k(T.throw(R))}catch(W){C(W)}}function k(R){R.done?F(R.value):m(R.value).then(S,E)}k((T=T.apply(r,g||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BaseClient=void 0;const i=u(50780),B=u(79643),h=u(94974),p=u(90335),l=u(13221);class s{constructor(g,y){this._nodes=[],this._maxTransactionFee=new B.Hbar(1),this._maxQueryPayment=new B.Hbar(1),console.warn("Deprecated: `@hashgraph/sdk@v1` has been deprecated. Please update to version 2 of the SDK. Help with migration can be found here: https://github.com/hashgraph/hedera-sdk-js/blob/master/MIGRATING_V1.md"),this.replaceNodes(g),y&&(y.privateKey!=null?this.setOperator(y.accountId,y.privateKey):this.setOperatorWith(y.accountId,y.publicKey,y.signer))}putNode(g,y){return console.warn("`BaseClient.putNode()` is deprecrated. Use `BaseClient.replaceNodes()` instead."),this._nodes.push({id:new p.AccountId(g),url:y}),this}setOperator(g,y){const T=typeof y=="string"?h.Ed25519PrivateKey.fromString(y):y;return this._operatorAccount=new p.AccountId(g),this._operatorPublicKey=T.publicKey,this._operatorSigner=m=>i.sign.detached(m,T._keyData),this}setOperatorWith(g,y,T){return this._operatorAccount=new p.AccountId(g),this._operatorPublicKey=y,this._operatorSigner=T,this}replaceNodes(g){return this._nodes=Array.isArray(g)?g:Object.entries(g).map(([y,T])=>{const m=new p.AccountId(T);return{url:y,id:m}}),this}_getOperatorAccountId(){return this._operatorAccount}_getOperatorSigner(){return this._operatorSigner}_getOperatorKey(){return this._operatorPublicKey}get maxTransactionFee(){return console.warn("deprecated: Client#maxTransactionFee is deprecated for removal with no replacement; please see #184"),this._maxTransactionFee}get maxQueryPayment(){return console.warn("deprecated: Client#maxQueryPayment is deprecated for removal with no replacement; please see #184"),this._maxQueryPayment}setMaxTransactionFee(g){return this._maxTransactionFee=g,this}setMaxQueryPayment(g){return this._maxQueryPayment=g instanceof B.Hbar?g:B.Hbar.fromTinybar(g),this}getAccountBalance(g){return console.warn("`Client.getAccountBalance()` is deprecated with no replacement. Use the `AccountBalanceQuery` directly instead"),new l.AccountBalanceQuery().setAccountId(g).execute(this)}ping(g){return t(this,void 0,void 0,function*(){yield new l.AccountBalanceQuery().setAccountId(g).execute(this)})}_randomNode(){return this._nodes[Math.floor(Math.random()*this._nodes.length)]}_getNode(g){const y=this._nodes.find(T=>T.url===g||typeof g=="object"&&T.id.account===g.account&&T.id.realm===g.realm&&T.id.shard===g.shard);if(y)return y;throw new Error(`could not find node: ${JSON.stringify(g)}`)}}n.BaseClient=s},67427:function(o,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.exchangeRateSetToSdk=n.exchangeRateToSdk=void 0;function u(i){return{hbarEquiv:i.getHbarequiv(),centEquiv:i.getCentequiv(),expirationTime:new Date(i.getExpirationtime().getSeconds())}}n.exchangeRateToSdk=u;function t(i){return{currentRate:u(i.getCurrentrate()),nextRate:u(i.getCurrentrate())}}n.exchangeRateSetToSdk=t},64218:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FreezeTransaction=void 0;const t=u(66498),i=u(40897),B=u(27044),h=u(13660);class p extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.FreezeTransactionBody,this._inner.setFreeze(this._body)}setStartTime(s,r){let g=0,y=0;if(typeof s=="number"&&r!=null)g=s,y=r;else if(s instanceof Date)console.warn("passing `Date` is deprecated; pass the `hour` and `minute` as separate parameters"),g=s.getHours(),y=s.getMinutes();else{const T=h.timestampToProto(s);this._body.setStartTime(T);const m=h.timestampToDate(T);g=m.getHours(),y=m.getMinutes()}return this._body.setStarthour(g),this._body.setStartmin(y),this}setEndTime(s,r){let g,y;return typeof s=="number"&&r!=null?(g=s,y=r):(console.warn("passing `Date` is deprecated; pass the `hour` and `minute` as separate parameters"),g=s.getHours(),y=s.getMinutes()),this._body.setEndhour(g),this._body.setEndmin(y),this}_doValidate(){}get _method(){return B.FreezeService.freeze}}n.FreezeTransaction=p},15281:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GetBySolidityIdQuery=void 0;const t=u(2820),i=u(96666),B=u(41331),h=u(30672),p=u(90335),l=u(36277),s=u(98614);class r extends t.QueryBuilder{constructor(){super(),this._builder=new l.GetBySolidityIDQuery,this._builder.setHeader(new i.QueryHeader),this._inner.setGetbysolidityid(this._builder)}setSolidityId(y){return this._builder.setSolidityid(y),this}_doLocalValidate(){}_getHeader(){return this._builder.getHeader()}_getMethod(){return s.SmartContractService.getBySolidityID}_mapResponseHeader(y){return y.getGetbysolidityid().getHeader()}_mapResponse(y){const T=y.getGetbysolidityid();if(T.hasAccountid())return{type:"ACCOUNT",accountId:p.AccountId._fromProto(T.getAccountid())};if(T.hasContractid())return{type:"CONTRACT",contractId:h.ContractId._fromProto(T.getContractid())};if(T.hasFileid())return{type:"FILE",fileId:B.FileId._fromProto(T.getFileid())};throw new Error("unreachable")}}n.GetBySolidityIdQuery=r},79643:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hbarFromTinybarOrHbar=n.Hbar=n.hbarCheck=n.hbarToProtoValue=n.hbarToProto=void 0;const t=u(44431),i=u(43447),B=u(45858),h=u(99469),p=Symbol("hbarTinybar");n.hbarToProto=Symbol("hbarToProto"),n.hbarToProtoValue=Symbol("hbarToProtoValue"),n.hbarCheck=Symbol("hbarCheck");function l(F,C){return(t.default.isBigNumber(F)?F:new t.default(F)).multipliedBy(C._toTinybarCount())}const s=new t.default(2).pow(63).minus(1),r=s.dividedBy(B.HbarUnit.Hbar._toTinybarCount()),y=new t.default(-2).pow(63).dividedBy(B.HbarUnit.Hbar._toTinybarCount());class T{constructor(C){const S=C instanceof t.default?C:new t.default(C);if(S.isZero()?this[p]=S:(this[p]=S.multipliedBy(B.HbarUnit.Hbar._toTinybarCount()),this[n.hbarCheck]({allowNegative:!0})),typeof C=="number"&&C>=Math.pow(2,53))throw new i.HbarRangeError(this)}static from(C,S){const E=new t.default(C),k=new T(0);return k[p]=E.multipliedBy(S._toTinybarCount()),k}static fromTinybar(C){const S=new t.default(C),E=new T(0);if(E[p]=S,typeof C=="number"&&C>=Math.pow(2,53))throw new i.HbarRangeError(E);return E}static of(C){return console.warn("`Hbar.of` is deprecated. Use `new Hbar(amount)` instead."),new T(C)}static zero(){return console.warn("`Hbar.zero()` is deprecated. If you want to use `Hbar.zero()` for \ncomparisions then use `Hbar.ZERO` static field, otherwise use `new Hbar(0)`"),new T(new t.default(0))}toString(){return this.value().toString()}value(){return this.as(B.HbarUnit.Hbar)}asTinybar(){return this.as(B.HbarUnit.Tinybar)}as(C){return C.toString()===B.HbarUnit.Tinybar.toString()?this[p]:this[p].dividedBy(C._toTinybarCount())}multipliedBy(C){return new T(this[p].multipliedBy(C).dividedBy(B.HbarUnit.Hbar._toTinybarCount()))}plus(C,S){return new T((C instanceof T?this[p].plus(C[p]):this[p].plus(l(C,S))).dividedBy(B.HbarUnit.Hbar._toTinybarCount()))}minus(C,S){return new T((C instanceof T?this[p].minus(C[p]):this[p].minus(l(C,S))).dividedBy(B.HbarUnit.Hbar._toTinybarCount()))}isEqualTo(C,S){return C instanceof T?this[p].isEqualTo(C[p]):this[p].isEqualTo(l(C,S))}isGreaterThan(C,S){return C instanceof T?this[p].isGreaterThan(C[p]):this[p].isGreaterThan(l(C,S))}isGreaterThanOrEqualTo(C,S){return C instanceof T?this[p].isGreaterThanOrEqualTo(C[p]):this[p].isGreaterThanOrEqualTo(l(C,S))}isLessThan(C,S){return C instanceof T?this[p].isLessThan(C[p]):this[p].isLessThan(l(C,S))}isLessThanOrEqualTo(C,S){return C instanceof T?this[p].isLessThanOrEqualTo(C[p]):this[p].isLessThanOrEqualTo(l(C,S))}comparedTo(C,S){return C instanceof T?this[p].comparedTo(C[p]):this[p].comparedTo(l(C,S))}isZero(){return this[p].isZero()}negated(){return T.fromTinybar(this[p].negated())}isNegative(){return this[p].isNegative()}isPositive(){return this[p].isPositive()}[n.hbarCheck]({allowNegative:C}){const S=this[p];if(S.isNegative()&&!C&&S.isLessThan(s))throw new i.HbarRangeError(this);if(S.isGreaterThan(s))throw new i.HbarRangeError(this)}[n.hbarToProto](){return String(this[p])}[n.hbarToProtoValue](){const C=new h.UInt64Value;return C.setValue(this[p].toNumber()),C}}n.Hbar=T,T.MAX=new T(r),T.MIN=new T(y),T.ZERO=new T(0);function m(F){return F instanceof T?F:T.fromTinybar(new t.default(F))}n.hbarFromTinybarOrHbar=m},45858:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HbarUnit=void 0;const t=u(44431);class i{constructor(h){this._unit=h}getSymbol(){switch(this._unit){case"tinybar":return"t\u210F";case"microbar":return"\u03BC\u210F";case"millibar":return"m\u210F";case"hbar":return"\u210F";case"kilobar":return"k\u210F";case"megabar":return"M\u210F";case"gigabar":return"G\u210F";default:throw new TypeError("HbarUnit was not a valid value")}}_toTinybarCount(){switch(this._unit){case"tinybar":return new t.default(1);case"microbar":return new t.default(100);case"millibar":return new t.default(1e5);case"hbar":return new t.default(1e8);case"kilobar":return new t.default(1e8).multipliedBy(1e3);case"megabar":return new t.default(1e8).multipliedBy(1e6);case"gigabar":return new t.default(1e8).multipliedBy(1e9);default:throw new TypeError("HbarUnit was not a valid value")}}toString(){return this._unit}}n.HbarUnit=i,i.Tinybar=new i("tinybar"),i.Microbar=new i("microbar"),i.Millibar=new i("millibar"),i.Hbar=new i("hbar"),i.Kilobar=new i("kilobar"),i.Megabar=new i("megabar"),i.Gigabar=new i("gigabar")},54804:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NetworkVersionInfoQuery=void 0;const t=u(2820),i=u(58977),B=u(96666),h=u(11107);class p extends t.QueryBuilder{constructor(){super(),this._builder=new i.NetworkGetVersionInfoQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setNetworkgetversioninfo(this._builder)}_doLocalValidate(){}_getMethod(){return h.NetworkService.getVersionInfo}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(s){return s.getNetworkgetversioninfo().getHeader()}_mapResponse(s){const r=s.getNetworkgetversioninfo(),g=r.getHapiprotoversion(),y=r.getHederaservicesversion();return{hapiProtoVersion:{major:g.getMajor(),minor:g.getMinor(),patch:g.getPatch()},hederaServicesVersion:{major:y.getMajor(),minor:y.getMinor(),patch:y.getPatch()}}}}n.NetworkVersionInfoQuery=p},2820:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(C,S,E,k){function R(W){return W instanceof E?W:new E(function(O){O(W)})}return new(E||(E=Promise))(function(W,O){function N(K){try{_(k.next(K))}catch(z){O(z)}}function j(K){try{_(k.throw(K))}catch(z){O(z)}}function _(K){K.done?W(K.value):R(K.value).then(N,j)}_((k=k.apply(C,S||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.QueryBuilder=void 0;const i=u(96666),B=u(72852),h=u(52828),p=u(61692),l=u(24231),s=u(79643),r=u(66774),g=u(90335),y=u(24067),T=u(34977),m=u(12476);class F{constructor(){this._inner=new B.Query,this._maxPaymentAmount=null,this._paymentAmount=null,this._transactionId=null}setMaxQueryPayment(S){const E=s.hbarFromTinybarOrHbar(S);return E[s.hbarCheck]({allowNegative:!1}),this._maxPaymentAmount=E,this}setQueryPayment(S){const E=s.hbarFromTinybarOrHbar(S);return E[s.hbarCheck]({allowNegative:!1}),this._paymentAmount=E,this}setQueryPaymentTransaction(S){return this._transactionId=S.id,this._getHeader().setPayment(S._toProto()),this}getCost(S){return t(this,void 0,void 0,function*(){this._localValidate(!1);const E=this._getHeader(),k=E.getResponsetype(),R=E.getPayment();try{const W=S._randomNode();E.setResponsetype(i.ResponseType.COST_ANSWER);const O=new m.TransferTransaction().addHbarTransfer(W.id,0).addHbarTransfer(S._getOperatorAccountId(),0).build(S);this._transactionId=O.id,E.setPayment((yield O.signWith(S._getOperatorKey(),S._getOperatorSigner()))._toProto());const N=yield S._unaryCall(W.url,this._inner.clone(),this._getMethod()),j=this._mapResponseHeader(N);return T.HederaPrecheckStatusError._throwIfError(j.getNodetransactionprecheckcode(),this._transactionId),s.Hbar.fromTinybar(j.getCost())}finally{E.setResponsetype(k),E.setPayment(R)}})}execute(S){let E=null;return l.timeoutPromise(this._getDefaultExecuteTimeout(),(()=>t(this,void 0,void 0,function*(){let k;if(this._isPaymentRequired()){if(this._getHeader().hasPayment()){const R=this._getHeader().getPayment().getBodybytes_asU8(),W=r.TransactionBody.deserializeBinary(R),O=g.AccountId._fromProto(W.getNodeaccountid());k=S._getNode(O)}else if(this._paymentAmount!=null)k=S._randomNode(),yield this._generatePaymentTransaction(S,k,this._paymentAmount);else if(this._maxPaymentAmount!=null||S._maxQueryPayment!=null){k=S._randomNode();const R=this._maxPaymentAmount==null?S._maxQueryPayment:this._maxPaymentAmount,W=yield this.getCost(S);if(W.isGreaterThan(R))throw new p.MaxQueryPaymentExceededError(W,R);yield this._generatePaymentTransaction(S,k,W)}}else k=S._randomNode();this._localValidate();for(let R=0;;R+=1){if(R>0){const O=Math.floor(500*Math.random()*(Math.pow(2,R)-1));yield l.setTimeoutAwaitable(O)}const W=yield S._unaryCall(k.url,this._inner,this._getMethod());if(E=y.Status._fromCode(this._mapResponseHeader(W).getNodetransactionprecheckcode()),!this._shouldRetry(E,W))return T.HederaPrecheckStatusError._throwIfError(E.code,this._transactionId),this._mapResponse(W)}}))(),k=>{E==null?k(new Error("timed out")):k(new h.HederaStatusError(E))})}_toProto(){return this._inner}_shouldRetry(S,E){return S.code===y.Status.Busy.code}_getDefaultExecuteTimeout(){return 2e4}_isPaymentRequired(){return!0}_localValidate(S=!0){l.runValidation(this,E=>{S&&this._isPaymentRequired()&&!this._getHeader().hasPayment()&&E.push("one of `.setPayment()` or `.setPaymentAmount()` is required"),this._doLocalValidate(E)})}_generatePaymentTransaction(S,E,k){return t(this,void 0,void 0,function*(){const R=s.hbarFromTinybarOrHbar(k);R[s.hbarCheck]({allowNegative:!1});const W=yield new m.TransferTransaction().setNodeAccountId(E.id).addHbarTransfer(E.id,R).addHbarTransfer(S._getOperatorAccountId(),R.negated()).setMaxTransactionFee(new s.Hbar(1)).build(S).signWith(S._getOperatorKey(),S._getOperatorSigner());return this.setQueryPaymentTransaction(W),this})}}n.QueryBuilder=F},24067:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Status=void 0;const t=u(52828);class i{constructor(h){this.code=h}toString(){switch(this){case i.Ok:return"OK";case i.InvalidTransaction:return"INVALID_TRANSACTION";case i.PayerAccountNotFound:return"PAYER_ACCOUNT_NOT_FOUND";case i.InvalidNodeAccount:return"INVALID_NODE_ACCOUNT";case i.TransactionExpired:return"TRANSACTION_EXPIRED";case i.InvalidTransactionStart:return"INVALID_TRANSACTION_START";case i.InvalidTransactionDuration:return"INVALID_TRANSACTION_DURATION";case i.InvalidSignature:return"INVALID_SIGNATURE";case i.MemoTooLong:return"MEMO_TOO_LONG";case i.InsufficientTxFee:return"INSUFFICIENT_TX_FEE";case i.InsufficientPayerBalance:return"INSUFFICIENT_PAYER_BALANCE";case i.DuplicateTransaction:return"DUPLICATE_TRANSACTION";case i.Busy:return"BUSY";case i.NotSupported:return"NOT_SUPPORTED";case i.InvalidFileId:return"INVALID_FILE_ID";case i.InvalidAccountId:return"INVALID_ACCOUNT_ID";case i.InvalidContractId:return"INVALID_CONTRACT_ID";case i.InvalidTransactionId:return"INVALID_TRANSACTION_ID";case i.ReceiptNotFound:return"RECEIPT_NOT_FOUND";case i.RecordNotFound:return"RECORD_NOT_FOUND";case i.InvalidSolidityId:return"INVALID_SOLIDITY_ID";case i.Unknown:return"UNKNOWN";case i.Success:return"SUCCESS";case i.FailInvalid:return"FAIL_INVALID";case i.FailFee:return"FAIL_FEE";case i.FailBalance:return"FAIL_BALANCE";case i.KeyRequired:return"KEY_REQUIRED";case i.BadEncoding:return"BAD_ENCODING";case i.InsufficientAccountBalance:return"INSUFFICIENT_ACCOUNT_BALANCE";case i.InvalidSolidityAddress:return"INVALID_SOLIDITY_ADDRESS";case i.InsufficientGas:return"INSUFFICIENT_GAS";case i.ContractSizeLimitExceeded:return"CONTRACT_SIZE_LIMIT_EXCEEDED";case i.LocalCallModificationException:return"LOCAL_CALL_MODIFICATION_EXCEPTION";case i.ContractRevertExecuted:return"CONTRACT_REVERT_EXECUTED";case i.ContractExecutionException:return"CONTRACT_EXECUTION_EXCEPTION";case i.InvalidReceivingNodeAccount:return"INVALID_RECEIVING_NODE_ACCOUNT";case i.MissingQueryHeader:return"MISSING_QUERY_HEADER";case i.AccountUpdateFailed:return"ACCOUNT_UPDATE_FAILED";case i.InvalidKeyEncoding:return"INVALID_KEY_ENCODING";case i.NullSolidityAddress:return"NULL_SOLIDITY_ADDRESS";case i.ContractUpdateFailed:return"CONTRACT_UPDATE_FAILED";case i.InvalidQueryHeader:return"INVALID_QUERY_HEADER";case i.InvalidFeeSubmitted:return"INVALID_FEE_SUBMITTED";case i.InvalidPayerSignature:return"INVALID_PAYER_SIGNATURE";case i.KeyNotProvided:return"KEY_NOT_PROVIDED";case i.InvalidExpirationTime:return"INVALID_EXPIRATION_TIME";case i.NoWaclKey:return"NO_WACL_KEY";case i.FileContentEmpty:return"FILE_CONTENT_EMPTY";case i.InvalidAccountAmounts:return"INVALID_ACCOUNT_AMOUNTS";case i.EmptyTransactionBody:return"EMPTY_TRANSACTION_BODY";case i.InvalidTransactionBody:return"INVALID_TRANSACTION_BODY";case i.InvalidSignatureTypeMismatchingKey:return"INVALID_SIGNATURE_TYPE_MISMATCHING_KEY";case i.InvalidSignatureCountMismatchingKey:return"INVALID_SIGNATURE_COUNT_MISMATCHING_KEY";case i.EmptyLiveHashBody:return"EMPTY_LIVE_HASH_BODY";case i.EmptyLiveHash:return"EMPTY_LIVE_HASH";case i.EmptyLiveHashKeys:return"EMPTY_LIVE_HASH_KEYS";case i.InvalidLiveHashSize:return"INVALID_LIVE_HASH_SIZE";case i.EmptyQueryBody:return"EMPTY_QUERY_BODY";case i.EmptyLiveHashQuery:return"EMPTY_LIVE_HASH_QUERY";case i.LiveHashNotFound:return"LIVE_HASH_NOT_FOUND";case i.AccountIdDoesNotExist:return"ACCOUNT_ID_DOES_NOT_EXIST";case i.LiveHashAlreadyExists:return"LIVE_HASH_ALREADY_EXISTS";case i.InvalidFileWacl:return"INVALID_FILE_WACL";case i.SerializationFailed:return"SERIALIZATION_FAILED";case i.TransactionOversize:return"TRANSACTION_OVERSIZE";case i.TransactionTooManyLayers:return"TRANSACTION_TOO_MANY_LAYERS";case i.ContractDeleted:return"CONTRACT_DELETED";case i.PlatformNotActive:return"PLATFORM_NOT_ACTIVE";case i.KeyPrefixMismatch:return"KEY_PREFIX_MISMATCH";case i.PlatformTransactionNotCreated:return"PLATFORM_TRANSACTION_NOT_CREATED";case i.InvalidRenewalPeriod:return"INVALID_RENEWAL_PERIOD";case i.InvalidPayerAccountId:return"INVALID_PAYER_ACCOUNT_ID";case i.AccountDeleted:return"ACCOUNT_DELETED";case i.FileDeleted:return"FILE_DELETED";case i.AccountRepeatedInAccountAmounts:return"ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS";case i.SettingNegativeAccountBalance:return"SETTING_NEGATIVE_ACCOUNT_BALANCE";case i.ObtainerRequired:return"OBTAINER_REQUIRED";case i.ObtainerSameContractId:return"OBTAINER_SAME_CONTRACT_ID";case i.ObtainerDoesNotExist:return"OBTAINER_DOES_NOT_EXIST";case i.ModifyingImmutableContract:return"MODIFYING_IMMUTABLE_CONTRACT";case i.FileSystemException:return"FILE_SYSTEM_EXCEPTION";case i.AutorenewDurationNotInRange:return"AUTORENEW_DURATION_NOT_IN_RANGE";case i.ErrorDecodingBytestring:return"ERROR_DECODING_BYTESTRING";case i.ContractFileEmpty:return"CONTRACT_FILE_EMPTY";case i.ContractBytecodeEmpty:return"CONTRACT_BYTECODE_EMPTY";case i.InvalidInitialBalance:return"INVALID_INITIAL_BALANCE";case i.InvalidReceiveRecordThreshold:return"INVALID_RECEIVE_RECORD_THRESHOLD";case i.InvalidSendRecordThreshold:return"INVALID_SEND_RECORD_THRESHOLD";case i.AccountIsNotGenesisAccount:return"ACCOUNT_IS_NOT_GENESIS_ACCOUNT";case i.PayerAccountUnauthorized:return"PAYER_ACCOUNT_UNAUTHORIZED";case i.InvalidFreezeTransactionBody:return"INVALID_FREEZE_TRANSACTION_BODY";case i.FreezeTransactionBodyNotFound:return"FREEZE_TRANSACTION_BODY_NOT_FOUND";case i.TransferListSizeLimitExceeded:return"TRANSFER_LIST_SIZE_LIMIT_EXCEEDED";case i.ResultSizeLimitExceeded:return"RESULT_SIZE_LIMIT_EXCEEDED";case i.NotSpecialAccount:return"NOT_SPECIAL_ACCOUNT";case i.ContractNegativeGas:return"CONTRACT_NEGATIVE_GAS";case i.ContractNegativeValue:return"CONTRACT_NEGATIVE_VALUE";case i.InvalidFeeFile:return"INVALID_FEE_FILE";case i.InvalidExchangeRateFile:return"INVALID_EXCHANGE_RATE_FILE";case i.InsufficientLocalCallGas:return"INSUFFICIENT_LOCAL_CALL_GAS";case i.EntityNotAllowedToDelete:return"ENTITY_NOT_ALLOWED_TO_DELETE";case i.AuthorizationFailed:return"AUTHORIZATION_FAILED";case i.FileUploadedProtoInvalid:return"FILE_UPLOADED_PROTO_INVALID";case i.FileUploadedProtoNotSavedToDisk:return"FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK";case i.FeeScheduleFilePartUploaded:return"FEE_SCHEDULE_FILE_PART_UPLOADED";case i.ExchangeRateChangeLimitExceeded:return"EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED";case i.MaxContractStorageExceeded:return"MAX_CONTRACT_STORAGE_EXCEEDED";case i.TransferAccountSameAsDeleteAccount:return"TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT";case i.TotalLedgerBalanceInvalid:return"TOTAL_LEDGER_BALANCE_INVALID";case i.ExpirationReductionNotAllowed:return"EXPIRATION_REDUCTION_NOT_ALLOWED";case i.MaxGasLimitExceeded:return"MAX_GAS_LIMIT_EXCEEDED";case i.MaxFileSizeExceeded:return"MAX_FILE_SIZE_EXCEEDED";case i.ReceiverSigRequired:return"RECEIVER_SIG_REQUIRED";case i.InvalidTopicId:return"INVALID_TOPIC_ID";case i.InvalidAdminKey:return"INVALID_ADMIN_KEY";case i.InvalidSubmitKey:return"INVALID_SUBMIT_KEY";case i.Unauthorized:return"UNAUTHORIZED";case i.InvalidTopicMessage:return"INVALID_TOPIC_MESSAGE";case i.InvalidAutorenewAccount:return"INVALID_AUTORENEW_ACCOUNT";case i.AutorenewAccountNotAllowed:return"AUTORENEW_ACCOUNT_NOT_ALLOWED";case i.TopicExpired:return"TOPIC_EXPIRED";case i.InvalidChunkNumber:return"INVALID_CHUNK_NUMBER";case i.InvalidChunkTransactionId:return"INVALID_CHUNK_TRANSACTION_ID";case i.AccountFrozenForToken:return"ACCOUNT_FROZEN_FOR_TOKEN";case i.TokensPerAccountLimitExceeded:return"TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED";case i.InvalidTokenId:return"INVALID_TOKEN_ID";case i.InvalidTokenDecimals:return"INVALID_TOKEN_DECIMALS";case i.InvalidTokenInitialSupply:return"INVALID_TOKEN_INITIAL_SUPPLY";case i.InvalidTreasuryAccountForToken:return"INVALID_TREASURY_ACCOUNT_FOR_TOKEN";case i.InvalidTokenSymbol:return"INVALID_TOKEN_SYMBOL";case i.TokenHasNoFreezeKey:return"TOKEN_HAS_NO_FREEZE_KEY";case i.TransfersNotZeroSumForToken:return"TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN";case i.MissingTokenSymbol:return"MISSING_TOKEN_SYMBOL";case i.TokenSymbolTooLong:return"TOKEN_SYMBOL_TOO_LONG";case i.AccountKycNotGrantedForToken:return"ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN";case i.TokenHasNoKycKey:return"TOKEN_HAS_NO_KYC_KEY";case i.InsufficientTokenBalance:return"INSUFFICIENT_TOKEN_BALANCE";case i.TokenWasDeleted:return"TOKEN_WAS_DELETED";case i.TokenHasNoSupplyKey:return"TOKEN_HAS_NO_SUPPLY_KEY";case i.TokenHasNoWipeKey:return"TOKEN_HAS_NO_WIPE_KEY";case i.InvalidTokenMintAmount:return"INVALID_TOKEN_MINT_AMOUNT";case i.InvalidTokenBurnAmount:return"INVALID_TOKEN_BURN_AMOUNT";case i.TokenNotAssociatedToAccount:return"TOKEN_NOT_ASSOCIATED_TO_ACCOUNT";case i.CannotWipeTokenTreasuryAccount:return"CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT";case i.InvalidKycKey:return"INVALID_KYC_KEY";case i.InvalidWipeKey:return"INVALID_WIPE_KEY";case i.InvalidFreezeKey:return"INVALID_FREEZE_KEY";case i.InvalidSupplyKey:return"INVALID_SUPPLY_KEY";case i.MissingTokenName:return"MISSING_TOKEN_NAME";case i.TokenNameTooLong:return"TOKEN_NAME_TOO_LONG";case i.InvalidWipingAmount:return"INVALID_WIPING_AMOUNT";case i.TokenIsImmutable:return"TOKEN_IS_IMMUTABLE";case i.TokenAlreadyAssociatedToAccount:return"TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT";case i.TransactionRequiresZeroTokenBalances:return"TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES";case i.AccountIsTreasury:return"ACCOUNT_IS_TREASURY";case i.TokenIdRepeatedInTokenList:return"TOKEN_ID_REPEATED_IN_TOKEN_LIST";case i.TokenTransferListSizeLimitExceeded:return"TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED";case i.EmptyTokenTransferBody:return"EMPTY_TOKEN_TRANSFER_BODY";case i.EmptyTokenTransferAccountAmounts:return"EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS";case i.InvalidScheduleId:return"INVALID_SCHEDULE_ID";case i.ScheduleIsImmutable:return"SCHEDULE_IS_IMMUTABLE";case i.InvalidSchedulePayerId:return"INVALID_SCHEDULE_PAYER_ID";case i.InvalidScheduleAccountId:return"INVALID_SCHEDULE_ACCOUNT_ID";case i.NoNewValidSignatures:return"NO_NEW_VALID_SIGNATURES";case i.UnresolvableRequiredSigners:return"UNRESOLVABLE_REQUIRED_SIGNERS";case i.ScheduledTransactionNotInWhitelist:return"SCHEDULED_TRANSACTION_NOT_IN_WHITELIST";case i.SomeSignaturesWereInvalid:return"SOME_SIGNATURES_WERE_INVALID";case i.TransactionIdFieldNotAllowed:return"TRANSACTION_ID_FIELD_NOT_ALLOWED";case i.IdenticalScheduleAlreadyCreated:return"IDENTICAL_SCHEDULE_ALREADY_CREATED";case i.InvalidZeroByteInString:return"INVALID_ZERO_BYTE_IN_STRING";case i.ScheduleAlreadyDeleted:return"SCHEDULE_ALREADY_DELETED";case i.ScheduleAlreadyExecuted:return"SCHEDULE_ALREADY_EXECUTED";case i.MessageSizeTooLarge:return"MESSAGE_SIZE_TOO_LARGE";case i.OperationRepeatedInBucketGroups:return"OPERATION_REPEATED_IN_BUCKET_GROUPS";case i.BucketCapacityOverflow:return"BUCKET_CAPACITY_OVERFLOW";case i.NodeCapacityNotSufficientForOperation:return"NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION";case i.BucketHasNoThrottleGroups:return"BUCKET_HAS_NO_THROTTLE_GROUPS";case i.ThrottleGroupHasZeroOpsPerSec:return"THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC";case i.SuccessButMissingExpectedOperation:return"SUCCESS_BUT_MISSING_EXPECTED_OPERATION";case i.UnparseableThrottleDefinitions:return"UNPARSEABLE_THROTTLE_DEFINITIONS";case i.InvalidThrottleDefinitions:return"INVALID_THROTTLE_DEFINITIONS";case i.AccountExpiredAndPendingRemoval:return"ACCOUNT_EXPIRED_AND_PENDING_REMOVAL";case i.InvalidTokenMaxSupply:return"INVALID_TOKEN_MAX_SUPPLY";case i.InvalidTokenNftSerialNumber:return"INVALID_TOKEN_NFT_SERIAL_NUMBER";case i.InvalidNftId:return"INVALID_NFT_ID";case i.MetadataTooLong:return"METADATA_TOO_LONG";case i.BatchSizeLimitExceeded:return"BATCH_SIZE_LIMIT_EXCEEDED";case i.InvalidQueryRange:return"INVALID_QUERY_RANGE";case i.FractionDividesByZero:return"FRACTION_DIVIDES_BY_ZERO";case i.InsufficientPayerBalanceForCustomFee:return"INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE";case i.CustomFeesListTooLong:return"CUSTOM_FEES_LIST_TOO_LONG";case i.InvalidCustomFeeCollector:return"INVALID_CUSTOM_FEE_COLLECTOR";case i.InvalidTokenIdInCustomFees:return"INVALID_TOKEN_ID_IN_CUSTOM_FEES";case i.TokenNotAssociatedToFeeCollector:return"TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR";case i.TokenMaxSupplyReached:return"TOKEN_MAX_SUPPLY_REACHED";case i.SenderDoesNotOwnNftSerialNo:return"SENDER_DOES_NOT_OWN_NFT_SERIAL_NO";case i.CustomFeeNotFullySpecified:return"CUSTOM_FEE_NOT_FULLY_SPECIFIED";case i.CustomFeeMustBePositive:return"CUSTOM_FEE_MUST_BE_POSITIVE";case i.TokenHasNoFeeScheduleKey:return"TOKEN_HAS_NO_FEE_SCHEDULE_KEY";case i.CustomFeeOutsideNumericRange:return"CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE";case i.RoyaltyFractionCannotExceedOne:return"ROYALTY_FRACTION_CANNOT_EXCEED_ONE";case i.FractionalFeeMaxAmountLessThanMinAmount:return"FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT";case i.CustomScheduleAlreadyHasNoFees:return"CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES";case i.CustomFeeDenominationMustBeFungibleCommon:return"CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON";case i.CustomFractionalFeeOnlyAllowedForFungibleCommon:return"CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON";case i.InvalidCustomFeeScheduleKey:return"INVALID_CUSTOM_FEE_SCHEDULE_KEY";case i.InvalidTokenMintMetadata:return"INVALID_TOKEN_MINT_METADATA";case i.InvalidTokenBurnMetadata:return"INVALID_TOKEN_BURN_METADATA";case i.CurrentTreasuryStillOwnsNfts:return"CURRENT_TREASURY_STILL_OWNS_NFTS";case i.AccountStillOwnsNfts:return"ACCOUNT_STILL_OWNS_NFTS";case i.TreasuryMustOwnBurnedNft:return"TREASURY_MUST_OWN_BURNED_NFT";case i.AccountDoesNotOwnWipedNft:return"ACCOUNT_DOES_NOT_OWN_WIPED_NFT";case i.AccountAmountTransfersOnlyAllowedForFungibleCommon:return"ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON";case i.MaxNftsInPriceRegimeHaveBeenMinted:return"MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED";case i.PayerAccountDeleted:return"PAYER_ACCOUNT_DELETED";case i.CustomFeeChargingExceededMaxRecursionDepth:return"CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH";case i.CustomFeeChargingExceededMaxAccountAmounts:return"CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS";case i.InsufficientSenderAccountBalanceForCustomFee:return"INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE";case i.SerialNumberLimitReached:return"SERIAL_NUMBER_LIMIT_REACHED";case i.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique:return"CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE";default:return`UNKNOWN STATUS CODE (${this.code})`}}_isBusy(){return i.Busy===this}static _fromCode(h){var p;return(p=i[h])!==null&&p!==void 0?p:new i(h)}_isError(){switch(this){case i.Success:case i.Ok:return!1;case i.Unknown:case i.ReceiptNotFound:case i.RecordNotFound:return!0;default:return!0}}_throwIfError(){if(this._isError())throw new t.HederaStatusError(this)}}n.Status=i,i.Ok=new i(0),i.InvalidTransaction=new i(1),i.PayerAccountNotFound=new i(2),i.InvalidNodeAccount=new i(3),i.TransactionExpired=new i(4),i.InvalidTransactionStart=new i(5),i.InvalidTransactionDuration=new i(6),i.InvalidSignature=new i(7),i.MemoTooLong=new i(8),i.InsufficientTxFee=new i(9),i.InsufficientPayerBalance=new i(10),i.DuplicateTransaction=new i(11),i.Busy=new i(12),i.NotSupported=new i(13),i.InvalidFileId=new i(14),i.InvalidAccountId=new i(15),i.InvalidContractId=new i(16),i.InvalidTransactionId=new i(17),i.ReceiptNotFound=new i(18),i.RecordNotFound=new i(19),i.InvalidSolidityId=new i(20),i.Unknown=new i(21),i.Success=new i(22),i.FailInvalid=new i(23),i.FailFee=new i(24),i.FailBalance=new i(25),i.KeyRequired=new i(26),i.BadEncoding=new i(27),i.InsufficientAccountBalance=new i(28),i.InvalidSolidityAddress=new i(29),i.InsufficientGas=new i(30),i.ContractSizeLimitExceeded=new i(31),i.LocalCallModificationException=new i(32),i.ContractRevertExecuted=new i(33),i.ContractExecutionException=new i(34),i.InvalidReceivingNodeAccount=new i(35),i.MissingQueryHeader=new i(36),i.AccountUpdateFailed=new i(37),i.InvalidKeyEncoding=new i(38),i.NullSolidityAddress=new i(39),i.ContractUpdateFailed=new i(40),i.InvalidQueryHeader=new i(41),i.InvalidFeeSubmitted=new i(42),i.InvalidPayerSignature=new i(43),i.KeyNotProvided=new i(44),i.InvalidExpirationTime=new i(45),i.NoWaclKey=new i(46),i.FileContentEmpty=new i(47),i.InvalidAccountAmounts=new i(48),i.EmptyTransactionBody=new i(49),i.InvalidTransactionBody=new i(50),i.InvalidSignatureTypeMismatchingKey=new i(51),i.InvalidSignatureCountMismatchingKey=new i(52),i.EmptyLiveHashBody=new i(53),i.EmptyLiveHash=new i(54),i.EmptyLiveHashKeys=new i(55),i.InvalidLiveHashSize=new i(56),i.EmptyQueryBody=new i(57),i.EmptyLiveHashQuery=new i(58),i.LiveHashNotFound=new i(59),i.AccountIdDoesNotExist=new i(60),i.LiveHashAlreadyExists=new i(61),i.InvalidFileWacl=new i(62),i.SerializationFailed=new i(63),i.TransactionOversize=new i(64),i.TransactionTooManyLayers=new i(65),i.ContractDeleted=new i(66),i.PlatformNotActive=new i(67),i.KeyPrefixMismatch=new i(68),i.PlatformTransactionNotCreated=new i(69),i.InvalidRenewalPeriod=new i(70),i.InvalidPayerAccountId=new i(71),i.AccountDeleted=new i(72),i.FileDeleted=new i(73),i.AccountRepeatedInAccountAmounts=new i(74),i.SettingNegativeAccountBalance=new i(75),i.ObtainerRequired=new i(76),i.ObtainerSameContractId=new i(77),i.ObtainerDoesNotExist=new i(78),i.ModifyingImmutableContract=new i(79),i.FileSystemException=new i(80),i.AutorenewDurationNotInRange=new i(81),i.ErrorDecodingBytestring=new i(82),i.ContractFileEmpty=new i(83),i.ContractBytecodeEmpty=new i(84),i.InvalidInitialBalance=new i(85),i.InvalidReceiveRecordThreshold=new i(86),i.InvalidSendRecordThreshold=new i(87),i.AccountIsNotGenesisAccount=new i(88),i.PayerAccountUnauthorized=new i(89),i.InvalidFreezeTransactionBody=new i(90),i.FreezeTransactionBodyNotFound=new i(91),i.TransferListSizeLimitExceeded=new i(92),i.ResultSizeLimitExceeded=new i(93),i.NotSpecialAccount=new i(94),i.ContractNegativeGas=new i(95),i.ContractNegativeValue=new i(96),i.InvalidFeeFile=new i(97),i.InvalidExchangeRateFile=new i(98),i.InsufficientLocalCallGas=new i(99),i.EntityNotAllowedToDelete=new i(100),i.AuthorizationFailed=new i(101),i.FileUploadedProtoInvalid=new i(102),i.FileUploadedProtoNotSavedToDisk=new i(103),i.FeeScheduleFilePartUploaded=new i(104),i.ExchangeRateChangeLimitExceeded=new i(105),i.MaxContractStorageExceeded=new i(106),i.TransferAccountSameAsDeleteAccount=new i(107),i.TotalLedgerBalanceInvalid=new i(108),i.ExpirationReductionNotAllowed=new i(110),i.MaxGasLimitExceeded=new i(111),i.MaxFileSizeExceeded=new i(112),i.ReceiverSigRequired=new i(113),i.InvalidTopicId=new i(150),i.InvalidAdminKey=new i(155),i.InvalidSubmitKey=new i(156),i.Unauthorized=new i(157),i.InvalidTopicMessage=new i(158),i.InvalidAutorenewAccount=new i(159),i.AutorenewAccountNotAllowed=new i(160),i.TopicExpired=new i(162),i.InvalidChunkNumber=new i(163),i.InvalidChunkTransactionId=new i(164),i.AccountFrozenForToken=new i(165),i.TokensPerAccountLimitExceeded=new i(166),i.InvalidTokenId=new i(167),i.InvalidTokenDecimals=new i(168),i.InvalidTokenInitialSupply=new i(169),i.InvalidTreasuryAccountForToken=new i(170),i.InvalidTokenSymbol=new i(171),i.TokenHasNoFreezeKey=new i(172),i.TransfersNotZeroSumForToken=new i(173),i.MissingTokenSymbol=new i(174),i.TokenSymbolTooLong=new i(175),i.AccountKycNotGrantedForToken=new i(176),i.TokenHasNoKycKey=new i(177),i.InsufficientTokenBalance=new i(178),i.TokenWasDeleted=new i(179),i.TokenHasNoSupplyKey=new i(180),i.TokenHasNoWipeKey=new i(181),i.InvalidTokenMintAmount=new i(182),i.InvalidTokenBurnAmount=new i(183),i.TokenNotAssociatedToAccount=new i(184),i.CannotWipeTokenTreasuryAccount=new i(185),i.InvalidKycKey=new i(186),i.InvalidWipeKey=new i(187),i.InvalidFreezeKey=new i(188),i.InvalidSupplyKey=new i(189),i.MissingTokenName=new i(190),i.TokenNameTooLong=new i(191),i.InvalidWipingAmount=new i(192),i.TokenIsImmutable=new i(193),i.TokenAlreadyAssociatedToAccount=new i(194),i.TransactionRequiresZeroTokenBalances=new i(195),i.AccountIsTreasury=new i(196),i.TokenIdRepeatedInTokenList=new i(197),i.TokenTransferListSizeLimitExceeded=new i(198),i.EmptyTokenTransferBody=new i(199),i.EmptyTokenTransferAccountAmounts=new i(200),i.InvalidScheduleId=new i(201),i.ScheduleIsImmutable=new i(202),i.InvalidSchedulePayerId=new i(203),i.InvalidScheduleAccountId=new i(204),i.NoNewValidSignatures=new i(205),i.UnresolvableRequiredSigners=new i(206),i.ScheduledTransactionNotInWhitelist=new i(207),i.SomeSignaturesWereInvalid=new i(208),i.TransactionIdFieldNotAllowed=new i(209),i.IdenticalScheduleAlreadyCreated=new i(210),i.InvalidZeroByteInString=new i(211),i.ScheduleAlreadyDeleted=new i(212),i.ScheduleAlreadyExecuted=new i(213),i.MessageSizeTooLarge=new i(214),i.OperationRepeatedInBucketGroups=new i(215),i.BucketCapacityOverflow=new i(216),i.NodeCapacityNotSufficientForOperation=new i(217),i.BucketHasNoThrottleGroups=new i(218),i.ThrottleGroupHasZeroOpsPerSec=new i(219),i.SuccessButMissingExpectedOperation=new i(220),i.UnparseableThrottleDefinitions=new i(221),i.InvalidThrottleDefinitions=new i(222),i.AccountExpiredAndPendingRemoval=new i(223),i.InvalidTokenMaxSupply=new i(224),i.InvalidTokenNftSerialNumber=new i(225),i.InvalidNftId=new i(226),i.MetadataTooLong=new i(227),i.BatchSizeLimitExceeded=new i(228),i.InvalidQueryRange=new i(229),i.FractionDividesByZero=new i(230),i.InsufficientPayerBalanceForCustomFee=new i(231),i.CustomFeesListTooLong=new i(232),i.InvalidCustomFeeCollector=new i(233),i.InvalidTokenIdInCustomFees=new i(234),i.TokenNotAssociatedToFeeCollector=new i(235),i.TokenMaxSupplyReached=new i(236),i.SenderDoesNotOwnNftSerialNo=new i(237),i.CustomFeeNotFullySpecified=new i(238),i.CustomFeeMustBePositive=new i(239),i.TokenHasNoFeeScheduleKey=new i(240),i.CustomFeeOutsideNumericRange=new i(241),i.RoyaltyFractionCannotExceedOne=new i(242),i.FractionalFeeMaxAmountLessThanMinAmount=new i(243),i.CustomScheduleAlreadyHasNoFees=new i(244),i.CustomFeeDenominationMustBeFungibleCommon=new i(245),i.CustomFractionalFeeOnlyAllowedForFungibleCommon=new i(246),i.InvalidCustomFeeScheduleKey=new i(247),i.InvalidTokenMintMetadata=new i(248),i.InvalidTokenBurnMetadata=new i(249),i.CurrentTreasuryStillOwnsNfts=new i(250),i.AccountStillOwnsNfts=new i(251),i.TreasuryMustOwnBurnedNft=new i(252),i.AccountDoesNotOwnWipedNft=new i(253),i.AccountAmountTransfersOnlyAllowedForFungibleCommon=new i(254),i.MaxNftsInPriceRegimeHaveBeenMinted=new i(255),i.PayerAccountDeleted=new i(256),i.CustomFeeChargingExceededMaxRecursionDepth=new i(257),i.CustomFeeChargingExceededMaxAccountAmounts=new i(258),i.InsufficientSenderAccountBalanceForCustomFee=new i(259),i.SerialNumberLimitReached=new i(260),i.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique=new i(261),i[0]=i.Ok,i[1]=i.InvalidTransaction,i[2]=i.PayerAccountNotFound,i[3]=i.InvalidNodeAccount,i[4]=i.TransactionExpired,i[5]=i.InvalidTransactionStart,i[6]=i.InvalidTransactionDuration,i[7]=i.InvalidSignature,i[8]=i.MemoTooLong,i[9]=i.InsufficientTxFee,i[10]=i.InsufficientPayerBalance,i[11]=i.DuplicateTransaction,i[12]=i.Busy,i[13]=i.NotSupported,i[14]=i.InvalidFileId,i[15]=i.InvalidAccountId,i[16]=i.InvalidContractId,i[17]=i.InvalidTransactionId,i[18]=i.ReceiptNotFound,i[19]=i.RecordNotFound,i[20]=i.InvalidSolidityId,i[21]=i.Unknown,i[22]=i.Success,i[23]=i.FailInvalid,i[24]=i.FailFee,i[25]=i.FailBalance,i[26]=i.KeyRequired,i[27]=i.BadEncoding,i[28]=i.InsufficientAccountBalance,i[29]=i.InvalidSolidityAddress,i[30]=i.InsufficientGas,i[31]=i.ContractSizeLimitExceeded,i[32]=i.LocalCallModificationException,i[33]=i.ContractRevertExecuted,i[34]=i.ContractExecutionException,i[35]=i.InvalidReceivingNodeAccount,i[36]=i.MissingQueryHeader,i[37]=i.AccountUpdateFailed,i[38]=i.InvalidKeyEncoding,i[39]=i.NullSolidityAddress,i[40]=i.ContractUpdateFailed,i[41]=i.InvalidQueryHeader,i[42]=i.InvalidFeeSubmitted,i[43]=i.InvalidPayerSignature,i[44]=i.KeyNotProvided,i[45]=i.InvalidExpirationTime,i[46]=i.NoWaclKey,i[47]=i.FileContentEmpty,i[48]=i.InvalidAccountAmounts,i[49]=i.EmptyTransactionBody,i[50]=i.InvalidTransactionBody,i[51]=i.InvalidSignatureTypeMismatchingKey,i[52]=i.InvalidSignatureCountMismatchingKey,i[53]=i.EmptyLiveHashBody,i[54]=i.EmptyLiveHash,i[55]=i.EmptyLiveHashKeys,i[56]=i.InvalidLiveHashSize,i[57]=i.EmptyQueryBody,i[58]=i.EmptyLiveHashQuery,i[59]=i.LiveHashNotFound,i[60]=i.AccountIdDoesNotExist,i[61]=i.LiveHashAlreadyExists,i[62]=i.InvalidFileWacl,i[63]=i.SerializationFailed,i[64]=i.TransactionOversize,i[65]=i.TransactionTooManyLayers,i[66]=i.ContractDeleted,i[67]=i.PlatformNotActive,i[68]=i.KeyPrefixMismatch,i[69]=i.PlatformTransactionNotCreated,i[70]=i.InvalidRenewalPeriod,i[71]=i.InvalidPayerAccountId,i[72]=i.AccountDeleted,i[73]=i.FileDeleted,i[74]=i.AccountRepeatedInAccountAmounts,i[75]=i.SettingNegativeAccountBalance,i[76]=i.ObtainerRequired,i[77]=i.ObtainerSameContractId,i[78]=i.ObtainerDoesNotExist,i[79]=i.ModifyingImmutableContract,i[80]=i.FileSystemException,i[81]=i.AutorenewDurationNotInRange,i[82]=i.ErrorDecodingBytestring,i[83]=i.ContractFileEmpty,i[84]=i.ContractBytecodeEmpty,i[85]=i.InvalidInitialBalance,i[86]=i.InvalidReceiveRecordThreshold,i[87]=i.InvalidSendRecordThreshold,i[88]=i.AccountIsNotGenesisAccount,i[89]=i.PayerAccountUnauthorized,i[90]=i.InvalidFreezeTransactionBody,i[91]=i.FreezeTransactionBodyNotFound,i[92]=i.TransferListSizeLimitExceeded,i[93]=i.ResultSizeLimitExceeded,i[94]=i.NotSpecialAccount,i[95]=i.ContractNegativeGas,i[96]=i.ContractNegativeValue,i[97]=i.InvalidFeeFile,i[98]=i.InvalidExchangeRateFile,i[99]=i.InsufficientLocalCallGas,i[100]=i.EntityNotAllowedToDelete,i[101]=i.AuthorizationFailed,i[102]=i.FileUploadedProtoInvalid,i[103]=i.FileUploadedProtoNotSavedToDisk,i[104]=i.FeeScheduleFilePartUploaded,i[105]=i.ExchangeRateChangeLimitExceeded,i[106]=i.MaxContractStorageExceeded,i[107]=i.TransferAccountSameAsDeleteAccount,i[108]=i.TotalLedgerBalanceInvalid,i[110]=i.ExpirationReductionNotAllowed,i[111]=i.MaxGasLimitExceeded,i[112]=i.MaxFileSizeExceeded,i[113]=i.ReceiverSigRequired,i[150]=i.InvalidTopicId,i[155]=i.InvalidAdminKey,i[156]=i.InvalidSubmitKey,i[157]=i.Unauthorized,i[158]=i.InvalidTopicMessage,i[159]=i.InvalidAutorenewAccount,i[160]=i.AutorenewAccountNotAllowed,i[162]=i.TopicExpired,i[163]=i.InvalidChunkNumber,i[164]=i.InvalidChunkTransactionId,i[165]=i.AccountFrozenForToken,i[166]=i.TokensPerAccountLimitExceeded,i[167]=i.InvalidTokenId,i[168]=i.InvalidTokenDecimals,i[169]=i.InvalidTokenInitialSupply,i[170]=i.InvalidTreasuryAccountForToken,i[171]=i.InvalidTokenSymbol,i[172]=i.TokenHasNoFreezeKey,i[173]=i.TransfersNotZeroSumForToken,i[174]=i.MissingTokenSymbol,i[175]=i.TokenSymbolTooLong,i[176]=i.AccountKycNotGrantedForToken,i[177]=i.TokenHasNoKycKey,i[178]=i.InsufficientTokenBalance,i[179]=i.TokenWasDeleted,i[180]=i.TokenHasNoSupplyKey,i[181]=i.TokenHasNoWipeKey,i[182]=i.InvalidTokenMintAmount,i[183]=i.InvalidTokenBurnAmount,i[184]=i.TokenNotAssociatedToAccount,i[185]=i.CannotWipeTokenTreasuryAccount,i[186]=i.InvalidKycKey,i[187]=i.InvalidWipeKey,i[188]=i.InvalidFreezeKey,i[189]=i.InvalidSupplyKey,i[190]=i.MissingTokenName,i[191]=i.TokenNameTooLong,i[192]=i.InvalidWipingAmount,i[193]=i.TokenIsImmutable,i[194]=i.TokenAlreadyAssociatedToAccount,i[195]=i.TransactionRequiresZeroTokenBalances,i[196]=i.AccountIsTreasury,i[197]=i.TokenIdRepeatedInTokenList,i[198]=i.TokenTransferListSizeLimitExceeded,i[199]=i.EmptyTokenTransferBody,i[200]=i.EmptyTokenTransferAccountAmounts,i[201]=i.InvalidScheduleId,i[202]=i.ScheduleIsImmutable,i[203]=i.InvalidSchedulePayerId,i[204]=i.InvalidScheduleAccountId,i[205]=i.NoNewValidSignatures,i[206]=i.UnresolvableRequiredSigners,i[207]=i.ScheduledTransactionNotInWhitelist,i[208]=i.SomeSignaturesWereInvalid,i[209]=i.TransactionIdFieldNotAllowed,i[210]=i.IdenticalScheduleAlreadyCreated,i[211]=i.InvalidZeroByteInString,i[212]=i.ScheduleAlreadyDeleted,i[213]=i.ScheduleAlreadyExecuted,i[214]=i.MessageSizeTooLarge,i[215]=i.OperationRepeatedInBucketGroups,i[216]=i.BucketCapacityOverflow,i[217]=i.NodeCapacityNotSufficientForOperation,i[218]=i.BucketHasNoThrottleGroups,i[219]=i.ThrottleGroupHasZeroOpsPerSec,i[220]=i.SuccessButMissingExpectedOperation,i[221]=i.UnparseableThrottleDefinitions,i[222]=i.InvalidThrottleDefinitions,i[223]=i.AccountExpiredAndPendingRemoval,i[224]=i.InvalidTokenMaxSupply,i[225]=i.InvalidTokenNftSerialNumber,i[226]=i.InvalidNftId,i[227]=i.MetadataTooLong,i[228]=i.BatchSizeLimitExceeded,i[229]=i.InvalidQueryRange,i[230]=i.FractionDividesByZero,i[231]=i.InsufficientPayerBalanceForCustomFee,i[232]=i.CustomFeesListTooLong,i[233]=i.InvalidCustomFeeCollector,i[234]=i.InvalidTokenIdInCustomFees,i[235]=i.TokenNotAssociatedToFeeCollector,i[236]=i.TokenMaxSupplyReached,i[237]=i.SenderDoesNotOwnNftSerialNo,i[238]=i.CustomFeeNotFullySpecified,i[239]=i.CustomFeeMustBePositive,i[240]=i.TokenHasNoFeeScheduleKey,i[241]=i.CustomFeeOutsideNumericRange,i[242]=i.RoyaltyFractionCannotExceedOne,i[243]=i.FractionalFeeMaxAmountLessThanMinAmount,i[244]=i.CustomScheduleAlreadyHasNoFees,i[245]=i.CustomFeeDenominationMustBeFungibleCommon,i[246]=i.CustomFractionalFeeOnlyAllowedForFungibleCommon,i[247]=i.InvalidCustomFeeScheduleKey,i[248]=i.InvalidTokenMintMetadata,i[249]=i.InvalidTokenBurnMetadata,i[250]=i.CurrentTreasuryStillOwnsNfts,i[251]=i.AccountStillOwnsNfts,i[252]=i.TreasuryMustOwnBurnedNft,i[253]=i.AccountDoesNotOwnWipedNft,i[254]=i.AccountAmountTransfersOnlyAllowedForFungibleCommon,i[255]=i.MaxNftsInPriceRegimeHaveBeenMinted,i[256]=i.PayerAccountDeleted,i[257]=i.CustomFeeChargingExceededMaxRecursionDepth,i[258]=i.CustomFeeChargingExceededMaxAccountAmounts,i[259]=i.InsufficientSenderAccountBalanceForCustomFee,i[260]=i.SerialNumberLimitReached,i[261]=i.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique},46174:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SystemDeleteTransaction=void 0;const t=u(66498),i=u(68169),B=u(13660),h=u(41331),p=u(30672),l=u(10462),s=u(24231);class r extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.SystemDeleteTransactionBody,this.setExpirationTime(Date.now()+789e7),this._inner.setSystemdelete(this._body)}setExpirationTime(y){return this._body.setExpirationtime(B.timestampToProto(B.dateToTimestamp(y))),this}setId(y){console.warn("`.setId` is deprecated. Use `.setFileId` or `.setContractId` instead");try{const T=s.normalizeEntityId("file",y);this._body.setFileid(new h.FileId(T)._toProto())}catch{const m=s.normalizeEntityId("contract",y);this._body.setContractid(new p.ContractId(m)._toProto())}return this}setFileId(y){return this._body.setFileid(new h.FileId(y)._toProto()),this}setContractId(y){return this._body.setContractid(new p.ContractId(y)._toProto()),this}_doValidate(y){!this._body.hasContractid()==null&&!this._body.hasFileid()&&y.push("SystemDelete must have an id set. Use `.setFileId()` or `.setContractId()")}get _method(){return l.FileService.systemDelete}}n.SystemDeleteTransaction=r},8958:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SystemUndeleteTransaction=void 0;const t=u(66498),i=u(41331),B=u(30672),h=u(10462),p=u(42012),l=u(24231);class s extends t.SingleTransactionBuilder{constructor(){super(),this._body=new p.SystemUndeleteTransactionBody,this._inner.setSystemundelete(this._body)}setId(g){console.warn("`.setId` is deprecated. Use `.setFileId` or `.setContractId` instead");try{const y=l.normalizeEntityId("file",g);this._body.setFileid(new i.FileId(y)._toProto())}catch{const T=l.normalizeEntityId("contract",g);this._body.setContractid(new B.ContractId(T)._toProto())}return this}setFileId(g){return this._body.setFileid(new i.FileId(g)._toProto()),this}setContractId(g){return this._body.setContractid(new B.ContractId(g)._toProto()),this}_doValidate(g){!this._body.hasContractid()==null&&!this._body.hasFileid()&&g.push("SystemDelete must have an id set. Use `.setFileId()` or `.setContractId()")}get _method(){return h.FileService.systemDelete}}n.SystemUndeleteTransaction=s},22173:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Time=void 0;const t=u(25867),i=u(44431);class B{constructor(p,l){this.seconds=p,this.nanos=l}asDate(){return new Date(this.seconds*1e3+Math.floor(this.nanos/1e6))}static fromDate(p){let l;if(typeof p=="number")l=p;else if(p instanceof Date)l=p.getTime();else throw new TypeError(`Invalid type ${JSON.stringify(p)} is not 'number' or 'Date'`);const s=Math.floor(l/1e3),r=Math.floor(l%1e3)*1e6;return new B(s,r)}_toProto(){const p=new t.Timestamp;return p.setSeconds(this.seconds.toString()),p.setNanos(this.nanos),p}static _fromProto(p){return new B(new i.default(p.getSeconds()).toNumber(),p.getNanos())}_increment(){return Math.floor(this.nanos+1)===1e9?new B(this.seconds+1,0):new B(this.seconds,this.nanos+1)}}n.Time=B},13660:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timestampToProto=n.timestampToMs=n.timestampToDate=n.dateToTimestamp=void 0;const t=u(25867),i=u(44431);function B(s){const r=s instanceof Date?s.getTime():s;return{seconds:Math.floor(r/1e3),nanos:Math.floor(r%1e3*1e6)}}n.dateToTimestamp=B;function h(s){return new Date(p(s))}n.timestampToDate=h;function p(s){return new i.default(s.getSeconds()).multipliedBy(1e3).plus(Math.floor(s.getNanos()/1e6)).toNumber()}n.timestampToMs=p;function l({seconds:s,nanos:r}){const g=new t.Timestamp;return g.setSeconds(s.toString()),g.setNanos(r),g}n.timestampToProto=l},34518:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(K,z,Y,M){function L(I){return I instanceof Y?I:new Y(function(A){A(I)})}return new(Y||(Y=Promise))(function(I,A){function $(x){try{G(M.next(x))}catch(X){A(X)}}function H(x){try{G(M.throw(x))}catch(X){A(X)}}function G(x){x.done?I(x.value):L(x.value).then($,H)}G((M=M.apply(K,z||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Transaction=n.SCHEDULE_CREATE_TRANSACTION=n.transactionCall=n.transactionCreate=void 0;const i=u(50780),B=u(30107),h=u(66774),p=u(33276),l=u(24231),s=u(33019),r=u(78436),g=u(51450),y=u(98614),T=u(10462),m=u(27044),F=u(80642),C=u(92504),S=u(90335),E=u(49132),k=u(24067),R=u(69323),W=u(95666),O=u(34977),N=500;n.transactionCreate=Symbol("transactionCreate"),n.transactionCall=Symbol("transactionCall"),n.SCHEDULE_CREATE_TRANSACTION=[];class j{constructor(){throw new Error("the constructor of Transaction is private; please construct through TransactionBuilder")}static[n.transactionCreate](z,Y,M,L){const I=Object.create(this.prototype);return I._node=z,I._inner=Y,I._txnId=l.orThrow(M.getTransactionid()),I._validDurationSeconds=l.orThrow(M.getTransactionvalidduration()).getSeconds(),I._method=L,I}static fromBytes(z){const Y=B.Transaction.deserializeBinary(z),M=h.TransactionBody.deserializeBinary(Y.getBodybytes_asU8()),L=S.AccountId._fromProto(l.orThrow(M.getNodeaccountid(),"transaction missing node account ID")),I=_(M);return j[n.transactionCreate](L,Y,M,I)}get id(){return E.TransactionId._fromProto(this._txnId)}schedule(){if(n.SCHEDULE_CREATE_TRANSACTION.length!==1)throw new Error("ScheduleCreateTransaction has not been loaded yet");const z=n.SCHEDULE_CREATE_TRANSACTION[0]().setNodeAccountId(this._node);return z._body.setScheduledtransactionbody(this._getScheduledTransactionBody()),z}_getScheduledTransactionBody(){const z=new F.SchedulableTransactionBody,Y=h.TransactionBody.deserializeBinary(this._inner.getBodybytes_asU8());switch(z.setMemo(Y.getMemo()),z.setTransactionfee(Y.getTransactionfee()),Y.getDataCase()){case h.TransactionBody.DataCase.CONTRACTCREATEINSTANCE:return z.setContractcreateinstance(Y.getContractcreateinstance()),z;case h.TransactionBody.DataCase.CONTRACTDELETEINSTANCE:return z.setContractdeleteinstance(Y.getContractdeleteinstance()),z;case h.TransactionBody.DataCase.CONTRACTUPDATEINSTANCE:return z.setContractupdateinstance(Y.getContractupdateinstance()),z;case h.TransactionBody.DataCase.CONTRACTCALL:return z.setContractcall(Y.getContractcall()),z;case h.TransactionBody.DataCase.CONSENSUSCREATETOPIC:return z.setConsensuscreatetopic(Y.getConsensuscreatetopic()),z;case h.TransactionBody.DataCase.CONSENSUSDELETETOPIC:return z.setConsensusdeletetopic(Y.getConsensusdeletetopic()),z;case h.TransactionBody.DataCase.CONSENSUSSUBMITMESSAGE:return z.setConsensussubmitmessage(Y.getConsensussubmitmessage()),z;case h.TransactionBody.DataCase.CONSENSUSUPDATETOPIC:return z.setConsensusupdatetopic(Y.getConsensusupdatetopic()),z;case h.TransactionBody.DataCase.CRYPTOCREATEACCOUNT:return z.setCryptocreateaccount(Y.getCryptocreateaccount()),z;case h.TransactionBody.DataCase.CRYPTODELETE:return z.setCryptodelete(Y.getCryptodelete()),z;case h.TransactionBody.DataCase.CRYPTOUPDATEACCOUNT:return z.setCryptoupdateaccount(Y.getCryptoupdateaccount()),z;case h.TransactionBody.DataCase.CRYPTOTRANSFER:return z.setCryptotransfer(Y.getCryptotransfer()),z;case h.TransactionBody.DataCase.TOKENASSOCIATE:return z.setTokenassociate(Y.getTokenassociate()),z;case h.TransactionBody.DataCase.TOKENBURN:return z.setTokenburn(Y.getTokenburn()),z;case h.TransactionBody.DataCase.TOKENCREATION:return z.setTokencreation(Y.getTokencreation()),z;case h.TransactionBody.DataCase.TOKENDELETION:return z.setTokendeletion(Y.getTokendeletion()),z;case h.TransactionBody.DataCase.TOKENDISSOCIATE:return z.setTokendissociate(Y.getTokendissociate()),z;case h.TransactionBody.DataCase.TOKENFREEZE:return z.setTokenfreeze(Y.getTokenfreeze()),z;case h.TransactionBody.DataCase.TOKENGRANTKYC:return z.setTokengrantkyc(Y.getTokengrantkyc()),z;case h.TransactionBody.DataCase.TOKENMINT:return z.setTokenmint(Y.getTokenmint()),z;case h.TransactionBody.DataCase.TOKENREVOKEKYC:return z.setTokenrevokekyc(Y.getTokenrevokekyc()),z;case h.TransactionBody.DataCase.TOKENUNFREEZE:return z.setTokenunfreeze(Y.getTokenunfreeze()),z;case h.TransactionBody.DataCase.TOKENWIPE:return z.setTokenwipe(Y.getTokenwipe()),z;case h.TransactionBody.DataCase.TOKENUPDATE:return z.setTokenupdate(Y.getTokenupdate()),z;case h.TransactionBody.DataCase.SCHEDULEDELETE:return z.setScheduledelete(Y.getScheduledelete()),z;default:throw new Error(`unsupported scheduled transaction:${Y.getDataCase().toString()}`)}}_getTransactionDataCase(){throw new Error("not implemented")}_checkPubKey(z){if(this._inner.hasSigmap()){for(const Y of this._inner.getSigmap().getSigpairList())if(z._bytesEqual(Y.getPubkeyprefix_asU8()))throw new Error(`transaction ${this._txnId} already signed with public key ${z.toString()}`)}}_addSignature({signature:z,publicKey:Y}){const M=Y.toBytes(),L=this._inner.getSigmap()||new p.SignatureMap;L.getSigpairList().forEach(A=>{const $=R.decode(A.getPubkeyprefix_asB64());if(M.toString()===$.toString())throw new Error(`transaction already signed with key ${Y.toString()}`)});const I=new p.SignaturePair;return I.setPubkeyprefix(Y.toBytes()),I.setEd25519(z),L.addSigpair(I),this._inner.setSigmap(L),this}sign(z){return this._checkPubKey(z.publicKey),this._addSignature({signature:i.sign.detached(this._inner.getBodybytes_asU8(),z._keyData),publicKey:z.publicKey})}signWith(z,Y){return t(this,void 0,void 0,function*(){this._checkPubKey(z);const M=Y(this._inner.getBodybytes_asU8()),L=M instanceof Promise?yield M:M;return this._addSignature({signature:L,publicKey:z}),this})}hash(){var z,Y;if(!h.TransactionBody.deserializeBinary(this._inner.getBodybytes_asU8()).hasNodeaccountid())throw new Error("transaction must have node id set");if(((Y=(z=this._inner.getSigmap())===null||z===void 0?void 0:z.getSigpairList().length)!==null&&Y!==void 0?Y:0)===0)throw new Error("transaction must be signed");return W.hash(this.toBytes())}[n.transactionCall](z){return t(this,void 0,void 0,function*(){if(z._getOperatorKey()&&z._getOperatorSigner())try{yield this.signWith(z._getOperatorKey(),z._getOperatorSigner())}catch{}const Y=z._getNode(this._node),M=Date.now()+this._validDurationSeconds*1e3;for(let L=0;;L+=1){if(L>0){const $=Math.floor(N*Math.random()*(Math.pow(2,L)-1));if(Date.now()+$>M)throw new Error(`timed out waiting to send transaction ID: ${this._txnId.toString()}`);yield l.setTimeoutAwaitable($)}const I=yield z._unaryCall(Y.url,this._inner,this._method);if(!k.Status._fromCode(I.getNodetransactionprecheckcode())._isBusy())return I}})}execute(z){return t(this,void 0,void 0,function*(){const Y=yield this[n.transactionCall](z),M=k.Status._fromCode(Y.getNodetransactionprecheckcode());return O.HederaPrecheckStatusError._throwIfError(M.code,this.id),this.id})}getReceipt(z){return console.warn("`Transaction.getReceipt()` is deprecrated. Use `(await Transaction.execute()).getReceipt()` instead."),this.id.getReceipt(z)}getRecord(z){return console.warn("`Transaction.getRecord()` is deprecrated. Use `(await Transaction.execute()).getRecord()` instead."),this.id.getRecord(z)}_toProto(){return s.Message.cloneMessage(this._inner)}toBytes(){return this._inner.serializeBinary()}toString(){const z=this._toProto().toObject();return JSON.stringify(z,null,4)}}n.Transaction=j;function _(K){switch(K.getDataCase()){case h.TransactionBody.DataCase.CONTRACTCALL:return y.SmartContractService.contractCallMethod;case h.TransactionBody.DataCase.CONTRACTCREATEINSTANCE:return y.SmartContractService.createContract;case h.TransactionBody.DataCase.CONTRACTUPDATEINSTANCE:return y.SmartContractService.updateContract;case h.TransactionBody.DataCase.CONTRACTDELETEINSTANCE:return y.SmartContractService.deleteContract;case h.TransactionBody.DataCase.CRYPTOADDLIVEHASH:return r.CryptoService.addLiveHash;case h.TransactionBody.DataCase.CRYPTOCREATEACCOUNT:return r.CryptoService.createAccount;case h.TransactionBody.DataCase.CRYPTODELETE:return r.CryptoService.cryptoDelete;case h.TransactionBody.DataCase.CRYPTODELETELIVEHASH:return r.CryptoService.deleteLiveHash;case h.TransactionBody.DataCase.CRYPTOTRANSFER:return r.CryptoService.cryptoTransfer;case h.TransactionBody.DataCase.CRYPTOUPDATEACCOUNT:return r.CryptoService.updateAccount;case h.TransactionBody.DataCase.FILEAPPEND:return T.FileService.appendContent;case h.TransactionBody.DataCase.FILECREATE:return T.FileService.createFile;case h.TransactionBody.DataCase.FILEDELETE:return T.FileService.deleteFile;case h.TransactionBody.DataCase.FILEUPDATE:return T.FileService.updateFile;case h.TransactionBody.DataCase.SYSTEMDELETE:return y.SmartContractService.systemDelete;case h.TransactionBody.DataCase.SYSTEMUNDELETE:return y.SmartContractService.systemUndelete;case h.TransactionBody.DataCase.FREEZE:return m.FreezeService.freeze;case h.TransactionBody.DataCase.CONSENSUSCREATETOPIC:return C.ConsensusService.createTopic;case h.TransactionBody.DataCase.CONSENSUSUPDATETOPIC:return C.ConsensusService.updateTopic;case h.TransactionBody.DataCase.CONSENSUSDELETETOPIC:return C.ConsensusService.deleteTopic;case h.TransactionBody.DataCase.CONSENSUSSUBMITMESSAGE:return C.ConsensusService.submitMessage;case h.TransactionBody.DataCase.SCHEDULECREATE:return g.ScheduleService.createSchedule;case h.TransactionBody.DataCase.SCHEDULEDELETE:return g.ScheduleService.deleteSchedule;case h.TransactionBody.DataCase.SCHEDULESIGN:return g.ScheduleService.signSchedule;case h.TransactionBody.DataCase.DATA_NOT_SET:throw new Error("transaction body missing");default:throw new Error(`unsupported body case:${K.getDataCase().toString()}`)}}},66498:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(S,E,k,R){function W(O){return O instanceof k?O:new k(function(N){N(O)})}return new(k||(k=Promise))(function(O,N){function j(z){try{K(R.next(z))}catch(Y){N(Y)}}function _(z){try{K(R.throw(z))}catch(Y){N(Y)}}function K(z){z.done?O(z.value):W(z.value).then(j,_)}K((R=R.apply(S,E||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.SingleTransactionBuilder=n.TransactionBuilder=void 0;const i=u(66774),B=u(24231),h=u(34518),p=u(30107),l=u(79643),s=u(90335),r=u(49132),g=u(24067),y=u(34977),T=u(44431),m=120;class F{constructor(){this._shouldSetFee=!0,this._inner=new i.TransactionBody,this._inner.setTransactionvalidduration(B.newDuration(120))}setTransactionId(E){return this._inner.setTransactionid((E instanceof r.TransactionId?E:new r.TransactionId(E))._toProto()),this}setTransactionValidDuration(E){return this._inner.setTransactionvalidduration(B.newDuration(Math.min(E,m))),this}setMaxTransactionFee(E){const k=l.hbarFromTinybarOrHbar(E);return k[l.hbarCheck]({allowNegative:!1}),this._inner.setTransactionfee(k[l.hbarToProto]()),this}setNodeAccountId(E){return this._node=new s.AccountId(E),this._inner.setNodeaccountid(this._node._toProto()),this}setTransactionMemo(E){return this._inner.setMemo(E),this}setGenerateRecord(E){return this._inner.setGeneraterecord(E),this}validate(){B.runValidation(this,E=>{this._inner.hasTransactionid()||E.push("missing ID for transaction"),this._inner.getMemo().length*2>100&&E.push("memo may not be longer than 100 bytes"),this._doValidate(E)})}}n.TransactionBuilder=F;class C extends F{getCost(E){return t(this,void 0,void 0,function*(){const k=this._inner.getTransactionfee();try{this._inner.setTransactionfee("0"),this._shouldSetFee=!1;const R=this.build(E),W=yield R[h.transactionCall](E),O=g.Status._fromCode(W.getNodetransactionprecheckcode());if(O===g.Status.InsufficientTxFee){let N=new T.default(W.getCost());return N=N.multipliedBy(1.01).decimalPlaces(0),l.Hbar.fromTinybar(N)}y.HederaPrecheckStatusError._throwIfError(O.code,R.id)}finally{this._shouldSetFee=!0,this._inner.setTransactionfee(k),this._inner.clearTransactionid(),this._inner.clearTransactionvalidduration()}return new l.Hbar(0)})}build(E){if(E&&this._shouldSetFee&&this._inner.getTransactionfee()==="0"&&this._inner.setTransactionfee(E._maxTransactionFee[l.hbarToProto]()),E&&!this._inner.hasTransactionid()&&E._getOperatorAccountId()){const R=new r.TransactionId(E._getOperatorAccountId());this._inner.setTransactionid(R._toProto())}if(this._inner.hasTransactionvalidduration()||this.setTransactionValidDuration(m),!this._node&&!E)throw new Error("`setNodeAccountId` must be called if client is not supplied");this._node||(this._node=E._randomNode().id),this._node&&!this._inner.hasNodeaccountid()&&this.setNodeAccountId(this._node),this.validate();const k=new p.Transaction;return k.setBodybytes(this._inner.serializeBinary()),h.Transaction[h.transactionCreate](this._node,k,this._inner,this._method)}execute(E){return this.build(E).execute(E)}get _method(){throw new Error("Method not implemented.")}_doValidate(E){throw new Error("Method not implemented.")}}n.SingleTransactionBuilder=C},49132:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionId=void 0;const t=u(90335),i=u(33276),B=u(24231),h=u(25867),p=u(13660),l=u(22173),s=u(44431);class r{constructor(C){if(!C.validStart&&!C.validStartSeconds){this.accountId=new t.AccountId(C);const{seconds:S,nanos:E}=y();this.validStart=new l.Time(S,E)}else{const S=C;if(S instanceof r)this.accountId=S.accountId,this.validStart=new l.Time(S.validStart.seconds,S.validStart.nanos);else if(this.accountId=new t.AccountId(S.account),"validStart"in S){const{seconds:E,nanos:k}=p.dateToTimestamp(S.validStart);this.validStart=new l.Time(E,k)}else this.validStart=new l.Time(S.validStartSeconds,S.validStartNanos)}}static withValidStart(C,S){return new r({account:C,validStartSeconds:S.seconds,validStartNanos:S.nanos})}static fromString(C){const[S,E]=C.split("@"),[k,R]=E.split(".");return new r({account:new t.AccountId(S),validStartSeconds:Number(k),validStartNanos:Number(R)})}toString(){return`${this.accountId.toString()}@${this.validStart.seconds}.${this.validStart.nanos}`}getReceipt(C){return new Promise((S,E)=>{E(new Error("(BUG) `TransactionId.getReceipt()` declared, but not overwritten."))})}getRecord(C){return new Promise((S,E)=>{E(new Error("(BUG) `TransactionId.getRecord()` declared, but not overwritten."))})}static _fromProto(C){const S=B.orThrow(C.getTransactionvalidstart()).getSeconds(),E=B.orThrow(C.getTransactionvalidstart()).getNanos();return new r({account:t.AccountId._fromProto(B.orThrow(C.getAccountid())),validStartSeconds:new s.default(S).toNumber(),validStartNanos:E})}_toProto(){const C=new i.TransactionID;C.setAccountid(this.accountId._toProto());const S=new h.Timestamp;return S.setSeconds(this.validStart.seconds.toString()),S.setNanos(this.validStart.nanos),C.setTransactionvalidstart(S),C}}n.TransactionId=r;let g;function y(){const F=p.dateToTimestamp(Date.now()-1e4);return g=g!=null&&m(F,g)?T(g,1):F,g}function T(F,C){return{seconds:F.seconds,nanos:F.nanos+C}}function m(F,C){return F.seconds<C.seconds?!0:F.seconds===C.seconds&&F.nanos<=C.nanos}},96761:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionReceipt=void 0;const t=u(90335),i=u(2505),B=u(30672),h=u(41331),p=u(16206),l=u(90184),s=u(67427),r=u(24067),g=u(49132),y=u(44431);class T{constructor(F,C,S,E,k,R,W,O,N,j,_,K){this.status=F,this._accountId=C,this._fileId=S,this._contractId=E,this._topicId=k,this._tokenId=R,this._scheduleId=W,this._exchangeRateSet=O,this._topicSequenceNumber=N,this._topicRunningHash=j,this._scheduledTransactionId=_,this._serials=K}get accountId(){return console.warn("`TransactionReceipt.accountId` is deprecrated. Use `TransactionReceipt.getAccountId()` instead."),this.getAccountId()}getAccountId(){if(this._accountId==null)throw new Error("receipt does not contain an account ID");return this._accountId}get fileId(){return console.warn("`TransactionReceipt.fileId` is deprecrated. Use `TransactionReceipt.getfileId()` instead."),this.getFileId()}getFileId(){if(this._fileId==null)throw new Error("receipt does not contain a file ID");return this._fileId}get contractId(){return console.warn("`TransactionReceipt.contractId` is deprecrated. Use `TransactionReceipt.getcontractId()` instead."),this.getContractId()}getContractId(){if(this._contractId==null)throw new Error("receipt does not contain a contract ID");return this._contractId}getConsensusTopicId(){if(this._topicId==null)throw new Error("receipt does not contain a topic ID");return this._topicId}getTopicId(){return console.warn("`TransactionReceipt.getTopicId()` is deprecrated. Use `TransactionReceipt.getConsensusTopicId()` instead."),this.getConsensusTopicId()}getTokenId(){if(this._tokenId==null)throw new Error("receipt does not contain a token ID");return this._tokenId}getScheduleId(){if(this._scheduleId==null)throw new Error("receipt does not contain a schedule ID");return this._scheduleId}getConsensusTopicRunningHash(){if(this._topicRunningHash.byteLength===0)throw new Error("receipt was not for a consensus topic transaction");return this._topicRunningHash}getConsensusTopicSequenceNumber(){if(this._topicSequenceNumber===0)throw new Error("receipt was not for a consensus topic transaction");return this._topicSequenceNumber}getScheduledTransactionId(){return this._scheduledTransactionId}getSerials(){return this._serials}toJSON(){var F,C,S,E;return{status:this.status.toString(),accountId:(F=this._accountId)===null||F===void 0?void 0:F.toString(),fileId:(C=this._fileId)===null||C===void 0?void 0:C.toString(),contractId:(S=this._contractId)===null||S===void 0?void 0:S.toString(),consensusTopicId:(E=this._topicId)===null||E===void 0?void 0:E.toString(),consensusTopicRunningHash:this._topicRunningHash.byteLength===0?void 0:this._topicRunningHash.toString(),consensusTopicSequenceNumber:this._topicSequenceNumber===0?void 0:this._topicSequenceNumber,scheduledTransactionId:this._scheduledTransactionId!=null?this._scheduledTransactionId:void 0,serials:this._serials!=null&&this._serials.length!==0?this._serials.map(k=>k.toString()):void 0}}toString(){return JSON.stringify(this.toJSON(),null,2)}static _fromProto(F){return new T(r.Status._fromCode(F.getStatus()),F.hasAccountid()?t.AccountId._fromProto(F.getAccountid()):null,F.hasFileid()?h.FileId._fromProto(F.getFileid()):null,F.hasContractid()?B.ContractId._fromProto(F.getContractid()):null,F.hasTopicid()?i.ConsensusTopicId._fromProto(F.getTopicid()):null,F.hasTokenid()?p.TokenId._fromProto(F.getTokenid()):null,F.hasScheduleid()?l.ScheduleId._fromProto(F.getScheduleid()):null,F.hasExchangerate()?s.exchangeRateSetToSdk(F.getExchangerate()):null,new y.default(F.getTopicsequencenumber()).toNumber(),F.getTopicrunninghash_asU8(),F.hasScheduledtransactionid()?g.TransactionId._fromProto(F.getScheduledtransactionid()):null,F.getSerialnumbersList().map(C=>new y.default(C)))}}n.TransactionReceipt=T},52189:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(T,m,F,C){function S(E){return E instanceof F?E:new F(function(k){k(E)})}return new(F||(F=Promise))(function(E,k){function R(N){try{O(C.next(N))}catch(j){k(j)}}function W(N){try{O(C.throw(N))}catch(j){k(j)}}function O(N){N.done?E(N.value):S(N.value).then(R,W)}O((C=C.apply(T,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionReceiptQuery=void 0;const i=u(2820),B=u(39512),h=u(96666),p=u(49132),l=u(96761),s=u(78436),r=u(24067),g=u(68061);class y extends i.QueryBuilder{constructor(){super(),this._builder=new B.TransactionGetReceiptQuery,this._builder.setHeader(new h.QueryHeader),this._inner.setTransactiongetreceipt(this._builder)}setTransactionId(m){return this._builder.setTransactionid(new p.TransactionId(m)._toProto()),this}_doLocalValidate(m){this._builder.hasTransactionid()||m.push("`.setTransactionId()` required")}_getMethod(){return s.CryptoService.getTransactionReceipts}_shouldRetry(m,F){var C;if(super._shouldRetry(m,F)||[r.Status.Busy.code,r.Status.Unknown.code,r.Status.ReceiptNotFound.code].includes(m.code))return!0;const S=(C=F.getTransactiongetreceipt())===null||C===void 0?void 0:C.getReceipt(),E=S==null?null:r.Status._fromCode(S.getStatus());return!!(E!=null&&[r.Status.Ok.code,r.Status.Busy.code,r.Status.Unknown.code,r.Status.ReceiptNotFound.code].includes(E.code))}_getDefaultExecuteTimeout(){return 12e4}_isPaymentRequired(){return!1}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(m){return m.getTransactiongetreceipt().getHeader()}_mapResponse(m){const F=m.getTransactiongetreceipt();return l.TransactionReceipt._fromProto(F.getReceipt())}}n.TransactionReceiptQuery=y,p.TransactionId.prototype.getReceipt=function(T){return t(this,void 0,void 0,function*(){const m=yield new y().setTransactionId(this).execute(T);return g.HederaReceiptStatusError._throwIfError(m.status.code,m,this),m})}},52317:function(o,n,u){"use strict";var t,i;Object.defineProperty(n,"__esModule",{value:!0}),n.transferListToSdk=n.TransactionRecord=n.TokenNftTransferMap=n.TokenNftTransfer=n.TokenTransfersMap=n.AccountTokenTransfersMap=void 0;const B=u(96761),h=u(70180),p=u(49132),l=u(22173),s=u(79643),r=u(16206),g=u(90335),y=u(12987),T=u(44431),m=u(90184),F=u(58341),C=Symbol("callResult"),S=Symbol("callResultIsCreate");class E{constructor(_){this._transfers=new Map;for(const K of _){const z=g.AccountId._fromProto(K.getAccountid()).toString();let Y=this._transfers.get(z);Y==null&&(Y=[],this._transfers.set(z,Y)),Y.push(new T.default(K.getAmount()))}}get(_){const K=new g.AccountId(_).toString();return this._transfers.get(K)}values(){return this._transfers.values()}keys(){const _=[];for(const K of this._transfers.keys())_.push(g.AccountId.fromString(K));return _[Symbol.iterator]()}[Symbol.iterator](){const _=new Map;for(const[K,z]of this._transfers)_.set(g.AccountId.fromString(K),z);return _[Symbol.iterator]()}}n.AccountTokenTransfersMap=E;class k{constructor(_){this._transfers=new Map;for(const K of _){const z=r.TokenId._fromProto(K.getToken());this._transfers.set(z.toString(),new E(K.getTransfersList()))}}get(_){const K=new r.TokenId(_).toString();return this._transfers.get(K)}values(){return this._transfers.values()}keys(){const _=[];for(const K of this._transfers.keys())_.push(r.TokenId.fromString(K));return _[Symbol.iterator]()}[Symbol.iterator](){const _=new Map;for(const[K,z]of this._transfers)_.set(r.TokenId.fromString(K),z);return _[Symbol.iterator]()}}n.TokenTransfersMap=k;class R{constructor(_){this.sender=_.hasSenderaccountid()?g.AccountId._fromProto(_.getSenderaccountid()):null,this.recipient=_.hasReceiveraccountid()?g.AccountId._fromProto(_.getReceiveraccountid()):null,this.serial=new T.default(_.getSerialnumber())}}n.TokenNftTransfer=R;class W{constructor(_){this._transfers=new Map;for(const K of _){const z=r.TokenId._fromProto(K.getToken()),Y=[];for(const M of K.getNfttransfersList())Y.push(new R(M));this._transfers.set(z.toString(),Y)}}get(_){const K=new r.TokenId(_).toString();return this._transfers.get(K)}values(){return this._transfers.values()}keys(){const _=[];for(const K of this._transfers.keys())_.push(r.TokenId.fromString(K));return _[Symbol.iterator]()}[Symbol.iterator](){const _=new Map;for(const[K,z]of this._transfers)_.set(r.TokenId.fromString(K),z);return _[Symbol.iterator]()}}n.TokenNftTransferMap=W;class O{constructor(_){this[t]=null,this[i]=!1,this.receipt=B.TransactionReceipt._fromProto(_.getReceipt()),this.transactionHash=_.getTransactionhash_asU8(),this.consensusTimestamp=l.Time._fromProto(_.getConsensustimestamp()),this.transactionId=p.TransactionId._fromProto(_.getTransactionid()),this.transactionMemo=_.getMemo(),this.transactionFee=s.Hbar.fromTinybar(_.getTransactionfee()),this.transfers=N(_.getTransferlist()),_.hasContractcallresult()?(this[C]=new h.ContractFunctionResult(_.getContractcallresult()),this[S]=!0):_.hasContractcreateresult()&&(this[C]=new h.ContractFunctionResult(_.getContractcreateresult())),this.tokenTransfers=new k(_.getTokentransferlistsList()),this.scheduleRef=_.hasScheduleref()?m.ScheduleId._fromProto(_.getScheduleref()):null,this.assessedCustomFees=_.getAssessedCustomFeesList().map(K=>new F.AssessedCustomFee(K)),this.nftTransfers=new W(_.getTokentransferlistsList())}static _fromProto(_){return new O(_)}getContractCreateResult(){if(this[C]==null||this[S])throw new Error("record does not contain a contract create result");return this[C]}getContractExecuteResult(){if(this[C]==null||!this[S])throw new Error("record does not contain a contract execute result");return this[C]}}n.TransactionRecord=O,t=C,i=S;function N(j){return j.getAccountamountsList().map(y.transferFromProto)}n.transferListToSdk=N},82803:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(m,F,C,S){function E(k){return k instanceof C?k:new C(function(R){R(k)})}return new(C||(C=Promise))(function(k,R){function W(j){try{N(S.next(j))}catch(_){R(_)}}function O(j){try{N(S.throw(j))}catch(_){R(_)}}function N(j){j.done?k(j.value):E(j.value).then(W,O)}N((S=S.apply(m,F||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionRecordQuery=void 0;const i=u(2820),B=u(22075),h=u(96666),p=u(49132),l=u(78436),s=u(52317),r=u(22628),g=u(68061),y=u(54105);class T extends i.QueryBuilder{constructor(){super(),this._builder=new B.TransactionGetRecordQuery,this._builder.setHeader(new h.QueryHeader),this._inner.setTransactiongetrecord(this._builder)}setTransactionId(F){return this._builder.setTransactionid(new p.TransactionId(F)._toProto()),this}_doLocalValidate(F){this._builder.hasTransactionid()||F.push("`.setTransactionId()` required")}_getHeader(){return this._builder.getHeader()}_getMethod(){return l.CryptoService.getTxRecordByTxID}_mapResponseHeader(F){const C=F.getTransactiongetrecord().getHeader();return C==null?new r.ResponseHeader:C}_mapResponse(F){const C=F.getTransactiongetrecord();return s.TransactionRecord._fromProto(C.getTransactionrecord())}}n.TransactionRecordQuery=T,p.TransactionId.prototype.getRecord=function(m){return t(this,void 0,void 0,function*(){try{yield this.getReceipt(m)}catch(C){if(!(C instanceof g.HederaReceiptStatusError))throw C}const F=yield new T().setTransactionId(this).execute(m);return y.HederaRecordStatusError._throwIfError(F.receipt.status.code,F,this),F})}},12987:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transferFromProto=void 0;const t=u(90335),i=u(79643);function B(h){return{accountId:t.AccountId._fromProto(h.getAccountid()),amount:i.Hbar.fromTinybar(h.getAmount())}}n.transferFromProto=B},13221:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountBalanceQuery=void 0;const t=u(2820),i=u(78436),B=u(96666),h=u(79643),p=u(90335),l=u(34697);class s extends t.QueryBuilder{constructor(){super(),this._builder=new l.CryptoGetAccountBalanceQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setCryptogetaccountbalance(this._builder)}setAccountId(g){return this._builder.setAccountid(new p.AccountId(g)._toProto()),this}_doLocalValidate(g){this._builder.hasAccountid()||g.push("`.setAccountId()` required")}_getMethod(){return i.CryptoService.cryptoGetBalance}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(g){return g.getCryptogetaccountbalance().getHeader()}_mapResponse(g){const y=g.getCryptogetaccountbalance();return h.Hbar.fromTinybar(y.getBalance())}_isPaymentRequired(){return!1}}n.AccountBalanceQuery=s},8888:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountCreateTransaction=void 0;const t=u(66498),i=u(273),B=u(24231),h=u(78436),p=u(79643),l=u(44431),s=u(90335);class r extends t.SingleTransactionBuilder{constructor(){super();const y=new i.CryptoCreateTransactionBody;this._body=y,this._inner.setCryptocreateaccount(y),this.setAutoRenewPeriod(789e4),this.setReceiveRecordThreshold(p.Hbar.MAX),this.setSendRecordThreshold(p.Hbar.MAX)}setKey(y){return this._body.setKey(y._toProtoKey()),this}setAutoRenewPeriod(y){return this._body.setAutorenewperiod(B.newDuration(y)),this}setInitialBalance(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setInitialbalance(T[p.hbarToProto]()),this}setReceiveRecordThreshold(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setReceiverecordthreshold(T[p.hbarToProto]()),this}setSendRecordThreshold(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setSendrecordthreshold(T[p.hbarToProto]()),this}setReceiverSignatureRequired(y){return this._body.setReceiversigrequired(y),this}setProxyAccountId(y){return this._body.setProxyaccountid(new s.AccountId(y)._toProto()),this}get _method(){return h.CryptoService.createAccount}_doValidate(y){this._body.hasKey()||y.push("AccountCreateTransaction requires .setKey()"),new l.default(this._body.getInitialbalance()).isNegative()&&y.push("AccountCreateTransaction must have a positive setInitialBalance")}}n.AccountCreateTransaction=r},28535:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountDeleteTransaction=void 0;const t=u(66498),i=u(78436),B=u(8579),h=u(90335);class p extends t.SingleTransactionBuilder{constructor(){super();const s=new B.CryptoDeleteTransactionBody;this._body=s,this._inner.setCryptodelete(s)}setDeleteAccountId(s){return this._body.setDeleteaccountid(new h.AccountId(s)._toProto()),this}setTransferAccountId(s){return this._body.setTransferaccountid(new h.AccountId(s)._toProto()),this}get _method(){return i.CryptoService.cryptoDelete}_doValidate(s){this._body.hasDeleteaccountid()||s.push("AccountDeleteTransaction requires .setAccountid()")}}n.AccountDeleteTransaction=p},90335:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountId=void 0;const t=u(33276),i=u(24231),B=u(44431),h=u(52978);class p{constructor(s,r,g){if(typeof s=="number"&&r!=null&&g!=null)this.shard=s,this.realm=r,this.account=g;else{const y=s,T=y instanceof p?y:i.normalizeEntityId("account",y);this.shard=T.shard,this.realm=T.realm,this.account=T.account}}static fromString(s){return new p(s)}static _fromProto(s){return new p({shard:new B.default(s.getShardnum()).toNumber(),realm:new B.default(s.getRealmnum()).toNumber(),account:new B.default(s.getAccountnum()).toNumber()})}toString(){return`${this.shard}.${this.realm}.${this.account}`}static fromSolidityAddress(s){if(s.length!==40)throw new Error(`Invalid hex encoded solidity address length:
|
|
1
|
+
(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[7481],{39915:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(r,g,y,T){function m(F){return F instanceof y?F:new y(function(C){C(F)})}return new(y||(y=Promise))(function(F,C){function S(R){try{k(T.next(R))}catch(W){C(W)}}function E(R){try{k(T.throw(R))}catch(W){C(W)}}function k(R){R.done?F(R.value):m(R.value).then(S,E)}k((T=T.apply(r,g||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BaseClient=void 0;const i=u(50780),B=u(79643),h=u(94974),p=u(90335),l=u(13221);class s{constructor(g,y){this._nodes=[],this._maxTransactionFee=new B.Hbar(1),this._maxQueryPayment=new B.Hbar(1),console.warn("Deprecated: `@hashgraph/sdk@v1` has been deprecated. Please update to version 2 of the SDK. Help with migration can be found here: https://github.com/hashgraph/hedera-sdk-js/blob/master/MIGRATING_V1.md"),this.replaceNodes(g),y&&(y.privateKey!=null?this.setOperator(y.accountId,y.privateKey):this.setOperatorWith(y.accountId,y.publicKey,y.signer))}putNode(g,y){return console.warn("`BaseClient.putNode()` is deprecrated. Use `BaseClient.replaceNodes()` instead."),this._nodes.push({id:new p.AccountId(g),url:y}),this}setOperator(g,y){const T=typeof y=="string"?h.Ed25519PrivateKey.fromString(y):y;return this._operatorAccount=new p.AccountId(g),this._operatorPublicKey=T.publicKey,this._operatorSigner=m=>i.sign.detached(m,T._keyData),this}setOperatorWith(g,y,T){return this._operatorAccount=new p.AccountId(g),this._operatorPublicKey=y,this._operatorSigner=T,this}replaceNodes(g){return this._nodes=Array.isArray(g)?g:Object.entries(g).map(([y,T])=>{const m=new p.AccountId(T);return{url:y,id:m}}),this}_getOperatorAccountId(){return this._operatorAccount}_getOperatorSigner(){return this._operatorSigner}_getOperatorKey(){return this._operatorPublicKey}get maxTransactionFee(){return console.warn("deprecated: Client#maxTransactionFee is deprecated for removal with no replacement; please see #184"),this._maxTransactionFee}get maxQueryPayment(){return console.warn("deprecated: Client#maxQueryPayment is deprecated for removal with no replacement; please see #184"),this._maxQueryPayment}setMaxTransactionFee(g){return this._maxTransactionFee=g,this}setMaxQueryPayment(g){return this._maxQueryPayment=g instanceof B.Hbar?g:B.Hbar.fromTinybar(g),this}getAccountBalance(g){return console.warn("`Client.getAccountBalance()` is deprecated with no replacement. Use the `AccountBalanceQuery` directly instead"),new l.AccountBalanceQuery().setAccountId(g).execute(this)}ping(g){return t(this,void 0,void 0,function*(){yield new l.AccountBalanceQuery().setAccountId(g).execute(this)})}_randomNode(){return this._nodes[Math.floor(Math.random()*this._nodes.length)]}_getNode(g){const y=this._nodes.find(T=>T.url===g||typeof g=="object"&&T.id.account===g.account&&T.id.realm===g.realm&&T.id.shard===g.shard);if(y)return y;throw new Error(`could not find node: ${JSON.stringify(g)}`)}}n.BaseClient=s},67427:function(o,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.exchangeRateSetToSdk=n.exchangeRateToSdk=void 0;function u(i){return{hbarEquiv:i.getHbarequiv(),centEquiv:i.getCentequiv(),expirationTime:new Date(i.getExpirationtime().getSeconds())}}n.exchangeRateToSdk=u;function t(i){return{currentRate:u(i.getCurrentrate()),nextRate:u(i.getCurrentrate())}}n.exchangeRateSetToSdk=t},64218:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FreezeTransaction=void 0;const t=u(66498),i=u(40897),B=u(27044),h=u(13660);class p extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.FreezeTransactionBody,this._inner.setFreeze(this._body)}setStartTime(s,r){let g=0,y=0;if(typeof s=="number"&&r!=null)g=s,y=r;else if(s instanceof Date)console.warn("passing `Date` is deprecated; pass the `hour` and `minute` as separate parameters"),g=s.getHours(),y=s.getMinutes();else{const T=h.timestampToProto(s);this._body.setStartTime(T);const m=h.timestampToDate(T);g=m.getHours(),y=m.getMinutes()}return this._body.setStarthour(g),this._body.setStartmin(y),this}setEndTime(s,r){let g,y;return typeof s=="number"&&r!=null?(g=s,y=r):(console.warn("passing `Date` is deprecated; pass the `hour` and `minute` as separate parameters"),g=s.getHours(),y=s.getMinutes()),this._body.setEndhour(g),this._body.setEndmin(y),this}_doValidate(){}get _method(){return B.FreezeService.freeze}}n.FreezeTransaction=p},15281:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GetBySolidityIdQuery=void 0;const t=u(2820),i=u(96666),B=u(41331),h=u(30672),p=u(90335),l=u(36277),s=u(98614);class r extends t.QueryBuilder{constructor(){super(),this._builder=new l.GetBySolidityIDQuery,this._builder.setHeader(new i.QueryHeader),this._inner.setGetbysolidityid(this._builder)}setSolidityId(y){return this._builder.setSolidityid(y),this}_doLocalValidate(){}_getHeader(){return this._builder.getHeader()}_getMethod(){return s.SmartContractService.getBySolidityID}_mapResponseHeader(y){return y.getGetbysolidityid().getHeader()}_mapResponse(y){const T=y.getGetbysolidityid();if(T.hasAccountid())return{type:"ACCOUNT",accountId:p.AccountId._fromProto(T.getAccountid())};if(T.hasContractid())return{type:"CONTRACT",contractId:h.ContractId._fromProto(T.getContractid())};if(T.hasFileid())return{type:"FILE",fileId:B.FileId._fromProto(T.getFileid())};throw new Error("unreachable")}}n.GetBySolidityIdQuery=r},79643:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hbarFromTinybarOrHbar=n.Hbar=n.hbarCheck=n.hbarToProtoValue=n.hbarToProto=void 0;const t=u(44431),i=u(43447),B=u(45858),h=u(99469),p=Symbol("hbarTinybar");n.hbarToProto=Symbol("hbarToProto"),n.hbarToProtoValue=Symbol("hbarToProtoValue"),n.hbarCheck=Symbol("hbarCheck");function l(F,C){return(t.default.isBigNumber(F)?F:new t.default(F)).multipliedBy(C._toTinybarCount())}const s=new t.default(2).pow(63).minus(1),r=s.dividedBy(B.HbarUnit.Hbar._toTinybarCount()),y=new t.default(-2).pow(63).dividedBy(B.HbarUnit.Hbar._toTinybarCount());class T{constructor(C){const S=C instanceof t.default?C:new t.default(C);if(S.isZero()?this[p]=S:(this[p]=S.multipliedBy(B.HbarUnit.Hbar._toTinybarCount()),this[n.hbarCheck]({allowNegative:!0})),typeof C=="number"&&C>=Math.pow(2,53))throw new i.HbarRangeError(this)}static from(C,S){const E=new t.default(C),k=new T(0);return k[p]=E.multipliedBy(S._toTinybarCount()),k}static fromTinybar(C){const S=new t.default(C),E=new T(0);if(E[p]=S,typeof C=="number"&&C>=Math.pow(2,53))throw new i.HbarRangeError(E);return E}static of(C){return console.warn("`Hbar.of` is deprecated. Use `new Hbar(amount)` instead."),new T(C)}static zero(){return console.warn("`Hbar.zero()` is deprecated. If you want to use `Hbar.zero()` for \ncomparisions then use `Hbar.ZERO` static field, otherwise use `new Hbar(0)`"),new T(new t.default(0))}toString(){return this.value().toString()}value(){return this.as(B.HbarUnit.Hbar)}asTinybar(){return this.as(B.HbarUnit.Tinybar)}as(C){return C.toString()===B.HbarUnit.Tinybar.toString()?this[p]:this[p].dividedBy(C._toTinybarCount())}multipliedBy(C){return new T(this[p].multipliedBy(C).dividedBy(B.HbarUnit.Hbar._toTinybarCount()))}plus(C,S){return new T((C instanceof T?this[p].plus(C[p]):this[p].plus(l(C,S))).dividedBy(B.HbarUnit.Hbar._toTinybarCount()))}minus(C,S){return new T((C instanceof T?this[p].minus(C[p]):this[p].minus(l(C,S))).dividedBy(B.HbarUnit.Hbar._toTinybarCount()))}isEqualTo(C,S){return C instanceof T?this[p].isEqualTo(C[p]):this[p].isEqualTo(l(C,S))}isGreaterThan(C,S){return C instanceof T?this[p].isGreaterThan(C[p]):this[p].isGreaterThan(l(C,S))}isGreaterThanOrEqualTo(C,S){return C instanceof T?this[p].isGreaterThanOrEqualTo(C[p]):this[p].isGreaterThanOrEqualTo(l(C,S))}isLessThan(C,S){return C instanceof T?this[p].isLessThan(C[p]):this[p].isLessThan(l(C,S))}isLessThanOrEqualTo(C,S){return C instanceof T?this[p].isLessThanOrEqualTo(C[p]):this[p].isLessThanOrEqualTo(l(C,S))}comparedTo(C,S){return C instanceof T?this[p].comparedTo(C[p]):this[p].comparedTo(l(C,S))}isZero(){return this[p].isZero()}negated(){return T.fromTinybar(this[p].negated())}isNegative(){return this[p].isNegative()}isPositive(){return this[p].isPositive()}[n.hbarCheck]({allowNegative:C}){const S=this[p];if(S.isNegative()&&!C&&S.isLessThan(s))throw new i.HbarRangeError(this);if(S.isGreaterThan(s))throw new i.HbarRangeError(this)}[n.hbarToProto](){return String(this[p])}[n.hbarToProtoValue](){const C=new h.UInt64Value;return C.setValue(this[p].toNumber()),C}}n.Hbar=T,T.MAX=new T(r),T.MIN=new T(y),T.ZERO=new T(0);function m(F){return F instanceof T?F:T.fromTinybar(new t.default(F))}n.hbarFromTinybarOrHbar=m},45858:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HbarUnit=void 0;const t=u(44431);class i{constructor(h){this._unit=h}getSymbol(){switch(this._unit){case"tinybar":return"t\u210F";case"microbar":return"\u03BC\u210F";case"millibar":return"m\u210F";case"hbar":return"\u210F";case"kilobar":return"k\u210F";case"megabar":return"M\u210F";case"gigabar":return"G\u210F";default:throw new TypeError("HbarUnit was not a valid value")}}_toTinybarCount(){switch(this._unit){case"tinybar":return new t.default(1);case"microbar":return new t.default(100);case"millibar":return new t.default(1e5);case"hbar":return new t.default(1e8);case"kilobar":return new t.default(1e8).multipliedBy(1e3);case"megabar":return new t.default(1e8).multipliedBy(1e6);case"gigabar":return new t.default(1e8).multipliedBy(1e9);default:throw new TypeError("HbarUnit was not a valid value")}}toString(){return this._unit}}n.HbarUnit=i,i.Tinybar=new i("tinybar"),i.Microbar=new i("microbar"),i.Millibar=new i("millibar"),i.Hbar=new i("hbar"),i.Kilobar=new i("kilobar"),i.Megabar=new i("megabar"),i.Gigabar=new i("gigabar")},54804:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NetworkVersionInfoQuery=void 0;const t=u(2820),i=u(58977),B=u(96666),h=u(11107);class p extends t.QueryBuilder{constructor(){super(),this._builder=new i.NetworkGetVersionInfoQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setNetworkgetversioninfo(this._builder)}_doLocalValidate(){}_getMethod(){return h.NetworkService.getVersionInfo}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(s){return s.getNetworkgetversioninfo().getHeader()}_mapResponse(s){const r=s.getNetworkgetversioninfo(),g=r.getHapiprotoversion(),y=r.getHederaservicesversion();return{hapiProtoVersion:{major:g.getMajor(),minor:g.getMinor(),patch:g.getPatch()},hederaServicesVersion:{major:y.getMajor(),minor:y.getMinor(),patch:y.getPatch()}}}}n.NetworkVersionInfoQuery=p},2820:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(C,S,E,k){function R(W){return W instanceof E?W:new E(function(O){O(W)})}return new(E||(E=Promise))(function(W,O){function N(K){try{_(k.next(K))}catch(z){O(z)}}function j(K){try{_(k.throw(K))}catch(z){O(z)}}function _(K){K.done?W(K.value):R(K.value).then(N,j)}_((k=k.apply(C,S||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.QueryBuilder=void 0;const i=u(96666),B=u(72852),h=u(52828),p=u(61692),l=u(24231),s=u(79643),r=u(66774),g=u(90335),y=u(24067),T=u(34977),m=u(12476);class F{constructor(){this._inner=new B.Query,this._maxPaymentAmount=null,this._paymentAmount=null,this._transactionId=null}setMaxQueryPayment(S){const E=s.hbarFromTinybarOrHbar(S);return E[s.hbarCheck]({allowNegative:!1}),this._maxPaymentAmount=E,this}setQueryPayment(S){const E=s.hbarFromTinybarOrHbar(S);return E[s.hbarCheck]({allowNegative:!1}),this._paymentAmount=E,this}setQueryPaymentTransaction(S){return this._transactionId=S.id,this._getHeader().setPayment(S._toProto()),this}getCost(S){return t(this,void 0,void 0,function*(){this._localValidate(!1);const E=this._getHeader(),k=E.getResponsetype(),R=E.getPayment();try{const W=S._randomNode();E.setResponsetype(i.ResponseType.COST_ANSWER);const O=new m.TransferTransaction().addHbarTransfer(W.id,0).addHbarTransfer(S._getOperatorAccountId(),0).build(S);this._transactionId=O.id,E.setPayment((yield O.signWith(S._getOperatorKey(),S._getOperatorSigner()))._toProto());const N=yield S._unaryCall(W.url,this._inner.clone(),this._getMethod()),j=this._mapResponseHeader(N);return T.HederaPrecheckStatusError._throwIfError(j.getNodetransactionprecheckcode(),this._transactionId),s.Hbar.fromTinybar(j.getCost())}finally{E.setResponsetype(k),E.setPayment(R)}})}execute(S){let E=null;return l.timeoutPromise(this._getDefaultExecuteTimeout(),(()=>t(this,void 0,void 0,function*(){let k;if(this._isPaymentRequired()){if(this._getHeader().hasPayment()){const R=this._getHeader().getPayment().getBodybytes_asU8(),W=r.TransactionBody.deserializeBinary(R),O=g.AccountId._fromProto(W.getNodeaccountid());k=S._getNode(O)}else if(this._paymentAmount!=null)k=S._randomNode(),yield this._generatePaymentTransaction(S,k,this._paymentAmount);else if(this._maxPaymentAmount!=null||S._maxQueryPayment!=null){k=S._randomNode();const R=this._maxPaymentAmount==null?S._maxQueryPayment:this._maxPaymentAmount,W=yield this.getCost(S);if(W.isGreaterThan(R))throw new p.MaxQueryPaymentExceededError(W,R);yield this._generatePaymentTransaction(S,k,W)}}else k=S._randomNode();this._localValidate();for(let R=0;;R+=1){if(R>0){const O=Math.floor(500*Math.random()*(Math.pow(2,R)-1));yield l.setTimeoutAwaitable(O)}const W=yield S._unaryCall(k.url,this._inner,this._getMethod());if(E=y.Status._fromCode(this._mapResponseHeader(W).getNodetransactionprecheckcode()),!this._shouldRetry(E,W))return T.HederaPrecheckStatusError._throwIfError(E.code,this._transactionId),this._mapResponse(W)}}))(),k=>{E==null?k(new Error("timed out")):k(new h.HederaStatusError(E))})}_toProto(){return this._inner}_shouldRetry(S,E){return S.code===y.Status.Busy.code}_getDefaultExecuteTimeout(){return 2e4}_isPaymentRequired(){return!0}_localValidate(S=!0){l.runValidation(this,E=>{S&&this._isPaymentRequired()&&!this._getHeader().hasPayment()&&E.push("one of `.setPayment()` or `.setPaymentAmount()` is required"),this._doLocalValidate(E)})}_generatePaymentTransaction(S,E,k){return t(this,void 0,void 0,function*(){const R=s.hbarFromTinybarOrHbar(k);R[s.hbarCheck]({allowNegative:!1});const W=yield new m.TransferTransaction().setNodeAccountId(E.id).addHbarTransfer(E.id,R).addHbarTransfer(S._getOperatorAccountId(),R.negated()).setMaxTransactionFee(new s.Hbar(1)).build(S).signWith(S._getOperatorKey(),S._getOperatorSigner());return this.setQueryPaymentTransaction(W),this})}}n.QueryBuilder=F},24067:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Status=void 0;const t=u(52828);class i{constructor(h){this.code=h}toString(){switch(this){case i.Ok:return"OK";case i.InvalidTransaction:return"INVALID_TRANSACTION";case i.PayerAccountNotFound:return"PAYER_ACCOUNT_NOT_FOUND";case i.InvalidNodeAccount:return"INVALID_NODE_ACCOUNT";case i.TransactionExpired:return"TRANSACTION_EXPIRED";case i.InvalidTransactionStart:return"INVALID_TRANSACTION_START";case i.InvalidTransactionDuration:return"INVALID_TRANSACTION_DURATION";case i.InvalidSignature:return"INVALID_SIGNATURE";case i.MemoTooLong:return"MEMO_TOO_LONG";case i.InsufficientTxFee:return"INSUFFICIENT_TX_FEE";case i.InsufficientPayerBalance:return"INSUFFICIENT_PAYER_BALANCE";case i.DuplicateTransaction:return"DUPLICATE_TRANSACTION";case i.Busy:return"BUSY";case i.NotSupported:return"NOT_SUPPORTED";case i.InvalidFileId:return"INVALID_FILE_ID";case i.InvalidAccountId:return"INVALID_ACCOUNT_ID";case i.InvalidContractId:return"INVALID_CONTRACT_ID";case i.InvalidTransactionId:return"INVALID_TRANSACTION_ID";case i.ReceiptNotFound:return"RECEIPT_NOT_FOUND";case i.RecordNotFound:return"RECORD_NOT_FOUND";case i.InvalidSolidityId:return"INVALID_SOLIDITY_ID";case i.Unknown:return"UNKNOWN";case i.Success:return"SUCCESS";case i.FailInvalid:return"FAIL_INVALID";case i.FailFee:return"FAIL_FEE";case i.FailBalance:return"FAIL_BALANCE";case i.KeyRequired:return"KEY_REQUIRED";case i.BadEncoding:return"BAD_ENCODING";case i.InsufficientAccountBalance:return"INSUFFICIENT_ACCOUNT_BALANCE";case i.InvalidSolidityAddress:return"INVALID_SOLIDITY_ADDRESS";case i.InsufficientGas:return"INSUFFICIENT_GAS";case i.ContractSizeLimitExceeded:return"CONTRACT_SIZE_LIMIT_EXCEEDED";case i.LocalCallModificationException:return"LOCAL_CALL_MODIFICATION_EXCEPTION";case i.ContractRevertExecuted:return"CONTRACT_REVERT_EXECUTED";case i.ContractExecutionException:return"CONTRACT_EXECUTION_EXCEPTION";case i.InvalidReceivingNodeAccount:return"INVALID_RECEIVING_NODE_ACCOUNT";case i.MissingQueryHeader:return"MISSING_QUERY_HEADER";case i.AccountUpdateFailed:return"ACCOUNT_UPDATE_FAILED";case i.InvalidKeyEncoding:return"INVALID_KEY_ENCODING";case i.NullSolidityAddress:return"NULL_SOLIDITY_ADDRESS";case i.ContractUpdateFailed:return"CONTRACT_UPDATE_FAILED";case i.InvalidQueryHeader:return"INVALID_QUERY_HEADER";case i.InvalidFeeSubmitted:return"INVALID_FEE_SUBMITTED";case i.InvalidPayerSignature:return"INVALID_PAYER_SIGNATURE";case i.KeyNotProvided:return"KEY_NOT_PROVIDED";case i.InvalidExpirationTime:return"INVALID_EXPIRATION_TIME";case i.NoWaclKey:return"NO_WACL_KEY";case i.FileContentEmpty:return"FILE_CONTENT_EMPTY";case i.InvalidAccountAmounts:return"INVALID_ACCOUNT_AMOUNTS";case i.EmptyTransactionBody:return"EMPTY_TRANSACTION_BODY";case i.InvalidTransactionBody:return"INVALID_TRANSACTION_BODY";case i.InvalidSignatureTypeMismatchingKey:return"INVALID_SIGNATURE_TYPE_MISMATCHING_KEY";case i.InvalidSignatureCountMismatchingKey:return"INVALID_SIGNATURE_COUNT_MISMATCHING_KEY";case i.EmptyLiveHashBody:return"EMPTY_LIVE_HASH_BODY";case i.EmptyLiveHash:return"EMPTY_LIVE_HASH";case i.EmptyLiveHashKeys:return"EMPTY_LIVE_HASH_KEYS";case i.InvalidLiveHashSize:return"INVALID_LIVE_HASH_SIZE";case i.EmptyQueryBody:return"EMPTY_QUERY_BODY";case i.EmptyLiveHashQuery:return"EMPTY_LIVE_HASH_QUERY";case i.LiveHashNotFound:return"LIVE_HASH_NOT_FOUND";case i.AccountIdDoesNotExist:return"ACCOUNT_ID_DOES_NOT_EXIST";case i.LiveHashAlreadyExists:return"LIVE_HASH_ALREADY_EXISTS";case i.InvalidFileWacl:return"INVALID_FILE_WACL";case i.SerializationFailed:return"SERIALIZATION_FAILED";case i.TransactionOversize:return"TRANSACTION_OVERSIZE";case i.TransactionTooManyLayers:return"TRANSACTION_TOO_MANY_LAYERS";case i.ContractDeleted:return"CONTRACT_DELETED";case i.PlatformNotActive:return"PLATFORM_NOT_ACTIVE";case i.KeyPrefixMismatch:return"KEY_PREFIX_MISMATCH";case i.PlatformTransactionNotCreated:return"PLATFORM_TRANSACTION_NOT_CREATED";case i.InvalidRenewalPeriod:return"INVALID_RENEWAL_PERIOD";case i.InvalidPayerAccountId:return"INVALID_PAYER_ACCOUNT_ID";case i.AccountDeleted:return"ACCOUNT_DELETED";case i.FileDeleted:return"FILE_DELETED";case i.AccountRepeatedInAccountAmounts:return"ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS";case i.SettingNegativeAccountBalance:return"SETTING_NEGATIVE_ACCOUNT_BALANCE";case i.ObtainerRequired:return"OBTAINER_REQUIRED";case i.ObtainerSameContractId:return"OBTAINER_SAME_CONTRACT_ID";case i.ObtainerDoesNotExist:return"OBTAINER_DOES_NOT_EXIST";case i.ModifyingImmutableContract:return"MODIFYING_IMMUTABLE_CONTRACT";case i.FileSystemException:return"FILE_SYSTEM_EXCEPTION";case i.AutorenewDurationNotInRange:return"AUTORENEW_DURATION_NOT_IN_RANGE";case i.ErrorDecodingBytestring:return"ERROR_DECODING_BYTESTRING";case i.ContractFileEmpty:return"CONTRACT_FILE_EMPTY";case i.ContractBytecodeEmpty:return"CONTRACT_BYTECODE_EMPTY";case i.InvalidInitialBalance:return"INVALID_INITIAL_BALANCE";case i.InvalidReceiveRecordThreshold:return"INVALID_RECEIVE_RECORD_THRESHOLD";case i.InvalidSendRecordThreshold:return"INVALID_SEND_RECORD_THRESHOLD";case i.AccountIsNotGenesisAccount:return"ACCOUNT_IS_NOT_GENESIS_ACCOUNT";case i.PayerAccountUnauthorized:return"PAYER_ACCOUNT_UNAUTHORIZED";case i.InvalidFreezeTransactionBody:return"INVALID_FREEZE_TRANSACTION_BODY";case i.FreezeTransactionBodyNotFound:return"FREEZE_TRANSACTION_BODY_NOT_FOUND";case i.TransferListSizeLimitExceeded:return"TRANSFER_LIST_SIZE_LIMIT_EXCEEDED";case i.ResultSizeLimitExceeded:return"RESULT_SIZE_LIMIT_EXCEEDED";case i.NotSpecialAccount:return"NOT_SPECIAL_ACCOUNT";case i.ContractNegativeGas:return"CONTRACT_NEGATIVE_GAS";case i.ContractNegativeValue:return"CONTRACT_NEGATIVE_VALUE";case i.InvalidFeeFile:return"INVALID_FEE_FILE";case i.InvalidExchangeRateFile:return"INVALID_EXCHANGE_RATE_FILE";case i.InsufficientLocalCallGas:return"INSUFFICIENT_LOCAL_CALL_GAS";case i.EntityNotAllowedToDelete:return"ENTITY_NOT_ALLOWED_TO_DELETE";case i.AuthorizationFailed:return"AUTHORIZATION_FAILED";case i.FileUploadedProtoInvalid:return"FILE_UPLOADED_PROTO_INVALID";case i.FileUploadedProtoNotSavedToDisk:return"FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK";case i.FeeScheduleFilePartUploaded:return"FEE_SCHEDULE_FILE_PART_UPLOADED";case i.ExchangeRateChangeLimitExceeded:return"EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED";case i.MaxContractStorageExceeded:return"MAX_CONTRACT_STORAGE_EXCEEDED";case i.TransferAccountSameAsDeleteAccount:return"TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT";case i.TotalLedgerBalanceInvalid:return"TOTAL_LEDGER_BALANCE_INVALID";case i.ExpirationReductionNotAllowed:return"EXPIRATION_REDUCTION_NOT_ALLOWED";case i.MaxGasLimitExceeded:return"MAX_GAS_LIMIT_EXCEEDED";case i.MaxFileSizeExceeded:return"MAX_FILE_SIZE_EXCEEDED";case i.ReceiverSigRequired:return"RECEIVER_SIG_REQUIRED";case i.InvalidTopicId:return"INVALID_TOPIC_ID";case i.InvalidAdminKey:return"INVALID_ADMIN_KEY";case i.InvalidSubmitKey:return"INVALID_SUBMIT_KEY";case i.Unauthorized:return"UNAUTHORIZED";case i.InvalidTopicMessage:return"INVALID_TOPIC_MESSAGE";case i.InvalidAutorenewAccount:return"INVALID_AUTORENEW_ACCOUNT";case i.AutorenewAccountNotAllowed:return"AUTORENEW_ACCOUNT_NOT_ALLOWED";case i.TopicExpired:return"TOPIC_EXPIRED";case i.InvalidChunkNumber:return"INVALID_CHUNK_NUMBER";case i.InvalidChunkTransactionId:return"INVALID_CHUNK_TRANSACTION_ID";case i.AccountFrozenForToken:return"ACCOUNT_FROZEN_FOR_TOKEN";case i.TokensPerAccountLimitExceeded:return"TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED";case i.InvalidTokenId:return"INVALID_TOKEN_ID";case i.InvalidTokenDecimals:return"INVALID_TOKEN_DECIMALS";case i.InvalidTokenInitialSupply:return"INVALID_TOKEN_INITIAL_SUPPLY";case i.InvalidTreasuryAccountForToken:return"INVALID_TREASURY_ACCOUNT_FOR_TOKEN";case i.InvalidTokenSymbol:return"INVALID_TOKEN_SYMBOL";case i.TokenHasNoFreezeKey:return"TOKEN_HAS_NO_FREEZE_KEY";case i.TransfersNotZeroSumForToken:return"TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN";case i.MissingTokenSymbol:return"MISSING_TOKEN_SYMBOL";case i.TokenSymbolTooLong:return"TOKEN_SYMBOL_TOO_LONG";case i.AccountKycNotGrantedForToken:return"ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN";case i.TokenHasNoKycKey:return"TOKEN_HAS_NO_KYC_KEY";case i.InsufficientTokenBalance:return"INSUFFICIENT_TOKEN_BALANCE";case i.TokenWasDeleted:return"TOKEN_WAS_DELETED";case i.TokenHasNoSupplyKey:return"TOKEN_HAS_NO_SUPPLY_KEY";case i.TokenHasNoWipeKey:return"TOKEN_HAS_NO_WIPE_KEY";case i.InvalidTokenMintAmount:return"INVALID_TOKEN_MINT_AMOUNT";case i.InvalidTokenBurnAmount:return"INVALID_TOKEN_BURN_AMOUNT";case i.TokenNotAssociatedToAccount:return"TOKEN_NOT_ASSOCIATED_TO_ACCOUNT";case i.CannotWipeTokenTreasuryAccount:return"CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT";case i.InvalidKycKey:return"INVALID_KYC_KEY";case i.InvalidWipeKey:return"INVALID_WIPE_KEY";case i.InvalidFreezeKey:return"INVALID_FREEZE_KEY";case i.InvalidSupplyKey:return"INVALID_SUPPLY_KEY";case i.MissingTokenName:return"MISSING_TOKEN_NAME";case i.TokenNameTooLong:return"TOKEN_NAME_TOO_LONG";case i.InvalidWipingAmount:return"INVALID_WIPING_AMOUNT";case i.TokenIsImmutable:return"TOKEN_IS_IMMUTABLE";case i.TokenAlreadyAssociatedToAccount:return"TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT";case i.TransactionRequiresZeroTokenBalances:return"TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES";case i.AccountIsTreasury:return"ACCOUNT_IS_TREASURY";case i.TokenIdRepeatedInTokenList:return"TOKEN_ID_REPEATED_IN_TOKEN_LIST";case i.TokenTransferListSizeLimitExceeded:return"TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED";case i.EmptyTokenTransferBody:return"EMPTY_TOKEN_TRANSFER_BODY";case i.EmptyTokenTransferAccountAmounts:return"EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS";case i.InvalidScheduleId:return"INVALID_SCHEDULE_ID";case i.ScheduleIsImmutable:return"SCHEDULE_IS_IMMUTABLE";case i.InvalidSchedulePayerId:return"INVALID_SCHEDULE_PAYER_ID";case i.InvalidScheduleAccountId:return"INVALID_SCHEDULE_ACCOUNT_ID";case i.NoNewValidSignatures:return"NO_NEW_VALID_SIGNATURES";case i.UnresolvableRequiredSigners:return"UNRESOLVABLE_REQUIRED_SIGNERS";case i.ScheduledTransactionNotInWhitelist:return"SCHEDULED_TRANSACTION_NOT_IN_WHITELIST";case i.SomeSignaturesWereInvalid:return"SOME_SIGNATURES_WERE_INVALID";case i.TransactionIdFieldNotAllowed:return"TRANSACTION_ID_FIELD_NOT_ALLOWED";case i.IdenticalScheduleAlreadyCreated:return"IDENTICAL_SCHEDULE_ALREADY_CREATED";case i.InvalidZeroByteInString:return"INVALID_ZERO_BYTE_IN_STRING";case i.ScheduleAlreadyDeleted:return"SCHEDULE_ALREADY_DELETED";case i.ScheduleAlreadyExecuted:return"SCHEDULE_ALREADY_EXECUTED";case i.MessageSizeTooLarge:return"MESSAGE_SIZE_TOO_LARGE";case i.OperationRepeatedInBucketGroups:return"OPERATION_REPEATED_IN_BUCKET_GROUPS";case i.BucketCapacityOverflow:return"BUCKET_CAPACITY_OVERFLOW";case i.NodeCapacityNotSufficientForOperation:return"NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION";case i.BucketHasNoThrottleGroups:return"BUCKET_HAS_NO_THROTTLE_GROUPS";case i.ThrottleGroupHasZeroOpsPerSec:return"THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC";case i.SuccessButMissingExpectedOperation:return"SUCCESS_BUT_MISSING_EXPECTED_OPERATION";case i.UnparseableThrottleDefinitions:return"UNPARSEABLE_THROTTLE_DEFINITIONS";case i.InvalidThrottleDefinitions:return"INVALID_THROTTLE_DEFINITIONS";case i.AccountExpiredAndPendingRemoval:return"ACCOUNT_EXPIRED_AND_PENDING_REMOVAL";case i.InvalidTokenMaxSupply:return"INVALID_TOKEN_MAX_SUPPLY";case i.InvalidTokenNftSerialNumber:return"INVALID_TOKEN_NFT_SERIAL_NUMBER";case i.InvalidNftId:return"INVALID_NFT_ID";case i.MetadataTooLong:return"METADATA_TOO_LONG";case i.BatchSizeLimitExceeded:return"BATCH_SIZE_LIMIT_EXCEEDED";case i.InvalidQueryRange:return"INVALID_QUERY_RANGE";case i.FractionDividesByZero:return"FRACTION_DIVIDES_BY_ZERO";case i.InsufficientPayerBalanceForCustomFee:return"INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE";case i.CustomFeesListTooLong:return"CUSTOM_FEES_LIST_TOO_LONG";case i.InvalidCustomFeeCollector:return"INVALID_CUSTOM_FEE_COLLECTOR";case i.InvalidTokenIdInCustomFees:return"INVALID_TOKEN_ID_IN_CUSTOM_FEES";case i.TokenNotAssociatedToFeeCollector:return"TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR";case i.TokenMaxSupplyReached:return"TOKEN_MAX_SUPPLY_REACHED";case i.SenderDoesNotOwnNftSerialNo:return"SENDER_DOES_NOT_OWN_NFT_SERIAL_NO";case i.CustomFeeNotFullySpecified:return"CUSTOM_FEE_NOT_FULLY_SPECIFIED";case i.CustomFeeMustBePositive:return"CUSTOM_FEE_MUST_BE_POSITIVE";case i.TokenHasNoFeeScheduleKey:return"TOKEN_HAS_NO_FEE_SCHEDULE_KEY";case i.CustomFeeOutsideNumericRange:return"CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE";case i.RoyaltyFractionCannotExceedOne:return"ROYALTY_FRACTION_CANNOT_EXCEED_ONE";case i.FractionalFeeMaxAmountLessThanMinAmount:return"FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT";case i.CustomScheduleAlreadyHasNoFees:return"CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES";case i.CustomFeeDenominationMustBeFungibleCommon:return"CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON";case i.CustomFractionalFeeOnlyAllowedForFungibleCommon:return"CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON";case i.InvalidCustomFeeScheduleKey:return"INVALID_CUSTOM_FEE_SCHEDULE_KEY";case i.InvalidTokenMintMetadata:return"INVALID_TOKEN_MINT_METADATA";case i.InvalidTokenBurnMetadata:return"INVALID_TOKEN_BURN_METADATA";case i.CurrentTreasuryStillOwnsNfts:return"CURRENT_TREASURY_STILL_OWNS_NFTS";case i.AccountStillOwnsNfts:return"ACCOUNT_STILL_OWNS_NFTS";case i.TreasuryMustOwnBurnedNft:return"TREASURY_MUST_OWN_BURNED_NFT";case i.AccountDoesNotOwnWipedNft:return"ACCOUNT_DOES_NOT_OWN_WIPED_NFT";case i.AccountAmountTransfersOnlyAllowedForFungibleCommon:return"ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON";case i.MaxNftsInPriceRegimeHaveBeenMinted:return"MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED";case i.PayerAccountDeleted:return"PAYER_ACCOUNT_DELETED";case i.CustomFeeChargingExceededMaxRecursionDepth:return"CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH";case i.CustomFeeChargingExceededMaxAccountAmounts:return"CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS";case i.InsufficientSenderAccountBalanceForCustomFee:return"INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE";case i.SerialNumberLimitReached:return"SERIAL_NUMBER_LIMIT_REACHED";case i.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique:return"CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE";default:return`UNKNOWN STATUS CODE (${this.code})`}}_isBusy(){return i.Busy===this}static _fromCode(h){var p;return(p=i[h])!==null&&p!==void 0?p:new i(h)}_isError(){switch(this){case i.Success:case i.Ok:return!1;case i.Unknown:case i.ReceiptNotFound:case i.RecordNotFound:return!0;default:return!0}}_throwIfError(){if(this._isError())throw new t.HederaStatusError(this)}}n.Status=i,i.Ok=new i(0),i.InvalidTransaction=new i(1),i.PayerAccountNotFound=new i(2),i.InvalidNodeAccount=new i(3),i.TransactionExpired=new i(4),i.InvalidTransactionStart=new i(5),i.InvalidTransactionDuration=new i(6),i.InvalidSignature=new i(7),i.MemoTooLong=new i(8),i.InsufficientTxFee=new i(9),i.InsufficientPayerBalance=new i(10),i.DuplicateTransaction=new i(11),i.Busy=new i(12),i.NotSupported=new i(13),i.InvalidFileId=new i(14),i.InvalidAccountId=new i(15),i.InvalidContractId=new i(16),i.InvalidTransactionId=new i(17),i.ReceiptNotFound=new i(18),i.RecordNotFound=new i(19),i.InvalidSolidityId=new i(20),i.Unknown=new i(21),i.Success=new i(22),i.FailInvalid=new i(23),i.FailFee=new i(24),i.FailBalance=new i(25),i.KeyRequired=new i(26),i.BadEncoding=new i(27),i.InsufficientAccountBalance=new i(28),i.InvalidSolidityAddress=new i(29),i.InsufficientGas=new i(30),i.ContractSizeLimitExceeded=new i(31),i.LocalCallModificationException=new i(32),i.ContractRevertExecuted=new i(33),i.ContractExecutionException=new i(34),i.InvalidReceivingNodeAccount=new i(35),i.MissingQueryHeader=new i(36),i.AccountUpdateFailed=new i(37),i.InvalidKeyEncoding=new i(38),i.NullSolidityAddress=new i(39),i.ContractUpdateFailed=new i(40),i.InvalidQueryHeader=new i(41),i.InvalidFeeSubmitted=new i(42),i.InvalidPayerSignature=new i(43),i.KeyNotProvided=new i(44),i.InvalidExpirationTime=new i(45),i.NoWaclKey=new i(46),i.FileContentEmpty=new i(47),i.InvalidAccountAmounts=new i(48),i.EmptyTransactionBody=new i(49),i.InvalidTransactionBody=new i(50),i.InvalidSignatureTypeMismatchingKey=new i(51),i.InvalidSignatureCountMismatchingKey=new i(52),i.EmptyLiveHashBody=new i(53),i.EmptyLiveHash=new i(54),i.EmptyLiveHashKeys=new i(55),i.InvalidLiveHashSize=new i(56),i.EmptyQueryBody=new i(57),i.EmptyLiveHashQuery=new i(58),i.LiveHashNotFound=new i(59),i.AccountIdDoesNotExist=new i(60),i.LiveHashAlreadyExists=new i(61),i.InvalidFileWacl=new i(62),i.SerializationFailed=new i(63),i.TransactionOversize=new i(64),i.TransactionTooManyLayers=new i(65),i.ContractDeleted=new i(66),i.PlatformNotActive=new i(67),i.KeyPrefixMismatch=new i(68),i.PlatformTransactionNotCreated=new i(69),i.InvalidRenewalPeriod=new i(70),i.InvalidPayerAccountId=new i(71),i.AccountDeleted=new i(72),i.FileDeleted=new i(73),i.AccountRepeatedInAccountAmounts=new i(74),i.SettingNegativeAccountBalance=new i(75),i.ObtainerRequired=new i(76),i.ObtainerSameContractId=new i(77),i.ObtainerDoesNotExist=new i(78),i.ModifyingImmutableContract=new i(79),i.FileSystemException=new i(80),i.AutorenewDurationNotInRange=new i(81),i.ErrorDecodingBytestring=new i(82),i.ContractFileEmpty=new i(83),i.ContractBytecodeEmpty=new i(84),i.InvalidInitialBalance=new i(85),i.InvalidReceiveRecordThreshold=new i(86),i.InvalidSendRecordThreshold=new i(87),i.AccountIsNotGenesisAccount=new i(88),i.PayerAccountUnauthorized=new i(89),i.InvalidFreezeTransactionBody=new i(90),i.FreezeTransactionBodyNotFound=new i(91),i.TransferListSizeLimitExceeded=new i(92),i.ResultSizeLimitExceeded=new i(93),i.NotSpecialAccount=new i(94),i.ContractNegativeGas=new i(95),i.ContractNegativeValue=new i(96),i.InvalidFeeFile=new i(97),i.InvalidExchangeRateFile=new i(98),i.InsufficientLocalCallGas=new i(99),i.EntityNotAllowedToDelete=new i(100),i.AuthorizationFailed=new i(101),i.FileUploadedProtoInvalid=new i(102),i.FileUploadedProtoNotSavedToDisk=new i(103),i.FeeScheduleFilePartUploaded=new i(104),i.ExchangeRateChangeLimitExceeded=new i(105),i.MaxContractStorageExceeded=new i(106),i.TransferAccountSameAsDeleteAccount=new i(107),i.TotalLedgerBalanceInvalid=new i(108),i.ExpirationReductionNotAllowed=new i(110),i.MaxGasLimitExceeded=new i(111),i.MaxFileSizeExceeded=new i(112),i.ReceiverSigRequired=new i(113),i.InvalidTopicId=new i(150),i.InvalidAdminKey=new i(155),i.InvalidSubmitKey=new i(156),i.Unauthorized=new i(157),i.InvalidTopicMessage=new i(158),i.InvalidAutorenewAccount=new i(159),i.AutorenewAccountNotAllowed=new i(160),i.TopicExpired=new i(162),i.InvalidChunkNumber=new i(163),i.InvalidChunkTransactionId=new i(164),i.AccountFrozenForToken=new i(165),i.TokensPerAccountLimitExceeded=new i(166),i.InvalidTokenId=new i(167),i.InvalidTokenDecimals=new i(168),i.InvalidTokenInitialSupply=new i(169),i.InvalidTreasuryAccountForToken=new i(170),i.InvalidTokenSymbol=new i(171),i.TokenHasNoFreezeKey=new i(172),i.TransfersNotZeroSumForToken=new i(173),i.MissingTokenSymbol=new i(174),i.TokenSymbolTooLong=new i(175),i.AccountKycNotGrantedForToken=new i(176),i.TokenHasNoKycKey=new i(177),i.InsufficientTokenBalance=new i(178),i.TokenWasDeleted=new i(179),i.TokenHasNoSupplyKey=new i(180),i.TokenHasNoWipeKey=new i(181),i.InvalidTokenMintAmount=new i(182),i.InvalidTokenBurnAmount=new i(183),i.TokenNotAssociatedToAccount=new i(184),i.CannotWipeTokenTreasuryAccount=new i(185),i.InvalidKycKey=new i(186),i.InvalidWipeKey=new i(187),i.InvalidFreezeKey=new i(188),i.InvalidSupplyKey=new i(189),i.MissingTokenName=new i(190),i.TokenNameTooLong=new i(191),i.InvalidWipingAmount=new i(192),i.TokenIsImmutable=new i(193),i.TokenAlreadyAssociatedToAccount=new i(194),i.TransactionRequiresZeroTokenBalances=new i(195),i.AccountIsTreasury=new i(196),i.TokenIdRepeatedInTokenList=new i(197),i.TokenTransferListSizeLimitExceeded=new i(198),i.EmptyTokenTransferBody=new i(199),i.EmptyTokenTransferAccountAmounts=new i(200),i.InvalidScheduleId=new i(201),i.ScheduleIsImmutable=new i(202),i.InvalidSchedulePayerId=new i(203),i.InvalidScheduleAccountId=new i(204),i.NoNewValidSignatures=new i(205),i.UnresolvableRequiredSigners=new i(206),i.ScheduledTransactionNotInWhitelist=new i(207),i.SomeSignaturesWereInvalid=new i(208),i.TransactionIdFieldNotAllowed=new i(209),i.IdenticalScheduleAlreadyCreated=new i(210),i.InvalidZeroByteInString=new i(211),i.ScheduleAlreadyDeleted=new i(212),i.ScheduleAlreadyExecuted=new i(213),i.MessageSizeTooLarge=new i(214),i.OperationRepeatedInBucketGroups=new i(215),i.BucketCapacityOverflow=new i(216),i.NodeCapacityNotSufficientForOperation=new i(217),i.BucketHasNoThrottleGroups=new i(218),i.ThrottleGroupHasZeroOpsPerSec=new i(219),i.SuccessButMissingExpectedOperation=new i(220),i.UnparseableThrottleDefinitions=new i(221),i.InvalidThrottleDefinitions=new i(222),i.AccountExpiredAndPendingRemoval=new i(223),i.InvalidTokenMaxSupply=new i(224),i.InvalidTokenNftSerialNumber=new i(225),i.InvalidNftId=new i(226),i.MetadataTooLong=new i(227),i.BatchSizeLimitExceeded=new i(228),i.InvalidQueryRange=new i(229),i.FractionDividesByZero=new i(230),i.InsufficientPayerBalanceForCustomFee=new i(231),i.CustomFeesListTooLong=new i(232),i.InvalidCustomFeeCollector=new i(233),i.InvalidTokenIdInCustomFees=new i(234),i.TokenNotAssociatedToFeeCollector=new i(235),i.TokenMaxSupplyReached=new i(236),i.SenderDoesNotOwnNftSerialNo=new i(237),i.CustomFeeNotFullySpecified=new i(238),i.CustomFeeMustBePositive=new i(239),i.TokenHasNoFeeScheduleKey=new i(240),i.CustomFeeOutsideNumericRange=new i(241),i.RoyaltyFractionCannotExceedOne=new i(242),i.FractionalFeeMaxAmountLessThanMinAmount=new i(243),i.CustomScheduleAlreadyHasNoFees=new i(244),i.CustomFeeDenominationMustBeFungibleCommon=new i(245),i.CustomFractionalFeeOnlyAllowedForFungibleCommon=new i(246),i.InvalidCustomFeeScheduleKey=new i(247),i.InvalidTokenMintMetadata=new i(248),i.InvalidTokenBurnMetadata=new i(249),i.CurrentTreasuryStillOwnsNfts=new i(250),i.AccountStillOwnsNfts=new i(251),i.TreasuryMustOwnBurnedNft=new i(252),i.AccountDoesNotOwnWipedNft=new i(253),i.AccountAmountTransfersOnlyAllowedForFungibleCommon=new i(254),i.MaxNftsInPriceRegimeHaveBeenMinted=new i(255),i.PayerAccountDeleted=new i(256),i.CustomFeeChargingExceededMaxRecursionDepth=new i(257),i.CustomFeeChargingExceededMaxAccountAmounts=new i(258),i.InsufficientSenderAccountBalanceForCustomFee=new i(259),i.SerialNumberLimitReached=new i(260),i.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique=new i(261),i[0]=i.Ok,i[1]=i.InvalidTransaction,i[2]=i.PayerAccountNotFound,i[3]=i.InvalidNodeAccount,i[4]=i.TransactionExpired,i[5]=i.InvalidTransactionStart,i[6]=i.InvalidTransactionDuration,i[7]=i.InvalidSignature,i[8]=i.MemoTooLong,i[9]=i.InsufficientTxFee,i[10]=i.InsufficientPayerBalance,i[11]=i.DuplicateTransaction,i[12]=i.Busy,i[13]=i.NotSupported,i[14]=i.InvalidFileId,i[15]=i.InvalidAccountId,i[16]=i.InvalidContractId,i[17]=i.InvalidTransactionId,i[18]=i.ReceiptNotFound,i[19]=i.RecordNotFound,i[20]=i.InvalidSolidityId,i[21]=i.Unknown,i[22]=i.Success,i[23]=i.FailInvalid,i[24]=i.FailFee,i[25]=i.FailBalance,i[26]=i.KeyRequired,i[27]=i.BadEncoding,i[28]=i.InsufficientAccountBalance,i[29]=i.InvalidSolidityAddress,i[30]=i.InsufficientGas,i[31]=i.ContractSizeLimitExceeded,i[32]=i.LocalCallModificationException,i[33]=i.ContractRevertExecuted,i[34]=i.ContractExecutionException,i[35]=i.InvalidReceivingNodeAccount,i[36]=i.MissingQueryHeader,i[37]=i.AccountUpdateFailed,i[38]=i.InvalidKeyEncoding,i[39]=i.NullSolidityAddress,i[40]=i.ContractUpdateFailed,i[41]=i.InvalidQueryHeader,i[42]=i.InvalidFeeSubmitted,i[43]=i.InvalidPayerSignature,i[44]=i.KeyNotProvided,i[45]=i.InvalidExpirationTime,i[46]=i.NoWaclKey,i[47]=i.FileContentEmpty,i[48]=i.InvalidAccountAmounts,i[49]=i.EmptyTransactionBody,i[50]=i.InvalidTransactionBody,i[51]=i.InvalidSignatureTypeMismatchingKey,i[52]=i.InvalidSignatureCountMismatchingKey,i[53]=i.EmptyLiveHashBody,i[54]=i.EmptyLiveHash,i[55]=i.EmptyLiveHashKeys,i[56]=i.InvalidLiveHashSize,i[57]=i.EmptyQueryBody,i[58]=i.EmptyLiveHashQuery,i[59]=i.LiveHashNotFound,i[60]=i.AccountIdDoesNotExist,i[61]=i.LiveHashAlreadyExists,i[62]=i.InvalidFileWacl,i[63]=i.SerializationFailed,i[64]=i.TransactionOversize,i[65]=i.TransactionTooManyLayers,i[66]=i.ContractDeleted,i[67]=i.PlatformNotActive,i[68]=i.KeyPrefixMismatch,i[69]=i.PlatformTransactionNotCreated,i[70]=i.InvalidRenewalPeriod,i[71]=i.InvalidPayerAccountId,i[72]=i.AccountDeleted,i[73]=i.FileDeleted,i[74]=i.AccountRepeatedInAccountAmounts,i[75]=i.SettingNegativeAccountBalance,i[76]=i.ObtainerRequired,i[77]=i.ObtainerSameContractId,i[78]=i.ObtainerDoesNotExist,i[79]=i.ModifyingImmutableContract,i[80]=i.FileSystemException,i[81]=i.AutorenewDurationNotInRange,i[82]=i.ErrorDecodingBytestring,i[83]=i.ContractFileEmpty,i[84]=i.ContractBytecodeEmpty,i[85]=i.InvalidInitialBalance,i[86]=i.InvalidReceiveRecordThreshold,i[87]=i.InvalidSendRecordThreshold,i[88]=i.AccountIsNotGenesisAccount,i[89]=i.PayerAccountUnauthorized,i[90]=i.InvalidFreezeTransactionBody,i[91]=i.FreezeTransactionBodyNotFound,i[92]=i.TransferListSizeLimitExceeded,i[93]=i.ResultSizeLimitExceeded,i[94]=i.NotSpecialAccount,i[95]=i.ContractNegativeGas,i[96]=i.ContractNegativeValue,i[97]=i.InvalidFeeFile,i[98]=i.InvalidExchangeRateFile,i[99]=i.InsufficientLocalCallGas,i[100]=i.EntityNotAllowedToDelete,i[101]=i.AuthorizationFailed,i[102]=i.FileUploadedProtoInvalid,i[103]=i.FileUploadedProtoNotSavedToDisk,i[104]=i.FeeScheduleFilePartUploaded,i[105]=i.ExchangeRateChangeLimitExceeded,i[106]=i.MaxContractStorageExceeded,i[107]=i.TransferAccountSameAsDeleteAccount,i[108]=i.TotalLedgerBalanceInvalid,i[110]=i.ExpirationReductionNotAllowed,i[111]=i.MaxGasLimitExceeded,i[112]=i.MaxFileSizeExceeded,i[113]=i.ReceiverSigRequired,i[150]=i.InvalidTopicId,i[155]=i.InvalidAdminKey,i[156]=i.InvalidSubmitKey,i[157]=i.Unauthorized,i[158]=i.InvalidTopicMessage,i[159]=i.InvalidAutorenewAccount,i[160]=i.AutorenewAccountNotAllowed,i[162]=i.TopicExpired,i[163]=i.InvalidChunkNumber,i[164]=i.InvalidChunkTransactionId,i[165]=i.AccountFrozenForToken,i[166]=i.TokensPerAccountLimitExceeded,i[167]=i.InvalidTokenId,i[168]=i.InvalidTokenDecimals,i[169]=i.InvalidTokenInitialSupply,i[170]=i.InvalidTreasuryAccountForToken,i[171]=i.InvalidTokenSymbol,i[172]=i.TokenHasNoFreezeKey,i[173]=i.TransfersNotZeroSumForToken,i[174]=i.MissingTokenSymbol,i[175]=i.TokenSymbolTooLong,i[176]=i.AccountKycNotGrantedForToken,i[177]=i.TokenHasNoKycKey,i[178]=i.InsufficientTokenBalance,i[179]=i.TokenWasDeleted,i[180]=i.TokenHasNoSupplyKey,i[181]=i.TokenHasNoWipeKey,i[182]=i.InvalidTokenMintAmount,i[183]=i.InvalidTokenBurnAmount,i[184]=i.TokenNotAssociatedToAccount,i[185]=i.CannotWipeTokenTreasuryAccount,i[186]=i.InvalidKycKey,i[187]=i.InvalidWipeKey,i[188]=i.InvalidFreezeKey,i[189]=i.InvalidSupplyKey,i[190]=i.MissingTokenName,i[191]=i.TokenNameTooLong,i[192]=i.InvalidWipingAmount,i[193]=i.TokenIsImmutable,i[194]=i.TokenAlreadyAssociatedToAccount,i[195]=i.TransactionRequiresZeroTokenBalances,i[196]=i.AccountIsTreasury,i[197]=i.TokenIdRepeatedInTokenList,i[198]=i.TokenTransferListSizeLimitExceeded,i[199]=i.EmptyTokenTransferBody,i[200]=i.EmptyTokenTransferAccountAmounts,i[201]=i.InvalidScheduleId,i[202]=i.ScheduleIsImmutable,i[203]=i.InvalidSchedulePayerId,i[204]=i.InvalidScheduleAccountId,i[205]=i.NoNewValidSignatures,i[206]=i.UnresolvableRequiredSigners,i[207]=i.ScheduledTransactionNotInWhitelist,i[208]=i.SomeSignaturesWereInvalid,i[209]=i.TransactionIdFieldNotAllowed,i[210]=i.IdenticalScheduleAlreadyCreated,i[211]=i.InvalidZeroByteInString,i[212]=i.ScheduleAlreadyDeleted,i[213]=i.ScheduleAlreadyExecuted,i[214]=i.MessageSizeTooLarge,i[215]=i.OperationRepeatedInBucketGroups,i[216]=i.BucketCapacityOverflow,i[217]=i.NodeCapacityNotSufficientForOperation,i[218]=i.BucketHasNoThrottleGroups,i[219]=i.ThrottleGroupHasZeroOpsPerSec,i[220]=i.SuccessButMissingExpectedOperation,i[221]=i.UnparseableThrottleDefinitions,i[222]=i.InvalidThrottleDefinitions,i[223]=i.AccountExpiredAndPendingRemoval,i[224]=i.InvalidTokenMaxSupply,i[225]=i.InvalidTokenNftSerialNumber,i[226]=i.InvalidNftId,i[227]=i.MetadataTooLong,i[228]=i.BatchSizeLimitExceeded,i[229]=i.InvalidQueryRange,i[230]=i.FractionDividesByZero,i[231]=i.InsufficientPayerBalanceForCustomFee,i[232]=i.CustomFeesListTooLong,i[233]=i.InvalidCustomFeeCollector,i[234]=i.InvalidTokenIdInCustomFees,i[235]=i.TokenNotAssociatedToFeeCollector,i[236]=i.TokenMaxSupplyReached,i[237]=i.SenderDoesNotOwnNftSerialNo,i[238]=i.CustomFeeNotFullySpecified,i[239]=i.CustomFeeMustBePositive,i[240]=i.TokenHasNoFeeScheduleKey,i[241]=i.CustomFeeOutsideNumericRange,i[242]=i.RoyaltyFractionCannotExceedOne,i[243]=i.FractionalFeeMaxAmountLessThanMinAmount,i[244]=i.CustomScheduleAlreadyHasNoFees,i[245]=i.CustomFeeDenominationMustBeFungibleCommon,i[246]=i.CustomFractionalFeeOnlyAllowedForFungibleCommon,i[247]=i.InvalidCustomFeeScheduleKey,i[248]=i.InvalidTokenMintMetadata,i[249]=i.InvalidTokenBurnMetadata,i[250]=i.CurrentTreasuryStillOwnsNfts,i[251]=i.AccountStillOwnsNfts,i[252]=i.TreasuryMustOwnBurnedNft,i[253]=i.AccountDoesNotOwnWipedNft,i[254]=i.AccountAmountTransfersOnlyAllowedForFungibleCommon,i[255]=i.MaxNftsInPriceRegimeHaveBeenMinted,i[256]=i.PayerAccountDeleted,i[257]=i.CustomFeeChargingExceededMaxRecursionDepth,i[258]=i.CustomFeeChargingExceededMaxAccountAmounts,i[259]=i.InsufficientSenderAccountBalanceForCustomFee,i[260]=i.SerialNumberLimitReached,i[261]=i.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique},46174:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SystemDeleteTransaction=void 0;const t=u(66498),i=u(68169),B=u(13660),h=u(41331),p=u(30672),l=u(10462),s=u(24231);class r extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.SystemDeleteTransactionBody,this.setExpirationTime(Date.now()+789e7),this._inner.setSystemdelete(this._body)}setExpirationTime(y){return this._body.setExpirationtime(B.timestampToProto(B.dateToTimestamp(y))),this}setId(y){console.warn("`.setId` is deprecated. Use `.setFileId` or `.setContractId` instead");try{const T=s.normalizeEntityId("file",y);this._body.setFileid(new h.FileId(T)._toProto())}catch{const m=s.normalizeEntityId("contract",y);this._body.setContractid(new p.ContractId(m)._toProto())}return this}setFileId(y){return this._body.setFileid(new h.FileId(y)._toProto()),this}setContractId(y){return this._body.setContractid(new p.ContractId(y)._toProto()),this}_doValidate(y){!this._body.hasContractid()==null&&!this._body.hasFileid()&&y.push("SystemDelete must have an id set. Use `.setFileId()` or `.setContractId()")}get _method(){return l.FileService.systemDelete}}n.SystemDeleteTransaction=r},8958:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SystemUndeleteTransaction=void 0;const t=u(66498),i=u(41331),B=u(30672),h=u(10462),p=u(42012),l=u(24231);class s extends t.SingleTransactionBuilder{constructor(){super(),this._body=new p.SystemUndeleteTransactionBody,this._inner.setSystemundelete(this._body)}setId(g){console.warn("`.setId` is deprecated. Use `.setFileId` or `.setContractId` instead");try{const y=l.normalizeEntityId("file",g);this._body.setFileid(new i.FileId(y)._toProto())}catch{const T=l.normalizeEntityId("contract",g);this._body.setContractid(new B.ContractId(T)._toProto())}return this}setFileId(g){return this._body.setFileid(new i.FileId(g)._toProto()),this}setContractId(g){return this._body.setContractid(new B.ContractId(g)._toProto()),this}_doValidate(g){!this._body.hasContractid()==null&&!this._body.hasFileid()&&g.push("SystemDelete must have an id set. Use `.setFileId()` or `.setContractId()")}get _method(){return h.FileService.systemDelete}}n.SystemUndeleteTransaction=s},22173:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Time=void 0;const t=u(25867),i=u(44431);class B{constructor(p,l){this.seconds=p,this.nanos=l}asDate(){return new Date(this.seconds*1e3+Math.floor(this.nanos/1e6))}static fromDate(p){let l;if(typeof p=="number")l=p;else if(p instanceof Date)l=p.getTime();else throw new TypeError(`Invalid type ${JSON.stringify(p)} is not 'number' or 'Date'`);const s=Math.floor(l/1e3),r=Math.floor(l%1e3)*1e6;return new B(s,r)}_toProto(){const p=new t.Timestamp;return p.setSeconds(this.seconds.toString()),p.setNanos(this.nanos),p}static _fromProto(p){return new B(new i.default(p.getSeconds()).toNumber(),p.getNanos())}_increment(){return Math.floor(this.nanos+1)===1e9?new B(this.seconds+1,0):new B(this.seconds,this.nanos+1)}}n.Time=B},13660:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timestampToProto=n.timestampToMs=n.timestampToDate=n.dateToTimestamp=void 0;const t=u(25867),i=u(44431);function B(s){const r=s instanceof Date?s.getTime():s;return{seconds:Math.floor(r/1e3),nanos:Math.floor(r%1e3*1e6)}}n.dateToTimestamp=B;function h(s){return new Date(p(s))}n.timestampToDate=h;function p(s){return new i.default(s.getSeconds()).multipliedBy(1e3).plus(Math.floor(s.getNanos()/1e6)).toNumber()}n.timestampToMs=p;function l({seconds:s,nanos:r}){const g=new t.Timestamp;return g.setSeconds(s.toString()),g.setNanos(r),g}n.timestampToProto=l},34518:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(K,z,Y,M){function L(I){return I instanceof Y?I:new Y(function(A){A(I)})}return new(Y||(Y=Promise))(function(I,A){function $(x){try{G(M.next(x))}catch(X){A(X)}}function H(x){try{G(M.throw(x))}catch(X){A(X)}}function G(x){x.done?I(x.value):L(x.value).then($,H)}G((M=M.apply(K,z||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Transaction=n.SCHEDULE_CREATE_TRANSACTION=n.transactionCall=n.transactionCreate=void 0;const i=u(50780),B=u(30107),h=u(66774),p=u(33276),l=u(24231),s=u(33019),r=u(78436),g=u(51450),y=u(98614),T=u(10462),m=u(27044),F=u(80642),C=u(92504),S=u(90335),E=u(49132),k=u(24067),R=u(69323),W=u(95666),O=u(34977),N=500;n.transactionCreate=Symbol("transactionCreate"),n.transactionCall=Symbol("transactionCall"),n.SCHEDULE_CREATE_TRANSACTION=[];class j{constructor(){throw new Error("the constructor of Transaction is private; please construct through TransactionBuilder")}static[n.transactionCreate](z,Y,M,L){const I=Object.create(this.prototype);return I._node=z,I._inner=Y,I._txnId=l.orThrow(M.getTransactionid()),I._validDurationSeconds=l.orThrow(M.getTransactionvalidduration()).getSeconds(),I._method=L,I}static fromBytes(z){const Y=B.Transaction.deserializeBinary(z),M=h.TransactionBody.deserializeBinary(Y.getBodybytes_asU8()),L=S.AccountId._fromProto(l.orThrow(M.getNodeaccountid(),"transaction missing node account ID")),I=_(M);return j[n.transactionCreate](L,Y,M,I)}get id(){return E.TransactionId._fromProto(this._txnId)}schedule(){if(n.SCHEDULE_CREATE_TRANSACTION.length!==1)throw new Error("ScheduleCreateTransaction has not been loaded yet");const z=n.SCHEDULE_CREATE_TRANSACTION[0]().setNodeAccountId(this._node);return z._body.setScheduledtransactionbody(this._getScheduledTransactionBody()),z}_getScheduledTransactionBody(){const z=new F.SchedulableTransactionBody,Y=h.TransactionBody.deserializeBinary(this._inner.getBodybytes_asU8());switch(z.setMemo(Y.getMemo()),z.setTransactionfee(Y.getTransactionfee()),Y.getDataCase()){case h.TransactionBody.DataCase.CONTRACTCREATEINSTANCE:return z.setContractcreateinstance(Y.getContractcreateinstance()),z;case h.TransactionBody.DataCase.CONTRACTDELETEINSTANCE:return z.setContractdeleteinstance(Y.getContractdeleteinstance()),z;case h.TransactionBody.DataCase.CONTRACTUPDATEINSTANCE:return z.setContractupdateinstance(Y.getContractupdateinstance()),z;case h.TransactionBody.DataCase.CONTRACTCALL:return z.setContractcall(Y.getContractcall()),z;case h.TransactionBody.DataCase.CONSENSUSCREATETOPIC:return z.setConsensuscreatetopic(Y.getConsensuscreatetopic()),z;case h.TransactionBody.DataCase.CONSENSUSDELETETOPIC:return z.setConsensusdeletetopic(Y.getConsensusdeletetopic()),z;case h.TransactionBody.DataCase.CONSENSUSSUBMITMESSAGE:return z.setConsensussubmitmessage(Y.getConsensussubmitmessage()),z;case h.TransactionBody.DataCase.CONSENSUSUPDATETOPIC:return z.setConsensusupdatetopic(Y.getConsensusupdatetopic()),z;case h.TransactionBody.DataCase.CRYPTOCREATEACCOUNT:return z.setCryptocreateaccount(Y.getCryptocreateaccount()),z;case h.TransactionBody.DataCase.CRYPTODELETE:return z.setCryptodelete(Y.getCryptodelete()),z;case h.TransactionBody.DataCase.CRYPTOUPDATEACCOUNT:return z.setCryptoupdateaccount(Y.getCryptoupdateaccount()),z;case h.TransactionBody.DataCase.CRYPTOTRANSFER:return z.setCryptotransfer(Y.getCryptotransfer()),z;case h.TransactionBody.DataCase.TOKENASSOCIATE:return z.setTokenassociate(Y.getTokenassociate()),z;case h.TransactionBody.DataCase.TOKENBURN:return z.setTokenburn(Y.getTokenburn()),z;case h.TransactionBody.DataCase.TOKENCREATION:return z.setTokencreation(Y.getTokencreation()),z;case h.TransactionBody.DataCase.TOKENDELETION:return z.setTokendeletion(Y.getTokendeletion()),z;case h.TransactionBody.DataCase.TOKENDISSOCIATE:return z.setTokendissociate(Y.getTokendissociate()),z;case h.TransactionBody.DataCase.TOKENFREEZE:return z.setTokenfreeze(Y.getTokenfreeze()),z;case h.TransactionBody.DataCase.TOKENGRANTKYC:return z.setTokengrantkyc(Y.getTokengrantkyc()),z;case h.TransactionBody.DataCase.TOKENMINT:return z.setTokenmint(Y.getTokenmint()),z;case h.TransactionBody.DataCase.TOKENREVOKEKYC:return z.setTokenrevokekyc(Y.getTokenrevokekyc()),z;case h.TransactionBody.DataCase.TOKENUNFREEZE:return z.setTokenunfreeze(Y.getTokenunfreeze()),z;case h.TransactionBody.DataCase.TOKENWIPE:return z.setTokenwipe(Y.getTokenwipe()),z;case h.TransactionBody.DataCase.TOKENUPDATE:return z.setTokenupdate(Y.getTokenupdate()),z;case h.TransactionBody.DataCase.SCHEDULEDELETE:return z.setScheduledelete(Y.getScheduledelete()),z;default:throw new Error(`unsupported scheduled transaction:${Y.getDataCase().toString()}`)}}_getTransactionDataCase(){throw new Error("not implemented")}_checkPubKey(z){if(this._inner.hasSigmap()){for(const Y of this._inner.getSigmap().getSigpairList())if(z._bytesEqual(Y.getPubkeyprefix_asU8()))throw new Error(`transaction ${this._txnId} already signed with public key ${z.toString()}`)}}_addSignature({signature:z,publicKey:Y}){const M=Y.toBytes(),L=this._inner.getSigmap()||new p.SignatureMap;L.getSigpairList().forEach(A=>{const $=R.decode(A.getPubkeyprefix_asB64());if(M.toString()===$.toString())throw new Error(`transaction already signed with key ${Y.toString()}`)});const I=new p.SignaturePair;return I.setPubkeyprefix(Y.toBytes()),I.setEd25519(z),L.addSigpair(I),this._inner.setSigmap(L),this}sign(z){return this._checkPubKey(z.publicKey),this._addSignature({signature:i.sign.detached(this._inner.getBodybytes_asU8(),z._keyData),publicKey:z.publicKey})}signWith(z,Y){return t(this,void 0,void 0,function*(){this._checkPubKey(z);const M=Y(this._inner.getBodybytes_asU8()),L=M instanceof Promise?yield M:M;return this._addSignature({signature:L,publicKey:z}),this})}hash(){var z,Y;if(!h.TransactionBody.deserializeBinary(this._inner.getBodybytes_asU8()).hasNodeaccountid())throw new Error("transaction must have node id set");if(((Y=(z=this._inner.getSigmap())===null||z===void 0?void 0:z.getSigpairList().length)!==null&&Y!==void 0?Y:0)===0)throw new Error("transaction must be signed");return W.hash(this.toBytes())}[n.transactionCall](z){return t(this,void 0,void 0,function*(){if(z._getOperatorKey()&&z._getOperatorSigner())try{yield this.signWith(z._getOperatorKey(),z._getOperatorSigner())}catch{}const Y=z._getNode(this._node),M=Date.now()+this._validDurationSeconds*1e3;for(let L=0;;L+=1){if(L>0){const $=Math.floor(N*Math.random()*(Math.pow(2,L)-1));if(Date.now()+$>M)throw new Error(`timed out waiting to send transaction ID: ${this._txnId.toString()}`);yield l.setTimeoutAwaitable($)}const I=yield z._unaryCall(Y.url,this._inner,this._method);if(!k.Status._fromCode(I.getNodetransactionprecheckcode())._isBusy())return I}})}execute(z){return t(this,void 0,void 0,function*(){const Y=yield this[n.transactionCall](z),M=k.Status._fromCode(Y.getNodetransactionprecheckcode());return O.HederaPrecheckStatusError._throwIfError(M.code,this.id),this.id})}getReceipt(z){return console.warn("`Transaction.getReceipt()` is deprecrated. Use `(await Transaction.execute()).getReceipt()` instead."),this.id.getReceipt(z)}getRecord(z){return console.warn("`Transaction.getRecord()` is deprecrated. Use `(await Transaction.execute()).getRecord()` instead."),this.id.getRecord(z)}_toProto(){return s.Message.cloneMessage(this._inner)}toBytes(){return this._inner.serializeBinary()}toString(){const z=this._toProto().toObject();return JSON.stringify(z,null,4)}}n.Transaction=j;function _(K){switch(K.getDataCase()){case h.TransactionBody.DataCase.CONTRACTCALL:return y.SmartContractService.contractCallMethod;case h.TransactionBody.DataCase.CONTRACTCREATEINSTANCE:return y.SmartContractService.createContract;case h.TransactionBody.DataCase.CONTRACTUPDATEINSTANCE:return y.SmartContractService.updateContract;case h.TransactionBody.DataCase.CONTRACTDELETEINSTANCE:return y.SmartContractService.deleteContract;case h.TransactionBody.DataCase.CRYPTOADDLIVEHASH:return r.CryptoService.addLiveHash;case h.TransactionBody.DataCase.CRYPTOCREATEACCOUNT:return r.CryptoService.createAccount;case h.TransactionBody.DataCase.CRYPTODELETE:return r.CryptoService.cryptoDelete;case h.TransactionBody.DataCase.CRYPTODELETELIVEHASH:return r.CryptoService.deleteLiveHash;case h.TransactionBody.DataCase.CRYPTOTRANSFER:return r.CryptoService.cryptoTransfer;case h.TransactionBody.DataCase.CRYPTOUPDATEACCOUNT:return r.CryptoService.updateAccount;case h.TransactionBody.DataCase.FILEAPPEND:return T.FileService.appendContent;case h.TransactionBody.DataCase.FILECREATE:return T.FileService.createFile;case h.TransactionBody.DataCase.FILEDELETE:return T.FileService.deleteFile;case h.TransactionBody.DataCase.FILEUPDATE:return T.FileService.updateFile;case h.TransactionBody.DataCase.SYSTEMDELETE:return y.SmartContractService.systemDelete;case h.TransactionBody.DataCase.SYSTEMUNDELETE:return y.SmartContractService.systemUndelete;case h.TransactionBody.DataCase.FREEZE:return m.FreezeService.freeze;case h.TransactionBody.DataCase.CONSENSUSCREATETOPIC:return C.ConsensusService.createTopic;case h.TransactionBody.DataCase.CONSENSUSUPDATETOPIC:return C.ConsensusService.updateTopic;case h.TransactionBody.DataCase.CONSENSUSDELETETOPIC:return C.ConsensusService.deleteTopic;case h.TransactionBody.DataCase.CONSENSUSSUBMITMESSAGE:return C.ConsensusService.submitMessage;case h.TransactionBody.DataCase.SCHEDULECREATE:return g.ScheduleService.createSchedule;case h.TransactionBody.DataCase.SCHEDULEDELETE:return g.ScheduleService.deleteSchedule;case h.TransactionBody.DataCase.SCHEDULESIGN:return g.ScheduleService.signSchedule;case h.TransactionBody.DataCase.DATA_NOT_SET:throw new Error("transaction body missing");default:throw new Error(`unsupported body case:${K.getDataCase().toString()}`)}}},66498:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(S,E,k,R){function W(O){return O instanceof k?O:new k(function(N){N(O)})}return new(k||(k=Promise))(function(O,N){function j(z){try{K(R.next(z))}catch(Y){N(Y)}}function _(z){try{K(R.throw(z))}catch(Y){N(Y)}}function K(z){z.done?O(z.value):W(z.value).then(j,_)}K((R=R.apply(S,E||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.SingleTransactionBuilder=n.TransactionBuilder=void 0;const i=u(66774),B=u(24231),h=u(34518),p=u(30107),l=u(79643),s=u(90335),r=u(49132),g=u(24067),y=u(34977),T=u(44431),m=120;class F{constructor(){this._shouldSetFee=!0,this._inner=new i.TransactionBody,this._inner.setTransactionvalidduration(B.newDuration(120))}setTransactionId(E){return this._inner.setTransactionid((E instanceof r.TransactionId?E:new r.TransactionId(E))._toProto()),this}setTransactionValidDuration(E){return this._inner.setTransactionvalidduration(B.newDuration(Math.min(E,m))),this}setMaxTransactionFee(E){const k=l.hbarFromTinybarOrHbar(E);return k[l.hbarCheck]({allowNegative:!1}),this._inner.setTransactionfee(k[l.hbarToProto]()),this}setNodeAccountId(E){return this._node=new s.AccountId(E),this._inner.setNodeaccountid(this._node._toProto()),this}setTransactionMemo(E){return this._inner.setMemo(E),this}setGenerateRecord(E){return this._inner.setGeneraterecord(E),this}validate(){B.runValidation(this,E=>{this._inner.hasTransactionid()||E.push("missing ID for transaction"),this._inner.getMemo().length*2>100&&E.push("memo may not be longer than 100 bytes"),this._doValidate(E)})}}n.TransactionBuilder=F;class C extends F{getCost(E){return t(this,void 0,void 0,function*(){const k=this._inner.getTransactionfee();try{this._inner.setTransactionfee("0"),this._shouldSetFee=!1;const R=this.build(E),W=yield R[h.transactionCall](E),O=g.Status._fromCode(W.getNodetransactionprecheckcode());if(O===g.Status.InsufficientTxFee){let N=new T.default(W.getCost());return N=N.multipliedBy(1.01).decimalPlaces(0),l.Hbar.fromTinybar(N)}y.HederaPrecheckStatusError._throwIfError(O.code,R.id)}finally{this._shouldSetFee=!0,this._inner.setTransactionfee(k),this._inner.clearTransactionid(),this._inner.clearTransactionvalidduration()}return new l.Hbar(0)})}build(E){if(E&&this._shouldSetFee&&this._inner.getTransactionfee()==="0"&&this._inner.setTransactionfee(E._maxTransactionFee[l.hbarToProto]()),E&&!this._inner.hasTransactionid()&&E._getOperatorAccountId()){const R=new r.TransactionId(E._getOperatorAccountId());this._inner.setTransactionid(R._toProto())}if(this._inner.hasTransactionvalidduration()||this.setTransactionValidDuration(m),!this._node&&!E)throw new Error("`setNodeAccountId` must be called if client is not supplied");this._node||(this._node=E._randomNode().id),this._node&&!this._inner.hasNodeaccountid()&&this.setNodeAccountId(this._node),this.validate();const k=new p.Transaction;return k.setBodybytes(this._inner.serializeBinary()),h.Transaction[h.transactionCreate](this._node,k,this._inner,this._method)}execute(E){return this.build(E).execute(E)}get _method(){throw new Error("Method not implemented.")}_doValidate(E){throw new Error("Method not implemented.")}}n.SingleTransactionBuilder=C},49132:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionId=void 0;const t=u(90335),i=u(33276),B=u(24231),h=u(25867),p=u(13660),l=u(22173),s=u(44431);class r{constructor(C){if(!C.validStart&&!C.validStartSeconds){this.accountId=new t.AccountId(C);const{seconds:S,nanos:E}=y();this.validStart=new l.Time(S,E)}else{const S=C;if(S instanceof r)this.accountId=S.accountId,this.validStart=new l.Time(S.validStart.seconds,S.validStart.nanos);else if(this.accountId=new t.AccountId(S.account),"validStart"in S){const{seconds:E,nanos:k}=p.dateToTimestamp(S.validStart);this.validStart=new l.Time(E,k)}else this.validStart=new l.Time(S.validStartSeconds,S.validStartNanos)}}static withValidStart(C,S){return new r({account:C,validStartSeconds:S.seconds,validStartNanos:S.nanos})}static fromString(C){const[S,E]=C.split("@"),[k,R]=E.split(".");return new r({account:new t.AccountId(S),validStartSeconds:Number(k),validStartNanos:Number(R)})}toString(){return`${this.accountId.toString()}@${this.validStart.seconds}.${this.validStart.nanos}`}getReceipt(C){return new Promise((S,E)=>{E(new Error("(BUG) `TransactionId.getReceipt()` declared, but not overwritten."))})}getRecord(C){return new Promise((S,E)=>{E(new Error("(BUG) `TransactionId.getRecord()` declared, but not overwritten."))})}static _fromProto(C){const S=B.orThrow(C.getTransactionvalidstart()).getSeconds(),E=B.orThrow(C.getTransactionvalidstart()).getNanos();return new r({account:t.AccountId._fromProto(B.orThrow(C.getAccountid())),validStartSeconds:new s.default(S).toNumber(),validStartNanos:E})}_toProto(){const C=new i.TransactionID;C.setAccountid(this.accountId._toProto());const S=new h.Timestamp;return S.setSeconds(this.validStart.seconds.toString()),S.setNanos(this.validStart.nanos),C.setTransactionvalidstart(S),C}}n.TransactionId=r;let g;function y(){const F=p.dateToTimestamp(Date.now()-1e4);return g=g!=null&&m(F,g)?T(g,1):F,g}function T(F,C){return{seconds:F.seconds,nanos:F.nanos+C}}function m(F,C){return F.seconds<C.seconds?!0:F.seconds===C.seconds&&F.nanos<=C.nanos}},96761:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionReceipt=void 0;const t=u(90335),i=u(2505),B=u(30672),h=u(41331),p=u(16206),l=u(90184),s=u(67427),r=u(24067),g=u(49132),y=u(44431);class T{constructor(F,C,S,E,k,R,W,O,N,j,_,K){this.status=F,this._accountId=C,this._fileId=S,this._contractId=E,this._topicId=k,this._tokenId=R,this._scheduleId=W,this._exchangeRateSet=O,this._topicSequenceNumber=N,this._topicRunningHash=j,this._scheduledTransactionId=_,this._serials=K}get accountId(){return console.warn("`TransactionReceipt.accountId` is deprecrated. Use `TransactionReceipt.getAccountId()` instead."),this.getAccountId()}getAccountId(){if(this._accountId==null)throw new Error("receipt does not contain an account ID");return this._accountId}get fileId(){return console.warn("`TransactionReceipt.fileId` is deprecrated. Use `TransactionReceipt.getfileId()` instead."),this.getFileId()}getFileId(){if(this._fileId==null)throw new Error("receipt does not contain a file ID");return this._fileId}get contractId(){return console.warn("`TransactionReceipt.contractId` is deprecrated. Use `TransactionReceipt.getcontractId()` instead."),this.getContractId()}getContractId(){if(this._contractId==null)throw new Error("receipt does not contain a contract ID");return this._contractId}getConsensusTopicId(){if(this._topicId==null)throw new Error("receipt does not contain a topic ID");return this._topicId}getTopicId(){return console.warn("`TransactionReceipt.getTopicId()` is deprecrated. Use `TransactionReceipt.getConsensusTopicId()` instead."),this.getConsensusTopicId()}getTokenId(){if(this._tokenId==null)throw new Error("receipt does not contain a token ID");return this._tokenId}getScheduleId(){if(this._scheduleId==null)throw new Error("receipt does not contain a schedule ID");return this._scheduleId}getConsensusTopicRunningHash(){if(this._topicRunningHash.byteLength===0)throw new Error("receipt was not for a consensus topic transaction");return this._topicRunningHash}getConsensusTopicSequenceNumber(){if(this._topicSequenceNumber===0)throw new Error("receipt was not for a consensus topic transaction");return this._topicSequenceNumber}getScheduledTransactionId(){return this._scheduledTransactionId}getSerials(){return this._serials}toJSON(){var F,C,S,E;return{status:this.status.toString(),accountId:(F=this._accountId)===null||F===void 0?void 0:F.toString(),fileId:(C=this._fileId)===null||C===void 0?void 0:C.toString(),contractId:(S=this._contractId)===null||S===void 0?void 0:S.toString(),consensusTopicId:(E=this._topicId)===null||E===void 0?void 0:E.toString(),consensusTopicRunningHash:this._topicRunningHash.byteLength===0?void 0:this._topicRunningHash.toString(),consensusTopicSequenceNumber:this._topicSequenceNumber===0?void 0:this._topicSequenceNumber,scheduledTransactionId:this._scheduledTransactionId!=null?this._scheduledTransactionId:void 0,serials:this._serials!=null&&this._serials.length!==0?this._serials.map(k=>k.toString()):void 0}}toString(){return JSON.stringify(this.toJSON(),null,2)}static _fromProto(F){return new T(r.Status._fromCode(F.getStatus()),F.hasAccountid()?t.AccountId._fromProto(F.getAccountid()):null,F.hasFileid()?h.FileId._fromProto(F.getFileid()):null,F.hasContractid()?B.ContractId._fromProto(F.getContractid()):null,F.hasTopicid()?i.ConsensusTopicId._fromProto(F.getTopicid()):null,F.hasTokenid()?p.TokenId._fromProto(F.getTokenid()):null,F.hasScheduleid()?l.ScheduleId._fromProto(F.getScheduleid()):null,F.hasExchangerate()?s.exchangeRateSetToSdk(F.getExchangerate()):null,new y.default(F.getTopicsequencenumber()).toNumber(),F.getTopicrunninghash_asU8(),F.hasScheduledtransactionid()?g.TransactionId._fromProto(F.getScheduledtransactionid()):null,F.getSerialnumbersList().map(C=>new y.default(C)))}}n.TransactionReceipt=T},52189:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(T,m,F,C){function S(E){return E instanceof F?E:new F(function(k){k(E)})}return new(F||(F=Promise))(function(E,k){function R(N){try{O(C.next(N))}catch(j){k(j)}}function W(N){try{O(C.throw(N))}catch(j){k(j)}}function O(N){N.done?E(N.value):S(N.value).then(R,W)}O((C=C.apply(T,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionReceiptQuery=void 0;const i=u(2820),B=u(39512),h=u(96666),p=u(49132),l=u(96761),s=u(78436),r=u(24067),g=u(68061);class y extends i.QueryBuilder{constructor(){super(),this._builder=new B.TransactionGetReceiptQuery,this._builder.setHeader(new h.QueryHeader),this._inner.setTransactiongetreceipt(this._builder)}setTransactionId(m){return this._builder.setTransactionid(new p.TransactionId(m)._toProto()),this}_doLocalValidate(m){this._builder.hasTransactionid()||m.push("`.setTransactionId()` required")}_getMethod(){return s.CryptoService.getTransactionReceipts}_shouldRetry(m,F){var C;if(super._shouldRetry(m,F)||[r.Status.Busy.code,r.Status.Unknown.code,r.Status.ReceiptNotFound.code].includes(m.code))return!0;const S=(C=F.getTransactiongetreceipt())===null||C===void 0?void 0:C.getReceipt(),E=S==null?null:r.Status._fromCode(S.getStatus());return!!(E!=null&&[r.Status.Ok.code,r.Status.Busy.code,r.Status.Unknown.code,r.Status.ReceiptNotFound.code].includes(E.code))}_getDefaultExecuteTimeout(){return 12e4}_isPaymentRequired(){return!1}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(m){return m.getTransactiongetreceipt().getHeader()}_mapResponse(m){const F=m.getTransactiongetreceipt();return l.TransactionReceipt._fromProto(F.getReceipt())}}n.TransactionReceiptQuery=y,p.TransactionId.prototype.getReceipt=function(T){return t(this,void 0,void 0,function*(){const m=yield new y().setTransactionId(this).execute(T);return g.HederaReceiptStatusError._throwIfError(m.status.code,m,this),m})}},52317:function(o,n,u){"use strict";var t,i;Object.defineProperty(n,"__esModule",{value:!0}),n.transferListToSdk=n.TransactionRecord=n.TokenNftTransferMap=n.TokenNftTransfer=n.TokenTransfersMap=n.AccountTokenTransfersMap=void 0;const B=u(96761),h=u(70180),p=u(49132),l=u(22173),s=u(79643),r=u(16206),g=u(90335),y=u(12987),T=u(44431),m=u(90184),F=u(58341),C=Symbol("callResult"),S=Symbol("callResultIsCreate");class E{constructor(_){this._transfers=new Map;for(const K of _){const z=g.AccountId._fromProto(K.getAccountid()).toString();let Y=this._transfers.get(z);Y==null&&(Y=[],this._transfers.set(z,Y)),Y.push(new T.default(K.getAmount()))}}get(_){const K=new g.AccountId(_).toString();return this._transfers.get(K)}values(){return this._transfers.values()}keys(){const _=[];for(const K of this._transfers.keys())_.push(g.AccountId.fromString(K));return _[Symbol.iterator]()}[Symbol.iterator](){const _=new Map;for(const[K,z]of this._transfers)_.set(g.AccountId.fromString(K),z);return _[Symbol.iterator]()}}n.AccountTokenTransfersMap=E;class k{constructor(_){this._transfers=new Map;for(const K of _){const z=r.TokenId._fromProto(K.getToken());this._transfers.set(z.toString(),new E(K.getTransfersList()))}}get(_){const K=new r.TokenId(_).toString();return this._transfers.get(K)}values(){return this._transfers.values()}keys(){const _=[];for(const K of this._transfers.keys())_.push(r.TokenId.fromString(K));return _[Symbol.iterator]()}[Symbol.iterator](){const _=new Map;for(const[K,z]of this._transfers)_.set(r.TokenId.fromString(K),z);return _[Symbol.iterator]()}}n.TokenTransfersMap=k;class R{constructor(_){this.sender=_.hasSenderaccountid()?g.AccountId._fromProto(_.getSenderaccountid()):null,this.recipient=_.hasReceiveraccountid()?g.AccountId._fromProto(_.getReceiveraccountid()):null,this.serial=new T.default(_.getSerialnumber())}}n.TokenNftTransfer=R;class W{constructor(_){this._transfers=new Map;for(const K of _){const z=r.TokenId._fromProto(K.getToken()),Y=[];for(const M of K.getNfttransfersList())Y.push(new R(M));this._transfers.set(z.toString(),Y)}}get(_){const K=new r.TokenId(_).toString();return this._transfers.get(K)}values(){return this._transfers.values()}keys(){const _=[];for(const K of this._transfers.keys())_.push(r.TokenId.fromString(K));return _[Symbol.iterator]()}[Symbol.iterator](){const _=new Map;for(const[K,z]of this._transfers)_.set(r.TokenId.fromString(K),z);return _[Symbol.iterator]()}}n.TokenNftTransferMap=W;class O{constructor(_){this[t]=null,this[i]=!1,this.receipt=B.TransactionReceipt._fromProto(_.getReceipt()),this.transactionHash=_.getTransactionhash_asU8(),this.consensusTimestamp=l.Time._fromProto(_.getConsensustimestamp()),this.transactionId=p.TransactionId._fromProto(_.getTransactionid()),this.transactionMemo=_.getMemo(),this.transactionFee=s.Hbar.fromTinybar(_.getTransactionfee()),this.transfers=N(_.getTransferlist()),_.hasContractcallresult()?(this[C]=new h.ContractFunctionResult(_.getContractcallresult()),this[S]=!0):_.hasContractcreateresult()&&(this[C]=new h.ContractFunctionResult(_.getContractcreateresult())),this.tokenTransfers=new k(_.getTokentransferlistsList()),this.scheduleRef=_.hasScheduleref()?m.ScheduleId._fromProto(_.getScheduleref()):null,this.assessedCustomFees=_.getAssessedCustomFeesList().map(K=>new F.AssessedCustomFee(K)),this.nftTransfers=new W(_.getTokentransferlistsList())}static _fromProto(_){return new O(_)}getContractCreateResult(){if(this[C]==null||this[S])throw new Error("record does not contain a contract create result");return this[C]}getContractExecuteResult(){if(this[C]==null||!this[S])throw new Error("record does not contain a contract execute result");return this[C]}}n.TransactionRecord=O,t=C,i=S;function N(j){return j.getAccountamountsList().map(y.transferFromProto)}n.transferListToSdk=N},82803:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(m,F,C,S){function E(k){return k instanceof C?k:new C(function(R){R(k)})}return new(C||(C=Promise))(function(k,R){function W(j){try{N(S.next(j))}catch(_){R(_)}}function O(j){try{N(S.throw(j))}catch(_){R(_)}}function N(j){j.done?k(j.value):E(j.value).then(W,O)}N((S=S.apply(m,F||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionRecordQuery=void 0;const i=u(2820),B=u(22075),h=u(96666),p=u(49132),l=u(78436),s=u(52317),r=u(22628),g=u(68061),y=u(54105);class T extends i.QueryBuilder{constructor(){super(),this._builder=new B.TransactionGetRecordQuery,this._builder.setHeader(new h.QueryHeader),this._inner.setTransactiongetrecord(this._builder)}setTransactionId(F){return this._builder.setTransactionid(new p.TransactionId(F)._toProto()),this}_doLocalValidate(F){this._builder.hasTransactionid()||F.push("`.setTransactionId()` required")}_getHeader(){return this._builder.getHeader()}_getMethod(){return l.CryptoService.getTxRecordByTxID}_mapResponseHeader(F){const C=F.getTransactiongetrecord().getHeader();return C==null?new r.ResponseHeader:C}_mapResponse(F){const C=F.getTransactiongetrecord();return s.TransactionRecord._fromProto(C.getTransactionrecord())}}n.TransactionRecordQuery=T,p.TransactionId.prototype.getRecord=function(m){return t(this,void 0,void 0,function*(){try{yield this.getReceipt(m)}catch(C){if(!(C instanceof g.HederaReceiptStatusError))throw C}const F=yield new T().setTransactionId(this).execute(m);return y.HederaRecordStatusError._throwIfError(F.receipt.status.code,F,this),F})}},12987:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transferFromProto=void 0;const t=u(90335),i=u(79643);function B(h){return{accountId:t.AccountId._fromProto(h.getAccountid()),amount:i.Hbar.fromTinybar(h.getAmount())}}n.transferFromProto=B},13221:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountBalanceQuery=void 0;const t=u(2820),i=u(78436),B=u(96666),h=u(79643),p=u(90335),l=u(34697);class s extends t.QueryBuilder{constructor(){super(),this._builder=new l.CryptoGetAccountBalanceQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setCryptogetaccountbalance(this._builder)}setAccountId(g){return this._builder.setAccountid(new p.AccountId(g)._toProto()),this}_doLocalValidate(g){this._builder.hasAccountid()||g.push("`.setAccountId()` required")}_getMethod(){return i.CryptoService.cryptoGetBalance}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(g){return g.getCryptogetaccountbalance().getHeader()}_mapResponse(g){const y=g.getCryptogetaccountbalance();return h.Hbar.fromTinybar(y.getBalance())}_isPaymentRequired(){return!1}}n.AccountBalanceQuery=s},8888:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountCreateTransaction=void 0;const t=u(66498),i=u(273),B=u(24231),h=u(78436),p=u(79643),l=u(44431),s=u(90335);class r extends t.SingleTransactionBuilder{constructor(){super();const y=new i.CryptoCreateTransactionBody;this._body=y,this._inner.setCryptocreateaccount(y),this.setAutoRenewPeriod(789e4),this.setReceiveRecordThreshold(p.Hbar.MAX),this.setSendRecordThreshold(p.Hbar.MAX)}setKey(y){return this._body.setKey(y._toProtoKey()),this}setAutoRenewPeriod(y){return this._body.setAutorenewperiod(B.newDuration(y)),this}setInitialBalance(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setInitialbalance(T[p.hbarToProto]()),this}setReceiveRecordThreshold(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setReceiverecordthreshold(T[p.hbarToProto]()),this}setSendRecordThreshold(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setSendrecordthreshold(T[p.hbarToProto]()),this}setReceiverSignatureRequired(y){return this._body.setReceiversigrequired(y),this}setProxyAccountId(y){return this._body.setProxyaccountid(new s.AccountId(y)._toProto()),this}get _method(){return h.CryptoService.createAccount}_doValidate(y){this._body.hasKey()||y.push("AccountCreateTransaction requires .setKey()"),new l.default(this._body.getInitialbalance()).isNegative()&&y.push("AccountCreateTransaction must have a positive setInitialBalance")}}n.AccountCreateTransaction=r},28535:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountDeleteTransaction=void 0;const t=u(66498),i=u(78436),B=u(8579),h=u(90335);class p extends t.SingleTransactionBuilder{constructor(){super();const s=new B.CryptoDeleteTransactionBody;this._body=s,this._inner.setCryptodelete(s)}setDeleteAccountId(s){return this._body.setDeleteaccountid(new h.AccountId(s)._toProto()),this}setTransferAccountId(s){return this._body.setTransferaccountid(new h.AccountId(s)._toProto()),this}get _method(){return i.CryptoService.cryptoDelete}_doValidate(s){this._body.hasDeleteaccountid()||s.push("AccountDeleteTransaction requires .setAccountid()")}}n.AccountDeleteTransaction=p},90335:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountId=void 0;const t=u(33276),i=u(24231),B=u(44431),h=u(52978);class p{constructor(s,r,g){if(typeof s=="number"&&r!=null&&g!=null)this.shard=s,this.realm=r,this.account=g;else{const y=s,T=y instanceof p?y:i.normalizeEntityId("account",y);this.shard=T.shard,this.realm=T.realm,this.account=T.account}}static fromString(s){return new p(s)}static _fromProto(s){return new p({shard:new B.default(s.getShardnum()).toNumber(),realm:new B.default(s.getRealmnum()).toNumber(),account:new B.default(s.getAccountnum()).toNumber()})}toString(){return`${this.shard}.${this.realm}.${this.account}`}static fromSolidityAddress(s){if(s.length!==40)throw new Error(`Invalid hex encoded solidity address length:
|
|
2
2
|
expected length 40, got length ${s.length}`);const r=new B.default(s.slice(0,8),16).toNumber(),g=new B.default(s.slice(8,24),16).toNumber(),y=new B.default(s.slice(24,40),16).toNumber();return new p(r,g,y)}toSolidityAddress(){const s=new Uint8Array(20),r=new DataView(s.buffer,0,20);return r.setUint32(0,this.shard),r.setUint32(8,this.realm),r.setUint32(16,this.account),h.encode(s,!0)}_toProto(){const s=new t.AccountID;return s.setShardnum(this.shard.toString()),s.setRealmnum(this.realm.toString()),s.setAccountnum(this.account.toString()),s}}n.AccountId=p},8205:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(C,S,E,k){function R(W){return W instanceof E?W:new E(function(O){O(W)})}return new(E||(E=Promise))(function(W,O){function N(K){try{_(k.next(K))}catch(z){O(z)}}function j(K){try{_(k.throw(K))}catch(z){O(z)}}function _(K){K.done?W(K.value):R(K.value).then(N,j)}_((k=k.apply(C,S||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountInfoQuery=n.TokenRelationshipMap=void 0;const i=u(2820),B=u(64355),h=u(78436),p=u(96666),l=u(79643),s=u(90335),r=u(13660),g=u(8200),y=u(16206),T=u(44431);class m{constructor(S){this._relationships=new Map;for(const E of S){const k=y.TokenId._fromProto(E.getTokenid()),R=E.getKycstatus(),W=E.getFreezestatus();this._relationships.set(k.toString(),{tokenId:k,symbol:E.getSymbol(),balance:new T.default(E.getBalance()),kycStatus:R===0?null:R===1,freezeStatus:W===0?null:W===1})}}get(S){const E=new y.TokenId(S).toString();return this._relationships.get(E)}values(){return this._relationships.values()}keys(){const S=[];for(const E of this._relationships.keys())S.push(y.TokenId.fromString(E));return S[Symbol.iterator]()}[Symbol.iterator](){const S=new Map;for(const[E,k]of this._relationships)S.set(y.TokenId.fromString(E),k);return S[Symbol.iterator]()}}n.TokenRelationshipMap=m;class F extends i.QueryBuilder{constructor(){super(),this._builder=new B.CryptoGetInfoQuery,this._builder.setHeader(new p.QueryHeader),this._inner.setCryptogetinfo(this._builder)}setAccountId(S){return this._builder.setAccountid(new s.AccountId(S)._toProto()),this}getCost(S){const E=Object.create(null,{getCost:{get:()=>super.getCost}});return t(this,void 0,void 0,function*(){const k=l.Hbar.fromTinybar(25),R=yield E.getCost.call(this,S);return R.isGreaterThan(k)?R:k})}_doLocalValidate(S){this._builder.hasAccountid()||S.push("`.setAccountId()` required")}_getMethod(){return h.CryptoService.getAccountInfo}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(S){return S.getCryptogetinfo().getHeader()}_mapResponse(S){const E=S.getCryptogetinfo().getAccountinfo(),k=l.Hbar.fromTinybar(E.getGeneratesendrecordthreshold()),R=l.Hbar.fromTinybar(E.getGeneratereceiverecordthreshold());return{accountId:s.AccountId._fromProto(E.getAccountid()),contractAccountId:E.getContractaccountid(),isDeleted:E.getDeleted(),key:g._fromProtoKey(E.getKey()),balance:l.Hbar.fromTinybar(E.getBalance()),generateSendRecordThreshold:k,generateReceiveRecordThreshold:R,isReceiverSignatureRequired:E.getReceiversigrequired(),expirationTime:new Date(r.timestampToMs(E.getExpirationtime())),autoRenewPeriod:new T.default(E.getAutorenewperiod().getSeconds()).toNumber(),proxyAccountId:E.hasProxyaccountid()?s.AccountId._fromProto(E.getProxyaccountid()):null,proxyReceived:l.Hbar.fromTinybar(E.getProxyreceived()),tokenRelationships:new m(E.getTokenrelationshipsList()),ownedNfts:new T.default(E.getOwnednfts())}}}n.AccountInfoQuery=F},21093:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountRecordsQuery=void 0;const t=u(2820),i=u(78436),B=u(96666),h=u(90335),p=u(87847),l=u(52317);class s extends t.QueryBuilder{constructor(){super(),this._builder=new p.CryptoGetAccountRecordsQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setCryptogetaccountrecords(this._builder)}setAccountId(g){return this._builder.setAccountid(new h.AccountId(g)._toProto()),this}_doLocalValidate(g){this._builder.hasAccountid()||g.push("`.setAccountId()` required")}_getMethod(){return i.CryptoService.getAccountRecords}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(g){return g.getCryptogetaccountrecords().getHeader()}_mapResponse(g){return g.getCryptogetaccountrecords().getRecordsList().map(l.TransactionRecord._fromProto)}}n.AccountRecordsQuery=s},13855:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountStakersQuery=void 0;const t=u(2820),i=u(78436),B=u(96666),h=u(90335),p=u(99089),l=u(79643);class s extends t.QueryBuilder{constructor(){super(),this._builder=new p.CryptoGetStakersQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setCryptogetproxystakers(this._builder)}setAccountId(g){return this._builder.setAccountid(new h.AccountId(g)._toProto()),this}_doLocalValidate(g){this._builder.hasAccountid()||g.push("`.setAccountId()` required")}_getMethod(){return i.CryptoService.getStakersByAccountID}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(g){return g.getCryptogetproxystakers().getHeader()}_mapResponse(g){return g.getCryptogetproxystakers().getStakers().getProxystakerList().map(T=>({accountId:h.AccountId._fromProto(T.getAccountid()),amount:l.Hbar.fromTinybar(T.getAmount())}))}}n.AccountStakersQuery=s},43366:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AccountUpdateTransaction=void 0;const t=u(66498),i=u(99763),B=u(24231),h=u(78436),p=u(79643),l=u(90335),s=u(13660),r=u(99469);class g extends t.SingleTransactionBuilder{constructor(){super();const T=new i.CryptoUpdateTransactionBody;this._body=T,this._inner.setCryptoupdateaccount(T)}setAccountId(T){return this._body.setAccountidtoupdate(new l.AccountId(T)._toProto()),this}setKey(T){return this._body.setKey(T._toProtoKey()),this}setExpirationTime(T){return this._body.setExpirationtime(s.timestampToProto(s.dateToTimestamp(T))),this}setAutoRenewPeriod(T){return this._body.setAutorenewperiod(B.newDuration(T)),this}setProxyAccountId(T){return this._body.setProxyaccountid(T._toProto()),this}setPorxyAccount(T){return console.warn("deprecated: `.setPorxyAccount` was renamed to `.setProxyAccountId`"),this.setProxyAccountId(T)}setReceiverSignatureRequired(T){const m=new r.BoolValue;return m.setValue(T),this._body.setReceiversigrequiredwrapper(m),this}setReceiveRecordThreshold(T){const m=p.hbarFromTinybarOrHbar(T);return m[p.hbarCheck]({allowNegative:!1}),this._body.setReceiverecordthresholdwrapper(m[p.hbarToProtoValue]()),this}setSendRecordThreshold(T){const m=p.hbarFromTinybarOrHbar(T);return m[p.hbarCheck]({allowNegative:!1}),this._body.setSendrecordthresholdwrapper(m[p.hbarToProtoValue]()),this}get _method(){return h.CryptoService.updateAccount}_doValidate(T){this._body.hasAccountidtoupdate()||T.push("AccountUpdateTransaction requires .setAccountId()")}}n.AccountUpdateTransaction=g},33620:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CryptoTransferTransaction=void 0;const t=u(66498),i=u(682),B=u(44431),h=u(78436),p=u(33276),l=u(79643),s=u(90335);class r extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.CryptoTransferTransactionBody,this._body.setTransfers(new p.TransferList),this._inner.setCryptotransfer(this._body),console.warn("Use `TransferTransaction` instead")}addSender(y,T){const m=l.hbarFromTinybarOrHbar(T);return m[l.hbarCheck]({allowNegative:!1}),this.addTransfer(y,m.negated())}addRecipient(y,T){return l.hbarFromTinybarOrHbar(T)[l.hbarCheck]({allowNegative:!1}),this.addTransfer(y,T)}addTransfer(y,T){const m=l.hbarFromTinybarOrHbar(T);m[l.hbarCheck]({allowNegative:!0});const F=this._body.getTransfers()||new p.TransferList;this._body.setTransfers(F);const C=new p.AccountAmount;return C.setAccountid(new s.AccountId(y)._toProto()),C.setAmount(m[l.hbarToProto]()),F.addAccountamounts(C),this}_doValidate(y){const T=this._body.getTransfers().getAccountamountsList();if(T.length===0){y.push("CryptoTransferTransaction must have at least one transfer");return}const m=T.reduce((F,C)=>F.plus(C.getAmount()),new B.default(0));m.isZero()||y.push(`CryptoTransferTransaction must have zero sum; got: ${m}`)}get _method(){return h.CryptoService.cryptoTransfer}}n.CryptoTransferTransaction=r},12476:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransferTransaction=void 0;const t=u(66498),i=u(682),B=u(78436),h=u(33276),p=u(16206),l=u(79643),s=u(90335),r=u(44431);class g extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.CryptoTransferTransactionBody,this._tokenIdIndexes=new Map,this._body.setTokentransfersList([]),this._body.setTransfers(new h.TransferList),this._inner.setCryptotransfer(this._body)}addHbarTransfer(T,m){const F=l.hbarFromTinybarOrHbar(m);F[l.hbarCheck]({allowNegative:!0});const C=this._body.getTransfers()||new h.TransferList;this._body.setTransfers(C);const S=new h.AccountAmount;return S.setAccountid(new s.AccountId(T)._toProto()),S.setAmount(F[l.hbarToProto]()),C.addAccountamounts(S),this}addTokenTransfer(T,m,F){const C=this._tokenIdIndexes.get(new p.TokenId(T).toString()),S=new p.TokenId(T);C==null&&this._tokenIdIndexes.set(S.toString(),this._body.getTokentransfersList().length);let E;C!=null?E=this._body.getTokentransfersList()[C]:(E=new h.TokenTransferList,this._body.addTokentransfers(E)),E.setToken(S._toProto());const k=E.getTransfersList(),R=new h.AccountAmount;return R.setAccountid(new s.AccountId(m)._toProto()),R.setAmount(F instanceof r.default?F.toString(10):new r.default(F).toString(10)),k.push(R),this}addNftTransfer(T,m,F){const C=this._tokenIdIndexes.get(new p.TokenId(T.tokenId).toString()),S=new p.TokenId(T.tokenId);C==null&&this._tokenIdIndexes.set(S.toString(),this._body.getTokentransfersList().length);let E;C!=null?E=this._body.getTokentransfersList()[C]:(E=new h.TokenTransferList,this._body.addTokentransfers(E)),E.setToken(S._toProto());const k=E.getNfttransfersList(),R=new h.NftTransfer;return R.setSerialnumber(T.serial.toString()),R.setSenderaccountid(m._toProto()),R.setReceiveraccountid(F._toProto()),k.push(R),this}_doValidate(T){}get _method(){return B.CryptoService.cryptoTransfer}}n.TransferTransaction=g},43482:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(g,y,T,m){function F(C){return C instanceof T?C:new T(function(S){S(C)})}return new(T||(T=Promise))(function(C,S){function E(W){try{R(m.next(W))}catch(O){S(O)}}function k(W){try{R(m.throw(W))}catch(O){S(O)}}function R(W){W.done?C(W.value):F(W.value).then(E,k)}R((m=m.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusMessageSubmitTransaction=void 0;const i=u(66498),B=u(32234),h=u(92504),p=u(2505),l=u(56249),s=u(49132);class r extends i.TransactionBuilder{constructor(){super(),this._maxChunks=20,this.topicId=null,this.message=null,this.chunkInfo=null}setTopicId(y){return this.topicId=new p.ConsensusTopicId(y),this}setMessage(y){return this.message=y instanceof Uint8Array?y:l.encode(y),this}setMaxChunks(y){return this._maxChunks=y,this}setChunkInfo(y,T,m){return this.chunkInfo={id:y,total:T,number:m},this}build(y){if(this.message.length/r.chunkSize>this._maxChunks)throw new Error(`Message with size ${this.message.length} too long for ${this._maxChunks} chunks`);const T=this._inner.getTransactionid()==null?new s.TransactionId(y._getOperatorAccountId()):s.TransactionId._fromProto(this._inner.getTransactionid());let m=T.validStart;if(this.chunkInfo!=null)return[new B.SingleConsensusMessageSubmitTransaction().setTopicId(this.topicId).setMessage(this.message).setChunkInfo(this.chunkInfo).build(y)];const F=[];for(let C=0;C<this.message.length;C+=r.chunkSize)F.push(this.message.slice(C,C+r.chunkSize));return F.map((C,S)=>{const E=new B.SingleConsensusMessageSubmitTransaction().setTopicId(this.topicId).setMessage(C).setChunkInfo({id:T,total:F.length,number:S+1}).setTransactionId(s.TransactionId.withValidStart(T.accountId,m)).build(y);return m=m._increment(),E})}getCost(){return t(this,void 0,void 0,function*(){throw new Error("Cannot get cost of a transaction list")})}execute(y){return t(this,void 0,void 0,function*(){return(yield this.executeAll(y))[0]})}executeAll(y){return Promise.all(this.build(y).map(T=>T.execute(y)))}get _method(){return h.ConsensusService.submitMessage}_doValidate(y){}}n.ConsensusMessageSubmitTransaction=r,r.chunkSize=1024},53349:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusSubmitMessageTransaction=void 0;const t=u(66498),i=u(17878),B=u(92504),h=u(2505),p=u(56249);class l extends t.SingleTransactionBuilder{constructor(){super(),console.warn("deprecated: ConsensusSubmitMessageTransaction has been renamed to ConsensusMessageSubmitTransaction");const r=new i.ConsensusSubmitMessageTransactionBody;this._body=r,this._inner.setConsensussubmitmessage(r)}setTopicId(r){return this._body.setTopicid(new h.ConsensusTopicId(r)._toProto()),this}setMessage(r){return r instanceof Uint8Array?this._body.setMessage(r):this._body.setMessage(p.encode(r)),this}get _method(){return B.ConsensusService.submitMessage}_doValidate(r){}}n.ConsensusSubmitMessageTransaction=l},6263:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusTopicCreateTransaction=void 0;const t=u(66498),i=u(7794),B=u(92504),h=u(24231),p=u(90335);class l extends t.SingleTransactionBuilder{constructor(){super();const r=new i.ConsensusCreateTopicTransactionBody;this._body=r,this._inner.setConsensuscreatetopic(r),this.setAutoRenewPeriod(789e4)}setAdminKey(r){return this._body.setAdminkey(r._toProtoKey()),this}setAutoRenewAccount(r){return console.warn("`ConsensusTopicCreateTransaction.setAutoRenewAccount()` is deprecateduse `ConsensusTopicCreateTransaction.setAutoRenewAccountId()` instead."),this.setAutoRenewAccountId(r)}setAutoRenewAccountId(r){return this._body.setAutorenewaccount(new p.AccountId(r)._toProto()),this}setAutoRenewPeriod(r){return this._body.setAutorenewperiod(h.newDuration(r)),this}setSubmitKey(r){return this._body.setSubmitkey(r._toProtoKey()),this}setTopicMemo(r){return this._body.setMemo(r),this}get _method(){return B.ConsensusService.createTopic}_doValidate(r){}}n.ConsensusTopicCreateTransaction=l},93348:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusTopicDeleteTransaction=void 0;const t=u(66498),i=u(88044),B=u(92504),h=u(2505);class p extends t.SingleTransactionBuilder{constructor(){super();const s=new i.ConsensusDeleteTopicTransactionBody;this._body=s,this._inner.setConsensusdeletetopic(s)}setTopicId(s){return this._body.setTopicid(new h.ConsensusTopicId(s)._toProto()),this}get _method(){return B.ConsensusService.deleteTopic}_doValidate(s){}}n.ConsensusTopicDeleteTransaction=p},2505:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusTopicId=void 0;const t=u(33276),i=u(24231),B=u(44431),h=u(52978);class p{constructor(s,r,g){if(typeof s=="number"&&r!=null&&g!=null)this.shard=s,this.realm=r,this.topic=g;else{const y=s,T=y instanceof p?y:i.normalizeEntityId("topic",y);this.shard=T.shard,this.realm=T.realm,this.topic=T.topic}}static fromString(s){return new p(s)}static _fromProto(s){return new p({shard:new B.default(s.getShardnum()).toNumber(),realm:new B.default(s.getRealmnum()).toNumber(),topic:new B.default(s.getTopicnum()).toNumber()})}toString(){return`${this.shard}.${this.realm}.${this.topic}`}static fromSolidityAddress(s){if(s.length!==40)throw new Error(`Invalid hex encoded solidity address length:
|
|
3
3
|
expected length 40, got length ${s.length}`);const r=new B.default(s.slice(0,8),16).toNumber(),g=new B.default(s.slice(8,24),16).toNumber(),y=new B.default(s.slice(24,40),16).toNumber();return new p(r,g,y)}toSolidityAddress(){const s=new Uint8Array(20),r=new DataView(s.buffer,0,20);return r.setUint32(0,this.shard),r.setUint32(8,this.realm),r.setUint32(16,this.topic),h.encode(s,!0)}_toProto(){const s=new t.TopicID;return s.setShardnum(this.shard.toString()),s.setRealmnum(this.realm.toString()),s.setTopicnum(this.topic.toString()),s}}n.ConsensusTopicId=p},68050:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusTopicInfoQuery=void 0;const t=u(2820),i=u(96666),B=u(92504),h=u(90824),p=u(22173),l=u(8200),s=u(90335),r=u(2505),g=u(44431);class y extends t.QueryBuilder{constructor(){super(),this._builder=new h.ConsensusGetTopicInfoQuery,this._builder.setHeader(new i.QueryHeader),this._inner.setConsensusgettopicinfo(this._builder)}setTopicId(m){return this._builder.setTopicid(new r.ConsensusTopicId(m)._toProto()),this}_doLocalValidate(m){this._builder.hasTopicid()||m.push(".setTopicId() required")}_getMethod(){return B.ConsensusService.getTopicInfo}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(m){return m.getConsensusgettopicinfo().getHeader()}_mapResponse(m){const F=m.getConsensusgettopicinfo().getTopicinfo();return{topicMemo:F.getMemo(),runningHash:F.getRunninghash_asU8(),sequenceNumber:new g.default(F.getSequencenumber()).toNumber(),expirationTime:p.Time._fromProto(F.getExpirationtime()),adminKey:F.hasAdminkey()?l._fromProtoKey(F.getAdminkey()):null,submitKey:F.hasSubmitkey()?l._fromProtoKey(F.getSubmitkey()):null,autoRenewPeriod:new g.default(F.getAutorenewperiod().getSeconds()).toNumber(),autoRenewAccount:F.hasAutorenewaccount()?s.AccountId._fromProto(F.getAutorenewaccount()):null}}}n.ConsensusTopicInfoQuery=y},80251:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsensusTopicUpdateTransaction=void 0;const t=u(66498),i=u(627),B=u(92504),h=u(24231),p=u(90335),l=u(2505),s=u(99469);class r extends t.SingleTransactionBuilder{constructor(){super();const y=new i.ConsensusUpdateTopicTransactionBody;this._body=y,this._inner.setConsensusupdatetopic(y)}clearTopicMemo(){return this._body.clearMemo(),this}clearAdminKey(){return this._body.clearAdminkey(),this}clearSubmitKey(){return this._body.clearSubmitkey(),this}clearAutoRenewAccount(){return this._body.clearAutorenewaccount(),this}setAdminKey(y){return this._body.setAdminkey(y._toProtoKey()),this}setAutoRenewAccount(y){return console.warn("`ConsensusTopicUpdateTransaction.setAutoRenewAccount()` is deprecateduse `ConsensusTopicUpdateTransaction.setAutoRenewAccountId()` instead."),this.setAutoRenewAccountId(y)}setAutoRenewAccountId(y){return this._body.setAutorenewaccount(new p.AccountId(y)._toProto()),this}setAutoRenewPeriod(y){return this._body.setAutorenewperiod(h.newDuration(y)),this}setExpirationTime(y){return this._body.setExpirationtime(y._toProto()),this}setSubmitKey(y){return this._body.setSubmitkey(y._toProtoKey()),this}setTopicId(y){return this._body.setTopicid(new l.ConsensusTopicId(y)._toProto()),this}setTopicMemo(y){const T=new s.StringValue;return T.setValue(y),this._body.setMemo(T),this}get _method(){return B.ConsensusService.updateTopic}_doValidate(y){}}n.ConsensusTopicUpdateTransaction=r},32234:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SingleConsensusMessageSubmitTransaction=void 0;const t=u(66498),i=u(17878),B=u(92504),h=u(2505),p=u(56249);class l extends t.SingleTransactionBuilder{constructor(){super();const r=new i.ConsensusSubmitMessageTransactionBody;this._body=r,this._inner.setConsensussubmitmessage(r)}setTopicId(r){return this._body.setTopicid(new h.ConsensusTopicId(r)._toProto()),this}setMessage(r){return r instanceof Uint8Array?this._body.setMessage(r):this._body.setMessage(p.encode(r)),this}setChunkInfo(r){const g=new i.ConsensusMessageChunkInfo;return g.setInitialtransactionid(r.id._toProto()),g.setNumber(r.number),g.setTotal(r.total),this._body.setChunkinfo(g),this}get _method(){return B.ConsensusService.submitMessage}_doValidate(r){}}n.SingleConsensusMessageSubmitTransaction=l},38587:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractBytecodeQuery=void 0;const t=u(2820),i=u(96666),B=u(98614),h=u(60523),p=u(30672);class l extends t.QueryBuilder{constructor(){super(),this._builder=new h.ContractGetBytecodeQuery,this._builder.setHeader(new i.QueryHeader),this._inner.setContractgetbytecode(this._builder)}setContractId(r){return this._builder.setContractid(new p.ContractId(r)._toProto()),this}_doLocalValidate(r){this._builder.hasContractid()||r.push(".setContractId() required")}_getMethod(){return B.SmartContractService.ContractGetBytecode}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(r){return r.getContractgetbytecoderesponse().getHeader()}_mapResponse(r){return r.getContractgetbytecoderesponse().getBytecode_asU8()}}n.ContractBytecodeQuery=l},8449:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(y,T,m,F){function C(S){return S instanceof m?S:new m(function(E){E(S)})}return new(m||(m=Promise))(function(S,E){function k(O){try{W(F.next(O))}catch(N){E(N)}}function R(O){try{W(F.throw(O))}catch(N){E(N)}}function W(O){O.done?S(O.value):C(O.value).then(k,R)}W((F=F.apply(y,T||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.ContractCallQuery=void 0;const i=u(2820),B=u(96666),h=u(98614),p=u(30672),l=u(70180),s=u(11259),r=u(39603);class g extends i.QueryBuilder{constructor(){super(),this._builder=new s.ContractCallLocalQuery,this._builder.setHeader(new B.QueryHeader),this._inner.setContractcalllocal(this._builder)}setContractId(T){return this._builder.setContractid(new p.ContractId(T)._toProto()),this}setFunction(T,m){return this._builder.setFunctionparameters((m!=null?m:new r.ContractFunctionParams)._build(T)),this}setGas(T){return this._builder.setGas(T.toString()),this}setMaxResultSize(T){return this._builder.setMaxresultsize(T.toString()),this}getCost(T){const m=Object.create(null,{getCost:{get:()=>super.getCost}});return t(this,void 0,void 0,function*(){return(yield m.getCost.call(this,T)).multipliedBy(1.1)})}_doLocalValidate(T){this._builder.hasContractid()||T.push(".setContractId() required")}_getMethod(){return h.SmartContractService.contractCallLocalMethod}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(T){return T.getContractcalllocal().getHeader()}_mapResponse(T){return new l.ContractFunctionResult(T.getContractcalllocal().getFunctionresult())}}n.ContractCallQuery=g},84162:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractCreateTransaction=void 0;const t=u(66498),i=u(67950),B=u(24231),h=u(98614),p=u(79643),l=u(41331),s=u(90335);class r extends t.SingleTransactionBuilder{constructor(){super(),this._body=new i.ContractCreateTransactionBody,this._inner.setContractcreateinstance(this._body),this.setAutoRenewPeriod(131500*60)}setBytecodeFileId(y){return this._body.setFileid(new l.FileId(y)._toProto()),this}setAdminKey(y){return this._body.setAdminkey(y._toProtoKey()),this}setGas(y){return this._body.setGas(String(y)),this}setInitialBalance(y){const T=p.hbarFromTinybarOrHbar(y);return T[p.hbarCheck]({allowNegative:!1}),this._body.setInitialbalance(T[p.hbarToProto]()),this}setProxyAccountId(y){return this._body.setProxyaccountid(new s.AccountId(y)._toProto()),this}setAutoRenewPeriod(y){return this._body.setAutorenewperiod(B.newDuration(y)),this}setConstructorParams(y){return this._body.setConstructorparameters(y._build(null)),this}setContractMemo(y){return this._body.setMemo(y),this}_doValidate(y){this._body.hasFileid()||y.push(".setBytecodeFile() required")}get _method(){return h.SmartContractService.createContract}}n.ContractCreateTransaction=r},10495:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractDeleteTransaction=void 0;const t=u(66498),i=u(98614),B=u(17868),h=u(30672),p=u(90335);class l extends t.SingleTransactionBuilder{constructor(){super(),this._body=new B.ContractDeleteTransactionBody,this._inner.setContractdeleteinstance(this._body)}setContractId(r){return this._body.setContractid(new h.ContractId(r)._toProto()),this}setTransferAccountId(r){return this._body.setTransferaccountid(new p.AccountId(r)._toProto()),this}setTransferContractid(r){return this._body.setTransfercontractid(new h.ContractId(r)._toProto()),this}_doValidate(r){this._body.hasContractid()||r.push(".setContractId() required")}get _method(){return i.SmartContractService.deleteContract}}n.ContractDeleteTransaction=l},24547:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractExecuteTransaction=void 0;const t=u(66498),i=u(98614),B=u(90639),h=u(30672),p=u(39603),l=u(79643);class s extends t.SingleTransactionBuilder{constructor(){super(),this._body=new B.ContractCallTransactionBody,this._inner.setContractcall(this._body)}setGas(g){return this._body.setGas(String(g)),this}setPayableAmount(g){const y=l.hbarFromTinybarOrHbar(g);return y[l.hbarCheck]({allowNegative:!1}),this._body.setAmount(y[l.hbarToProto]()),this}setFunction(g,y){return this._body.setFunctionparameters((y!=null?y:new p.ContractFunctionParams)._build(g)),this}setContractId(g){return this._body.setContractid(new h.ContractId(g)._toProto()),this}_doValidate(g){this._body.hasContractid()||g.push(".setContractId() required")}get _method(){return i.SmartContractService.contractCallMethod}}n.ContractExecuteTransaction=s},39603:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractFunctionParams=void 0;const t=u(44431),i=u(84711),B=u(56249),h=u(52978);class p{constructor(){this._arguments=[],this._selector=new i.ContractFunctionSelector}addString(g){return this._selector.addString(),this._addParam(g,!0)}addStringArray(g){return this._selector.addStringArray(),this._addParam(g,!0)}addBytes(g){return this._selector.addBytes(),this._addParam(g,!0)}addBytes32(g){if(g.length!==32)throw new Error(`addBytes32 expected array to be of length 32, but received ${g.length}`);return this._selector.addBytes32(),this._addParam(g,!1)}addBytesArray(g){return this._selector.addBytesArray(),this._addParam(g,!0)}addBytes32Array(g){for(const[y,T]of g.entries())if(T.length!==32)throw new Error(`addBytes32 expected array to be of length 32, but received ${T.length}`);return this._selector.addBytes32Array(),this._addParam(g,!0)}addBool(g){return this._selector.addBool(),this._addParam(g,!1)}addInt8(g){return this._selector.addInt8(),this._addParam(g,!1)}addInt32(g){return this._selector.addInt32(),this._addParam(g,!1)}addInt64(g){return this._selector.addInt64(),this._addParam(g,!1)}addInt256(g){return this._selector.addInt256(),this._addParam(g,!1)}addInt8Array(g){return this._selector.addInt8Array(),this._addParam(g,!0)}addInt32Array(g){return this._selector.addInt32Array(),this._addParam(g,!0)}addInt64Array(g){return this._selector.addInt64Array(),this._addParam(g,!0)}addInt256Array(g){return this._selector.addInt256Array(),this._addParam(g,!0)}addUint8(g){return this._selector.addUint8(),this._addParam(g,!1)}addUint32(g){return this._selector.addUint32(),this._addParam(g,!1)}addUint64(g){return this._selector.addUint64(),this._addParam(g,!1)}addUint256(g){return this._selector.addUint256(),this._addParam(g,!1)}addUint8Array(g){return this._selector.addUint8Array(),this._addParam(g,!0)}addUint32Array(g){return this._selector.addUint32Array(),this._addParam(g,!0)}addUint64Array(g){return this._selector.addUint64Array(),this._addParam(g,!0)}addUint256Array(g){return this._selector.addUint256Array(),this._addParam(g,!0)}addAddress(g){if(g.length!==40&&g.length!==42)throw new Error("`address` type requires parameter to be 40 or 42 characters");const y=g.length===40?h.decode(g):h.decode(g.substring(2));return this._selector.addAddress(),this._addParam(y,!1)}addAddressArray(g){const y=[];for(const[T,m]of g.entries()){if(m.length!==40&&m.length!==42)throw new Error("`address` type requires parameter to be 40 or 42 characters");const F=m.length===40?h.decode(m):h.decode(m.substring(2));y.push(F)}return this._selector.addAddressArray(),this._addParam(y,!0)}addFunction(g,y){const T=h.decode(g),m=y._build(null);if(T.length!==20)throw new Error("`function` type requires parameter `address` to be exactly 20 bytes");this._selector.addFunction();const F=new Uint8Array(24);return F.set(T,0),F.set(m,20),this._addParam(F,!1)}_addParam(g,y){const T=this._selector._paramTypes.length-1,m=l(g,this._selector._paramTypes[T]);return this._arguments.push({dynamic:y,value:m}),this}_build(g){const y=g!=null,T=y?4:0,m=this._arguments.length===0?T:this._arguments.length*32+this._arguments.map(S=>S.dynamic?S.value.length:0).reduce((S,E)=>S+E)+T,F=new Uint8Array(m);y&&F.set(this._selector._build(g),0);let C=32*this._arguments.length;for(const[S,{dynamic:E,value:k}]of this._arguments.entries())if(E){const R=new DataView(F.buffer,T+S*32+28);R.setUint32(0,C),F.set(k,R.getUint32(0)+T),C+=k.length}else F.set(k,T+S*32);return F}}n.ContractFunctionParams=p;function l(r,g){let y=new Uint8Array(32),T=new DataView(y.buffer,0);if(g.array){if(!Array.isArray(r))throw new TypeError("SolidityType indicates type is array, but parameter is not an array");const m=[];for(const[S,E]of r.entries()){const k=l(E,{ty:g.ty,array:!1});m.push(k)}const F=m.map(S=>S.length).reduce((S,E)=>S+E);switch(g.ty){case i.ArgumentType.uint8:case i.ArgumentType.int8:case i.ArgumentType.uint16:case i.ArgumentType.int16:case i.ArgumentType.uint32:case i.ArgumentType.int32:case i.ArgumentType.uint64:case i.ArgumentType.int64:case i.ArgumentType.uint256:case i.ArgumentType.int256:case i.ArgumentType.bool:case i.ArgumentType.bytes32:case i.ArgumentType.address:case i.ArgumentType.func:y=new Uint8Array(F+32);break;case i.ArgumentType.bytes:case i.ArgumentType.string:y=new Uint8Array(m.length*32+F+32);break;default:throw new TypeError(`Expected param type to be ArgumentType, but received ${g.ty}`)}T=new DataView(y.buffer,28),T.setUint32(0,m.length);let C=32*m.length;for(const[S,E]of m.entries())switch(g.ty){case i.ArgumentType.uint8:case i.ArgumentType.int8:case i.ArgumentType.uint16:case i.ArgumentType.int16:case i.ArgumentType.uint32:case i.ArgumentType.int32:case i.ArgumentType.uint64:case i.ArgumentType.int64:case i.ArgumentType.uint256:case i.ArgumentType.int256:case i.ArgumentType.bool:case i.ArgumentType.bytes32:case i.ArgumentType.address:case i.ArgumentType.func:y.set(E,S*32+32);break;case i.ArgumentType.bytes:case i.ArgumentType.string:const k=new DataView(y.buffer,(S+1)*32+28);k.setUint32(0,C),y.set(E,k.getUint32(0)+32),C+=E.length;break;default:throw new TypeError(`Expected param type to be ArgumentType, but received ${g.ty}`)}return y}switch(g.ty){case i.ArgumentType.uint8:return s(r,31,T.setUint8.bind(T)),y;case i.ArgumentType.int8:return s(r,31,T.setInt8.bind(T)),y;case i.ArgumentType.uint16:return s(r,30,T.setUint16.bind(T)),y;case i.ArgumentType.int16:return s(r,30,T.setInt16.bind(T)),y;case i.ArgumentType.uint32:return s(r,28,T.setUint32.bind(T)),y;case i.ArgumentType.int32:return s(r,28,T.setInt32.bind(T)),y;case i.ArgumentType.uint64:case i.ArgumentType.int64:if(t.default.isBigNumber(r)){let F=r.toString(16);if(F.length>16)throw new TypeError("uint64/int64 requires BigNumber to be less than or equal to 8 bytes");if(!r.isInteger())throw new TypeError("uint64/int64 requires BigNumber to be an integer");F.length%2===1&&(F=`0${F}`);const C=h.decode(F);y.set(C,32-C.length)}return y;case i.ArgumentType.int256:case i.ArgumentType.uint256:if(t.default.isBigNumber(r)){let F=r.toString(16);F.length%2===1&&(F=`0${F}`);const C=h.decode(F);y.set(C,32-C.length)}return y;case i.ArgumentType.address:return y.set(r,32-20),y;case i.ArgumentType.bool:return y[31]=r?1:0,y;case i.ArgumentType.func:return y.set(r,32-24),y;case i.ArgumentType.bytes32:return y.set(r,0),y;case i.ArgumentType.bytes:case i.ArgumentType.string:const m=r instanceof Uint8Array?r:B.encode(r);return Math.floor(m.length/32)>=0&&Math.floor(m.length%32)!==0?y=new Uint8Array((Math.floor(m.length/32)+1)*32+32):y=new Uint8Array(64),y.set(m,32),T=new DataView(y.buffer,28),T.setUint32(0,m.length),y;default:throw new Error(`Unsupported argument type: ${g}`)}}function s(r,g,y){const T=t.default.isBigNumber(r)?r.toNumber():r;y(g,T)}},70180:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractFunctionResult=void 0;const t=u(52082),i=u(11259),B=u(30672),h=u(44431),p=u(52978),l=u(56249);class s{constructor(g){g instanceof i.ContractFunctionResult?(this.bytes=g.getContractcallresult_asU8(),this.contractId=g.hasContractid()?B.ContractId._fromProto(g.getContractid()):null,this.errorMessage=g.getErrormessage(),this.bloom=g.getBloom_asU8(),this.gasUsed=new h.default(g.getGasused()).toNumber(),this.logs=t.contractLogInfoListToSdk(g.getLoginfoList())):(this.contractId=new B.ContractId(0),this.bytes=g,this.errorMessage="",this.bloom=new Uint8Array,this.gasUsed=0,this.logs=[])}asBytes(){return this.bytes}getString(g){return l.decode(this.getBytes(g))}getBytes(g){const y=this.getInt32(g),T=new DataView(this.bytes.buffer,this.bytes.byteOffset+y+28,4).getInt32(0);return this.bytes.subarray(y+32,y+32+T)}getBytes32(g){return this.bytes.subarray((g!=null?g:0)*32,(g!=null?g:0)*32+32)}getBool(g){return this.bytes[(g!=null?g:0)*32+31]!==0}getInt8(g){return this.bytes[(g!=null?g:0)*32+31]}getInt32(g){return new DataView(this.bytes.buffer,this.bytes.byteOffset+(g!=null?g:0)*32+28,4).getInt32(0)}getInt64(g){return new h.default(p.encode(this._getBytes32(g!=null?g:0).subarray(24,32),!0),16)}getInt256(g){return new h.default(p.encode(this._getBytes32(g!=null?g:0),!0),16)}getUint8(g){return this.bytes[(g!=null?g:0)*32+31]}getUint32(g){return new DataView(this.bytes.buffer,this.bytes.byteOffset+(g!=null?g:0)*32+28,4).getUint32(0)}getUint64(g){return new h.default(p.encode(this._getBytes32(g).subarray(24,32),!0),16)}getUint256(g){return new h.default(p.encode(this._getBytes32(g),!0),16)}getAddress(g){return p.encode(this.bytes.subarray((g!=null?g:0)*32+12,(g!=null?g:0)*32+32),!0)}_getBytes32(g){return this.bytes.subarray((g!=null?g:0)*32,(g!=null?g:0)*32+32)}}n.ContractFunctionResult=s},84711:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractFunctionSelector=n.ArgumentType=void 0;const t=u(91094);var i;(function(p){p[p.uint8=0]="uint8",p[p.int8=1]="int8",p[p.uint16=2]="uint16",p[p.int16=3]="int16",p[p.uint32=4]="uint32",p[p.int32=5]="int32",p[p.uint64=6]="uint64",p[p.int64=7]="int64",p[p.uint256=8]="uint256",p[p.int256=9]="int256",p[p.string=10]="string",p[p.bool=11]="bool",p[p.bytes=12]="bytes",p[p.bytes32=13]="bytes32",p[p.address=14]="address",p[p.func=15]="func"})(i=n.ArgumentType||(n.ArgumentType={}));class B{constructor(l=null){this._name=null,this._params="",this._paramTypes=[],l!=null&&(this._name=l)}addString(){return this._addParam({ty:i.string,array:!1})}addStringArray(){return this._addParam({ty:i.string,array:!0})}addBytes(){return this._addParam({ty:i.bytes,array:!1})}addBytes32(){return this._addParam({ty:i.bytes32,array:!1})}addBytesArray(){return this._addParam({ty:i.bytes,array:!0})}addBytes32Array(){return this._addParam({ty:i.bytes32,array:!0})}addInt8(){return this._addParam({ty:i.int8,array:!1})}addInt32(){return this._addParam({ty:i.int32,array:!1})}addInt64(){return this._addParam({ty:i.int64,array:!1})}addInt256(){return this._addParam({ty:i.int256,array:!1})}addInt8Array(){return this._addParam({ty:i.int8,array:!0})}addInt32Array(){return this._addParam({ty:i.int32,array:!0})}addInt64Array(){return this._addParam({ty:i.int64,array:!0})}addInt256Array(){return this._addParam({ty:i.int256,array:!0})}addUint8(){return this._addParam({ty:i.uint8,array:!1})}addUint32(){return this._addParam({ty:i.uint32,array:!1})}addUint64(){return this._addParam({ty:i.uint64,array:!1})}addUint256(){return this._addParam({ty:i.uint256,array:!1})}addUint8Array(){return this._addParam({ty:i.uint8,array:!0})}addUint32Array(){return this._addParam({ty:i.uint32,array:!0})}addUint64Array(){return this._addParam({ty:i.uint64,array:!0})}addUint256Array(){return this._addParam({ty:i.uint256,array:!0})}addBool(){return this._addParam({ty:i.bool,array:!1})}addAddress(){return this._addParam({ty:i.address,array:!1})}addAddressArray(){return this._addParam({ty:i.address,array:!0})}addFunction(){return this._addParam({ty:i.func,array:!1})}_addParam(l){return this._paramTypes.length>0&&(this._params+=","),this._params+=h(l),this._paramTypes.push(l),this}_build(l){if(l!=null)this._name=l;else if(this._name==null)throw new Error("`name` required for ContractFunctionSelector");return new Uint8Array(t.keccak256.arrayBuffer(this.toString()).slice(0,4))}toString(){return`${this._name}(${this._params})`}}n.ContractFunctionSelector=B;function h(p){let l="";switch(p.ty){case i.uint8:l="uint8";break;case i.int8:l="int8";break;case i.uint16:l="uint16";break;case i.int16:l="int16";break;case i.uint32:l="uint32";break;case i.int32:l="int32";break;case i.uint64:l="uint64";break;case i.int64:l="int64";break;case i.uint256:l="uint256";break;case i.int256:l="int256";break;case i.string:l="string";break;case i.bool:l="bool";break;case i.bytes:l="bytes";break;case i.bytes32:l="bytes32";break;case i.address:l="address";break;case i.func:l="function";break;default:l="";break}return p.array&&(l+="[]"),l}},30672:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractId=void 0;const t=u(33276),i=u(24231),B=u(8200),h=u(44431),p=u(52978);class l extends B.PublicKey{constructor(r,g,y){if(super(),typeof r=="number"&&g!=null&&y!=null)this.shard=r,this.realm=g,this.contract=y;else{const T=r,m=T instanceof l?T:i.normalizeEntityId("contract",T);this.shard=m.shard,this.realm=m.realm,this.contract=m.contract}}static fromString(r){return new l(r)}static _fromProto(r){return new l({shard:new h.default(r.getShardnum()).toNumber(),realm:new h.default(r.getRealmnum()).toNumber(),contract:new h.default(r.getContractnum()).toNumber()})}toString(){return`${this.shard}.${this.realm}.${this.contract}`}static fromSolidityAddress(r){if(r.length!==40)throw new Error(`Invalid hex encoded solidity address length:
|
|
4
4
|
expected length 40, got length ${r.length}`);const g=new h.default(r.slice(0,8),16).toNumber(),y=new h.default(r.slice(8,24),16).toNumber(),T=new h.default(r.slice(24,40),16).toNumber();return new l(g,y,T)}toSolidityAddress(){const r=new Uint8Array(20),g=new DataView(r.buffer,0,20);return g.setUint32(0,this.shard),g.setUint32(8,this.realm),g.setUint32(16,this.contract),p.encode(r,!0)}_toProto(){const r=new t.ContractID;return r.setShardnum(this.shard.toString()),r.setRealmnum(this.realm.toString()),r.setContractnum(this.contract.toString()),r}_toProtoKey(){const r=new t.Key;return r.setContractid(this._toProto()),r}}n.ContractId=l},65124:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(F,C,S,E){function k(R){return R instanceof S?R:new S(function(W){W(R)})}return new(S||(S=Promise))(function(R,W){function O(_){try{j(E.next(_))}catch(K){W(K)}}function N(_){try{j(E.throw(_))}catch(K){W(K)}}function j(_){_.done?R(_.value):k(_.value).then(O,N)}j((E=E.apply(F,C||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.ContractInfoQuery=void 0;const i=u(2820),B=u(37853),h=u(96666),p=u(98614),l=u(30672),s=u(90335),r=u(13660),g=u(8200),y=u(79643),T=u(44431);class m extends i.QueryBuilder{constructor(){super(),this._builder=new B.ContractGetInfoQuery,this._builder.setHeader(new h.QueryHeader),this._inner.setContractgetinfo(this._builder)}setContractId(C){return this._builder.setContractid(new l.ContractId(C)._toProto()),this}getCost(C){const S=Object.create(null,{getCost:{get:()=>super.getCost}});return t(this,void 0,void 0,function*(){const E=y.Hbar.fromTinybar(25),k=yield S.getCost.call(this,C);return k.isGreaterThan(E)?k:E})}_doLocalValidate(C){this._builder.hasContractid()||C.push(".setContractId() required")}_getMethod(){return p.SmartContractService.getContractInfo}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(C){return C.getContractgetinfo().getHeader()}_mapResponse(C){const S=C.getContractgetinfo().getContractinfo();return{contractId:l.ContractId._fromProto(S.getContractid()),accountId:s.AccountId._fromProto(S.getAccountid()),contractAccountId:S.getContractaccountid(),adminKey:S.hasAdminkey()?g._fromProtoKey(S.getAdminkey()):null,expirationTime:r.timestampToDate(S.getExpirationtime()),autoRenewPeriod:new T.default(S.getAutorenewperiod().getSeconds()).toNumber(),storage:new T.default(S.getStorage()).toNumber(),contractMemo:S.getMemo()}}}n.ContractInfoQuery=m},52082:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.contractLogInfoListToSdk=void 0;const t=u(30672);function i(B){return B.map(h=>({contractId:t.ContractId._fromProto(h.getContractid()),bloom:h.getBloom_asU8(),topics:h.getTopicList_asU8(),data:h.getData_asU8()}))}n.contractLogInfoListToSdk=i},30311:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractRecordsQuery=void 0;const t=u(2820),i=u(96666),B=u(98614),h=u(52317),p=u(30672),l=u(48889);class s extends t.QueryBuilder{constructor(){super(),this._builder=new l.ContractGetRecordsQuery,this._builder.setHeader(new i.QueryHeader),this._inner.setContractgetrecords(this._builder)}setContractId(g){return this._builder.setContractid(new p.ContractId(g)._toProto()),this}_doLocalValidate(g){this._builder.hasContractid()||g.push(".setContractId() required")}_getMethod(){return B.SmartContractService.getTxRecordByContractID}_getHeader(){return this._builder.getHeader()}_mapResponseHeader(g){return g.getContractgetrecordsresponse().getHeader()}_mapResponse(g){return g.getContractgetrecordsresponse().getRecordsList().map(h.TransactionRecord._fromProto)}}n.ContractRecordsQuery=s},67846:function(o,n,u){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContractUpdateTransaction=void 0;const t=u(66498),i=u(98614),B=u(18811),h=u(24231),p=u(30672),l=u(90335),s=u(41331),r=u(13660);class g extends t.SingleTransactionBuilder{constructor(){super(),this._body=new B.ContractUpdateTransactionBody,this._inner.setContractupdateinstance(this._body)}setContractId(T){return this._body.setContractid(new p.ContractId(T)._toProto()),this}setAdminKey(T){return this._body.setAdminkey(T._toProtoKey()),this}setProxyAccountId(T){return this._body.setProxyaccountid(new l.AccountId(T)._toProto()),this}setBytecodeFileId(T){return this._body.setFileid(new s.FileId(T)._toProto()),this}setAutoRenewPeriod(T){return this._body.setAutorenewperiod(h.newDuration(T)),this}setExpirationTime(T){return this._body.setExpirationtime(r.timestampToProto(r.dateToTimestamp(T))),this}setContractMemo(T){return this._body.setMemo(T),this}_doValidate(T){this._body.hasContractid()||T.push(".setContractId() required")}get _method(){return i.SmartContractService.updateContract}}n.ContractUpdateTransaction=g},94974:function(o,n,u){"use strict";var t=this&&this.__awaiter||function(N,j,_,K){function z(Y){return Y instanceof _?Y:new _(function(M){M(Y)})}return new(_||(_=Promise))(function(Y,M){function L($){try{A(K.next($))}catch(H){M(H)}}function I($){try{A(K.throw($))}catch(H){M(H)}}function A($){$.done?Y($.value):z($.value).then(L,I)}A((K=K.apply(N,j||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Ed25519PrivateKey=void 0;const i=u(50780),B=u(920),h=u(41988),p=u(26080),l=u(75959),s=u(13229),r=u(4384),g=u(29709),y=u(48324),T=u(52978),m=u(64700),F=u(71510),C=`-----BEGIN PRIVATE KEY-----
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[7542],{45327:function(e){for(var y=[],h=0;h<256;++h)y[h]=(h+256).toString(16).substr(1);function p(s,u){var o=u||0,i=y;return[i[s[o++]],i[s[o++]],i[s[o++]],i[s[o++]],"-",i[s[o++]],i[s[o++]],"-",i[s[o++]],i[s[o++]],"-",i[s[o++]],i[s[o++]],"-",i[s[o++]],i[s[o++]],i[s[o++]],i[s[o++]],i[s[o++]],i[s[o++]]].join("")}e.exports=p},85217:function(e){var y=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(y){var h=new Uint8Array(16);e.exports=function(){return y(h),h}}else{var p=new Array(16);e.exports=function(){for(var u=0,o;u<16;u++)(u&3)===0&&(o=Math.random()*4294967296),p[u]=o>>>((u&3)<<3)&255;return p}}},71171:function(e,y,h){var p=h(85217),s=h(45327);function u(o,i,l){var d=i&&l||0;typeof o=="string"&&(i=o==="binary"?new Array(16):null,o=null),o=o||{};var _=o.random||(o.rng||p)();if(_[6]=_[6]&15|64,_[8]=_[8]&63|128,i)for(var w=0;w<16;++w)i[d+w]=_[w];return i||s(_)}e.exports=u},66115:function(e){function y(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}e.exports=y,e.exports.__esModule=!0,e.exports.default=e.exports},17156:function(e){function y(p,s,u,o,i,l,d){try{var _=p[l](d),w=_.value}catch(E){u(E);return}_.done?s(w):Promise.resolve(w).then(o,i)}function h(p){return function(){var s=this,u=arguments;return new Promise(function(o,i){var l=p.apply(s,u);function d(w){y(l,o,i,d,_,"next",w)}function _(w){y(l,o,i,d,_,"throw",w)}d(void 0)})}}e.exports=h,e.exports.__esModule=!0,e.exports.default=e.exports},56690:function(e){function y(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}e.exports=y,e.exports.__esModule=!0,e.exports.default=e.exports},89728:function(e,y,h){var p=h(64062);function s(o,i){for(var l=0;l<i.length;l++){var d=i[l];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(o,p(d.key),d)}}function u(o,i,l){return i&&s(o.prototype,i),l&&s(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},73808:function(e){function y(h){return e.exports=y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},e.exports.__esModule=!0,e.exports.default=e.exports,y(h)}e.exports=y,e.exports.__esModule=!0,e.exports.default=e.exports},61655:function(e,y,h){var p=h(6015);function s(u,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(o&&o.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),o&&p(u,o)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},94993:function(e,y,h){var p=h(18698).default,s=h(66115);function u(o,i){if(i&&(p(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(o)}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},17061:function(e,y,h){var p=h(18698).default;function s(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=s=function(){return u},e.exports.__esModule=!0,e.exports.default=e.exports;var u={},o=Object.prototype,i=o.hasOwnProperty,l=Object.defineProperty||function(n,t,r){n[t]=r.value},d=typeof Symbol=="function"?Symbol:{},_=d.iterator||"@@iterator",w=d.asyncIterator||"@@asyncIterator",E=d.toStringTag||"@@toStringTag";function b(n,t,r){return Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),n[t]}try{b({},"")}catch{b=function(r,a,c){return r[a]=c}}function Y(n,t,r,a){var c=t&&t.prototype instanceof R?t:R,f=Object.create(c.prototype),v=new V(a||[]);return l(f,"_invoke",{value:K(n,r,v)}),f}function G(n,t,r){try{return{type:"normal",arg:n.call(t,r)}}catch(a){return{type:"throw",arg:a}}}u.wrap=Y;var m={};function R(){}function j(){}function P(){}var N={};b(N,_,function(){return this});var I=Object.getPrototypeOf,M=I&&I(I(U([])));M&&M!==o&&i.call(M,_)&&(N=M);var k=P.prototype=R.prototype=Object.create(N);function z(n){["next","throw","return"].forEach(function(t){b(n,t,function(r){return this._invoke(t,r)})})}function T(n,t){function r(c,f,v,g){var x=G(n[c],n,f);if(x.type!=="throw"){var L=x.arg,O=L.value;return O&&p(O)=="object"&&i.call(O,"__await")?t.resolve(O.__await).then(function(S){r("next",S,v,g)},function(S){r("throw",S,v,g)}):t.resolve(O).then(function(S){L.value=S,v(L)},function(S){return r("throw",S,v,g)})}g(x.arg)}var a;l(this,"_invoke",{value:function(f,v){function g(){return new t(function(x,L){r(f,v,x,L)})}return a=a?a.then(g,g):g()}})}function K(n,t,r){var a="suspendedStart";return function(c,f){if(a==="executing")throw new Error("Generator is already running");if(a==="completed"){if(c==="throw")throw f;return D()}for(r.method=c,r.arg=f;;){var v=r.delegate;if(v){var g=C(v,r);if(g){if(g===m)continue;return g}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(a==="suspendedStart")throw a="completed",r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);a="executing";var x=G(n,t,r);if(x.type==="normal"){if(a=r.done?"completed":"suspendedYield",x.arg===m)continue;return{value:x.arg,done:r.done}}x.type==="throw"&&(a="completed",r.method="throw",r.arg=x.arg)}}}function C(n,t){var r=t.method,a=n.iterator[r];if(a===void 0)return t.delegate=null,r==="throw"&&n.iterator.return&&(t.method="return",t.arg=void 0,C(n,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var c=G(a,n.iterator,t.arg);if(c.type==="throw")return t.method="throw",t.arg=c.arg,t.delegate=null,m;var f=c.arg;return f?f.done?(t[n.resultName]=f.value,t.next=n.nextLoc,t.method!=="return"&&(t.method="next",t.arg=void 0),t.delegate=null,m):f:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function H(n){var t={tryLoc:n[0]};1 in n&&(t.catchLoc=n[1]),2 in n&&(t.finallyLoc=n[2],t.afterLoc=n[3]),this.tryEntries.push(t)}function A(n){var t=n.completion||{};t.type="normal",delete t.arg,n.completion=t}function V(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(H,this),this.reset(!0)}function U(n){if(n){var t=n[_];if(t)return t.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var r=-1,a=function c(){for(;++r<n.length;)if(i.call(n,r))return c.value=n[r],c.done=!1,c;return c.value=void 0,c.done=!0,c};return a.next=a}}return{next:D}}function D(){return{value:void 0,done:!0}}return j.prototype=P,l(k,"constructor",{value:P,configurable:!0}),l(P,"constructor",{value:j,configurable:!0}),j.displayName=b(P,E,"GeneratorFunction"),u.isGeneratorFunction=function(n){var t=typeof n=="function"&&n.constructor;return!!t&&(t===j||(t.displayName||t.name)==="GeneratorFunction")},u.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,P):(n.__proto__=P,b(n,E,"GeneratorFunction")),n.prototype=Object.create(k),n},u.awrap=function(n){return{__await:n}},z(T.prototype),b(T.prototype,w,function(){return this}),u.AsyncIterator=T,u.async=function(n,t,r,a,c){c===void 0&&(c=Promise);var f=new T(Y(n,t,r,a),c);return u.isGeneratorFunction(t)?f:f.next().then(function(v){return v.done?v.value:f.next()})},z(k),b(k,E,"Generator"),b(k,_,function(){return this}),b(k,"toString",function(){return"[object Generator]"}),u.keys=function(n){var t=Object(n),r=[];for(var a in t)r.push(a);return r.reverse(),function c(){for(;r.length;){var f=r.pop();if(f in t)return c.value=f,c.done=!1,c}return c.done=!0,c}},u.values=U,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var r in this)r.charAt(0)==="t"&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(L,O){return v.type="throw",v.arg=t,r.next=L,O&&(r.method="next",r.arg=void 0),!!O}for(var c=this.tryEntries.length-1;c>=0;--c){var f=this.tryEntries[c],v=f.completion;if(f.tryLoc==="root")return a("end");if(f.tryLoc<=this.prev){var g=i.call(f,"catchLoc"),x=i.call(f,"finallyLoc");if(g&&x){if(this.prev<f.catchLoc)return a(f.catchLoc,!0);if(this.prev<f.finallyLoc)return a(f.finallyLoc)}else if(g){if(this.prev<f.catchLoc)return a(f.catchLoc,!0)}else{if(!x)throw new Error("try statement without catch or finally");if(this.prev<f.finallyLoc)return a(f.finallyLoc)}}}},abrupt:function(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a];if(c.tryLoc<=this.prev&&i.call(c,"finallyLoc")&&this.prev<c.finallyLoc){var f=c;break}}f&&(t==="break"||t==="continue")&&f.tryLoc<=r&&r<=f.finallyLoc&&(f=null);var v=f?f.completion:{};return v.type=t,v.arg=r,f?(this.method="next",this.next=f.finallyLoc,m):this.complete(v)},complete:function(t,r){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),A(a),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var c=a.completion;if(c.type==="throw"){var f=c.arg;A(a)}return f}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:U(t),resultName:r,nextLoc:a},this.method==="next"&&(this.arg=void 0),m}},u}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function y(h,p){return e.exports=y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,o){return u.__proto__=o,u},e.exports.__esModule=!0,e.exports.default=e.exports,y(h,p)}e.exports=y,e.exports.__esModule=!0,e.exports.default=e.exports},95036:function(e,y,h){var p=h(18698).default;function s(u,o){if(p(u)!=="object"||u===null)return u;var i=u[Symbol.toPrimitive];if(i!==void 0){var l=i.call(u,o||"default");if(p(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(u)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},64062:function(e,y,h){var p=h(18698).default,s=h(95036);function u(o){var i=s(o,"string");return p(i)==="symbol"?i:String(i)}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},18698:function(e){function y(h){return e.exports=y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},e.exports.__esModule=!0,e.exports.default=e.exports,y(h)}e.exports=y,e.exports.__esModule=!0,e.exports.default=e.exports},64687:function(e,y,h){var p=h(17061)();e.exports=p;try{regeneratorRuntime=p}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=p:Function("r","regeneratorRuntime = r")(p)}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[7786],{84090:function(J,N,w){"use strict";var f=w(48764).Buffer;Object.defineProperty(N,"__esModule",{value:!0});const c=w(56903),B=w(58334),b=w(95892),g=w(2401),T=w(37174),l=g.BufferN(32),E=g.compile({wif:g.UInt8,bip32:{public:g.UInt32,private:g.UInt32}}),p={messagePrefix:`Bitcoin Signed Message:
|
|
2
|
+
`,bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},y=2147483648,_=Math.pow(2,31)-1;function v(m){return g.String(m)&&m.match(/^(m\/)?(\d+'?\/)*\d+'?$/)!==null}function t(m){return g.UInt32(m)&&m<=_}class i{constructor(o,u,r,I,s=0,H=0,R=0){this.__D=o,this.__Q=u,this.chainCode=r,this.network=I,this.__DEPTH=s,this.__INDEX=H,this.__PARENT_FINGERPRINT=R,g(E,I),this.lowR=!1}get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return this.__Q===void 0&&(this.__Q=b.pointFromScalar(this.__D,!0)),this.__Q}get privateKey(){return this.__D}get identifier(){return c.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return this.__D===void 0}neutered(){return P(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){const o=this.network,u=this.isNeutered()?o.bip32.public:o.bip32.private,r=f.allocUnsafe(78);return r.writeUInt32BE(u,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),B.encode(r)}toWIF(){if(!this.privateKey)throw new TypeError("Missing private key");return T.encode(this.network.wif,this.privateKey,!0)}derive(o){g(g.UInt32,o);const u=o>=y,r=f.allocUnsafe(37);if(u){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");r[0]=0,this.privateKey.copy(r,1),r.writeUInt32BE(o,33)}else this.publicKey.copy(r,0),r.writeUInt32BE(o,33);const I=c.hmacSHA512(this.chainCode,r),s=I.slice(0,32),H=I.slice(32);if(!b.isPrivate(s))return this.derive(o+1);let R;if(this.isNeutered()){const K=b.pointAddScalar(this.publicKey,s,!0);if(K===null)return this.derive(o+1);R=P(K,H,this.network,this.depth+1,o,this.fingerprint.readUInt32BE(0))}else{const K=b.privateAdd(this.privateKey,s);if(K==null)return this.derive(o+1);R=d(K,H,this.network,this.depth+1,o,this.fingerprint.readUInt32BE(0))}return R}deriveHardened(o){return g(t,o),this.derive(o+y)}derivePath(o){g(v,o);let u=o.split("/");if(u[0]==="m"){if(this.parentFingerprint)throw new TypeError("Expected master, got child");u=u.slice(1)}return u.reduce((r,I)=>{let s;return I.slice(-1)==="'"?(s=parseInt(I.slice(0,-1),10),r.deriveHardened(s)):(s=parseInt(I,10),r.derive(s))},this)}sign(o,u){if(!this.privateKey)throw new Error("Missing private key");if(u===void 0&&(u=this.lowR),u===!1)return b.sign(o,this.privateKey);{let r=b.sign(o,this.privateKey);const I=f.alloc(32,0);let s=0;for(;r[0]>127;)s++,I.writeUIntLE(s,0,6),r=b.signWithEntropy(o,this.privateKey,I);return r}}verify(o,u){return b.verify(o,this.publicKey,u)}}function e(m,o){const u=B.decode(m);if(u.length!==78)throw new TypeError("Invalid buffer length");o=o||p;const r=u.readUInt32BE(0);if(r!==o.bip32.private&&r!==o.bip32.public)throw new TypeError("Invalid network version");const I=u[4],s=u.readUInt32BE(5);if(I===0&&s!==0)throw new TypeError("Invalid parent fingerprint");const H=u.readUInt32BE(9);if(I===0&&H!==0)throw new TypeError("Invalid index");const R=u.slice(13,45);let K;if(r===o.bip32.private){if(u.readUInt8(45)!==0)throw new TypeError("Invalid private key");const F=u.slice(46,78);K=d(F,R,o,I,H,s)}else{const F=u.slice(45,78);K=P(F,R,o,I,H,s)}return K}N.fromBase58=e;function a(m,o,u){return d(m,o,u)}N.fromPrivateKey=a;function d(m,o,u,r,I,s){if(g({privateKey:l,chainCode:l},{privateKey:m,chainCode:o}),u=u||p,!b.isPrivate(m))throw new TypeError("Private key not in range [1, n)");return new i(m,void 0,o,u,r,I,s)}function O(m,o,u){return P(m,o,u)}N.fromPublicKey=O;function P(m,o,u,r,I,s){if(g({publicKey:g.BufferN(33),chainCode:l},{publicKey:m,chainCode:o}),u=u||p,!b.isPoint(m))throw new TypeError("Point is not on the curve");return new i(void 0,m,o,u,r,I,s)}function A(m,o){if(g(g.Buffer,m),m.length<16)throw new TypeError("Seed should be at least 128 bits");if(m.length>64)throw new TypeError("Seed should be at most 512 bits");o=o||p;const u=c.hmacSHA512(f.from("Bitcoin seed","utf8"),m),r=u.slice(0,32),I=u.slice(32);return a(r,I,o)}N.fromSeed=A},56903:function(J,N,w){"use strict";Object.defineProperty(N,"__esModule",{value:!0});const f=w(23482),c=w(58355);function B(g){const T=f("sha256").update(g).digest();try{return f("rmd160").update(T).digest()}catch{return f("ripemd160").update(T).digest()}}N.hash160=B;function b(g,T){return c("sha512",g).update(T).digest()}N.hmacSHA512=b},37786:function(J,N,w){"use strict";Object.defineProperty(N,"__esModule",{value:!0});var f=w(84090);N.fromSeed=f.fromSeed,N.fromBase58=f.fromBase58,N.fromPublicKey=f.fromPublicKey,N.fromPrivateKey=f.fromPrivateKey},95892:function(J,N,w){var f=w(48764).Buffer;const c=w(13550),B=w(86266).ec,b=new B("secp256k1"),g=w(44142),T=f.alloc(32,0),l=f.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),E=f.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),p=b.curve.n,y=p.shrn(1),_=b.curve.g,v="Expected Private",t="Expected Point",i="Expected Tweak",e="Expected Hash",a="Expected Signature",d="Expected Extra Data (32 bytes)";function O(n){return f.isBuffer(n)&&n.length===32}function P(n){return O(n)?n.compare(l)<0:!1}function A(n){if(!f.isBuffer(n)||n.length<33)return!1;const h=n[0],S=n.slice(1,33);if(S.compare(T)===0||S.compare(E)>=0)return!1;if((h===2||h===3)&&n.length===33){try{R(n)}catch{return!1}return!0}const U=n.slice(33);return U.compare(T)===0||U.compare(E)>=0?!1:h===4&&n.length===65}function m(n){return n[0]!==4}function o(n){return A(n)?m(n):!1}function u(n){return O(n)?n.compare(T)>0&&n.compare(l)<0:!1}function r(n){const h=n.slice(0,32),S=n.slice(32,64);return f.isBuffer(n)&&n.length===64&&h.compare(l)<0&&S.compare(l)<0}function I(n,h){return n===void 0&&h!==void 0?m(h):n===void 0?!0:n}function s(n){return new c(n)}function H(n){return n.toArrayLike(f,"be",32)}function R(n){return b.curve.decodePoint(n)}function K(n,h){return f.from(n._encode(h))}function F(n,h,S){if(!A(n))throw new TypeError(t);if(!A(h))throw new TypeError(t);const U=R(n),x=R(h),j=U.add(x);if(j.isInfinity())return null;const L=I(S,n);return K(j,L)}function V(n,h,S){if(!A(n))throw new TypeError(t);if(!P(h))throw new TypeError(i);const U=I(S,n),x=R(n);if(h.compare(T)===0)return K(x,U);const j=s(h),L=_.mul(j),k=x.add(L);return k.isInfinity()?null:K(k,U)}function X(n,h){if(!A(n))throw new TypeError(t);const S=R(n);if(S.isInfinity())throw new TypeError(t);return K(S,h)}function Q(n,h){if(!u(n))throw new TypeError(v);const S=s(n),U=_.mul(S);if(U.isInfinity())return null;const x=I(h);return K(U,x)}function $(n,h,S){if(!A(n))throw new TypeError(t);if(!P(h))throw new TypeError(i);const U=I(S,n),x=R(n),j=s(h),L=x.mul(j);return L.isInfinity()?null:K(L,U)}function Z(n,h){if(!u(n))throw new TypeError(v);if(!P(h))throw new TypeError(i);const S=s(n),U=s(h),x=H(S.add(U).umod(p));return u(x)?x:null}function Y(n,h){if(!u(n))throw new TypeError(v);if(!P(h))throw new TypeError(i);const S=s(n),U=s(h),x=H(S.sub(U).umod(p));return u(x)?x:null}function z(n,h){return G(n,h)}function q(n,h,S){return G(n,h,S)}function G(n,h,S){if(!O(n))throw new TypeError(e);if(!u(h))throw new TypeError(v);if(S!==void 0&&!O(S))throw new TypeError(d);const U=s(h),x=s(n);let j,L;g(n,h,function(M){const D=s(M),W=_.mul(D);return!(W.isInfinity()||(j=W.x.umod(p),j.isZero()===0)||(L=D.invm(p).mul(x.add(U.mul(j))).umod(p),L.isZero()===0))},u,S),L.cmp(y)>0&&(L=p.sub(L));const C=f.allocUnsafe(64);return H(j).copy(C,0),H(L).copy(C,32),C}function tt(n,h,S){if(!O(n))throw new TypeError(e);if(!A(h))throw new TypeError(t);if(!r(S))throw new TypeError(a);const U=R(h),x=s(S.slice(0,32)),j=s(S.slice(32,64));if(x.gtn(0)<=0||j.gtn(0)<=0)return!1;const L=s(n),k=j.invm(p),C=L.mul(k).umod(p),M=x.mul(k).umod(p),D=_.mulAdd(C,U,M);return D.isInfinity()?!1:D.x.umod(p).eq(x)}J.exports={isPoint:A,isPointCompressed:o,isPrivate:u,pointAdd:F,pointAddScalar:V,pointCompress:X,pointFromScalar:Q,pointMultiply:$,privateAdd:Z,privateSub:Y,sign:z,signWithEntropy:q,verify:tt}},44142:function(J,N,w){var f=w(48764).Buffer;const c=w(58355),B=f.alloc(1,1),b=f.alloc(1,0);function g(T,l,E,p,y){let _=f.alloc(32,0),v=f.alloc(32,1);_=c("sha256",_).update(v).update(b).update(l).update(T).update(y||"").digest(),v=c("sha256",_).update(v).digest(),_=c("sha256",_).update(v).update(B).update(l).update(T).update(y||"").digest(),v=c("sha256",_).update(v).digest(),v=c("sha256",_).update(v).digest();let t=v;for(;!p(t)||!E(t);)_=c("sha256",_).update(v).update(b).digest(),v=c("sha256",_).update(v).digest(),v=c("sha256",_).update(v).digest(),t=v;return t}J.exports=g},96647:function(J,N,w){var f=w(30247);function c(t){return t.name||t.toString().match(/function (.*?)\s*\(/)[1]}function B(t){return f.Nil(t)?"":c(t.constructor)}function b(t){return f.Function(t)?"":f.String(t)?JSON.stringify(t):t&&f.Object(t)?"":t}function g(t,i){Error.captureStackTrace&&Error.captureStackTrace(t,i)}function T(t){return f.Function(t)?t.toJSON?t.toJSON():c(t):f.Array(t)?"Array":t&&f.Object(t)?"Object":t!==void 0?t:""}function l(t,i,e){var a=b(i);return"Expected "+T(t)+", got"+(e!==""?" "+e:"")+(a!==""?" "+a:"")}function E(t,i,e){e=e||B(i),this.message=l(t,i,e),g(this,E),this.__type=t,this.__value=i,this.__valueTypeName=e}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E;function p(t,i,e,a,d){var O='" of type ';return i==="key"&&(O='" with key type '),l('property "'+T(e)+O+T(t),a,d)}function y(t,i,e,a,d){t?(d=d||B(a),this.message=p(t,e,i,a,d)):this.message='Unexpected property "'+i+'"',g(this,E),this.__label=e,this.__property=i,this.__type=t,this.__value=a,this.__valueTypeName=d}y.prototype=Object.create(Error.prototype),y.prototype.constructor=E;function _(t,i){return new E(t,{},i)}function v(t,i,e){return t instanceof y?(i=i+"."+t.__property,t=new y(t.__type,i,t.__label,t.__value,t.__valueTypeName)):t instanceof E&&(t=new y(t.__type,i,e,t.__value,t.__valueTypeName)),g(t),t}J.exports={TfTypeError:E,TfPropertyTypeError:y,tfCustomError:_,tfSubError:v,tfJSON:T,getValueTypeName:B}},74307:function(J,N,w){var f=w(48764).Buffer,c=w(30247),B=w(96647);function b(r){return f.isBuffer(r)}function g(r){return typeof r=="string"&&/^([0-9a-f]{2})+$/i.test(r)}function T(r,I){var s=r.toJSON();function H(R){if(!r(R))return!1;if(R.length===I)return!0;throw B.tfCustomError(s+"(Length: "+I+")",s+"(Length: "+R.length+")")}return H.toJSON=function(){return s},H}var l=T.bind(null,c.Array),E=T.bind(null,b),p=T.bind(null,g),y=T.bind(null,c.String);function _(r,I,s){s=s||c.Number;function H(R,K){return s(R,K)&&R>r&&R<I}return H.toJSON=function(){return`${s.toJSON()} between [${r}, ${I}]`},H}var v=Math.pow(2,53)-1;function t(r){return typeof r=="number"&&isFinite(r)}function i(r){return r<<24>>24===r}function e(r){return r<<16>>16===r}function a(r){return(r|0)===r}function d(r){return typeof r=="number"&&r>=-v&&r<=v&&Math.floor(r)===r}function O(r){return(r&255)===r}function P(r){return(r&65535)===r}function A(r){return r>>>0===r}function m(r){return typeof r=="number"&&r>=0&&r<=v&&Math.floor(r)===r}var o={ArrayN:l,Buffer:b,BufferN:E,Finite:t,Hex:g,HexN:p,Int8:i,Int16:e,Int32:a,Int53:d,Range:_,StringN:y,UInt8:O,UInt16:P,UInt32:A,UInt53:m};for(var u in o)o[u].toJSON=function(r){return r}.bind(null,u);J.exports=o},2401:function(J,N,w){var f=w(96647),c=w(30247),B=f.tfJSON,b=f.TfTypeError,g=f.TfPropertyTypeError,T=f.tfSubError,l=f.getValueTypeName,E={arrayOf:function(i,e){i=p(i),e=e||{};function a(d,O){return!c.Array(d)||c.Nil(d)||e.minLength!==void 0&&d.length<e.minLength||e.maxLength!==void 0&&d.length>e.maxLength||e.length!==void 0&&d.length!==e.length?!1:d.every(function(P,A){try{return y(i,P,O)}catch(m){throw T(m,A)}})}return a.toJSON=function(){var d="["+B(i)+"]";return e.length!==void 0?d+="{"+e.length+"}":(e.minLength!==void 0||e.maxLength!==void 0)&&(d+="{"+(e.minLength===void 0?0:e.minLength)+","+(e.maxLength===void 0?1/0:e.maxLength)+"}"),d},a},maybe:function t(i){i=p(i);function e(a,d){return c.Nil(a)||i(a,d,t)}return e.toJSON=function(){return"?"+B(i)},e},map:function(i,e){i=p(i),e&&(e=p(e));function a(d,O){if(!c.Object(d)||c.Nil(d))return!1;for(var P in d){try{e&&y(e,P,O)}catch(m){throw T(m,P,"key")}try{var A=d[P];y(i,A,O)}catch(m){throw T(m,P)}}return!0}return e?a.toJSON=function(){return"{"+B(e)+": "+B(i)+"}"}:a.toJSON=function(){return"{"+B(i)+"}"},a},object:function(i){var e={};for(var a in i)e[a]=p(i[a]);function d(O,P){if(!c.Object(O)||c.Nil(O))return!1;var A;try{for(A in e){var m=e[A],o=O[A];y(m,o,P)}}catch(u){throw T(u,A)}if(P){for(A in O)if(!e[A])throw new g(void 0,A)}return!0}return d.toJSON=function(){return B(e)},d},anyOf:function(){var i=[].slice.call(arguments).map(p);function e(a,d){return i.some(function(O){try{return y(O,a,d)}catch{return!1}})}return e.toJSON=function(){return i.map(B).join("|")},e},allOf:function(){var i=[].slice.call(arguments).map(p);function e(a,d){return i.every(function(O){try{return y(O,a,d)}catch{return!1}})}return e.toJSON=function(){return i.map(B).join(" & ")},e},quacksLike:function(i){function e(a){return i===l(a)}return e.toJSON=function(){return i},e},tuple:function(){var i=[].slice.call(arguments).map(p);function e(a,d){return c.Nil(a)||c.Nil(a.length)||d&&a.length!==i.length?!1:i.every(function(O,P){try{return y(O,a[P],d)}catch(A){throw T(A,P)}})}return e.toJSON=function(){return"("+i.map(B).join(", ")+")"},e},value:function(i){function e(a){return a===i}return e.toJSON=function(){return i},e}};E.oneOf=E.anyOf;function p(t){if(c.String(t))return t[0]==="?"?E.maybe(t.slice(1)):c[t]||E.quacksLike(t);if(t&&c.Object(t)){if(c.Array(t)){if(t.length!==1)throw new TypeError("Expected compile() parameter of type Array of length 1");return E.arrayOf(t[0])}return E.object(t)}else if(c.Function(t))return t;return E.value(t)}function y(t,i,e,a){if(c.Function(t)){if(t(i,e))return!0;throw new b(a||t,i)}return y(p(t),i,e)}for(var _ in c)y[_]=c[_];for(_ in E)y[_]=E[_];var v=w(74307);for(_ in v)y[_]=v[_];y.compile=p,y.TfTypeError=b,y.TfPropertyTypeError=g,J.exports=y},30247:function(J){var N={Array:function(f){return f!=null&&f.constructor===Array},Boolean:function(f){return typeof f=="boolean"},Function:function(f){return typeof f=="function"},Nil:function(f){return f==null},Number:function(f){return typeof f=="number"},Object:function(f){return typeof f=="object"},String:function(f){return typeof f=="string"},"":function(){return!0}};N.Null=N.Nil;for(var w in N)N[w].toJSON=function(f){return f}.bind(null,w);J.exports=N},37174:function(J,N,w){var f=w(48764).Buffer,c=w(58334);function B(l,E){if(E!==void 0&&l[0]!==E)throw new Error("Invalid network version");if(l.length===33)return{version:l[0],privateKey:l.slice(1,33),compressed:!1};if(l.length!==34)throw new Error("Invalid WIF length");if(l[33]!==1)throw new Error("Invalid compression flag");return{version:l[0],privateKey:l.slice(1,33),compressed:!0}}function b(l,E,p){var y=new f(p?34:33);return y.writeUInt8(l,0),E.copy(y,1),p&&(y[33]=1),y}function g(l,E){return B(c.decode(l),E)}function T(l,E,p){return typeof l=="number"?c.encode(b(l,E,p)):c.encode(b(l.version,l.privateKey,l.compressed))}J.exports={decode:g,decodeRaw:B,encode:T,encodeRaw:b}}}]);
|