From 0d28ad661be63401ead4b5a789320145011fcc63 Mon Sep 17 00:00:00 2001 From: Jakub Kowalski <155538368+jakubmkowalski@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:10:22 +0100 Subject: [PATCH] feat(SPV-1214): admin contact filter (#308) --- examples/go.mod | 2 +- examples/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- http.go | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/go.mod b/examples/go.mod index 0f58e0e0..e45f5ba5 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -6,7 +6,7 @@ replace github.com/bitcoin-sv/spv-wallet-go-client => ../ require ( github.com/bitcoin-sv/spv-wallet-go-client v0.0.0-00010101000000-000000000000 - github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.37 + github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.39 ) require ( diff --git a/examples/go.sum b/examples/go.sum index 82cf8b44..fb6a1ce4 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1,7 +1,7 @@ github.com/bitcoin-sv/go-sdk v1.1.16 h1:n2X0RiENFGD/1fQ/1y6osbostRB7I/xq9I7tcIKcCPY= github.com/bitcoin-sv/go-sdk v1.1.16/go.mod h1:3CsNdEDBwB+SIv6UBcJPC9bTvPqxQvg3GULt7wsuL58= -github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.37 h1:0zKPUJu9kBo1OzCg21yf4NGQSsCpftkP1tW85MkWfDE= -github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.37/go.mod h1:UdY5AGsO9IomUEYSPilcSY+3BTQRJswdfZNveLt6LZQ= +github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.39 h1:qo74o72mcdj7AYJoCq7RG3enHJiqtbkFEY9uXvEEG2M= +github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.39/go.mod h1:UdY5AGsO9IomUEYSPilcSY+3BTQRJswdfZNveLt6LZQ= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.2 h1:79yrbttoZrLGkL/oOI8hBrUKucwOL0oOjUgEguGMcJ4= github.com/boombuler/barcode v1.0.2/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= diff --git a/go.mod b/go.mod index 6125413d..d0c72bcd 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22.5 require ( github.com/bitcoin-sv/go-sdk v1.1.16 - github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.37 + github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.39 github.com/pquerna/otp v1.4.0 github.com/stretchr/testify v1.10.0 ) diff --git a/go.sum b/go.sum index 7a86a2a6..fea24d83 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/bitcoin-sv/go-sdk v1.1.16 h1:n2X0RiENFGD/1fQ/1y6osbostRB7I/xq9I7tcIKcCPY= github.com/bitcoin-sv/go-sdk v1.1.16/go.mod h1:3CsNdEDBwB+SIv6UBcJPC9bTvPqxQvg3GULt7wsuL58= -github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.37 h1:0zKPUJu9kBo1OzCg21yf4NGQSsCpftkP1tW85MkWfDE= -github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.37/go.mod h1:UdY5AGsO9IomUEYSPilcSY+3BTQRJswdfZNveLt6LZQ= +github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.39 h1:qo74o72mcdj7AYJoCq7RG3enHJiqtbkFEY9uXvEEG2M= +github.com/bitcoin-sv/spv-wallet/models v1.0.0-beta.39/go.mod h1:UdY5AGsO9IomUEYSPilcSY+3BTQRJswdfZNveLt6LZQ= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.2 h1:79yrbttoZrLGkL/oOI8hBrUKucwOL0oOjUgEguGMcJ4= github.com/boombuler/barcode v1.0.2/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= diff --git a/http.go b/http.go index 2a7fd632..2f372b06 100644 --- a/http.go +++ b/http.go @@ -1060,8 +1060,8 @@ func (wc *WalletClient) AdminRecordTransaction(ctx context.Context, hex string) } // AdminGetContacts executes an HTTP POST request to search for contacts based on specified conditions, metadata, and query parameters. -func (wc *WalletClient) AdminGetContacts(ctx context.Context, conditions *filter.ContactFilter, metadata map[string]any, queryParams *filter.QueryParams) (*models.SearchContactsResponse, error) { - return Search[filter.ContactFilter, *models.SearchContactsResponse]( +func (wc *WalletClient) AdminGetContacts(ctx context.Context, conditions *filter.AdminContactFilter, metadata map[string]any, queryParams *filter.QueryParams) (*models.SearchContactsResponse, error) { + return Search[filter.AdminContactFilter, *models.SearchContactsResponse]( ctx, http.MethodPost, "/admin/contact/search", wc.adminXPriv,