Open a vault, or have back the one with this reference
const url = 'https://api.sotirea.com/v1/vaults';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","reference":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sotirea.com/v1/vaults \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "reference": "example" }'Opens a vault with an address on every network of your environment; nothing touches a network until it is first paid out of. Give a reference, your own id such as your customer’s, to open one vault per customer: the same reference again answers that vault, 200, and the same reference with a different name is refused 409. A new vault is answered 201.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
What to call the vault, at most 80 characters. Without it, the reference names it.
Your own id for the vault, 1 to 128 characters with no spaces, unique in your organisation.
Example generated
{ "name": "example", "reference": "example"}Responses
Section titled “Responses”The reference already named a vault, so that vault is answered, unchanged.
object
object
Where to pay the vault, one address per network.
object
The network, in CAIP-2 form, like eip155:1.
The network is not available right now: money sent here is still credited, but do not show this address to be paid until it is available again.
object
Quote it when asking about a request; it is in the X-Request-Id header too.
Example
{ "success": true}Done.
object
object
Where to pay the vault, one address per network.
object
The network, in CAIP-2 form, like eip155:1.
The network is not available right now: money sent here is still credited, but do not show this address to be paid until it is available again.
object
Quote it when asking about a request; it is in the X-Request-Id header too.
Example
{ "success": true}default
Section titled “default”Refused or failed, in words a person can act on.
object
object
object
object
Quote it when asking about a request.
Example
{ "success": false}