@prosopo/typechain-polkadot-parser

1.1.15 • Public • Published

Typechain-polkadot-parser


Utility package for parsing ABIs of Polkadot smart contracts.

Types


  • class TypeParser - Parser for ABIs of Polkadot smart contracts. It contains only one public method getType that takes type id as a parameter and returns a TypeInfo object. Also it has public field tsTypes that contains a map of all parsed types.

  • class TypeInfo - Contains information about a type.

	id: number; // - type id
	tsArgType: string; // - TypeScript type for function arguments
	tsReturnType: string; // - TypeScript type for function return value
	tsArgTypePrefixed: string; // - TypeScript type for function arguments with prefix (for imports)
	tsReturnTypePrefixed: string; // - TypeScript type for function return value with prefix (for imports)
	typeDescription: TypeTS; // - type description in TypeScript
	// For enums and composites
	bodyArgType ?: string; // - TypeScript type for function arguments
	bodyReturnType ?: string; // - TypeScript type for function return value

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.1565latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.1565
1.1.140
1.1.130
1.1.100
1.1.90
1.1.80
1.0.80

Package Sidebar

Install

npm i @prosopo/typechain-polkadot-parser

Weekly Downloads

65

Version

1.1.15

License

MIT

Unpacked Size

235 kB

Total Files

11

Last publish

Collaborators

  • hughparry
  • goastler
  • christaylor