Unagii Docs
Website
Brand
Blog
Launch App
Search…
Introduction
Unagii Vaults
Overview
Understanding Vaults
Strategies
Architecture
Smart Contracts
Security
F.A.Q
Vault Integration
Unagii Stake
Overview
Ethereum
Tendermint
Security
F.A.Q
Stake Integration
DeFi
What is DeFi?
What are the risks in DeFi?
What are Stablecoins?
Unagii Account
Powered By
GitBook
Vault Integration
If you require assistance or need additional information to integrate Unagii Vault, reach out to us at
[email protected]
Instructions for V2 Vault integrations are coming soon.
Deposit flow
Withdraw flow
get
https://app.unagii.com/api/v1
/sc/vault/allowance/{vaultType}/{token}/{address}
Get token allowance
get
https://app.unagii.com/api/v1
/sc/vault/balance/{vaultType}/{token}/{address}
Get deposited balance
get
https://app.unagii.com/api/v1
/sc/vault/digest/approve/{vaultType}/{token}/{address}?amount={amount}
Get data to build Approve Token transaction object
1
const
approveTxn
=
{
2
from
:
address
,
3
gasPrice
:
"20000000000"
,
// 20 Gwei
4
gas
:
String
(
result
.
gasLimit
),
5
to
:
result
.
contractAddress
,
6
value
:
"0x0"
,
7
nonce
:
"10"
,
// tx nonce
8
data
:
result
.
digest
9
}
10
web3
.
eth
.
sendTransaction
(
approveTxn
).
then
(
// do something );
Copied!
get
https://app.unagii.com/api/v1
/sc/vault/digest/deposit/{vaultType}/{token}/{address}?amount={amount}
Get data to build Deposit transaction object
1
const
depositTxn
=
{
2
from
:
address
,
3
gasPrice
:
"20000000000"
,
// 20 Gwei
4
gas
:
String
(
result
.
gasLimit
),
5
to
:
result
.
contractAddress
,
6
value
:
"0x0"
,
7
nonce
:
"10"
,
// tx nonce
8
data
:
result
.
digest
9
}
10
web3
.
eth
.
sendTransaction
(
depositTxn
).
then
(
// do something );
Copied!
get
https://app.unagii.com/api/v1
/sc/vault/digest/withdraw_by_amount/{vaultType}/{token}/{address}?amount={amount}
Get data to build Withdraw transaction object
1
const
withdrawalTxn
=
{
2
from
:
address
,
3
gasPrice
:
"20000000000"
,
// 20 Gwei
4
gas
:
String
(
result
.
gasLimit
),
5
to
:
result
.
contractAddress
,
6
value
:
"0x0"
,
7
nonce
:
"10"
,
// tx nonce
8
data
:
result
.
digest
9
}
10
web3
.
eth
.
sendTransaction
(
withdrawalTxn
).
then
(
// do something );
Copied!
Unagii Vaults - Previous
F.A.Q
Next - Unagii Stake
Overview
Last modified
11mo ago
Copy link
Contents
Deposit flow
Withdraw flow
get
Get token allowance
get
Get deposited balance
get
Get data to build Approve Token transaction object
get
Get data to build Deposit transaction object
get
Get data to build Withdraw transaction object