# USDL Contract Code

**1. Get User Address:**

> URL: <http://64.227.188.73:4000/balance/\\>\<user\_address>
>
> REQUEST PARAMS: @useraddress
>
> RESPONSE: Get particular user address
>
> METHOD: POST
>
> CURL: curl — request POST — url <http://64.227.188.73:26667/wallet/getaccount> — header
>
> ‘Accept: application/json’ — header ‘Content-Type: application/json’ — data ‘{ “address”:
>
> “309475a04fe3f25ec03cc0de680f316ecc3ee6fcc7” }’
>
> \*\*Note\*\* owner\_address — address in hex
>
> eg: <http://64.227.188.73:4000/getAddresshex/\\><address>

RESPONSE CURL

![](https://miro.medium.com/max/700/1*RkFRCgLduxkZcFNSNC3Pgw.png)

**2. Transfer USDL Amount:**

> URL: <http://64.227.188.73:4000/transfer/\\>\<from\_PK>/\<amount>/\<to\_address>
>
> REQUEST PARAMS: @Private key for from address
>
> @Amount to be transferred
>
> @To address
>
> RESPONSE: To transfer USDL amount
>
> METHOD: POST

**CURL STEPS FOR TRANSFER:**

**Create Transaction:**

> curl -X POST <http://64.227.188.73:26667/wallet/createtransaction> -d ‘{“to\_address”:
>
> “30405be4bf2610ec69d9c4ffa69de33875a438fe2f”, “owner\_address”:
>
> “309475a04fe3f25ec03cc0de680f316ecc3ee6fcc7”, “amount”: 1000 }’

**Get Transaction Sign:**

> curl — request POST — url <http://64.227.188.73:26667/wallet/gettransactionsign> — data
>
> ‘{“transaction”:{“raw\_data”:{“contract”:\[{“parameter”:{“value”:
>
> {“owner\_address”:”3c7f9ca4a67a03182746173c562b0bf7ccd000d8d2",”url”:”7777772e746573742
>
> e636f6d”},”type\_url”:”type.googleapis.com/protocol.WitnessCreateContract”},”type”:”WitnessCrea
>
> teContract”}],”ref\_block\_bytes”:”021d”,”ref\_block\_hash”:”e1f1e7e9743e69ae”,”expiration”:16170
>
> 22212000,”timestamp”:1617022154984},”raw\_data\_hex”:”0a02021d2208e1f1e7e9743e69ae40a0af
>
> a3f0872f5a5f0805125b0a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e57
>
> 69746e657373437265617465436f6e747261637412250a153c7f9ca4a67a03182746173c562b0bf7cc
>
> d000d8d2120c7777772e746573742e636f6d70e8f19ff0872f”},”privateKey”:”2f8887355130624327
>
> 358ceafddad6bdd8b00622e208ebdf492d254e1575318a”}’

**Broadcast Transaction:**

> curl — request POST — url <http://64.227.188.73:26667/wallet/broadcasttransaction> — data
>
> ‘{“visible”:false,”signature”:
>
> \[“a0360b7b4feec424e19eb1e913218d255de7313ee6d5793101b91c9ab5504fe83f469e2a3ccefa7a9e
>
> 800f71f03603c92e26db8725106331722b57881a6bdd3b01"],”txID”:”1462d9d7012dc0860200ace63
>
> 212c34d397d320722368aba1e686ee0ff5ecb1c”,”raw\_data”:{“contract”:\[{“parameter”:{“value”:
>
> {“owner\_address”:”3c7f9ca4a67a03182746173c562b0bf7ccd000d8d2",”url”:”7777772e746573742
>
> e636f6d”},”type\_url”:”type.googleapis.com/protocol.WitnessCreateContract”},”type”:”WitnessCrea
>
> teContract”}],”ref\_block\_bytes”:”021d”,”ref\_block\_hash”:”e1f1e7e9743e69ae”,”expiration”:16170
>
> 22212000,”timestamp”:1617022154984},”raw\_data\_hex”:”0a02021d2208e1f1e7e9743e69ae40a0af
>
> a3f0872f5a5f0805125b0a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e57
>
> 69746e657373437265617465436f6e747261637412250a153c7f9ca4a67a03182746173c562b0bf7cc
>
> d000d8d2120c7777772e746573742e636f6d70e8f19ff0872f”}’
>
> \*\*Note\*\* owner\_address — address in hex
>
> url — url address in hex, you can convert hex to decimals in online

**3. Transaction Details:**

> URL: <http://64.227.188.73:4000/txinfo/\\>\<transaction\_hash>
>
> REQUEST PARAMS: @transaction hash
>
> RESPONSE: To get the details of transaction hash
>
> METHOD: POST
>
> CURL: curl — request POST — url <http://64.227.188.73:26667/wallet/gettransactionbyid>
>
> — header ‘Accept: application/json’ — header ‘Content-Type: application/json’ — data ‘{ “value”:
>
> “08fcda8a557938579381235b92abd61bcfaac3190013572804634f58ae1ab8ed” }’

![](https://miro.medium.com/max/700/1*aIh_DuJNCT81nR9r0gY2HQ.png)

**4. Transaction Info:**

> URL: <http://64.227.188.73:4000/tx/\\>\<transaction\_hash>
>
> REQUEST PARAMS: @transaction hash
>
> RESPONSE: To get the fee details of transaction hash
>
> METHOD: POST
>
> CURL: curl — request POST — url <http://64.227.188.73:26667/wallet/gettransactioninfobyid>
>
> — header ‘Accept: application/json’ — header ‘Content-Type: application/json’ — data ‘{ “value”:
>
> “08fcda8a557938579381235b92abd61bcfaac3190013572804634f58ae1ab8ed” }’

![](https://miro.medium.com/max/700/1*BMg-KuCchG2Yz4mWcgGIaQ.png)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lgcy-network.gitbook.io/welcome/build/usdl-contract-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
