Crate kudu_esr

Crate kudu_esr 

Source
Expand description

This crate provides tools to create and sign EOS Signing Requests (ESR).

§Feature flags

  • float128: add support for a native float128 type. This currently needs a nightly Rust version as f128 support is still experimental. If this is not active, the Float128 will still be available but as a [u8; 16] wrapper.

§TODO / FIXME

§API DESIGN

  • use typestates to encode the different possible states of a transaction see: https://cliffle.com/blog/rust-typestate/

  • check this for example of API:

    const expireSeconds = 300
    const abiResponse = await jungle4.v1.chain.get_abi('eosio.token')
    const info = await jungle4.v1.chain.get_info()
    const header = info.getTransactionHeader(expireSeconds)
    const action = Action.from(
        {
            authorization: [
                {
                    actor: 'corecorecore',
                    permission: 'active',
                },
            ],
            account: 'eosio.token',
            name: 'transfer',
            data: {
                from: 'corecorecore',
                to: 'teamgreymass',
                quantity: '0.0042 EOS',
                memo: '',
            },
        },
        abiResponse.abi
    )
    const transaction = Transaction.from({
        ...header,
        actions: [action],
    })
    const result = await jungle4.v1.chain.compute_transaction(transaction)
  • do we want ABIProvider to be a member of SigningRequest, or should we just pass it every time we need it?

    • having it as member would allow us to have de/serialization to a JSON value with decoded data

§CORRECTNESS / TESTING

§MISSING FEATURES

  • need to implement the identity signing request type

§MISC

Modules§

signing_request