@gardenfi/swap 0.0.2-beta.1 → 0.0.2-beta.2

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.
Files changed (179) hide show
  1. package/dist/index104.cjs +1 -1
  2. package/dist/index104.js +4 -4
  3. package/dist/index106.cjs +1 -1
  4. package/dist/index106.js +3 -3
  5. package/dist/index107.cjs +1 -1
  6. package/dist/index107.js +3 -3
  7. package/dist/index116.cjs +1 -1
  8. package/dist/index116.js +1 -1
  9. package/dist/index117.cjs +1 -1
  10. package/dist/index117.js +1 -1
  11. package/dist/index120.cjs +1 -1
  12. package/dist/index120.js +2 -2
  13. package/dist/index121.cjs +1 -1
  14. package/dist/index121.js +7 -7
  15. package/dist/index132.cjs +1 -1
  16. package/dist/index132.js +1 -1
  17. package/dist/index133.cjs +1 -1
  18. package/dist/index133.js +1 -1
  19. package/dist/index134.cjs +1 -1
  20. package/dist/index134.js +1 -1
  21. package/dist/index135.cjs +1 -1
  22. package/dist/index135.js +1 -1
  23. package/dist/index138.cjs +1 -1
  24. package/dist/index138.js +2 -2
  25. package/dist/index161.cjs +1 -1
  26. package/dist/index161.js +2 -2
  27. package/dist/index167.cjs +1 -1
  28. package/dist/index167.js +2 -2
  29. package/dist/index168.cjs +1 -1
  30. package/dist/index168.js +2 -2
  31. package/dist/index169.cjs +1 -1
  32. package/dist/index169.js +2 -2
  33. package/dist/index170.cjs +1 -1
  34. package/dist/index170.js +2 -2
  35. package/dist/index171.cjs +1 -1
  36. package/dist/index171.js +2 -2
  37. package/dist/index172.cjs +1 -1
  38. package/dist/index172.js +2 -2
  39. package/dist/index181.cjs +1 -1
  40. package/dist/index181.js +1 -1
  41. package/dist/index272.cjs +1 -1
  42. package/dist/index272.js +174 -9
  43. package/dist/index273.cjs +2 -1
  44. package/dist/index273.js +91 -30
  45. package/dist/index274.cjs +1 -1
  46. package/dist/index274.js +41 -2
  47. package/dist/index275.cjs +1 -1
  48. package/dist/index275.js +4 -47
  49. package/dist/index276.cjs +1 -1
  50. package/dist/index276.js +9 -11
  51. package/dist/index277.cjs +1 -1
  52. package/dist/index277.js +30 -174
  53. package/dist/index278.cjs +1 -2
  54. package/dist/index278.js +2 -92
  55. package/dist/index279.cjs +1 -1
  56. package/dist/index279.js +45 -38
  57. package/dist/index280.cjs +1 -1
  58. package/dist/index280.js +11 -4
  59. package/dist/index281.cjs +1 -1
  60. package/dist/index281.js +3 -3
  61. package/dist/index299.cjs +1 -1
  62. package/dist/index299.js +7 -37
  63. package/dist/index300.cjs +1 -1
  64. package/dist/index300.js +36 -14
  65. package/dist/index301.cjs +1 -1
  66. package/dist/index301.js +15 -8
  67. package/dist/index302.cjs +1 -1
  68. package/dist/index302.js +43 -8
  69. package/dist/index303.cjs +1 -1
  70. package/dist/index303.js +317 -39
  71. package/dist/index304.cjs +1 -1
  72. package/dist/index304.js +586 -301
  73. package/dist/index305.cjs +1 -1
  74. package/dist/index305.js +107 -603
  75. package/dist/index306.cjs +1 -1
  76. package/dist/index306.js +168 -110
  77. package/dist/index307.cjs +1 -1
  78. package/dist/index307.js +299 -165
  79. package/dist/index308.cjs +1 -1
  80. package/dist/index308.js +92 -300
  81. package/dist/index309.cjs +1 -1
  82. package/dist/index309.js +56 -93
  83. package/dist/index310.cjs +1 -1
  84. package/dist/index310.js +52 -55
  85. package/dist/index311.cjs +1 -1
  86. package/dist/index311.js +42 -51
  87. package/dist/index312.cjs +1 -1
  88. package/dist/index312.js +14 -43
  89. package/dist/index313.cjs +1 -1
  90. package/dist/index313.js +317 -15
  91. package/dist/index314.cjs +1 -1
  92. package/dist/index314.js +53 -311
  93. package/dist/index315.cjs +1 -1
  94. package/dist/index315.js +19 -59
  95. package/dist/index316.cjs +1 -1
  96. package/dist/index316.js +29 -19
  97. package/dist/index317.cjs +1 -1
  98. package/dist/index317.js +3 -29
  99. package/dist/index318.cjs +7 -1
  100. package/dist/index318.js +237 -3
  101. package/dist/index319.cjs +1 -7
  102. package/dist/index319.js +48 -238
  103. package/dist/index320.cjs +1 -1
  104. package/dist/index320.js +213 -48
  105. package/dist/index321.cjs +1 -1
  106. package/dist/index321.js +75 -206
  107. package/dist/index322.cjs +1 -1
  108. package/dist/index322.js +26 -78
  109. package/dist/index323.cjs +1 -1
  110. package/dist/index323.js +73 -26
  111. package/dist/index324.cjs +1 -1
  112. package/dist/index324.js +7 -75
  113. package/dist/index326.cjs +1 -1
  114. package/dist/index326.js +1 -1
  115. package/dist/index327.cjs +1 -1
  116. package/dist/index327.js +1 -1
  117. package/dist/index333.cjs +1 -1
  118. package/dist/index333.js +2 -2
  119. package/dist/index334.cjs +1 -1
  120. package/dist/index334.js +2 -2
  121. package/dist/index346.cjs +1 -1
  122. package/dist/index346.js +1 -1
  123. package/dist/index347.cjs +1 -1
  124. package/dist/index347.js +1 -1
  125. package/dist/index348.cjs +1 -1
  126. package/dist/index348.js +3 -3
  127. package/dist/index349.cjs +2 -1
  128. package/dist/index349.js +193 -4
  129. package/dist/index350.cjs +1 -2
  130. package/dist/index350.js +52 -168
  131. package/dist/index351.cjs +1 -1
  132. package/dist/index351.js +331 -65
  133. package/dist/index352.cjs +1 -1
  134. package/dist/index352.js +149 -332
  135. package/dist/index353.cjs +1 -1
  136. package/dist/index353.js +5 -161
  137. package/dist/index354.cjs +1 -1
  138. package/dist/index354.js +5 -5
  139. package/dist/index357.cjs +1 -1
  140. package/dist/index357.js +205 -8
  141. package/dist/index359.cjs +1 -1
  142. package/dist/index359.js +8 -205
  143. package/dist/index363.cjs +1 -1
  144. package/dist/index363.js +1 -1
  145. package/dist/index364.cjs +1 -1
  146. package/dist/index364.js +1 -1
  147. package/dist/index365.cjs +1 -1
  148. package/dist/index365.js +73 -3
  149. package/dist/index366.cjs +1 -1
  150. package/dist/index366.js +29 -138
  151. package/dist/index367.cjs +1 -1
  152. package/dist/index367.js +5 -73
  153. package/dist/index368.cjs +1 -1
  154. package/dist/index368.js +2 -30
  155. package/dist/index369.cjs +1 -1
  156. package/dist/index369.js +140 -5
  157. package/dist/index370.cjs +1 -1
  158. package/dist/index370.js +1 -1
  159. package/dist/index373.cjs +1 -1
  160. package/dist/index373.js +1 -1
  161. package/dist/index374.cjs +1 -1
  162. package/dist/index374.js +1 -1
  163. package/dist/index375.cjs +1 -1
  164. package/dist/index375.js +2 -2
  165. package/dist/index379.cjs +1 -1
  166. package/dist/index379.js +1 -1
  167. package/dist/index380.cjs +1 -1
  168. package/dist/index380.js +1 -1
  169. package/dist/index381.cjs +1 -1
  170. package/dist/index381.js +22 -2
  171. package/dist/index382.cjs +1 -1
  172. package/dist/index382.js +2 -22
  173. package/dist/index385.cjs +1 -1
  174. package/dist/index385.js +2 -2
  175. package/dist/index77.cjs +1 -1
  176. package/dist/index77.js +13 -13
  177. package/dist/index99.cjs +1 -1
  178. package/dist/index99.js +1 -1
  179. package/package.json +5 -5
