Skip to content

Commit

Permalink
update readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
afiorenza committed May 7, 2018
1 parent dbd9456 commit 42f42a2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 29 deletions.
58 changes: 29 additions & 29 deletions apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -187,35 +187,6 @@ If you want to create your own transaction and send it from your account please
"error": null
}

## Raw Transactions Endpoints [/eth/signedRawTx]

### SendRawTransaction [POST]
If you don't trust or don't want to use the **keypair provided by Bitsign**, you can always call this endpoint that will publish your **offline
signed** raw [transaction](https://web3js.readthedocs.io/en/1.0/web3-eth.html#sendsignedtransaction). Bitsign node will only handle gas cost and transaction publication,
but you have to **craft the entire transaction** on your end.
We will be releasing Bitsign tx library to facilitate this process soon.

+ Attributes
+ token: ey..yk (string) - User token.
+ env: production (string) - Environment to deploy the smart contract.
+ tx: 0x..m3 (string) - Signed data.

+ Request (application/json)

{
"token": "",
"env": "",
"tx": ""
}

+ Response 200 (application/json)

{
"success": true,
"data": {},
"error": null
}

### Get transactions by user [GET /api/v2/transactions?token={token}&hash={hash}]
This endpoint returns the transactions executed by the user. JWT token is a required parameter, but the tx hash is an optional
parameter.
Expand Down Expand Up @@ -245,6 +216,35 @@ parameter.
"error": null
}

## Raw Transactions Endpoints [/eth/signedRawTx]

### SendRawTransaction [POST]
If you don't trust or don't want to use the **keypair provided by Bitsign**, you can always call this endpoint that will publish your **offline
signed** raw [transaction](https://web3js.readthedocs.io/en/1.0/web3-eth.html#sendsignedtransaction). Bitsign node will only handle gas cost and transaction publication,
but you have to **craft the entire transaction** on your end.
We will be releasing Bitsign tx library to facilitate this process soon.

+ Attributes
+ token: ey..yk (string) - User token.
+ env: production (string) - Environment to deploy the smart contract.
+ tx: 0x..m3 (string) - Signed data.

+ Request (application/json)

{
"token": "",
"env": "",
"tx": ""
}

+ Response 200 (application/json)

{
"success": true,
"data": {},
"error": null
}

## Smart Contract Endpoints [/eth/contract]
### Deploy new Smart Contract [PUT]
This endpoint allow the user to deploy a new smart contract. The available smart contracts are:
Expand Down
15 changes: 15 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ If you want to create your own transaction and send it from your account please
"password": "<your_password>"
}

### [Get transactions by user [GET /api/v2/transactions?token={token}&hash={hash}]](https://bitsign.docs.apiary.io/#reference/0/raw-transactions-endpoints/get-transactions-by-user)
This endpoint returns the transactions executed by the user. JWT token is a required parameter, but the tx hash is an optional parameter.

+ Parameters

+ token: <user_token> - User token.
+ hash: <hash> (optional) - Transaction hash.

## Raw Transactions Endpoints
### [SendRawTransaction [POST /eth/signedRawTx]](https://bitsign.docs.apiary.io/#reference/0/raw-transactions-endpoints/sendrawtransaction)
If you don't trust or don't want to use the **keypair provided by Bitsign**, you can always call this endpoint that will publish your **offline
Expand Down Expand Up @@ -166,3 +174,10 @@ Although this method will generally cost gas, there is no limitation about it wh
},
"password": "<your_password>"
}

### [Get deployed contracts by user [GET /api/v2/contracts?token={token}]](https://bitsign.docs.apiary.io/#reference/0/smart-contract-endpoints/get-deployed-contracts-by-user)
This endpoint returns the contracts deployed by the user.

+ Parameters

+ token: <user_token> (string) - User token.

0 comments on commit 42f42a2

Please sign in to comment.