Skip to content

Commit

Permalink
Create wallet_schema.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tomt1664 authored Oct 1, 2023
1 parent da1c66f commit 861bee0
Showing 1 changed file with 156 additions and 0 deletions.
156 changes: 156 additions & 0 deletions wasm/wallet_schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
```
{
"title": "Wallet",
"description": "Wallet object for a mercury layer client wallet",
"type": "object",
"properties": {
"name": {
"description": "user set wallet name",
"type": "string"
},
"mnemonic": {
"description": "12 word bip39 wallet seed",
"type": "string"
},
"version": {
"description": "Version number",
"type": "string"
},
"state_entity_endpoint": {
"description": "Mercury server endpoint",
"type": "string"
},
"electrum_endpoint": {
"description": "Elecrs/Esplora server http endpoint",
"type": "string"
},
"blockheight": {
"description": "Current bitcoin blockheight",
"type": "number"
},
"tokens": {
"type": "array",
"items": {
"description": "List of deposit tokens",
"type": "object",
"properties":
"token_id": {
"description": "Deposit token ID generated by server",
"type": "string"
},
"value": {
"description": "Value of token",
"type": "number"
},
"invoice": {
"description": "Bolt11 LN invoice for token payment",
"type": "string"
},
"confirmed": {
"description": "Invoice payment confirmed",
"type": "boolean"
},
}
},
"activity": {
"type": "array",
"items": {
"description": "Activity log",
"type": "object",
"properties": {
"utxo": {
"description": "Coin UTXO outpoint TxID:vout",
"type": "string"
},
"amount": {
"description": "Value of coin",
"type": "number"
},
"action": {
"description": "Activity action",
"type": "string"
},
"date": {
"description": "Epoch time of action",
"type": "number"
},
}
}
},
"coins": {
"type": "array",
"items": {
"description": "List of current coins",
"type": "object",
"properties": {
"utxo": {
"description": "Coin UTXO outpoint TxID:vout",
"type": "string"
},
"address": {
"description": "Statecoin address",
"type": "string"
},
"amount": {
"description": "Coin value",
"type": "number"
},
"statechain_id": {
"description": "Statechain server ID",
"type": "string"
},
"privkey": {
"description": "Coin private key share",
"type": "string"
},
"auth_key": {
"description": "Auth private key",
"type": "string"
},
"locktime": {
"description": "nLocktime of current backup tx",
"type": "number"
},
"status": {
"description": "Coin status",
"type": "string"
},
"backup_txs": {
"description": "List of previous backup transactions for the coin",
"type": "array",
"items: {
"type": "object",
"properties": {
"tx_n": {
"description": "tx number",
"type": "number"
},
"tx": {
"description": "backup tx hex",
"type": "string"
},
"client_public_nonce": {
"description": "client signature public nonce",
"type": "string"
},
"blinding_factor": {
"description": "client blinding nonce",
"type": "string"
}
}
}
}
"tx_cpfp": {
"description": "CPFP transaction",
"type": "string"
},
"tx_withdraw": {
"description": "Withdrawal transaction",
"type": "string"
},
}
}
}
}
}
```

0 comments on commit 861bee0

Please sign in to comment.