Narwhals Playing Mahjong

    @ledgerhq/hw-app-starknet
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.3 • Public • Published

    HW-APP-STARKNET

    Typescript host client used to interact with Starknet Nano application

    Usage

    const starknetClient = require('@ledgerhq/hw-app-starknet');
    
    // TODO: DEMONSTRATE API
    

    API

    Table of Contents

    Stark

    Starknet API

    Parameters

    • transport Transport

    Examples

    import Stark from "@ledgerhq/hw-app-starknet";
    const stark = new Stark(transport)

    getAppVersion

    get version of Nano Starknet application

    Returns Promise<ResponseVersion> an object with a major, minor, patch

    getAppInfo

    get information about Nano Starknet application

    Returns Promise<ResponseAppInfo> an object with appName="STARKNET"

    getPubKey

    get Starknet public key derived from provided derivation path

    Parameters
    Examples
    stark.getPubKey("m/2645'/579218131'/0'/0'").then(o => o.publicKey)

    Returns Promise<ResponsePublicKey> an object with publicKey

    showPubKey

    get and show Starknet public key derived from provided derivation path

    Parameters
    Examples
    stark.showPubKey("m/2645'/579218131'/0'/0'").then(o => o.publicKey)

    Returns Promise<ResponsePublicKey> an object with publicKey

    sign

    sign the given hash over the Starknet elliptic curve

    Parameters
    • path string Derivation path in EIP-2645 format
    • hash string Pedersen hash to be signed
    • show (optional, default true)

    Returns Promise<ResponseSign> an object with (r, s, v) signature

    signTx

    sign the transaction (display Tx fields before signing)

    Parameters
    • path string Derivation path in EIP-2645 format
    • tx Call tx targeted contract
    • txDetails CallDetails account abstraction parameters
    • abi Abi? target contract's abi

    Returns Promise<ResponseSign> an object with (r, s, v) signature

    Install

    npm i @ledgerhq/hw-app-starknet

    DownloadsWeekly Downloads

    50

    Version

    2.0.3

    License

    Apache-2.0

    Unpacked Size

    66.9 kB

    Total Files

    18

    Last publish

    Collaborators

    • sergii-shkolin
    • yogh
    • haammar-ledger
    • kvn-ledger
    • ofreyssinet
    • jelbaz-ledger
    • achabrolin-ledger
    • gre
    • btchip
    • meriadec
    • flocks
    • amougel
    • juan-cortes
    • val_pinkman
    • iammorrow
    • phenry-ledger
    • jdecussy-ledger
    • lfbarreto
    • junsugiura
    • hzheng_ledger