generated from shuding/nextra-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
181 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"route": "Route", | ||
"deposit": "Deposit", | ||
"approve": "Approve", | ||
"transfer": "Transfer", | ||
"transferFrom": "TransferFrom", | ||
"permitTransferFrom": "Permit TransferFrom", | ||
"harvest": "Harvest", | ||
"borrow": "Borrow", | ||
"repay": "Repay", | ||
"redeem": "Redeem", | ||
"swap": "Swap", | ||
"transfer": "Transfer", | ||
"withdraw": "Withdraw", | ||
"approve": "Approve", | ||
"permitTransferFrom": "Permit TransferFrom" | ||
"withdraw": "Withdraw" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,48 @@ | ||
# Approve | ||
|
||
Available in endpoint. Docs coming soon... | ||
Approve an address to spend tokens | ||
|
||
Arguments: | ||
| name | Description | Example | | ||
| ------- | --------------- | -------------------------- | | ||
| `token` | Address of the token to approve | token=0x6b175474e8909... | | ||
| `spender` | Address of the spender | spender=0x6b175474e8909... | | ||
| `amount` | Raw amount to approve | amount=100000000000 | | ||
|
||
## Example | ||
|
||
Body: | ||
|
||
```json | ||
[ | ||
{ | ||
"action": "approve", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"spender": "0x80eba3855878739f4710233a8a19d89bdd2ffb8e", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
] | ||
``` | ||
|
||
Curl: | ||
|
||
```bash copy | ||
curl -X 'POST' \ | ||
'https://api.enso.finance/api/v1/shortcuts/bundle?chainId=1&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \ | ||
-H 'accept: */*' \ | ||
-H 'Content-Type: application/json' \ | ||
-d '[ | ||
{ | ||
"protocol": "enso", | ||
"action": "approve", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"spender": "0x80eba3855878739f4710233a8a19d89bdd2ffb8e", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
]' | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,33 @@ | ||
# Permit TransferFrom | ||
|
||
Available in endpoint. Docs coming soon... | ||
Approve and transfer a token that supports permit to a specific address. | ||
A permit signature needs to be generated offchain and passed to the API. | ||
|
||
Arguments: | ||
| name | Description | Example | | ||
| ------- | --------------- | -------------------------- | | ||
| `token` | Address of the token to approve | token=0x6b175474e8909... | | ||
| `nonce` | The nonce to prevent signature replays | nonce=1 | | ||
| `deadline` | The deadline on the permit signature | deadline=1710150268| | ||
| `signature` | The permit signature| | | ||
| `amount` | Raw amount to transfer | amount=100000000000 | | ||
|
||
## Example | ||
|
||
Body: | ||
|
||
```json | ||
[ | ||
{ | ||
"action": "transfer", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"nonce": "1", | ||
"deadline": "1710150268", | ||
"signature": "0x..", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,49 @@ | ||
# Transfer | ||
|
||
Available in endpoint. Docs coming soon... | ||
Transfer one or more tokens to a specific address. | ||
|
||
Arguments: | ||
| name | Description | Example | | ||
| ------- | --------------- | -------------------------- | | ||
| `token` | Address of the token | token=0x6b175474e8909... | | ||
| `recipient` | Address of the recipient | spender=0x6b175474e8909... | | ||
| `amount` | Raw amount to transfer | amount=100000000000 | | ||
|
||
|
||
## Example | ||
|
||
Body: | ||
|
||
```json | ||
[ | ||
{ | ||
"action": "transfer", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"recipient": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
] | ||
``` | ||
|
||
Curl: | ||
|
||
```bash copy | ||
curl -X 'POST' \ | ||
'https://api.enso.finance/api/v1/shortcuts/bundle?chainId=1&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \ | ||
-H 'accept: */*' \ | ||
-H 'Content-Type: application/json' \ | ||
-d '[ | ||
{ | ||
"protocol": "enso", | ||
"action": "transfer", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"recipient": "0x80eba3855878739f4710233a8a19d89bdd2ffb8e", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
]' | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Transfer From | ||
|
||
TransferFrom one or more tokens to a specific address. | ||
|
||
Arguments: | ||
| name | Description | Example | | ||
| ------- | --------------- | -------------------------- | | ||
| `token` | Address of the token | token=0x6b175474e8909... | | ||
| `spender` | Address of the spender | token=0x6b175474e8909... | | ||
| `recipient` | Address of the recipient | spender=0x6b175474e8909... | | ||
| `amount` | Raw amount to transfer | amount=100000000000 | | ||
|
||
Note: Spender must have approved the amount to be transferred. | ||
## Example | ||
|
||
Body: | ||
|
||
```json | ||
[ | ||
{ | ||
"action": "transfer", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"recipient": "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11", | ||
"spender": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
] | ||
``` | ||
|
||
Curl: | ||
|
||
```bash copy | ||
curl -X 'POST' \ | ||
'https://api.enso.finance/api/v1/shortcuts/bundle?chainId=1&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \ | ||
-H 'accept: */*' \ | ||
-H 'Content-Type: application/json' \ | ||
-d '[ | ||
{ | ||
"protocol": "enso", | ||
"action": "transfer", | ||
"args": { | ||
"token": "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07", | ||
"recipient": "0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11", | ||
"spender": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", | ||
"amount": "1000000000000000000000000" | ||
} | ||
} | ||
]' | ||
``` | ||
|