@polkadot/types-augment

By August 21, 2022Polkadot
Click here to view original web page at openbase.com

Loading versions...

Contributed:

Changes:

  • Adjust StakingLedger with fallback for Kusama 1050 (2 different structures on-chain)
  • Remove TryRuntime state call definitions (only off-chain usage)
  • Update to latest Substrate, Polkadot & Kusama metadata

Changes:

  • Replace rpc.payment.queryInfo usage with call.transactionPaymentApi.queryInfo
  • Ensure that api.call.* is decorated on historic blocks
  • Important If using import { WellKnownChain } from '@polkadot/rpc-provider' it is recommended that you rather use ScProvider.WellKnownChain (the import may be dropped in a future major version)

Changes:

  • Don't assume non-empty path specifiers on portable variant/composites
  • Explicit param length checks for all generic portable overrides
  • Re-export ScProvider in @polkadot/api, aligning with {Http, Ws}Provider
  • Expose WellKnownChain as static on ScProvider.WellKnownChain
  • Checks for non-available interface types & runtime/rpc definitions
  • Ensure .entries/.keys arguments is less than map-entry query
  • Add Polkadot 9260 upgrade block
  • Add Westend 9271 upgrade block
  • Update to latest Substrate metadata

Contributed:

Changes:

  • Add noInitWarn: boolean flag to API options, disabling runtime & RPC warnings
  • Only log missing runtime calls on new (detected) specVersion
  • Add shallow/one-blockHash cache for api.at(...) instances
  • Add Westend 9270 upgrade block
  • Update to latest Substrate, Polkadot & Kusama metadata
  • Breaking change The decorated field getters on Struct were moved to the prototype class for performance reasons. While struct.<field> access still behaves in the same way, with the same results, this does mean that the prototype getters are not visible when doing an Object.keys(struct) or when doing an object spread.
  • Breaking change Deprecated interfaces have been removed including tx.sign(...) (use signAsync), Result.{is, as}Error (use {is, as}Err) as well as storage .range(...) operations.
  • Breaking change Deprecated interfaces on api-contract have been removed. Always ensure you pass an options object to construction and query methods.
  • Breaking change Contracts access via api-contract will now detect the usage of storageDepositLimit in params, if not available the contract interfaces will not be decorated.

Changes:

  • Decorate Struct/Enum/Set field getters on class prototypes
  • Convert api-contract usage of api.rpc.* to api.call.*
  • Drop support for contract runtimes without storageDepositLimit (runtime contractsApi only has support for latest)
  • Export api.rx.call.* for internal usage (derive, contracts)
  • Remove old-style param passing as opposed to options in api-contract
  • Support for alliance/motion collective derives
  • Add Kusama 9260 upgrade block
  • Add Polkadot 9230 & 9250 upgrade blocks
  • Add Westend 9251, 9260 & 9261 upgrade blocks
  • Update to latest Substrate, Polkadot & Kusama metadata

Contributed:

Changes:

  • {BTree|Hash}Map.toHuman() now display Raw keys as ascii (if detected)
  • Add toPrimitive() to all base Codec interfaces (string/boolean/number)
  • Adjust metadata conversion with objectSpread (where missing)
  • Support for TransactionPaymentCallApi runtime interface
  • Check registry.getModuleInstances against metadata paths (fallback)
  • Update to @polkadot/util 10.1.1
  • Update to latest Kusama metadata (Substrate & Polkadot are current)

Changes:

  • Add derive.chain.subscribeFinalized{Heads, Blocks} which returns all finalized, no skips
  • Support Moonbeam author extraction on derive.chain.* (w/ shared logic dedupe)
  • Cater for older BlockBuilder 2/3/4 & GrandpaApi 2 runtime interface definitions
  • Support for NominationPoolsApi runtime interface
  • Support for DebugRuntimeApi runtime interface, Frontier-specific
  • Support for NimbusApi runtime interface (& older AuthorFilterAPI)
  • Add additional historic DispatchError enum variant for asset chains
  • Add Kusama 9250 upgrade block
  • Update to latest Substrate, Polkadot & Kusama metadata

Changes:

  • Adjust Opaque{Metadata, Multiaddr, PeerId} decoding to Opaque<Bytes>
  • Fix historic XcmV0 definitions for BuyExecution
  • Adjust type generation to correctly cater for ambient definitions
  • Improve type argument generation for Option<...> types
  • Adjust usage of deprecated @polkadot/util methods
  • Runtime call typegen from system.version constant value
  • Expose query flags on derive.staking.account
  • Update to latest Substrate, Polkadot & Kusama metadata
  • Update to @polkadot/util 10.0.1

