@subwallet/web-runner 1.2.29-0 → 1.2.31-0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,11 +36,20 @@ PERFORMANCE OF THIS SOFTWARE.
36
36
 
37
37
  /*! Bundled license information:
38
38
 
39
+ @noble/hashes/esm/utils.js:
40
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
41
+ */
42
+
43
+ /*! Bundled license information:
44
+
39
45
  @trpc/client/dist/httpUtils-b9d0cb48.mjs:
40
46
  (* istanbul ignore if -- @preserve *)
41
47
 
42
48
  @trpc/client/dist/links/wsLink.mjs:
43
49
  (* istanbul ignore next -- @preserve *)
50
+
51
+ @noble/hashes/esm/utils.js:
52
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
44
53
  */
45
54
 
46
55
  /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
package/web-runner.zip CHANGED
Binary file
@@ -1 +0,0 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunk_subwallet_web_runner=("undefined"!=typeof self?self:this).webpackChunk_subwallet_web_runner||[]).push([[832],{89832:(e,s,r)=>{r.d(s,{requestSwapDepositAddress:()=>z});var n=r(90570),t=r(69080),o=r(44869),a=r(76515),i=r(53396),c=(0,t.K2)((e=>e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`))),"camelToSnakeCase"),d=(0,t.K2)((e=>{if(!e)return;const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[c(r)]=e[r]);return s}),"transformObjToSnakeCase"),p=(0,t.K2)(((e,s)=>e===t.P_.Polkadot?s.startsWith("0x")?t.z.string().length(66).parse(s):(0,o.X)((0,a.F)(s)):s),"submitAddress"),u=t.z.union([t.z.object({error:t.z.object({code:t.z.number().optional(),message:t.z.string().optional(),data:t.z.unknown().optional()})}),t.z.object({result:t.z.unknown()})]),l=(0,t.K2)((e=>({requestSwapDepositAddress:t.z.tuple([t.LQ,t.LQ,t.z.union([t.zh,t.zO,(0,t.SM)(e)]),t.z.number(),n.i.merge(t.z.object({gasBudget:t.uH,cfParameters:t.z.union([t.zO,t.z.string()]).optional()})).optional(),t.z.number().optional()]).transform((([e,s,r,n,t,o])=>[e,s,r,n,d(t),o]))})),"requestValidators"),b=(0,t.K2)((e=>({requestSwapDepositAddress:t.z.object({address:t.z.union([t.OS,t.M$,(0,t.SM)(e)]),issued_block:t.z.number(),channel_id:t.z.number(),expiry_block:t.z.number().int().safe().positive().optional(),source_chain_expiry_block:t.wF.optional(),channel_opening_fee:t.L1.optional().default(0)}).transform((({address:e,issued_block:s,channel_id:r,source_chain_expiry_block:n,channel_opening_fee:t})=>({address:e,issuedBlock:s,channelId:BigInt(r),sourceChainExpiryBlock:n,channelOpeningFee:t})))})),"responseValidators"),h=(0,t.K2)((async(e,s,r,...n)=>{const t=await i.A.post(s.toString(),{jsonrpc:"2.0",id:1,method:`broker_${r}`,params:l(e)[r].parse(n)}),o=u.parse(t.data);if("error"in o)throw new Error(`Broker responded with error code ${o.error.code}: ${o.error.message}`);return b(e)[r].parse(o.result)}),"makeRpcRequest");async function z(e,s,r){const{srcAsset:n,srcChain:t,destAsset:o,destChain:a,destAddress:i,boostFeeBps:c}=e;return h(r,s.url,"requestSwapDepositAddress",{asset:n,chain:t},{asset:o,chain:a},p(a,i),s.commissionBps,e.ccmMetadata&&{...e.ccmMetadata,cfParameters:void 0},c)}(0,t.K2)(z,"requestSwapDepositAddress")}}]);