stellar

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeAccountName

func ChangeAccountName(m libkb.MetaContext, accountID stellar1.AccountID, newName string) (err error)

func Claim

func Claim(ctx context.Context, g *libkb.GlobalContext, remoter remote.Remoter,
	txID string, into stellar1.AccountID) (res stellar1.RelayClaimResult, err error)

Claim claims a waiting relay.

func ConvertLocalToXLM

func ConvertLocalToXLM(localAmount string, rate stellar1.OutsideExchangeRate) (XLMAmount string, err error)

func ConvertXLMToOutside

func ConvertXLMToOutside(XLMAmount string, rate stellar1.OutsideExchangeRate) (localAmount string, err error)

func CreateWallet

func CreateWallet(ctx context.Context, g *libkb.GlobalContext) (created bool, err error)

CreateWallet creates and posts an initial stellar bundle for a user. Only succeeds if they do not already have one. Safe to call even if the user has a bundle already.

func CreateWalletGated

func CreateWalletGated(ctx context.Context, g *libkb.GlobalContext) (created bool, err error)

func CreateWalletSoft

func CreateWalletSoft(ctx context.Context, g *libkb.GlobalContext)

CreateWalletSoft creates a user's initial wallet if they don't already have one. Does not get in the way of intentional user actions.

func DeleteAccount

func DeleteAccount(m libkb.MetaContext, accountID stellar1.AccountID) error

func ExportSecretKey

func ExportSecretKey(ctx context.Context, g *libkb.GlobalContext, accountID stellar1.AccountID) (res stellar1.SecretKey, err error)

func FormatAmount

func FormatAmount(amount string, precisionTwo bool) (string, error)

func FormatAmountWithSuffix

func FormatAmountWithSuffix(amount string, precisionTwo bool, suffix string) (string, error)

func FormatAmountXLM

func FormatAmountXLM(amount string) (string, error)

func FormatCurrency

func FormatCurrency(ctx context.Context, g *libkb.GlobalContext, amount string, code stellar1.OutsideCurrencyCode) (string, error)

func FormatPaymentAmountXLM

func FormatPaymentAmountXLM(amount string, delta stellar1.BalanceDelta) (string, error)

func GetOwnPrimaryAccountID

func GetOwnPrimaryAccountID(ctx context.Context, g *libkb.GlobalContext) (res stellar1.AccountID, err error)

func ImportSecretKey

func ImportSecretKey(ctx context.Context, g *libkb.GlobalContext, secretKey stellar1.SecretKey, makePrimary bool, accountName string) (err error)

func LookupRecipient

TODO: handle stellar federation address rebecca*keybase.io (or rebecca*anything.wow)

func LookupSenderPrimary

func LookupSenderPrimary(ctx context.Context, g *libkb.GlobalContext) (stellar1.BundleEntry, error)

func NoteDecryptB64

func NoteDecryptB64(ctx context.Context, g *libkb.GlobalContext, noteB64 string) (res stellar1.NoteContents, err error)

func NoteEncryptB64

func NoteEncryptB64(ctx context.Context, g *libkb.GlobalContext, note stellar1.NoteContents, other *keybase1.UserVersion) (noteB64 string, err error)

func OwnAccount

func OwnAccount(ctx context.Context, g *libkb.GlobalContext, accountID stellar1.AccountID) (bool, error)

func PaymentDetailCLILocal

func PaymentDetailCLILocal(ctx context.Context, g *libkb.GlobalContext, remoter remote.Remoter, txID string) (res stellar1.PaymentCLILocal, err error)

func RecentPaymentsCLILocal

func RecentPaymentsCLILocal(ctx context.Context, g *libkb.GlobalContext, remoter remote.Remoter, accountID stellar1.AccountID) (res []stellar1.PaymentOrErrorCLILocal, err error)

func SendPayment

func SendPayment(m libkb.MetaContext, remoter remote.Remoter, to stellarcommon.RecipientInput, amount string, note string, displayBalance DisplayBalance, forceRelay bool) (res stellar1.SendResultCLILocal, err error)

SendPayment sends XLM `note` is optional. An empty string will not attach a note. Recipient: Stellar address : Standard payment User with wallet ready : Standard payment User without a wallet : Relay payment Unresolved assertion : Relay payment

func ServiceInit

func ServiceInit(g *libkb.GlobalContext)

func SetAccountAsPrimary

func SetAccountAsPrimary(m libkb.MetaContext, accountID stellar1.AccountID) (err error)

func Upkeep

func Upkeep(ctx context.Context, g *libkb.GlobalContext) (err error)

Upkeep makes sure the bundle is encrypted for the user's latest PUK.

Types

type DisplayBalance

type DisplayBalance struct {
	Amount   string
	Currency string
}

type SeqnoProvider

type SeqnoProvider struct {
	// contains filtered or unexported fields
}

SeqnoProvider implements build.SequenceProvider. It is intended as a one-shot wrapper and shouldn't be reused after the transaction is built.

func NewSeqnoProvider

func NewSeqnoProvider(ctx context.Context, remoter remote.Remoter) *SeqnoProvider

NewSeqnoProvider creates a SeqnoProvider.

func (*SeqnoProvider) SequenceForAccount

func (s *SeqnoProvider) SequenceForAccount(aid string) (xdr.SequenceNumber, error)

SequenceForAccount implements build.SequenceProvider.

type Stellar

type Stellar struct {
	libkb.Contextified
	// contains filtered or unexported fields
}

func NewStellar

func NewStellar(g *libkb.GlobalContext) *Stellar

func (*Stellar) CreateWalletGated

func (s *Stellar) CreateWalletGated(ctx context.Context) (bool, error)

func (*Stellar) CreateWalletSoft

func (s *Stellar) CreateWalletSoft(ctx context.Context)

func (*Stellar) GetServerDefinitions

func (s *Stellar) GetServerDefinitions(ctx context.Context) (ret stellar1.StellarServerDefinitions, err error)

func (*Stellar) OnLogout

func (s *Stellar) OnLogout()

func (*Stellar) Upkeep

func (s *Stellar) Upkeep(ctx context.Context) error

Directories

Path Synopsis
this file is for the implementation of all the frontend-requested service endpoints for wallets.
this file is for the implementation of all the frontend-requested service endpoints for wallets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL