Prizm Space
  • Prizm GitBook
  • Whitepaper
    • Introduction
    • Review
    • Core Technologies
    • POS in Prizm
    • Comparsion with Peercoin
    • Tokens
    • Network node
    • Blocks
    • Forging
    • Forging Algorithm
    • Paramining
    • Paramining options
    • Prizm Accounts
    • WALLET.DAT
    • Basics of Prizm Cryptography
    • Key Features
    • Problems
    • Application
    • Prizm Solutions
  • Prizm API
    • Description
    • General Notes
    • Create Transaction
    • Account Operations
    • Arbitrary Message System Operations
    • Block Operations
    • Forging Operations
    • Hallmark Operations
    • Networking Operations
    • Server Information Operations
    • Token Operations
    • Transaction Operations
    • Utilities
    • Debug Operations
    • Prizm API Examples
  • Roadmap
  • Prizm Devs
  • Latest News
  • Community
  • Downloads
  • Guidelines
    • Video
    • Articles
      • How can I connect to my node from another device?
      • How to create Prizm Wallet
      • How to install Prizm Core
      • Prizm Integration
  • F.A.Q
Powered by GitBook
On this page
  • Decode File Token
  • Decode Token
  • Generate File Token
  • Generate Token

Was this helpful?

  1. Prizm API

Token Operations

PreviousServer Information OperationsNextTransaction Operations

Last updated 4 years ago

Was this helpful?

Decode File Token

Validate a file token without requiring the transmission of a secret passphrase. POST only.

Request:

  • requestType is decodeFileToken

  • file is the path to the file that was signed

  • token is the token of the file, as generated by

Response:

  • account (S) is the account number that generated the token

  • accountRS (S) is the Reed-Solomon address of the account

  • timestamp (N) is the time (in seconds since the genesis block) that the token was generated

  • valid (B) is true if token is valid, false otherwise

  • requestProcessingTime (N) is the API request processing time (in millisec)

Note: Since token contains the token generator's public key and digital signature, file can be validated as signed by the owner of the public key, and the public key determines the account ID.

Example: Refer to example.

Decode Token

Validate a token without requiring the transmission of a secret passphrase.

Request:

  • requestType is decodeToken

  • website is the signed text, typically an authorized URL

Response:

  • account (S) is the account number that generated the token

  • accountRS (S) is the Reed-Solomon address of the account

  • timestamp (N) is the time (in seconds since the genesis block) that the token was created

  • valid (B) is true if token is valid, false otherwise

  • requestProcessingTime (N) is the API request processing time (in millisec)

Note: Since token contains the token generator's public key and digital signature, website can be validated as authorized by the owner of the public key, and the public key determines the account ID.

Generate File Token

Generate a file token. POST only.

Request:

  • requestType is generateFileToken

  • secretPhrase is the passphrase of the account generating the token

  • file is the path to the file to be signed

Response:

  • token (S) is a 160 character string representing the 100-byte token which consists of a 32-byte public key, a 4-byte timestamp, and a 64-byte digital signature

  • account (S) is the account number corresponding to secretPhrase

  • accountRS (S) is the Reed-Solomon address of the account

  • timestamp (N) is the time (in seconds since the genesis block) that the token was generated

  • valid (B) is true if token is valid, false otherwise

  • requestProcessingTime (N) is the API request processing time (in millisec)

Generate Token

Generate a token. POST only.

Request:

  • requestType is generateToken

  • secretPhrase is the passphrase of the account generating the token

  • website is a web site URL for which authorization should be granted, or general text to be digitally signed

Note: website is typically a URL (with the leading http:// unnecessary) that an account owner signs with his secretPhrase (private key) to bind the account to the URL, but website can be any text that the owner wishes to sign.

Response:

  • token (S) is a 160 character string representing the 100-byte token which consists of a 32-byte public key, a 4-byte timestamp, and a 64-byte signature

  • account (S) is the account number corresponding to secretPhrase

  • accountRS (S) is the Reed-Solomon address of the account

  • timestamp (N) is the time (in seconds since the genesis block) that the token was generated

  • valid (B) is true if token is valid, false otherwise

  • requestProcessingTime (N) is the API request processing time (in millisec)

token is the token generated by

Example: Refer to example.

Note: Since token contains the token generator's public key and digital signature, the file can be validated as digitally signed by the owner of the public key using .

Example: Refer to example.

Note: Since token contains the token generator's public key and signature, the website can be validated as authorized by the owner of the public key using .

Example: Refer to example.

Generate File Token
Decode File Token
Generate Token
Decode Token
Decode File Token
Generate File Token
Decode Token
Generate Token