Skip to content

Commit

Permalink
owner api
Browse files Browse the repository at this point in the history
  • Loading branch information
vekamo committed Nov 27, 2024
1 parent 1e96aaf commit 9490beb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
20 changes: 9 additions & 11 deletions developers/api/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ The API is used to query a node about various information on the blockchain, net
This endpoint requires, by default, [basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). The username is `mwcmain`.


## Node API v1

**Note:** version 1 of the API will be deprecated in v4.0.0 and subsequently removed in v5.0.0. Users of this API are encouraged to upgrade to API v2.

This API uses REST for its requests. To learn about what specific calls can be made read the [node API v1 doc](https://github.com/mimblewimble/mwc/blob/master/doc/api/node_api_v1.md).

Basic auth password can be found in `.api_secret`



## Node API v2

This API version uses JSON-RPC for its requests. It is split up into a foreign API and an owner API. The documentation for these endpoints is automatically generated:

* [Owner API](https://docs.rs/mwc_api/latest/mwc_api/trait.OwnerRpc.html)
- [Owner API](https://docs.rs/mwc_api/latest/mwc_api/trait.OwnerRpc.html)
- URL: `localhost:3413/v2/owner`
- Basic Authentification:
- Username: `mwcmain`
- Password: `~/.mwc/main/.api_secret`
* [Foreign API](https://docs.rs/mwc_api/latest/mwc_api/trait.ForeignRpc.html)
- URL: `localhost:3413/v2/foreign`
- Basic Authentification:
- Username: `mwcmain`
- Password: `~/.mwc/main/.foreign_api_secret`

Basic auth passwords can be found in `.api_secret`/`.foreign_api_secret` files respectively.

Expand Down
15 changes: 14 additions & 1 deletion developers/api/wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@

The [wallet API](https://docs.rs/mwc_wallet_api/latest/mwc_wallet_api/) uses JSON-RPC requests and is split into two separate blocks of functionality:

* [Owner API](https://docs.rs/mwc_wallet_api/latest/mwc_wallet_api/struct.Owner.html)
* [Owner API V2](https://docs.rs/mwc_wallet_api/latest/mwc_wallet_api/trait.OwnerRpcV2.html)
- URL: `localhost:3420/v2/owner`
- Basic Authentification:
- Username: `mwcmain`
- Password: `~/.mwc/main/.owner_api_secret`

* [Owner API V3](https://docs.rs/mwc_wallet_api/latest/mwc_wallet_api/trait.OwnerRpcV3.html)
- URL: `localhost:3420/v3/owner`
- Basic Authentification:
- Username: `mwcmain`
- Password: `~/.mwc/main/.owner_api_secret`


* [Foreign API](https://docs.rs/mwc_wallet_api/latest/mwc_wallet_api/struct.Foreign.html)
- URL: `localhost:3420/v2/foreign`

Basic auth passwords:
Username: `mwcmain`
Expand Down

0 comments on commit 9490beb

Please sign in to comment.