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

@substrate/txwrapper-core

Package Overview
Dependencies
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/txwrapper-core

Core components for creating a txwrapper lib.

  • 7.5.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source



@substrate/txwrapper-core

Core components for creating a txwrapper lib.

npm Github Actions david-dm



yarn add @substrate/txwrapper-core

Have a look at the txwrapper creation guide for chain builders to see more guidance on how to use this package to build a chain specific txwrapper.

Env Variables

This is a list of env variables that are used inside of txwrapper-core.

createMetadata specific env vars.

Summary: createMetadata memoizes the call to ensure metadata is not reallocated in memory if it is the same call.

Methods that actively use createMetadata and are affected are:

  • defineMethod
  • createDecoratedTx
  • createDecoratedConstants
  • createSignedTx
  • decodeSignedTx
  • decodeSigningPayload
  • decodeUnsignedTx

NOTE: getRegistryBase uses createMetadataUnmemoized

TXWRAPPER_METADATA_CACHE_MAX

Summary: Set the max amount of memoized calls we want in the cache. It uses an LRU cache to handle the input and output of values. This takes in an integer. Ex: export TXWRAPPER_METADATA_CACHE_MAX=10. This will default to unlimited size if the value is not inputted.

NOTES:

  • It is recommended to use a value greater 2 for the cache size as regressions have been seen in some cases for 2 or lower.
TXWRAPPER_METADATA_CACHE_MAX_AGE

Summary: Set the TTL (Time To Live) for items in the memoized cache. This takes in an integer in the measurement of milliseconds. Ex: export TXWRAPPER_METADATA_CACHE_MAX_AGE=1000 for 1 second.

FAQs

Package last updated on 15 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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