Changes:

  • Ensure historic DispatchError is always the non-current variant
  • Adjust type signatures for non-required use of @types/node

Changes:

  • Bump to @polkadot/util-crypto 9.7.2 (w/ @polkadot/wasm-crypto 6.2.2)

Contributed:

Changes:

  • Support for state_call definitions via API config (exposed on api.call.*)
  • Base type definitions for state_call from Substrate, Polkadot & Orml
  • Align runtime types with latest Substrate master
  • Type generation for runtime call definitions (internal & external)
  • Update to latest Substrate, Polkadot & Kusama metadata

Contributed:

Changes:

  • Align BeefyPayload with Substrate master
  • Use static get [Symbol.species] () for Array & Uint8Array types
  • Add support for (optional, non-runtime recommended) f32 & f64 types
  • Add future-use AbstrateBigInt wrapper extension
  • Update Codec-internal performance tests
  • Add Westend 9250 upgrade block
  • Update to latest Substrate, Polkadot & Kusama metadata

Contributed:

Changes:

  • Deupe all internal type property getters
  • Adjust @polkadot/types-codec asserts
  • Rename Base type to AbstractBase (reflecting usage)
  • Alias blockHash on rpc.engine.createBlock return
  • Instantiate Compact/UInt/Int with number when passed
  • Adjust name extraction in PortableRegistry (maintainability)
  • Adjust string type path extraction (maintainability)
  • Add Kusama 9230 upgrade block
  • Update to latest Substrate metadata

Contributed:

Changes:

  • Ensure storage Option<Option<Type>> are correctly handled
  • Cater for named event fields (expose on event data as available)
  • Expose (partial) runtimeVersion on api.at interfaces
  • Add aliases for DispatchError{U8, U8a} (default to new U8a variant)
  • Align DispatchError definition with latest Substrate
  • Adjust contracts RPC definitions with DispatchError return
  • Ensure blockHash is passed through with era sign options
  • Workaround for default calls on chains with non-standard indexes
  • Optimization for value returns on merged queries
  • Update derive.bagsList to detect voterList pallet
  • Add Polkadot 9200/9220 & Westend 9230 upgrade blocks

Changes:

  • Add internal merge of single storage queries
  • Expose provider stats on API intrerface via .stats
  • Adjust flag extraction for latest phragmen types
  • Support for Range in typegen for Enum
  • Add Kusama 9220 upgrade block

Changes:

  • Add codec support for specialized Option<bool>
  • Optimization for createClass with shortcut typeDef creation
  • Optimization of registry.getOrUnknown with lookup cache
  • Optimization of Array allocations in decoding
  • Use compactFromU8aLim & u8aConcatStrict variants
  • Adjust .inspect() for ExtrinsicPayload
  • Adjust Kusama StakingLedger for runtime 1051
  • Update to latest Substrate, Kusama & Polkadot static metadata

Contributed:

Changes:

  • Adjust extrinsic inspect for signed/unsigned
  • Add support for mmr_generateBatchProof RPC
  • Add additional isCodec checks to error/event .is
  • Add support for Vec<Option<X>> in typegen
  • Update to latest Substrate, Kusama & Polkadot static metadata

Changes:

  • Added support for typegen over Range/RangeInclusive types
  • Add explicit support for Call typegen (inclusive of non-defaults)
  • Deupe wss:// handling in polkadot-types-from-{chain, defs}
  • Allow for optional definitions.ts in typegen (only use chain)
  • Optimize Compact<*> decoding in Uint8Array streams
  • Use I* interfaces for extrinsic payload getters
  • Re-add support for historic linked-map queries
  • Update to latest Substrate, Kusama & Polkadot static metadata
  • Add latest upgrade blocks for Polkadot, Kusama & Westend

Contributed:

Changes:

  • Extract metadata v14 BTreeSet types into correct type
  • Assert to ensure that [u8; <size>] has exact sizes (non-u8a inputs)
  • Adjust tx.paymentInfo signing process for existing signature
  • Add Kusama 9190 upgrade block
  • Add Westend 9200 upgrade block
  • Update to latest Substrate, Kusama & Polkadot static metadata

Contributed:

Changes:

  • Don't fake signature for paymentInfo if already signed
  • Remove api.derive.balances.fees (use direct constants as applicable)
  • Add Westend 9190 upgrade block
  • Update to latest Substrate, Kusama & Polkadot static metadata

