RESTful API Documentation

Retrieve and save memos from anywhere

With this RESTful API you can get existing memos and save new memos from anywhere. All cryptographic functions such as digital signing and encryption or decryption occur on the client, though. We have a JavaScript library available to assist you with these "client-side" actions here on Github (or  npm)

Available endpoints

WebSocket


Retrieve one or more memos

endpointhttps://nanomemo.cc/api/memo/blocks
request typePOST
API Key RequiredNo
descriptionRetrieves one or more memos from the server
arguments
  • hashes - array of hashes (length 64-hex representing a Nano block) [max hashes: 100]
response
  • dtg: timestamp of response
  • success:  true if success, false otherwise
  • error: descriptive string if success == false, undefined otherwise
  • data: Object of memos represented by hash as the key
    • dtg: timestamp of response
    • success:  true if success, false otherwise
    • error: descriptive string if success == false, undefined otherwise
    • data.message: message in plaintext or encrypted
    • data.hash: Nano block hash the memo is associated with
    • data.signature: digital signature certifying that this message is associated with the state hash
    • data.version_sign: version of digital signature algorithm
    • data.version_encrypt: version of encryption algorithm, undefined if not encrypted
    • data.dtg: timestamp of memo creation
    • data.signing_address: Nano address associated with hash who created and signed the memo
    • data.decrypting_address: Nano address for which the message has been encrypted. Only the decypring address' private key can decrypt and read the message, undefined if not encrypted
Sample response:
 {
   "dtg":"2021-04-17T02:23:43.060Z",
   "success":true,
   "data":{
     "6E3FD6E599E580FF631AF81477DB72A766D0740F6D81A0DE68F69035CE71D5DD":{
       "message":"This is an example of a non-encrypted message that is sent in a memo",
       "hash":"6E3FD6E599E580FF631AF81477DB72A766D0740F6D81A0DE68F69035CE71D5DD",
       "signature":"fa7c7ee72d7993cbf854585c1bbf305d6a75bfa55a87131aad3b3b1205d257944054fbfca96098a9a6eaa6b84a593f5d174f7696b90dd31b7bf7db8f20e22b0a",
       "version_sign":1,
       "dtg":"2021-04-15T21:06:23.490Z",
       "signing_address":"nano_1k1zfz85cj4p89wib9w74c6brepkkcmf4dp9mqb4pyfsndbjhbu1ch7i4gdx"
     },
     "ABC123...":{
       "message":"Another memo...",
       "hash":"ABC123...",
       "signature":"abc123...",
       "version_sign":1,
       "dtg":"2021-04-15T21:06:23.490Z",
       "signing_address":"nano_3abc..."
     }
   }
 }

Save a new memo

endpointhttps://nanomemo.cc/api/memo/new
request typePOST
API Key RequiredNo (However, API key will increase daily limits)
descriptionSubmits all required memo fields to be saved on the server.
arguments
  • api_key - [optional, otherwise rate limited by IP] API key assigned
  • api_secret - [optional, otherwise rate limited by IP] API secret key assigned
  • hash - 64-hex string representing a Nano block
  • message - plaintext or ciphertext message no more than 512 characters long
  • signing_address - Nano address for account that signed the memo
  • decrypting_address - [optional, only if encrypted memo] Nano address for account that can decrypt the memo
  • signature - 128-hex string signature
  • version_sign - version of digital signature algorithm; Current: 1
  • version_encrypt - [optional, only if encrypted memo] version of digital signature algorithm; Current: 1
response
  • dtg: timestamp of response
  • success:  true if success, false otherwise
  • error: descriptive string if success == false, undefined otherwise
  • credits_balance: remaining credits available to the user
  • data.message: message in plaintext or encrypted
  • data.hash: Nano block hash the memo is associated with
  • data.signature: digital signature certifying that this message is associated with the state hash
  • data.version_sign: version of digital signature algorithm
  • data.version_encrypt: version of encryption algorithm, undefined if not encrypted
  • data.dtg: timestamp of memo creation
  • data.signing_address: Nano address associated with hash who created and signed the memo
  • data.decrypting_address: Nano address for which the message has been encrypted. Only the decypring address' private key can decrypt and read the message, undefined if not encrypted
Sample success response:
 {
   "dtg":"2021-04-17T02:23:43.060Z",
   "success":true,
   "credits_balance": 95,
   "data":{
      "message":"This is an example of a non-encrypted message that is sent in a memo",
      "hash":"6E3FD6E599E580FF631AF81477DB72A766D0740F6D81A0DE68F69035CE71D5DD",
      "signature":"fa7c7ee72d7993cbf854585c1bbf305d6a75bfa55a87131aad3b3b1205d257944054fbfca96098a9a6eaa6b84a593f5d174f7696b90dd31b7bf7db8f20e22b0a",
      "version_sign":1,
      "dtg":"2021-04-15T21:06:23.490Z",
      "signing_address":"nano_1k1zfz85cj4p89wib9w74c6brepkkcmf4dp9mqb4pyfsndbjhbu1ch7i4gdx"
   }
 }
Sample error response:
 {
   "dtg":"2021-04-17T02:23:43.060Z",
   "success":false,
   "error":"Sorry, you have zero remaining daily credits to create new memos."
 }

Retrieve user information

endpointhttps://nanomemo.cc/api/user
request typePOST
API Key RequiredYes
descriptionRetrieves user information to include credits available and daily credit refill quantity/countdown
arguments
  • api_key - API key assigned
  • api_secret - API secret key assigned
response
  • dtg: timestamp of response
  • success:  true if success, false otherwise
  • error: descriptive string if success == false, undefined otherwise
  • data.api_key: public api key, undefined if api_key/secret not specified in request
  • data.ip: IP address for request, undefined if api_key/secret specified in requeset
  • data.credits_balance: remaining credits balance on api key
  • data.daily_credits: amount of credits issued to the key each day if the quantity is below daily_credits
  • data.daily_seconds_remaining: number of seconds remaining until daily credits are issued
Sample response:
 {
   "dtg":"2021-04-17T02:23:43.060Z",
   "success":true,
   "data":{
      "api_key":"ACB123...",
      "credits_balance":95,
      "daily_credits":100,
      "daily_seconds_remaining":43200,
   }
 }

WebSocket

endpointwss://nanomemo.cc
request typeWebSocket
API Key RequiredNo
descriptionReceive a WebSocket message for every new memo saved on NanoMemo
messages to server
  • subscribe - {action: 'subscribe'}
  • unsubscribe - {action: 'unsubscribe'}
messages from server
  • message: message in plaintext or encrypted
  • hash: Nano block hash the memo is associated with
  • signature: digital signature certifying that this message is associated with the state hash
  • version_sign: version of digital signature algorithm
  • version_encrypt: version of encryption algorithm, undefined if not encrypted
  • dtg: timestamp of memo creation
  • signing_address: Nano address associated with hash who created and signed the memo
  • decrypting_address: Nano address for which the message has been encrypted. Only the decypring address' private key can decrypt and read the message, undefined if not encrypted
  • is_encrypted: Boolean true if memo is encrypted, false if memo is not encrypted