From 58adb9b2105c594c54d80811713794276e182b4e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:17:13 +0000 Subject: [PATCH 1/5] chore: go live (#1) --- .release-please-manifest.json | 3 + CONTRIBUTING.md | 2 +- README.md | 22 +++++-- address.go | 2 +- addressbrc20.go | 6 +- addressbrc20_test.go | 6 +- addressrune.go | 10 +-- addressrune_test.go | 6 +- addresstx.go | 10 +-- addresstx_test.go | 6 +- addressutxo.go | 10 +-- addressutxo_test.go | 6 +- aliases.go | 2 +- api.md | 88 ++++++++++++------------- asset.go | 2 +- assetbrc20.go | 10 +-- assetbrc20_test.go | 6 +- assetbrc20holder.go | 10 +-- assetbrc20holder_test.go | 6 +- assetrune.go | 10 +-- assetrune_test.go | 6 +- assetruneholder.go | 10 +-- assetruneholder_test.go | 6 +- assetruneutxo.go | 10 +-- assetruneutxo_test.go | 6 +- block.go | 6 +- block_test.go | 6 +- blocklatest.go | 4 +- blocklatest_test.go | 6 +- client.go | 4 +- client_test.go | 6 +- field.go | 4 +- general.go | 2 +- generalinfo.go | 6 +- generalinfo_test.go | 6 +- go.mod | 2 +- internal/apierror/apierror.go | 2 +- internal/apiform/encoder.go | 2 +- internal/apijson/encoder.go | 2 +- internal/apijson/field_test.go | 2 +- internal/apiquery/encoder.go | 2 +- internal/requestconfig/requestconfig.go | 8 +-- internal/version.go | 2 +- option/requestoption.go | 4 +- release-please-config.json | 67 +++++++++++++++++++ rpc.go | 2 +- rpcmempool.go | 2 +- rpcmempoolinfo.go | 6 +- rpcmempoolinfo_test.go | 6 +- rpcmempooltransaction.go | 6 +- rpcmempooltransaction_test.go | 6 +- rpcmempooltransactionancestor.go | 6 +- rpcmempooltransactionancestor_test.go | 6 +- rpcmempooltransactiondescendant.go | 6 +- rpcmempooltransactiondescendant_test.go | 6 +- rpctransaction.go | 6 +- rpctransaction_test.go | 6 +- transaction.go | 6 +- transaction_test.go | 6 +- transactionpsbt.go | 6 +- transactionpsbt_test.go | 6 +- usage_test.go | 6 +- 62 files changed, 288 insertions(+), 210 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..c476280 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.0.1-alpha.0" +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cef362a..5a01632 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ To use a local version of this library from source in another project, edit the directive. This can be done through the CLI with the following: ```sh -$ go mod edit -replace github.com/stainless-sdks/maestro-bitcoin-go=/path/to/maestro-bitcoin-go +$ go mod edit -replace github.com/maestro-org/maestro-bitcoin-go-sdk=/path/to/maestro-bitcoin-go-sdk ``` ## Running tests diff --git a/README.md b/README.md index b8f99b9..9912bdb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Maestro Bitcoin Go API Library -Go Reference +Go Reference The Maestro Bitcoin Go library provides convenient access to [the Maestro Bitcoin REST API](https://docs.gomaestro.org/) from applications written in Go. The full API of this library can be found in [api.md](api.md). @@ -9,18 +9,26 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Installation + + ```go import ( - "github.com/stainless-sdks/maestro-bitcoin-go" // imported as maestrobitcoin + "github.com/maestro-org/maestro-bitcoin-go-sdk" // imported as maestrobitcoin ) ``` + + Or to pin the version: + + ```sh -go get -u 'github.com/stainless-sdks/maestro-bitcoin-go@v0.0.1-alpha.0' +go get -u 'github.com/maestro-org/maestro-bitcoin-go-sdk@v0.0.1-alpha.0' ``` + + ## Requirements This library requires Go 1.18+. @@ -36,8 +44,8 @@ import ( "context" "fmt" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func main() { @@ -146,7 +154,7 @@ client.General.Info.Get(context.TODO(), ..., ) ``` -See the [full list of request options](https://pkg.go.dev/github.com/stainless-sdks/maestro-bitcoin-go/option). +See the [full list of request options](https://pkg.go.dev/github.com/maestro-org/maestro-bitcoin-go-sdk/option). ### Pagination @@ -325,7 +333,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/maestro-bitcoin-go/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/maestro-org/maestro-bitcoin-go-sdk/issues) with questions, bugs, or suggestions. ## Contributing diff --git a/address.go b/address.go index 2c50078..1794871 100644 --- a/address.go +++ b/address.go @@ -3,7 +3,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AddressService contains methods and other services that help with interacting diff --git a/addressbrc20.go b/addressbrc20.go index 3eec11f..6124706 100644 --- a/addressbrc20.go +++ b/addressbrc20.go @@ -8,9 +8,9 @@ import ( "fmt" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AddressBrc20Service contains methods and other services that help with diff --git a/addressbrc20_test.go b/addressbrc20_test.go index 3f751e5..c915e9f 100644 --- a/addressbrc20_test.go +++ b/addressbrc20_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAddressBrc20List(t *testing.T) { diff --git a/addressrune.go b/addressrune.go index 7181fd0..8b20cb0 100644 --- a/addressrune.go +++ b/addressrune.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AddressRuneService contains methods and other services that help with diff --git a/addressrune_test.go b/addressrune_test.go index 1049049..5ce5701 100644 --- a/addressrune_test.go +++ b/addressrune_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAddressRuneGetWithOptionalParams(t *testing.T) { diff --git a/addresstx.go b/addresstx.go index 3fee616..d98bc32 100644 --- a/addresstx.go +++ b/addresstx.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AddressTxService contains methods and other services that help with interacting diff --git a/addresstx_test.go b/addresstx_test.go index e3b2739..46852f6 100644 --- a/addresstx_test.go +++ b/addresstx_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAddressTxListWithOptionalParams(t *testing.T) { diff --git a/addressutxo.go b/addressutxo.go index b787ff1..441a372 100644 --- a/addressutxo.go +++ b/addressutxo.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AddressUtxoService contains methods and other services that help with diff --git a/addressutxo_test.go b/addressutxo_test.go index 71f27da..41a9507 100644 --- a/addressutxo_test.go +++ b/addressutxo_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAddressUtxoListWithOptionalParams(t *testing.T) { diff --git a/aliases.go b/aliases.go index dfb148f..70a5f70 100644 --- a/aliases.go +++ b/aliases.go @@ -3,7 +3,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apierror" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apierror" ) type Error = apierror.Error diff --git a/api.md b/api.md index f7f3ff9..5bbc5c5 100644 --- a/api.md +++ b/api.md @@ -4,43 +4,43 @@ Response Types: -- maestrobitcoin.TimestampedBrc20Quantities +- maestrobitcoin.TimestampedBrc20Quantities Methods: -- client.Addresses.Brc20.List(ctx context.Context, address string) (maestrobitcoin.TimestampedBrc20Quantities, error) +- client.Addresses.Brc20.List(ctx context.Context, address string) (maestrobitcoin.TimestampedBrc20Quantities, error) ## Runes Response Types: -- maestrobitcoin.PaginatedAddressRuneUtxo -- maestrobitcoin.TimestampedRuneQuantities +- maestrobitcoin.PaginatedAddressRuneUtxo +- maestrobitcoin.TimestampedRuneQuantities Methods: -- client.Addresses.Runes.Get(ctx context.Context, address string, rune string, query maestrobitcoin.AddressRuneGetParams) (maestrobitcoin.PaginatedAddressRuneUtxo, error) -- client.Addresses.Runes.List(ctx context.Context, address string) (maestrobitcoin.TimestampedRuneQuantities, error) +- client.Addresses.Runes.Get(ctx context.Context, address string, rune string, query maestrobitcoin.AddressRuneGetParams) (maestrobitcoin.PaginatedAddressRuneUtxo, error) +- client.Addresses.Runes.List(ctx context.Context, address string) (maestrobitcoin.TimestampedRuneQuantities, error) ## Txs Response Types: -- maestrobitcoin.PaginatedInvolvedTransaction +- maestrobitcoin.PaginatedInvolvedTransaction Methods: -- client.Addresses.Txs.List(ctx context.Context, address string, query maestrobitcoin.AddressTxListParams) (maestrobitcoin.PaginatedInvolvedTransaction, error) +- client.Addresses.Txs.List(ctx context.Context, address string, query maestrobitcoin.AddressTxListParams) (maestrobitcoin.PaginatedInvolvedTransaction, error) ## Utxos Response Types: -- maestrobitcoin.PaginatedUtxo +- maestrobitcoin.PaginatedUtxo Methods: -- client.Addresses.Utxos.List(ctx context.Context, address string, query maestrobitcoin.AddressUtxoListParams) (maestrobitcoin.PaginatedUtxo, error) +- client.Addresses.Utxos.List(ctx context.Context, address string, query maestrobitcoin.AddressUtxoListParams) (maestrobitcoin.PaginatedUtxo, error) # Assets @@ -48,71 +48,71 @@ Methods: Response Types: -- maestrobitcoin.PaginatedBrc20Ticker -- maestrobitcoin.TimestampedBrc20Info +- maestrobitcoin.PaginatedBrc20Ticker +- maestrobitcoin.TimestampedBrc20Info Methods: -- client.Assets.Brc20.Get(ctx context.Context, ticker string) (maestrobitcoin.TimestampedBrc20Info, error) -- client.Assets.Brc20.List(ctx context.Context, query maestrobitcoin.AssetBrc20ListParams) (maestrobitcoin.PaginatedBrc20Ticker, error) +- client.Assets.Brc20.Get(ctx context.Context, ticker string) (maestrobitcoin.TimestampedBrc20Info, error) +- client.Assets.Brc20.List(ctx context.Context, query maestrobitcoin.AssetBrc20ListParams) (maestrobitcoin.PaginatedBrc20Ticker, error) ### Holders Response Types: -- maestrobitcoin.PaginatedBrc20Holder +- maestrobitcoin.PaginatedBrc20Holder Methods: -- client.Assets.Brc20.Holders.List(ctx context.Context, ticker string, query maestrobitcoin.AssetBrc20HolderListParams) (maestrobitcoin.PaginatedBrc20Holder, error) +- client.Assets.Brc20.Holders.List(ctx context.Context, ticker string, query maestrobitcoin.AssetBrc20HolderListParams) (maestrobitcoin.PaginatedBrc20Holder, error) ## Runes Response Types: -- maestrobitcoin.PaginatedRuneIDAndName -- maestrobitcoin.TimestampedRuneInfo +- maestrobitcoin.PaginatedRuneIDAndName +- maestrobitcoin.TimestampedRuneInfo Methods: -- client.Assets.Runes.Get(ctx context.Context, rune string) (maestrobitcoin.TimestampedRuneInfo, error) -- client.Assets.Runes.List(ctx context.Context, query maestrobitcoin.AssetRuneListParams) (maestrobitcoin.PaginatedRuneIDAndName, error) +- client.Assets.Runes.Get(ctx context.Context, rune string) (maestrobitcoin.TimestampedRuneInfo, error) +- client.Assets.Runes.List(ctx context.Context, query maestrobitcoin.AssetRuneListParams) (maestrobitcoin.PaginatedRuneIDAndName, error) ### Holders Response Types: -- maestrobitcoin.PaginatedRuneHolder +- maestrobitcoin.PaginatedRuneHolder Methods: -- client.Assets.Runes.Holders.List(ctx context.Context, rune string, query maestrobitcoin.AssetRuneHolderListParams) (maestrobitcoin.PaginatedRuneHolder, error) +- client.Assets.Runes.Holders.List(ctx context.Context, rune string, query maestrobitcoin.AssetRuneHolderListParams) (maestrobitcoin.PaginatedRuneHolder, error) ### Utxos Response Types: -- maestrobitcoin.PaginatedRuneUtxo +- maestrobitcoin.PaginatedRuneUtxo Methods: -- client.Assets.Runes.Utxos.List(ctx context.Context, rune string, query maestrobitcoin.AssetRuneUtxoListParams) (maestrobitcoin.PaginatedRuneUtxo, error) +- client.Assets.Runes.Utxos.List(ctx context.Context, rune string, query maestrobitcoin.AssetRuneUtxoListParams) (maestrobitcoin.PaginatedRuneUtxo, error) # Blocks Response Types: -- maestrobitcoin.TimestampedBlock +- maestrobitcoin.TimestampedBlock Methods: -- client.Blocks.Get(ctx context.Context, blockHash string) (maestrobitcoin.TimestampedBlock, error) +- client.Blocks.Get(ctx context.Context, blockHash string) (maestrobitcoin.TimestampedBlock, error) ## Latest Methods: -- client.Blocks.Latest.Get(ctx context.Context) (maestrobitcoin.TimestampedBlock, error) +- client.Blocks.Latest.Get(ctx context.Context) (maestrobitcoin.TimestampedBlock, error) # General @@ -120,11 +120,11 @@ Methods: Response Types: -- maestrobitcoin.TimestampedBlockchainInfo +- maestrobitcoin.TimestampedBlockchainInfo Methods: -- client.General.Info.Get(ctx context.Context) (maestrobitcoin.TimestampedBlockchainInfo, error) +- client.General.Info.Get(ctx context.Context) (maestrobitcoin.TimestampedBlockchainInfo, error) # Rpc @@ -134,63 +134,63 @@ Methods: Response Types: -- maestrobitcoin.TimestampedMempoolInfo +- maestrobitcoin.TimestampedMempoolInfo Methods: -- client.Rpc.Mempool.Info.Get(ctx context.Context) (maestrobitcoin.TimestampedMempoolInfo, error) +- client.Rpc.Mempool.Info.Get(ctx context.Context) (maestrobitcoin.TimestampedMempoolInfo, error) ### Transactions Response Types: -- maestrobitcoin.TimestampedMempoolTransactionDetails -- maestrobitcoin.TimestampedMempoolTransactions +- maestrobitcoin.TimestampedMempoolTransactionDetails +- maestrobitcoin.TimestampedMempoolTransactions Methods: -- client.Rpc.Mempool.Transactions.Get(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionDetails, error) -- client.Rpc.Mempool.Transactions.List(ctx context.Context) (maestrobitcoin.TimestampedMempoolTransactions, error) +- client.Rpc.Mempool.Transactions.Get(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionDetails, error) +- client.Rpc.Mempool.Transactions.List(ctx context.Context) (maestrobitcoin.TimestampedMempoolTransactions, error) #### Ancestors Response Types: -- maestrobitcoin.TimestampedMempoolTransactionAncestors +- maestrobitcoin.TimestampedMempoolTransactionAncestors Methods: -- client.Rpc.Mempool.Transactions.Ancestors.List(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionAncestors, error) +- client.Rpc.Mempool.Transactions.Ancestors.List(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionAncestors, error) #### Descendants Response Types: -- maestrobitcoin.TimestampedMempoolTransactionDescendants +- maestrobitcoin.TimestampedMempoolTransactionDescendants Methods: -- client.Rpc.Mempool.Transactions.Descendants.List(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionDescendants, error) +- client.Rpc.Mempool.Transactions.Descendants.List(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionDescendants, error) # RpcTransactions Response Types: -- maestrobitcoin.TimestampedTransactionDetails +- maestrobitcoin.TimestampedTransactionDetails Methods: -- client.RpcTransactions.Get(ctx context.Context, txHash string) (maestrobitcoin.TimestampedTransactionDetails, error) +- client.RpcTransactions.Get(ctx context.Context, txHash string) (maestrobitcoin.TimestampedTransactionDetails, error) # Transactions Methods: -- client.Transactions.Get(ctx context.Context, txHash string) error -- client.Transactions.Submit(ctx context.Context, body maestrobitcoin.TransactionSubmitParams) (string, error) +- client.Transactions.Get(ctx context.Context, txHash string) error +- client.Transactions.Submit(ctx context.Context, body maestrobitcoin.TransactionSubmitParams) (string, error) ## Psbt Methods: -- client.Transactions.Psbt.Decode(ctx context.Context, body maestrobitcoin.TransactionPsbtDecodeParams) error +- client.Transactions.Psbt.Decode(ctx context.Context, body maestrobitcoin.TransactionPsbtDecodeParams) error diff --git a/asset.go b/asset.go index 07df0d8..8eccdf0 100644 --- a/asset.go +++ b/asset.go @@ -3,7 +3,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AssetService contains methods and other services that help with interacting with diff --git a/assetbrc20.go b/assetbrc20.go index b7d3962..9a29439 100644 --- a/assetbrc20.go +++ b/assetbrc20.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AssetBrc20Service contains methods and other services that help with interacting diff --git a/assetbrc20_test.go b/assetbrc20_test.go index 5b1f120..0cef955 100644 --- a/assetbrc20_test.go +++ b/assetbrc20_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAssetBrc20Get(t *testing.T) { diff --git a/assetbrc20holder.go b/assetbrc20holder.go index 14546cc..d214d91 100644 --- a/assetbrc20holder.go +++ b/assetbrc20holder.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AssetBrc20HolderService contains methods and other services that help with diff --git a/assetbrc20holder_test.go b/assetbrc20holder_test.go index b506288..c33a3e0 100644 --- a/assetbrc20holder_test.go +++ b/assetbrc20holder_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAssetBrc20HolderListWithOptionalParams(t *testing.T) { diff --git a/assetrune.go b/assetrune.go index acbf64c..aca586e 100644 --- a/assetrune.go +++ b/assetrune.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AssetRuneService contains methods and other services that help with interacting diff --git a/assetrune_test.go b/assetrune_test.go index 770b7ca..f5aa220 100644 --- a/assetrune_test.go +++ b/assetrune_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAssetRuneGet(t *testing.T) { diff --git a/assetruneholder.go b/assetruneholder.go index 47853df..61d08b6 100644 --- a/assetruneholder.go +++ b/assetruneholder.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AssetRuneHolderService contains methods and other services that help with diff --git a/assetruneholder_test.go b/assetruneholder_test.go index d550677..4473787 100644 --- a/assetruneholder_test.go +++ b/assetruneholder_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAssetRuneHolderListWithOptionalParams(t *testing.T) { diff --git a/assetruneutxo.go b/assetruneutxo.go index a29d7cf..939b71b 100644 --- a/assetruneutxo.go +++ b/assetruneutxo.go @@ -9,11 +9,11 @@ import ( "net/http" "net/url" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // AssetRuneUtxoService contains methods and other services that help with diff --git a/assetruneutxo_test.go b/assetruneutxo_test.go index 54c5876..434da30 100644 --- a/assetruneutxo_test.go +++ b/assetruneutxo_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestAssetRuneUtxoListWithOptionalParams(t *testing.T) { diff --git a/block.go b/block.go index ff46938..8e5aeff 100644 --- a/block.go +++ b/block.go @@ -9,9 +9,9 @@ import ( "io" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // BlockService contains methods and other services that help with interacting with diff --git a/block_test.go b/block_test.go index 0f4c063..93e5a7a 100644 --- a/block_test.go +++ b/block_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestBlockGet(t *testing.T) { diff --git a/blocklatest.go b/blocklatest.go index cf2e98e..cbcd1a7 100644 --- a/blocklatest.go +++ b/blocklatest.go @@ -6,8 +6,8 @@ import ( "context" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // BlockLatestService contains methods and other services that help with diff --git a/blocklatest_test.go b/blocklatest_test.go index 18f1965..bb8f525 100644 --- a/blocklatest_test.go +++ b/blocklatest_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestBlockLatestGet(t *testing.T) { diff --git a/client.go b/client.go index b85d992..d47fbdb 100644 --- a/client.go +++ b/client.go @@ -7,8 +7,8 @@ import ( "net/http" "os" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // Client creates a struct with services and top level methods that help with diff --git a/client_test.go b/client_test.go index f364820..c6b9b15 100644 --- a/client_test.go +++ b/client_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) type closureTransport struct { diff --git a/field.go b/field.go index f13e295..6f7db9d 100644 --- a/field.go +++ b/field.go @@ -1,7 +1,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" "io" ) @@ -9,7 +9,7 @@ import ( // This helps specify null, zero values, and overrides, as well as normal values. // You can read more about this in our [README]. // -// [README]: https://pkg.go.dev/github.com/stainless-sdks/maestro-bitcoin-go#readme-request-fields +// [README]: https://pkg.go.dev/github.com/maestro-org/maestro-bitcoin-go-sdk#readme-request-fields func F[T any](value T) param.Field[T] { return param.Field[T]{Value: value, Present: true} } // Null is a param field helper which explicitly sends null to the API. diff --git a/general.go b/general.go index dfd213f..e03cf00 100644 --- a/general.go +++ b/general.go @@ -3,7 +3,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // GeneralService contains methods and other services that help with interacting diff --git a/generalinfo.go b/generalinfo.go index eab9997..42a56f7 100644 --- a/generalinfo.go +++ b/generalinfo.go @@ -6,9 +6,9 @@ import ( "context" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // GeneralInfoService contains methods and other services that help with diff --git a/generalinfo_test.go b/generalinfo_test.go index d6f410c..d773982 100644 --- a/generalinfo_test.go +++ b/generalinfo_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestGeneralInfoGet(t *testing.T) { diff --git a/go.mod b/go.mod index d97f3ab..812e036 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/stainless-sdks/maestro-bitcoin-go +module github.com/maestro-org/maestro-bitcoin-go-sdk go 1.21 diff --git a/internal/apierror/apierror.go b/internal/apierror/apierror.go index e30c8d0..0bb6b0f 100644 --- a/internal/apierror/apierror.go +++ b/internal/apierror/apierror.go @@ -7,7 +7,7 @@ import ( "net/http" "net/http/httputil" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" ) // Error represents an error that originates from the API, i.e. when a request is diff --git a/internal/apiform/encoder.go b/internal/apiform/encoder.go index 9d7145e..b43bbe9 100644 --- a/internal/apiform/encoder.go +++ b/internal/apiform/encoder.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" ) var encoders sync.Map // map[encoderEntry]encoderFunc diff --git a/internal/apijson/encoder.go b/internal/apijson/encoder.go index 01770ff..0f31431 100644 --- a/internal/apijson/encoder.go +++ b/internal/apijson/encoder.go @@ -12,7 +12,7 @@ import ( "github.com/tidwall/sjson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" ) var encoders sync.Map // map[encoderEntry]encoderFunc diff --git a/internal/apijson/field_test.go b/internal/apijson/field_test.go index 50786e5..6d9678b 100644 --- a/internal/apijson/field_test.go +++ b/internal/apijson/field_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" ) type Struct struct { diff --git a/internal/apiquery/encoder.go b/internal/apiquery/encoder.go index 7ab726c..72f8f0d 100644 --- a/internal/apiquery/encoder.go +++ b/internal/apiquery/encoder.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/param" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" ) var encoders sync.Map // map[reflect.Type]encoderFunc diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index 77ba8c8..f30479f 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -17,10 +17,10 @@ import ( "strings" "time" - "github.com/stainless-sdks/maestro-bitcoin-go/internal" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apierror" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiform" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apiquery" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apierror" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiform" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apiquery" ) func getDefaultHeaders() map[string]string { diff --git a/internal/version.go b/internal/version.go index 1e49ee4..4ff68e4 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.0.1-alpha.0" +const PackageVersion = "0.0.1-alpha.0" // x-release-please-version diff --git a/option/requestoption.go b/option/requestoption.go index b5a07a6..5beca6a 100644 --- a/option/requestoption.go +++ b/option/requestoption.go @@ -11,7 +11,7 @@ import ( "net/url" "time" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" "github.com/tidwall/sjson" ) @@ -19,7 +19,7 @@ import ( // which can be supplied to clients, services, and methods. You can read more about this functional // options pattern in our [README]. // -// [README]: https://pkg.go.dev/github.com/stainless-sdks/maestro-bitcoin-go#readme-requestoptions +// [README]: https://pkg.go.dev/github.com/maestro-org/maestro-bitcoin-go-sdk#readme-requestoptions type RequestOption = func(*requestconfig.RequestConfig) error // WithBaseURL returns a RequestOption that sets the BaseURL for the client. diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..a38198e --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,67 @@ +{ + "packages": { + ".": {} + }, + "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "include-v-in-tag": true, + "include-component-in-tag": false, + "versioning": "prerelease", + "prerelease": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "release-type": "go", + "extra-files": [ + "internal/version.go", + "README.md" + ] +} \ No newline at end of file diff --git a/rpc.go b/rpc.go index b449ff1..d504244 100644 --- a/rpc.go +++ b/rpc.go @@ -3,7 +3,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcService contains methods and other services that help with interacting with diff --git a/rpcmempool.go b/rpcmempool.go index 6168ae5..c358022 100644 --- a/rpcmempool.go +++ b/rpcmempool.go @@ -3,7 +3,7 @@ package maestrobitcoin import ( - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcMempoolService contains methods and other services that help with interacting diff --git a/rpcmempoolinfo.go b/rpcmempoolinfo.go index 041653b..b49f1b0 100644 --- a/rpcmempoolinfo.go +++ b/rpcmempoolinfo.go @@ -6,9 +6,9 @@ import ( "context" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcMempoolInfoService contains methods and other services that help with diff --git a/rpcmempoolinfo_test.go b/rpcmempoolinfo_test.go index a877a2f..efec559 100644 --- a/rpcmempoolinfo_test.go +++ b/rpcmempoolinfo_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestRpcMempoolInfoGet(t *testing.T) { diff --git a/rpcmempooltransaction.go b/rpcmempooltransaction.go index 751eb8d..4db3402 100644 --- a/rpcmempooltransaction.go +++ b/rpcmempooltransaction.go @@ -8,9 +8,9 @@ import ( "fmt" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcMempoolTransactionService contains methods and other services that help with diff --git a/rpcmempooltransaction_test.go b/rpcmempooltransaction_test.go index fdc0f72..37fdc9b 100644 --- a/rpcmempooltransaction_test.go +++ b/rpcmempooltransaction_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestRpcMempoolTransactionGet(t *testing.T) { diff --git a/rpcmempooltransactionancestor.go b/rpcmempooltransactionancestor.go index 0281880..b457d22 100644 --- a/rpcmempooltransactionancestor.go +++ b/rpcmempooltransactionancestor.go @@ -8,9 +8,9 @@ import ( "fmt" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcMempoolTransactionAncestorService contains methods and other services that diff --git a/rpcmempooltransactionancestor_test.go b/rpcmempooltransactionancestor_test.go index c490f6d..53a7aff 100644 --- a/rpcmempooltransactionancestor_test.go +++ b/rpcmempooltransactionancestor_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestRpcMempoolTransactionAncestorList(t *testing.T) { diff --git a/rpcmempooltransactiondescendant.go b/rpcmempooltransactiondescendant.go index 1481343..55e42aa 100644 --- a/rpcmempooltransactiondescendant.go +++ b/rpcmempooltransactiondescendant.go @@ -8,9 +8,9 @@ import ( "fmt" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcMempoolTransactionDescendantService contains methods and other services that diff --git a/rpcmempooltransactiondescendant_test.go b/rpcmempooltransactiondescendant_test.go index 63eab4d..f1205e3 100644 --- a/rpcmempooltransactiondescendant_test.go +++ b/rpcmempooltransactiondescendant_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestRpcMempoolTransactionDescendantList(t *testing.T) { diff --git a/rpctransaction.go b/rpctransaction.go index 504257d..c935fe0 100644 --- a/rpctransaction.go +++ b/rpctransaction.go @@ -8,9 +8,9 @@ import ( "fmt" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // RpcTransactionService contains methods and other services that help with diff --git a/rpctransaction_test.go b/rpctransaction_test.go index bd52f5f..4931aa7 100644 --- a/rpctransaction_test.go +++ b/rpctransaction_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestRpcTransactionGet(t *testing.T) { diff --git a/transaction.go b/transaction.go index b4cd84a..29fafa6 100644 --- a/transaction.go +++ b/transaction.go @@ -8,9 +8,9 @@ import ( "fmt" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // TransactionService contains methods and other services that help with diff --git a/transaction_test.go b/transaction_test.go index df7fd0b..cac7c84 100644 --- a/transaction_test.go +++ b/transaction_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestTransactionGet(t *testing.T) { diff --git a/transactionpsbt.go b/transactionpsbt.go index 1f600b1..f49e587 100644 --- a/transactionpsbt.go +++ b/transactionpsbt.go @@ -6,9 +6,9 @@ import ( "context" "net/http" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/apijson" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/requestconfig" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apijson" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/requestconfig" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) // TransactionPsbtService contains methods and other services that help with diff --git a/transactionpsbt_test.go b/transactionpsbt_test.go index 5b8481e..e9ff3b0 100644 --- a/transactionpsbt_test.go +++ b/transactionpsbt_test.go @@ -8,9 +8,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestTransactionPsbtDecode(t *testing.T) { diff --git a/usage_test.go b/usage_test.go index 79bc62a..74a796c 100644 --- a/usage_test.go +++ b/usage_test.go @@ -7,9 +7,9 @@ import ( "os" "testing" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/internal/testutil" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/testutil" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func TestUsage(t *testing.T) { From 85741837cfd5517f572110e7be96a1fbda4dc96c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:21:47 +0000 Subject: [PATCH 2/5] chore: update SDK settings (#3) --- README.md | 34 +++++----- address.go | 2 +- addressbrc20.go | 2 +- addressbrc20_test.go | 6 +- addressrune.go | 2 +- addressrune_test.go | 22 +++---- addresstx.go | 2 +- addresstx_test.go | 18 +++--- addressutxo.go | 2 +- addressutxo_test.go | 24 +++---- aliases.go | 2 +- api.md | 86 ++++++++++++------------- asset.go | 2 +- assetbrc20.go | 2 +- assetbrc20_test.go | 16 ++--- assetbrc20holder.go | 2 +- assetbrc20holder_test.go | 12 ++-- assetrune.go | 2 +- assetrune_test.go | 16 ++--- assetruneholder.go | 2 +- assetruneholder_test.go | 12 ++-- assetruneutxo.go | 2 +- assetruneutxo_test.go | 18 +++--- block.go | 2 +- block_test.go | 6 +- blocklatest.go | 2 +- blocklatest_test.go | 6 +- client.go | 2 +- client_test.go | 18 +++--- field.go | 2 +- general.go | 2 +- generalinfo.go | 2 +- generalinfo_test.go | 6 +- rpc.go | 2 +- rpcmempool.go | 2 +- rpcmempoolinfo.go | 2 +- rpcmempoolinfo_test.go | 6 +- rpcmempooltransaction.go | 2 +- rpcmempooltransaction_test.go | 10 +-- rpcmempooltransactionancestor.go | 2 +- rpcmempooltransactionancestor_test.go | 6 +- rpcmempooltransactiondescendant.go | 2 +- rpcmempooltransactiondescendant_test.go | 6 +- rpctransaction.go | 2 +- rpctransaction_test.go | 6 +- transaction.go | 2 +- transaction_test.go | 12 ++-- transactionpsbt.go | 2 +- transactionpsbt_test.go | 8 +-- usage_test.go | 4 +- 50 files changed, 206 insertions(+), 206 deletions(-) diff --git a/README.md b/README.md index 9912bdb..3192422 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ```go import ( - "github.com/maestro-org/maestro-bitcoin-go-sdk" // imported as maestrobitcoin + "github.com/maestro-org/maestro-bitcoin-go-sdk" // imported as maestrobitcoingosdk ) ``` @@ -49,7 +49,7 @@ import ( ) func main() { - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("API_KEY") option.WithEnvironmentEnvironment1(), // defaults to option.WithEnvironmentProduction() ) @@ -76,18 +76,18 @@ To send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T]( ```go params := FooParams{ - Name: maestrobitcoin.F("hello"), + Name: maestrobitcoingosdk.F("hello"), // Explicitly send `"description": null` - Description: maestrobitcoin.Null[string](), + Description: maestrobitcoingosdk.Null[string](), - Point: maestrobitcoin.F(maestrobitcoin.Point{ - X: maestrobitcoin.Int(0), - Y: maestrobitcoin.Int(1), + Point: maestrobitcoingosdk.F(maestrobitcoingosdk.Point{ + X: maestrobitcoingosdk.Int(0), + Y: maestrobitcoingosdk.Int(1), // In cases where the API specifies a given type, // but you want to send something else, use `Raw`: - Z: maestrobitcoin.Raw[int64](0.01), // sends a float + Z: maestrobitcoingosdk.Raw[int64](0.01), // sends a float }), } ``` @@ -141,7 +141,7 @@ This library uses the functional options pattern. Functions defined in the requests. For example: ```go -client := maestrobitcoin.NewClient( +client := maestrobitcoingosdk.NewClient( // Adds a header to every request made by the client option.WithHeader("X-Some-Header", "custom_header_info"), ) @@ -168,7 +168,7 @@ with additional helper methods like `.GetNextPage()`, e.g.: ### Errors When the API returns a non-success status code, we return an error with type -`*maestrobitcoin.Error`. This contains the `StatusCode`, `*http.Request`, and +`*maestrobitcoingosdk.Error`. This contains the `StatusCode`, `*http.Request`, and `*http.Response` values of the request, as well as the JSON of the error body (much like other response objects in the SDK). @@ -177,7 +177,7 @@ To handle errors, we recommend that you use the `errors.As` pattern: ```go _, err := client.General.Info.Get(context.TODO()) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { println(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response @@ -217,7 +217,7 @@ The file name and content-type can be customized by implementing `Name() string` string` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a file returned by `os.Open` will be sent with the file name on disk. -We also provide a helper `maestrobitcoin.FileParam(reader io.Reader, filename string, contentType string)` +We also provide a helper `maestrobitcoingosdk.FileParam(reader io.Reader, filename string, contentType string)` which can be used to wrap any `io.Reader` with the appropriate file name and content type. ### Retries @@ -230,7 +230,7 @@ You can use the `WithMaxRetries` option to configure or disable this: ```go // Configure the default for all requests: -client := maestrobitcoin.NewClient( +client := maestrobitcoingosdk.NewClient( option.WithMaxRetries(0), // default is 2 ) @@ -271,9 +271,9 @@ or the `option.WithJSONSet()` methods. ```go params := FooNewParams{ - ID: maestrobitcoin.F("id_xxxx"), - Data: maestrobitcoin.F(FooNewParamsData{ - FirstName: maestrobitcoin.F("John"), + ID: maestrobitcoingosdk.F("id_xxxx"), + Data: maestrobitcoingosdk.F(FooNewParamsData{ + FirstName: maestrobitcoingosdk.F("John"), }), } client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe")) @@ -308,7 +308,7 @@ func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, return res, err } -client := maestrobitcoin.NewClient( +client := maestrobitcoingosdk.NewClient( option.WithMiddleware(Logger), ) ``` diff --git a/address.go b/address.go index 1794871..2355f9a 100644 --- a/address.go +++ b/address.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/option" diff --git a/addressbrc20.go b/addressbrc20.go index 6124706..305ecad 100644 --- a/addressbrc20.go +++ b/addressbrc20.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/addressbrc20_test.go b/addressbrc20_test.go index c915e9f..8f100ee 100644 --- a/addressbrc20_test.go +++ b/addressbrc20_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestAddressBrc20List(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Addresses.Brc20.List(context.TODO(), "tb1qphcdyah2e4vtpxn56hsz3p6kapg90pl4x525kc") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/addressrune.go b/addressrune.go index 8b20cb0..41faa4e 100644 --- a/addressrune.go +++ b/addressrune.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/addressrune_test.go b/addressrune_test.go index 5ce5701..5f9ef9b 100644 --- a/addressrune_test.go +++ b/addressrune_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,7 +21,7 @@ func TestAddressRuneGetWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) @@ -29,16 +29,16 @@ func TestAddressRuneGetWithOptionalParams(t *testing.T) { context.TODO(), "tb1qphcdyah2e4vtpxn56hsz3p6kapg90pl4x525kc", "2519999:31", - maestrobitcoin.AddressRuneGetParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), - From: maestrobitcoin.F(int64(0)), - Order: maestrobitcoin.F(maestrobitcoin.AddressRuneGetParamsOrderAsc), - To: maestrobitcoin.F(int64(0)), + maestrobitcoingosdk.AddressRuneGetParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), + From: maestrobitcoingosdk.F(int64(0)), + Order: maestrobitcoingosdk.F(maestrobitcoingosdk.AddressRuneGetParamsOrderAsc), + To: maestrobitcoingosdk.F(int64(0)), }, ) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } @@ -54,13 +54,13 @@ func TestAddressRuneList(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Addresses.Runes.List(context.TODO(), "tb1qphcdyah2e4vtpxn56hsz3p6kapg90pl4x525kc") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/addresstx.go b/addresstx.go index d98bc32..79d7b2f 100644 --- a/addresstx.go +++ b/addresstx.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/addresstx_test.go b/addresstx_test.go index 46852f6..3005507 100644 --- a/addresstx_test.go +++ b/addresstx_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,23 +21,23 @@ func TestAddressTxListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Addresses.Txs.List( context.TODO(), "tb1qphcdyah2e4vtpxn56hsz3p6kapg90pl4x525kc", - maestrobitcoin.AddressTxListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), - From: maestrobitcoin.F(int64(0)), - Order: maestrobitcoin.F(maestrobitcoin.AddressTxListParamsOrderAsc), - To: maestrobitcoin.F(int64(0)), + maestrobitcoingosdk.AddressTxListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), + From: maestrobitcoingosdk.F(int64(0)), + Order: maestrobitcoingosdk.F(maestrobitcoingosdk.AddressTxListParamsOrderAsc), + To: maestrobitcoingosdk.F(int64(0)), }, ) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/addressutxo.go b/addressutxo.go index 441a372..8041a2b 100644 --- a/addressutxo.go +++ b/addressutxo.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/addressutxo_test.go b/addressutxo_test.go index 41a9507..7e9febd 100644 --- a/addressutxo_test.go +++ b/addressutxo_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,26 +21,26 @@ func TestAddressUtxoListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Addresses.Utxos.List( context.TODO(), "tb1qphcdyah2e4vtpxn56hsz3p6kapg90pl4x525kc", - maestrobitcoin.AddressUtxoListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), - ExcludeMetaprotocols: maestrobitcoin.F(true), - FilterDust: maestrobitcoin.F(true), - FilterDustThreshold: maestrobitcoin.F(int64(0)), - From: maestrobitcoin.F(int64(0)), - Order: maestrobitcoin.F(maestrobitcoin.AddressUtxoListParamsOrderAsc), - To: maestrobitcoin.F(int64(0)), + maestrobitcoingosdk.AddressUtxoListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), + ExcludeMetaprotocols: maestrobitcoingosdk.F(true), + FilterDust: maestrobitcoingosdk.F(true), + FilterDustThreshold: maestrobitcoingosdk.F(int64(0)), + From: maestrobitcoingosdk.F(int64(0)), + Order: maestrobitcoingosdk.F(maestrobitcoingosdk.AddressUtxoListParamsOrderAsc), + To: maestrobitcoingosdk.F(int64(0)), }, ) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/aliases.go b/aliases.go index 70a5f70..4f1ff85 100644 --- a/aliases.go +++ b/aliases.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/apierror" diff --git a/api.md b/api.md index 5bbc5c5..80515f1 100644 --- a/api.md +++ b/api.md @@ -4,43 +4,43 @@ Response Types: -- maestrobitcoin.TimestampedBrc20Quantities +- maestrobitcoingosdk.TimestampedBrc20Quantities Methods: -- client.Addresses.Brc20.List(ctx context.Context, address string) (maestrobitcoin.TimestampedBrc20Quantities, error) +- client.Addresses.Brc20.List(ctx context.Context, address string) (maestrobitcoingosdk.TimestampedBrc20Quantities, error) ## Runes Response Types: -- maestrobitcoin.PaginatedAddressRuneUtxo -- maestrobitcoin.TimestampedRuneQuantities +- maestrobitcoingosdk.PaginatedAddressRuneUtxo +- maestrobitcoingosdk.TimestampedRuneQuantities Methods: -- client.Addresses.Runes.Get(ctx context.Context, address string, rune string, query maestrobitcoin.AddressRuneGetParams) (maestrobitcoin.PaginatedAddressRuneUtxo, error) -- client.Addresses.Runes.List(ctx context.Context, address string) (maestrobitcoin.TimestampedRuneQuantities, error) +- client.Addresses.Runes.Get(ctx context.Context, address string, rune string, query maestrobitcoingosdk.AddressRuneGetParams) (maestrobitcoingosdk.PaginatedAddressRuneUtxo, error) +- client.Addresses.Runes.List(ctx context.Context, address string) (maestrobitcoingosdk.TimestampedRuneQuantities, error) ## Txs Response Types: -- maestrobitcoin.PaginatedInvolvedTransaction +- maestrobitcoingosdk.PaginatedInvolvedTransaction Methods: -- client.Addresses.Txs.List(ctx context.Context, address string, query maestrobitcoin.AddressTxListParams) (maestrobitcoin.PaginatedInvolvedTransaction, error) +- client.Addresses.Txs.List(ctx context.Context, address string, query maestrobitcoingosdk.AddressTxListParams) (maestrobitcoingosdk.PaginatedInvolvedTransaction, error) ## Utxos Response Types: -- maestrobitcoin.PaginatedUtxo +- maestrobitcoingosdk.PaginatedUtxo Methods: -- client.Addresses.Utxos.List(ctx context.Context, address string, query maestrobitcoin.AddressUtxoListParams) (maestrobitcoin.PaginatedUtxo, error) +- client.Addresses.Utxos.List(ctx context.Context, address string, query maestrobitcoingosdk.AddressUtxoListParams) (maestrobitcoingosdk.PaginatedUtxo, error) # Assets @@ -48,71 +48,71 @@ Methods: Response Types: -- maestrobitcoin.PaginatedBrc20Ticker -- maestrobitcoin.TimestampedBrc20Info +- maestrobitcoingosdk.PaginatedBrc20Ticker +- maestrobitcoingosdk.TimestampedBrc20Info Methods: -- client.Assets.Brc20.Get(ctx context.Context, ticker string) (maestrobitcoin.TimestampedBrc20Info, error) -- client.Assets.Brc20.List(ctx context.Context, query maestrobitcoin.AssetBrc20ListParams) (maestrobitcoin.PaginatedBrc20Ticker, error) +- client.Assets.Brc20.Get(ctx context.Context, ticker string) (maestrobitcoingosdk.TimestampedBrc20Info, error) +- client.Assets.Brc20.List(ctx context.Context, query maestrobitcoingosdk.AssetBrc20ListParams) (maestrobitcoingosdk.PaginatedBrc20Ticker, error) ### Holders Response Types: -- maestrobitcoin.PaginatedBrc20Holder +- maestrobitcoingosdk.PaginatedBrc20Holder Methods: -- client.Assets.Brc20.Holders.List(ctx context.Context, ticker string, query maestrobitcoin.AssetBrc20HolderListParams) (maestrobitcoin.PaginatedBrc20Holder, error) +- client.Assets.Brc20.Holders.List(ctx context.Context, ticker string, query maestrobitcoingosdk.AssetBrc20HolderListParams) (maestrobitcoingosdk.PaginatedBrc20Holder, error) ## Runes Response Types: -- maestrobitcoin.PaginatedRuneIDAndName -- maestrobitcoin.TimestampedRuneInfo +- maestrobitcoingosdk.PaginatedRuneIDAndName +- maestrobitcoingosdk.TimestampedRuneInfo Methods: -- client.Assets.Runes.Get(ctx context.Context, rune string) (maestrobitcoin.TimestampedRuneInfo, error) -- client.Assets.Runes.List(ctx context.Context, query maestrobitcoin.AssetRuneListParams) (maestrobitcoin.PaginatedRuneIDAndName, error) +- client.Assets.Runes.Get(ctx context.Context, rune string) (maestrobitcoingosdk.TimestampedRuneInfo, error) +- client.Assets.Runes.List(ctx context.Context, query maestrobitcoingosdk.AssetRuneListParams) (maestrobitcoingosdk.PaginatedRuneIDAndName, error) ### Holders Response Types: -- maestrobitcoin.PaginatedRuneHolder +- maestrobitcoingosdk.PaginatedRuneHolder Methods: -- client.Assets.Runes.Holders.List(ctx context.Context, rune string, query maestrobitcoin.AssetRuneHolderListParams) (maestrobitcoin.PaginatedRuneHolder, error) +- client.Assets.Runes.Holders.List(ctx context.Context, rune string, query maestrobitcoingosdk.AssetRuneHolderListParams) (maestrobitcoingosdk.PaginatedRuneHolder, error) ### Utxos Response Types: -- maestrobitcoin.PaginatedRuneUtxo +- maestrobitcoingosdk.PaginatedRuneUtxo Methods: -- client.Assets.Runes.Utxos.List(ctx context.Context, rune string, query maestrobitcoin.AssetRuneUtxoListParams) (maestrobitcoin.PaginatedRuneUtxo, error) +- client.Assets.Runes.Utxos.List(ctx context.Context, rune string, query maestrobitcoingosdk.AssetRuneUtxoListParams) (maestrobitcoingosdk.PaginatedRuneUtxo, error) # Blocks Response Types: -- maestrobitcoin.TimestampedBlock +- maestrobitcoingosdk.TimestampedBlock Methods: -- client.Blocks.Get(ctx context.Context, blockHash string) (maestrobitcoin.TimestampedBlock, error) +- client.Blocks.Get(ctx context.Context, blockHash string) (maestrobitcoingosdk.TimestampedBlock, error) ## Latest Methods: -- client.Blocks.Latest.Get(ctx context.Context) (maestrobitcoin.TimestampedBlock, error) +- client.Blocks.Latest.Get(ctx context.Context) (maestrobitcoingosdk.TimestampedBlock, error) # General @@ -120,11 +120,11 @@ Methods: Response Types: -- maestrobitcoin.TimestampedBlockchainInfo +- maestrobitcoingosdk.TimestampedBlockchainInfo Methods: -- client.General.Info.Get(ctx context.Context) (maestrobitcoin.TimestampedBlockchainInfo, error) +- client.General.Info.Get(ctx context.Context) (maestrobitcoingosdk.TimestampedBlockchainInfo, error) # Rpc @@ -134,63 +134,63 @@ Methods: Response Types: -- maestrobitcoin.TimestampedMempoolInfo +- maestrobitcoingosdk.TimestampedMempoolInfo Methods: -- client.Rpc.Mempool.Info.Get(ctx context.Context) (maestrobitcoin.TimestampedMempoolInfo, error) +- client.Rpc.Mempool.Info.Get(ctx context.Context) (maestrobitcoingosdk.TimestampedMempoolInfo, error) ### Transactions Response Types: -- maestrobitcoin.TimestampedMempoolTransactionDetails -- maestrobitcoin.TimestampedMempoolTransactions +- maestrobitcoingosdk.TimestampedMempoolTransactionDetails +- maestrobitcoingosdk.TimestampedMempoolTransactions Methods: -- client.Rpc.Mempool.Transactions.Get(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionDetails, error) -- client.Rpc.Mempool.Transactions.List(ctx context.Context) (maestrobitcoin.TimestampedMempoolTransactions, error) +- client.Rpc.Mempool.Transactions.Get(ctx context.Context, txHash string) (maestrobitcoingosdk.TimestampedMempoolTransactionDetails, error) +- client.Rpc.Mempool.Transactions.List(ctx context.Context) (maestrobitcoingosdk.TimestampedMempoolTransactions, error) #### Ancestors Response Types: -- maestrobitcoin.TimestampedMempoolTransactionAncestors +- maestrobitcoingosdk.TimestampedMempoolTransactionAncestors Methods: -- client.Rpc.Mempool.Transactions.Ancestors.List(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionAncestors, error) +- client.Rpc.Mempool.Transactions.Ancestors.List(ctx context.Context, txHash string) (maestrobitcoingosdk.TimestampedMempoolTransactionAncestors, error) #### Descendants Response Types: -- maestrobitcoin.TimestampedMempoolTransactionDescendants +- maestrobitcoingosdk.TimestampedMempoolTransactionDescendants Methods: -- client.Rpc.Mempool.Transactions.Descendants.List(ctx context.Context, txHash string) (maestrobitcoin.TimestampedMempoolTransactionDescendants, error) +- client.Rpc.Mempool.Transactions.Descendants.List(ctx context.Context, txHash string) (maestrobitcoingosdk.TimestampedMempoolTransactionDescendants, error) # RpcTransactions Response Types: -- maestrobitcoin.TimestampedTransactionDetails +- maestrobitcoingosdk.TimestampedTransactionDetails Methods: -- client.RpcTransactions.Get(ctx context.Context, txHash string) (maestrobitcoin.TimestampedTransactionDetails, error) +- client.RpcTransactions.Get(ctx context.Context, txHash string) (maestrobitcoingosdk.TimestampedTransactionDetails, error) # Transactions Methods: - client.Transactions.Get(ctx context.Context, txHash string) error -- client.Transactions.Submit(ctx context.Context, body maestrobitcoin.TransactionSubmitParams) (string, error) +- client.Transactions.Submit(ctx context.Context, body maestrobitcoingosdk.TransactionSubmitParams) (string, error) ## Psbt Methods: -- client.Transactions.Psbt.Decode(ctx context.Context, body maestrobitcoin.TransactionPsbtDecodeParams) error +- client.Transactions.Psbt.Decode(ctx context.Context, body maestrobitcoingosdk.TransactionPsbtDecodeParams) error diff --git a/asset.go b/asset.go index 8eccdf0..2e2198a 100644 --- a/asset.go +++ b/asset.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/option" diff --git a/assetbrc20.go b/assetbrc20.go index 9a29439..285747d 100644 --- a/assetbrc20.go +++ b/assetbrc20.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/assetbrc20_test.go b/assetbrc20_test.go index 0cef955..9631dd6 100644 --- a/assetbrc20_test.go +++ b/assetbrc20_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestAssetBrc20Get(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Assets.Brc20.Get(context.TODO(), "FCTB") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } @@ -43,16 +43,16 @@ func TestAssetBrc20ListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) - _, err := client.Assets.Brc20.List(context.TODO(), maestrobitcoin.AssetBrc20ListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), + _, err := client.Assets.Brc20.List(context.TODO(), maestrobitcoingosdk.AssetBrc20ListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), }) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/assetbrc20holder.go b/assetbrc20holder.go index d214d91..cd4ca68 100644 --- a/assetbrc20holder.go +++ b/assetbrc20holder.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/assetbrc20holder_test.go b/assetbrc20holder_test.go index c33a3e0..e8ccb38 100644 --- a/assetbrc20holder_test.go +++ b/assetbrc20holder_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,20 +21,20 @@ func TestAssetBrc20HolderListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Assets.Brc20.Holders.List( context.TODO(), "TUAH", - maestrobitcoin.AssetBrc20HolderListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), + maestrobitcoingosdk.AssetBrc20HolderListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), }, ) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/assetrune.go b/assetrune.go index aca586e..b9de637 100644 --- a/assetrune.go +++ b/assetrune.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/assetrune_test.go b/assetrune_test.go index f5aa220..0c5685c 100644 --- a/assetrune_test.go +++ b/assetrune_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestAssetRuneGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Assets.Runes.Get(context.TODO(), "2519999:31") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } @@ -43,16 +43,16 @@ func TestAssetRuneListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) - _, err := client.Assets.Runes.List(context.TODO(), maestrobitcoin.AssetRuneListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), + _, err := client.Assets.Runes.List(context.TODO(), maestrobitcoingosdk.AssetRuneListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), }) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/assetruneholder.go b/assetruneholder.go index 61d08b6..d477b08 100644 --- a/assetruneholder.go +++ b/assetruneholder.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/assetruneholder_test.go b/assetruneholder_test.go index 4473787..dacb707 100644 --- a/assetruneholder_test.go +++ b/assetruneholder_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,20 +21,20 @@ func TestAssetRuneHolderListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Assets.Runes.Holders.List( context.TODO(), "2519999:31", - maestrobitcoin.AssetRuneHolderListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), + maestrobitcoingosdk.AssetRuneHolderListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), }, ) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/assetruneutxo.go b/assetruneutxo.go index 939b71b..317bfbf 100644 --- a/assetruneutxo.go +++ b/assetruneutxo.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/assetruneutxo_test.go b/assetruneutxo_test.go index 434da30..d2d95ef 100644 --- a/assetruneutxo_test.go +++ b/assetruneutxo_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,23 +21,23 @@ func TestAssetRuneUtxoListWithOptionalParams(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Assets.Runes.Utxos.List( context.TODO(), "2519999:31", - maestrobitcoin.AssetRuneUtxoListParams{ - Count: maestrobitcoin.F(int64(0)), - Cursor: maestrobitcoin.F("cursor"), - From: maestrobitcoin.F(int64(0)), - Order: maestrobitcoin.F(maestrobitcoin.AssetRuneUtxoListParamsOrderAsc), - To: maestrobitcoin.F(int64(0)), + maestrobitcoingosdk.AssetRuneUtxoListParams{ + Count: maestrobitcoingosdk.F(int64(0)), + Cursor: maestrobitcoingosdk.F("cursor"), + From: maestrobitcoingosdk.F(int64(0)), + Order: maestrobitcoingosdk.F(maestrobitcoingosdk.AssetRuneUtxoListParamsOrderAsc), + To: maestrobitcoingosdk.F(int64(0)), }, ) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/block.go b/block.go index 8e5aeff..77b696c 100644 --- a/block.go +++ b/block.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/block_test.go b/block_test.go index 93e5a7a..9106db3 100644 --- a/block_test.go +++ b/block_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestBlockGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Blocks.Get(context.TODO(), "block_hash") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/blocklatest.go b/blocklatest.go index cbcd1a7..dfcd2fd 100644 --- a/blocklatest.go +++ b/blocklatest.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/blocklatest_test.go b/blocklatest_test.go index bb8f525..e27c10d 100644 --- a/blocklatest_test.go +++ b/blocklatest_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestBlockLatestGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Blocks.Latest.Get(context.TODO()) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/client.go b/client.go index d47fbdb..0464063 100644 --- a/client.go +++ b/client.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/client_test.go b/client_test.go index c6b9b15..810101a 100644 --- a/client_test.go +++ b/client_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -25,7 +25,7 @@ func (t *closureTransport) RoundTrip(req *http.Request) (*http.Response, error) func TestUserAgentHeader(t *testing.T) { var userAgent string - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -45,7 +45,7 @@ func TestUserAgentHeader(t *testing.T) { func TestRetryAfter(t *testing.T) { retryCountHeaders := make([]string, 0) - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -78,7 +78,7 @@ func TestRetryAfter(t *testing.T) { func TestDeleteRetryCountHeader(t *testing.T) { retryCountHeaders := make([]string, 0) - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -107,7 +107,7 @@ func TestDeleteRetryCountHeader(t *testing.T) { func TestOverwriteRetryCountHeader(t *testing.T) { retryCountHeaders := make([]string, 0) - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -136,7 +136,7 @@ func TestOverwriteRetryCountHeader(t *testing.T) { func TestRetryAfterMs(t *testing.T) { attempts := 0 - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -161,7 +161,7 @@ func TestRetryAfterMs(t *testing.T) { } func TestContextCancel(t *testing.T) { - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -180,7 +180,7 @@ func TestContextCancel(t *testing.T) { } func TestContextCancelDelay(t *testing.T) { - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { @@ -207,7 +207,7 @@ func TestContextDeadline(t *testing.T) { defer cancel() go func() { - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithHTTPClient(&http.Client{ Transport: &closureTransport{ fn: func(req *http.Request) (*http.Response, error) { diff --git a/field.go b/field.go index 6f7db9d..766e8e8 100644 --- a/field.go +++ b/field.go @@ -1,4 +1,4 @@ -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/internal/param" diff --git a/general.go b/general.go index e03cf00..f033eb5 100644 --- a/general.go +++ b/general.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/option" diff --git a/generalinfo.go b/generalinfo.go index 42a56f7..4b45759 100644 --- a/generalinfo.go +++ b/generalinfo.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/generalinfo_test.go b/generalinfo_test.go index d773982..c64e7b0 100644 --- a/generalinfo_test.go +++ b/generalinfo_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestGeneralInfoGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.General.Info.Get(context.TODO()) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/rpc.go b/rpc.go index d504244..c314507 100644 --- a/rpc.go +++ b/rpc.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/option" diff --git a/rpcmempool.go b/rpcmempool.go index c358022..4fa421b 100644 --- a/rpcmempool.go +++ b/rpcmempool.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "github.com/maestro-org/maestro-bitcoin-go-sdk/option" diff --git a/rpcmempoolinfo.go b/rpcmempoolinfo.go index b49f1b0..ae15351 100644 --- a/rpcmempoolinfo.go +++ b/rpcmempoolinfo.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/rpcmempoolinfo_test.go b/rpcmempoolinfo_test.go index efec559..0e14b4b 100644 --- a/rpcmempoolinfo_test.go +++ b/rpcmempoolinfo_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestRpcMempoolInfoGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Rpc.Mempool.Info.Get(context.TODO()) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/rpcmempooltransaction.go b/rpcmempooltransaction.go index 4db3402..754ac34 100644 --- a/rpcmempooltransaction.go +++ b/rpcmempooltransaction.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/rpcmempooltransaction_test.go b/rpcmempooltransaction_test.go index 37fdc9b..344caad 100644 --- a/rpcmempooltransaction_test.go +++ b/rpcmempooltransaction_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestRpcMempoolTransactionGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Rpc.Mempool.Transactions.Get(context.TODO(), "fdbb40c3364f3536e159ce8c058d4147ab4abf0b53f065f0966fdf9cbd5355df") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } @@ -43,13 +43,13 @@ func TestRpcMempoolTransactionList(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Rpc.Mempool.Transactions.List(context.TODO()) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/rpcmempooltransactionancestor.go b/rpcmempooltransactionancestor.go index b457d22..5f9395d 100644 --- a/rpcmempooltransactionancestor.go +++ b/rpcmempooltransactionancestor.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/rpcmempooltransactionancestor_test.go b/rpcmempooltransactionancestor_test.go index 53a7aff..f5b76c9 100644 --- a/rpcmempooltransactionancestor_test.go +++ b/rpcmempooltransactionancestor_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestRpcMempoolTransactionAncestorList(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Rpc.Mempool.Transactions.Ancestors.List(context.TODO(), "fdbb40c3364f3536e159ce8c058d4147ab4abf0b53f065f0966fdf9cbd5355df") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/rpcmempooltransactiondescendant.go b/rpcmempooltransactiondescendant.go index 55e42aa..362ddd5 100644 --- a/rpcmempooltransactiondescendant.go +++ b/rpcmempooltransactiondescendant.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/rpcmempooltransactiondescendant_test.go b/rpcmempooltransactiondescendant_test.go index f1205e3..7a0107a 100644 --- a/rpcmempooltransactiondescendant_test.go +++ b/rpcmempooltransactiondescendant_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestRpcMempoolTransactionDescendantList(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.Rpc.Mempool.Transactions.Descendants.List(context.TODO(), "fdbb40c3364f3536e159ce8c058d4147ab4abf0b53f065f0966fdf9cbd5355df") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/rpctransaction.go b/rpctransaction.go index c935fe0..7c7c9d9 100644 --- a/rpctransaction.go +++ b/rpctransaction.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/rpctransaction_test.go b/rpctransaction_test.go index 4931aa7..a751516 100644 --- a/rpctransaction_test.go +++ b/rpctransaction_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestRpcTransactionGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) _, err := client.RpcTransactions.Get(context.TODO(), "fdbb40c3364f3536e159ce8c058d4147ab4abf0b53f065f0966fdf9cbd5355df") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/transaction.go b/transaction.go index 29fafa6..c7cc3f9 100644 --- a/transaction.go +++ b/transaction.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/transaction_test.go b/transaction_test.go index cac7c84..f7607e5 100644 --- a/transaction_test.go +++ b/transaction_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,13 +21,13 @@ func TestTransactionGet(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) err := client.Transactions.Get(context.TODO(), "tx_hash") if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } @@ -43,15 +43,15 @@ func TestTransactionSubmit(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) - _, err := client.Transactions.Submit(context.TODO(), maestrobitcoin.TransactionSubmitParams{ + _, err := client.Transactions.Submit(context.TODO(), maestrobitcoingosdk.TransactionSubmitParams{ Body: map[string]interface{}{}, }) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/transactionpsbt.go b/transactionpsbt.go index f49e587..267b8b4 100644 --- a/transactionpsbt.go +++ b/transactionpsbt.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin +package maestrobitcoingosdk import ( "context" diff --git a/transactionpsbt_test.go b/transactionpsbt_test.go index e9ff3b0..344de94 100644 --- a/transactionpsbt_test.go +++ b/transactionpsbt_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -21,15 +21,15 @@ func TestTransactionPsbtDecode(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) - err := client.Transactions.Psbt.Decode(context.TODO(), maestrobitcoin.TransactionPsbtDecodeParams{ + err := client.Transactions.Psbt.Decode(context.TODO(), maestrobitcoingosdk.TransactionPsbtDecodeParams{ Body: map[string]interface{}{}, }) if err != nil { - var apierr *maestrobitcoin.Error + var apierr *maestrobitcoingosdk.Error if errors.As(err, &apierr) { t.Log(string(apierr.DumpRequest(true))) } diff --git a/usage_test.go b/usage_test.go index 74a796c..3ff6d77 100644 --- a/usage_test.go +++ b/usage_test.go @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -package maestrobitcoin_test +package maestrobitcoingosdk_test import ( "context" @@ -20,7 +20,7 @@ func TestUsage(t *testing.T) { if !testutil.CheckTestServer(t, baseURL) { return } - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithBaseURL(baseURL), option.WithAPIKey("My API Key"), ) From fc8b1cf8e9f39bd269055051902b23a60c16b37d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:24:00 +0000 Subject: [PATCH 3/5] feat(api): update via SDK Studio (#4) --- .stats.yml | 2 +- LICENSE | 2 +- README.md | 8 ++++---- SECURITY.md | 4 ++-- address.go | 2 +- addressbrc20.go | 2 +- addressrune.go | 2 +- addresstx.go | 2 +- addressutxo.go | 2 +- asset.go | 2 +- assetbrc20.go | 2 +- assetbrc20holder.go | 2 +- assetrune.go | 2 +- assetruneholder.go | 2 +- assetruneutxo.go | 2 +- block.go | 2 +- blocklatest.go | 2 +- client.go | 4 ++-- client_test.go | 2 +- general.go | 2 +- generalinfo.go | 2 +- internal/requestconfig/requestconfig.go | 2 +- option/requestoption.go | 14 +++++++------- rpc.go | 2 +- rpcmempool.go | 2 +- rpcmempoolinfo.go | 2 +- rpcmempooltransaction.go | 2 +- rpcmempooltransactionancestor.go | 2 +- rpcmempooltransactiondescendant.go | 2 +- rpctransaction.go | 2 +- transaction.go | 2 +- transactionpsbt.go | 2 +- 32 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.stats.yml b/.stats.yml index e884bf0..17d9fcd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 24 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/maestro%2Fmaestro-bitcoin-900ea6470a56333353dbdc9e87ba4431c23eeb68a4ea6060a511b1403f94b13a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/maestro%2Fmaestro-bitcoin-c531b4034ac885b312d47dac9228993502b0ea2f32bf5e939c0f0e096b1ba462.yml diff --git a/LICENSE b/LICENSE index 95806e7..f9d2593 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Maestro Bitcoin + Copyright 2024 Maestro Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 3192422..90e8210 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Maestro Bitcoin Go API Library +# Maestro Go API Library Go Reference -The Maestro Bitcoin Go library provides convenient access to [the Maestro Bitcoin REST +The Maestro Go library provides convenient access to [the Maestro REST API](https://docs.gomaestro.org/) from applications written in Go. The full API of this library can be found in [api.md](api.md). It is generated with [Stainless](https://www.stainlessapi.com/). @@ -50,8 +50,8 @@ import ( func main() { client := maestrobitcoingosdk.NewClient( - option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("API_KEY") - option.WithEnvironmentEnvironment1(), // defaults to option.WithEnvironmentProduction() + option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("API_KEY") + option.WithEnvironmentTestnet(), // defaults to option.WithEnvironmentMainnet() ) timestampedBlockchainInfo, err := client.General.Info.Get(context.TODO()) if err != nil { diff --git a/SECURITY.md b/SECURITY.md index f9be98f..5fe573d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -16,9 +16,9 @@ before making any information public. ## Reporting Non-SDK Related Security Issues If you encounter security issues that are not directly related to SDKs but pertain to the services -or products provided by Maestro Bitcoin please follow the respective company's security reporting guidelines. +or products provided by Maestro please follow the respective company's security reporting guidelines. -### Maestro Bitcoin Terms and Policies +### Maestro Terms and Policies Please contact info@gomaestro.org for any questions or concerns regarding security of our services. diff --git a/address.go b/address.go index 2355f9a..8eb1bf7 100644 --- a/address.go +++ b/address.go @@ -7,7 +7,7 @@ import ( ) // AddressService contains methods and other services that help with interacting -// with the maestro-bitcoin API. +// with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/addressbrc20.go b/addressbrc20.go index 305ecad..fd3a75d 100644 --- a/addressbrc20.go +++ b/addressbrc20.go @@ -14,7 +14,7 @@ import ( ) // AddressBrc20Service contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/addressrune.go b/addressrune.go index 41faa4e..db7d38e 100644 --- a/addressrune.go +++ b/addressrune.go @@ -17,7 +17,7 @@ import ( ) // AddressRuneService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/addresstx.go b/addresstx.go index 79d7b2f..9aa3816 100644 --- a/addresstx.go +++ b/addresstx.go @@ -17,7 +17,7 @@ import ( ) // AddressTxService contains methods and other services that help with interacting -// with the maestro-bitcoin API. +// with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/addressutxo.go b/addressutxo.go index 8041a2b..e35a216 100644 --- a/addressutxo.go +++ b/addressutxo.go @@ -17,7 +17,7 @@ import ( ) // AddressUtxoService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/asset.go b/asset.go index 2e2198a..5cb61cd 100644 --- a/asset.go +++ b/asset.go @@ -7,7 +7,7 @@ import ( ) // AssetService contains methods and other services that help with interacting with -// the maestro-bitcoin API. +// the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/assetbrc20.go b/assetbrc20.go index 285747d..3e50fe4 100644 --- a/assetbrc20.go +++ b/assetbrc20.go @@ -17,7 +17,7 @@ import ( ) // AssetBrc20Service contains methods and other services that help with interacting -// with the maestro-bitcoin API. +// with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/assetbrc20holder.go b/assetbrc20holder.go index cd4ca68..06acbcd 100644 --- a/assetbrc20holder.go +++ b/assetbrc20holder.go @@ -17,7 +17,7 @@ import ( ) // AssetBrc20HolderService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/assetrune.go b/assetrune.go index b9de637..ae7ed98 100644 --- a/assetrune.go +++ b/assetrune.go @@ -17,7 +17,7 @@ import ( ) // AssetRuneService contains methods and other services that help with interacting -// with the maestro-bitcoin API. +// with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/assetruneholder.go b/assetruneholder.go index d477b08..b243da2 100644 --- a/assetruneholder.go +++ b/assetruneholder.go @@ -17,7 +17,7 @@ import ( ) // AssetRuneHolderService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/assetruneutxo.go b/assetruneutxo.go index 317bfbf..d35a590 100644 --- a/assetruneutxo.go +++ b/assetruneutxo.go @@ -17,7 +17,7 @@ import ( ) // AssetRuneUtxoService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/block.go b/block.go index 77b696c..76567fb 100644 --- a/block.go +++ b/block.go @@ -15,7 +15,7 @@ import ( ) // BlockService contains methods and other services that help with interacting with -// the maestro-bitcoin API. +// the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/blocklatest.go b/blocklatest.go index dfcd2fd..9edeac2 100644 --- a/blocklatest.go +++ b/blocklatest.go @@ -11,7 +11,7 @@ import ( ) // BlockLatestService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/client.go b/client.go index 0464063..cd126a3 100644 --- a/client.go +++ b/client.go @@ -12,7 +12,7 @@ import ( ) // Client creates a struct with services and top level methods that help with -// interacting with the maestro-bitcoin API. You should not instantiate this client +// interacting with the maestro API. You should not instantiate this client // directly, and instead use the [NewClient] method instead. type Client struct { Options []option.RequestOption @@ -30,7 +30,7 @@ type Client struct { // default arguments, and all option will be passed down to the services and // requests that this client makes. func NewClient(opts ...option.RequestOption) (r *Client) { - defaults := []option.RequestOption{option.WithEnvironmentProduction()} + defaults := []option.RequestOption{option.WithEnvironmentMainnet()} if o, ok := os.LookupEnv("API_KEY"); ok { defaults = append(defaults, option.WithAPIKey(o)) } diff --git a/client_test.go b/client_test.go index 810101a..a6cc3f1 100644 --- a/client_test.go +++ b/client_test.go @@ -38,7 +38,7 @@ func TestUserAgentHeader(t *testing.T) { }), ) client.General.Info.Get(context.Background()) - if userAgent != fmt.Sprintf("MaestroBitcoin/Go %s", internal.PackageVersion) { + if userAgent != fmt.Sprintf("Maestro/Go %s", internal.PackageVersion) { t.Errorf("Expected User-Agent to be correct, but got: %#v", userAgent) } } diff --git a/general.go b/general.go index f033eb5..a431640 100644 --- a/general.go +++ b/general.go @@ -7,7 +7,7 @@ import ( ) // GeneralService contains methods and other services that help with interacting -// with the maestro-bitcoin API. +// with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/generalinfo.go b/generalinfo.go index 4b45759..683006c 100644 --- a/generalinfo.go +++ b/generalinfo.go @@ -12,7 +12,7 @@ import ( ) // GeneralInfoService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go index f30479f..933e3f5 100644 --- a/internal/requestconfig/requestconfig.go +++ b/internal/requestconfig/requestconfig.go @@ -25,7 +25,7 @@ import ( func getDefaultHeaders() map[string]string { return map[string]string{ - "User-Agent": fmt.Sprintf("MaestroBitcoin/Go %s", internal.PackageVersion), + "User-Agent": fmt.Sprintf("Maestro/Go %s", internal.PackageVersion), } } diff --git a/option/requestoption.go b/option/requestoption.go index 5beca6a..7c2dafa 100644 --- a/option/requestoption.go +++ b/option/requestoption.go @@ -15,7 +15,7 @@ import ( "github.com/tidwall/sjson" ) -// RequestOption is an option for the requests made by the maestro-bitcoin API Client +// RequestOption is an option for the requests made by the maestro API Client // which can be supplied to clients, services, and methods. You can read more about this functional // options pattern in our [README]. // @@ -221,17 +221,17 @@ func WithRequestTimeout(dur time.Duration) RequestOption { } } -// WithEnvironmentProduction returns a RequestOption that sets the current -// environment to be the "production" environment. An environment specifies which base URL +// WithEnvironmentMainnet returns a RequestOption that sets the current +// environment to be the "mainnet" environment. An environment specifies which base URL // to use by default. -func WithEnvironmentProduction() RequestOption { +func WithEnvironmentMainnet() RequestOption { return WithBaseURL("https://xbt-mainnet.gomaestro-api.org/v0/") } -// WithEnvironmentEnvironment1 returns a RequestOption that sets the current -// environment to be the "environment_1" environment. An environment specifies which base URL +// WithEnvironmentTestnet returns a RequestOption that sets the current +// environment to be the "testnet" environment. An environment specifies which base URL // to use by default. -func WithEnvironmentEnvironment1() RequestOption { +func WithEnvironmentTestnet() RequestOption { return WithBaseURL("https://xbt-testnet.gomaestro-api.org/v0/") } diff --git a/rpc.go b/rpc.go index c314507..19c31da 100644 --- a/rpc.go +++ b/rpc.go @@ -7,7 +7,7 @@ import ( ) // RpcService contains methods and other services that help with interacting with -// the maestro-bitcoin API. +// the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/rpcmempool.go b/rpcmempool.go index 4fa421b..cf86056 100644 --- a/rpcmempool.go +++ b/rpcmempool.go @@ -7,7 +7,7 @@ import ( ) // RpcMempoolService contains methods and other services that help with interacting -// with the maestro-bitcoin API. +// with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/rpcmempoolinfo.go b/rpcmempoolinfo.go index ae15351..447e5d7 100644 --- a/rpcmempoolinfo.go +++ b/rpcmempoolinfo.go @@ -12,7 +12,7 @@ import ( ) // RpcMempoolInfoService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/rpcmempooltransaction.go b/rpcmempooltransaction.go index 754ac34..49593bf 100644 --- a/rpcmempooltransaction.go +++ b/rpcmempooltransaction.go @@ -14,7 +14,7 @@ import ( ) // RpcMempoolTransactionService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/rpcmempooltransactionancestor.go b/rpcmempooltransactionancestor.go index 5f9395d..0522f68 100644 --- a/rpcmempooltransactionancestor.go +++ b/rpcmempooltransactionancestor.go @@ -14,7 +14,7 @@ import ( ) // RpcMempoolTransactionAncestorService contains methods and other services that -// help with interacting with the maestro-bitcoin API. +// help with interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/rpcmempooltransactiondescendant.go b/rpcmempooltransactiondescendant.go index 362ddd5..89a392f 100644 --- a/rpcmempooltransactiondescendant.go +++ b/rpcmempooltransactiondescendant.go @@ -14,7 +14,7 @@ import ( ) // RpcMempoolTransactionDescendantService contains methods and other services that -// help with interacting with the maestro-bitcoin API. +// help with interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/rpctransaction.go b/rpctransaction.go index 7c7c9d9..1d629c6 100644 --- a/rpctransaction.go +++ b/rpctransaction.go @@ -14,7 +14,7 @@ import ( ) // RpcTransactionService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/transaction.go b/transaction.go index c7cc3f9..386499b 100644 --- a/transaction.go +++ b/transaction.go @@ -14,7 +14,7 @@ import ( ) // TransactionService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use diff --git a/transactionpsbt.go b/transactionpsbt.go index 267b8b4..1494bbf 100644 --- a/transactionpsbt.go +++ b/transactionpsbt.go @@ -12,7 +12,7 @@ import ( ) // TransactionPsbtService contains methods and other services that help with -// interacting with the maestro-bitcoin API. +// interacting with the maestro API. // // Note, unlike clients, this service does not read variables from the environment // automatically. You should not instantiate this service directly, and instead use From 928036870f289b12b4c81528446abc19bb8c6c07 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:24:20 +0000 Subject: [PATCH 4/5] release: 0.1.0-alpha.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c476280..ba6c348 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.1-alpha.0" + ".": "0.1.0-alpha.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..da8b883 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +## 0.1.0-alpha.1 (2024-10-08) + +Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/maestro-org/maestro-bitcoin-go-sdk/compare/v0.0.1-alpha.0...v0.1.0-alpha.1) + +### Features + +* **api:** update via SDK Studio ([#4](https://github.com/maestro-org/maestro-bitcoin-go-sdk/issues/4)) ([fc8b1cf](https://github.com/maestro-org/maestro-bitcoin-go-sdk/commit/fc8b1cf8e9f39bd269055051902b23a60c16b37d)) + + +### Chores + +* configure new SDK language ([4e265be](https://github.com/maestro-org/maestro-bitcoin-go-sdk/commit/4e265be800eec9f36fee72f43b7057b46f530204)) +* go live ([#1](https://github.com/maestro-org/maestro-bitcoin-go-sdk/issues/1)) ([58adb9b](https://github.com/maestro-org/maestro-bitcoin-go-sdk/commit/58adb9b2105c594c54d80811713794276e182b4e)) +* update SDK settings ([#3](https://github.com/maestro-org/maestro-bitcoin-go-sdk/issues/3)) ([8574183](https://github.com/maestro-org/maestro-bitcoin-go-sdk/commit/85741837cfd5517f572110e7be96a1fbda4dc96c)) diff --git a/README.md b/README.md index 90e8210..162eafc 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Or to pin the version: ```sh -go get -u 'github.com/maestro-org/maestro-bitcoin-go-sdk@v0.0.1-alpha.0' +go get -u 'github.com/maestro-org/maestro-bitcoin-go-sdk@v0.1.0-alpha.1' ``` diff --git a/internal/version.go b/internal/version.go index 4ff68e4..5ed22d7 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.0.1-alpha.0" // x-release-please-version +const PackageVersion = "0.1.0-alpha.1" // x-release-please-version From a07a6d968827a1998de273731bca1387ebf2f08c Mon Sep 17 00:00:00 2001 From: Vardominator Date: Tue, 8 Oct 2024 18:32:47 +0000 Subject: [PATCH 5/5] fix? --- examples/main/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/main/main.go b/examples/main/main.go index a408732..aea67e7 100644 --- a/examples/main/main.go +++ b/examples/main/main.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/stainless-sdks/maestro-bitcoin-go" - "github.com/stainless-sdks/maestro-bitcoin-go/option" + maestrobitcoingosdk "github.com/maestro-org/maestro-bitcoin-go-sdk" + "github.com/maestro-org/maestro-bitcoin-go-sdk/option" ) func main() { - client := maestrobitcoin.NewClient( + client := maestrobitcoingosdk.NewClient( option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("API_KEY") ) timestampedBlockchainInfo, err := client.General.Info.Get(context.TODO())