Documentation ¶
Index ¶
- Variables
- type AccountManagementMetadata
- type EstablishRelationshipMetadata
- type ExternalDepositMetadata
- type LoginMetadata
- type MigrateToPrivacy2022Metadata
- type MoneyTransferMetadata
- type OpenAccountsMetadata
- type ReceivePaymentsPrivatelyMetadata
- type ReceivePaymentsPubliclyMetadata
- type Record
- type SaveRecentRootMetadata
- type SendPrivatePaymentMetadata
- type SendPublicPaymentMetadata
- type State
- type Store
- type TipMetadata
- type Type
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AccountManagementMetadata ¶
type AccountManagementMetadata struct {
TokenAccount string
}
func (*AccountManagementMetadata) Clone ¶
func (m *AccountManagementMetadata) Clone() AccountManagementMetadata
func (*AccountManagementMetadata) CopyTo ¶
func (m *AccountManagementMetadata) CopyTo(dst *AccountManagementMetadata)
func (*AccountManagementMetadata) Validate ¶
func (m *AccountManagementMetadata) Validate() error
type EstablishRelationshipMetadata ¶
type EstablishRelationshipMetadata struct {
RelationshipTo string
}
func (*EstablishRelationshipMetadata) Clone ¶
func (m *EstablishRelationshipMetadata) Clone() EstablishRelationshipMetadata
func (*EstablishRelationshipMetadata) CopyTo ¶
func (m *EstablishRelationshipMetadata) CopyTo(dst *EstablishRelationshipMetadata)
func (*EstablishRelationshipMetadata) Validate ¶
func (m *EstablishRelationshipMetadata) Validate() error
type ExternalDepositMetadata ¶
type ExternalDepositMetadata struct { DestinationOwnerAccount string DestinationTokenAccount string Quantity uint64 UsdMarketValue float64 }
func (*ExternalDepositMetadata) Clone ¶
func (m *ExternalDepositMetadata) Clone() ExternalDepositMetadata
func (*ExternalDepositMetadata) CopyTo ¶
func (m *ExternalDepositMetadata) CopyTo(dst *ExternalDepositMetadata)
func (*ExternalDepositMetadata) Validate ¶
func (m *ExternalDepositMetadata) Validate() error
type LoginMetadata ¶ added in v1.2.0
func (*LoginMetadata) Clone ¶ added in v1.2.0
func (m *LoginMetadata) Clone() LoginMetadata
func (*LoginMetadata) CopyTo ¶ added in v1.2.0
func (m *LoginMetadata) CopyTo(dst *LoginMetadata)
func (*LoginMetadata) Validate ¶ added in v1.2.0
func (m *LoginMetadata) Validate() error
type MigrateToPrivacy2022Metadata ¶
type MigrateToPrivacy2022Metadata struct {
Quantity uint64
}
func (*MigrateToPrivacy2022Metadata) Clone ¶
func (m *MigrateToPrivacy2022Metadata) Clone() MigrateToPrivacy2022Metadata
func (*MigrateToPrivacy2022Metadata) CopyTo ¶
func (m *MigrateToPrivacy2022Metadata) CopyTo(dst *MigrateToPrivacy2022Metadata)
func (*MigrateToPrivacy2022Metadata) Validate ¶
func (m *MigrateToPrivacy2022Metadata) Validate() error
type MoneyTransferMetadata ¶
type MoneyTransferMetadata struct { Source string Destination string Quantity uint64 ExchangeCurrency currency.Code ExchangeRate float64 UsdMarketValue float64 IsWithdrawal bool }
func (*MoneyTransferMetadata) Clone ¶
func (m *MoneyTransferMetadata) Clone() MoneyTransferMetadata
func (*MoneyTransferMetadata) CopyTo ¶
func (m *MoneyTransferMetadata) CopyTo(dst *MoneyTransferMetadata)
func (*MoneyTransferMetadata) Validate ¶
func (m *MoneyTransferMetadata) Validate() error
type OpenAccountsMetadata ¶
type OpenAccountsMetadata struct { }
func (*OpenAccountsMetadata) Clone ¶
func (m *OpenAccountsMetadata) Clone() OpenAccountsMetadata
func (*OpenAccountsMetadata) CopyTo ¶
func (m *OpenAccountsMetadata) CopyTo(dst *OpenAccountsMetadata)
func (*OpenAccountsMetadata) Validate ¶
func (m *OpenAccountsMetadata) Validate() error
type ReceivePaymentsPrivatelyMetadata ¶
type ReceivePaymentsPrivatelyMetadata struct { Source string Quantity uint64 IsDeposit bool UsdMarketValue float64 }
func (*ReceivePaymentsPrivatelyMetadata) Clone ¶
func (m *ReceivePaymentsPrivatelyMetadata) Clone() ReceivePaymentsPrivatelyMetadata
func (*ReceivePaymentsPrivatelyMetadata) CopyTo ¶
func (m *ReceivePaymentsPrivatelyMetadata) CopyTo(dst *ReceivePaymentsPrivatelyMetadata)
func (*ReceivePaymentsPrivatelyMetadata) Validate ¶
func (m *ReceivePaymentsPrivatelyMetadata) Validate() error
type ReceivePaymentsPubliclyMetadata ¶
type ReceivePaymentsPubliclyMetadata struct { Source string Quantity uint64 IsRemoteSend bool IsReturned bool IsIssuerVoidingGiftCard bool // Because remote send history isn't directly linked to the send. It's ok, because // we'd expect a single payment per gift card ok (unlike temporary incoming that // can receive many times and this metadata would be much more harder for the private // receive). // // todo: A better approach? OriginalExchangeCurrency currency.Code OriginalExchangeRate float64 OriginalNativeAmount float64 UsdMarketValue float64 }
func (*ReceivePaymentsPubliclyMetadata) Clone ¶
func (m *ReceivePaymentsPubliclyMetadata) Clone() ReceivePaymentsPubliclyMetadata
func (*ReceivePaymentsPubliclyMetadata) CopyTo ¶
func (m *ReceivePaymentsPubliclyMetadata) CopyTo(dst *ReceivePaymentsPubliclyMetadata)
func (*ReceivePaymentsPubliclyMetadata) Validate ¶
func (m *ReceivePaymentsPubliclyMetadata) Validate() error
type Record ¶
type Record struct { Id uint64 IntentId string IntentType Type InitiatorOwnerAccount string InitiatorPhoneNumber *string // Intents v2 metadatum OpenAccountsMetadata *OpenAccountsMetadata SendPrivatePaymentMetadata *SendPrivatePaymentMetadata ReceivePaymentsPrivatelyMetadata *ReceivePaymentsPrivatelyMetadata SaveRecentRootMetadata *SaveRecentRootMetadata MigrateToPrivacy2022Metadata *MigrateToPrivacy2022Metadata ExternalDepositMetadata *ExternalDepositMetadata SendPublicPaymentMetadata *SendPublicPaymentMetadata ReceivePaymentsPubliclyMetadata *ReceivePaymentsPubliclyMetadata EstablishRelationshipMetadata *EstablishRelationshipMetadata LoginMetadata *LoginMetadata // Deprecated intents v1 metadatum MoneyTransferMetadata *MoneyTransferMetadata AccountManagementMetadata *AccountManagementMetadata State State CreatedAt time.Time }
func (*Record) IsCompleted ¶
type SaveRecentRootMetadata ¶
func (*SaveRecentRootMetadata) Clone ¶
func (m *SaveRecentRootMetadata) Clone() SaveRecentRootMetadata
func (*SaveRecentRootMetadata) CopyTo ¶
func (m *SaveRecentRootMetadata) CopyTo(dst *SaveRecentRootMetadata)
func (*SaveRecentRootMetadata) Validate ¶
func (m *SaveRecentRootMetadata) Validate() error
type SendPrivatePaymentMetadata ¶
type SendPrivatePaymentMetadata struct { DestinationOwnerAccount string DestinationTokenAccount string Quantity uint64 ExchangeCurrency currency.Code ExchangeRate float64 NativeAmount float64 UsdMarketValue float64 IsWithdrawal bool IsRemoteSend bool IsMicroPayment bool IsTip bool // Set when IsTip = true TipMetadata *TipMetadata }
func (*SendPrivatePaymentMetadata) Clone ¶
func (m *SendPrivatePaymentMetadata) Clone() SendPrivatePaymentMetadata
func (*SendPrivatePaymentMetadata) CopyTo ¶
func (m *SendPrivatePaymentMetadata) CopyTo(dst *SendPrivatePaymentMetadata)
func (*SendPrivatePaymentMetadata) Validate ¶
func (m *SendPrivatePaymentMetadata) Validate() error
type SendPublicPaymentMetadata ¶
type SendPublicPaymentMetadata struct { DestinationOwnerAccount string DestinationTokenAccount string Quantity uint64 ExchangeCurrency currency.Code ExchangeRate float64 NativeAmount float64 UsdMarketValue float64 IsWithdrawal bool }
func (*SendPublicPaymentMetadata) Clone ¶
func (m *SendPublicPaymentMetadata) Clone() SendPublicPaymentMetadata
func (*SendPublicPaymentMetadata) CopyTo ¶
func (m *SendPublicPaymentMetadata) CopyTo(dst *SendPublicPaymentMetadata)
func (*SendPublicPaymentMetadata) Validate ¶
func (m *SendPublicPaymentMetadata) Validate() error
type Store ¶
type Store interface { // Save creates or updates an intent on the store. Save(ctx context.Context, record *Record) error // Get finds the intent record for a given intent ID. // // Returns ErrNotFound if no record is found. Get(ctx context.Context, intentID string) (*Record, error) // GetAllByOwner returns all records for a given owner (as both a source and destination). // // Returns ErrNotFound if no records are found. GetAllByOwner(ctx context.Context, owner string, cursor query.Cursor, limit uint64, direction query.Ordering) ([]*Record, error) // GetLatestByInitiatorAndType gets the latest record by initiating owner and intent type // // Returns ErrNotFound if no records are found. GetLatestByInitiatorAndType(ctx context.Context, intentType Type, owner string) (*Record, error) // CountForAntispam gets a count of intents for antispam purposes. It calculates the // number of intents by type and state for a phone number since a timestamp. CountForAntispam(ctx context.Context, intentType Type, phoneNumber string, states []State, since time.Time) (uint64, error) // CountOwnerInteractionsForAntispam gets a count of intents for antispam purposes. It // calculates the number of times a source owner is involved in an intent with the // destination owner since a timestamp. CountOwnerInteractionsForAntispam(ctx context.Context, sourceOwner, destinationOwner string, states []State, since time.Time) (uint64, error) // GetTransactedAmountForAntiMoneyLaundering gets the total transacted Kin in quarks and the // corresponding USD market value for a phone number since a timestamp. GetTransactedAmountForAntiMoneyLaundering(ctx context.Context, phoneNumber string, since time.Time) (uint64, float64, error) // GetDepositedAmountForAntiMoneyLaundering gets the total deposited Kin in quarks and the // corresponding USD market value for a phone number since a timestamp. GetDepositedAmountForAntiMoneyLaundering(ctx context.Context, phoneNumber string, since time.Time) (uint64, float64, error) // GetNetBalanceFromPrePrivacy2022Intents gets the net balance of Kin in quarks after appying // pre-privacy legacy payment intents when intents detailed the entirety of the payment. GetNetBalanceFromPrePrivacy2022Intents(ctx context.Context, account string) (int64, error) // GetLatestSaveRecentRootIntentForTreasury gets the latest SaveRecentRoot intent for a treasury GetLatestSaveRecentRootIntentForTreasury(ctx context.Context, treasury string) (*Record, error) // GetOriginalGiftCardIssuedIntent gets the original intent where a gift card // was issued by its vault address. GetOriginalGiftCardIssuedIntent(ctx context.Context, giftCardVault string) (*Record, error) // GetGiftCardClaimedIntent gets the intent where a gift card was claimed by its // vault address. GetGiftCardClaimedIntent(ctx context.Context, giftCardVault string) (*Record, error) }
type TipMetadata ¶ added in v1.10.0
type TipMetadata struct { Platform transactionpb.TippedUser_Platform Username string }
Click to show internal directories.
Click to hide internal directories.