 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
sequence-api v0.4.0 d43a5aac616814072c69e63f2f81fe65ea10a7e0 -- Code generated by webrpc-gen@v0.25.3 with golang generator. DO NOT EDIT.
webrpc-gen -schema=api.ridl -target=golang -pkg=api -client -out=./clients/api.gen.go
Index ¶
- Constants
- Variables
- func HTTPRequestHeaders(ctx context.Context) (http.Header, bool)
- func MethodCtx(ctx context.Context) (method, bool)
- func MethodNameFromContext(ctx context.Context) string
- func RequestFromContext(ctx context.Context) *http.Request
- func ServiceNameFromContext(ctx context.Context) string
- func WebRPCSchemaHash() string
- func WebRPCSchemaVersion() string
- func WebRPCVersion() string
- func WebrpcMethods() map[string]method
- func WithHTTPRequestHeaders(ctx context.Context, h http.Header) (context.Context, error)
- type API
- type APIClient
- type AddressOverrides
- type AdoptedChildWallet
- type CCTPTransfer
- type Call
- type ChainExecuteQuote
- type CheckoutOptionCrypto
- type CheckoutOptionNFTCheckoutProvider
- func (x *CheckoutOptionNFTCheckoutProvider) Is(values ...CheckoutOptionNFTCheckoutProvider) bool
- func (x CheckoutOptionNFTCheckoutProvider) MarshalText() ([]byte, error)
- func (x CheckoutOptionNFTCheckoutProvider) String() string
- func (x *CheckoutOptionNFTCheckoutProvider) UnmarshalText(b []byte) error
 
- type CheckoutOptionOnRampProvider
- type CheckoutOptionSwapProvider
- type CheckoutOptions
- type CheckoutOptionsPrimaryParams
- type CheckoutOptionsSecondaryParams
- type ContractCall
- type CrossChainFee
- type CurrencyGroup
- type CurrencyGroupToken
- type ExchangeRate
- type ExecuteQuote
- type FortePayBuyer
- type FortePayCreateIntent
- type FortePayIntent
- type FortePayItem
- type FortePayItemListingData
- type FortePayItemMintData
- type FortePayItemNFTData
- type FortePaySeller
- type FortePayWallet
- type FortePaymentStatus
- type Friend
- type GetLifiSwapQuoteParams
- type GetLifiSwapRouteDirection
- type GetLifiSwapRouteParams
- type HTTPClient
- type IntentCallsPayload
- type IntentConfig
- type IntentPrecondition
- type IntentQuote
- type InviteCode
- type InviteCodeAccount
- type InviteInfo
- type LifiSwapQuote
- type LifiSwapRoute
- type LifiToken
- type LinkedWallet
- type MetaTxn
- type MetaTxnFeeDetail
- type MetaTxnReceipt
- type NumTxnsRelayed
- type OffchainInventory
- type OffchainPayment
- type Options
- type OriginCall
- type Pack
- type PackContent
- type Page
- type PaymentResponse
- type Price
- type PublicKey
- type RuntimeChecks
- type RuntimeStatus
- type SardineEnabledToken
- type SardineFiatCurrency
- type SardineGetQuoteParams
- type SardineNFTCheckout
- type SardineNFTCheckoutParams
- type SardineOrder
- type SardinePaymentOption
- type SardinePaymentType
- type SardineQuote
- type SardineQuoteType
- type SardineRegion
- type SardineRegionPaymentMethod
- type SardineRegionState
- type SardineSupportedToken
- type SardineSupportedTokenForSwap
- type SequenceContext
- type SortBy
- type SortOrder
- type TakerFee
- type Token
- type TokenPrice
- type TokenType
- type TradeType
- type TrailsFee
- type TransakBuySell
- type TransakChain
- type TransakCountry
- type TransakCryptoCurrency
- type TransakCryptoCurrencyImage
- type TransakCryptoCurrencyNetwork
- type TransakCryptoCurrencyNetworkFiatNotSupported
- type TransakFiatCurrency
- type TransakFiatCurrencyPaymentOption
- type TransakGetPriceParams
- type TransakPartner
- type TransakPrice
- type TransakPriceFeeBreakdown
- type TransakState
- type TupleComponent
- type User
- type UserStorage
- type Version
- type WalletBackup
- type WebRPCError
- type WebrpcGenVersions
Constants ¶
const APIPathPrefix = "/rpc/API/"
    const DefaultAPIServiceURL = "https://api.sequence.app"
    const WebrpcHeader = "Webrpc"
    const WebrpcHeaderValue = "webrpc@v0.25.3;gen-golang@v0.18.4;sequence-api@v0.4.0"
    Variables ¶
