@polkadot-api/substrate-bindings
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -1091,59 +1091,2 @@ import * as scale_ts from 'scale-ts'; | ||
type PlainDescriptor<T> = number & { | ||
_type?: T; | ||
}; | ||
type AssetDescriptor<T> = string & { | ||
_type?: T; | ||
}; | ||
type StorageDescriptor<Args extends Array<any>, T, Optional extends true | false> = number & { | ||
_type: T; | ||
_args: Args; | ||
_optional: Optional; | ||
}; | ||
type TxDescriptor<Args extends {} | undefined> = number & { | ||
___: Args; | ||
}; | ||
type RuntimeDescriptor<Args extends Array<any>, T> = number & { | ||
__: [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>>>; | ||
asset: AssetDescriptor<any>; | ||
checksums: Promise<string[]>; | ||
}; | ||
type PickDescriptors<Idx extends 0 | 1 | 2 | 3 | 4, T extends Descriptors["pallets"]> = { | ||
[K in keyof T]: T[K][Idx]; | ||
}; | ||
type ExtractStorage<T extends Record<string, Record<string, StorageDescriptor<any, any, any>>>> = { | ||
[K in keyof T]: { | ||
[KK in keyof T[K]]: T[K][KK] extends StorageDescriptor<infer Key, infer Value, infer Optional> ? { | ||
KeyArgs: Key; | ||
Value: Value; | ||
IsOptional: Optional; | ||
} : unknown; | ||
}; | ||
}; | ||
type ExtractTx<T extends Record<string, Record<string, TxDescriptor<any>>>> = { | ||
[K in keyof T]: { | ||
[KK in keyof T[K]]: T[K][KK] extends TxDescriptor<infer Args> ? Args : unknown; | ||
}; | ||
}; | ||
type ExtractPlain<T extends Record<string, Record<string, PlainDescriptor<any>>>> = { | ||
[K in keyof T]: { | ||
[KK in keyof T[K]]: T[K][KK] extends PlainDescriptor<infer Value> ? Value : unknown; | ||
}; | ||
}; | ||
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 AssetDescriptor, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type ConstFromDescriptors, type Descriptors, type EncoderWithHash, Enum, type EnumVariant, type ErrorsFromDescriptors, type EventsFromDescriptors, type ExtractEnumValue, FixedSizeBinary, type GetEnum, Hex, type HexString, Identity, type PlainDescriptor, type QueryFromDescriptors, type RuntimeDescriptor, type SS58AddressInfo, type SS58String, Self, Storage, type StorageDescriptor, Twox128, Twox256, Twox64Concat, type TxDescriptor, type TxFromDescriptors, type V14, type V14Extrinsic, type V14Lookup, type V15, type V15Extrinsic, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, ethAccount, fixedStr, fromBufferToBase58, getSs58AddressInfo, h64, metadata, selfDecoder, selfEncoder, v14, v15 }; | ||
export { AccountId, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type EncoderWithHash, Enum, type EnumVariant, type ExtractEnumValue, FixedSizeBinary, type GetEnum, Hex, type HexString, Identity, type SS58AddressInfo, type SS58String, Self, Storage, Twox128, Twox256, Twox64Concat, type V14, type V14Extrinsic, type V14Lookup, type V15, type V15Extrinsic, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, ethAccount, fixedStr, fromBufferToBase58, getSs58AddressInfo, h64, metadata, selfDecoder, selfEncoder, v14, v15 }; |
@@ -1091,59 +1091,2 @@ import * as scale_ts from 'scale-ts'; | ||
type PlainDescriptor<T> = number & { | ||
_type?: T; | ||
}; | ||
type AssetDescriptor<T> = string & { | ||
_type?: T; | ||
}; | ||
type StorageDescriptor<Args extends Array<any>, T, Optional extends true | false> = number & { | ||
_type: T; | ||
_args: Args; | ||
_optional: Optional; | ||
}; | ||
type TxDescriptor<Args extends {} | undefined> = number & { | ||
___: Args; | ||
}; | ||
type RuntimeDescriptor<Args extends Array<any>, T> = number & { | ||
__: [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>>>; | ||
asset: AssetDescriptor<any>; | ||
checksums: Promise<string[]>; | ||
}; | ||
type PickDescriptors<Idx extends 0 | 1 | 2 | 3 | 4, T extends Descriptors["pallets"]> = { | ||
[K in keyof T]: T[K][Idx]; | ||
}; | ||
type ExtractStorage<T extends Record<string, Record<string, StorageDescriptor<any, any, any>>>> = { | ||
[K in keyof T]: { | ||
[KK in keyof T[K]]: T[K][KK] extends StorageDescriptor<infer Key, infer Value, infer Optional> ? { | ||
KeyArgs: Key; | ||
Value: Value; | ||
IsOptional: Optional; | ||
} : unknown; | ||
}; | ||
}; | ||
type ExtractTx<T extends Record<string, Record<string, TxDescriptor<any>>>> = { | ||
[K in keyof T]: { | ||
[KK in keyof T[K]]: T[K][KK] extends TxDescriptor<infer Args> ? Args : unknown; | ||
}; | ||
}; | ||
type ExtractPlain<T extends Record<string, Record<string, PlainDescriptor<any>>>> = { | ||
[K in keyof T]: { | ||
[KK in keyof T[K]]: T[K][KK] extends PlainDescriptor<infer Value> ? Value : unknown; | ||
}; | ||
}; | ||
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 AssetDescriptor, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type ConstFromDescriptors, type Descriptors, type EncoderWithHash, Enum, type EnumVariant, type ErrorsFromDescriptors, type EventsFromDescriptors, type ExtractEnumValue, FixedSizeBinary, type GetEnum, Hex, type HexString, Identity, type PlainDescriptor, type QueryFromDescriptors, type RuntimeDescriptor, type SS58AddressInfo, type SS58String, Self, Storage, type StorageDescriptor, Twox128, Twox256, Twox64Concat, type TxDescriptor, type TxFromDescriptors, type V14, type V14Extrinsic, type V14Lookup, type V15, type V15Extrinsic, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, ethAccount, fixedStr, fromBufferToBase58, getSs58AddressInfo, h64, metadata, selfDecoder, selfEncoder, v14, v15 }; | ||
export { AccountId, Bin, Binary, type BitSequence, Blake2128, Blake2128Concat, Blake2256, type BlockHeader, type EncoderWithHash, Enum, type EnumVariant, type ExtractEnumValue, FixedSizeBinary, type GetEnum, Hex, type HexString, Identity, type SS58AddressInfo, type SS58String, Self, Storage, Twox128, Twox256, Twox64Concat, type V14, type V14Extrinsic, type V14Lookup, type V15, type V15Extrinsic, Variant, _Enum, bitSequence, blockHeader, char, compactBn, compactNumber, ethAccount, fixedStr, fromBufferToBase58, getSs58AddressInfo, h64, metadata, selfDecoder, selfEncoder, v14, v15 }; |
{ | ||
"name": "@polkadot-api/substrate-bindings", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"author": "Josep M Sobrepere (https://github.com/josepot)", | ||
@@ -37,7 +37,2 @@ "repository": { | ||
], | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": false, | ||
"trailingComma": "all" | ||
}, | ||
"dependencies": { | ||
@@ -47,3 +42,3 @@ "@noble/hashes": "^1.3.1", | ||
"scale-ts": "^1.6.0", | ||
"@polkadot-api/utils": "0.0.1" | ||
"@polkadot-api/utils": "0.1.0" | ||
}, | ||
@@ -50,0 +45,0 @@ "devDependencies": { |
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
313323
3933
+ Added@polkadot-api/utils@0.1.0(transitive)
- Removed@polkadot-api/utils@0.0.1(transitive)
Updated@polkadot-api/utils@0.1.0