Startrail APIs
  • 🛫Startrail PORT: All in one document for API/SDK
    • 🔀URL per environment
  • Issue transfer api
    • 📬Issue & Transfer SRR (NFT)
      • Request Signed URL for Upload/Download Files
      • File Information Metadata
      • Issue & Transfer
      • Webhook Setup
    • 📂Collection
      • Create Collection
      • Get Collection of LUW
    • 📢Change Logs
      • v1.2.0
      • v1.1.0
      • v1.0.1
  • Metadata Schema
    • 🪅Startrail Registry (SRR)
      • Version 2.2
      • Version 2.1
      • Version 2.0
    • 📤Transfer
      • Version 1.2
      • Version 1.1
      • Version 1.0
    • ☸️Custom History
      • Custom History of Exhibition
        • Version 1.2
      • Custom History of Auction
        • Version 1.3
      • Custom History of Appraisal
        • Version 1.1
      • Custom History of Restoration
        • Version 1.0
      • Custom History of Offchain
        • Version 1.1
  • Get SRR API
    • Get Owned SRRs
    • Get SRR by Collection contract address and Token Id
      • 🚫Get SRR by Token Id
    • Description Of SRR Data
  • Ethereum Signature Validator API
    • 🔏Ethereum Signature Validator API
      • Change Logs
  • Startrail SDK Js
    • 🔰Introduction
    • 🏃Getting Started
      • RPC endpoint and chainId
    • 💳Wallet Methods
    • 🔮Startrail API Methods
      • Add Custom Histories To SRRs
      • Approve SRR By Commitment
      • Bulk
      • Check ERC2981 Royalty
      • Create Collection
      • Convert Metadata
      • Create SRR
      • Transfer Collection Ownership
      • Transfer SRR To Ethereum Address
      • Transfer From With Provenance
      • Update Metadata
    • 📱Login Providers
      • Interface
      • Whitelabeling/Customizing
        • Email Password
      • Hints
      • Multi Factor Account Management
    • 🦊MetaMask
    • 🎎Authentication Integration
    • 👾Errors
    • 📢Change logs
      • v1.35.0
      • v1.34.0
      • v1.33.2
      • v1.33.1
      • v1.32.0
      • v1.31.1
      • v1.30.6
      • v1.30.5
      • v1.30.4
      • v1.30.3
      • v1.30.2
      • v1.30.1
      • v1.30.0
      • v1.29.1
      • v1.29.0
      • v1.28.2
      • v1.28.1
      • v1.28.0
      • v1.27.1
      • v1.27.0
      • v1.26.0
      • v1.25.2(Security Patch)
  • Startrail API
    • 💱Transfer SRR Ownership By RevealHash
    • Get Transaction Data
    • Get Metadata By tokenid
  • Subgraph
    • 📊A introduction of subgraph
    • How to retrieve SRR metadata
Powered by GitBook

©2023 Startbahn, Inc.

On this page
  • Features
  • How to use API
  • Authenticates SDK users from their EOAs
  • Sample Request command

Was this helpful?

  1. Ethereum Signature Validator API

Ethereum Signature Validator API

Authenticates SDK users from their EOAs

Features

  • Provide HTTP API endpoint

  • Return the result of validation with error message

How to use API

  • Call HTTP API endpoint with arguments set in request body

Authenticates SDK users from their EOAs

PUT https://asia-northeast1-startrail-api-prod.cloudfunctions.net/ethereum-signature-validator

This module recovers Ethereum address (EOA) from message and signature, and validates that the recovered address is equal to the signer's address.

Request Body

Name
Type
Description

message*

String

raw message that signature is generated from (it does not have to be hashing)

signature*

String

0x prefixed signature that is generated by secp256k1 algorithm such as eth_sign function

address*

String

Ethreum Address(EOA) of the signer(Both lowercase and mixed case which is compatible with EIP55 are accepted)

signMethod

String

eth_signor personal_sign

A specific sign method with which signature is generated. If not specified, both eth_sign and personal_sign method is used to validate EOA

// Validation Success
{ isValid: true, invalidReason: null, triedSignMethods: ['eth_sign'] }

// Validation Failure
{ isValid: false, invalidReason: 'Signature is invalid', triedSignMethods: ['eth_sign', 'personal_sign'] }
// Validation Failure
{ isValid: false, invalidReason: 'Request parameters are not properly set' }

{ isValid: false, invalidReason: 'Signature format is invalid' }

{ isValid: false, invalidReason: 'Ethereum address is invalid' }

Sample Request command

curl -X PUT \
  -H "Content-type: application/json" \
  --data '{"message": "test-message", "signature": "0x633bc7c201cf45fff0c1724b77c90c825a04c1b818f043915e2fedd55b4cfe681b425fe844ea3684a3860dc250527e318d3225b2d21ad0f75e419db4f0939a1b1c", "address": "0xBFC1331F8111102A51588b3b4A3E2F317B3a0363"}' \
 https://asia-northeast1-startrail-api-prod.cloudfunctions.net/ethereum-signature-validator
curl -X PUT \
  -H "Content-type: application/json" \
  --data '{"message": "test-message", "signature": "0x7cdf2aa9dfb2da8c6f8fe63269b4dbfb923451f0e36087479e7f2897718a6d0b6438bd44e367907e30c65a4b950c9e11f94049d38a0ca1dd4d419e107a3dade31c", "address": "0xBFC1331F8111102A51588b3b4A3E2F317B3a0363", "signMethod": "personal_sign"}' \
  https://asia-northeast1-startrail-api-prod.cloudfunctions.net/ethereum-signature-validator
PreviousDescription Of SRR DataNextChange Logs

Last updated 1 year ago

Was this helpful?

🔏