Documentation ¶
Index ¶
- func AESDecrypt(cipherText []byte, key []byte) ([]byte, error)
- func AESEncrypt(clearText []byte, key []byte) ([]byte, error)
- func PinToAesKey(pin string) string
- func SignDtrustRequest(ecKeys []*ECKey, dtrustReqData SignatureData) (string, error)
- func SignInputs(ecKey *ECKey, hexData string) (string, error)
- func SignRequestJsonWithKey(ecKey *ECKey, data string) (string, error)
- func SignRequestJsonWithKeys(ecKeys []*ECKey, data string) (string, error)
- func SignRequestWithKey(eckey *ECKey, sigRequest *SignatureData) (string, error)
- func SignRequestWithKeys(ecKeys []*ECKey, sigRequest *SignatureData) (string, error)
- func SignSweepRequest(ecKey *ECKey, sweepReqData SignatureData) (string, error)
- func SignWithdrawRequest(pin string, withdrawData *SignatureData) (string, error)
- func SignWithdrawRequestJson(pin string, withdrawData string) (string, error)
- func ValidateResponseJson(responseJson string) error
- type BaseResponse
- type ECKey
- func DeriveKeyFromHex(hexPass string) (*ECKey, error)
- func DeriveKeyFromString(pass string) *ECKey
- func ExtractKeyFromEncryptedPassphrase(encryptedData string, b64Key string) (*ECKey, error)
- func ExtractKeyFromPassphrase(hexPass string) *ECKey
- func ExtractKeyFromPassphraseString(pass string) *ECKey
- func FromWIF(strWif string) (*ECKey, error)
- func NewECKey(d [32]byte, compressed bool) *ECKey
- type EncryptedPassphrase
- type ErrorData
- type ErrorResponse
- type Inputs
- type SignatureData
- type SignatureRes
- type Signers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PinToAesKey ¶
func SignDtrustRequest ¶
func SignDtrustRequest(ecKeys []*ECKey, dtrustReqData SignatureData) (string, error)
DEPRECIATED. Use SignRequestWithKeys or SignRequestJsonWithKeys
func SignRequestJsonWithKey ¶ added in v1.0.1
Sign a JSON string withdrawal request with a custom ECKey
func SignRequestJsonWithKeys ¶ added in v1.0.1
Sign a JSON string withdrawal request with a set of custom ECKeys
func SignRequestWithKey ¶ added in v1.0.1
func SignRequestWithKey(eckey *ECKey, sigRequest *SignatureData) (string, error)
Sign a withdrawal request with a custom ECKey
func SignRequestWithKeys ¶ added in v1.0.1
func SignRequestWithKeys(ecKeys []*ECKey, sigRequest *SignatureData) (string, error)
Sign a withdrawal request with a set of custom ECKeys
func SignSweepRequest ¶
func SignSweepRequest(ecKey *ECKey, sweepReqData SignatureData) (string, error)
DEPRECIATED. Use SignRequestWithKey or SignRequestJsonWithKey
func SignWithdrawRequest ¶
func SignWithdrawRequest(pin string, withdrawData *SignatureData) (string, error)
Sign a withdrawal request with a pin
func SignWithdrawRequestJson ¶ added in v1.0.1
Convenience withdrawal request function that takes a JSON string
func ValidateResponseJson ¶ added in v1.0.1
Types ¶
type BaseResponse ¶
type BaseResponse struct { Status string `json:"status"` Data interface{} `json:"data"` }
func ParseResponse ¶
func ParseResponse(res string) (*BaseResponse, error)
type ECKey ¶
type ECKey struct { Compressed bool // contains filtered or unexported fields }
func DeriveKeyFromHex ¶ added in v1.0.1
func DeriveKeyFromString ¶ added in v1.0.1
func ExtractKeyFromPassphrase ¶
DEPRECIATED: Please use DeriveKeyFromHex
func ExtractKeyFromPassphraseString ¶
DEPRECIATED: Please use DeriveKeyFromString
func (*ECKey) PrivateKey ¶
func (*ECKey) PrivateKeyHex ¶
func (*ECKey) PublicKeyHex ¶
type EncryptedPassphrase ¶
type ErrorData ¶ added in v1.0.1
type ErrorData struct {
ErrorMessage string `json:"error_message"`
}
type ErrorResponse ¶ added in v1.0.1
func ParseErrorResponse ¶ added in v1.0.1
func ParseErrorResponse(res string) (*ErrorResponse, error)
type SignatureData ¶
type SignatureData struct { EncryptedPassphrase EncryptedPassphrase `json:"encrypted_passphrase"` Inputs Inputs `json:"inputs"` MoreSignaturesNeeded bool `json:"more_signatures_needed"` ReferenceID string `json:"reference_id"` UnsignedTxHex string `json:"unsigned_tx_hex"` }
func ParseSignatureResponse ¶
func ParseSignatureResponse(res string) (*SignatureData, error)
type SignatureRes ¶
type SignatureRes struct { Status string `json:"status"` Data SignatureData `json:"data"` }
Click to show internal directories.
Click to hide internal directories.