SDK
Last updated
Last updated
Link to Github:
Welcome to the NASDK (Nostr Asset SDK) guide! NASDK is an SDK library developed based on the NOSTR ASSET protocol. It facilitates connecting plugin wallets supporting NOSTR, executing transactions, and managing orders seamlessly.
Connect plugin wallets supporting NOSTR
Execute transactions
Place orders in the market
getConfig()
: Retrieve configuration.
getNostrPool()
: Get information about the Nostr pool.
listOrder(options)
: List orders in the market.
takeOrder(orderId)
: Take an order in the market.
cancelOrder(orderId)
: Cancel an order in the market.
repairOrder(orderId, amount, price, buyOrSellTokenName, payTokenName)
: Repair an order in the market.
approve(options)
: Approve token transfer.
transfer(options)
: Transfer tokens.
addAddressBook(options)
: Add an address to the address book.
deposit(options)
: Deposit tokens.
withdraw(options)
: Withdraw tokens.
supportedProviderList
: Retrieve a list of supported providers.
connect(providerName)
: Connect to a provider.
getProvider(providerName)
: Get information about a provider.
nip04()
: NIP04 utilities.
nip19()
: NIP19 utilities.
generatePrivateKey()
: Generate a private key.
getPublicKey(privateKey)
: Get a public key from a private key.
getEventHash(event)
: Get the hash of an event.
Install
Code
Installation
Code
Check out examples in the src/tests
directory.
To run the test suite:
Start integrating NASDK into your project and unlock the potential of the NOSTR ASSET protocol!