Documentation
¶
Index ¶
- type Address
- type AddressParams
- type BitGo
- func (b *BitGo) BuildTransaction(walletId string, params BuildTransactionParams) (transaction Transaction, err error)
- func (b *BitGo) Coin(coin string) *BitGo
- func (b *BitGo) CreateWalletAddress(walletId string, params *AddressParams) (address Address, err error)
- func (b *BitGo) CurrentUserProfile() (userProfile UserProfile, err error)
- func (b *BitGo) Debug(debug bool) *BitGo
- func (b *BitGo) EstimateTransactionFees(numBlocks int) (transactionFees TransactionFees, err error)
- func (b *BitGo) GenerateWallet(params GenerateWalletParams) (wallet GeneratedWallet, err error)
- func (b *BitGo) GetTotalBalances() (total TotalBalances, err error)
- func (b *BitGo) GetWallet(walletId string, params GetWalletParams) (wallet Wallet, err error)
- func (b *BitGo) GetWalletAddress(walletId string, addressOrId string) (address Address, err error)
- func (b *BitGo) GetWalletByAddress(address string) (wallet Wallet, err error)
- func (b *BitGo) GetWalletTransfer(walletId string, transferId string) (transfer Transfer, err error)
- func (b *BitGo) GetWalletTransferBySequenceID(walletId string, sequenceId string) (transfer Transfer, err error)
- func (b *BitGo) ListWalletTransfers(walletId string, params ListParams) (list TransferList, err error)
- func (b *BitGo) ListWalletWebhooks(walletId string, params GetWalletParams) (webhooks Webhooks, err error)
- func (b *BitGo) ListWallets(params ListParams) (list ListWallets, err error)
- func (b *BitGo) Lock() (err error)
- func (b *BitGo) Login(params LoginParams) (token Token, err error)
- func (b *BitGo) Logout() (err error)
- func (b *BitGo) SendTransaction(walletId string, params SendParams) (transactionDescription TransactionDescription, err error)
- func (b *BitGo) SendTransactionToMany(walletId string, params SendToManyParams) (transactionDescription TransactionDescription, err error)
- func (b *BitGo) SessionInformation() (session Session, err error)
- func (b *BitGo) SignTransaction(walletId string, params SignTransactionParams) (signedTransaction SignedTransaction, err error)
- func (b *BitGo) Token(token string) *BitGo
- func (b *BitGo) Unlock(params UnlockParams) (err error)
- func (b *BitGo) UpdateWallet(walletId string, params UpdateWalletParams) (wallet Wallet, err error)
- func (b *BitGo) UpdateWalletAddress(walletId string, addressOrId string, params UpdateWalletAddressParams) (address Address, err error)
- type BuildTransactionParams
- type Error
- type GenerateWalletParams
- type GeneratedWallet
- type GetWalletParams
- type Keychain
- type ListParams
- type ListWallets
- type ListWebhooks
- type LoginParams
- type Recipient
- type SendParams
- type SendToManyParams
- type Session
- type SignTransactionParams
- type SignedTransaction
- type Token
- type TotalBalances
- type Transaction
- type TransactionDescription
- type TransactionFees
- type Transfer
- type TransferList
- type UnlockParams
- type UpdateWalletAddressParams
- type UpdateWalletParams
- type UserProfile
- type Wallet
- type Webhook
- type WebhookEvent
- type Webhooks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { ID string `json:"id"` Address string `json:"address"` Chain int `json:"chain"` Index int `json:"index"` Coin string `json:"coin"` Wallet string `json:"wallet"` CoinSpecific struct { RedeemScript string `json:"redeemScript"` } `json:"coinSpecific"` Label string `json:"label"` Balance struct { Updated time.Time `json:"updated"` NumTx int `json:"numTx"` NumUnspents int `json:"numUnspents"` TotalReceived int `json:"totalReceived"` TotalSent int `json:"totalSent"` } `json:"balance"` }
type AddressParams ¶
type BitGo ¶
type BitGo struct {
// contains filtered or unexported fields
}
func (*BitGo) BuildTransaction ¶
func (b *BitGo) BuildTransaction(walletId string, params BuildTransactionParams) (transaction Transaction, err error)
func (*BitGo) CreateWalletAddress ¶
func (b *BitGo) CreateWalletAddress(walletId string, params *AddressParams) (address Address, err error)
func (*BitGo) CurrentUserProfile ¶
func (b *BitGo) CurrentUserProfile() (userProfile UserProfile, err error)
func (*BitGo) EstimateTransactionFees ¶
func (b *BitGo) EstimateTransactionFees(numBlocks int) (transactionFees TransactionFees, err error)
func (*BitGo) GenerateWallet ¶
func (b *BitGo) GenerateWallet(params GenerateWalletParams) (wallet GeneratedWallet, err error)
func (*BitGo) GetTotalBalances ¶
func (b *BitGo) GetTotalBalances() (total TotalBalances, err error)
func (*BitGo) GetWallet ¶
func (b *BitGo) GetWallet(walletId string, params GetWalletParams) (wallet Wallet, err error)
func (*BitGo) GetWalletAddress ¶
func (*BitGo) GetWalletByAddress ¶
func (*BitGo) GetWalletTransfer ¶
func (*BitGo) GetWalletTransferBySequenceID ¶
func (*BitGo) ListWalletTransfers ¶
func (b *BitGo) ListWalletTransfers(walletId string, params ListParams) (list TransferList, err error)
func (*BitGo) ListWalletWebhooks ¶
func (b *BitGo) ListWalletWebhooks(walletId string, params GetWalletParams) (webhooks Webhooks, err error)
func (*BitGo) ListWallets ¶
func (b *BitGo) ListWallets(params ListParams) (list ListWallets, err error)
func (*BitGo) SendTransaction ¶
func (b *BitGo) SendTransaction(walletId string, params SendParams) (transactionDescription TransactionDescription, err error)
func (*BitGo) SendTransactionToMany ¶
func (b *BitGo) SendTransactionToMany(walletId string, params SendToManyParams) (transactionDescription TransactionDescription, err error)
func (*BitGo) SessionInformation ¶
func (*BitGo) SignTransaction ¶
func (b *BitGo) SignTransaction(walletId string, params SignTransactionParams) (signedTransaction SignedTransaction, err error)
func (*BitGo) Unlock ¶
func (b *BitGo) Unlock(params UnlockParams) (err error)
func (*BitGo) UpdateWallet ¶
func (b *BitGo) UpdateWallet(walletId string, params UpdateWalletParams) (wallet Wallet, err error)
func (*BitGo) UpdateWalletAddress ¶
type BuildTransactionParams ¶
type BuildTransactionParams struct {
Recipients []Recipient `json:"recipients"`
}
type Error ¶
type GenerateWalletParams ¶
type GenerateWalletParams struct { Label string `json:"label" valid:"required"` Passphrase string `json:"passphrase" valid:"required"` UserKey string `json:"userKey,omitempty"` BackupXpub string `json:"backupXpub,omitempty"` BackupXpubProvider string `json:"backupXpubProvider,omitempty"` Enterprise string `json:"enterprise,omitempty"` DisableTransactionNotifications bool `json:"disableTransactionNotifications,omitempty"` GasPrice int `json:"gasPrice,omitempty"` PasscodeEncryptionCode string `json:"passcodeEncryptionCode,omitempty"` }
type GeneratedWallet ¶
type GeneratedWallet struct { Wallet struct { Wallet struct { ID string `json:"id"` Users []struct { User string `json:"user"` Permissions []string `json:"permissions"` } `json:"users"` Coin string `json:"coin"` Label string `json:"label"` M int `json:"m"` N int `json:"n"` Keys []string `json:"keys"` Tags []string `json:"tags"` DisableTransactionNotifications bool `json:"disableTransactionNotifications"` Freeze struct { } `json:"freeze"` Deleted bool `json:"deleted"` ApprovalsRequired int `json:"approvalsRequired"` IsCold bool `json:"isCold"` CoinSpecific struct { } `json:"coinSpecific"` Balance int `json:"balance"` ConfirmedBalance int `json:"confirmedBalance"` SpendableBalance int `json:"spendableBalance"` BalanceString string `json:"balanceString"` ConfirmedBalanceString string `json:"confirmedBalanceString"` SpendableBalanceString string `json:"spendableBalanceString"` ReceiveAddress struct { Address string `json:"address"` Chain int `json:"chain"` Index int `json:"index"` Coin string `json:"coin"` Wallet string `json:"wallet"` CoinSpecific struct { RedeemScript string `json:"redeemScript"` } `json:"coinSpecific"` } `json:"receiveAddress"` PendingApprovals []interface{} `json:"pendingApprovals"` } `json:"_wallet"` } `json:"wallet"` }
type GetWalletParams ¶
type GetWalletParams struct {
AllTokens bool `url:"allTokens,omitempty"`
}
type ListParams ¶
type ListWallets ¶
type ListWallets struct { NextBatchPrevId string `json:"nextBatchPrevId"` Wallets []struct { ID string `json:"id"` Users []struct { User string `json:"user"` Permissions []string `json:"permissions"` } `json:"users"` Coin string `json:"coin"` Label string `json:"label"` M int `json:"m"` N int `json:"n"` Keys []string `json:"keys"` Tags []string `json:"tags"` DisableTransactionNotifications bool `json:"disableTransactionNotifications"` Freeze struct { } `json:"freeze"` Deleted bool `json:"deleted"` ApprovalsRequired int `json:"approvalsRequired"` CoinSpecific struct { } `json:"coinSpecific"` } `json:"wallets"` }
type ListWebhooks ¶
type ListWebhooks struct {
Webhooks Webhooks `json:"webhooks"`
}
type LoginParams ¶
type SendParams ¶
type SendParams struct { Address string `json:"address" valid:"required"` Amount int `json:"amount" valid:"required"` WalletPassphrase string `json:"walletPassphrase" valid:"required"` Prv string `json:"prv,omitempty"` NumBlocks int `json:"numBlocks,omitempty"` FeeRate int `json:"feeRate,omitempty"` Comment string `json:"comment,omitempty"` // Unspents array `json:"unspents,omitempty"` MinConfirms int `json:"minConfirms,omitempty"` EnforceMinConfirmsForChange bool `json:"enforceMinConfirmsForChange,omitempty"` TargetWalletUnspents int `json:"targetWalletUnspents,omitempty"` NoSplitChange bool `json:"noSplitChange,omitempty"` MinValue int `json:"minValue,omitempty"` MaxValue int `json:"maxValue,omitempty"` GasPrice int `json:"gasPrice,omitempty"` GasLimit int `json:"gasLimit,omitempty"` SequenceId int `json:"sequenceId,omitempty"` Segwit bool `json:"segwit,omitempty"` LastLedgerSequence int `json:"lastLedgerSequence,omitempty"` LedgerSequenceDelta string `json:"ledgerSequenceDelta,omitempty"` }
type SendToManyParams ¶
type SendToManyParams struct { Recipients []Recipient `json:"recipients" valid:"required"` WalletPassphrase string `json:"walletPassphrase" valid:"required"` Prv string `json:"prv,omitempty"` NumBlocks int `json:"numBlocks,omitempty"` FeeRate int `json:"feeRate,omitempty"` Comment string `json:"comment,omitempty"` // Unspents array `json:"unspents,omitempty"` MinConfirms int `json:"minConfirms,omitempty"` EnforceMinConfirmsForChange bool `json:"enforceMinConfirmsForChange,omitempty"` TargetWalletUnspents int `json:"targetWalletUnspents,omitempty"` NoSplitChange bool `json:"noSplitChange,omitempty"` MinValue int `json:"minValue,omitempty"` MaxValue int `json:"maxValue,omitempty"` GasPrice int `json:"gasPrice,omitempty"` GasLimit int `json:"gasLimit,omitempty"` SequenceId int `json:"sequenceId,omitempty"` Segwit bool `json:"segwit,omitempty"` LastLedgerSequence int `json:"lastLedgerSequence,omitempty"` LedgerSequenceDelta string `json:"ledgerSequenceDelta,omitempty"` }
type Session ¶
type Session struct { Client string `json:"client"` User string `json:"user"` Scope []string `json:"scope"` Expires time.Time `json:"expires"` Origin string `json:"origin"` Unlock struct { Time time.Time `json:"time"` Expires time.Time `json:"expires"` TxCount int `json:"txCount"` TxValue int `json:"txValue"` } `json:"unlock"` }
type SignTransactionParams ¶
type SignTransactionParams struct { TxPrebuild Transaction `json:"txPrebuild"` Keychain Keychain `json:"keychain"` WalletPassphrase string `json:"walletPassphrase"` }
type SignedTransaction ¶
type SignedTransaction struct {
TxHex string `json:"txHex"`
}
type Token ¶
type Token struct { TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` ExpiresAt int `json:"expires_at"` Scope []string `json:"scope"` User struct { ID string `json:"id"` Username string `json:"username"` Name struct { Full string `json:"full"` First string `json:"first"` Last string `json:"last"` } `json:"name"` Email struct { Email string `json:"email"` Verified bool `json:"verified"` } `json:"email"` Phone struct { Phone string `json:"phone"` Verified bool `json:"verified"` } `json:"phone"` Identity struct { Civic struct { State string `json:"state"` } `json:"civic"` Verified bool `json:"verified"` } `json:"identity"` OtpDevices []struct { ID string `json:"id"` Type string `json:"type"` Label string `json:"label"` Verified bool `json:"verified"` } `json:"otpDevices"` RateLimits struct { } `json:"rateLimits"` DisableReset2FA bool `json:"disableReset2FA"` Currency struct { Currency string `json:"currency"` BitcoinUnit string `json:"bitcoinUnit"` } `json:"currency"` Timezone string `json:"timezone"` IsActive bool `json:"isActive"` EcdhKeychain string `json:"ecdhKeychain"` Referrer struct { } `json:"referrer"` Apps struct { Coinbase struct { } `json:"coinbase"` } `json:"apps"` ForceResetPassword bool `json:"forceResetPassword"` AllowedCoins []interface{} `json:"allowedCoins"` Agreements struct { TermsOfUse int `json:"termsOfUse"` TermsOfUseAcceptanceDate time.Time `json:"termsOfUseAcceptanceDate"` } `json:"agreements"` LastLogin time.Time `json:"lastLogin"` Enterprises []struct { ID string `json:"id"` } `json:"enterprises"` } `json:"user"` EncryptedToken string `json:"encryptedToken"` DerivationPath string `json:"derivationPath"` EncryptedECDHXprv string `json:"encryptedECDHXprv"` AccessToken string `json:"access_token"` }
type TotalBalances ¶
type TotalBalances struct { Balance int `json:"balance"` BalanceString string `json:"balanceString"` ConfirmedBalance int `json:"confirmedBalance"` ConfirmedBalanceString string `json:"confirmedBalanceString"` SpendableBalance int `json:"spendableBalance"` SpendableBalanceString string `json:"spendableBalanceString"` }
type Transaction ¶
type Transaction struct { TxHex string `json:"txHex"` TxInfo struct { NP2SHInputs int `json:"nP2SHInputs"` NSegwitInputs int `json:"nSegwitInputs"` NOutputs int `json:"nOutputs"` Unspents []struct { Chain int `json:"chain"` Index int `json:"index"` RedeemScript string `json:"redeemScript"` ID string `json:"id"` Address string `json:"address"` Value int `json:"value"` } `json:"unspents"` ChangeAddresses []string `json:"changeAddresses"` } `json:"txInfo"` FeeInfo struct { Size int `json:"size"` Fee int `json:"fee"` FeeRate int `json:"feeRate"` PayGoFee int `json:"payGoFee"` PayGoFeeString string `json:"payGoFeeString"` } `json:"feeInfo"` }
type TransactionDescription ¶
type TransactionFees ¶
type Transfer ¶
type Transfer struct { ID string `json:"id"` Coin string `json:"coin"` Wallet string `json:"wallet"` Txid string `json:"txid"` Height int `json:"height"` Date time.Time `json:"date"` Confirmations int `json:"confirmations"` Value int `json:"value"` BitgoFee int `json:"bitgoFee"` Usd float64 `json:"usd"` UsdRate float64 `json:"usdRate"` State string `json:"state"` VSize int `json:"vSize"` NSegwitInputs int `json:"nSegwitInputs"` Tags []string `json:"tags"` SequenceID string `json:"sequenceId"` History []struct { Date time.Time `json:"date"` Action string `json:"action"` } `json:"history"` Entries []struct { Address string `json:"address"` Value int `json:"value"` Wallet string `json:"wallet,omitempty"` } `json:"entries"` Outputs []struct { ID string `json:"id"` Address string `json:"address"` Value int `json:"value"` ValueString string `json:"valueString"` Wallet string `json:"wallet"` Chain int `json:"chain"` Index int `json:"index"` } `json:"outputs"` Inputs []struct { ID string `json:"id"` Address string `json:"address"` Value int `json:"value"` ValueString string `json:"valueString"` Wallet string `json:"wallet"` Chain int `json:"chain"` Index int `json:"index"` } `json:"inputs"` ConfirmedTime time.Time `json:"confirmedTime"` CreatedTime time.Time `json:"createdTime"` }
type TransferList ¶
type UnlockParams ¶
type UpdateWalletAddressParams ¶
type UpdateWalletAddressParams struct {
Label string `json:"label,omitempty"`
}
type UpdateWalletParams ¶
type UserProfile ¶
type Wallet ¶
type Wallet struct { ID string `json:"id"` Users []struct { User string `json:"user"` Permissions []string `json:"permissions"` } `json:"users"` Coin string `json:"coin"` Label string `json:"label"` M int `json:"m"` N int `json:"n"` Keys []string `json:"keys"` Tags []string `json:"tags"` DisableTransactionNotifications bool `json:"disableTransactionNotifications"` Freeze struct { } `json:"freeze"` Deleted bool `json:"deleted"` ApprovalsRequired int `json:"approvalsRequired"` CoinSpecific struct { } `json:"coinSpecific"` Balance int `json:"balance"` ConfirmedBalance int `json:"confirmedBalance"` SpendableBalance int `json:"spendableBalance"` BalanceString string `json:"balanceString"` ConfirmedBalanceString string `json:"confirmedBalanceString"` SpendableBalanceString string `json:"spendableBalanceString"` ReceiveAddress struct { Address string `json:"address"` Chain int `json:"chain"` Index int `json:"index"` Coin string `json:"coin"` Wallet string `json:"wallet"` CoinSpecific struct { RedeemScript string `json:"redeemScript"` } `json:"coinSpecific"` } `json:"receiveAddress"` Admin struct { Policy struct { ID string `json:"id"` Label string `json:"label"` Version int `json:"version"` Date time.Time `json:"date"` Rules []struct { ID string `json:"id"` Coin string `json:"coin"` Type string `json:"type"` Action struct { Type string `json:"type"` } `json:"action"` Condition struct { AmountString string `json:"amountString"` TimeWindow int `json:"timeWindow"` GroupTags []string `json:"groupTags"` ExcludeTags []interface{} `json:"excludeTags"` } `json:"condition"` } `json:"rules"` } `json:"policy"` } `json:"admin"` }
type WebhookEvent ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.