This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
api_calls [11/11/2021 17:20] – gfactor | api_calls [06/15/2023 13:53] (current) – Added API Version info quickmythril | ||
---|---|---|---|
Line 2: | Line 2: | ||
{{: | {{: | ||
- | **Please note: You need to have enabled API documentation in your settings.json file for using API calls. You can only run these calls on the computer acting as a node which will need to be fully synced!** | + | **Please note: the API calls are universal. They will work on any operating system. |
**Here is the line:** | **Here is the line:** | ||
Line 39: | Line 39: | ||
http:// | http:// | ||
+ | |||
+ | |||
+ | **Version 3.0 & the 'API Key'** | ||
+ | |||
+ | In **core version 3.0.1** and beyond, there is now an ' | ||
+ | |||
+ | Any API call that has the **X-API-KEY** section in it, will require the API key to be input in order to function. For calls that have that, simply open the **apikey.txt**, | ||
+ | |||
+ | **New 'API Version' | ||
+ | |||
+ | Any API call that has the **X-API-VERSION** section in it, will require the desired API version to be input in order to function. When using version 1, the API will simply return with " | ||
+ | |||
+ | ====== Building Transactions ====== | ||
+ | **NOTE: As a prerequisite, | ||
+ | |||
+ | **WARNING: If this key is stolen, you will lose your funds.** | ||
+ | |||
+ | Better to not save this key in a file. After used, clear your browser cache as well as your copy-paste clipboard. | ||
+ | |||
+ | a. Start the UI \\ | ||
+ | b. Go to http:// | ||
+ | c. Set developer mode from browser \\ | ||
+ | (ex Chrome: More tool-> | ||
+ | d. Login to the Wallet account \\ | ||
+ | e. To display your private key, execute in console: \\ | ||
+ | Base58.encode(reduxStore.getState().app.selectedAddress.seed) | ||
+ | |||
+ | **1: Find the API call for the desired transaction.** | ||
+ | |||
+ | It will say "Build raw, unsigned, ... transaction" | ||
+ | Click the heading then click the "Try it out" button. | ||
+ | Edit all the keys to their proper values for this tx. | ||
+ | Fee is 0.001 and enter reference and timestamp last. | ||
+ | (see info at 1a & 1b) | ||
+ | Press " | ||
+ | |||
+ | 1a: Reference is retrieved using the following API call: | ||
+ | |||
+ | / | ||
+ | |||
+ | 1b: Timestamp is retrieved using the following API call: | ||
+ | |||
+ | / | ||
+ | |||
+ | **2: Sign the raw, unsigned transaction with API call:** | ||
+ | |||
+ | / | ||
+ | |||
+ | Enter your Private Key and the Response Body from step 1. | ||
+ | Press " | ||
+ | |||
+ | **3: Submit signed transaction with API call:** | ||
+ | |||
+ | / | ||
+ | |||
+ | Paste the Response Body from step 2 and press " |