Zephyr Protocol Documentation:As Zephyr is a Monero fork and has a daemon-rpc and a wallet-rpc.For Exchanges/Intergations: if you already support or are familiar with Monero then the integration is very similar with some important key differences.https://www.zephyrprotocol.com/documentation/wallet-rpcZephyr has 3 Native assets. In the codebase, these asset_types are denoted as ZEPH, ZEPHUSD and ZEPHRSV. (mapping to $ZEPH, $ZSD, $ZRS respectively)Supporting ZSD or ZRS is as simple as checking and accounting for the asset_type field. If you are only adding ZEPH, you still need to check for the ZEPH asset_type to ensure that ZSD/ZRS transactions are not creditted as ZEPH.Deposits/transactions:https://www.zephyrprotocol.com/documentation/wallet-rpc#get_transfer_by_txidImportantasset_type == ZEPH | ZEPHUSD | ZEPHRSVExample Call:
Example Response:
BalanceE.G. "asset_type":"ZEPH" (or pass nothing)
Withdraw/SendingConversions between asset_types are done by the Transfer method by setting the source_asset and destination_asset.By default source_asset and destination_asset is set to ZEPH. To enable withdrawing ZSD from an exchange the source_asset and destination_asset will need to be set to ZEPHUSDwallet-rpc method: transfer Inputs:
curl http://localhost:17777/json_rpc -d
'{"jsonrpc":"2.0","id":"0","method":"get_transfer_by_txid","params":{"txid":"ea51d898065d14
5e29df9d933cf5879c9a0d28f27f54b8a22fd4c5bc350e752c"}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"transfer": {
"address":
"ZEPHs6xVWGFWTfEYJsJUFDPU4KxxvQmpmeFuw78x4L2vPHBbWtMtbhdLJFMdiXEXBA1kFStyDMkrLYuEvgWyAtjA8P
ynYZNFBm1",
"amount": 1000000000000,
"amounts": [1000000000000],
"asset_type": "ZEPH",
"confirmations": 58606,
"double_spend_seen": false,
"fee": 1260840000,
"height": 3383,
"locked": false,
"note": "",
"payment_id": "0000000000000000",
"subaddr_index": {
"major": 0,
"minor": 1
},
"subaddr_indices": [{
"major": 0,
"minor": 1
}],
"suggested_confirmations_threshold": 1,
"timestamp": 1685688983,
"txid": "ea51d898065d145e29df9d933cf5879c9a0d28f27f54b8a22fd4c5bc350e752c",
"type": "in",
"unlock_time": 0
},
"transfers": [{
"address":
"ZEPHs6xVWGFWTfEYJsJUFDPU4KxxvQmpmeFuw78x4L2vPHBbWtMtbhdLJFMdiXEXBA1kFStyDMkrLYuEvgWyAtjA8P
ynYZNFBm1",
"amount": 1000000000000,
"amounts": [1000000000000],
"asset_type": "ZEPH",
"confirmations": 58606,
"double_spend_seen": false,
"fee": 1260840000,
"height": 3383,
"locked": false,
"note": "",
"payment_id": "0000000000000000",
"subaddr_index": {
"major": 0,
"minor": 1
},
"subaddr_indices": [{
"major": 0,
"minor": 1
}],
"suggested_confirmations_threshold": 1,
"timestamp": 1685688983,
"txid": "ea51d898065d145e29df9d933cf5879c9a0d28f27f54b8a22fd4c5bc350e752c",
"type": "in",
"unlock_time": 0
}]
}
}
curl http://127.0.0.1:17777/json_rpc -d
'{"jsonrpc":"2.0","id":"0","method":"get_balance","params":{"asset_type":"ZEPH"}' -H
'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"balances": [{
"asset_type": "ZEPH",
"balance": 213905531498710183,
"blocks_to_unlock": 0,
"multisig_import_needed": false,
"per_subaddress": [{
"account_index": 0,
"address":
"ZPHTje79Hf22DpoBFrjhPXDXz9M3Dgx4Q6DPEYxZLziGTx1AVSV6uvbYmdCarUL5ABF5hJQZZzEu23PKzqJuC8p4Y8
eC6S7BpuB",
"address_index": 0,
"balance": 213905531498710183,
"blocks_to_unlock": 0,
"label": "Primary account",
"num_unspent_outputs": 6,
"time_to_unlock": 0,
"unlocked_balance": 213905531498710183
}],
"time_to_unlock": 0,
"unlocked_balance": 213905531498710183
}]
}
}
destinations - array of destinations to receive ZEPH:
amount — unsigned int;Amount to send to each destination, in atomic units.
address — string;Destination public address.
account_index — unsigned int;(Optional) Transfer from this account index. (Defaults to 0)
subaddr_indices — array of unsigned int;(Optional) Transfer from this set of subaddresses. (Defaults to empty — all indices)
priority — unsigned int;Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
mixin — unsigned int;Number of outputs from the blockchain to mix with (0 means no mixing).
ring_size — unsigned int;Number of outputs to mix in the transaction (this output + N decoys from the blockchain). (Unless dealing with pre rct outputs, this field is ignored on mainnet).
unlock_time — unsigned int;Number of blocks before the zephyr can be spent (0 to not add a lock).
get_tx_key — boolean;(Optional) Return the transaction key after sending.
do_not_relay — boolean;(Optional) If true, the newly created transaction will not be relayed to the zephyr network. (Defaults to false)
get_tx_hex — boolean;Return the transaction as hex string after sending (Defaults to false)
get_tx_metadata — boolean;Return the metadata needed to relay the transaction. (Defaults to false)
source_asset — string;use ZEPH, ZEPHUSD or ZEPHRSV. (Defaults to ZEPH)
destination_asset — string;use ZEPH, ZEPHUSD or ZEPHRSV. (Defaults to ZEPH)