Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
feat(BUX-149): readme-docs (#19)
Browse files Browse the repository at this point in the history
* feat(BUX-149): readme-docs

* fix: indentation
  • Loading branch information
kuba-4chain authored Aug 22, 2023
1 parent 2ddad8b commit 75a9017
Showing 1 changed file with 65 additions and 1 deletion.
66 changes: 65 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- [x] [Query Transaction Status](https://bitcoin-sv.github.io/arc/api.html#/Arc/GET%20transaction%20status)
- [x] [Submit Transaction](https://bitcoin-sv.github.io/arc/api.html#/Arc/POST%20transaction)
- [x] [Submit Batch Transactions](https://bitcoin-sv.github.io/arc/api.html#/Arc/POST%20transactions)
- [ ] Quote Services -> WORK IN PROGRESS
- [x] [Quote Services](https://bitcoin-sv.github.io/arc/api.html#/Arc/GET%20policy)

## What is library doing?

Expand Down Expand Up @@ -129,6 +129,26 @@ When you created your own client, you can use the method `QueryTx` to query the
// ...
```

### Get Policy Quote Method

Having your client created, you can use the method `GetPolicyQuote` to get a slice of policy quotes from all the nodes configured in your client.

```go
// ...
policyQuotes, err := client.GetPolicyQuote(context.Background())
// ...
```

### Get Fee Quote Method

Having your client created, you can use the method `GetFeeQuote` to get a slice of fee quotes (which are subsets from PolicyQuotes) from all the nodes configured in your client.

```go
// ...
feeQuotes, err := client.GetFeeQuote(context.Background())
// ...
```

### SubmitTx Method

Having your client created, you can use the method `SubmitTx` to submit a single transaction to the node.
Expand Down Expand Up @@ -190,6 +210,50 @@ type QueryTxResponse struct {
}
```

### PolicyQuote

#### PolicyQuoteResponse

```go
type PolicyQuoteResponse struct {
Miner string `json:"miner"`
Policy PolicyResponse `json:"policy"`
Timestamp string `json:"timestamp"`
}
```

#### PolicyResponse

```go
type PolicyResponse struct {
MaxScriptSizePolicy int64 `json:"maxscriptsizepolicy"`
MaxTxSigOpsCountPolicy int64 `json:"maxtxsigopscountspolicy"`
MaxTxSizePolicy int64 `json:"maxtxsizepolicy"`
MiningFee MiningFeeResponse `json:"miningFee"`
}
```

#### MiningFeeResponse

```go
type MiningFeeResponse struct {
Bytes int64 `json:"bytes"`
Satoshis int64 `json:"satoshis"`
}
```

### FeeQuote

#### FeeQuoteResponse

```go
type FeeQuote struct {
Miner string `json:"miner"`
MiningFee MiningFeeResponse `json:"miningFee"`
Timestamp string `json:"timestamp"`
}
```

### SubmitTx

#### SubmitTxResponse
Expand Down

0 comments on commit 75a9017

Please sign in to comment.