Documentation ¶
Index ¶
- Constants
- Variables
- func BundleProtocol(i BundleInterface) rpc.Protocol
- func CommonProtocol(i CommonInterface) rpc.Protocol
- func LocalProtocol(i LocalInterface) rpc.Protocol
- func RemoteProtocol(i RemoteInterface) rpc.Protocol
- type AccountID
- type AccountMode
- type Asset
- type Balance
- type BalancesArg
- type BalancesLocalArg
- type Bundle
- type BundleClient
- type BundleEntry
- type BundleInterface
- type BundleRevision
- type BundleSecretEntry
- type BundleSecretV1
- type BundleSecretVersioned
- type BundleVersion
- type BundleVisibleEntry
- type BundleVisibleV1
- type CommonClient
- type CommonInterface
- type EncryptedBundle
- type EncryptedNote
- type Hash
- type ImportSecretKeyLocalArg
- type KeybaseTransactionID
- type LocalClient
- func (c LocalClient) BalancesLocal(ctx context.Context, accountID AccountID) (res []Balance, err error)
- func (c LocalClient) ImportSecretKeyLocal(ctx context.Context, __arg ImportSecretKeyLocalArg) (err error)
- func (c LocalClient) OwnAccountLocal(ctx context.Context, accountID AccountID) (res bool, err error)
- func (c LocalClient) SendLocal(ctx context.Context, __arg SendLocalArg) (res PaymentResult, err error)
- func (c LocalClient) WalletDumpLocal(ctx context.Context) (res Bundle, err error)
- func (c LocalClient) WalletInitLocal(ctx context.Context) (err error)
- type LocalInterface
- type Members
- type Operation
- type OwnAccountLocalArg
- type PaymentPost
- type PaymentResult
- type RecentTransactionsArg
- type RemoteClient
- func (c RemoteClient) Balances(ctx context.Context, __arg BalancesArg) (res []Balance, err error)
- func (c RemoteClient) RecentTransactions(ctx context.Context, __arg RecentTransactionsArg) (res []TransactionSummary, err error)
- func (c RemoteClient) SubmitPayment(ctx context.Context, __arg SubmitPaymentArg) (res PaymentResult, err error)
- func (c RemoteClient) Transaction(ctx context.Context, __arg TransactionArg) (res TransactionDetails, err error)
- type RemoteInterface
- type SecretKey
- type SendLocalArg
- type SubmitPaymentArg
- type TimeMs
- type TransactionArg
- type TransactionDetails
- type TransactionID
- type TransactionStatus
- type TransactionSummary
- type WalletDumpLocalArg
- type WalletInitLocalArg
Constants ¶
View Source
const ( KeybaseTransactionIDLen = 16 KeybaseTransactionIDSuffix = 0x30 KeybaseTransactionIDSuffixHex = "30" )
Variables ¶
View Source
var AccountModeMap = map[string]AccountMode{
"NONE": 0,
"USER": 1,
}
View Source
var AccountModeRevMap = map[AccountMode]string{
0: "NONE",
1: "USER",
}
View Source
var BundleVersionMap = map[string]BundleVersion{
"V1": 1,
}
View Source
var BundleVersionRevMap = map[BundleVersion]string{
1: "V1",
}
View Source
var TransactionStatusMap = map[string]TransactionStatus{
"NONE": 0,
"PENDING": 1,
"SUCCESS": 2,
"ERROR_TRANSIENT": 3,
"ERROR_PERMANENT": 4,
}
View Source
var TransactionStatusRevMap = map[TransactionStatus]string{
0: "NONE",
1: "PENDING",
2: "SUCCESS",
3: "ERROR_TRANSIENT",
4: "ERROR_PERMANENT",
}
Functions ¶
func BundleProtocol ¶ added in v1.0.47
func BundleProtocol(i BundleInterface) rpc.Protocol
func CommonProtocol ¶
func CommonProtocol(i CommonInterface) rpc.Protocol
func LocalProtocol ¶
func LocalProtocol(i LocalInterface) rpc.Protocol
func RemoteProtocol ¶
func RemoteProtocol(i RemoteInterface) rpc.Protocol
Types ¶
type AccountMode ¶ added in v1.0.47
type AccountMode int
const ( AccountMode_NONE AccountMode = 0 AccountMode_USER AccountMode = 1 )
func (AccountMode) DeepCopy ¶ added in v1.0.47
func (o AccountMode) DeepCopy() AccountMode
func (AccountMode) String ¶ added in v1.0.47
func (e AccountMode) String() string
type Asset ¶
type Balance ¶
type BalancesArg ¶
type BalancesLocalArg ¶
type BalancesLocalArg struct {
AccountID AccountID `codec:"accountID" json:"accountID"`
}
type Bundle ¶ added in v1.0.47
type Bundle struct { Revision BundleRevision `codec:"revision" json:"revision"` Prev Hash `codec:"prev" json:"prev"` OwnHash Hash `codec:"ownHash" json:"ownHash"` Accounts []BundleEntry `codec:"accounts" json:"accounts"` }
func (Bundle) CheckInvariants ¶ added in v1.0.47
CheckInvariants checks that the bundle satisfies 1. No duplicate account IDs 2. At most one primary account
func (Bundle) PrimaryAccount ¶ added in v1.0.47
func (s Bundle) PrimaryAccount() (BundleEntry, error)
type BundleClient ¶ added in v1.0.47
type BundleClient struct {
Cli rpc.GenericClient
}
type BundleEntry ¶ added in v1.0.47
type BundleEntry struct { AccountID AccountID `codec:"accountID" json:"accountID"` Mode AccountMode `codec:"mode" json:"mode"` IsPrimary bool `codec:"isPrimary" json:"isPrimary"` Signers []SecretKey `codec:"signers" json:"signers"` Name string `codec:"name" json:"name"` }
func (BundleEntry) DeepCopy ¶ added in v1.0.47
func (o BundleEntry) DeepCopy() BundleEntry
type BundleInterface ¶ added in v1.0.47
type BundleInterface interface { }
type BundleRevision ¶ added in v1.0.47
type BundleRevision uint64
func (BundleRevision) DeepCopy ¶ added in v1.0.47
func (o BundleRevision) DeepCopy() BundleRevision
type BundleSecretEntry ¶ added in v1.0.47
type BundleSecretEntry struct { AccountID AccountID `codec:"accountID" json:"accountID"` Signers []SecretKey `codec:"signers" json:"signers"` Name string `codec:"name" json:"name"` }
func (BundleSecretEntry) DeepCopy ¶ added in v1.0.47
func (o BundleSecretEntry) DeepCopy() BundleSecretEntry
type BundleSecretV1 ¶ added in v1.0.47
type BundleSecretV1 struct { VisibleHash Hash `codec:"visibleHash" json:"visibleHash"` Accounts []BundleSecretEntry `codec:"accounts" json:"accounts"` }
func (BundleSecretV1) DeepCopy ¶ added in v1.0.47
func (o BundleSecretV1) DeepCopy() BundleSecretV1
type BundleSecretVersioned ¶ added in v1.0.47
type BundleSecretVersioned struct { Version__ BundleVersion `codec:"version" json:"version"` V1__ *BundleSecretV1 `codec:"v1,omitempty" json:"v1,omitempty"` }
func NewBundleSecretVersionedWithV1 ¶ added in v1.0.47
func NewBundleSecretVersionedWithV1(v BundleSecretV1) BundleSecretVersioned
func (BundleSecretVersioned) DeepCopy ¶ added in v1.0.47
func (o BundleSecretVersioned) DeepCopy() BundleSecretVersioned
func (BundleSecretVersioned) V1 ¶ added in v1.0.47
func (o BundleSecretVersioned) V1() (res BundleSecretV1)
func (*BundleSecretVersioned) Version ¶ added in v1.0.47
func (o *BundleSecretVersioned) Version() (ret BundleVersion, err error)
type BundleVersion ¶ added in v1.0.47
type BundleVersion int
const (
BundleVersion_V1 BundleVersion = 1
)
func (BundleVersion) DeepCopy ¶ added in v1.0.47
func (o BundleVersion) DeepCopy() BundleVersion
func (BundleVersion) String ¶ added in v1.0.47
func (e BundleVersion) String() string
type BundleVisibleEntry ¶ added in v1.0.47
type BundleVisibleEntry struct { AccountID AccountID `codec:"accountID" json:"accountID"` Mode AccountMode `codec:"mode" json:"mode"` IsPrimary bool `codec:"isPrimary" json:"isPrimary"` }
func (BundleVisibleEntry) DeepCopy ¶ added in v1.0.47
func (o BundleVisibleEntry) DeepCopy() BundleVisibleEntry
type BundleVisibleV1 ¶ added in v1.0.47
type BundleVisibleV1 struct { Revision BundleRevision `codec:"revision" json:"revision"` Prev Hash `codec:"prev" json:"prev"` Accounts []BundleVisibleEntry `codec:"accounts" json:"accounts"` }
func (BundleVisibleV1) DeepCopy ¶ added in v1.0.47
func (o BundleVisibleV1) DeepCopy() BundleVisibleV1
type CommonClient ¶
type CommonClient struct {
Cli rpc.GenericClient
}
type CommonInterface ¶
type CommonInterface interface { }
type EncryptedBundle ¶ added in v1.0.47
type EncryptedBundle struct { V int `codec:"v" json:"v"` E []byte `codec:"e" json:"e"` N keybase1.BoxNonce `codec:"n" json:"n"` Gen keybase1.PerUserKeyGeneration `codec:"gen" json:"gen"` }
func (EncryptedBundle) DeepCopy ¶ added in v1.0.47
func (o EncryptedBundle) DeepCopy() EncryptedBundle
type EncryptedNote ¶
type EncryptedNote struct { V int `codec:"v" json:"v"` E []byte `codec:"e" json:"e"` N []byte `codec:"n" json:"n"` KID keybase1.KID `codec:"KID" json:"KID"` }
func (EncryptedNote) DeepCopy ¶
func (o EncryptedNote) DeepCopy() EncryptedNote
type ImportSecretKeyLocalArg ¶ added in v1.0.47
type KeybaseTransactionID ¶
type KeybaseTransactionID string
func KeybaseTransactionIDFromString ¶
func KeybaseTransactionIDFromString(s string) (KeybaseTransactionID, error)
func (KeybaseTransactionID) DeepCopy ¶
func (o KeybaseTransactionID) DeepCopy() KeybaseTransactionID
func (KeybaseTransactionID) String ¶
func (k KeybaseTransactionID) String() string
type LocalClient ¶
type LocalClient struct {
Cli rpc.GenericClient
}
func (LocalClient) BalancesLocal ¶
func (LocalClient) ImportSecretKeyLocal ¶ added in v1.0.47
func (c LocalClient) ImportSecretKeyLocal(ctx context.Context, __arg ImportSecretKeyLocalArg) (err error)
func (LocalClient) OwnAccountLocal ¶ added in v1.0.47
func (LocalClient) SendLocal ¶ added in v1.0.47
func (c LocalClient) SendLocal(ctx context.Context, __arg SendLocalArg) (res PaymentResult, err error)
func (LocalClient) WalletDumpLocal ¶ added in v1.0.47
func (c LocalClient) WalletDumpLocal(ctx context.Context) (res Bundle, err error)
func (LocalClient) WalletInitLocal ¶ added in v1.0.47
func (c LocalClient) WalletInitLocal(ctx context.Context) (err error)
type LocalInterface ¶
type LocalInterface interface { BalancesLocal(context.Context, AccountID) ([]Balance, error) SendLocal(context.Context, SendLocalArg) (PaymentResult, error) WalletInitLocal(context.Context) error WalletDumpLocal(context.Context) (Bundle, error) OwnAccountLocal(context.Context, AccountID) (bool, error) ImportSecretKeyLocal(context.Context, ImportSecretKeyLocalArg) error }
type Members ¶
type Members struct { FromStellar AccountID `codec:"fromStellar" json:"fromStellar"` FromKeybase string `codec:"fromKeybase" json:"fromKeybase"` FromUID keybase1.UID `codec:"fromUID" json:"fromUID"` FromDeviceID keybase1.DeviceID `codec:"fromDeviceID" json:"fromDeviceID"` ToStellar AccountID `codec:"toStellar" json:"toStellar"` ToKeybase string `codec:"toKeybase" json:"toKeybase"` ToUID keybase1.UID `codec:"toUID" json:"toUID"` }
type Operation ¶
type Operation struct { ID string `codec:"ID" json:"ID"` OpType string `codec:"opType" json:"opType"` CreatedAt int `codec:"createdAt" json:"createdAt"` TransactionHash string `codec:"TransactionHash" json:"TransactionHash"` Asset Asset `codec:"asset" json:"asset"` Amount string `codec:"amount" json:"amount"` }
type OwnAccountLocalArg ¶ added in v1.0.47
type OwnAccountLocalArg struct {
AccountID AccountID `codec:"accountID" json:"accountID"`
}
type PaymentPost ¶
type PaymentPost struct { StellarAccountSeqno uint64 `codec:"stellarAccountSeqno" json:"stellarAccountSeqno"` Members Members `codec:"members" json:"members"` DisplayAmount string `codec:"displayAmount" json:"displayAmount"` DisplayCurrency string `codec:"displayCurrency" json:"displayCurrency"` Note EncryptedNote `codec:"note" json:"note"` SignedTransaction string `codec:"signedTransaction" json:"signedTransaction"` }
func (PaymentPost) DeepCopy ¶
func (o PaymentPost) DeepCopy() PaymentPost
type PaymentResult ¶
type PaymentResult struct { StellarID TransactionID `codec:"stellarID" json:"stellarID"` KeybaseID KeybaseTransactionID `codec:"keybaseID" json:"keybaseID"` Ledger int `codec:"Ledger" json:"Ledger"` }
func (PaymentResult) DeepCopy ¶
func (o PaymentResult) DeepCopy() PaymentResult
type RecentTransactionsArg ¶
type RemoteClient ¶
type RemoteClient struct {
Cli rpc.GenericClient
}
func (RemoteClient) Balances ¶
func (c RemoteClient) Balances(ctx context.Context, __arg BalancesArg) (res []Balance, err error)
func (RemoteClient) RecentTransactions ¶
func (c RemoteClient) RecentTransactions(ctx context.Context, __arg RecentTransactionsArg) (res []TransactionSummary, err error)
func (RemoteClient) SubmitPayment ¶
func (c RemoteClient) SubmitPayment(ctx context.Context, __arg SubmitPaymentArg) (res PaymentResult, err error)
func (RemoteClient) Transaction ¶
func (c RemoteClient) Transaction(ctx context.Context, __arg TransactionArg) (res TransactionDetails, err error)
type RemoteInterface ¶
type RemoteInterface interface { Balances(context.Context, BalancesArg) ([]Balance, error) RecentTransactions(context.Context, RecentTransactionsArg) ([]TransactionSummary, error) Transaction(context.Context, TransactionArg) (TransactionDetails, error) SubmitPayment(context.Context, SubmitPaymentArg) (PaymentResult, error) }
type SecretKey ¶ added in v1.0.47
type SecretKey string
func (SecretKey) SecureNoLogString ¶ added in v1.0.47
type SendLocalArg ¶ added in v1.0.47
type SubmitPaymentArg ¶
type SubmitPaymentArg struct { Uid keybase1.UID `codec:"uid" json:"uid"` Payment PaymentPost `codec:"payment" json:"payment"` }
type TransactionArg ¶
type TransactionArg struct { Uid keybase1.UID `codec:"uid" json:"uid"` Id TransactionID `codec:"id" json:"id"` }
type TransactionDetails ¶
type TransactionDetails struct { StellarID TransactionID `codec:"stellarID" json:"stellarID"` KeybaseID KeybaseTransactionID `codec:"keybaseID" json:"keybaseID"` Hash string `codec:"Hash" json:"Hash"` Ledger int `codec:"ledger" json:"ledger"` LedgerCloseTime int `codec:"ledgerCloseTime" json:"ledgerCloseTime"` SourceAccount AccountID `codec:"sourceAccount" json:"sourceAccount"` SourceAccountSequence string `codec:"sourceAccountSequence" json:"sourceAccountSequence"` FeePaid int `codec:"feePaid" json:"feePaid"` Members Members `codec:"members" json:"members"` Note EncryptedNote `codec:"note" json:"note"` Signatures []string `codec:"signatures" json:"signatures"` Operations []Operation `codec:"operations" json:"operations"` Ctime TimeMs `codec:"ctime" json:"ctime"` }
func (TransactionDetails) DeepCopy ¶
func (o TransactionDetails) DeepCopy() TransactionDetails
type TransactionID ¶
type TransactionID string
func (TransactionID) DeepCopy ¶
func (o TransactionID) DeepCopy() TransactionID
type TransactionStatus ¶
type TransactionStatus int
const ( TransactionStatus_NONE TransactionStatus = 0 TransactionStatus_PENDING TransactionStatus = 1 TransactionStatus_SUCCESS TransactionStatus = 2 TransactionStatus_ERROR_TRANSIENT TransactionStatus = 3 TransactionStatus_ERROR_PERMANENT TransactionStatus = 4 )
func (TransactionStatus) DeepCopy ¶
func (o TransactionStatus) DeepCopy() TransactionStatus
func (TransactionStatus) String ¶
func (e TransactionStatus) String() string
type TransactionSummary ¶
type TransactionSummary struct { StellarID TransactionID `codec:"stellarID" json:"stellarID"` KeybaseID KeybaseTransactionID `codec:"keybaseID" json:"keybaseID"` Status TransactionStatus `codec:"status" json:"status"` ErrMsg string `codec:"errMsg" json:"errMsg"` Note EncryptedNote `codec:"note" json:"note"` Asset Asset `codec:"asset" json:"asset"` Amount string `codec:"amount" json:"amount"` DisplayAmount string `codec:"displayAmount" json:"displayAmount"` DisplayCurrency string `codec:"displayCurrency" json:"displayCurrency"` Members Members `codec:"members" json:"members"` Ctime TimeMs `codec:"ctime" json:"ctime"` Rtime TimeMs `codec:"rtime" json:"rtime"` }
func (TransactionSummary) DeepCopy ¶
func (o TransactionSummary) DeepCopy() TransactionSummary
type WalletDumpLocalArg ¶ added in v1.0.47
type WalletDumpLocalArg struct { }
type WalletInitLocalArg ¶ added in v1.0.47
type WalletInitLocalArg struct { }
Click to show internal directories.
Click to hide internal directories.