Contributed:

Changes:

  • Fix entriesPaged where no at?: BlockHash is specified
  • Apply windcard matches for democracy::vote::Vote and identity::type::Data
  • Adjust default "no RPC response" timeout to 60s
  • Update to latest Substrate, Kusama & Polkadot static metadata
  • Breaking change In this major version the commonjs outputs are moved to a sub-folder. Since the export map and main field in package.json does reflect this change, there should be no usage changes. However the packages here will all need to be on the same version for internal linkage.

Contributed:

Changes:

  • Add support for apiAt.tx(...) to construct at a specific point
  • Add basic api.derive.bagsList.* support
  • Return sorted names for api.registry.lookup.names
  • Optimize JSONRPC requests/response handling
  • Output commonjs files under the cjs/** root
  • Update to latest Substrate, Kusama & Polkadot static metadata
  • Add latest Polkadot 9180 upgrade block
  • Update to @polkadot/util 9.0.1

Contributed:

Changes:

  • Cater for DispatchError with error as [u8; 4]
  • Add in-flight cache for parallel same-version metadata queries
  • Cater for lazy @polkadot/util-crypto init (adjustment for React Native)
  • Update to latest Substrate, Kusama & Polkadot static metadata
  • Update latest Westend & Kusama (up to 9180) upgrade blocks

Contributed:

Changes:

  • Only explicitly support LSB on BitVec types
  • Change toHuman() on BitVec to output default LSB
  • Add bytes{Sent, Recv} to provider stats
  • Clear connection timout on provider disconnect()
  • Add support for dev_getBlockStats RPC

Important This contains an upgraded version of @polkadot/wasm-crypto. For users of asm.js, e.g. React Native, there are some additional upgrade instructions in the release notes for this version https://github.com/polkadot-js/wasm/releases/tag/v5.0.1

Contributed:

Changes:

  • Support for rejection of hanging RPC requests (30s timeout)
  • Add .stats to provider interfaces with running counters
  • Add support for state_trieMigrationStatus RPC
  • Update to latest Substrate, Kusama & Polkadot static metadata
  • Update to @polkadot/util 8.6.1
  • Additional workaround for Vite bundling

Contributed:

Changes:

  • Ensure BTreeSet has the correct decoded length
  • Attach PortableRegistry at point of metadata set
  • Add derive.chain.getBlockByNumber
  • Retrieve named reserves in derive.balances.all
  • Ensure v13 -> v14 metadata conversion attaches primitives
  • Update to latest Substrate, Kusama & Polkadot static metadata

Contributed:

Changes:

  • Align grandpa_proveFinality with Substrate
  • Allow for derive augmentation (swap base type to interfaces)
  • Kusama 9160 upgrade block
  • Update to latest Substrate, Kusama & Polkadot static metadata

Contributed:

Changes:

  • Adjust map header output type with lookup id
  • Re-enable all BitVec tests for toU8a
  • Expose txIndex as event index on extrinsic results
  • Allow inspection of Codec encoding (experimental)
  • Allow inspection of storage key encoding (experimental)
  • Update to latest Substrate, Kusama & Polkadot static metadata
  • Update @polkadot/util to 8.4.1

Upgrade priority: Low. Recommended for users with long-running scripts.

Contributed:

Changes:

  • Don't warn on Lookup* types missing (these are resolvable)
  • Don't clear injected PortableRegistry types on runtime upgrade
  • Clear warning for Call/Event on non-meta v14 runtimes
  • Add beefy_getFinalizedHead RPC support
  • Update to latest Substrate, Kusama & Polkadot static metadata

Upgdare priority: Low. Recommended for users with long-running scripts and those chains based around the latest Substrate master versions.

Contributed:

Changes:

  • Adjust extraction of Call & Event types for metadata v14
  • Adjust historic WinningData and SlotRange types (36-entry variant)
  • Emit decorated event on API on metadata decoration
  • Dedupe and extend WrapperKeepOpaque/WrapperOpaque
  • Align Range/RangeInclusive usage with similar types
  • Adjust bounty derive, return empty on no {treasury, bounties}.bounties
  • Ensure handling of all TypeDefInfo keys in extraction
  • Add support for rpc.contracts.uploadCode
  • Workaround for generators where #private = { this... } yields undefined
  • Update to latest Substrate, Kusama & Polkadot static metadata

All Today's Crypto News In One Place