Create Proposal

Voting Create Proposal API Endpoints.

/create/proposal/transactions

GET http://localhost:4003/api/create/proposal/transactions

Returns all Create Proposal Transactions

Query Parameters

Name
Type
Description

page

integer

The number of page to be returned

limit

integer

The number of transaction per page

orderBy

string

Orders by specific parameter (asc or desc) Example: orderBy=id:asc

transform

boolean

Transforms to raw response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 4,
    "pageCount": 1,
    "totalCount": 4,
    "next": null,
    "previous": null,
    "self": "/voting/create/proposal/transactions?transform=true&page=1&limit=100",
    "first": "/voting/create/proposal/transactions?transform=true&page=1&limit=100",
    "last": "/voting/create/proposal/transactions?transform=true&page=1&limit=100"
  },
  "data": [
    {
      "id": "8ba1411eb769c3ba7d04b7e353d5c78240705597ee254100164ee77b9999234b",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "duration": {
        "blockHeight": 123456
      },
      "content": "qwertz",
      "timestamp": {
        "epoch": 136819696,
        "unix": 1626920896,
        "human": "2021-07-22T02:28:16.000Z"
      }
    },
    {
      "id": "c8f3fff0df73f1125d15a467b4f9401a7967e2915c93612737b7761cde7ada29",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "duration": {
        "blockHeight": 123456
      },
      "content": "qwertz",
      "timestamp": {
        "epoch": 136819704,
        "unix": 1626920904,
        "human": "2021-07-22T02:28:24.000Z"
      }
    },
    ...
  ]
}

Curl Example

curl http://localhost:4003/api/create/proposal/transactions

/create/proposal/transactions/:id

GET http://localhost:4003/api/create/proposal/transactions/:id

Returns Create Proposal Transaction by id.

Path Parameters

Name
Type
Description

id

string

Transaction Id

Query Parameters

Name
Type
Description

transform

boolean

Transforms to raw response

{
  "data": {
    "id": "fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30",
    "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "duration": {
      "blockHeight": 123456
    },
    "content": "QmPfdpTRbhGVZZWKZDzNT5T4NB6C7fFo5wM9Xe8qmLCXWt",
    "timestamp": {
      "epoch": 142719560,
      "unix": 1632820760,
      "human": "2021-09-28T09:19:20.000Z"
    }
  }
}

Curl Example

curl http://localhost:4003/api/create/proposal/transactions/fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30

/create/proposal/:id/wallet

GET http://localhost:4003/api/create/proposal/:id/wallet

Returns wallet by Create Proposal transaction id

Path Parameters

Name
Type
Description

id

string

Create Proposal transaction id

{
  "data": {
    "address": "ANBkoGqWeTSiaEVgVzSKZd3jS7UWzv9PSo",
    "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "nonce": "36",
    "balance": "244863000000000",
    "proposals": {
      "8ba1411eb769c3ba7d04b7e353d5c78240705597ee254100164ee77b9999234b": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "qwertz"
        },
        "agree": [],
        "disagree": []
      },
      "c8f3fff0df73f1125d15a467b4f9401a7967e2915c93612737b7761cde7ada29": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "qwertz"
        },
        "agree": [
          "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37"
        ],
        "disagree": []
      },
      "9268a2dba346f7a9673877755061b5ba0bd14f72beeced37b877022aca2aed92": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "QmPfdpTRbhGVZZWKZDzNT5T4NB6C7fFo5wM9Xe8qmLCXWt"
        },
        "agree": [],
        "disagree": []
      },
      "fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30": {
        "proposal": {
          "duration": {
            "blockHeight": 123456
          },
          "content": "QmPfdpTRbhGVZZWKZDzNT5T4NB6C7fFo5wM9Xe8qmLCXWt"
        },
        "agree": [],
        "disagree": []
      }
    }
  }
}

Curl Example

curl http://localhost:4003/api/create/proposal/fe8419bda6525ef0074e733dbd3e8b671267c6c8d51b025fd7ae0812947cec30/wallet

Last updated