This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
generated from mrz1836/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds string definitions - errors and authentication consts
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package buxmodels | ||
|
||
import "time" | ||
|
||
const ( | ||
// AuthHeader is the header to use for authentication (raw xPub) | ||
AuthHeader = "bux-auth-xpub" | ||
|
||
// AuthAccessKey is the header to use for access key authentication (access public key) | ||
AuthAccessKey = "bux-auth-key" | ||
|
||
// AuthSignature is the given signature (body + timestamp) | ||
AuthSignature = "bux-auth-signature" | ||
|
||
// AuthHeaderHash hash of the body coming from the request | ||
AuthHeaderHash = "bux-auth-hash" | ||
|
||
// AuthHeaderNonce random nonce for the request | ||
AuthHeaderNonce = "bux-auth-nonce" | ||
|
||
// AuthHeaderTime the time of the request, only valid for 30 seconds | ||
AuthHeaderTime = "bux-auth-time" | ||
|
||
// AuthSignatureTTL is the max TTL for a signature to be valid | ||
AuthSignatureTTL = 20 * time.Second | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package buxmodels | ||
|
||
import "errors" | ||
|
||
var ErrDraftNotFound = errors.New("corresponding draft transaction not found") | ||
|
||
var ErrMissingXPriv = errors.New("missing xPriv key") |