Download OpenAPI specification:Download
With Kaleido's Zero Knowledge Token Transfer service, transfers are conducted with Zero Knowledge Proofs such that the transactions are both confidential (the balances and transfer amounts are concealed), and anonymous (the sender and receiver identities are concealed).
Currently the service supports shielding ERC20 tokens. Ethereum accounts holding balances in ERC20 tokens can use their tokens to fund a corresponding shielded account in the service, and obtain equal amount shielded tokens. They the shielded tokens can be transfers among the shielded accounts owned by the participating organizations.
Shielded token balances can be used to exchange back to ERC20 tokens by withdrawing.
This service is part of Kaleido Lab's experimental catalog.
Returns the accounts owned by the current membership across all Zero Knowledge Token Transfer services, both unshielded Ethereum accounts and shielded accounts.
If the entry contains an index
property, they exist locally inside the target service instance, and can be used to send shielded tokens and query balances
service_id required | string^[0-9a-z]{10}$ |
{- "membership_id": "string",
- "ethAccount": "string",
- "shieldedAccount": [
- "string"
], - "index": 0
}
Create a shielded account for the Ethereum account, so that the new shielded account can be funded with the Ethereum account
service_id required | string^[0-9a-z]{10}$ |
ethAccount required | string^0x[0-9a-fA-F]{40}$ |
{- "ethAccount": "string"
}
{- "membership_id": "string",
- "ethAccount": "string",
- "shieldedAccount": [
- "string"
], - "index": 0
}
Returns the Zero Knowledge Transfer contracts deployed in the environment along with their corresponding ERC20 contracts
service_id required | string^[0-9a-z]{10}$ |
[- {
- "zsc": "string",
- "erc20": "string",
- "epochLength": 0,
- "compatible": true
}
]
Deploys a Zero Knowledge Proof contract (ZSC)
service_id required | string^[0-9a-z]{10}$ |
erc20 required | string ERC20 token contract address used by the ZSC for funding and withdrawing operations |
{- "erc20": "string"
}
{- "zsc": "string",
- "erc20": "string",
- "epochLength": 0,
- "compatible": true
}
Funds a shielded account in a Zero Knowledge Proof contract (ZSC) by transfering ERC20 tokens to the ZSC contract
service_id required | string^[0-9a-z]{10}$ |
shielded_contract_id required | string^0x[0-9a-f]{40}$ |
ethAccount required | string^0x[0-9a-fA-F]{40}$ The Ethereum account to receive the ERC20 tokens from the ZSC after burning equal amount of Zethers from the corresponding shielded account |
amount required | integer The amount of ERC20 tokens to transfer |
{- "ethAccount": "string",
- "amount": 0
}
Withdraws from a shielded account in a Zero Knowledge Proof contract (ZSC) by burning the requested amount of Zether and transfering equal amount of ERC20 tokens back to the original funding account
service_id required | string^[0-9a-z]{10}$ |
shielded_contract_id required | string^0x[0-9a-f]{40}$ |
ethAccount required | string^0x[0-9a-fA-F]{40}$ The Ethereum account to draw the ERC20 tokens from in order to fund the corresponding shielded account inside the ZSC |
shieldedAccount | Array of strings Optional. The shielded account corresponding to the Ethereum account. |
amount required | integer The amount of ERC20 tokens to transfer |
{- "ethAccount": "string",
- "shieldedAccount": [
- "string"
], - "amount": 0
}
Transfers Zether tokens from a shielded account to another shielded account in a Zero Knowledge Proof contract (ZSC)
service_id required | string^[0-9a-z]{10}$ |
shielded_contract_id required | string^0x[0-9a-f]{40}$ |
from required | Array of strings Shielded account to transfer Zether tokens from |
to required | Array of strings Shielded account to transfer Zether tokens to |
amount required | integer The amount of Zether tokens to transfer |
decoys | Array of strings[ items ] Optional. List of shielded accounts to add to the anonymity set to increase security of the transfer transaction |
{- "from": [
- "string"
], - "to": [
- "string"
], - "amount": 0,
- "decoys": [
- [
- "string"
]
]
}
Returns Zether token balance for the shielded account corresponding to the given Ethereum account
service_id required | string^[0-9a-z]{10}$ |
shielded_contract_id required | string^0x[0-9a-f]{40}$ |
ethAccount required | string^0x[0-9a-f]{40}$ |
{- "result": 0
}