Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot-api/substrate-bindings

Package Overview
Dependencies
Maintainers
2
Versions
604
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot-api/substrate-bindings - npm Package Compare versions

Comparing version 0.0.1-b6fdd28d265550b458de44188fbc73f8085012a9.1.0 to 0.0.1-b7c83b63263aa5edf8d338ca9ee086c86ac56200.1.0

169

dist/index.d.ts
import * as scale_ts from 'scale-ts';
import { Codec, Encoder, Decoder, StringRecord, CodecType, EncoderType, DecoderType } from 'scale-ts';
export { Bytes, Codec, CodecType, Decoder, DecoderType, Encoder, EncoderType, Option, StringRecord, Struct, Tuple, Vector, _void, bool, compact, createCodec, createDecoder, enhanceCodec, enhanceDecoder, enhanceEncoder, i128, i16, i256, i32, i64, i8, str, u128, u16, u256, u32, u64, u8 } from 'scale-ts';
export { Bytes, Codec, CodecType, Decoder, DecoderType, Encoder, EncoderType, Option, Result, ResultPayload, StringRecord, Struct, Tuple, Vector, _void, bool, compact, createCodec, createDecoder, enhanceCodec, enhanceDecoder, enhanceEncoder, i128, i16, i256, i32, i64, i8, str, u128, u16, u256, u32, u64, u8 } from 'scale-ts';
import * as scale_ts_dist_types from 'scale-ts/dist/types';

@@ -76,10 +76,11 @@

type List<T> = Array<T>;
type Anonymize<T> = T extends string | number | bigint | boolean | void | undefined | null | symbol | Binary | Enum<{
type SeparateUndefined<T> = undefined extends T ? undefined | Exclude<T, undefined> : T;
type Anonymize<T> = SeparateUndefined<T extends string | number | bigint | boolean | void | undefined | null | symbol | Binary | Enum<{
type: string;
value: any;
}> ? T : T extends (...args: infer Args) => infer R ? (...args: Anonymize<Args>) => Anonymize<R> : T extends Uint8Array ? T : T extends MyTuple<any> ? {
}> | Uint8Array ? T : T extends (...args: infer Args) => infer R ? (...args: Anonymize<Args>) => Anonymize<R> : T extends MyTuple<any> ? {
[K in keyof T]: Anonymize<T[K]>;
} : T extends Array<infer A> ? List<Anonymize<A>> : {
[K in keyof T]: Anonymize<T[K]>;
};
}>;
declare const _Enum: {};

