import { BytesReader , CompactInt , UInt32 } from "as-scale-codec" ; import { Serialiser } from "subsembly-core" ; import { Executive , SystemStorageEntries } from "../../frame" ; import { Metadata } from "../../generated/metadata" ; import { TransactionPayment } from "../../pallets" ; import { AccountIdType , UncheckedExtrinsic } from "../runtime" ; description param data param len export function BabeApi_configuration ( data , len ) { return Serialiser . serialiseResult ( [ ] ) ; } description param data param len export function SessionKeys_generate_session_keys ( data , len ) { return Serialiser . serialiseResult ( [ ] ) ; } description param data param len export function TaggedTransactionQueue_validate_transaction ( data , len ) { let input = Serialiser . deserialiseInput ( data , len ) ; const uxt = BytesReader . decodeInto < UncheckedExtrinsic > ( input ) ; const result = Executive . validateTransaction ( uxt ) ; return Serialiser . serialiseResult ( result ) ; } description param data param len export function OffchainWorkerApi_offchain_worker ( data , len ) { return Serialiser . serialiseResult ( [ ] ) ; } description param data param len export function Metadata_metadata ( data , len ) { const encodedLen = new CompactInt ( Metadata . metadata ( ) . length ) ; return Serialiser . serialiseResult ( encodedLen . toU8a ( ) . concat ( Metadata . metadata ( ) ) ) ; } description param data param len export function AccountNonceApi_account_nonce ( data , len ) { const input = Serialiser . deserialiseInput ( data , len ) ; const who = BytesReader . decodeInto < AccountIdType > ( input ) ; const nonce = SystemStorageEntries . Account ( ) . get ( who ) . nonce ; return Serialiser . serialiseResult ( nonce . toU8a ( ) ) ; } description param data param len export function TransactionPaymentApi_query_info ( data , len ) { const input = Serialiser . deserialiseInput ( data , len ) ; const bytesReader = new BytesReader ( input ) ; const ext = bytesReader . readInto < UncheckedExtrinsic > ( ) ; const queryInfo = TransactionPayment . _queryInfo ( ext , new UInt32 ( ext . encodedLength ( ) ) ) ; return Serialiser . serialiseResult ( queryInfo . toU8a ( ) ) ; }