var ( HTTPClientRequestHeadersCtxKey = &contextKey{"HTTPClientRequestHeaders"} HTTPRequestCtxKey = &contextKey{"HTTPRequest"} ServiceNameCtxKey = &contextKey{"ServiceName"} MethodNameCtxKey = &contextKey{"MethodName"} )
var ( ErrWebrpcEndpoint = WebRPCError{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400} ErrWebrpcRequestFailed = WebRPCError{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed", HTTPStatus: 400} ErrWebrpcBadRoute = WebRPCError{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404} ErrWebrpcBadMethod = WebRPCError{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405} ErrWebrpcBadRequest = WebRPCError{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400} ErrWebrpcBadResponse = WebRPCError{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500} ErrWebrpcServerPanic = WebRPCError{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500} ErrWebrpcInternalError = WebRPCError{Code: -7, Name: "WebrpcInternalError", Message: "internal error", HTTPStatus: 500} ErrWebrpcClientDisconnected = WebRPCError{Code: -8, Name: "WebrpcClientDisconnected", Message: "client disconnected", HTTPStatus: 400} ErrWebrpcStreamLost = WebRPCError{Code: -9, Name: "WebrpcStreamLost", Message: "stream lost", HTTPStatus: 400} ErrWebrpcStreamFinished = WebRPCError{Code: -10, Name: "WebrpcStreamFinished", Message: "stream finished", HTTPStatus: 200} )
Webrpc errors
var ( ErrPermissionDenied = WebRPCError{Code: 1001, Name: "PermissionDenied", Message: "Permission denied", HTTPStatus: 403} ErrSessionExpired = WebRPCError{Code: 1002, Name: "SessionExpired", Message: "Session expired", HTTPStatus: 403} ErrMethodNotFound = WebRPCError{Code: 1003, Name: "MethodNotFound", Message: "Method not found", HTTPStatus: 404} ErrRequestConflict = WebRPCError{Code: 1004, Name: "RequestConflict", Message: "Conflict with target resource", HTTPStatus: 409} ErrAborted = WebRPCError{Code: 1005, Name: "Aborted", Message: "Request aborted", HTTPStatus: 400} ErrGeoblocked = WebRPCError{Code: 1006, Name: "Geoblocked", Message: "Geoblocked region", HTTPStatus: 451} ErrRateLimited = WebRPCError{Code: 1007, Name: "RateLimited", Message: "Rate-limited. Please slow down.", HTTPStatus: 429} ErrProjectNotFound = WebRPCError{Code: 1008, Name: "ProjectNotFound", Message: "Project not found", HTTPStatus: 401} ErrAccessKeyNotFound = WebRPCError{Code: 1101, Name: "AccessKeyNotFound", Message: "Access key not found", HTTPStatus: 401} ErrAccessKeyMismatch = WebRPCError{Code: 1102, Name: "AccessKeyMismatch", Message: "Access key mismatch", HTTPStatus: 409} ErrInvalidOrigin = WebRPCError{Code: 1103, Name: "InvalidOrigin", Message: "Invalid origin for Access Key", HTTPStatus: 403} ErrInvalidService = WebRPCError{Code: 1104, Name: "InvalidService", Message: "Service not enabled for Access key", HTTPStatus: 403} ErrQuotaExceeded = WebRPCError{Code: 1200, Name: "QuotaExceeded", Message: "Quota request exceeded", HTTPStatus: 429} ErrQuotaRateLimit = WebRPCError{Code: 1201, Name: "QuotaRateLimit", Message: "Quota rate limit exceeded", HTTPStatus: 429} ErrNoDefaultKey = WebRPCError{Code: 1300, Name: "NoDefaultKey", Message: "No default access key found", HTTPStatus: 403} ErrMaxAccessKeys = WebRPCError{Code: 1301, Name: "MaxAccessKeys", Message: "Access keys limit reached", HTTPStatus: 403} ErrAtLeastOneKey = WebRPCError{Code: 1302, Name: "AtLeastOneKey", Message: "You need at least one Access Key", HTTPStatus: 403} ErrTimeout = WebRPCError{Code: 1900, Name: "Timeout", Message: "Request timed out", HTTPStatus: 408} ErrInvalidArgument = WebRPCError{Code: 2000, Name: "InvalidArgument", Message: "Invalid argument", HTTPStatus: 400} ErrQueryFailed = WebRPCError{Code: 2003, Name: "QueryFailed", Message: "Query failed", HTTPStatus: 400} ErrNotFound = WebRPCError{Code: 3000, Name: "NotFound", Message: "Resource not found", HTTPStatus: 400} ErrUnsupportedNetwork = WebRPCError{Code: 3008, Name: "UnsupportedNetwork", Message: "Unsupported network", HTTPStatus: 422} )
Schema errors
var CheckoutOptionCrypto_name = map[uint32]string{
	0: "none",
	1: "partially",
	2: "all",
}
    var CheckoutOptionCrypto_value = map[string]uint32{
	"none":      0,
	"partially": 1,
	"all":       2,
}
    var CheckoutOptionNFTCheckoutProvider_name = map[uint32]string{
	0: "unknown",
	1: "sardine",
	2: "transak",
}
    var CheckoutOptionNFTCheckoutProvider_value = map[string]uint32{
	"unknown": 0,
	"sardine": 1,
	"transak": 2,
}
    var CheckoutOptionOnRampProvider_name = map[uint32]string{
	0: "unknown",
	1: "sardine",
	2: "transak",
}
    var CheckoutOptionOnRampProvider_value = map[string]uint32{
	"unknown": 0,
	"sardine": 1,
	"transak": 2,
}
    var CheckoutOptionSwapProvider_name = map[uint32]string{
	0: "unknown",
	1: "lifi",
}
    var CheckoutOptionSwapProvider_value = map[string]uint32{
	"unknown": 0,
	"lifi":    1,
}
    var GetLifiSwapRouteDirection_name = map[uint8]string{
	1: "to",
	2: "from",
}
    var GetLifiSwapRouteDirection_value = map[string]uint8{
	"to":   1,
	"from": 2,
}
    var SardinePaymentType_name = map[uint32]string{
	0: "ach",
	1: "debit",
	2: "credit",
	3: "us_debit",
	4: "international_debit",
	5: "international_credit",
}
    var SardinePaymentType_value = map[string]uint32{
	"ach":                  0,
	"debit":                1,
	"credit":               2,
	"us_debit":             3,
	"international_debit":  4,
	"international_credit": 5,
}
    var SardineQuoteType_name = map[uint32]string{
	0: "buy",
	1: "sell",
}
    var SardineQuoteType_value = map[string]uint32{
	"buy":  0,
	"sell": 1,
}
    var SortOrder_name = map[uint32]string{
	0: "DESC",
	1: "ASC",
}
    var SortOrder_value = map[string]uint32{
	"DESC": 0,
	"ASC":  1,
}
    var TokenType_name = map[uint8]string{
	0: "ERC20",
	1: "ERC721",
	2: "ERC1155",
}
    var TokenType_value = map[string]uint8{
	"ERC20":   0,
	"ERC721":  1,
	"ERC1155": 2,
}
    var TransakBuySell_name = map[uint8]string{
	0: "UNKNOWN",
	1: "BUY",
	2: "SELL",
}
    var TransakBuySell_value = map[string]uint8{
	"UNKNOWN": 0,
	"BUY":     1,
	"SELL":    2,
}
    var WebRPCServices = map[string][]string{
	"API": {
		"Ping",
		"Version",
		"RuntimeStatus",
		"Clock",
		"GetSequenceContext",
		"GetAuthToken",
		"GetAuthToken2",
		"SendPasswordlessLink",
		"RegisterPublicKey",
		"GetPublicKey",
		"FriendList",
		"GetFriendByAddress",
		"SearchFriends",
		"AddFriend",
		"UpdateFriendNickname",
		"RemoveFriend",
		"ContractCall",
		"DecodeContractCall",
		"LookupContractCallSelectors",
		"UserStorageFetch",
		"UserStorageSave",
		"UserStorageDelete",
		"UserStorageFetchAll",
		"GetMoonpayLink",
		"ResolveENSAddress",
		"IsValidSignature",
		"IsValidMessageSignature",
		"IsValidTypedDataSignature",
		"IsValidETHAuthProof",
		"GetOnRampURL",
		"SardineGetClientToken",
		"SardineGetNFTCheckoutToken",
		"SardineGetNFTCheckoutOrderStatus",
		"SardineGetSupportedRegions",
		"SardineGetSupportedFiatCurrencies",
		"SardineGetSupportedTokens",
		"SardineGetSupportedTokenForSwap",
		"SardineGetEnabledTokens",
		"SardineGetQuote",
		"GetSardineClientToken",
		"GetSardineNFTCheckoutToken",
		"GetSardineNFTCheckoutOrderStatus",
		"TransakGetCountries",
		"TransakGetCryptoCurrencies",
		"TransakGetFiatCurrencies",
		"TransakGetPrice",
		"TransakGetSupportedNFTCheckoutChains",
		"GetCoinPrices",
		"GetCollectiblePrices",
		"GetExchangeRate",
		"MemoryStore",
		"MemoryLoad",
		"GetInviteInfo",
		"IsValidAccessCode",
		"InternalClaimAccessCode",
		"BlockNumberAtTime",
		"PaperSessionSecret",
		"PaperSessionSecret2",
		"LinkWallet",
		"GetLinkedWallets",
		"RemoveLinkedWallet",
		"GenerateWaaSVerificationURL",
		"ValidateWaaSVerificationNonce",
		"ListAdoptedWallets",
		"GetLifiChains",
		"GetLifiTokens",
		"GetLifiSwapRoutes",
		"GetLifiSwapQuote",
		"GetIntentCallsPayloads",
		"CommitIntentConfig",
		"GetIntentConfig",
		"ListCurrencyGroups",
		"AddOffchainInventory",
		"GetOffchainInventory",
		"ListOffchainInventories",
		"UpdateOffchainInventory",
		"DeleteOffchainInventory",
		"RequestOffchainPayment",
		"ListOffchainPayments",
		"SavePack",
		"GetPack",
		"GetPackIds",
		"DeletePack",
		"UpdatePackContent",
		"GetRevealTxData",
		"CheckoutOptionsPrimary",
		"CheckoutOptionsSecondary",
		"CheckoutOptionsGetTransakContractID",
		"FortePayCreateIntent",
		"FortePayGetPaymentStatuses",
		"GetCCTPTransfer",
		"QueueCCTPTransfer",
		"QueueIntentConfigExecution",
		"GetIntentConfigExecutionStatus",
		"ListIntentConfigs",
		"QueueMetaTxnReceipt",
	},
}
    Functions ¶
func MethodNameFromContext ¶
func ServiceNameFromContext ¶
func WebrpcMethods ¶
func WebrpcMethods() map[string]method
Types ¶
type API ¶
type API interface {
	//
	// Runtime
	//
	Ping(ctx context.Context) (bool, error)
	Version(ctx context.Context) (*Version, error)
	RuntimeStatus(ctx context.Context) (*RuntimeStatus, error)
	Clock(ctx context.Context) (time.Time, error)
	GetSequenceContext(ctx context.Context) (*SequenceContext, error)
	//
	// Auth
	//
	// TODO: rename 'ewtString' arg to 'ethauthProof'
	GetAuthToken(ctx context.Context, ewtString string, testnetMode *bool) (bool, string, string, *User, error)
	GetAuthToken2(ctx context.Context, ewtString string, chainID string) (bool, string, string, *User, error)
	SendPasswordlessLink(ctx context.Context, email string, redirectUri string, intent string) (bool, error)
	RegisterPublicKey(ctx context.Context, publicKey *PublicKey) (bool, error)
	GetPublicKey(ctx context.Context, id string) (*PublicKey, error)
	//
	// Contacts / Friends
	//
	FriendList(ctx context.Context, nickname *string, page *Page) (*Page, []*Friend, error)
	GetFriendByAddress(ctx context.Context, friendAddress string) (bool, *Friend, error)
	SearchFriends(ctx context.Context, filterUsername string, page *Page) ([]*Friend, error)
	AddFriend(ctx context.Context, friendAddress string, optionalNickname *string) (bool, *Friend, error)
	UpdateFriendNickname(ctx context.Context, friendAddress string, nickname string) (bool, *Friend, error)
	RemoveFriend(ctx context.Context, friendAddress string) (bool, error)
	//
	// Chain-Utils
	//
	ContractCall(ctx context.Context, chainID string, contract string, inputExpr string, outputExpr string, args []string) ([]string, error)
	DecodeContractCall(ctx context.Context, callData string) (*ContractCall, error)
	LookupContractCallSelectors(ctx context.Context, selectors []string) ([][]string, error)
	//
	// User Storage
	//
	UserStorageFetch(ctx context.Context, key string) (interface{}, error)
	UserStorageSave(ctx context.Context, key string, object interface{}) (bool, error)
	UserStorageDelete(ctx context.Context, key string) (bool, error)
	UserStorageFetchAll(ctx context.Context, keys []string) (map[string]interface{}, error)
	//
	// Wallet utils
	//
	GetMoonpayLink(ctx context.Context, url string) (string, error)
	// - IsUsingGoogleMail(domain: string) => (yes: bool)
	ResolveENSAddress(ctx context.Context, ens string) (string, bool, error)
	// TODO: we can add walletContext optional in the future when we need it
	// NOTE: chainId can be either a number or canonical name
	IsValidSignature(ctx context.Context, chainId string, walletAddress string, digest string, signature string) (bool, error)
	IsValidMessageSignature(ctx context.Context, chainId string, walletAddress string, message string, signature string) (bool, error)
	IsValidTypedDataSignature(ctx context.Context, chainId string, walletAddress string, typedData interface{}, signature string) (bool, error)
	IsValidETHAuthProof(ctx context.Context, chainId string, walletAddress string, ethAuthProofString string) (bool, error)
	GetOnRampURL(ctx context.Context, chainId string) (string, error)
	SardineGetClientToken(ctx context.Context) (string, error)
	SardineGetNFTCheckoutToken(ctx context.Context, params *SardineNFTCheckoutParams) (*SardineNFTCheckout, error)
	SardineGetNFTCheckoutOrderStatus(ctx context.Context, orderId string) (*SardineOrder, error)
	SardineGetSupportedRegions(ctx context.Context) ([]*SardineRegion, error)
	SardineGetSupportedFiatCurrencies(ctx context.Context) ([]*SardineFiatCurrency, error)
	SardineGetSupportedTokens(ctx context.Context) ([]*SardineSupportedToken, error)
	SardineGetSupportedTokenForSwap(ctx context.Context, network string, tokenAddress string) (*SardineSupportedTokenForSwap, error)
	SardineGetEnabledTokens(ctx context.Context) ([]*SardineEnabledToken, error)
	SardineGetQuote(ctx context.Context, params *SardineGetQuoteParams) (*SardineQuote, error)
	// Deprecated. Use SardineGetClientToken() instead.
	GetSardineClientToken(ctx context.Context) (string, error)
	// Deprecated. Use SardineGetNFTCheckoutToken() instead.
	GetSardineNFTCheckoutToken(ctx context.Context, params *SardineNFTCheckoutParams) (*SardineNFTCheckout, error)
	// Deprecated. Use SardineGetNFTCheckoutOrderStatus() instead.
	GetSardineNFTCheckoutOrderStatus(ctx context.Context, orderId string) (*SardineOrder, error)
	TransakGetCountries(ctx context.Context) ([]*TransakCountry, error)
	TransakGetCryptoCurrencies(ctx context.Context) ([]*TransakCryptoCurrency, error)
	TransakGetFiatCurrencies(ctx context.Context) ([]*TransakFiatCurrency, error)
	TransakGetPrice(ctx context.Context, params *TransakGetPriceParams) (*TransakPrice, error)
	TransakGetSupportedNFTCheckoutChains(ctx context.Context) ([]*TransakChain, error)
	//
	// Price Feed
	//
	GetCoinPrices(ctx context.Context, tokens []*Token) ([]*TokenPrice, error)
	GetCollectiblePrices(ctx context.Context, tokens []*Token) ([]*TokenPrice, error)
	//
	// Price Feed utils
	//
	GetExchangeRate(ctx context.Context, toCurrency string) (*ExchangeRate, error)
	//
	// Util / misc
	//
	MemoryStore(ctx context.Context, key string, value string) (bool, error)
	MemoryLoad(ctx context.Context, key string) (string, error)
	//
	// Legacy
	//
	GetInviteInfo(ctx context.Context) (*InviteInfo, error)
	// NOTE: we're still using this from SW-API to Sequence-API to claim invite code
	IsValidAccessCode(ctx context.Context, accessCode string) (bool, error)
	InternalClaimAccessCode(ctx context.Context, address string, accessCode string) (bool, error)
	// Utils
	BlockNumberAtTime(ctx context.Context, chainId uint64, timestamps []uint64) ([]uint64, error)
	//
	// Paper
	// TODO: deprecate in the future
	//
	PaperSessionSecret(ctx context.Context, chainName string, contractAddress string, paramsJson string, contractType string) (string, error)
	PaperSessionSecret2(ctx context.Context, chainName string, contractAddress string, paramsJson string, abi string) (string, error)
	//
	// Linked wallets (v0 -- simple support)
	//
	LinkWallet(ctx context.Context, parentWalletAddress string, parentWalletMessage string, parentWalletSignature string, linkedWalletAddress string, linkedWalletMessage string, linkedWalletSignature string, signatureChainId string, linkedWalletType *string) (bool, error)
	GetLinkedWallets(ctx context.Context, parentWalletAddress string, parentWalletMessage string, parentWalletSignature string, signatureChainId string) ([]*LinkedWallet, error)
	RemoveLinkedWallet(ctx context.Context, parentWalletAddress string, parentWalletMessage string, parentWalletSignature string, linkedWalletAddress string, signatureChainId string) (bool, error)
	// NOTE: these methods are deprecated, please do not use them. We may resurface them in the future, but just wanted
	// to be clear, they are not necessary for our linked wallets.
	GenerateWaaSVerificationURL(ctx context.Context, walletAddress string) (string, string, error)
	ValidateWaaSVerificationNonce(ctx context.Context, nonce string, signature string, sessionId string, chainId string) (string, error)
	//
	//
	// WaaS child wallet adoption
	//
	ListAdoptedWallets(ctx context.Context, page *Page) (*Page, []*AdoptedChildWallet, error)
	GetLifiChains(ctx context.Context) ([]uint64, error)
	GetLifiTokens(ctx context.Context, chainIds []uint64) ([]*Token, error)
	// All parameters except `params` are deprecated.
	// Use only the `params` object to pass values.
	GetLifiSwapRoutes(ctx context.Context, params *GetLifiSwapRouteParams, chainId uint64, toTokenAddress string, toTokenAmount string, walletAddress string) ([]*LifiSwapRoute, error)
	GetLifiSwapQuote(ctx context.Context, params *GetLifiSwapQuoteParams) (*LifiSwapQuote, error)
	//
	// Chain abstraction
	//
	GetIntentCallsPayloads(ctx context.Context, userAddress string, destinationChainId uint64, destinationTokenAddress string, destinationTokenAmount string, destinationToAddress string, originChainId uint64, originTokenAddress string, originTokenAmount string, destinationCallData *string, destinationCallValue *string, provider *string, addressOverrides *AddressOverrides, destinationSalt *string, takerFee *TakerFee, slippageTolerance *float64, tradeType *TradeType) ([]*IntentCallsPayload, []*IntentPrecondition, []*MetaTxn, *TrailsFee, *IntentQuote, map[string]string, string, string, error)
	CommitIntentConfig(ctx context.Context, originIntentAddress string, destinationIntentAddress string, mainSigner string, calls []*IntentCallsPayload, preconditions []*IntentPrecondition, addressOverrides *AddressOverrides) (*IntentConfig, error)
	GetIntentConfig(ctx context.Context, intentAddress string) (*IntentConfig, error)
	//
	// Inventory, payments and management
	//
	ListCurrencyGroups(ctx context.Context) ([]*CurrencyGroup, error)
	AddOffchainInventory(ctx context.Context, inventory *OffchainInventory) (uint64, error)
	GetOffchainInventory(ctx context.Context, inventoryId uint64) (*OffchainInventory, error)
	ListOffchainInventories(ctx context.Context, projectId uint64) ([]*OffchainInventory, error)
	UpdateOffchainInventory(ctx context.Context, inventory *OffchainInventory) error
	DeleteOffchainInventory(ctx context.Context, inventoryId uint64) (bool, error)
	RequestOffchainPayment(ctx context.Context, inventoryId uint64, recipient string, chainId *uint64, tokenAddress *string) (*PaymentResponse, error)
	ListOffchainPayments(ctx context.Context, inventoryId uint64, page *Page) (*Page, []*OffchainPayment, error)
	//
	// Packs
	//
	SavePack(ctx context.Context, pack *Pack) (string, error)
	GetPack(ctx context.Context, contractAddress string, packId string, chainId uint64) (*Pack, error)
	GetPackIds(ctx context.Context, contractAddress string, chainId uint64) ([]string, error)
	DeletePack(ctx context.Context, contractAddress string, packId string, chainId uint64) (bool, error)
	UpdatePackContent(ctx context.Context, pack *Pack) (string, error)
	GetRevealTxData(ctx context.Context, contractAddress string, packId string, chainId uint64, userAddress string) (string, error)
	CheckoutOptionsPrimary(ctx context.Context, chainId uint64, wallet string, contractAddress string, collectionAddress string, params []*CheckoutOptionsPrimaryParams) (*CheckoutOptions, error)
	CheckoutOptionsSecondary(ctx context.Context, chainId uint64, wallet string, params []*CheckoutOptionsSecondaryParams) (*CheckoutOptions, error)
	CheckoutOptionsGetTransakContractID(ctx context.Context, chainId uint64, contractAddress string) (string, error)
	FortePayCreateIntent(ctx context.Context, intent *FortePayCreateIntent) (*FortePayIntent, error)
	FortePayGetPaymentStatuses(ctx context.Context, paymentIntentIds []string) ([]*FortePaymentStatus, error)
	//
	// CCTP
	//
	GetCCTPTransfer(ctx context.Context, id string) (*CCTPTransfer, error)
	QueueCCTPTransfer(ctx context.Context, sourceTxHash *string, metaTxHash *string, sourceChainId uint64, destinationChainId uint64) (*CCTPTransfer, error)
	//
	// Intent Machine Worker
	//
	QueueIntentConfigExecution(ctx context.Context, intentConfigId uint64) (bool, error)
	GetIntentConfigExecutionStatus(ctx context.Context, intentConfigId uint64) (string, error)
	ListIntentConfigs(ctx context.Context, page *Page, executionStatus *string) (*Page, []*IntentConfig, error)
	QueueMetaTxnReceipt(ctx context.Context, metaTxID string) (bool, error)
}
    type APIClient ¶
type APIClient interface {
	//
	// Runtime
	//
	Ping(ctx context.Context) (bool, error)
	Version(ctx context.Context) (*Version, error)
	RuntimeStatus(ctx context.Context) (*RuntimeStatus, error)
	Clock(ctx context.Context) (time.Time, error)
	GetSequenceContext(ctx context.Context) (*SequenceContext, error)
	//
	// Auth
	//
	// TODO: rename 'ewtString' arg to 'ethauthProof'
	GetAuthToken(ctx context.Context, ewtString string, testnetMode *bool) (bool, string, string, *User, error)
	GetAuthToken2(ctx context.Context, ewtString string, chainID string) (bool, string, string, *User, error)
	SendPasswordlessLink(ctx context.Context, email string, redirectUri string, intent string) (bool, error)
	RegisterPublicKey(ctx context.Context, publicKey *PublicKey) (bool, error)
	GetPublicKey(ctx context.Context, id string) (*PublicKey, error)
	//
	// Contacts / Friends
	//
	FriendList(ctx context.Context, nickname *string, page *Page) (*Page, []*Friend, error)
	GetFriendByAddress(ctx context.Context, friendAddress string) (bool, *Friend, error)
	SearchFriends(ctx context.Context, filterUsername string, page *Page) ([]*Friend, error)
	AddFriend(ctx context.Context, friendAddress string, optionalNickname *string) (bool, *Friend, error)
	UpdateFriendNickname(ctx context.Context, friendAddress string, nickname string) (bool, *Friend, error)
	RemoveFriend(ctx context.Context, friendAddress string) (bool, error)
	//
	// Chain-Utils
	//
	ContractCall(ctx context.Context, chainID string, contract string, inputExpr string, outputExpr string, args []string) ([]string, error)
	DecodeContractCall(ctx context.Context, callData string) (*ContractCall, error)
	LookupContractCallSelectors(ctx context.Context, selectors []string) ([][]string, error)
	//
	// User Storage
	//
	UserStorageFetch(ctx context.Context, key string) (interface{}, error)
	UserStorageSave(ctx context.Context, key string, object interface{}) (bool, error)
	UserStorageDelete(ctx context.Context, key string) (bool, error)
	UserStorageFetchAll(ctx context.Context, keys []string) (map[string]interface{}, error)
	//
	// Wallet utils
	//
	GetMoonpayLink(ctx context.Context, url string) (string, error)
	// - IsUsingGoogleMail(domain: string) => (yes: bool)
	ResolveENSAddress(ctx context.Context, ens string) (string, bool, error)
	// TODO: we can add walletContext optional in the future when we need it
	// NOTE: chainId can be either a number or canonical name
	IsValidSignature(ctx context.Context, chainId string, walletAddress string, digest string, signature string) (bool, error)
	IsValidMessageSignature(ctx context.Context, chainId string, walletAddress string, message string, signature string) (bool, error)
	IsValidTypedDataSignature(ctx context.Context, chainId string, walletAddress string, typedData interface{}, signature string) (bool, error)
	IsValidETHAuthProof(ctx context.Context, chainId string, walletAddress string, ethAuthProofString string) (bool, error)
	GetOnRampURL(ctx context.Context, chainId string) (string, error)
	SardineGetClientToken(ctx context.Context) (string, error)
	SardineGetNFTCheckoutToken(ctx context.Context, params *SardineNFTCheckoutParams) (*SardineNFTCheckout, error)
	SardineGetNFTCheckoutOrderStatus(ctx context.Context, orderId string) (*SardineOrder, error)
	SardineGetSupportedRegions(ctx context.Context) ([]*SardineRegion, error)
	SardineGetSupportedFiatCurrencies(ctx context.Context) ([]*SardineFiatCurrency, error)
	SardineGetSupportedTokens(ctx context.Context) ([]*SardineSupportedToken, error)
	SardineGetSupportedTokenForSwap(ctx context.Context, network string, tokenAddress string) (*SardineSupportedTokenForSwap, error)
	SardineGetEnabledTokens(ctx context.Context) ([]*SardineEnabledToken, error)
	SardineGetQuote(ctx context.Context, params *SardineGetQuoteParams) (*SardineQuote, error)
	// Deprecated. Use SardineGetClientToken() instead.
	GetSardineClientToken(ctx context.Context) (string, error)
	// Deprecated. Use SardineGetNFTCheckoutToken() instead.
	GetSardineNFTCheckoutToken(ctx context.Context, params *SardineNFTCheckoutParams) (*SardineNFTCheckout, error)
	// Deprecated. Use SardineGetNFTCheckoutOrderStatus() instead.
	GetSardineNFTCheckoutOrderStatus(ctx context.Context, orderId string) (*SardineOrder, error)
	TransakGetCountries(ctx context.Context) ([]*TransakCountry, error)
	TransakGetCryptoCurrencies(ctx context.Context) ([]*TransakCryptoCurrency, error)
	TransakGetFiatCurrencies(ctx context.Context) ([]*TransakFiatCurrency, error)
	TransakGetPrice(ctx context.Context, params *TransakGetPriceParams) (*TransakPrice, error)
	TransakGetSupportedNFTCheckoutChains(ctx context.Context) ([]*TransakChain, error)
	//
	// Price Feed
	//
	GetCoinPrices(ctx context.Context, tokens []*Token) ([]*TokenPrice, error)
	GetCollectiblePrices(ctx context.Context, tokens []*Token) ([]*TokenPrice, error)
	//
	// Price Feed utils
	//
	GetExchangeRate(ctx context.Context, toCurrency string) (*ExchangeRate, error)
	//
	// Util / misc
	//
	MemoryStore(ctx context.Context, key string, value string) (bool, error)
	MemoryLoad(ctx context.Context, key string) (string, error)
	//
	// Legacy
	//
	GetInviteInfo(ctx context.Context) (*InviteInfo, error)
	// NOTE: we're still using this from SW-API to Sequence-API to claim invite code
	IsValidAccessCode(ctx context.Context, accessCode string) (bool, error)
	InternalClaimAccessCode(ctx context.Context, address string, accessCode string) (bool, error)
	// Utils
	BlockNumberAtTime(ctx context.Context, chainId uint64, timestamps []uint64) ([]uint64, error)
	//
	// Paper
	// TODO: deprecate in the future
	//
	PaperSessionSecret(ctx context.Context, chainName string, contractAddress string, paramsJson string, contractType string) (string, error)
	PaperSessionSecret2(ctx context.Context, chainName string, contractAddress string, paramsJson string, abi string) (string, error)
	//
	// Linked wallets (v0 -- simple support)
	//
	LinkWallet(ctx context.Context, parentWalletAddress string, parentWalletMessage string, parentWalletSignature string, linkedWalletAddress string, linkedWalletMessage string, linkedWalletSignature string, signatureChainId string, linkedWalletType *string) (bool, error)
	GetLinkedWallets(ctx context.Context, parentWalletAddress string, parentWalletMessage string, parentWalletSignature string, signatureChainId string) ([]*LinkedWallet, error)
	RemoveLinkedWallet(ctx context.Context, parentWalletAddress string, parentWalletMessage string, parentWalletSignature string, linkedWalletAddress string, signatureChainId string) (bool, error)
	// NOTE: these methods are deprecated, please do not use them. We may resurface them in the future, but just wanted
	// to be clear, they are not necessary for our linked wallets.
	GenerateWaaSVerificationURL(ctx context.Context, walletAddress string) (string, string, error)
	ValidateWaaSVerificationNonce(ctx context.Context, nonce string, signature string, sessionId string, chainId string) (string, error)
	//
	//
	// WaaS child wallet adoption
	//
	ListAdoptedWallets(ctx context.Context, page *Page) (*Page, []*AdoptedChildWallet, error)
	GetLifiChains(ctx context.Context) ([]uint64, error)
	GetLifiTokens(ctx context.Context, chainIds []uint64) ([]*Token, error)
	// All parameters except `params` are deprecated.
	// Use only the `params` object to pass values.
	GetLifiSwapRoutes(ctx context.Context, params *GetLifiSwapRouteParams, chainId uint64, toTokenAddress string, toTokenAmount string, walletAddress string) ([]*LifiSwapRoute, error)
	GetLifiSwapQuote(ctx context.Context, params *GetLifiSwapQuoteParams) (*LifiSwapQuote, error)
	//
	// Chain abstraction
	//
	GetIntentCallsPayloads(ctx context.Context, userAddress string, destinationChainId uint64, destinationTokenAddress string, destinationTokenAmount string, destinationToAddress string, originChainId uint64, originTokenAddress string, originTokenAmount string, destinationCallData *string, destinationCallValue *string, provider *string, addressOverrides *AddressOverrides, destinationSalt *string, takerFee *TakerFee, slippageTolerance *float64, tradeType *TradeType) ([]*IntentCallsPayload, []*IntentPrecondition, []*MetaTxn, *TrailsFee, *IntentQuote, map[string]string, string, string, error)
	CommitIntentConfig(ctx context.Context, originIntentAddress string, destinationIntentAddress string, mainSigner string, calls []*IntentCallsPayload, preconditions []*IntentPrecondition, addressOverrides *AddressOverrides) (*IntentConfig, error)
	GetIntentConfig(ctx context.Context, intentAddress string) (*IntentConfig, error)
	//
	// Inventory, payments and management
	//
	ListCurrencyGroups(ctx context.Context) ([]*CurrencyGroup, error)
	AddOffchainInventory(ctx context.Context, inventory *OffchainInventory) (uint64, error)
	GetOffchainInventory(ctx context.Context, inventoryId uint64) (*OffchainInventory, error)
	ListOffchainInventories(ctx context.Context, projectId uint64) ([]*OffchainInventory, error)
	UpdateOffchainInventory(ctx context.Context, inventory *OffchainInventory) error
	DeleteOffchainInventory(ctx context.Context, inventoryId uint64) (bool, error)
	RequestOffchainPayment(ctx context.Context, inventoryId uint64, recipient string, chainId *uint64, tokenAddress *string) (*PaymentResponse, error)
	ListOffchainPayments(ctx context.Context, inventoryId uint64, page *Page) (*Page, []*OffchainPayment, error)
	//
	// Packs
	//
	SavePack(ctx context.Context, pack *Pack) (string, error)
	GetPack(ctx context.Context, contractAddress string, packId string, chainId uint64) (*Pack, error)
	GetPackIds(ctx context.Context, contractAddress string, chainId uint64) ([]string, error)
	DeletePack(ctx context.Context, contractAddress string, packId string, chainId uint64) (bool, error)
	UpdatePackContent(ctx context.Context, pack *Pack) (string, error)
	GetRevealTxData(ctx context.Context, contractAddress string, packId string, chainId uint64, userAddress string) (string, error)
	CheckoutOptionsPrimary(ctx context.Context, chainId uint64, wallet string, contractAddress string, collectionAddress string, params []*CheckoutOptionsPrimaryParams) (*CheckoutOptions, error)
	CheckoutOptionsSecondary(ctx context.Context, chainId uint64, wallet string, params []*CheckoutOptionsSecondaryParams) (*CheckoutOptions, error)
	CheckoutOptionsGetTransakContractID(ctx context.Context, chainId uint64, contractAddress string) (string, error)
	FortePayCreateIntent(ctx context.Context, intent *FortePayCreateIntent) (*FortePayIntent, error)
	FortePayGetPaymentStatuses(ctx context.Context, paymentIntentIds []string) ([]*FortePaymentStatus, error)
	//
	// CCTP
	//
	GetCCTPTransfer(ctx context.Context, id string) (*CCTPTransfer, error)
	QueueCCTPTransfer(ctx context.Context, sourceTxHash *string, metaTxHash *string, sourceChainId uint64, destinationChainId uint64) (*CCTPTransfer, error)
	//
	// Intent Machine Worker
	//
	QueueIntentConfigExecution(ctx context.Context, intentConfigId uint64) (bool, error)
	GetIntentConfigExecutionStatus(ctx context.Context, intentConfigId uint64) (string, error)
	ListIntentConfigs(ctx context.Context, page *Page, executionStatus *string) (*Page, []*IntentConfig, error)
	QueueMetaTxnReceipt(ctx context.Context, metaTxID string) (bool, error)
}
    func NewAPIClient ¶
func NewAPIClient(addr string, client HTTPClient) APIClient
func NewClient ¶ added in v0.60.9
NewClient creates a new Sequence API client instance. Please see https://sequence.build to get a `projectAccessKey`, which is your project's access key used to communicate with Sequence services.
NOTE: the `projectAccessKey` may be optional if you're using a JWT auth token passed in via the `clientOptions`.
type AddressOverrides ¶
type AdoptedChildWallet ¶
type AdoptedChildWallet struct {
	Address string `json:"address"`
}
    type CCTPTransfer ¶
type CCTPTransfer struct {
	ID                 string    `json:"id"`
	SourceTxHash       string    `json:"sourceTxHash"`
	SourceChainID      uint64    `json:"sourceChainId"`
	DestinationChainID uint64    `json:"destinationChainId"`
	Message            string    `json:"message"`
	Attestation        string    `json:"attestation"`
	Status             string    `json:"status"`
	CreatedAt          time.Time `json:"createdAt"`
	UpdatedAt          time.Time `json:"updatedAt"`
}
    type ChainExecuteQuote ¶
type ChainExecuteQuote struct {
	ChainId           prototyp.BigInt     `json:"chainId"`
	TotalGasLimit     prototyp.BigInt     `json:"totalGasLimit"`
	GasPrice          prototyp.BigInt     `json:"gasPrice"`
	TotalFeeAmount    prototyp.BigInt     `json:"totalFeeAmount"`
	NativeTokenSymbol string              `json:"nativeTokenSymbol"`
	NativeTokenPrice  float64             `json:"nativeTokenPrice"`
	MetaTxnFeeDetails []*MetaTxnFeeDetail `json:"metaTxnFeeDetails"`
	TotalFeeUSD       float64             `json:"totalFeeUSD"`
}
    type CheckoutOptionCrypto ¶
type CheckoutOptionCrypto uint32
const ( CheckoutOptionCrypto_none CheckoutOptionCrypto = 0 CheckoutOptionCrypto_partially CheckoutOptionCrypto = 1 CheckoutOptionCrypto_all CheckoutOptionCrypto = 2 )
func (*CheckoutOptionCrypto) Is ¶
func (x *CheckoutOptionCrypto) Is(values ...CheckoutOptionCrypto) bool
func (CheckoutOptionCrypto) MarshalText ¶
func (x CheckoutOptionCrypto) MarshalText() ([]byte, error)
func (CheckoutOptionCrypto) String ¶
func (x CheckoutOptionCrypto) String() string
func (*CheckoutOptionCrypto) UnmarshalText ¶
func (x *CheckoutOptionCrypto) UnmarshalText(b []byte) error
type CheckoutOptionNFTCheckoutProvider ¶
type CheckoutOptionNFTCheckoutProvider uint32
const ( CheckoutOptionNFTCheckoutProvider_unknown CheckoutOptionNFTCheckoutProvider = 0 CheckoutOptionNFTCheckoutProvider_sardine CheckoutOptionNFTCheckoutProvider = 1 CheckoutOptionNFTCheckoutProvider_transak CheckoutOptionNFTCheckoutProvider = 2 )
func (*CheckoutOptionNFTCheckoutProvider) Is ¶
func (x *CheckoutOptionNFTCheckoutProvider) Is(values ...CheckoutOptionNFTCheckoutProvider) bool
func (CheckoutOptionNFTCheckoutProvider) MarshalText ¶
func (x CheckoutOptionNFTCheckoutProvider) MarshalText() ([]byte, error)
func (CheckoutOptionNFTCheckoutProvider) String ¶
func (x CheckoutOptionNFTCheckoutProvider) String() string
func (*CheckoutOptionNFTCheckoutProvider) UnmarshalText ¶
func (x *CheckoutOptionNFTCheckoutProvider) UnmarshalText(b []byte) error
type CheckoutOptionOnRampProvider ¶
type CheckoutOptionOnRampProvider uint32
const ( CheckoutOptionOnRampProvider_unknown CheckoutOptionOnRampProvider = 0 CheckoutOptionOnRampProvider_sardine CheckoutOptionOnRampProvider = 1 CheckoutOptionOnRampProvider_transak CheckoutOptionOnRampProvider = 2 )
func (*CheckoutOptionOnRampProvider) Is ¶
func (x *CheckoutOptionOnRampProvider) Is(values ...CheckoutOptionOnRampProvider) bool
func (CheckoutOptionOnRampProvider) MarshalText ¶
func (x CheckoutOptionOnRampProvider) MarshalText() ([]byte, error)
func (CheckoutOptionOnRampProvider) String ¶
func (x CheckoutOptionOnRampProvider) String() string
func (*CheckoutOptionOnRampProvider) UnmarshalText ¶
func (x *CheckoutOptionOnRampProvider) UnmarshalText(b []byte) error
type CheckoutOptionSwapProvider ¶
type CheckoutOptionSwapProvider uint32
const ( CheckoutOptionSwapProvider_unknown CheckoutOptionSwapProvider = 0 CheckoutOptionSwapProvider_lifi CheckoutOptionSwapProvider = 1 )
func (*CheckoutOptionSwapProvider) Is ¶
func (x *CheckoutOptionSwapProvider) Is(values ...CheckoutOptionSwapProvider) bool
func (CheckoutOptionSwapProvider) MarshalText ¶
func (x CheckoutOptionSwapProvider) MarshalText() ([]byte, error)
func (CheckoutOptionSwapProvider) String ¶
func (x CheckoutOptionSwapProvider) String() string
func (*CheckoutOptionSwapProvider) UnmarshalText ¶
func (x *CheckoutOptionSwapProvider) UnmarshalText(b []byte) error
type CheckoutOptions ¶
type CheckoutOptions struct {
	Crypto      CheckoutOptionCrypto                `json:"crypto"`
	Swap        []CheckoutOptionSwapProvider        `json:"swap"`
	NFTCheckout []CheckoutOptionNFTCheckoutProvider `json:"nftCheckout"`
	OnRamp      []CheckoutOptionOnRampProvider      `json:"onRamp"`
}
    type CheckoutOptionsSecondaryParams ¶
type CheckoutOptionsSecondaryParams struct {
	CollectionAddress  prototyp.Hash   `json:"collectionAddress"`
	MarketplaceAddress prototyp.Hash   `json:"marketplaceAddress"`
	CurrencyAddress    prototyp.Hash   `json:"currencyAddress"`
	PriceAmount        prototyp.BigInt `json:"priceAmount"`
	TokenID            string          `json:"tokenId"`
}
    type ContractCall ¶
type ContractCall struct {
	Signature string            `json:"signature"`
	Function  string            `json:"function"`
	Args      []*TupleComponent `json:"args"`
}
    type CrossChainFee ¶
type CrossChainFee struct {
	ProviderFee      prototyp.BigInt `json:"providerFee"`
	TrailsSwapFee    prototyp.BigInt `json:"trailsSwapFee"`
	ProviderFeeUSD   float64         `json:"providerFeeUSD"`
	TrailsSwapFeeUSD float64         `json:"trailsSwapFeeUSD"`
	TotalFeeAmount   prototyp.BigInt `json:"totalFeeAmount"`
	TotalFeeUSD      float64         `json:"totalFeeUSD"`
}
    type CurrencyGroup ¶
type CurrencyGroup struct {
	Name   string                `json:"name" db:"name"`
	Tokens []*CurrencyGroupToken `json:"tokens"`
}
    Cross chain matching tokens
type CurrencyGroupToken ¶
type ExchangeRate ¶
type ExecuteQuote ¶
type ExecuteQuote struct {
	ChainQuotes []*ChainExecuteQuote `json:"chainQuotes"`
}
    type FortePayBuyer ¶
type FortePayBuyer struct {
	Wallet *FortePayWallet `json:"wallet"`
	Email  string          `json:"email"`
	ID     string          `json:"id"`
}
    type FortePayCreateIntent ¶
type FortePayCreateIntent struct {
	Blockchain      string          `json:"blockchain"`
	Buyer           *FortePayBuyer  `json:"buyer"`
	Currency        string          `json:"currency"`
	IdempotencyKey  string          `json:"idempotencyKey"`
	Items           []*FortePayItem `json:"items"`
	Seller          *FortePaySeller `json:"seller"`
	TransactionType string          `json:"transactionType"`
}
    type FortePayIntent ¶
type FortePayItem ¶
type FortePayItem struct {
	Amount      string                   `json:"amount"`
	ID          string                   `json:"id"`
	ImageURL    string                   `json:"imageUrl"`
	ListingData *FortePayItemListingData `json:"listingData"`
	NFTData     *FortePayItemNFTData     `json:"nftData"`
	MintData    *FortePayItemMintData    `json:"mintData"`
	Title       string                   `json:"title"`
}
    type FortePayItemListingData ¶
type FortePayItemListingData struct {
	OrderHash          string      `json:"orderHash"`
	Protocol           string      `json:"protocol"`
	ProtocolAddress    string      `json:"protocolAddress"`
	AuctionHouse       string      `json:"auctionHouse"`
	TokenAddress       string      `json:"tokenAddress"`
	Calldata           string      `json:"calldata"`
	PayToAddress       string      `json:"payToAddress"`
	StructuredCalldata interface{} `json:"structuredCalldata"`
}
    type FortePayItemMintData ¶
type FortePayItemMintData struct {
	Nonce                string      `json:"nonce"`
	Protocol             string      `json:"protocol"`
	ProtocolAddress      string      `json:"protocolAddress"`
	Signature            string      `json:"signature"`
	TokenIDs             []string    `json:"tokenIds"`
	Calldata             string      `json:"calldata"`
	PayToAddress         string      `json:"payToAddress"`
	TokenContractAddress string      `json:"tokenContractAddress"`
	StructuredCalldata   interface{} `json:"structuredCalldata"`
}
    type FortePayItemNFTData ¶
type FortePaySeller ¶
type FortePaySeller struct {
	Wallet *FortePayWallet `json:"wallet"`
}
    type FortePayWallet ¶
type FortePaymentStatus ¶
type Friend ¶
type Friend struct {
	ID            uint64        `json:"id" db:"id,omitempty"`
	UserAddress   prototyp.Hash `json:"userAddress" db:"user_address"`
	FriendAddress prototyp.Hash `json:"friendAddress" db:"friend_address"`
	// Nickname allows the user to assign a friend a label, useful for the case
	// when that friend doesn't have an arcadeum user account
	Nickname  string     `json:"nickname" db:"nickname"`
	User      *User      `json:"user" db:"-"`
	CreatedAt *time.Time `json:"createdAt,omitempty" db:"created_at,omitempty"`
}
    Friends
type GetLifiSwapQuoteParams ¶
type GetLifiSwapQuoteParams struct {
	// Required
	ChainID uint64 `json:"chainId"`
	// Required
	WalletAddress prototyp.Hash `json:"walletAddress"`
	// Required
	FromTokenAddress prototyp.Hash `json:"fromTokenAddress"`
	// Required
	ToTokenAddress prototyp.Hash `json:"toTokenAddress"`
	// Define either 'fromTokenAmount' or 'toTokenAmount', but not both
	FromTokenAmount *string `json:"fromTokenAmount"`
	// Define either 'fromTokenAmount' or 'toTokenAmount', but not both
	ToTokenAmount  *string `json:"toTokenAmount"`
	IncludeApprove bool    `json:"includeApprove"`
	// Basis point - 100 bps = 1%
	SlippageBPS uint64 `json:"slippageBps"`
}
    type GetLifiSwapRouteDirection ¶
type GetLifiSwapRouteDirection uint8
const ( GetLifiSwapRouteDirection_to GetLifiSwapRouteDirection = 1 GetLifiSwapRouteDirection_from GetLifiSwapRouteDirection = 2 )
func (*GetLifiSwapRouteDirection) Is ¶
func (x *GetLifiSwapRouteDirection) Is(values ...GetLifiSwapRouteDirection) bool
func (GetLifiSwapRouteDirection) MarshalText ¶
func (x GetLifiSwapRouteDirection) MarshalText() ([]byte, error)
func (GetLifiSwapRouteDirection) String ¶
func (x GetLifiSwapRouteDirection) String() string
func (*GetLifiSwapRouteDirection) UnmarshalText ¶
func (x *GetLifiSwapRouteDirection) UnmarshalText(b []byte) error
type GetLifiSwapRouteParams ¶
type GetLifiSwapRouteParams struct {
	Direction GetLifiSwapRouteDirection `json:"direction"`
	// Required
	ChainID uint64 `json:"chainId"`
	// Required
	WalletAddress prototyp.Hash `json:"walletAddress"`
	// Required
	TokenAddress prototyp.Hash `json:"tokenAddress"`
	TokenAmount  string        `json:"tokenAmount"`
}
    type HTTPClient ¶
HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.
type IntentCallsPayload ¶
type IntentConfig ¶
type IntentConfig struct {
	ID                       uint64              `json:"id" db:"id,omitempty"`
	ConfigHash               prototyp.Hash       `json:"configHash" db:"config_hash"`
	OriginIntentAddress      prototyp.Hash       `json:"originIntentAddress" db:"origin_intent_address"`
	DestinationIntentAddress prototyp.Hash       `json:"destinationIntentAddress" db:"destination_intent_address"`
	MainSigner               prototyp.Hash       `json:"mainSigner" db:"main_signer"`
	Calls                    prototyp.JSONString `json:"calls" db:"calls"`
	Preconditions            prototyp.JSONString `json:"preconditions" db:"preconditions"`
	ExecutionStatus          *string             `json:"executionStatus" db:"execution_status,omitempty"`
	MetaTxnID                *string             `json:"metaTxnId" db:"meta_txn_id,omitempty"`
	TxnHash                  *string             `json:"txnHash" db:"txn_hash,omitempty"`
	UpdatedAt                *time.Time          `json:"updatedAt,omitempty" db:"updated_at,omitempty"`
	CreatedAt                *time.Time          `json:"createdAt,omitempty" db:"created_at,omitempty"`
}
    IntentConfig
type IntentPrecondition ¶
type IntentQuote ¶
type IntentQuote struct {
	FromAmount             prototyp.BigInt   `json:"fromAmount"`
	FromAmountMin          prototyp.BigInt   `json:"fromAmountMin"`
	ToAmount               prototyp.BigInt   `json:"toAmount"`
	ToAmountMin            prototyp.BigInt   `json:"toAmountMin"`
	PriceImpact            float64           `json:"priceImpact"`
	PriceImpactUsd         string            `json:"priceImpactUsd"`
	MaxSlippage            float64           `json:"maxSlippage"`
	QuoteProvider          string            `json:"quoteProvider"`
	QuoteProviderRequestId string            `json:"quoteProviderRequestId"`
	QuoteProviderFeeUsd    string            `json:"quoteProviderFeeUsd"`
	FeeQuotes              map[string]string `json:"feeQuotes"`
}
    type InviteCode ¶
type InviteCode struct {
	Code         string             `json:"-" db:"code"`
	Source       string             `json:"-" db:"source"`
	UsesLeft     uint32             `json:"usesLeft" db:"uses_left"`
	OwnerAccount prototyp.HashMaybe `json:"ownerAccount" db:"owner_account"`
	Email        *string            `json:"email" db:"email"`
	Url          string             `json:"url"`
	CreatedAt    *time.Time         `json:"createdAt,omitempty" db:"created_at,omitempty"`
	ExpiresAt    *time.Time         `json:"expiresAt,omitempty" db:"expires_at,omitempty"`
}
    InviteCode
type InviteCodeAccount ¶
type InviteCodeAccount struct {
	Code                 string        `json:"-" db:"code"`
	ClaimedByUserAddress prototyp.Hash `json:"claimedByUserAddress" db:"claimed_by_user_address"`
	ClaimedAt            *time.Time    `json:"claimedAt,omitempty" db:"claimed_at,omitempty"`
}
    InviteCode Account
type InviteInfo ¶
type InviteInfo struct {
	ExpiryInHours uint32        `json:"expiryInHours"`
	Max           uint32        `json:"max"`
	Invites       []*InviteCode `json:"invites"`
}
    Invite info
type LifiSwapQuote ¶
type LifiSwapQuote struct {
	CurrencyAddress prototyp.Hash   `json:"currencyAddress"`
	CurrencyBalance prototyp.BigInt `json:"currencyBalance"`
	Price           prototyp.BigInt `json:"price"`
	// Guaranteed price for the swap (incl slippage).
	MaxPrice prototyp.BigInt `json:"maxPrice"`
	// to must be approved to access maxPrice of currencyAddress for the sender
	To               prototyp.Hash   `json:"to"`
	TransactionData  string          `json:"transactionData"`
	TransactionValue prototyp.BigInt `json:"transactionValue"`
	// Supplied when includeApprove is true
	ApproveData string          `json:"approveData"`
	Amount      prototyp.BigInt `json:"amount"`
	AmountMin   prototyp.BigInt `json:"amountMin"`
}
    type LifiSwapRoute ¶
type LifiToken ¶
type LifiToken struct {
	ChainID  uint64           `json:"chainId"`
	Address  string           `json:"address"`
	Symbol   string           `json:"symbol"`
	Name     string           `json:"name"`
	Decimals uint32           `json:"decimals"`
	PriceUSD float64          `json:"priceUsd"`
	Price    *prototyp.BigInt `json:"price"`
	CoinKey  string           `json:"coinKey"`
	LogoURI  string           `json:"logoUri"`
}
    type LinkedWallet ¶
type LinkedWallet struct {
	ID                  uint64        `json:"id" db:"id,omitempty"`
	WalletType          *string       `json:"walletType" db:"wallet_type"`
	WalletAddress       prototyp.Hash `json:"walletAddress" db:"wallet_address"`
	LinkedWalletAddress prototyp.Hash `json:"linkedWalletAddress" db:"linked_wallet_address"`
	CreatedAt           *time.Time    `json:"createdAt,omitempty" db:"created_at,omitempty"`
}
    type MetaTxn ¶
type MetaTxn struct {
	ID            string          `json:"id"`
	ChainId       prototyp.BigInt `json:"chainId"`
	WalletAddress string          `json:"walletAddress" db:"wallet_address"`
	// TODO (later): rename this to `to: string`
	Contract string `json:"contract" db:"to_address"`
	// TODO: rename to 'execdata'
	Input string `json:"input" db:"tx_data"`
}
    From: `0xsequence/relayer`: https://github.com/0xsequence/relayer/blob/2c695b820970c68c57bfe71810f469412cdec675/proto/relayer.ridl#L502 TODO: rename this to MetaTxnRaw (eventually), we can leave it for now to not break compat or name it, MetaTxnArgs ..?
type MetaTxnFeeDetail ¶
type MetaTxnReceipt ¶
type MetaTxnReceipt struct {
	MetaTxID     string  `json:"metaTxID" db:"meta_tx_id"`
	Status       string  `json:"status" db:"status"`
	TxnReceipt   *string `json:"txnReceipt" db:"txn_receipt"`
	RevertReason *string `json:"revertReason" db:"revert_reason"`
}
    MetaTxnReceipt
type NumTxnsRelayed ¶
type OffchainInventory ¶
type OffchainInventory struct {
	ID                  uint64        `json:"id" db:"id,omitempty"`
	ProjectID           uint64        `json:"projectId" db:"project_id"`
	ChainID             uint64        `json:"chainId" db:"chain_id"`
	ExternalProductID   string        `json:"externalProductId" db:"external_product_id"`
	PaymentTokenAddress prototyp.Hash `json:"paymentTokenAddress" db:"payment_token_address"`
	PaymentTokenType    TokenType     `json:"paymentTokenType" db:"payment_token_type"`
	PaymentTokenID      uint64        `json:"paymentTokenId" db:"payment_token_id"`
	PaymentAmount       uint64        `json:"paymentAmount" db:"payment_amount"`
	PaymentRecipient    prototyp.Hash `json:"paymentRecipient" db:"payment_recipient"`
	ChainedCallAddress  prototyp.Hash `json:"chainedCallAddress" db:"chained_call_address"`
	// product recipient address is added as the first argument (after selector)
	ChainedCallData         *string    `json:"chainedCallData" db:"chained_call_data"`
	AllowCrossChainPayments *bool      `json:"allowCrossChainPayments" db:"allow_cross_chain_payments"`
	CallbackURL             *string    `json:"callbackURL" db:"callback_url,omitempty"`
	CreatedAt               *time.Time `json:"createdAt" db:"created_at,omitempty"`
	DeletedAt               *time.Time `json:"-" db:"deleted_at,omitempty"`
}
    type OffchainPayment ¶
type OffchainPayment struct {
	ID                  uint64        `json:"id" db:"id,omitempty"`
	OffchainInventoryID uint64        `json:"offchainInventoryId" db:"offchain_inventory_id"`
	ProductRecipient    prototyp.Hash `json:"productRecipient" db:"product_recipient"`
	PaymentChainID      uint64        `json:"paymentChainId" db:"payment_chain_id"`
	PaymentTokenAddress prototyp.Hash `json:"paymentTokenAddress" db:"payment_token_address"`
	Expiration          *time.Time    `json:"expiration" db:"expiration"`
	CreatedAt           *time.Time    `json:"createdAt" db:"created_at"`
	CompletedAt         *time.Time    `json:"completedAt" db:"completed_at"`
	ProcessedAt         *time.Time    `json:"processedAt" db:"processed_at"`
}
    type Options ¶
type Options struct {
	// JWTAuthToken is an optional JWT token to authenticate with the api service.
	JWTAuthToken string
	// APIServiceURL is an optional custom URL for the Sequence API service.
	// If not provided, the default URL in `DefaultAPIServiceURL` will be used.
	APIServiceURL string
	// HTTPClient is an optional custom HTTP client to use for communicating with the
	// api service.
	HTTPClient HTTPClient
}
    type OriginCall ¶
type Pack ¶
type Pack struct {
	ID              uint64         `json:"id" db:"id,omitempty"`
	ChainID         uint64         `json:"chainId" db:"chain_id"`
	ProjectID       uint64         `json:"projectId,omitempty" db:"project_id"`
	ContractAddress prototyp.Hash  `json:"contractAddress" db:"contract_address"`
	PackID          string         `json:"packId" db:"pack_id"`
	Content         []*PackContent `json:"content" db:"content"`
	CreatedAt       *time.Time     `json:"createdAt,omitempty" db:"created_at,omitempty"`
}
    type PackContent ¶
type Page ¶
type Page struct {
	// Common for both numbered pages and cursor: Number of items per page
	// TODO: REMOVE..
	PageSize *uint32 `json:"pageSize"`
	// Numbered pages: Page number, this is multiplied by the value of the <pageSize> parameter.
	// TODO: REMOVE..
	Page *uint32 `json:"page"`
	// Number of total items on this query.
	// TODO: REMOVE..
	TotalRecords *uint64 `json:"totalRecords"`
	// Cursor: column to compare before/after to
	Column *string `json:"column"`
	// Cursor: return column < before - include to get previous page
	Before *interface{} `json:"before"`
	// Cursor: return column > after - include to get next page
	After *interface{} `json:"after"`
	// Sorting filter
	Sort []*SortBy `json:"sort"`
	// Indicates if there are more results available
	More *bool `json:"more,omitempty"`
}
    TOOD: refactor, we should be returning a cursor always.. see indexer/indexer.ridl Page object..
---
Page represents a results page. This can be used both to request a page and to store the state of a page.
type PaymentResponse ¶
type PaymentResponse struct {
	PaymentID           uint64        `json:"paymentId"`
	OffchainInventoryID uint64        `json:"offchainInventoryId"`
	ChainID             uint64        `json:"chainId"`
	ExternalProductID   string        `json:"externalProductId"`
	PaymentTokenAddress prototyp.Hash `json:"paymentTokenAddress"`
	PaymentTokenType    TokenType     `json:"paymentTokenType"`
	PaymentTokenID      uint64        `json:"paymentTokenId"`
	PaymentTotal        uint64        `json:"paymentTotal"`
	Expiration          *time.Time    `json:"expiration"`
	Signature           string        `json:"signature"`
	TxTo                prototyp.Hash `json:"txTo"`
	TxData              string        `json:"txData"`
}
    type RuntimeChecks ¶
type RuntimeChecks struct {
}
    type RuntimeStatus ¶
type RuntimeStatus struct {
	// overall status, true/false
	HealthOK       bool                       `json:"healthOK"`
	StartTime      time.Time                  `json:"startTime"`
	Uptime         uint64                     `json:"uptime"`
	Ver            string                     `json:"ver"`
	Branch         string                     `json:"branch"`
	CommitHash     string                     `json:"commitHash"`
	Checks         *RuntimeChecks             `json:"checks"`
	NumTxnsRelayed map[string]*NumTxnsRelayed `json:"numTxnsRelayed"`
}
    type SardineEnabledToken ¶
type SardineEnabledToken struct {
	Network      string `json:"network,omitempty"`
	AssetSymbol  string `json:"assetSymbol,omitempty"`
	AssetName    string `json:"assetName,omitempty"`
	ChainID      string `json:"chainId,omitempty"`
	TokenName    string `json:"tokenName,omitempty"`
	Token        string `json:"token,omitempty"`
	TokenAddress string `json:"tokenAddress,omitempty"`
}
    type SardineFiatCurrency ¶
type SardineFiatCurrency struct {
	CurrencyCode        string                  `json:"currencyCode"`
	Name                string                  `json:"name"`
	CurrencySymbol      string                  `json:"currencySymbol"`
	PaymentOptions      []*SardinePaymentOption `json:"paymentOptions"`
	SupportingCountries []string                `json:"supportingCountries"`
}
    type SardineGetQuoteParams ¶
type SardineGetQuoteParams struct {
	// Cryptocurrency asset user wants to purchase
	AssetType string `json:"assetType"`
	// Blockchain on which the asset_type is present
	Network string `json:"network"`
	// Amount the user wants to buy or sell.
	Total uint64 `json:"total"`
	// The currency type in which the quote is supplied. Default 'USD'
	Currency *string `json:"currency"`
	// The payment method that the user will use for the transaction
	PaymentType *SardinePaymentType `json:"paymentType"`
	// Select for the required activity buy for on ramp and sell for off ramp. Default 'buy'
	QuoteType *SardineQuoteType `json:"quoteType"`
	// Wallet address of User. This is used to calculate if User has previously used Sardine, and provide them with a more accurate quote.
	WalletAddress *string `json:"walletAddress"`
}
    type SardineNFTCheckout ¶
type SardineNFTCheckoutParams ¶
type SardineNFTCheckoutParams struct {
	Name                   string  `json:"name"`
	ImageURL               string  `json:"imageUrl"`
	Network                string  `json:"network"`
	RecipientAddress       string  `json:"recipientAddress"`
	BlockchainNFTID        string  `json:"blockchainNftId"`
	ContractAddress        string  `json:"contractAddress"`
	Quantity               int     `json:"quantity"`
	Decimals               *int    `json:"decimals"`
	TokenAmount            string  `json:"tokenAmount"`
	TokenAddress           string  `json:"tokenAddress"`
	TokenSymbol            string  `json:"tokenSymbol"`
	TokenDecimals          *int    `json:"tokenDecimals"`
	Calldata               string  `json:"calldata"`
	Platform               string  `json:"platform"`
	ApprovedSpenderAddress *string `json:"approvedSpenderAddress"`
}
    type SardineOrder ¶
type SardineOrder struct {
	ID                  string     `json:"id"`
	CreatedAt           *time.Time `json:"createdAt"`
	ReferenceID         string     `json:"referenceId"`
	Status              string     `json:"status"`
	FiatCurrency        string     `json:"fiatCurrency"`
	FiatExchangeRateUSD float64    `json:"fiatExchangeRateUSD"`
	TransactionID       string     `json:"transactionId"`
	ExpiresAt           *time.Time `json:"expiresAt"`
	Total               float64    `json:"total"`
	SubTotal            float64    `json:"subTotal"`
	TransactionFee      float64    `json:"transactionFee"`
	NetworkFee          float64    `json:"networkFee"`
	PaymentCurrency     *string    `json:"paymentCurrency"`
	PaymentMethodType   *string    `json:"paymentMethodType"`
	TransactionType     string     `json:"transactionType"`
	Name                string     `json:"name"`
	Price               int        `json:"price"`
	ImageURL            string     `json:"imageUrl"`
	ContractAddress     *string    `json:"contractAddress"`
	TransactionHash     *string    `json:"transactionHash"`
	RecipientAddress    string     `json:"recipientAddress"`
}
    type SardinePaymentOption ¶
type SardinePaymentOption struct {
	Name           string   `json:"name"`
	DailyLimit     float64  `json:"dailyLimit"`
	WeeklyLimit    float64  `json:"weeklyLimit"`
	MonthlyLimit   float64  `json:"monthlyLimit"`
	MaxAmount      float64  `json:"maxAmount"`
	MinAmount      float64  `json:"minAmount"`
	SubTypes       []string `json:"subTypes"`
	Type           string   `json:"type"`
	SubType        string   `json:"subType"`
	ProcessingTime string   `json:"processingTime"`
}
    type SardinePaymentType ¶
type SardinePaymentType uint32
const ( SardinePaymentType_ach SardinePaymentType = 0 SardinePaymentType_debit SardinePaymentType = 1 SardinePaymentType_credit SardinePaymentType = 2 SardinePaymentType_us_debit SardinePaymentType = 3 SardinePaymentType_international_debit SardinePaymentType = 4 SardinePaymentType_international_credit SardinePaymentType = 5 )
func (*SardinePaymentType) Is ¶
func (x *SardinePaymentType) Is(values ...SardinePaymentType) bool
func (SardinePaymentType) MarshalText ¶
func (x SardinePaymentType) MarshalText() ([]byte, error)
func (SardinePaymentType) String ¶
func (x SardinePaymentType) String() string
func (*SardinePaymentType) UnmarshalText ¶
func (x *SardinePaymentType) UnmarshalText(b []byte) error
type SardineQuote ¶
type SardineQuote struct {
	Quantity            float64 `json:"quantity"`
	Network             string  `json:"network"`
	AssetType           string  `json:"assetType"`
	Total               float64 `json:"total"`
	Currency            string  `json:"currency"`
	ExpiresAt           string  `json:"expiresAt"`
	PaymentType         string  `json:"paymentType"`
	Price               float64 `json:"price"`
	Subtotal            float64 `json:"subtotal"`
	TransactionFee      float64 `json:"transactionFee"`
	NetworkFee          float64 `json:"networkFee"`
	HighNetworkFee      bool    `json:"highNetworkFee"`
	MinTransactionValue float64 `json:"minTransactionValue"`
	MaxTransactionValue float64 `json:"maxTransactionValue"`
	LiquidityProvider   string  `json:"liquidityProvider"`
}
    type SardineQuoteType ¶
type SardineQuoteType uint32
const ( SardineQuoteType_buy SardineQuoteType = 0 SardineQuoteType_sell SardineQuoteType = 1 )
func (*SardineQuoteType) Is ¶
func (x *SardineQuoteType) Is(values ...SardineQuoteType) bool
func (SardineQuoteType) MarshalText ¶
func (x SardineQuoteType) MarshalText() ([]byte, error)
func (SardineQuoteType) String ¶
func (x SardineQuoteType) String() string
func (*SardineQuoteType) UnmarshalText ¶
func (x *SardineQuoteType) UnmarshalText(b []byte) error
type SardineRegion ¶
type SardineRegion struct {
	CountryCode        string                        `json:"countryCode"`
	IsAllowedOnRamp    bool                          `json:"isAllowedOnRamp"`
	IsAllowedOnNFT     bool                          `json:"isAllowedOnNFT"`
	IsBasicKycRequired []string                      `json:"isBasicKycRequired"`
	IsSsnRequired      []string                      `json:"isSsnRequired"`
	Name               string                        `json:"name"`
	CurrencyCode       string                        `json:"currencyCode"`
	IsPayrollSupported bool                          `json:"isPayrollSupported"`
	SupportedDocuments []string                      `json:"supportedDocuments"`
	PaymentMethods     []*SardineRegionPaymentMethod `json:"paymentMethods"`
	States             []*SardineRegionState         `json:"states"`
}
    type SardineRegionState ¶
type SardineSupportedToken ¶
type SardineSupportedToken struct {
	Network      string `json:"network,omitempty"`
	AssetSymbol  string `json:"assetSymbol,omitempty"`
	AssetName    string `json:"assetName,omitempty"`
	ChainID      string `json:"chainId,omitempty"`
	TokenName    string `json:"tokenName,omitempty"`
	Token        string `json:"token,omitempty"`
	TokenAddress string `json:"tokenAddress,omitempty"`
}
    type SequenceContext ¶
type SortOrder ¶
type SortOrder uint32
func (SortOrder) MarshalText ¶
func (*SortOrder) UnmarshalText ¶
type TokenPrice ¶
type TokenPrice struct {
	Token          *Token     `json:"token"`
	Price          *Price     `json:"price"`
	Price24hChange *Price     `json:"price24hChange"`
	Price24hVol    *Price     `json:"price24hVol"`
	FloorPrice     *Price     `json:"floorPrice,omitempty"`
	BuyPrice       *Price     `json:"buyPrice,omitempty"`
	SellPrice      *Price     `json:"sellPrice,omitempty"`
	UpdatedAt      *time.Time `json:"updatedAt"`
}
    type TokenType ¶
type TokenType uint8
func (TokenType) MarshalText ¶
func (*TokenType) UnmarshalText ¶
type TradeType ¶
type TradeType string
func (TradeType) MarshalText ¶
func (*TradeType) UnmarshalText ¶
type TrailsFee ¶
type TrailsFee struct {
	ExecuteQuote           *ExecuteQuote   `json:"executeQuote"`
	CrossChainFee          *CrossChainFee  `json:"crossChainFee"`
	TakerFeeAmount         prototyp.BigInt `json:"takerFeeAmount"`
	TakerFeeUSD            *float64        `json:"takerFeeUSD"`
	TrailsFixedFeeUSD      float64         `json:"trailsFixedFeeUSD"`
	FeeToken               prototyp.Hash   `json:"feeToken"`
	OriginTokenTotalAmount prototyp.BigInt `json:"originTokenTotalAmount"`
	TotalFeeAmount         prototyp.BigInt `json:"totalFeeAmount"`
	TotalFeeUSD            float64         `json:"totalFeeUSD"`
	QuoteProvider          *string         `json:"quoteProvider"`
}
    type TransakBuySell ¶
type TransakBuySell uint8
const ( TransakBuySell_UNKNOWN TransakBuySell = 0 TransakBuySell_BUY TransakBuySell = 1 TransakBuySell_SELL TransakBuySell = 2 )
func (*TransakBuySell) Is ¶
func (x *TransakBuySell) Is(values ...TransakBuySell) bool
func (TransakBuySell) MarshalText ¶
func (x TransakBuySell) MarshalText() ([]byte, error)
func (TransakBuySell) String ¶
func (x TransakBuySell) String() string
func (*TransakBuySell) UnmarshalText ¶
func (x *TransakBuySell) UnmarshalText(b []byte) error
type TransakChain ¶
type TransakCountry ¶
type TransakCountry struct {
	Alpha2             string            `json:"alpha2"`
	Alpha3             string            `json:"alpha3"`
	IsAllowed          bool              `json:"isAllowed"`
	IsLightKycAllowed  bool              `json:"isLightKycAllowed"`
	Name               string            `json:"name"`
	CurrencyCode       string            `json:"currencyCode"`
	SupportedDocuments []string          `json:"supportedDocuments"`
	Partners           []*TransakPartner `json:"partners"`
	States             []*TransakState   `json:"states"`
}
    type TransakCryptoCurrency ¶
type TransakCryptoCurrency struct {
	ID                        string                        `json:"id"`
	CoinID                    string                        `json:"coinID"`
	Address                   string                        `json:"address"`
	AddressAdditionalData     interface{}                   `json:"addressAdditionalData"`
	CreatedAt                 time.Time                     `json:"createdAt"`
	Decimals                  int                           `json:"decimals"`
	Image                     *TransakCryptoCurrencyImage   `json:"image"`
	IsAllowed                 bool                          `json:"isAllowed"`
	IsPopular                 bool                          `json:"isPopular"`
	IsStable                  bool                          `json:"isStable"`
	Name                      string                        `json:"name"`
	RoundOff                  int                           `json:"roundOff"`
	Symbol                    string                        `json:"symbol"`
	IsIgnorePriceVerification bool                          `json:"isIgnorePriceVerification"`
	ImageBk                   *TransakCryptoCurrencyImage   `json:"imageBk"`
	KycCountriesNotSupported  []string                      `json:"kycCountriesNotSupported"`
	Network                   *TransakCryptoCurrencyNetwork `json:"network"`
	UniqueID                  string                        `json:"uniqueID"`
	TokenType                 string                        `json:"tokenType"`
	TokenIdentifier           string                        `json:"tokenIdentifier"`
	IsPayInAllowed            bool                          `json:"isPayInAllowed"`
	IsSuspended               bool                          `json:"isSuspended"`
}
    type TransakFiatCurrency ¶
type TransakFiatCurrency struct {
	Symbol               string                              `json:"symbol"`
	SupportingCountries  []string                            `json:"supportingCountries"`
	LogoSymbol           string                              `json:"logoSymbol"`
	Name                 string                              `json:"name"`
	PaymentOptions       []*TransakFiatCurrencyPaymentOption `json:"paymentOptions"`
	IsPopular            bool                                `json:"isPopular"`
	IsAllowed            bool                                `json:"isAllowed"`
	RoundOff             int                                 `json:"roundOff"`
	IsPayOutAllowed      bool                                `json:"isPayOutAllowed"`
	DefaultCountryForNFT string                              `json:"defaultCountryForNFT"`
	Icon                 string                              `json:"icon"`
	DisplayMessage       string                              `json:"displayMessage"`
}
    type TransakFiatCurrencyPaymentOption ¶
type TransakFiatCurrencyPaymentOption struct {
	Name                      string   `json:"name"`
	ID                        string   `json:"id"`
	IsNftAllowed              bool     `json:"isNftAllowed"`
	IsNonCustodial            bool     `json:"isNonCustodial"`
	ProcessingTime            string   `json:"processingTime"`
	DisplayText               bool     `json:"displayText"`
	Icon                      string   `json:"icon"`
	LimitCurrency             string   `json:"limitCurrency"`
	IsActive                  bool     `json:"isActive"`
	Provider                  string   `json:"provider"`
	MaxAmount                 int      `json:"maxAmount"`
	MinAmount                 int      `json:"minAmount"`
	DefaultAmount             int      `json:"defaultAmount"`
	IsConverted               bool     `json:"isConverted"`
	VisaPayoutCountries       []string `json:"visaPayoutCountries"`
	MastercardPayoutCountries []string `json:"mastercardPayoutCountries"`
	IsPayOutAllowed           bool     `json:"isPayOutAllowed"`
	MinAmountForPayOut        int      `json:"minAmountForPayOut"`
	MaxAmountForPayOut        int      `json:"maxAmountForPayOut"`
	DefaultAmountForPayOut    int      `json:"defaultAmountForPayOut"`
}
    type TransakGetPriceParams ¶
type TransakGetPriceParams struct {
	// required Defaults to GBP
	FiatCurrency string `json:"fiatCurrency"`
	// required Defaults to ETH
	CryptoCurrency string `json:"cryptoCurrency"`
	// required Defaults to BUY
	IsBuyOrSell TransakBuySell `json:"isBuyOrSell"`
	// required Defaults to ethereum
	Network string `json:"network"`
	// required Defaults to credit_debit_card Payment method. You can get the payment method id from getFiatCurrencies endpoint
	PaymentMethod string `json:"paymentMethod"`
	// Defaults to 100
	FiatAmount   float64 `json:"fiatAmount"`
	CryptoAmount float64 `json:"cryptoAmount"`
	// ISO 3166 Alpha-2 Country Code
	QuoteCountryCode string `json:"quoteCountryCode"`
}
    type TransakPartner ¶
type TransakPrice ¶
type TransakPrice struct {
	QuoteID                 string                      `json:"quoteID"`
	ConversionPrice         float64                     `json:"conversionPrice"`
	MarketConversionPrice   float64                     `json:"marketConversionPrice"`
	Slippage                int                         `json:"slippage"`
	FiatCurrency            string                      `json:"fiatCurrency"`
	CryptoCurrency          string                      `json:"cryptoCurrency"`
	PaymentMethod           string                      `json:"paymentMethod"`
	FiatAmount              float64                     `json:"fiatAmount"`
	CryptoAmount            float64                     `json:"cryptoAmount"`
	IsBuyOrSell             string                      `json:"isBuyOrSell"`
	Network                 string                      `json:"network"`
	FeeDecimal              float64                     `json:"feeDecimal"`
	TotalFee                float64                     `json:"totalFee"`
	FeeBreakdown            []*TransakPriceFeeBreakdown `json:"feeBreakdown"`
	Nonce                   int                         `json:"nonce"`
	CryptoLiquidityProvider string                      `json:"cryptoLiquidityProvider"`
	Notes                   []interface{}               `json:"notes"`
}
    type TransakState ¶
type TupleComponent ¶
type User ¶
type User struct {
	Address            prototyp.Hash `json:"address" db:"address"`
	Username           string        `json:"username" db:"username"`
	NormalizedUsername string        `json:"-" db:"normalized_username"`
	Avatar             string        `json:"avatar" db:"avatar"`
	Bio                string        `json:"bio" db:"bio"`
	Location           string        `json:"location" db:"location"`
	Locale             string        `json:"locale" db:"locale"`
	Backup             *bool         `json:"backup,omitempty" db:"-"`
	BackupConfirmed    *bool         `json:"backupConfirmed,omitempty" db:"-"`
	MaxInvites         *uint32       `json:"maxInvites" db:"max_invites"`
	UpdatedAt          *time.Time    `json:"updatedAt,omitempty" db:"updated_at,omitempty"`
	CreatedAt          *time.Time    `json:"createdAt,omitempty" db:"created_at,omitempty"`
	SysAdmin           bool          `json:"-" db:"sys_admin"`
}
    Users
type UserStorage ¶
type UserStorage struct {
	UserAddress prototyp.Hash       `json:"userAddress" db:"user_address"`
	Key         string              `json:"key"`
	Value       prototyp.JSONString `json:"value"`
}
    type WalletBackup ¶
type WalletBackup struct {
	AccountAddress  prototyp.Hash `json:"accountAddress" db:"account_address"`
	SecretHash      string        `json:"secretHash" db:"secret_hash"`
	EncryptedWallet string        `json:"encryptedWallet" db:"encrypted_wallet"`
	// userConfirmed is a flag that the user tells us they've backed up
	// their wallet mnemonic for future recovery. It's just a user-experience field
	// so we can nag them if they haven't confirmed yet.
	UserConfirmed bool       `json:"userConfirmed" db:"user_confirmed"`
	UpdatedAt     *time.Time `json:"updatedAt,omitempty" db:"updated_at,omitempty"`
	CreatedAt     *time.Time `json:"createdAt,omitempty" db:"created_at,omitempty"`
}
    Wallet Backup
type WebRPCError ¶
type WebRPCError struct {
	Name       string `json:"error"`
	Code       int    `json:"code"`
	Message    string `json:"msg"`
	Cause      string `json:"cause,omitempty"`
	HTTPStatus int    `json:"status"`
	// contains filtered or unexported fields
}
    
        
          
            func ErrorWithCause
            deprecated
            
          
  
    
  
      
      func ErrorWithCause(rpcErr WebRPCError, cause error) WebRPCError
Deprecated: Use .WithCause() method on WebRPCError.
func (WebRPCError) Error ¶
func (e WebRPCError) Error() string
func (WebRPCError) Is ¶
func (e WebRPCError) Is(target error) bool
func (WebRPCError) Unwrap ¶
func (e WebRPCError) Unwrap() error
func (WebRPCError) WithCause ¶
func (e WebRPCError) WithCause(cause error) WebRPCError
func (WebRPCError) WithCausef ¶
func (e WebRPCError) WithCausef(format string, args ...interface{}) WebRPCError
type WebrpcGenVersions ¶
type WebrpcGenVersions struct {
	WebrpcGenVersion string
	CodeGenName      string
	CodeGenVersion   string
	SchemaName       string
	SchemaVersion    string
}
    func VersionFromHeader ¶
func VersionFromHeader(h http.Header) (*WebrpcGenVersions, error)