You are able to issue Smart Token via this API.

GraphQL API

  • Query String
    mutation IssueToken($input: IssueTokenInput!) {
      issueToken(input: $input) {
        transaction
        hash
        submitToken
      }
    }
  • Query Variables
    {
      "input": { 
        "name":"Green and life",
        "symbol":"GALIFE",
        "totalSupply":"4800000000000000000000000000",
        "price": {
          "numerator":"1",
          "denominator":"12000"
        },
        "description":"qwerqwerqwerqwer",
        "website":"green.com",
        "logo":null,
        "proofOfContract":null
      }
    }
  • HTTP Headers
    {
      "accept": "application/json",
      "content-type": "application/json",
      "authorization": "bearer [JWT Web-to-Server access token]"
    }

HTTP Request and Response

Request

  • URL
    • For development: https://test.fstk.io/api
    • For production: https://engine.fstk.io/api
  • Method: POST
  • Headers
    • accept: application/json
    • content-type: application/json
    • authorization: Bearer [JWT Web-to-Server access token]
      • (for example)
        Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6ImZzdGstZW5naW5lIn0.eyJ1aWQiOiLDr1xiw73Ch8KDSFx1MDAxMcOowo5awrvCqsOAXHUwMDAywrwmIiwiaWF0IjoxNTM4NzA5MDM2LCJleHAiOjE1Mzg3OTU0MzYsImF1ZCI6InVybjpmc3RrOmVuZ2luZSIsImlzcyI6InVybjpmc3RrOmVuZ2luZSIsInN1YiI6InVybjpmc3RrOmVuZ2luZTphY2Nlc3NfdG9rZW4ifQ.msJZ61FHIkKtjUpDs4sx1Kk1rb9vdhus3ntUDj6rHNmsygiHTgOEMQFJMtVqtWqkNgrtRgGpngq8Rf47xTT53g
  • Body
    ------WebKitFormBoundarya1KBKIx6Q3mGrSEU
    Content-Disposition: form-data; name="operations"
    
    {
      "query":"mutation IssueToken($input: IssueTokenInput!) { issueToken(input: $input) { transaction   hash   submitToken } }",
      "variables": {
        "input": { 
          "name":"Green and life",
          "symbol":"GALIFE",
          "totalSupply":"4800000000000000000000000000",
          "price": {
            "numerator":"1",
            "denominator":"12000"
          },
          "description":"qwerqwerqwerqwer",
          "website":"green.com",
          "logo":null,
          "proofOfContract":null
        }
      }
    }
    ------WebKitFormBoundarya1KBKIx6Q3mGrSEU
    Content-Disposition: form-data; name="map"
    
    {"logo":["variables.input.logo"],"proofOfContract":["variables.input.proofOfContract"]}
    ------WebKitFormBoundarya1KBKIx6Q3mGrSEU
    Content-Disposition: form-data; name="logo"; filename="blob"
    Content-Type: image/png
    
    logo file content
    
    ------WebKitFormBoundarya1KBKIx6Q3mGrSEU
    Content-Disposition: form-data; name="proofOfContract"; filename="test.pdf"
    Content-Type: application/pdf
    
    proofOfContract file content
    
    ------WebKitFormBoundarya1KBKIx6Q3mGrSEU--

    The value of query in the body is a String.

    Please refer to GraphQL multipart request specification for files upload.

Response

{
  "issueToken": {
    "transaction": {
      "nonce": "0x0",
      "gasPrice": "0x3b9aca00",
      "gas": "0x595c92",
      "to": "0x7aeCC9c7dC65d15aEbF1e2cF7eb0fBBf38F49414",
      "value": "0x0",
      "data": "0x4000aea00000000000000000000000003705ef5d9c36509faa0d4ebc7e7e09dbda0ba08e0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002448d623336000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000f8277896582678ac000000000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000e477265656e20616e64206c696665000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000647414c494645000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000632f697066732f7a4275724b415371445a625574443368784a7a5a68334c514e6f61614361777765387444435559524b5a6948437a594d3632396b6556457a5551626d527064547a73355067366570543352507279414b4451535371656e323542644a38000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "chainId": 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5hdG9yIjoiMTIwMDAifSwidmVuZGlibGUiOnRydWUsIndlYnNpdGUiOiJncmVlbi5jb20iLCJkZXNjcmlwdGlvbiI6eyJlbiI6InF3ZXJxd2VycXdlcnF3ZXIifX0sImlhdCI6MTU0ODY2NjE4NSwiZXhwIjoxNTQ4NjY2Nzg1LCJhdWQiOiJ1cm46ZnN0azplbmdpbmUiLCJpc3MiOiJ1cm46ZnN0azplbmdpbmUiLCJzdWIiOiJ1cm46ZnN0azplbmdpbmU6c3VibWl0X3Rva2VuIn0.RcqBWtK_K5CdztQZfxMzDn_09lfgKvmkS1NYIIZcoprljeQVmPD9-xOkfwsHTy4_p1ZOLri7V_PJPBltkhn1RA"
  }
}

Parameters

Request

  • name <string!>
    • Smart Token name.
  • symbol <string!>
    • Smart Token symbol.
  • totalSupply <string!>
    • Total supply of the Smart Token. The format is Decimaled Number.
  • price <Fraction!>
    • Smart Token price.
    • numerator <string!>
      • The numerator of this fraction.
    • denominator <string!>
      • The denominator of this fraction.
  • description <string!>
    • Description of the Smart Token.
  • website <string!>
    • The Smart Token related website.
  • logo <Upload!>
    • The image file of the Smart Token logo.
  • proofOfContract <Upload!>
    • The PDF file of the Smart Token contract.
  • por <enum PORMode>
    • ENABLE or DISABLE <enum>
    • Default is DISABLE.

Response

  • issueToken <IssueTokenPayload>
    • transaction <JSON>
      • UNSIGNED raw transaction format in Ethereum.
    • submitToken <string!>
    • hash <string>
      • PORMode ENABLE: Hash of the abi encode.
      • PORMode DISABLE: Hash of the RLP encode.