@polkadot-api/metadata-builders
Advanced tools
Comparing version 0.0.1-83af35f36aae2284d04778942f7df6331c60a409.1.0 to 0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0
@@ -254,8 +254,9 @@ "use strict"; | ||
if (input.type === "sequence" && input.value.type === "primitive" && input.value.value === "u8") { | ||
declarations.imports.add("Hex"); | ||
declarations.imports.add("Bin"); | ||
declarations.typeImports.add("HexString"); | ||
declarations.typeImports.add("Binary"); | ||
const variable = { | ||
id: "_bytesSeq", | ||
value: "Hex()", | ||
types: "HexString", | ||
value: "Bin()", | ||
types: "Binary", | ||
directDependencies: /* @__PURE__ */ new Set() | ||
@@ -325,10 +326,11 @@ }; | ||
} | ||
declarations.imports.add("Hex"); | ||
declarations.imports.add("Bin"); | ||
declarations.variables.set(varId, { | ||
id: varId, | ||
value: `Hex(${input.len})`, | ||
types: "HexString", | ||
value: `Bin(${input.len})`, | ||
types: "Binary", | ||
directDependencies: /* @__PURE__ */ new Set() | ||
}); | ||
declarations.typeImports.add("HexString"); | ||
declarations.typeImports.add("Binary"); | ||
return varId; | ||
@@ -353,19 +355,3 @@ } | ||
if (value.value.length === 1) { | ||
let result; | ||
const innerVal = value.value[0]; | ||
if (key.startsWith("Raw") && innerVal.type === "array" && isBytes(innerVal.value)) { | ||
const id = `_fixedStr${innerVal.len}`; | ||
result = id; | ||
if (!declarations.variables.has(id)) { | ||
declarations.imports.add("fixedStr"); | ||
declarations.variables.set(id, { | ||
id, | ||
value: `fixedStr(${innerVal.len})`, | ||
types: "string", | ||
directDependencies: /* @__PURE__ */ new Set() | ||
}); | ||
} | ||
} else { | ||
result = buildNextSyntax(value.value[0]); | ||
} | ||
let result = buildNextSyntax(value.value[0]); | ||
if (!declarations.variables.has(varName)) { | ||
@@ -557,3 +543,3 @@ declarations.variables.set(varName, { | ||
var scale = __toESM(require("@polkadot-api/substrate-bindings")); | ||
var _bytes = scale.Hex(); | ||
var _bytes = scale.Bin(); | ||
var isBytes2 = (input) => input.type === "primitive" && input.value === "u8"; | ||
@@ -584,3 +570,3 @@ var _buildCodec = (input, cache, stack, _accountId) => { | ||
if (isBytes2(input.value)) { | ||
return input.len === 32 && (input.id === 0 || input.id === 1) ? _accountId : scale.Hex(input.len); | ||
return input.len === 32 && (input.id === 0 || input.id === 1) ? _accountId : scale.Bin(input.len); | ||
} | ||
@@ -595,9 +581,7 @@ return buildVector(input.value, input.len); | ||
return buildStruct(input.value); | ||
const dependencies = Object.entries(input.value).map(([k, v]) => { | ||
const dependencies = Object.values(input.value).map((v) => { | ||
if (v.type === "primitive") | ||
return scale._void; | ||
if (v.type === "tuple" && v.value.length === 1) { | ||
const innerVal = v.value[0]; | ||
return k.startsWith("Raw") && innerVal.type === "array" && isBytes2(innerVal.value) ? scale.fixedStr(innerVal.len) : buildNextCodec(innerVal); | ||
} | ||
if (v.type === "tuple" && v.value.length === 1) | ||
return buildNextCodec(v.value[0]); | ||
return v.type === "tuple" ? buildTuple(v.value) : buildStruct(v.value); | ||
@@ -604,0 +588,0 @@ }); |
@@ -1,8 +0,8 @@ | ||
"use strict";var se=Object.create;var W=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPropertyNames;var pe=Object.getPrototypeOf,de=Object.prototype.hasOwnProperty;var le=(e,t)=>{for(var p in t)W(e,p,{get:t[p],enumerable:!0})},G=(e,t,p,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ue(t))!de.call(e,s)&&s!==p&&W(e,s,{get:()=>t[s],enumerable:!(r=ce(t,s))||r.enumerable});return e};var J=(e,t,p)=>(p=e!=null?se(pe(e)):{},G(t||!e||!e.__esModule?W(p,"default",{value:e,enumerable:!0}):p,e)),me=e=>G(W({},"__esModule",{value:!0}),e);var We={};le(We,{getChecksumBuilder:()=>Ee,getDynamicBuilder:()=>Se,getLookupFn:()=>T,getStaticBuilder:()=>ve,getViewBuilder:()=>ae,primitiveTypes:()=>M});module.exports=me(We);var $={type:"primitive",value:"_void"},T=e=>{let t=new Map,p=new Set,s=(d=>o=>{let h=t.get(o);if(h)return h;if(p.has(o)){let c={id:o};return t.set(o,c),c}p.add(o);let y=d(o);return h=t.get(o),h?Object.assign(h,y):(h={id:o,...y},t.set(o,h)),p.delete(o),h})(d=>{let{def:o}=e[d];if(o.tag==="composite"){if(o.value.length===0)return $;if(o.value.length===1)return s(o.value[0].type);let y=!0,c={},v={};return o.value.forEach((b,g)=>{y=y&&!!b.name;let u=b.name||g;c[u]=s(b.type),v[u]=b.docs}),y?{type:"struct",value:c,innerDocs:v}:{type:"tuple",value:Object.values(c),innerDocs:Object.values(v)}}if(o.tag==="variant"){if(o.value.length===0)return $;let y={},c={};return o.value.forEach(v=>{let b=v.name;if(c[b]=v.docs,v.fields.length===0){y[b]={...$,idx:v.index};return}let g=!0,u={},n={};v.fields.forEach((i,a)=>{g=g&&!!i.name;let l=i.name||a;u[l]=s(i.type),n[l]=i.docs}),y[b]=g?{type:"struct",value:u,innerDocs:n,idx:v.index}:{type:"tuple",value:Object.values(u),innerDocs:Object.values(n),idx:v.index}}),{type:"enum",value:y,innerDocs:c}}if(o.tag==="sequence")return{type:"sequence",value:s(o.value)};if(o.tag==="array")return{type:"array",value:s(o.value.type),len:o.value.len};if(o.tag==="tuple"){if(o.value.length===0)return $;if(o.value.length===1)return s(o.value[0]);let y=o.value.map(v=>s(v)),c=o.value.map(v=>e[v].docs);return{type:"tuple",value:y,innerDocs:c}}if(o.tag==="primitive")return{type:"primitive",value:o.value.tag};if(o.tag==="compact"){let y=s(o.value);return{type:"compact",isBig:Number(y.value.slice(1))>32}}return o.tag==="bitSequence"?{type:"bitSequence"}:{type:"primitive",value:o.value}});return s};var L=(e,t,p)=>(r,s,d,...o)=>{let{id:h}=r;if(s.has(h))return s.get(h);if(d.has(h)){let c=t(()=>s.get(h),r,...o);return s.set(h,c),c}d.add(h);let y=e(r,s,d,...o);return d.delete(h),s.has(h)&&(y=p(y,s.get(h),r,...o)),s.set(h,y),y};var M={_void:"undefined",bool:"boolean",char:"string",str:"string",u8:"number",u16:"number",u32:"number",u64:"bigint",u128:"bigint",u256:"bigint",i8:"number",i16:"number",i32:"number",i64:"bigint",i128:"bigint",i256:"bigint",compactNumber:"number",compactBn:"bigint",bitSequence:"{bitsLen: number, bytes: Uint8Array}",historicMetaCompat:"any"},I=(...e)=>e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join(""),Y=e=>e.type==="primitive"&&e.value==="u8",O=e=>M[e]??`I${e}`,ye=(e,t,p,r,s)=>{if(e.type==="primitive")return r.imports.add(e.value),e.value;if(e.type==="compact"){let n=e.isBig?"compactBn":"compactNumber";return r.imports.add(n),n}if(e.type==="bitSequence")return r.imports.add(e.type),e.type;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8"){r.imports.add("Hex"),r.typeImports.add("HexString");let n={id:"_bytesSeq",value:"Hex()",types:"HexString",directDependencies:new Set};return r.variables.has(n.id)||r.variables.set(n.id,n),n.id}if(r.variables.has(s(e.id,"circular")))return s(e.id,"circular");if(r.variables.has(s(e.id)))return s(e.id);let d=n=>z(n,t,p,r,s),o=(n,i,a)=>{r.imports.add("Vector");let l=d(i),S={id:n,value:`Vector(${(a?[l,a]:[l]).join(", ")})`,types:`Array<${O(l)}>`,directDependencies:new Set([l])};return r.variables.set(n,S),n},h=(n,i)=>{r.imports.add("Tuple");let a=i.map(d),l={id:n,value:`Tuple(${a.join(", ")})`,types:`[${a.map(O).join(", ")}]`,directDependencies:new Set(a)};return r.variables.set(n,l),n},y=(n,i)=>{r.imports.add("Struct");let a=Object.values(i).map(d),l={id:n,value:`Struct({${Object.keys(i).map((m,S)=>`${m}: ${a[S]}`).join(", ")}})`,types:`{${Object.keys(i).map((m,S)=>`${m}: ${O(a[S])}`).join(", ")}}`,directDependencies:new Set(a)};return r.variables.set(n,l),n},c=s(e.id);if(e.type==="array"){if(Y(e.value)){if(e.len===32&&(e.id===0||e.id===1)){r.imports.add("AccountId");let n="_accountId";return r.variables.set(n,{id:n,value:"AccountId()",types:"SS58String",directDependencies:new Set}),r.typeImports.add("SS58String"),n}return r.imports.add("Hex"),r.variables.set(c,{id:c,value:`Hex(${e.len})`,types:"HexString",directDependencies:new Set}),r.typeImports.add("HexString"),c}return o(c,e.value,e.len)}if(e.type==="sequence")return o(c,e.value);if(e.type==="tuple")return h(c,e.value);if(e.type==="struct")return y(c,e.value);r.imports.add("Enum");let v=Object.entries(e.value).map(([n,i])=>{if(i.type==="primitive")return r.imports.add(i.value),i.value;let a=I(c,n);if(i.type==="tuple"){if(i.value.length===1){let l,m=i.value[0];if(n.startsWith("Raw")&&m.type==="array"&&Y(m.value)){let S=`_fixedStr${m.len}`;l=S,r.variables.has(S)||(r.imports.add("fixedStr"),r.variables.set(S,{id:S,value:`fixedStr(${m.len})`,types:"string",directDependencies:new Set}))}else l=d(i.value[0]);return r.variables.has(a)||r.variables.set(a,{id:a,value:l,types:O(l),directDependencies:new Set([l])}),a}return h(a,i.value)}else y(a,i.value);return a}),b=Object.values(e.value).map(n=>n.idx),g=b.every((n,i)=>n===i),u=`{${Object.keys(e.value).map((n,i)=>`${n}: ${v[i]}`)}}${g?"":`, [${b.join(", ")}]`}`;return r.variables.set(c,{id:c,value:`Enum(${u})`,types:Object.keys(e.value).map((n,i)=>`{tag: '${n}', value: ${O(v[i])}}`).join(" | "),directDependencies:new Set(v)}),c},z=L(ye,(e,t,p,r)=>{p.imports.add("Self");let s=r(t.id),d={id:r(t.id,"circular"),types:`I${s}`,value:`Self(() => ${s})`,directDependencies:new Set([s])};return p.variables.set(d.id,d),d.id},e=>e),ve=e=>{let t={imports:new Set,typeImports:new Set(["Codec"]),variables:new Map},p=e.lookup,r=T(p),s=(a,...l)=>{let{path:m}=p[a],S=m.length===0?["cdc"+a]:["c",...m];return S.push(...l),I(...S)},d=new Map,o=a=>z(r(a),d,new Set,t,s),h=(a,l)=>{if(t.variables.has(l))return l;let m=a.map(x=>x.type).map(o),S=a.map(x=>x.name);t.imports.add("Tuple");let E={id:l,types:`[${S.map((x,V)=>`${x[0].toUpperCase()+x.slice(1)}: ${O(m[V])}`).join(", ")}]`,value:`Tuple(${m.join(", ")})`,directDependencies:new Set(m)};return t.variables.set(l,E),l},y="_emptyTuple",c=()=>(t.variables.has(y)||(t.imports.add("Tuple"),t.variables.set(y,{id:y,types:"[]",value:"Tuple()",directDependencies:new Set})),y),v=(a,l)=>{let m=e.pallets.find(j=>j.name===a).storage.items.find(j=>j.name===l);if(m.type.tag==="plain")return{key:c(),val:o(m.type.value)};let{key:S,value:E}=m.type.value,x=o(E);return{key:m.type.value.hashers.length===1?h([{name:"key",type:S}],s(S,"Tupled")):o(S),val:x}},b=a=>(l,m)=>{let S=r(e.pallets.find(x=>x.name===l)[a]);if(S.type!=="enum")throw null;let E=I(o(S.id),m);return!t.variables.has(E)&&S.value[m].type==="primitive"&&t.variables.set(E,{id:E,value:"_void",types:"undefined",directDependencies:new Set}),E},g=(a,l)=>{let m=r(e.pallets.find(x=>x.name===a).calls);if(m.type!=="enum")throw null;let S=m.value[l];if(S.type==="primitive")return c();if(S.type==="tuple")return I(o(m.id),l);let E=Object.entries(S.value).map(([x,V])=>({name:x,type:V.id}));return h(E,s(m.id,l,"Tupled"))},u=(a,l)=>{let m=e.pallets.find(S=>S.name===a).constants.find(S=>S.name===l);return o(m.type)},n=()=>{let a=`import type {${[...t.typeImports].join(", ")}} from "@polkadot-api/substrate-bindings"; | ||
"use strict";var ie=Object.create;var q=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var ce=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var pe=(e,t)=>{for(var p in t)q(e,p,{get:t[p],enumerable:!0})},G=(e,t,p,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of se(t))!ue.call(e,s)&&s!==p&&q(e,s,{get:()=>t[s],enumerable:!(r=ae(t,s))||r.enumerable});return e};var J=(e,t,p)=>(p=e!=null?ie(ce(e)):{},G(t||!e||!e.__esModule?q(p,"default",{value:e,enumerable:!0}):p,e)),de=e=>G(q({},"__esModule",{value:!0}),e);var qe={};pe(qe,{getChecksumBuilder:()=>Ee,getDynamicBuilder:()=>Se,getLookupFn:()=>T,getStaticBuilder:()=>ye,getViewBuilder:()=>oe,primitiveTypes:()=>M});module.exports=de(qe);var I={type:"primitive",value:"_void"},T=e=>{let t=new Map,p=new Set,s=(d=>n=>{let h=t.get(n);if(h)return h;if(p.has(n)){let c={id:n};return t.set(n,c),c}p.add(n);let y=d(n);return h=t.get(n),h?Object.assign(h,y):(h={id:n,...y},t.set(n,h)),p.delete(n),h})(d=>{let{def:n}=e[d];if(n.tag==="composite"){if(n.value.length===0)return I;if(n.value.length===1)return s(n.value[0].type);let y=!0,c={},v={};return n.value.forEach((b,m)=>{y=y&&!!b.name;let u=b.name||m;c[u]=s(b.type),v[u]=b.docs}),y?{type:"struct",value:c,innerDocs:v}:{type:"tuple",value:Object.values(c),innerDocs:Object.values(v)}}if(n.tag==="variant"){if(n.value.length===0)return I;let y={},c={};return n.value.forEach(v=>{let b=v.name;if(c[b]=v.docs,v.fields.length===0){y[b]={...I,idx:v.index};return}let m=!0,u={},i={};v.fields.forEach((o,a)=>{m=m&&!!o.name;let l=o.name||a;u[l]=s(o.type),i[l]=o.docs}),y[b]=m?{type:"struct",value:u,innerDocs:i,idx:v.index}:{type:"tuple",value:Object.values(u),innerDocs:Object.values(i),idx:v.index}}),{type:"enum",value:y,innerDocs:c}}if(n.tag==="sequence")return{type:"sequence",value:s(n.value)};if(n.tag==="array")return{type:"array",value:s(n.value.type),len:n.value.len};if(n.tag==="tuple"){if(n.value.length===0)return I;if(n.value.length===1)return s(n.value[0]);let y=n.value.map(v=>s(v)),c=n.value.map(v=>e[v].docs);return{type:"tuple",value:y,innerDocs:c}}if(n.tag==="primitive")return{type:"primitive",value:n.value.tag};if(n.tag==="compact"){let y=s(n.value);return{type:"compact",isBig:Number(y.value.slice(1))>32}}return n.tag==="bitSequence"?{type:"bitSequence"}:{type:"primitive",value:n.value}});return s};var L=(e,t,p)=>(r,s,d,...n)=>{let{id:h}=r;if(s.has(h))return s.get(h);if(d.has(h)){let c=t(()=>s.get(h),r,...n);return s.set(h,c),c}d.add(h);let y=e(r,s,d,...n);return d.delete(h),s.has(h)&&(y=p(y,s.get(h),r,...n)),s.set(h,y),y};var M={_void:"undefined",bool:"boolean",char:"string",str:"string",u8:"number",u16:"number",u32:"number",u64:"bigint",u128:"bigint",u256:"bigint",i8:"number",i16:"number",i32:"number",i64:"bigint",i128:"bigint",i256:"bigint",compactNumber:"number",compactBn:"bigint",bitSequence:"{bitsLen: number, bytes: Uint8Array}",historicMetaCompat:"any"},W=(...e)=>e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join(""),le=e=>e.type==="primitive"&&e.value==="u8",O=e=>M[e]??`I${e}`,me=(e,t,p,r,s)=>{if(e.type==="primitive")return r.imports.add(e.value),e.value;if(e.type==="compact"){let i=e.isBig?"compactBn":"compactNumber";return r.imports.add(i),i}if(e.type==="bitSequence")return r.imports.add(e.type),e.type;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8"){r.imports.add("Bin"),r.typeImports.add("HexString"),r.typeImports.add("Binary");let i={id:"_bytesSeq",value:"Bin()",types:"Binary",directDependencies:new Set};return r.variables.has(i.id)||r.variables.set(i.id,i),i.id}if(r.variables.has(s(e.id,"circular")))return s(e.id,"circular");if(r.variables.has(s(e.id)))return s(e.id);let d=i=>Y(i,t,p,r,s),n=(i,o,a)=>{r.imports.add("Vector");let l=d(o),S={id:i,value:`Vector(${(a?[l,a]:[l]).join(", ")})`,types:`Array<${O(l)}>`,directDependencies:new Set([l])};return r.variables.set(i,S),i},h=(i,o)=>{r.imports.add("Tuple");let a=o.map(d),l={id:i,value:`Tuple(${a.join(", ")})`,types:`[${a.map(O).join(", ")}]`,directDependencies:new Set(a)};return r.variables.set(i,l),i},y=(i,o)=>{r.imports.add("Struct");let a=Object.values(o).map(d),l={id:i,value:`Struct({${Object.keys(o).map((g,S)=>`${g}: ${a[S]}`).join(", ")}})`,types:`{${Object.keys(o).map((g,S)=>`${g}: ${O(a[S])}`).join(", ")}}`,directDependencies:new Set(a)};return r.variables.set(i,l),i},c=s(e.id);if(e.type==="array"){if(le(e.value)){if(e.len===32&&(e.id===0||e.id===1)){r.imports.add("AccountId");let i="_accountId";return r.variables.set(i,{id:i,value:"AccountId()",types:"SS58String",directDependencies:new Set}),r.typeImports.add("SS58String"),i}return r.imports.add("Bin"),r.variables.set(c,{id:c,value:`Bin(${e.len})`,types:"Binary",directDependencies:new Set}),r.typeImports.add("HexString"),r.typeImports.add("Binary"),c}return n(c,e.value,e.len)}if(e.type==="sequence")return n(c,e.value);if(e.type==="tuple")return h(c,e.value);if(e.type==="struct")return y(c,e.value);r.imports.add("Enum");let v=Object.entries(e.value).map(([i,o])=>{if(o.type==="primitive")return r.imports.add(o.value),o.value;let a=W(c,i);if(o.type==="tuple"){if(o.value.length===1){let l=d(o.value[0]);return r.variables.has(a)||r.variables.set(a,{id:a,value:l,types:O(l),directDependencies:new Set([l])}),a}return h(a,o.value)}else y(a,o.value);return a}),b=Object.values(e.value).map(i=>i.idx),m=b.every((i,o)=>i===o),u=`{${Object.keys(e.value).map((i,o)=>`${i}: ${v[o]}`)}}${m?"":`, [${b.join(", ")}]`}`;return r.variables.set(c,{id:c,value:`Enum(${u})`,types:Object.keys(e.value).map((i,o)=>`{tag: '${i}', value: ${O(v[o])}}`).join(" | "),directDependencies:new Set(v)}),c},Y=L(me,(e,t,p,r)=>{p.imports.add("Self");let s=r(t.id),d={id:r(t.id,"circular"),types:`I${s}`,value:`Self(() => ${s})`,directDependencies:new Set([s])};return p.variables.set(d.id,d),d.id},e=>e),ye=e=>{let t={imports:new Set,typeImports:new Set(["Codec"]),variables:new Map},p=e.lookup,r=T(p),s=(a,...l)=>{let{path:g}=p[a],S=g.length===0?["cdc"+a]:["c",...g];return S.push(...l),W(...S)},d=new Map,n=a=>Y(r(a),d,new Set,t,s),h=(a,l)=>{if(t.variables.has(l))return l;let g=a.map(x=>x.type).map(n),S=a.map(x=>x.name);t.imports.add("Tuple");let E={id:l,types:`[${S.map((x,C)=>`${x[0].toUpperCase()+x.slice(1)}: ${O(g[C])}`).join(", ")}]`,value:`Tuple(${g.join(", ")})`,directDependencies:new Set(g)};return t.variables.set(l,E),l},y="_emptyTuple",c=()=>(t.variables.has(y)||(t.imports.add("Tuple"),t.variables.set(y,{id:y,types:"[]",value:"Tuple()",directDependencies:new Set})),y),v=(a,l)=>{let g=e.pallets.find(j=>j.name===a).storage.items.find(j=>j.name===l);if(g.type.tag==="plain")return{key:c(),val:n(g.type.value)};let{key:S,value:E}=g.type.value,x=n(E);return{key:g.type.value.hashers.length===1?h([{name:"key",type:S}],s(S,"Tupled")):n(S),val:x}},b=a=>(l,g)=>{let S=r(e.pallets.find(x=>x.name===l)[a]);if(S.type!=="enum")throw null;let E=W(n(S.id),g);return!t.variables.has(E)&&S.value[g].type==="primitive"&&t.variables.set(E,{id:E,value:"_void",types:"undefined",directDependencies:new Set}),E},m=(a,l)=>{let g=r(e.pallets.find(x=>x.name===a).calls);if(g.type!=="enum")throw null;let S=g.value[l];if(S.type==="primitive")return c();if(S.type==="tuple")return W(n(g.id),l);let E=Object.entries(S.value).map(([x,C])=>({name:x,type:C.id}));return h(E,s(g.id,l,"Tupled"))},u=(a,l)=>{let g=e.pallets.find(S=>S.name===a).constants.find(S=>S.name===l);return n(g.type)},i=()=>{let a=`import type {${[...t.typeImports].join(", ")}} from "@polkadot-api/substrate-bindings"; | ||
`,l=`import {${[...t.imports].join(", ")}} from "@polkadot-api/substrate-bindings"; | ||
`,m=[...t.variables.values()].map(S=>`type I${S.id} = ${S.types}; | ||
`,g=[...t.variables.values()].map(S=>`type I${S.id} = ${S.types}; | ||
const ${S.id}: Codec<I${S.id}> = ${S.value};`).join(` | ||
`);return`${a}${l}${m}`},i=a=>M[a]??t.variables.get(a)?.types??`I${a}`;return{buildDefinition:o,buildStorage:v,buildEvent:b("events"),buildError:b("errors"),buildCall:g,buildConstant:u,getTypeFromVarName:i,getCode:n}};var f=J(require("@polkadot-api/substrate-bindings"));var he=f.Hex(),Q=e=>e.type==="primitive"&&e.value==="u8",be=(e,t,p,r)=>{if(e.type==="primitive")return f[e.value];if(e.type==="compact")return f.compact;if(e.type==="bitSequence")return f.bitSequence;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8")return he;let s=g=>X(g,t,p,r),d=(g,u)=>{let n=s(g);return u?f.Vector(n,u):f.Vector(n)},o=g=>f.Tuple(...g.map(s)),h=g=>{let u=Object.fromEntries(Object.entries(g).map(([n,i])=>[n,s(i)]));return f.Struct(u)};if(e.type==="array")return Q(e.value)?e.len===32&&(e.id===0||e.id===1)?r:f.Hex(e.len):d(e.value,e.len);if(e.type==="sequence")return d(e.value);if(e.type==="tuple")return o(e.value);if(e.type==="struct")return h(e.value);let y=Object.entries(e.value).map(([g,u])=>{if(u.type==="primitive")return f._void;if(u.type==="tuple"&&u.value.length===1){let n=u.value[0];return g.startsWith("Raw")&&n.type==="array"&&Q(n.value)?f.fixedStr(n.len):s(n)}return u.type==="tuple"?o(u.value):h(u.value)}),c=Object.fromEntries(Object.keys(e.value).map((g,u)=>[g,y[u]])),v=Object.values(e.value).map(g=>g.idx);return v.every((g,u)=>g===u)?f.Enum(c):f.Enum(c,v)},X=L(be,f.Self,e=>e),ge=f.Tuple(),Se=e=>{let t=e.lookup,p=T(t),r=f.AccountId(),s=new Map,d=u=>X(p(u),s,new Set,r),o=e.pallets.find(u=>u.name==="System")?.constants.find(u=>u.name==="SS58Prefix"),h;if(o)try{let u=d(o.type).dec(o.value);typeof u=="number"&&(h=u,r=f.AccountId(u))}catch{}let y=new Map,c=(u,n)=>{let i=y.get(u);i||y.set(u,i=f.Storage(u));let a=e.pallets.find(C=>C.name===u).storage.items.find(C=>C.name===n),l=(C,...B)=>{let K=i(...B);return{...K,len:C,fallback:a.modifier===1?K.dec(a.fallback):void 0}};if(a.type.tag==="plain")return l(0,n,d(a.type.value).dec);let{key:m,value:S,hashers:E}=a.type.value,x=d(S),V=E.map(C=>f[C.tag]),j=V.length===1?[[d(m),V[0]]]:p(m).value.map((C,B)=>[d(C.id),V[B]]);return l(V.length,n,x.dec,...j)},v=(u,n)=>{let i=e.pallets.find(m=>m.name===u),a=p(i.calls);if(a.type!=="enum")throw null;let l=a.value[n];return{location:[i.index,l.idx],args:l.type==="primitive"?ge:f.Tuple(...Object.values(l.value).map(m=>d(m.id)))}},b=(u,n)=>{let i=e.pallets.find(a=>a.name===u).constants.find(a=>a.name===n);return d(i.type)},g=u=>(n,i)=>{let a=e.pallets.find(S=>S.name===n),l=p(a[u]);if(l.type!=="enum")throw null;let m=l.value[i];return{location:[a.index,m.idx],codec:m.type==="primitive"?f._void:d(l.id)}};return{buildDefinition:d,buildStorage:c,buildEvent:g("events"),buildError:g("errors"),buildCall:v,buildConstant:b,ss58Prefix:h}};var F=require("@polkadot-api/substrate-bindings");var Z=new TextEncoder,fe=Z.encode.bind(Z),k=(e,t)=>{let p=typeof t=="string",r=new Uint8Array((e.length+(p?1:0))*8),s=new DataView(r.buffer),d=0;p&&(s.setBigUint64(d,(0,F.h64)(fe(t))),d+=8);for(let o=0;o<e.length;o++,d+=8)s.setBigUint64(d,e[o]);return(0,F.h64)(r)},H={_void:0n,bool:1n,char:2n,str:3n,u8:4n,u16:5n,u32:6n,u64:7n,u128:8n,u256:9n,i8:5n,i16:5n,i32:6n,i64:7n,i128:8n,i256:9n,compacts:10n,compactb:11n,bitSequence:12n,historicMetaCompat:13n},De=14n,xe=(e,t,p)=>{if(t.has(e.id))return t.get(e.id);if(e.type==="primitive")return H[e.value];if(e.type==="compact")return H[e.isBig?"compactb":"compacts"];if(e.type==="bitSequence")return H.bitSequence;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8")return De;let r=c=>ee(c,t,p),s=(c,v)=>{let b=r(c);return v?k([b,BigInt(v)],"Vector(,)"):k([b],"Vector()")},d=c=>k(c.map(r)),o=c=>k(Object.values(c).map(r),JSON.stringify(Object.keys(c)));if(e.type==="array")return s(e.value,e.len);if(e.type==="sequence")return s(e.value);if(e.type==="tuple")return d(e.value);if(e.type==="struct")return o(e.value);let h=Object.values(e.value).map(c=>c.type==="primitive"?0n:c.type==="tuple"?d(c.value):o(c.value)),y=Object.keys(e.value);return y.push("Enum"),k(h,JSON.stringify({Enum:y}))},ee=L(xe,()=>0n,e=>e),Ee=e=>{let t=e.lookup,p=T(t),r=new Map,s=b=>ee(p(b),r,new Set),d=(b,g)=>{try{let u=e.pallets.find(m=>m.name===b).storage.items.find(m=>m.name===g);if(u.type.tag==="plain")return k([s(u.type.value)]);let{key:n,value:i}=u.type.value,a=s(i),l=u.type.value.hashers.length===1?k([s(n)]):s(n);return k([a,l])}catch{return null}},o=b=>{if(b.type==="primitive")return 0n;let g=Object.values(b.value).map(u=>s(u.id));return b.type==="tuple"?k(g):k(g,JSON.stringify(Object.keys(b.value)))},h=(b,g)=>{try{let u=e.pallets.find(i=>i.name===b),n=p(u.calls);if(n.type!=="enum")throw null;return o(n.value[g])}catch{return null}},y=b=>(g,u)=>{try{let n=e.pallets.find(a=>a.name===g),i=p(n[b]);if(i.type!=="enum")throw null;return o(i.value[u])}catch{return null}},c=(b,g)=>{try{let u=e.pallets.find(n=>n.name===b).constants.find(n=>n.name===g);return s(u.type)}catch{return null}},v=b=>(...g)=>b(...g)?.toString(32)??null;return{buildDefinition:v(s),buildStorage:v(d),buildCall:v(h),buildEvent:v(y("events")),buildError:v(y("errors")),buildConstant:v(c)}};var oe=require("@polkadot-api/utils"),A=require("@polkadot-api/substrate-bindings");var R=require("@polkadot-api/utils"),D=J(require("@polkadot-api/substrate-bindings")),ke=R.toHex,te=(e,t)=>D.createDecoder(p=>{let r=p,s=r.i,d=e(r),o=ke(new Uint8Array(r.buffer.slice(s,r.i)));return{...t,value:d,input:o}}),_=(e,t,p)=>{let r=te(t,{codec:e,...p});return Object.assign(r,{shape:{codec:e}})},q=(e,t,p)=>{let r=te(t,{codec:e.codec,...p});return Object.assign(r,{shape:e})},U=(e=42)=>{let t=D.enhanceDecoder(D.AccountId(e).dec,p=>({address:p,ss58Prefix:e}));return _("AccountId",t,{})},Ve=e=>_("BytesArray",D.Hex.dec(e),{len:e}),Ce=["_void","bool","char","str","u8","u16","u32","i8","i16","i32","u64","u128","u256","i64","i128","i256","compactNumber","compactBn","bitSequence"],Te=Object.fromEntries(Ce.map(e=>[e,_(e,D[e].dec)])),P={...Te,Bytes:_("Bytes",D.Hex.dec()),BytesArray:Ve,AccountId:U()},Pe=e=>q({codec:"Sequence",shape:e.shape},D.Vector.dec(e)),Le=(e,t)=>q({codec:"Array",shape:e.shape,len:t},D.Vector.dec(e,t)),we=(...e)=>q({codec:"Tuple",shape:e.map(t=>t.shape)},D.Tuple.dec(...e)),Ae=e=>q({codec:"Struct",shape:(0,R.mapStringRecord)(e,t=>t.shape)},D.Struct.dec(e)),Oe=(e,t)=>q({codec:"Enum",shape:(0,R.mapStringRecord)(e,p=>p.shape)},D.Enum.dec(e,t)),re=e=>{let t=r=>{let s=e(),d=s;return t=s,d(r)},p=r=>t(r);return p.shape={codec:"_void"},p},w={Sequence:Pe,Array:Le,Tuple:we,Struct:Ae,Enum:Oe};var N=(e,t,p)=>{let r=(0,A.enhanceDecoder)(e,s=>({...s,[t]:p}));return r.shape=e.shape,r},je=e=>(t,p,r,s,...d)=>{let{path:o}=s[t.id],h=e(t,p,r,s,...d);return o.length?N(h,"path",o):h},Re=(e,t,p,r,s)=>{if(e.type==="primitive")return P[e.value];if(e.type==="compact")return e.isBig?P.compactBn:P.compactNumber;if(e.type==="bitSequence")return P.bitSequence;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8")return P.Bytes;let d=i=>ie(i,t,p,r,s),o=(i,a)=>{let l=d(i);return a?w.Array(l,a):w.Sequence(l)},h=(i,a)=>N(w.Tuple(...i.map(d)),"innerDocs",a),y=(i,a)=>N(w.Struct((0,oe.mapStringRecord)(i,d)),"innerDocs",a);if(e.type==="array")return e.value.type==="primitive"&&e.value.value==="u8"?e.len===32&&(e.id===0||e.id===1)?s:P.BytesArray(e.len):o(e.value,e.len);if(e.type==="sequence")return o(e.value);if(e.type==="tuple")return h(e.value,e.innerDocs);if(e.type==="struct")return y(e.value,e.innerDocs);let c=Object.values(e.value).map(i=>i.type==="primitive"?P._void:i.type==="tuple"&&i.value.length===1?d(i.value[0]):i.type==="tuple"?h(i.value,i.innerDocs):y(i.value,i.innerDocs)),v=Object.fromEntries(Object.keys(e.value).map((i,a)=>[i,c[a]])),b=Object.values(e.value).map(i=>i.idx),u=b.every((i,a)=>i===a)?w.Enum(v):w.Enum(v,b),n=(0,A.enhanceDecoder)(u,i=>{let a=e.innerDocs[i.value.tag];return{...i,docs:a}});return n.shape=u.shape,n},qe=je(Re),ie=L(qe,re,(e,t)=>(t.shape=e.shape,e)),ne=e=>`0x${e.toString(16).padEnd(2,"0")}`,ae=e=>{let t=e.lookup,p=new Map,r=c=>ie(s(c),p,new Set,t,d),s=T(t),d=P.AccountId,o=e.pallets.find(c=>c.name==="System")?.constants.find(c=>c.name==="SS58Prefix");if(o)try{let c=r(o.type)(o.value).value;typeof c=="number"&&(d=U(c))}catch{}let h=c=>{let v=r(c);return{shape:v.shape,decoder:v}},y=(0,A.createDecoder)(c=>{let v=A.u8.dec(c),b=e.pallets.find(a=>a.index===v);if(!b)throw new Error("Invalid Pallet");let g={value:{name:b.name,idx:v},input:ne(c[0])},u=r(b.calls),n=u(c);if(n.codec!=="Enum")throw null;let i={value:{name:n.value.tag,idx:c[1]},input:ne(c[1]),docs:n.docs};return{pallet:g,call:i,args:{value:n.value.value,shape:u.shape}}});return{buildDefinition:h,callDecoder:y}}; | ||
`);return`${a}${l}${g}`},o=a=>M[a]??t.variables.get(a)?.types??`I${a}`;return{buildDefinition:n,buildStorage:v,buildEvent:b("events"),buildError:b("errors"),buildCall:m,buildConstant:u,getTypeFromVarName:o,getCode:i}};var f=J(require("@polkadot-api/substrate-bindings"));var ve=f.Bin(),he=e=>e.type==="primitive"&&e.value==="u8",be=(e,t,p,r)=>{if(e.type==="primitive")return f[e.value];if(e.type==="compact")return f.compact;if(e.type==="bitSequence")return f.bitSequence;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8")return ve;let s=m=>z(m,t,p,r),d=(m,u)=>{let i=s(m);return u?f.Vector(i,u):f.Vector(i)},n=m=>f.Tuple(...m.map(s)),h=m=>{let u=Object.fromEntries(Object.entries(m).map(([i,o])=>[i,s(o)]));return f.Struct(u)};if(e.type==="array")return he(e.value)?e.len===32&&(e.id===0||e.id===1)?r:f.Bin(e.len):d(e.value,e.len);if(e.type==="sequence")return d(e.value);if(e.type==="tuple")return n(e.value);if(e.type==="struct")return h(e.value);let y=Object.values(e.value).map(m=>m.type==="primitive"?f._void:m.type==="tuple"&&m.value.length===1?s(m.value[0]):m.type==="tuple"?n(m.value):h(m.value)),c=Object.fromEntries(Object.keys(e.value).map((m,u)=>[m,y[u]])),v=Object.values(e.value).map(m=>m.idx);return v.every((m,u)=>m===u)?f.Enum(c):f.Enum(c,v)},z=L(be,f.Self,e=>e),ge=f.Tuple(),Se=e=>{let t=e.lookup,p=T(t),r=f.AccountId(),s=new Map,d=u=>z(p(u),s,new Set,r),n=e.pallets.find(u=>u.name==="System")?.constants.find(u=>u.name==="SS58Prefix"),h;if(n)try{let u=d(n.type).dec(n.value);typeof u=="number"&&(h=u,r=f.AccountId(u))}catch{}let y=new Map,c=(u,i)=>{let o=y.get(u);o||y.set(u,o=f.Storage(u));let a=e.pallets.find(V=>V.name===u).storage.items.find(V=>V.name===i),l=(V,..._)=>{let K=o(..._);return{...K,len:V,fallback:a.modifier===1?K.dec(a.fallback):void 0}};if(a.type.tag==="plain")return l(0,i,d(a.type.value).dec);let{key:g,value:S,hashers:E}=a.type.value,x=d(S),C=E.map(V=>f[V.tag]),j=C.length===1?[[d(g),C[0]]]:p(g).value.map((V,_)=>[d(V.id),C[_]]);return l(C.length,i,x.dec,...j)},v=(u,i)=>{let o=e.pallets.find(g=>g.name===u),a=p(o.calls);if(a.type!=="enum")throw null;let l=a.value[i];return{location:[o.index,l.idx],args:l.type==="primitive"?ge:f.Tuple(...Object.values(l.value).map(g=>d(g.id)))}},b=(u,i)=>{let o=e.pallets.find(a=>a.name===u).constants.find(a=>a.name===i);return d(o.type)},m=u=>(i,o)=>{let a=e.pallets.find(S=>S.name===i),l=p(a[u]);if(l.type!=="enum")throw null;let g=l.value[o];return{location:[a.index,g.idx],codec:g.type==="primitive"?f._void:d(l.id)}};return{buildDefinition:d,buildStorage:c,buildEvent:m("events"),buildError:m("errors"),buildCall:v,buildConstant:b,ss58Prefix:h}};var F=require("@polkadot-api/substrate-bindings");var Q=new TextEncoder,fe=Q.encode.bind(Q),k=(e,t)=>{let p=typeof t=="string",r=new Uint8Array((e.length+(p?1:0))*8),s=new DataView(r.buffer),d=0;p&&(s.setBigUint64(d,(0,F.h64)(fe(t))),d+=8);for(let n=0;n<e.length;n++,d+=8)s.setBigUint64(d,e[n]);return(0,F.h64)(r)},H={_void:0n,bool:1n,char:2n,str:3n,u8:4n,u16:5n,u32:6n,u64:7n,u128:8n,u256:9n,i8:5n,i16:5n,i32:6n,i64:7n,i128:8n,i256:9n,compacts:10n,compactb:11n,bitSequence:12n,historicMetaCompat:13n},De=14n,xe=(e,t,p)=>{if(t.has(e.id))return t.get(e.id);if(e.type==="primitive")return H[e.value];if(e.type==="compact")return H[e.isBig?"compactb":"compacts"];if(e.type==="bitSequence")return H.bitSequence;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8")return De;let r=c=>X(c,t,p),s=(c,v)=>{let b=r(c);return v?k([b,BigInt(v)],"Vector(,)"):k([b],"Vector()")},d=c=>k(c.map(r)),n=c=>k(Object.values(c).map(r),JSON.stringify(Object.keys(c)));if(e.type==="array")return s(e.value,e.len);if(e.type==="sequence")return s(e.value);if(e.type==="tuple")return d(e.value);if(e.type==="struct")return n(e.value);let h=Object.values(e.value).map(c=>c.type==="primitive"?0n:c.type==="tuple"?d(c.value):n(c.value)),y=Object.keys(e.value);return y.push("Enum"),k(h,JSON.stringify({Enum:y}))},X=L(xe,()=>0n,e=>e),Ee=e=>{let t=e.lookup,p=T(t),r=new Map,s=b=>X(p(b),r,new Set),d=(b,m)=>{try{let u=e.pallets.find(g=>g.name===b).storage.items.find(g=>g.name===m);if(u.type.tag==="plain")return k([s(u.type.value)]);let{key:i,value:o}=u.type.value,a=s(o),l=u.type.value.hashers.length===1?k([s(i)]):s(i);return k([a,l])}catch{return null}},n=b=>{if(b.type==="primitive")return 0n;let m=Object.values(b.value).map(u=>s(u.id));return b.type==="tuple"?k(m):k(m,JSON.stringify(Object.keys(b.value)))},h=(b,m)=>{try{let u=e.pallets.find(o=>o.name===b),i=p(u.calls);if(i.type!=="enum")throw null;return n(i.value[m])}catch{return null}},y=b=>(m,u)=>{try{let i=e.pallets.find(a=>a.name===m),o=p(i[b]);if(o.type!=="enum")throw null;return n(o.value[u])}catch{return null}},c=(b,m)=>{try{let u=e.pallets.find(i=>i.name===b).constants.find(i=>i.name===m);return s(u.type)}catch{return null}},v=b=>(...m)=>b(...m)?.toString(32)??null;return{buildDefinition:v(s),buildStorage:v(d),buildCall:v(h),buildEvent:v(y("events")),buildError:v(y("errors")),buildConstant:v(c)}};var re=require("@polkadot-api/utils"),A=require("@polkadot-api/substrate-bindings");var B=require("@polkadot-api/utils"),D=J(require("@polkadot-api/substrate-bindings")),ke=B.toHex,Z=(e,t)=>D.createDecoder(p=>{let r=p,s=r.i,d=e(r),n=ke(new Uint8Array(r.buffer.slice(s,r.i)));return{...t,value:d,input:n}}),$=(e,t,p)=>{let r=Z(t,{codec:e,...p});return Object.assign(r,{shape:{codec:e}})},R=(e,t,p)=>{let r=Z(t,{codec:e.codec,...p});return Object.assign(r,{shape:e})},U=(e=42)=>{let t=D.enhanceDecoder(D.AccountId(e).dec,p=>({address:p,ss58Prefix:e}));return $("AccountId",t,{})},Ce=e=>$("BytesArray",D.Hex.dec(e),{len:e}),Ve=["_void","bool","char","str","u8","u16","u32","i8","i16","i32","u64","u128","u256","i64","i128","i256","compactNumber","compactBn","bitSequence"],Te=Object.fromEntries(Ve.map(e=>[e,$(e,D[e].dec)])),P={...Te,Bytes:$("Bytes",D.Hex.dec()),BytesArray:Ce,AccountId:U()},Pe=e=>R({codec:"Sequence",shape:e.shape},D.Vector.dec(e)),Le=(e,t)=>R({codec:"Array",shape:e.shape,len:t},D.Vector.dec(e,t)),we=(...e)=>R({codec:"Tuple",shape:e.map(t=>t.shape)},D.Tuple.dec(...e)),Ae=e=>R({codec:"Struct",shape:(0,B.mapStringRecord)(e,t=>t.shape)},D.Struct.dec(e)),Oe=(e,t)=>R({codec:"Enum",shape:(0,B.mapStringRecord)(e,p=>p.shape)},D.Enum.dec(e,t)),ee=e=>{let t=r=>{let s=e(),d=s;return t=s,d(r)},p=r=>t(r);return p.shape={codec:"_void"},p},w={Sequence:Pe,Array:Le,Tuple:we,Struct:Ae,Enum:Oe};var N=(e,t,p)=>{let r=(0,A.enhanceDecoder)(e,s=>({...s,[t]:p}));return r.shape=e.shape,r},je=e=>(t,p,r,s,...d)=>{let{path:n}=s[t.id],h=e(t,p,r,s,...d);return n.length?N(h,"path",n):h},Be=(e,t,p,r,s)=>{if(e.type==="primitive")return P[e.value];if(e.type==="compact")return e.isBig?P.compactBn:P.compactNumber;if(e.type==="bitSequence")return P.bitSequence;if(e.type==="sequence"&&e.value.type==="primitive"&&e.value.value==="u8")return P.Bytes;let d=o=>ne(o,t,p,r,s),n=(o,a)=>{let l=d(o);return a?w.Array(l,a):w.Sequence(l)},h=(o,a)=>N(w.Tuple(...o.map(d)),"innerDocs",a),y=(o,a)=>N(w.Struct((0,re.mapStringRecord)(o,d)),"innerDocs",a);if(e.type==="array")return e.value.type==="primitive"&&e.value.value==="u8"?e.len===32&&(e.id===0||e.id===1)?s:P.BytesArray(e.len):n(e.value,e.len);if(e.type==="sequence")return n(e.value);if(e.type==="tuple")return h(e.value,e.innerDocs);if(e.type==="struct")return y(e.value,e.innerDocs);let c=Object.values(e.value).map(o=>o.type==="primitive"?P._void:o.type==="tuple"&&o.value.length===1?d(o.value[0]):o.type==="tuple"?h(o.value,o.innerDocs):y(o.value,o.innerDocs)),v=Object.fromEntries(Object.keys(e.value).map((o,a)=>[o,c[a]])),b=Object.values(e.value).map(o=>o.idx),u=b.every((o,a)=>o===a)?w.Enum(v):w.Enum(v,b),i=(0,A.enhanceDecoder)(u,o=>{let a=e.innerDocs[o.value.tag];return{...o,docs:a}});return i.shape=u.shape,i},Re=je(Be),ne=L(Re,ee,(e,t)=>(t.shape=e.shape,e)),te=e=>`0x${e.toString(16).padEnd(2,"0")}`,oe=e=>{let t=e.lookup,p=new Map,r=c=>ne(s(c),p,new Set,t,d),s=T(t),d=P.AccountId,n=e.pallets.find(c=>c.name==="System")?.constants.find(c=>c.name==="SS58Prefix");if(n)try{let c=r(n.type)(n.value).value;typeof c=="number"&&(d=U(c))}catch{}let h=c=>{let v=r(c);return{shape:v.shape,decoder:v}},y=(0,A.createDecoder)(c=>{let v=A.u8.dec(c),b=e.pallets.find(a=>a.index===v);if(!b)throw new Error("Invalid Pallet");let m={value:{name:b.name,idx:v},input:te(c[0])},u=r(b.calls),i=u(c);if(i.codec!=="Enum")throw null;let o={value:{name:i.value.tag,idx:c[1]},input:te(c[1]),docs:i.docs};return{pallet:m,call:o,args:{value:i.value.value,shape:u.shape}}});return{buildDefinition:h,callDecoder:y}}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@polkadot-api/metadata-builders", | ||
"version": "0.0.1-83af35f36aae2284d04778942f7df6331c60a409.1.0", | ||
"version": "0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0", | ||
"author": "Josep M Sobrepere (https://github.com/josepot)", | ||
@@ -43,4 +43,4 @@ "repository": { | ||
"dependencies": { | ||
"@polkadot-api/substrate-bindings": "0.0.1-83af35f36aae2284d04778942f7df6331c60a409.1.0", | ||
"@polkadot-api/utils": "0.0.1-83af35f36aae2284d04778942f7df6331c60a409.1.0" | ||
"@polkadot-api/substrate-bindings": "0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0", | ||
"@polkadot-api/utils": "0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0" | ||
}, | ||
@@ -47,0 +47,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
346096
2888
+ Added@polkadot-api/substrate-bindings@0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0(transitive)
+ Added@polkadot-api/utils@0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0(transitive)
- Removed@polkadot-api/substrate-bindings@0.0.1-83af35f36aae2284d04778942f7df6331c60a409.1.0(transitive)
- Removed@polkadot-api/utils@0.0.1-83af35f36aae2284d04778942f7df6331c60a409.1.0(transitive)
Updated@polkadot-api/substrate-bindings@0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0
Updated@polkadot-api/utils@0.0.1-9265cb4351aa7dd159e2a99b8c974b0f8f388501.1.0