@@ -257,61 +258,8 @@ type EnumOption<T extends {

declare const pallets: scale_ts.Codec<{
name: string;
storage: void | {
prefix: string;
items: {
name: string;
modifier: number;
type: {
tag: "map";
value: {
hashers: ({
tag: "Blake2128";
value: undefined;
} | {
tag: "Blake2256";
value: undefined;
} | {
tag: "Blake2128Concat";
value: undefined;
} | {
tag: "Twox128";
value: undefined;
} | {
tag: "Twox256";
value: undefined;
} | {
tag: "Twox64Concat";
value: undefined;
} | {
tag: "Identity";
value: undefined;
})[];
key: number;
value: number;
};
} | {
tag: "plain";
value: number;
};
fallback: HexString;
docs: string[];
}[];
} | undefined;
calls: number | void | undefined;
events: number | void | undefined;
constants: {
name: string;
type: number;
value: HexString;
docs: string[];
}[];
errors: number | void | undefined;
index: number;
}[]>;
type V14Pallets = CodecType<typeof pallets>;
declare const extrinsic: scale_ts.Codec<{
type: number;
version: number;
address: number;
call: number;
signature: number;
extra: number;
signedExtensions: {

@@ -323,4 +271,4 @@ identifier: string;

}>;
type V14Extrinsic = CodecType<typeof extrinsic>;
declare const v14: scale_ts.Codec<{
type V15Extrinsic = CodecType<typeof extrinsic>;
declare const v15: scale_ts.Codec<{
lookup: {

@@ -482,6 +430,10 @@ id: number;

index: number;
docs: string[];
}[];
extrinsic: {
type: number;
version: number;
address: number;
call: number;
signature: number;
extra: number;
signedExtensions: {

@@ -494,4 +446,26 @@ identifier: string;

type: number;
apis: {
name: string;
methods: {
name: string;
inputs: {
name: string;
type: number;
}[];
output: number;
docs: string[];
}[];
docs: string[];
}[];
outerEnums: {
call: number;
event: number;
error: number;
};
custom: [string, {
type: number;
value: HexString;
}][];
}>;
type V14 = CodecType<typeof v14>;
type V15 = CodecType<typeof v15>;

@@ -544,2 +518,5 @@ declare const metadata: Codec<{

tag: "v14";
value: unknown;
} | {
tag: "v15";
value: {

@@ -702,6 +679,10 @@ lookup: {

index: number;
docs: string[];
}[];
extrinsic: {
type: number;
version: number;
address: number;
call: number;
signature: number;
extra: number;
signedExtensions: {

@@ -714,2 +695,24 @@ identifier: string;

type: number;
apis: {
name: string;
methods: {
name: string;
inputs: {
name: string;
type: number;
}[];
output: number;
docs: string[];
}[];
docs: string[];
}[];
outerEnums: {
call: number;
event: number;
error: number;
};
custom: [string, {
type: number;
value: HexString;
}][];
};

@@ -749,10 +752,16 @@ };

};
type Descriptors = Record<string, [
Record<string, StorageDescriptor<any, any, any>>,
Record<string, TxDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>
]>;
type PickDescriptors<Idx extends 0 | 1 | 2 | 3 | 4, T extends Descriptors> = {
type RuntimeDescriptor<Args extends Array<any>, T> = string & {
__: [Args, T];
};
type Descriptors = {
pallets: Record<string, [
Record<string, StorageDescriptor<any, any, any>>,
Record<string, TxDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>
]>;
apis: Record<string, Record<string, RuntimeDescriptor<any, any>>>;
};
type PickDescriptors<Idx extends 0 | 1 | 2 | 3 | 4, T extends Descriptors["pallets"]> = {
[K in keyof T]: T[K][Idx];

@@ -779,8 +788,8 @@ };

};
type QueryFromDescriptors<T extends Descriptors> = ExtractStorage<PickDescriptors<0, T>>;
type TxFromDescriptors<T extends Descriptors> = ExtractTx<PickDescriptors<1, T>>;
type EventsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<2, T>>;
type ErrorsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<3, T>>;
type ConstFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<4, T>>;
type QueryFromDescriptors<T extends Descriptors> = ExtractStorage<PickDescriptors<0, T["pallets"]>>;
type TxFromDescriptors<T extends Descriptors> = ExtractTx<PickDescriptors<1, T["pallets"]>>;
type EventsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<2, T["pallets"]>>;
type ErrorsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<3, T["pallets"]>>;
type ConstFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<4, T["pallets"]>>;
export { AccountId, type Anonymize, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type ConstFromDescriptors, type Descriptors, type Discriminant, type EncoderWithHash, Enum, type EnumOption, type ErrorsFromDescriptors, type EventsFromDescriptors, type GetEnum, Hex, type HexString, Identity, type PlainDescriptor, type QueryFromDescriptors, type SS58String, Self, Storage, type StorageDescriptor, Twox128, Twox256, Twox64Concat, type TxDescriptor, type TxFromDescriptors, type V14, type V14Extrinsic, type V14Lookup, type V14Pallets, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, fixedStr, h64, metadata, selfDecoder, selfEncoder, v14 };
export { AccountId, type Anonymize, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type ConstFromDescriptors, type Descriptors, type Discriminant, type EncoderWithHash, Enum, type EnumOption, type ErrorsFromDescriptors, type EventsFromDescriptors, type GetEnum, Hex, type HexString, Identity, type PlainDescriptor, type QueryFromDescriptors, type RuntimeDescriptor, type SS58String, Self, Storage, type StorageDescriptor, Twox128, Twox256, Twox64Concat, type TxDescriptor, type TxFromDescriptors, type V14Lookup, type V15, type V15Extrinsic, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, fixedStr, h64, metadata, selfDecoder, selfEncoder, v15 };

@@ -34,2 +34,3 @@ "use strict";

Option: () => import_scale_ts8.Option,
Result: () => import_scale_ts8.Result,
Self: () => Self,

@@ -76,3 +77,3 @@ Storage: () => Storage,

u8: () => import_scale_ts8.u8,
v14: () => v14
v15: () => v15
});

@@ -337,6 +338,6 @@ module.exports = __toCommonJS(src_exports);

// src/codecs/metadata/v14/v14.ts
// src/codecs/metadata/v15/v15.ts
var import_scale_ts13 = require("scale-ts");
// src/codecs/metadata/v14/lookup.ts
// src/codecs/metadata/v15/lookup.ts
var import_scale_ts11 = require("scale-ts");

@@ -411,3 +412,3 @@ var oStr = (0, import_scale_ts11.Option)(import_scale_ts11.str);

// src/codecs/metadata/v14/pallets.ts
// src/codecs/metadata/v15/pallets.ts
var import_scale_ts12 = require("scale-ts");

@@ -460,10 +461,32 @@ var hashType = (0, import_scale_ts12.Enum)({

errors: (0, import_scale_ts12.Option)(compactNumber),
index: import_scale_ts12.u8
index: import_scale_ts12.u8,
docs: (0, import_scale_ts12.Vector)(import_scale_ts12.str)
})
);
// src/codecs/metadata/v14/v14.ts
// src/codecs/metadata/v15/v15.ts
var docs = (0, import_scale_ts13.Vector)(import_scale_ts13.str);
var runtimeApi = (0, import_scale_ts13.Struct)({
name: import_scale_ts13.str,
methods: (0, import_scale_ts13.Vector)(
(0, import_scale_ts13.Struct)({
name: import_scale_ts13.str,
inputs: (0, import_scale_ts13.Vector)(
(0, import_scale_ts13.Struct)({
name: import_scale_ts13.str,
type: compactNumber
})
),
output: compactNumber,
docs
})
),
docs
});
var extrinsic = (0, import_scale_ts13.Struct)({
type: compactNumber,
version: import_scale_ts13.u8,
address: compactNumber,
call: compactNumber,
signature: compactNumber,
extra: compactNumber,
signedExtensions: (0, import_scale_ts13.Vector)(

@@ -477,7 +500,14 @@ (0, import_scale_ts13.Struct)({

});
var v14 = (0, import_scale_ts13.Struct)({
var v15 = (0, import_scale_ts13.Struct)({
lookup,
pallets,
extrinsic,
type: compactNumber
type: compactNumber,
apis: (0, import_scale_ts13.Vector)(runtimeApi),
outerEnums: (0, import_scale_ts13.Struct)({
call: compactNumber,
event: compactNumber,
error: compactNumber
}),
custom: (0, import_scale_ts13.Vector)((0, import_scale_ts13.Tuple)(import_scale_ts13.str, (0, import_scale_ts13.Struct)({ type: compactNumber, value: Hex() })))
});

@@ -511,3 +541,4 @@

v13: unsupported,
v14
v14: unsupported,
v15
})

@@ -514,0 +545,0 @@ });

import * as scale_ts from 'scale-ts';
import { Codec, Encoder, Decoder, StringRecord, CodecType, EncoderType, DecoderType } from 'scale-ts';
export { Bytes, Codec, CodecType, Decoder, DecoderType, Encoder, EncoderType, Option, StringRecord, Struct, Tuple, Vector, _void, bool, compact, createCodec, createDecoder, enhanceCodec, enhanceDecoder, enhanceEncoder, i128, i16, i256, i32, i64, i8, str, u128, u16, u256, u32, u64, u8 } from 'scale-ts';
export { Bytes, Codec, CodecType, Decoder, DecoderType, Encoder, EncoderType, Option, Result, ResultPayload, StringRecord, Struct, Tuple, Vector, _void, bool, compact, createCodec, createDecoder, enhanceCodec, enhanceDecoder, enhanceEncoder, i128, i16, i256, i32, i64, i8, str, u128, u16, u256, u32, u64, u8 } from 'scale-ts';
import * as scale_ts_dist_types from 'scale-ts/dist/types';

@@ -76,10 +76,11 @@

type List<T> = Array<T>;
type Anonymize<T> = T extends string | number | bigint | boolean | void | undefined | null | symbol | Binary | Enum<{
type SeparateUndefined<T> = undefined extends T ? undefined | Exclude<T, undefined> : T;
type Anonymize<T> = SeparateUndefined<T extends string | number | bigint | boolean | void | undefined | null | symbol | Binary | Enum<{
type: string;
value: any;
}> ? T : T extends (...args: infer Args) => infer R ? (...args: Anonymize<Args>) => Anonymize<R> : T extends Uint8Array ? T : T extends MyTuple<any> ? {
}> | Uint8Array ? T : T extends (...args: infer Args) => infer R ? (...args: Anonymize<Args>) => Anonymize<R> : T extends MyTuple<any> ? {
[K in keyof T]: Anonymize<T[K]>;
} : T extends Array<infer A> ? List<Anonymize<A>> : {
[K in keyof T]: Anonymize<T[K]>;
};
}>;
declare const _Enum: {};

@@ -257,61 +258,8 @@ type EnumOption<T extends {

declare const pallets: scale_ts.Codec<{
name: string;
storage: void | {
prefix: string;
items: {
name: string;
modifier: number;
type: {
tag: "map";
value: {
hashers: ({
tag: "Blake2128";
value: undefined;
} | {
tag: "Blake2256";
value: undefined;
} | {
tag: "Blake2128Concat";
value: undefined;
} | {
tag: "Twox128";
value: undefined;
} | {
tag: "Twox256";
value: undefined;
} | {
tag: "Twox64Concat";
value: undefined;
} | {
tag: "Identity";
value: undefined;
})[];
key: number;
value: number;
};
} | {
tag: "plain";
value: number;
};
fallback: HexString;
docs: string[];
}[];
} | undefined;
calls: number | void | undefined;
events: number | void | undefined;
constants: {
name: string;
type: number;
value: HexString;
docs: string[];
}[];
errors: number | void | undefined;
index: number;
}[]>;
type V14Pallets = CodecType<typeof pallets>;
declare const extrinsic: scale_ts.Codec<{
type: number;
version: number;
address: number;
call: number;
signature: number;
extra: number;
signedExtensions: {

@@ -323,4 +271,4 @@ identifier: string;

}>;
type V14Extrinsic = CodecType<typeof extrinsic>;
declare const v14: scale_ts.Codec<{
type V15Extrinsic = CodecType<typeof extrinsic>;
declare const v15: scale_ts.Codec<{
lookup: {

@@ -482,6 +430,10 @@ id: number;

index: number;
docs: string[];
}[];
extrinsic: {
type: number;
version: number;
address: number;
call: number;
signature: number;
extra: number;
signedExtensions: {

@@ -494,4 +446,26 @@ identifier: string;

type: number;
apis: {
name: string;
methods: {
name: string;
inputs: {
name: string;
type: number;
}[];
output: number;
docs: string[];
}[];
docs: string[];
}[];
outerEnums: {
call: number;
event: number;
error: number;
};
custom: [string, {
type: number;
value: HexString;
}][];
}>;
type V14 = CodecType<typeof v14>;
type V15 = CodecType<typeof v15>;

@@ -544,2 +518,5 @@ declare const metadata: Codec<{

tag: "v14";
value: unknown;
} | {
tag: "v15";
value: {

@@ -702,6 +679,10 @@ lookup: {

index: number;
docs: string[];
}[];
extrinsic: {
type: number;
version: number;
address: number;
call: number;
signature: number;
extra: number;
signedExtensions: {

@@ -714,2 +695,24 @@ identifier: string;

type: number;
apis: {
name: string;
methods: {
name: string;
inputs: {
name: string;
type: number;
}[];
output: number;
docs: string[];
}[];
docs: string[];
}[];
outerEnums: {
call: number;
event: number;
error: number;
};
custom: [string, {
type: number;
value: HexString;
}][];
};

@@ -749,10 +752,16 @@ };

};
type Descriptors = Record<string, [
Record<string, StorageDescriptor<any, any, any>>,
Record<string, TxDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>
]>;
type PickDescriptors<Idx extends 0 | 1 | 2 | 3 | 4, T extends Descriptors> = {
type RuntimeDescriptor<Args extends Array<any>, T> = string & {
__: [Args, T];
};
type Descriptors = {
pallets: Record<string, [
Record<string, StorageDescriptor<any, any, any>>,
Record<string, TxDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>,
Record<string, PlainDescriptor<any>>
]>;
apis: Record<string, Record<string, RuntimeDescriptor<any, any>>>;
};
type PickDescriptors<Idx extends 0 | 1 | 2 | 3 | 4, T extends Descriptors["pallets"]> = {
[K in keyof T]: T[K][Idx];

@@ -779,8 +788,8 @@ };

};
type QueryFromDescriptors<T extends Descriptors> = ExtractStorage<PickDescriptors<0, T>>;
type TxFromDescriptors<T extends Descriptors> = ExtractTx<PickDescriptors<1, T>>;
type EventsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<2, T>>;
type ErrorsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<3, T>>;
type ConstFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<4, T>>;
type QueryFromDescriptors<T extends Descriptors> = ExtractStorage<PickDescriptors<0, T["pallets"]>>;
type TxFromDescriptors<T extends Descriptors> = ExtractTx<PickDescriptors<1, T["pallets"]>>;
type EventsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<2, T["pallets"]>>;
type ErrorsFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<3, T["pallets"]>>;
type ConstFromDescriptors<T extends Descriptors> = ExtractPlain<PickDescriptors<4, T["pallets"]>>;
export { AccountId, type Anonymize, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type ConstFromDescriptors, type Descriptors, type Discriminant, type EncoderWithHash, Enum, type EnumOption, type ErrorsFromDescriptors, type EventsFromDescriptors, type GetEnum, Hex, type HexString, Identity, type PlainDescriptor, type QueryFromDescriptors, type SS58String, Self, Storage, type StorageDescriptor, Twox128, Twox256, Twox64Concat, type TxDescriptor, type TxFromDescriptors, type V14, type V14Extrinsic, type V14Lookup, type V14Pallets, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, fixedStr, h64, metadata, selfDecoder, selfEncoder, v14 };
export { AccountId, type Anonymize, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type ConstFromDescriptors, type Descriptors, type Discriminant, type EncoderWithHash, Enum, type EnumOption, type ErrorsFromDescriptors, type EventsFromDescriptors, type GetEnum, Hex, type HexString, Identity, type PlainDescriptor, type QueryFromDescriptors, type RuntimeDescriptor, type SS58String, Self, Storage, type StorageDescriptor, Twox128, Twox256, Twox64Concat, type TxDescriptor, type TxFromDescriptors, type V14Lookup, type V15, type V15Extrinsic, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, fixedStr, h64, metadata, selfDecoder, selfEncoder, v15 };

@@ -1,2 +0,2 @@

"use strict";var G=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var He=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var Re=(e,t)=>{for(var n in t)G(e,n,{get:t[n],enumerable:!0})},_e=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of He(t))!Le.call(e,m)&&m!==n&&G(e,m,{get:()=>t[m],enumerable:!(a=Oe(t,m))||a.enumerable});return e};var Ie=e=>_e(G({},"__esModule",{value:!0}),e);var kt={};Re(kt,{AccountId:()=>Pe,Bin:()=>Q,Binary:()=>de,Blake2128:()=>Ce,Blake2128Concat:()=>oe,Blake2256:()=>Et,Bytes:()=>r.Bytes,Enum:()=>F,Hex:()=>w,Identity:()=>ce,Option:()=>r.Option,Self:()=>Fe,Storage:()=>At,Struct:()=>r.Struct,Tuple:()=>r.Tuple,Twox128:()=>$,Twox256:()=>vt,Twox64Concat:()=>ie,Variant:()=>_,Vector:()=>r.Vector,_Enum:()=>et,_void:()=>r._void,bitSequence:()=>je,blockHeader:()=>rt,bool:()=>r.bool,char:()=>Je,compact:()=>r.compact,compactBn:()=>$e,compactNumber:()=>d,createCodec:()=>r.createCodec,createDecoder:()=>r.createDecoder,enhanceCodec:()=>r.enhanceCodec,enhanceDecoder:()=>r.enhanceDecoder,enhanceEncoder:()=>r.enhanceEncoder,fixedStr:()=>Ze,h64:()=>C,i128:()=>r.i128,i16:()=>r.i16,i256:()=>r.i256,i32:()=>r.i32,i64:()=>r.i64,i8:()=>r.i8,metadata:()=>gt,selfDecoder:()=>fe,selfEncoder:()=>xe,str:()=>r.str,u128:()=>r.u128,u16:()=>r.u16,u256:()=>r.u256,u32:()=>r.u32,u64:()=>r.u64,u8:()=>r.u8,v14:()=>ne});module.exports=Ie(kt);var N=require("scale-ts"),j=require("@noble/hashes/blake2b"),J=require("@scure/base"),ae=new TextEncoder().encode("SS58PRE"),X=2,Ne=e=>{let t=e<64?Uint8Array.of(e):Uint8Array.of((e&252)>>2|64,e>>8|(e&3)<<6);return n=>{let a=(0,j.blake2b)(Uint8Array.of(...ae,...t,...n),{dkLen:64}).subarray(0,X);return J.base58.encode(Uint8Array.of(...t,...n,...a))}};function Me(e,t){return n=>{let a=J.base58.decode(n),m=a.subarray(0,a[0]&64?2:1),T=a.subarray(m.length,a.length-X);if(T.length!==e)throw new Error("Invalid public key length");let h=a.subarray(m.length+T.length),g=(0,j.blake2b)(Uint8Array.of(...ae,...m,...T),{dkLen:64}).subarray(0,X);if(h[0]!==g[0]||h[1]!==g[1])throw new Error("Invalid checksum");if(ze(m)!=t)throw new Error("Invalid SS58 prefix");return T.slice()}}var Pe=(e=42,t=32)=>(0,N.enhanceCodec)((0,N.Bytes)(t),Me(t,e),Ne(e)),ze=e=>{let t=new DataView(e.buffer,e.byteOffset,e.byteLength);return t.byteLength===1?t.getUint8(0):t.getUint16(0)};var M=require("@polkadot-api/utils"),H=require("scale-ts"),qe=new TextEncoder,We=new TextDecoder,de=e=>{let t,n=null,a=null;return e instanceof Uint8Array?t=e:e.match(/0[xX][0-9a-fA-F]+/)?(t=(0,M.fromHex)(e),n=e):(t=qe.encode(e),a=e),{asText:()=>a===null?a=We.decode(t):a,asHex:()=>n===null?n=(0,M.toHex)(t):n,asBytes:()=>t}},ye=e=>{let t=H.Bytes.enc(e);return n=>t(n.asBytes())},me=e=>{let t=H.Bytes.dec(e);return n=>de(t(n))},Q=e=>(0,H.createCodec)(ye(e),me(e));Q.enc=ye;Q.dec=me;var V=require("scale-ts");var Y=require("scale-ts"),d=Y.compact,$e=Y.compact;var Ge=(0,V.createDecoder)(e=>{let t=d.dec(e),n=Math.ceil(t/8);return{bytes:(0,V.Bytes)(n).dec(e),bitsLen:t}}),Xe=e=>{if(e.bitsLen>e.bytes.length*8)throw new Error(`Not enough bytes. (bitsLen:${e.bitsLen}, bytesLen:${e.bytes.length})`);let t=d.enc(e.bitsLen),n=new Uint8Array(e.bytes.length+t.length);return n.set(t,0),n.set(e.bytes,t.length),n},je=(0,V.createCodec)(Xe,Ge);var P=require("scale-ts"),Je=(0,P.enhanceCodec)(P.u8,e=>e.charCodeAt(0),String.fromCharCode);var z=require("@polkadot-api/utils"),L=require("scale-ts"),le=e=>{let t=L.Bytes.enc(e);return n=>t((0,z.fromHex)(n))},pe=e=>{let t=L.Bytes.dec(e);return n=>(0,z.toHex)(t(n))},w=e=>(0,L.createCodec)(le(e),pe(e));w.enc=le;w.dec=pe;var q=require("scale-ts"),Qe=new TextEncoder,Ye=new TextDecoder,Ze=e=>(0,q.enhanceCodec)((0,q.Bytes)(e),t=>Qe.encode(t),t=>Ye.decode(t));var r=require("scale-ts");var ue=require("scale-ts"),xe=e=>{let t=n=>{let a=e();return t=a,a(n)};return n=>t(n)},fe=e=>{let t=n=>{let a=e(),m=a;return t=a,m(n)};return n=>t(n)},Fe=e=>(0,ue.createCodec)(xe(()=>e().enc),fe(()=>e().dec));var R=require("scale-ts"),Z=require("@polkadot-api/utils"),et=new Proxy({},{get(e,t){return n=>F(t,n)}}),F=(e,t)=>({as:n=>{if(n!==e)throw new Error(`Enum.as(${n}) used with actual type ${e}`);return t},is:n=>n===e,type:e,value:t}),Te=(...e)=>{let t=R.Enum.enc(...e);return n=>t({tag:n.type,value:n.value})},ge=(...e)=>{let t=R.Enum.dec(...e);return n=>{let{tag:a,value:m}=t(n);return F(a,m)}},_=(e,...t)=>(0,R.createCodec)(Te((0,Z.mapObject)(e,([n])=>n),...t),ge((0,Z.mapObject)(e,([,n])=>n),...t));_.enc=Te;_.dec=ge;var be=new TextEncoder,Ee=new TextDecoder,tt=(0,r.enhanceCodec)((0,r.Bytes)(4),be.encode.bind(be),Ee.decode.bind(Ee)),ee=(0,r.Struct)({engine:tt,payload:w()}),nt=_({consensus:ee,seal:ee,preRuntime:ee,runtimeUpdated:r._void},[4,5,6,8]),te=w(32),rt=(0,r.Struct)({parentHash:te,number:d,stateRoot:te,extrinsicRoot:te,digests:(0,r.Vector)(nt)});var S=require("scale-ts");var c=require("scale-ts"),he=(0,c.Option)(c.str),W=(0,c.Vector)(c.str),ot=(0,c.Enum)({bool:c._void,char:c._void,str:c._void,u8:c._void,u16:c._void,u32:c._void,u64:c._void,u128:c._void,u256:c._void,i8:c._void,i16:c._void,i32:c._void,i64:c._void,i128:c._void,i256:c._void}),ve=(0,c.Vector)((0,c.Struct)({name:he,type:d,typeName:he,docs:W})),ct=(0,c.Struct)({len:c.u32,type:d}),st=(0,c.Struct)({bitStoreType:d,bitOrderType:d}),it=(0,c.Vector)((0,c.Struct)({name:c.str,fields:ve,index:c.u8,docs:W})),at=(0,c.Enum)({composite:ve,variant:it,sequence:d,array:ct,tuple:(0,c.Vector)(d),primitive:ot,compact:d,bitSequence:st,historicMetaCompat:c.str}),dt=(0,c.Struct)({name:c.str,type:(0,c.Option)(d)}),yt=(0,c.Vector)(dt),mt=(0,c.Struct)({id:d,path:W,params:yt,def:at,docs:W}),Ae=(0,c.Vector)(mt);var i=require("scale-ts"),lt=(0,i.Enum)({Blake2128:i._void,Blake2256:i._void,Blake2128Concat:i._void,Twox128:i._void,Twox256:i._void,Twox64Concat:i._void,Identity:i._void}),pt=(0,i.Vector)(lt),ut=(0,i.Struct)({hashers:pt,key:d,value:d}),xt=(0,i.Struct)({name:i.str,modifier:i.u8,type:(0,i.Enum)({plain:d,map:ut}),fallback:w(),docs:(0,i.Vector)(i.str)}),ft=(0,i.Option)((0,i.Struct)({prefix:i.str,items:(0,i.Vector)(xt)})),ke=(0,i.Vector)((0,i.Struct)({name:i.str,storage:ft,calls:(0,i.Option)(d),events:(0,i.Option)(d),constants:(0,i.Vector)((0,i.Struct)({name:i.str,type:d,value:w(),docs:(0,i.Vector)(i.str)})),errors:(0,i.Option)(d),index:i.u8}));var Tt=(0,S.Struct)({type:d,version:S.u8,signedExtensions:(0,S.Vector)((0,S.Struct)({identifier:S.str,type:d,additionalSigned:d}))}),ne=(0,S.Struct)({lookup:Ae,pallets:ke,extrinsic:Tt,type:d});var U=require("scale-ts");var Se=()=>{throw new Error("Unsupported metadata version!")},E=(0,U.createCodec)(Se,Se),gt=(0,U.Struct)({magicNumber:U.u32,metadata:(0,U.Enum)({v0:E,v1:E,v2:E,v3:E,v4:E,v5:E,v6:E,v7:E,v8:E,v9:E,v10:E,v11:E,v12:E,v13:E,v14:ne})});var we=require("@polkadot-api/utils"),re=require("@noble/hashes/blake2b"),bt={dkLen:32},Et=e=>(0,re.blake2b)(e,bt),ht={dkLen:16},Ce=e=>(0,re.blake2b)(e,ht),oe=e=>(0,we.mergeUint8)(Ce(e),e);var ce=e=>e;var Be=require("@polkadot-api/utils"),Ve=require("scale-ts");var K=(e,t,n,a)=>new DataView(new Uint16Array([e,t,n,a]).buffer).getBigUint64(0,!0),se=2n**64n-1n,f=(e,t)=>e<<t&se|e>>64n-t,y=(e,t)=>e*t&se,u=(e,t)=>e+t&se,x=11400714785074694791n,v=14029467366897019727n,Ue=1609587929392839161n,I=9650029242287828579n,Ke=2870177450012600261n;function C(e,t=0n){let n=u(u(t,x),v),a=u(t,v),m=t,T=t-x,h=e.length,g=0,B=null;(function(){let o=0,A=o+h;if(h){if(B=new Uint8Array(32),h<32){B.set(e.subarray(0,h),g),g+=h;return}if(o<=A-32){let O=A-32;do{let k;k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),n=y(f(u(n,y(k,v)),31n),x),o+=8,k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),a=y(f(u(a,y(k,v)),31n),x),o+=8,k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),m=y(f(u(m,y(k,v)),31n),x),o+=8,k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),T=y(f(u(T,y(k,v)),31n),x),o+=8}while(o<=O)}o<A&&(B.set(e.subarray(o,A),g),g=A-o)}})(),e=B||e;let s,l=0;for(h>=32?(s=f(n,1n),s=u(s,f(a,7n)),s=u(s,f(m,12n)),s=u(s,f(T,18n)),n=y(f(y(n,v),31n),x),s=s^n,s=u(y(s,x),I),a=y(f(y(a,v),31n),x),s=s^a,s=u(y(s,x),I),m=y(f(y(m,v),31n),x),s=s^m,s=u(y(s,x),I),T=y(f(y(T,v),31n),x),s=s^T,s=u(y(s,x),I)):s=u(t,Ke),s=u(s,BigInt(h));l<=g-8;){let b=K(e[l+1]<<8|e[l],e[l+3]<<8|e[l+2],e[l+5]<<8|e[l+4],e[l+7]<<8|e[l+6]);b=y(f(y(b,v),31n),x),s=u(y(f(s^b,27n),x),I),l+=8}if(l+4<=g){let b=y(K(e[l+1]<<8|e[l],e[l+3]<<8|e[l+2],0,0),x);s=u(y(f(s^b,23n),v),Ue),l+=4}for(;l<g;){let b=y(K(e[l++],0,0,0),Ke);s=y(f(s^b,11n),x)}let p=s>>33n;return s=y(s^p,v),p=s>>29n,s=y(s^p,Ue),p=s>>32n,s^=p,s}var $=e=>{let t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigUint64(0,C(e),!0),n.setBigUint64(8,C(e,1n),!0),t},vt=e=>{let t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigUint64(0,C(e),!0),n.setBigUint64(8,C(e,1n),!0),n.setBigUint64(16,C(e,2n),!0),n.setBigUint64(24,C(e,3n),!0),t},ie=e=>(0,Be.mergeUint8)(Ve.u64.enc(C(e)),e);var D=require("@polkadot-api/utils");var De=new TextEncoder,At=e=>{let t=$(De.encode(e));return(n,a,...m)=>{let T=(0,D.mergeUint8)(t,$(De.encode(n))),h=(0,D.toHex)(T),g=m.map(p=>p[1]).map(p=>p===ce?0:p===ie?8:p===oe?16:null).filter(Boolean),B=p=>{if(!p.startsWith(h))throw new Error(`key does not match this storage (${e}.${n})`);if(g.length!==m.length)throw new Error("Impossible to decode this key");if(m.length===0)return[];let b=p.slice(h.length),o=new Array(m.length);for(let A=0,O=0;A<g.length;A++){let k=m[A][0];O+=g[A],o[A]=k.dec(b.slice(O*2)),O+=k.enc(o[A]).length}return o},s=m.map(([{enc:p},b])=>o=>b(p(o)));return{enc:(...p)=>(0,D.toHex)((0,D.mergeUint8)(T,...p.map((b,o)=>s[o](b)))),dec:a,keyDecoder:B}}};
"use strict";var G=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var _e=(e,t)=>{for(var n in t)G(e,n,{get:t[n],enumerable:!0})},Ie=(e,t,n,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let m of Re(t))!Le.call(e,m)&&m!==n&&G(e,m,{get:()=>t[m],enumerable:!(d=He(t,m))||d.enumerable});return e};var Ne=e=>Ie(G({},"__esModule",{value:!0}),e);var Ut={};_e(Ut,{AccountId:()=>ze,Bin:()=>Q,Binary:()=>de,Blake2128:()=>Ce,Blake2128Concat:()=>oe,Blake2256:()=>vt,Bytes:()=>r.Bytes,Enum:()=>F,Hex:()=>U,Identity:()=>ce,Option:()=>r.Option,Result:()=>r.Result,Self:()=>et,Storage:()=>kt,Struct:()=>r.Struct,Tuple:()=>r.Tuple,Twox128:()=>$,Twox256:()=>St,Twox64Concat:()=>ie,Variant:()=>_,Vector:()=>r.Vector,_Enum:()=>tt,_void:()=>r._void,bitSequence:()=>Je,blockHeader:()=>ot,bool:()=>r.bool,char:()=>Qe,compact:()=>r.compact,compactBn:()=>Ge,compactNumber:()=>a,createCodec:()=>r.createCodec,createDecoder:()=>r.createDecoder,enhanceCodec:()=>r.enhanceCodec,enhanceDecoder:()=>r.enhanceDecoder,enhanceEncoder:()=>r.enhanceEncoder,fixedStr:()=>Fe,h64:()=>w,i128:()=>r.i128,i16:()=>r.i16,i256:()=>r.i256,i32:()=>r.i32,i64:()=>r.i64,i8:()=>r.i8,metadata:()=>Et,selfDecoder:()=>fe,selfEncoder:()=>xe,str:()=>r.str,u128:()=>r.u128,u16:()=>r.u16,u256:()=>r.u256,u32:()=>r.u32,u64:()=>r.u64,u8:()=>r.u8,v15:()=>ne});module.exports=Ne(Ut);var N=require("scale-ts"),j=require("@noble/hashes/blake2b"),J=require("@scure/base"),ae=new TextEncoder().encode("SS58PRE"),X=2,Me=e=>{let t=e<64?Uint8Array.of(e):Uint8Array.of((e&252)>>2|64,e>>8|(e&3)<<6);return n=>{let d=(0,j.blake2b)(Uint8Array.of(...ae,...t,...n),{dkLen:64}).subarray(0,X);return J.base58.encode(Uint8Array.of(...t,...n,...d))}};function Pe(e,t){return n=>{let d=J.base58.decode(n),m=d.subarray(0,d[0]&64?2:1),b=d.subarray(m.length,d.length-X);if(b.length!==e)throw new Error("Invalid public key length");let v=d.subarray(m.length+b.length),E=(0,j.blake2b)(Uint8Array.of(...ae,...m,...b),{dkLen:64}).subarray(0,X);if(v[0]!==E[0]||v[1]!==E[1])throw new Error("Invalid checksum");if(qe(m)!=t)throw new Error("Invalid SS58 prefix");return b.slice()}}var ze=(e=42,t=32)=>(0,N.enhanceCodec)((0,N.Bytes)(t),Pe(t,e),Me(e)),qe=e=>{let t=new DataView(e.buffer,e.byteOffset,e.byteLength);return t.byteLength===1?t.getUint8(0):t.getUint16(0)};var M=require("@polkadot-api/utils"),H=require("scale-ts"),We=new TextEncoder,$e=new TextDecoder,de=e=>{let t,n=null,d=null;return e instanceof Uint8Array?t=e:e.match(/0[xX][0-9a-fA-F]+/)?(t=(0,M.fromHex)(e),n=e):(t=We.encode(e),d=e),{asText:()=>d===null?d=$e.decode(t):d,asHex:()=>n===null?n=(0,M.toHex)(t):n,asBytes:()=>t}},ye=e=>{let t=H.Bytes.enc(e);return n=>t(n.asBytes())},me=e=>{let t=H.Bytes.dec(e);return n=>de(t(n))},Q=e=>(0,H.createCodec)(ye(e),me(e));Q.enc=ye;Q.dec=me;var V=require("scale-ts");var Y=require("scale-ts"),a=Y.compact,Ge=Y.compact;var Xe=(0,V.createDecoder)(e=>{let t=a.dec(e),n=Math.ceil(t/8);return{bytes:(0,V.Bytes)(n).dec(e),bitsLen:t}}),je=e=>{if(e.bitsLen>e.bytes.length*8)throw new Error(`Not enough bytes. (bitsLen:${e.bitsLen}, bytesLen:${e.bytes.length})`);let t=a.enc(e.bitsLen),n=new Uint8Array(e.bytes.length+t.length);return n.set(t,0),n.set(e.bytes,t.length),n},Je=(0,V.createCodec)(je,Xe);var P=require("scale-ts"),Qe=(0,P.enhanceCodec)(P.u8,e=>e.charCodeAt(0),String.fromCharCode);var z=require("@polkadot-api/utils"),R=require("scale-ts"),ue=e=>{let t=R.Bytes.enc(e);return n=>t((0,z.fromHex)(n))},le=e=>{let t=R.Bytes.dec(e);return n=>(0,z.toHex)(t(n))},U=e=>(0,R.createCodec)(ue(e),le(e));U.enc=ue;U.dec=le;var q=require("scale-ts"),Ye=new TextEncoder,Ze=new TextDecoder,Fe=e=>(0,q.enhanceCodec)((0,q.Bytes)(e),t=>Ye.encode(t),t=>Ze.decode(t));var r=require("scale-ts");var pe=require("scale-ts"),xe=e=>{let t=n=>{let d=e();return t=d,d(n)};return n=>t(n)},fe=e=>{let t=n=>{let d=e(),m=d;return t=d,m(n)};return n=>t(n)},et=e=>(0,pe.createCodec)(xe(()=>e().enc),fe(()=>e().dec));var L=require("scale-ts"),Z=require("@polkadot-api/utils"),tt=new Proxy({},{get(e,t){return n=>F(t,n)}}),F=(e,t)=>({as:n=>{if(n!==e)throw new Error(`Enum.as(${n}) used with actual type ${e}`);return t},is:n=>n===e,type:e,value:t}),Te=(...e)=>{let t=L.Enum.enc(...e);return n=>t({tag:n.type,value:n.value})},ge=(...e)=>{let t=L.Enum.dec(...e);return n=>{let{tag:d,value:m}=t(n);return F(d,m)}},_=(e,...t)=>(0,L.createCodec)(Te((0,Z.mapObject)(e,([n])=>n),...t),ge((0,Z.mapObject)(e,([,n])=>n),...t));_.enc=Te;_.dec=ge;var be=new TextEncoder,Ee=new TextDecoder,nt=(0,r.enhanceCodec)((0,r.Bytes)(4),be.encode.bind(be),Ee.decode.bind(Ee)),ee=(0,r.Struct)({engine:nt,payload:U()}),rt=_({consensus:ee,seal:ee,preRuntime:ee,runtimeUpdated:r._void},[4,5,6,8]),te=U(32),ot=(0,r.Struct)({parentHash:te,number:a,stateRoot:te,extrinsicRoot:te,digests:(0,r.Vector)(rt)});var u=require("scale-ts");var c=require("scale-ts"),he=(0,c.Option)(c.str),W=(0,c.Vector)(c.str),ct=(0,c.Enum)({bool:c._void,char:c._void,str:c._void,u8:c._void,u16:c._void,u32:c._void,u64:c._void,u128:c._void,u256:c._void,i8:c._void,i16:c._void,i32:c._void,i64:c._void,i128:c._void,i256:c._void}),ve=(0,c.Vector)((0,c.Struct)({name:he,type:a,typeName:he,docs:W})),st=(0,c.Struct)({len:c.u32,type:a}),it=(0,c.Struct)({bitStoreType:a,bitOrderType:a}),at=(0,c.Vector)((0,c.Struct)({name:c.str,fields:ve,index:c.u8,docs:W})),dt=(0,c.Enum)({composite:ve,variant:at,sequence:a,array:st,tuple:(0,c.Vector)(a),primitive:ct,compact:a,bitSequence:it,historicMetaCompat:c.str}),yt=(0,c.Struct)({name:c.str,type:(0,c.Option)(a)}),mt=(0,c.Vector)(yt),ut=(0,c.Struct)({id:a,path:W,params:mt,def:dt,docs:W}),Ae=(0,c.Vector)(ut);var i=require("scale-ts"),lt=(0,i.Enum)({Blake2128:i._void,Blake2256:i._void,Blake2128Concat:i._void,Twox128:i._void,Twox256:i._void,Twox64Concat:i._void,Identity:i._void}),pt=(0,i.Vector)(lt),xt=(0,i.Struct)({hashers:pt,key:a,value:a}),ft=(0,i.Struct)({name:i.str,modifier:i.u8,type:(0,i.Enum)({plain:a,map:xt}),fallback:U(),docs:(0,i.Vector)(i.str)}),Tt=(0,i.Option)((0,i.Struct)({prefix:i.str,items:(0,i.Vector)(ft)})),Se=(0,i.Vector)((0,i.Struct)({name:i.str,storage:Tt,calls:(0,i.Option)(a),events:(0,i.Option)(a),constants:(0,i.Vector)((0,i.Struct)({name:i.str,type:a,value:U(),docs:(0,i.Vector)(i.str)})),errors:(0,i.Option)(a),index:i.u8,docs:(0,i.Vector)(i.str)}));var ke=(0,u.Vector)(u.str),gt=(0,u.Struct)({name:u.str,methods:(0,u.Vector)((0,u.Struct)({name:u.str,inputs:(0,u.Vector)((0,u.Struct)({name:u.str,type:a})),output:a,docs:ke})),docs:ke}),bt=(0,u.Struct)({version:u.u8,address:a,call:a,signature:a,extra:a,signedExtensions:(0,u.Vector)((0,u.Struct)({identifier:u.str,type:a,additionalSigned:a}))}),ne=(0,u.Struct)({lookup:Ae,pallets:Se,extrinsic:bt,type:a,apis:(0,u.Vector)(gt),outerEnums:(0,u.Struct)({call:a,event:a,error:a}),custom:(0,u.Vector)((0,u.Tuple)(u.str,(0,u.Struct)({type:a,value:U()})))});var C=require("scale-ts");var Ue=()=>{throw new Error("Unsupported metadata version!")},g=(0,C.createCodec)(Ue,Ue),Et=(0,C.Struct)({magicNumber:C.u32,metadata:(0,C.Enum)({v0:g,v1:g,v2:g,v3:g,v4:g,v5:g,v6:g,v7:g,v8:g,v9:g,v10:g,v11:g,v12:g,v13:g,v14:g,v15:ne})});var we=require("@polkadot-api/utils"),re=require("@noble/hashes/blake2b"),ht={dkLen:32},vt=e=>(0,re.blake2b)(e,ht),At={dkLen:16},Ce=e=>(0,re.blake2b)(e,At),oe=e=>(0,we.mergeUint8)(Ce(e),e);var ce=e=>e;var Ve=require("@polkadot-api/utils"),De=require("scale-ts");var K=(e,t,n,d)=>new DataView(new Uint16Array([e,t,n,d]).buffer).getBigUint64(0,!0),se=2n**64n-1n,T=(e,t)=>e<<t&se|e>>64n-t,y=(e,t)=>e*t&se,x=(e,t)=>e+t&se,f=11400714785074694791n,A=14029467366897019727n,Ke=1609587929392839161n,I=9650029242287828579n,Be=2870177450012600261n;function w(e,t=0n){let n=x(x(t,f),A),d=x(t,A),m=t,b=t-f,v=e.length,E=0,B=null;(function(){let o=0,S=o+v;if(v){if(B=new Uint8Array(32),v<32){B.set(e.subarray(0,v),E),E+=v;return}if(o<=S-32){let O=S-32;do{let k;k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),n=y(T(x(n,y(k,A)),31n),f),o+=8,k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),d=y(T(x(d,y(k,A)),31n),f),o+=8,k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),m=y(T(x(m,y(k,A)),31n),f),o+=8,k=K(e[o+1]<<8|e[o],e[o+3]<<8|e[o+2],e[o+5]<<8|e[o+4],e[o+7]<<8|e[o+6]),b=y(T(x(b,y(k,A)),31n),f),o+=8}while(o<=O)}o<S&&(B.set(e.subarray(o,S),E),E=S-o)}})(),e=B||e;let s,l=0;for(v>=32?(s=T(n,1n),s=x(s,T(d,7n)),s=x(s,T(m,12n)),s=x(s,T(b,18n)),n=y(T(y(n,A),31n),f),s=s^n,s=x(y(s,f),I),d=y(T(y(d,A),31n),f),s=s^d,s=x(y(s,f),I),m=y(T(y(m,A),31n),f),s=s^m,s=x(y(s,f),I),b=y(T(y(b,A),31n),f),s=s^b,s=x(y(s,f),I)):s=x(t,Be),s=x(s,BigInt(v));l<=E-8;){let h=K(e[l+1]<<8|e[l],e[l+3]<<8|e[l+2],e[l+5]<<8|e[l+4],e[l+7]<<8|e[l+6]);h=y(T(y(h,A),31n),f),s=x(y(T(s^h,27n),f),I),l+=8}if(l+4<=E){let h=y(K(e[l+1]<<8|e[l],e[l+3]<<8|e[l+2],0,0),f);s=x(y(T(s^h,23n),A),Ke),l+=4}for(;l<E;){let h=y(K(e[l++],0,0,0),Be);s=y(T(s^h,11n),f)}let p=s>>33n;return s=y(s^p,A),p=s>>29n,s=y(s^p,Ke),p=s>>32n,s^=p,s}var $=e=>{let t=new Uint8Array(16),n=new DataView(t.buffer);return n.setBigUint64(0,w(e),!0),n.setBigUint64(8,w(e,1n),!0),t},St=e=>{let t=new Uint8Array(32),n=new DataView(t.buffer);return n.setBigUint64(0,w(e),!0),n.setBigUint64(8,w(e,1n),!0),n.setBigUint64(16,w(e,2n),!0),n.setBigUint64(24,w(e,3n),!0),t},ie=e=>(0,Ve.mergeUint8)(De.u64.enc(w(e)),e);var D=require("@polkadot-api/utils");var Oe=new TextEncoder,kt=e=>{let t=$(Oe.encode(e));return(n,d,...m)=>{let b=(0,D.mergeUint8)(t,$(Oe.encode(n))),v=(0,D.toHex)(b),E=m.map(p=>p[1]).map(p=>p===ce?0:p===ie?8:p===oe?16:null).filter(Boolean),B=p=>{if(!p.startsWith(v))throw new Error(`key does not match this storage (${e}.${n})`);if(E.length!==m.length)throw new Error("Impossible to decode this key");if(m.length===0)return[];let h=p.slice(v.length),o=new Array(m.length);for(let S=0,O=0;S<E.length;S++){let k=m[S][0];O+=E[S],o[S]=k.dec(h.slice(O*2)),O+=k.enc(o[S]).length}return o},s=m.map(([{enc:p},h])=>o=>h(p(o)));return{enc:(...p)=>(0,D.toHex)((0,D.mergeUint8)(b,...p.map((h,o)=>s[o](h)))),dec:d,keyDecoder:B}}};
//# sourceMappingURL=index.js.map
{
"name": "@polkadot-api/substrate-bindings",
"version": "0.0.1-b6fdd28d265550b458de44188fbc73f8085012a9.1.0",
"version": "0.0.1-b7c83b63263aa5edf8d338ca9ee086c86ac56200.1.0",
"author": "Josep M Sobrepere (https://github.com/josepot)",

@@ -45,4 +45,4 @@ "repository": {

"@scure/base": "^1.1.1",
"scale-ts": "^1.4.3",
"@polkadot-api/utils": "0.0.1-b6fdd28d265550b458de44188fbc73f8085012a9.1.0"
"scale-ts": "^1.5.0",
"@polkadot-api/utils": "0.0.1-b7c83b63263aa5edf8d338ca9ee086c86ac56200.1.0"
},

@@ -49,0 +49,0 @@ "devDependencies": {

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc