UNPKG

wowok_agent

Version:

Create, collaborate, and transact on your own terms with the AI-driven web3 collaboration protocol.

1 lines 23.2 kB
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[485],{4313:(t,s,e)=>{e.d(s,{w:()=>n});var i=e(1609),r=e(9554),a=e(5337);class n{pay_token_type;permission;object;txb;get_pay_type(){return this.pay_token_type}get_object(){return this.object}constructor(t,s,e){this.pay_token_type=s,this.txb=t,this.permission=e,this.object=""}static From(t,s,e,i){let a=new n(t,s,e);return a.object=r.Zs.TXB_OBJECT(t,i),a}static New(t,s,e,o,b,h,p){r.Zs.IsValidObjects([e,h])||(0,a.f)(a.I.IsValidObjects),(0,i.MA)(s)||(0,a.f)(a.I.IsValidTokenType,"New.token_type"),(0,i.yW)(o)||(0,a.f)(a.I.IsValidDesription),(0,i.Ec)(b)||(0,a.f)(a.I.IsValidU64,"New.fee");let _=s,d=new n(t,_,e);return d.object=p?t.moveCall({target:r.Zs.Instance().arbitrationFn("new_with_passport"),arguments:[p,t.pure.string(o),t.pure.u64(b),t.object(h),r.Zs.TXB_OBJECT(t,e)],typeArguments:[_]}):t.moveCall({target:r.Zs.Instance().arbitrationFn("new"),arguments:[t.pure.string(o),t.pure.u64(b),t.object(h),r.Zs.TXB_OBJECT(t,e)],typeArguments:[_]}),d}launch(){return this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("create"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object)],typeArguments:[this.pay_token_type]})}set_description(t,s){(0,i.yW)(t)||(0,a.f)(a.I.IsValidDesription,"set_description.description"),s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("description_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("description_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_fee(t,s){(0,i.Ec)(t)||(0,a.f)(a.I.IsValidU64,"set_fee.fee"),s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("fee_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.u64(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("fee_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.u64(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_endpoint(t,s){t&&!(0,i.Eh)(t)&&(0,a.f)(a.I.IsValidEndpoint,"set_endpoint.endpoint"),s?t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_none_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("endpoint_none"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}add_voting_guard(t,s){0!==t.length&&((0,i.ij)(t,(t=>r.Zs.IsValidObjects([t.guard])&&(0,i.Ec)(t.voting_weight)))||(0,a.f)(a.I.IsValidArray,"add_voting_guard.guard"),s?t.forEach((t=>{this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_add_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.guard),this.txb.pure.u64(t.voting_weight),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})})):t.forEach((t=>{this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_add"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.guard),this.txb.pure.u64(t.voting_weight),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})})))}remove_voting_guard(t,s,e){(s||0!==t.length)&&((0,i.ij)(t,i.jE)||(0,a.f)(a.I.IsValidArray,"remove_voting_guard.guard"),e?s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_removeall_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_remove_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_removeall"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("voting_guard_remove"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("address",t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}))}set_guard(t,s){t&&!(0,i.jE)(t)&&(0,a.f)(a.I.IsValidAddress,"set_guard.apply_guard"),s?t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_none_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):t?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("usage_guard_none"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}pause(t,s){s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("pause_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("pause"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}vote(t,s){t.voting_guard&&!r.Zs.IsValidObjects([t.voting_guard])&&(0,a.f)(a.I.IsValidObjects,"vote.param.voting_guard"),(0,i.ij)(t.agrees,(t=>(0,i.Ec)(t)&&t<n.MAX_PROPOSITION_COUNT))||(0,a.f)(a.I.IsValidArray,"vote.param.agrees"),r.Zs.IsValidObjects([t.arb])||(0,a.f)(a.I.IsValidObjects,"vote.param.arb");const e=this.txb.sharedObjectRef(r.Zs.CLOCK_OBJECT);s?t.voting_guard?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("vote_with_passport"),arguments:[s,this.txb.object(t.voting_guard),r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.vector("u8",t.agrees),this.txb.object(e),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("vote2_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.vector("u8",t.agrees),this.txb.object(e),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("vote"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.vector("u8",t.agrees),this.txb.object(e),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}arbitration(t,s){(0,i.yW)(t.feedback)||(0,a.f)(a.I.IsValidDesription,"arbitration.param.feedback"),r.Zs.IsValidObjects([t.arb])||(0,a.f)(a.I.IsValidObjects,"arbitration.param.arb"),t.indemnity&&!(0,i.Ec)(t.indemnity)&&(0,a.f)(a.I.IsValidU64,"arbitration.param.indemnity");let e=this.txb.pure.option("u64",t.indemnity?t.indemnity:void 0);s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("arbitration_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.string(t.feedback),e,r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("arbitration"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.arb),this.txb.pure.string(t.feedback),e,r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}withdraw_fee(t,s,e){r.Zs.IsValidObjects([t,s.treasury])||(0,a.f)(a.I.IsValidObjects,"withdraw_fee.arb or treasury"),s?.for_guard&&!r.Zs.IsValidObjects([s.for_guard])&&(0,a.f)(a.I.IsValidObjects,"withdraw_fee.param.for_guard"),s?.for_object&&!(0,i.jE)(s.for_object)&&(0,a.f)(a.I.IsValidAddress,"withdraw_fee.param.for_object"),(0,i.yW)(s.remark)||(0,a.f)(a.I.IsValidDesription,"withdraw_fee.param.remark"),(0,i.Ec)(s.index)||(0,a.f)(a.I.IsValidU64,"withdraw_fee.param.index");const n=this.txb.pure.option("address",s.for_object?s.for_object:void 0),o=this.txb.sharedObjectRef(r.Zs.CLOCK_OBJECT);return e?s.for_guard?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_forGuard_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.object(s.for_guard),this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_with_passport"),arguments:[e,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):s.for_guard?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_forGuard"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.object(s.for_guard),this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),this.txb.object(s.treasury),n,this.txb.pure.u64(s.index),this.txb.pure.string(s.remark),this.txb.object(o),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}set_withdrawTreasury(t,s){r.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects,"set_withdrawTreasury.treasury"),s?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_treasury_set_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("withdraw_treasury_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t),r.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.pay_token_type]})}arb(t,s){return r.Zs.IsValidObjects([t.order])||(0,a.f)(a.I.IsValidObjects,"arb.param.order"),(0,i.MA)(t.order_token_type)||(0,a.f)(a.I.IsValidTokenType,"arb.param.order_token_type"),(0,i.yW)(t.description)||(0,a.f)(a.I.IsValidDesription,"arb.param.description"),(0,i.ij)(t.votable_proposition,i.S7)||(0,a.f)(a.I.IsValidArray,"arb.param.votable_proposition"),s?t.fee?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("dispute_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition)),this.txb.object(t.fee)],typeArguments:[this.pay_token_type,t.order_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("free_dispute_with_passport"),arguments:[s,r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition))],typeArguments:[this.pay_token_type,t.order_token_type]}):t.fee?this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("dispute"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition)),this.txb.object(t.fee)],typeArguments:[this.pay_token_type,t.order_token_type]}):this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("free_dispute"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(t.order),this.txb.pure.string(t.description),this.txb.pure.vector("string",(0,i.SI)(t.votable_proposition))],typeArguments:[this.pay_token_type,t.order_token_type]})}arb_launch(t){return this.txb.moveCall({target:r.Zs.Instance().arbFn("create"),arguments:[r.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.pay_token_type]})}dispute(t,s){const e=this.arb(t,s);return this.arb_launch(e)}change_permission(t){r.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects),this.txb.moveCall({target:r.Zs.Instance().arbitrationFn("permission_set"),arguments:[r.Zs.TXB_OBJECT(this.txb,this.object),r.Zs.TXB_OBJECT(this.txb,this.permission),r.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.pay_token_type]}),this.permission=t}static parseObjectType=t=>(0,i.q5)(t,"arbitration::Arbitration<");static parseArbObjectType=t=>(0,i.q5)(t,"arb::Arb<");static queryArbVoted=()=>{};static MAX_PROPOSITION_COUNT=16;static MAX_VOTING_GUARD_COUNT=16}},5337:(t,s,e)=>{var i;e.d(s,{I:()=>i,f:()=>r}),function(t){t.IsValidDesription="invalid description",t.IsValidName="invalid name",t.IsValidName_AllowEmpty="invalid name",t.IsValidEndpoint="invalid endpoint",t.IsValidAddress="invalid address",t.IsValidArgType="invalid argument type",t.IsValidTokenType="invalid token type",t.IsValidUint="invalid uint",t.IsValidInt="invalid int",t.IsValidU64="invalid u64",t.IsValidU8="invalid u8",t.IsValidPercent="invalid percent",t.IsValidArray="invalid array",t.IsValidObjects="invalid objects",t.AllInvalid="one valid at least",t.InvalidParam="invalid parameter",t.IsValidPermissionIndex="invalid permission index",t.IsValidKey="invalid key",t.Fail="fail",t.IsValidIndentifier="indentifier invalid",t.isValidHttpUrl="invalid url",t.IsValidBizPermissionIndex="invalid biz-permission index",t.bcsTypeInvalid="invalid bcs type",t.IsValidServiceItemName="invalid service item name",t.IsValidCoinType="not the coin type",t.IsValidGuardIdentifier="guard identifier invalid",t.noPermission="no permission"}(i||(i={}));const r=(t,s)=>{throw t.toString()+(s?" "+s:"")}},6601:(t,s,e)=>{e.d(s,{w:()=>n});var i=e(9554),r=e(1609),a=e(5337);class n{object;txb;get_object(){return this.object}constructor(t){this.txb=t,this.object=""}static From(t){let s=new n(t);return s.object=i.Zs.TXB_OBJECT(t,i.Zs.Instance().objectEntity()),s}mark(t,s,e){"string"!=typeof s||(0,r.jE)(s)||(0,a.f)(a.I.IsValidAddress,e),this.txb.moveCall({target:i.Zs.Instance().entityFn(e),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object()),"string"==typeof s?this.txb.pure.address(s):s]})}update(t){t?.name&&!(0,r.S7)(t.name)&&(0,a.f)(a.I.IsValidName,"update"),t?.description&&!(0,r.yW)(t.description)&&(0,a.f)(a.I.IsValidDesription,"update"),t?.avatar&&!(0,r.U8)(t.avatar)&&(0,a.f)(a.I.isValidHttpUrl,"update:avatar"),t?.twitter&&!(0,r.S7)(t.twitter)&&(0,a.f)(a.I.IsValidName,"update:twitter"),t?.homepage&&!(0,r.U8)(t.homepage)&&(0,a.f)(a.I.isValidHttpUrl,"update:homepage"),t?.discord&&!(0,r.S7)(t.discord)&&(0,a.f)(a.I.IsValidName,"update:discord");const s=r.ji.getInstance().bcs.ser("PersonalInfo",{name:t.name?(new TextEncoder).encode(t.name):"",description:t?.description?(new TextEncoder).encode(t.description):"",avatar:t?.avatar??"",twitter:t?.twitter??"",discord:t?.discord??"",homepage:t?.homepage??""}).toBytes();this.txb.moveCall({target:i.Zs.Instance().entityFn("avatar_update"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.vector("u8",[].slice.call(s))]})}create_resource(){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_create"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)]})}create_resource2(){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_create2"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)]})}destroy_resource(t){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_destroy"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object())]})}use_resource(t){return this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_use"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object())]})}transfer_resource(t,s){return(0,r.jE)(s)||(0,a.f)(a.I.IsValidAddress,"transfer_resource"),this.txb.moveCall({target:i.Zs.Instance().entityFn("resource_transfer"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t.get_object()),this.txb.pure.address(s)]})}query_ent(t){(0,r.jE)(t)||(0,a.f)(a.I.InvalidParam,"query_ent"),this.txb.moveCall({target:i.Zs.Instance().entityFn("QueryEnt"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t)]})}}},8021:(t,s,e)=>{e.d(s,{Y:()=>n});var i=e(9554),r=e(1609),a=e(5337);class n{bounty_type;permission;object;txb;get_bounty_type(){return this.bounty_type}get_object(){return this.object}static From(t,s,e,r){let a=new n(t,s,e);return a.object=i.Zs.TXB_OBJECT(t,r),a}constructor(t,s,e){this.bounty_type=s,this.permission=e,this.txb=t,this.object=""}static New(t,s,e,o,b,h,p){(0,r.yW)(h)||(0,a.f)(a.I.IsValidDesription),(0,r.Tg)(s)||(0,a.f)(a.I.IsValidArgType,s),(0,r.Ec)(o)||(0,a.f)(a.I.IsValidUint,"time");let _=new n(t,s,b);const d=t.sharedObjectRef(i.Zs.CLOCK_OBJECT);return _.object=p?t.moveCall({target:i.Zs.Instance().demandFn("new_with_passport"),arguments:[p,t.pure.string(h),t.pure.bool(e),t.pure.u64(o),t.object(d),i.Zs.TXB_OBJECT(t,b)],typeArguments:[s]}):t.moveCall({target:i.Zs.Instance().demandFn("new"),arguments:[t.pure.string(h),t.pure.bool(e),t.pure.u64(o),t.object(d),i.Zs.TXB_OBJECT(t,b)],typeArguments:[s]}),_}launch(){return this.txb.moveCall({target:i.Zs.Instance().demandFn("create"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object)],typeArguments:[this.bounty_type]})}refund(t){const s=this.txb.sharedObjectRef(i.Zs.CLOCK_OBJECT);t?this.txb.moveCall({target:i.Zs.Instance().demandFn("refund_with_passport"),arguments:[t,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("refund"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.object(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}expand_time(t,s,e){(0,r.Ec)(s)||(0,a.f)(a.I.IsValidUint,"time"),e?this.txb.moveCall({target:i.Zs.Instance().demandFn("time_expand_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),this.txb.pure.u64(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("time_expand"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.bool(t),this.txb.pure.u64(s),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}set_guard(t,s,e){t&&!i.Zs.IsValidObjects([t])&&(0,a.f)(a.I.IsValidObjects,"guard"),void 0===s||(0,r.U5)(s)||(0,a.f)(a.I.InvalidParam,"set_guard.service_identifier");let n=this.txb.pure.option("u8",void 0!==s?s:void 0);e?t?this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_set_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),n,i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_none_with_passport"),arguments:[e,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):t?this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),n,i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("guard_none"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}set_description(t,s){(0,r.yW)(t)||(0,a.f)(a.I.IsValidDesription),s?this.txb.moveCall({target:i.Zs.Instance().demandFn("description_set_with_passport"),arguments:[s,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("description_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}yes(t,s){(0,r.jE)(t)||(0,a.f)(a.I.IsValidAddress),s?this.txb.moveCall({target:i.Zs.Instance().demandFn("yes_with_passport"),arguments:[s,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("yes"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.address(t),i.Zs.TXB_OBJECT(this.txb,this.permission)],typeArguments:[this.bounty_type]})}deposit(t){i.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects),this.txb.moveCall({target:i.Zs.Instance().demandFn("deposit"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.bounty_type]})}present(t,s,e,n){(0,r.yW)(e)||(0,a.f)(a.I.IsValidDesription,"present.tips"),s&&!(0,r.Tg)(s)&&(0,a.f)(a.I.IsValidArgType,"service_pay_type"),"number"==typeof t?(0,r.U5)(t)&&n||(0,a.f)(a.I.IsValidU8,"present.service or present.passport"):i.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects,"present.service"),n?"number"==typeof t?this.txb.moveCall({target:i.Zs.Instance().demandFn("present_with_passport2"),arguments:[n,i.Zs.TXB_OBJECT(this.txb,this.object),this.txb.pure.string(e)],typeArguments:[this.bounty_type]}):this.txb.moveCall({target:i.Zs.Instance().demandFn("present_with_passport"),arguments:[n,i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),this.txb.pure.string(e)],typeArguments:[this.bounty_type,s]}):"number"!=typeof t&&this.txb.moveCall({target:i.Zs.Instance().demandFn("present"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,t),this.txb.pure.string(e)],typeArguments:[this.bounty_type,s]})}change_permission(t){i.Zs.IsValidObjects([t])||(0,a.f)(a.I.IsValidObjects),this.txb.moveCall({target:i.Zs.Instance().demandFn("permission_set"),arguments:[i.Zs.TXB_OBJECT(this.txb,this.object),i.Zs.TXB_OBJECT(this.txb,this.permission),i.Zs.TXB_OBJECT(this.txb,t)],typeArguments:[this.bounty_type]}),this.permission=t}static parseObjectType=t=>(0,r.q5)(t,"demand::Demand<");static MAX_BOUNTY_COUNT=300;static MAX_PRESENTERS_COUNT=200}}}]);