Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Antispam ¶
type Antispam interface {
AllowOpenAccounts(ctx context.Context, owner *common.Account, accountSet transactionpb.OpenAccountsMetadata_AccountSet) (bool, string, error)
AllowSendPayment(ctx context.Context, owner, destination *common.Account, isPublic bool) (bool, string, error)
AllowReceivePayments(ctx context.Context, owner *common.Account, isPublic bool) (bool, string, error)
AllowDistribution(ctx context.Context, owner *common.Account, isPublic bool) (bool, string, error)
AllowSwap(ctx context.Context, fundingSource swap.FundingSource, owner, fromMint, toMint *common.Account, amount uint64, initializesMint bool) (bool, string, error)
AllowCurrencyLaunch(ctx context.Context, owner *common.Account, name, symbol string) (bool, string, error)
}
Antispam is an antispam guard integration that apps can implement to check whether operations of interest are allowed to be performed.
func NewAllowEverythingAntispamIntegration ¶
func NewAllowEverythingAntispamIntegration() Antispam
NewAllowEverythingAntispamIntegration returns a default antispam integration that allows everything
type Geyser ¶
type Geyser interface {
// OnDepositReceived allows for notifications for external deposits processed by Geyser
OnDepositReceived(ctx context.Context, owner, mint *common.Account, currencyName string, usdMarketValue float64) error
}
Swap is an integration that hooks into the Geyser worker
type Moderation ¶
type Moderation interface {
// ValidateAttestation validates a moderation attestation for a piece of moderated content
ValidateAttestation(ctx context.Context, owner *common.Account, rawAttestation []byte, content any) (bool, error)
}
Moderation is an OCP integration enabling custom moderation rules
func NewAllowEverythingModerationIntegration ¶
func NewAllowEverythingModerationIntegration() Moderation
NewAllowEverythingModerationIntegration returns a default Moderation integration that allows everything
type SubmitIntent ¶
type SubmitIntent interface {
// AllowCreation determines whether the new intent creation should be allowed
// with app-specific validation rules
AllowCreation(ctx context.Context, intentRecord *intent.Record, metadata *transactionpb.Metadata, actions []*transactionpb.Action) error
// OnSuccess is a best-effort callback when an intent has been successfully
// submitted
OnSuccess(ctx context.Context, intentRecord *intent.Record) error
}
SubmitIntent is an integration that hooks into SubmitIntent
func NewDefaultSubmitIntentIntegration ¶
func NewDefaultSubmitIntentIntegration() SubmitIntent
NewDefaultSubmitIntentIntegration retuns a SubmitIntentIntegration that allows everything
type Swap ¶
type Swap interface {
// OnSwapFinalized allows for notifications based on events processed by the swap worker
OnSwapFinalized(ctx context.Context, owner *common.Account, isBuy bool, mint *common.Account, currencyName string, region currency.Code, valueReceived float64, isMintInit bool) error
}
Swap is an integration that hooks into the swap worker