Reference

Base
https://nyen.cc/v1
TypeScript
@nyen/sdk 0.1.2
Python
nyen-sdk 0.1.2

Chain

  • GET/chain
    TypeScript
    chain()
    Python
    chain()
  • GET/status
    TypeScript
    status()
    Python
    status()
  • GET/block/{hashOrHeight}
    TypeScript
    block(h)
    Python
    block(h)
  • GET/mempool
    TypeScript
    curl only
    Python
    curl only

Transactions

  • GET/tx/{txid}
    TypeScript
    tx(id)
    Python
    tx(id)
  • GET/tx/{txid}/status
    TypeScript
    txStatus(id)
    Python
    tx_status(id)
  • POST/tx/decode
    TypeScript
    decodeTx(hex)
    Python
    decode_tx(hex)
  • POST/tx/broadcast
    TypeScript
    broadcast(hex)
    Python
    broadcast(hex)

Addresses

  • GET/address/{addr}
    TypeScript
    address(a)
    Python
    address(a)
  • GET/address/{addr}/utxos
    TypeScript
    addressUtxos(a)
    Python
    address_utxos(a)
  • GET/address/{addr}/history
    TypeScript
    addressHistory(a)
    Python
    address_history(a)

Tokens

  • GET/tokens
    TypeScript
    tokens()
    Python
    tokens()
  • GET/token/{id}
    TypeScript
    token(id)
    Python
    token(id)
  • GET/token/{id}/holders
    TypeScript
    holders(id)
    Python
    holders(id)
  • GET/token/{id}/history
    TypeScript
    tokenHistory(id)
    Python
    token_history(id)

NyenID

  • GET/id/{name}
    TypeScript
    identity(name)
    Python
    identity(name)

Fees

  • GET/fee/mint
    TypeScript
    feeMint()
    Python
    fee_mint()
  • GET/fee/estimate
    TypeScript
    feeEstimate()
    Python
    fee_estimate()

Events

  • GET/events
    TypeScript
    subscribe({ channels, onEvent })
    Python
    subscribe(...)
POST body
{ "hex": "<signed transaction hex>" }
Events
Server-sent events: open, block, reorg