package/dist/index305.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let h;function E(n){return{lang:(n==null?void 0:n.lang)??(h==null?void 0:h.lang),message:n==null?void 0:n.message,abortEarly:(n==null?void 0:n.abortEarly)??(h==null?void 0:h.abortEarly),abortPipeEarly:(n==null?void 0:n.abortPipeEarly)??(h==null?void 0:h.abortPipeEarly)}}let g;function _(n){return g==null?void 0:g.get(n)}let k;function S(n){return k==null?void 0:k.get(n)}let d;function I(n,r){var e;return(e=d==null?void 0:d.get(n))==null?void 0:e.get(r)}function x(n){var e,s;const r=typeof n;return r==="string"?`"${n}"`:r==="number"||r==="bigint"||r==="boolean"?`${n}`:r==="object"||r==="function"?(n&&((s=(e=Object.getPrototypeOf(n))==null?void 0:e.constructor)==null?void 0:s.name))??"null":r}function y(n,r,e,s,u){const l=u&&"input"in u?u.input:e.value,i=(u==null?void 0:u.expected)??n.expects??null,a=(u==null?void 0:u.received)??x(l),t={kind:n.kind,type:n.type,input:l,expected:i,received:a,message:`Invalid ${r}: ${i?`Expected ${i} but r`:"R"}eceived ${a}`,requirement:n.requirement,path:u==null?void 0:u.path,issues:u==null?void 0:u.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},f=n.kind==="schema",p=(u==null?void 0:u.message)??n.message??I(n.reference,t.lang)??(f?S(t.lang):null)??s.message??_(t.lang);p!==void 0&&(t.message=typeof p=="function"?p(t):p),f&&(e.typed=!1),e.issues?e.issues.push(t):e.issues=[t]}function c(n){return{version:1,vendor:"valibot",validate(r){return n["~run"]({value:r},E())}}}function P(n,r){return Object.hasOwn(n,r)&&r!=="__proto__"&&r!=="prototype"&&r!=="constructor"}function w(n,r){const e=[...new Set(n)];return e.length>1?`(${e.join(` ${r} `)})`:e[0]??"never"}var D=class extends Error{constructor(n){super(n[0].message),this.name="ValiError",this.issues=n}};function O(n,r){return{kind:"validation",type:"check",reference:O,async:!1,expects:null,requirement:n,message:r,"~run"(e,s){return e.typed&&!this.requirement(e.value)&&y(this,"input",e,s),e}}}function M(n){return{kind:"validation",type:"integer",reference:M,async:!1,expects:null,requirement:Number.isInteger,message:n,"~run"(r,e){return r.typed&&!this.requirement(r.value)&&y(this,"integer",r,e),r}}}function A(n){return{kind:"transformation",type:"transform",reference:A,async:!1,operation:n,"~run"(r){return r.value=this.operation(r.value),r}}}function V(n,r,e){return typeof n.fallback=="function"?n.fallback(r,e):n.fallback}function b(n,r,e){return typeof n.default=="function"?n.default(r,e):n.default}function W(n,r){return!n["~run"]({value:r},{abortEarly:!0}).issues}function q(n,r){return{kind:"schema",type:"array",reference:q,expects:"Array",async:!1,item:n,message:r,get"~standard"(){return c(this)},"~run"(e,s){var l;const u=e.value;if(Array.isArray(u)){e.typed=!0,e.value=[];for(let i=0;i<u.length;i++){const a=u[i],t=this.item["~run"]({value:a},s);if(t.issues){const f={type:"array",origin:"value",input:u,key:i,value:a};for(const p of t.issues)p.path?p.path.unshift(f):p.path=[f],(l=e.issues)==null||l.push(p);if(e.issues||(e.issues=t.issues),s.abortEarly){e.typed=!1;break}}t.typed||(e.typed=!1),e.value.push(t.value)}}else y(this,"type",e,s);return e}}}function G(n){return{kind:"schema",type:"bigint",reference:G,expects:"bigint",async:!1,message:n,get"~standard"(){return c(this)},"~run"(r,e){return typeof r.value=="bigint"?r.typed=!0:y(this,"type",r,e),r}}}function z(n){return{kind:"schema",type:"boolean",reference:z,expects:"boolean",async:!1,message:n,get"~standard"(){return c(this)},"~run"(r,e){return typeof r.value=="boolean"?r.typed=!0:y(this,"type",r,e),r}}}function K(n){return{kind:"schema",type:"lazy",reference:K,expects:"unknown",async:!1,getter:n,get"~standard"(){return c(this)},"~run"(r,e){return this.getter(r.value)["~run"](r,e)}}}function N(n,r){return{kind:"schema",type:"literal",reference:N,expects:x(n),async:!1,literal:n,message:r,get"~standard"(){return c(this)},"~run"(e,s){return e.value===this.literal?e.typed=!0:y(this,"type",e,s),e}}}function C(n,r){return{kind:"schema",type:"nullable",reference:C,expects:`(${n.expects} | null)`,async:!1,wrapped:n,default:r,get"~standard"(){return c(this)},"~run"(e,s){return e.value===null&&(this.default!==void 0&&(e.value=b(this,e,s)),e.value===null)?(e.typed=!0,e):this.wrapped["~run"](e,s)}}}function F(n,r){return{kind:"schema",type:"nullish",reference:F,expects:`(${n.expects} | null | undefined)`,async:!1,wrapped:n,default:r,get"~standard"(){return c(this)},"~run"(e,s){return(e.value===null||e.value===void 0)&&(this.default!==void 0&&(e.value=b(this,e,s)),e.value===null||e.value===void 0)?(e.typed=!0,e):this.wrapped["~run"](e,s)}}}function R(n){return{kind:"schema",type:"number",reference:R,expects:"number",async:!1,message:n,get"~standard"(){return c(this)},"~run"(r,e){return typeof r.value=="number"&&!isNaN(r.value)?r.typed=!0:y(this,"type",r,e),r}}}function T(n,r){return{kind:"schema",type:"object",reference:T,expects:"Object",async:!1,entries:n,message:r,get"~standard"(){return c(this)},"~run"(e,s){var l;const u=e.value;if(u&&typeof u=="object"){e.typed=!0,e.value={};for(const i in this.entries){const a=this.entries[i];if(i in u||(a.type==="exact_optional"||a.type==="optional"||a.type==="nullish")&&a.default!==void 0){const t=i in u?u[i]:b(a),f=a["~run"]({value:t},s);if(f.issues){const p={type:"object",origin:"value",input:u,key:i,value:t};for(const o of f.issues)o.path?o.path.unshift(p):o.path=[p],(l=e.issues)==null||l.push(o);if(e.issues||(e.issues=f.issues),s.abortEarly){e.typed=!1;break}}f.typed||(e.typed=!1),e.value[i]=f.value}else if(a.fallback!==void 0)e.value[i]=V(a);else if(a.type!=="exact_optional"&&a.type!=="optional"&&a.type!=="nullish"&&(y(this,"key",e,s,{input:void 0,expected:`"${i}"`,path:[{type:"object",origin:"key",input:u,key:i,value:u[i]}]}),s.abortEarly))break}}else y(this,"type",e,s);return e}}}function B(n,r){return{kind:"schema",type:"optional",reference:B,expects:`(${n.expects} | undefined)`,async:!1,wrapped:n,default:r,get"~standard"(){return c(this)},"~run"(e,s){return e.value===void 0&&(this.default!==void 0&&(e.value=b(this,e,s)),e.value===void 0)?(e.typed=!0,e):this.wrapped["~run"](e,s)}}}function H(n,r,e){return{kind:"schema",type:"record",reference:H,expects:"Object",async:!1,key:n,value:r,message:e,get"~standard"(){return c(this)},"~run"(s,u){var i,a;const l=s.value;if(l&&typeof l=="object"){s.typed=!0,s.value={};for(const t in l)if(P(l,t)){const f=l[t],p=this.key["~run"]({value:t},u);if(p.issues){const m={type:"object",origin:"key",input:l,key:t,value:f};for(const v of p.issues)v.path=[m],(i=s.issues)==null||i.push(v);if(s.issues||(s.issues=p.issues),u.abortEarly){s.typed=!1;break}}const o=this.value["~run"]({value:f},u);if(o.issues){const m={type:"object",origin:"value",input:l,key:t,value:f};for(const v of o.issues)v.path?v.path.unshift(m):v.path=[m],(a=s.issues)==null||a.push(v);if(s.issues||(s.issues=o.issues),u.abortEarly){s.typed=!1;break}}(!p.typed||!o.typed)&&(s.typed=!1),p.typed&&(s.value[p.value]=o.value)}}else y(this,"type",s,u);return s}}}function J(n){return{kind:"schema",type:"string",reference:J,expects:"string",async:!1,message:n,get"~standard"(){return c(this)},"~run"(r,e){return typeof r.value=="string"?r.typed=!0:y(this,"type",r,e),r}}}function L(n,r){return{kind:"schema",type:"tuple",reference:L,expects:"Array",async:!1,items:n,message:r,get"~standard"(){return c(this)},"~run"(e,s){var l;const u=e.value;if(Array.isArray(u)){e.typed=!0,e.value=[];for(let i=0;i<this.items.length;i++){const a=u[i],t=this.items[i]["~run"]({value:a},s);if(t.issues){const f={type:"array",origin:"value",input:u,key:i,value:a};for(const p of t.issues)p.path?p.path.unshift(f):p.path=[f],(l=e.issues)==null||l.push(p);if(e.issues||(e.issues=t.issues),s.abortEarly){e.typed=!1;break}}t.typed||(e.typed=!1),e.value.push(t.value)}}else y(this,"type",e,s);return e}}}function j(n){let r;if(n)for(const e of n)r?r.push(...e.issues):r=e.issues;return r}function Q(n,r){return{kind:"schema",type:"union",reference:Q,expects:w(n.map(e=>e.expects),"|"),async:!1,options:n,message:r,get"~standard"(){return c(this)},"~run"(e,s){let u,l,i;for(const a of this.options){const t=a["~run"]({value:e.value},s);if(t.typed)if(t.issues)l?l.push(t):l=[t];else{u=t;break}else i?i.push(t):i=[t]}if(u)return u;if(l){if(l.length===1)return l[0];y(this,"type",e,s,{issues:j(l)}),e.typed=!0}else{if((i==null?void 0:i.length)===1)return i[0];y(this,"type",e,s,{issues:j(i)})}return e}}}function U(){return{kind:"schema",type:"unknown",reference:U,expects:"unknown",async:!1,get"~standard"(){return c(this)},"~run"(n){return n.typed=!0,n}}}function X(n,r,e){const s=n["~run"]({value:r},E(e));if(s.issues)throw new D(s.issues);return s.value}function Y(...n){return{...n[0],pipe:n,get"~standard"(){return c(this)},"~run"(r,e){for(const s of n)if(s.kind!=="metadata"){if(r.issues&&(s.kind==="schema"||s.kind==="transformation")){r.typed=!1;break}(!r.issues||!e.abortEarly&&!e.abortPipeEarly)&&(r=s["~run"](r,e))}return r}}}exports.ValiError=D;exports._addIssue=y;exports._getStandardProps=c;exports._isValidObjectKey=P;exports._joinExpects=w;exports._stringify=x;exports.array=q;exports.bigint=G;exports.boolean=z;exports.check=O;exports.getDefault=b;exports.getFallback=V;exports.getGlobalConfig=E;exports.getGlobalMessage=_;exports.getSchemaMessage=S;exports.getSpecificMessage=I;exports.integer=M;exports.is=W;exports.lazy=K;exports.literal=N;exports.nullable=C;exports.nullish=F;exports.number=R;exports.object=T;exports.optional=B;exports.parse=X;exports.pipe=Y;exports.record=H;exports.string=J;exports.transform=A;exports.tuple=L;exports.union=Q;exports.unknown=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index114.cjs"),t=require("./index304.cjs"),c=require("./index117.cjs"),a=require("./index306.cjs"),p={MoveCall(e){const[n,r="",i=""]="target"in e?e.target.split("::"):[e.package,e.module,e.function];return{$kind:"MoveCall",MoveCall:{package:n,module:r,function:i,typeArguments:e.typeArguments??[],arguments:e.arguments??[]}}},TransferObjects(e,n){return{$kind:"TransferObjects",TransferObjects:{objects:e.map(r=>t.parse(a.ArgumentSchema,r)),address:t.parse(a.ArgumentSchema,n)}}},SplitCoins(e,n){return{$kind:"SplitCoins",SplitCoins:{coin:t.parse(a.ArgumentSchema,e),amounts:n.map(r=>t.parse(a.ArgumentSchema,r))}}},MergeCoins(e,n){return{$kind:"MergeCoins",MergeCoins:{destination:t.parse(a.ArgumentSchema,e),sources:n.map(r=>t.parse(a.ArgumentSchema,r))}}},Publish({modules:e,dependencies:n}){return{$kind:"Publish",Publish:{modules:e.map(r=>typeof r=="string"?r:m.toBase64(new Uint8Array(r))),dependencies:n.map(r=>c.normalizeSuiObjectId(r))}}},Upgrade({modules:e,dependencies:n,package:r,ticket:i}){return{$kind:"Upgrade",Upgrade:{modules:e.map(s=>typeof s=="string"?s:m.toBase64(new Uint8Array(s))),dependencies:n.map(s=>c.normalizeSuiObjectId(s)),package:r,ticket:t.parse(a.ArgumentSchema,i)}}},MakeMoveVec({type:e,elements:n}){return{$kind:"MakeMoveVec",MakeMoveVec:{type:e??null,elements:n.map(r=>t.parse(a.ArgumentSchema,r))}}},Intent({name:e,inputs:n={},data:r={}}){return{$kind:"$Intent",$Intent:{name:e,inputs:Object.fromEntries(Object.entries(n).map(([i,s])=>[i,Array.isArray(s)?s.map(o=>t.parse(a.ArgumentSchema,o)):t.parse(a.ArgumentSchema,s)])),data:r}}}};exports.Commands=p;