Documentation ¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AddressAssetExposure
- type AddressAssetExposureAsset
- type AddressAssetExposureAssetType
- type AddressAssetExposureAssetUnion
- type AddressAssetExposureSpender
- type AddressAssetExposureSpendersUnion
- type AssetDiff
- type AssetDiffAsset
- type AssetDiffAssetType
- type AssetDiffAssetUnion
- type AssetDiffIn
- type AssetDiffInUnion
- type AssetDiffOut
- type AssetDiffOutUnion
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Erc1155Diff
- type Erc1155Exposure
- type Erc1155ExposureExposure
- type Erc1155ExposureExposureUnion
- type Erc1155TokenDetails
- type Erc1155TokenDetailsType
- type Erc20Diff
- type Erc20Exposure
- type Erc20ExposureExposure
- type Erc20ExposureExposureUnion
- type Erc20TokenDetails
- type Erc20TokenDetailsType
- type Erc721Diff
- type Erc721Exposure
- type Erc721ExposureExposure
- type Erc721ExposureExposureUnion
- type Erc721TokenDetails
- type Erc721TokenDetailsType
- type Error
- type EvmJsonRpcScanParams
- type EvmJsonRpcScanParamsData
- type EvmJsonRpcScanParamsOption
- type EvmJsonRpcService
- type EvmPostTransactionBulkScanParams
- type EvmPostTransactionBulkScanParamsOption
- type EvmPostTransactionBulkService
- type EvmPostTransactionScanParams
- type EvmPostTransactionScanParamsData
- type EvmPostTransactionScanParamsOption
- type EvmPostTransactionService
- type EvmService
- type EvmTransactionBulkScanParams
- type EvmTransactionBulkScanParamsData
- type EvmTransactionBulkScanParamsOption
- type EvmTransactionBulkService
- type EvmTransactionRawScanParams
- type EvmTransactionRawScanParamsOption
- type EvmTransactionRawService
- type EvmTransactionScanParams
- type EvmTransactionScanParamsData
- type EvmTransactionScanParamsOption
- type EvmTransactionService
- type EvmUserOperationScanParams
- type EvmUserOperationScanParamsData
- type EvmUserOperationScanParamsDataOperation
- type EvmUserOperationScanParamsOption
- type EvmUserOperationService
- type MetadataParam
- type NativeAssetDetails
- type NativeAssetDetailsType
- type NativeDiff
- type NonercTokenDetails
- type NonercTokenDetailsType
- type SiteScanHitResponse
- type SiteScanHitResponseAttackType
- type SiteScanHitResponseContractRead
- type SiteScanHitResponseContractWrite
- type SiteScanHitResponseStatus
- type SiteScanMissResponse
- type SiteScanMissResponseStatus
- type SiteScanParams
- type SiteScanParamsMetadata
- type SiteScanParamsMetadataCatalogRequestMetadata
- type SiteScanParamsMetadataCatalogRequestMetadataType
- type SiteScanParamsMetadataType
- type SiteScanParamsMetadataUnion
- type SiteScanParamsMetadataWalletRequestMetadata
- type SiteScanParamsMetadataWalletRequestMetadataType
- type SiteScanResponse
- type SiteScanResponseStatus
- type SiteScanResponseUnion
- type SiteService
- type StellarAssetContractDetailsSchema
- type StellarAssetContractDetailsSchemaType
- type StellarAssetTransferDetailsSchema
- type StellarService
- type StellarTransactionScanParams
- type StellarTransactionScanRequestChain
- type StellarTransactionScanRequestMetadataParam
- type StellarTransactionScanRequestMetadataStellarInAppRequestMetadataParam
- type StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType
- type StellarTransactionScanRequestMetadataStellarWalletRequestMetadataParam
- type StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType
- type StellarTransactionScanRequestMetadataType
- type StellarTransactionScanRequestMetadataUnionParam
- type StellarTransactionScanRequestOption
- type StellarTransactionScanRequestParam
- type StellarTransactionScanResponse
- type StellarTransactionScanResponseSimulation
- type StellarTransactionScanResponseSimulationStatus
- type StellarTransactionScanResponseSimulationStellarSimulationErrorSchema
- type StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchema
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposures
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpender
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiff
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiff
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaType
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetUnion
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiff
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaType
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetUnion
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpender
- type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus
- type StellarTransactionScanResponseSimulationUnion
- type StellarTransactionScanResponseValidation
- type StellarTransactionScanResponseValidationReason
- type StellarTransactionScanResponseValidationResultType
- type StellarTransactionScanResponseValidationStatus
- type StellarTransactionScanResponseValidationStellarValidationErrorSchema
- type StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus
- type StellarTransactionScanResponseValidationStellarValidationResultSchema
- type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature
- type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType
- type StellarTransactionScanResponseValidationStellarValidationResultSchemaReason
- type StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType
- type StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus
- type StellarTransactionScanResponseValidationUnion
- type StellarTransactionService
- type TokenScanParams
- type TokenScanParamsMetadata
- type TokenScanResponse
- type TokenScanResponseAttackType
- type TokenScanResponseResultType
- type TokenScanSupportedChain
- type TokenService
- type TransactionScanFeature
- type TransactionScanFeatureType
- type TransactionScanResponse
- type TransactionScanResponseEvent
- type TransactionScanResponseEventsParam
- type TransactionScanResponseEventsParamsValueArray
- type TransactionScanResponseEventsParamsValueUnion
- type TransactionScanResponseGasEstimation
- type TransactionScanResponseGasEstimationStatus
- type TransactionScanResponseGasEstimationTransactionScanGasEstimation
- type TransactionScanResponseGasEstimationTransactionScanGasEstimationError
- type TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus
- type TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus
- type TransactionScanResponseGasEstimationUnion
- type TransactionScanResponseSimulation
- type TransactionScanResponseSimulationStatus
- type TransactionScanResponseSimulationUnion
- type TransactionScanResponseValidation
- type TransactionScanResponseValidationResultType
- type TransactionScanResponseValidationStatus
- type TransactionScanResponseValidationUnion
- type TransactionScanSupportedChain
- type TransactionSimulation
- type TransactionSimulationAccountSummary
- type TransactionSimulationAddressDetail
- type TransactionSimulationError
- type TransactionSimulationErrorStatus
- type TransactionSimulationStatus
- type TransactionValidation
- type TransactionValidationError
- type TransactionValidationErrorClassification
- type TransactionValidationErrorDescription
- type TransactionValidationErrorReason
- type TransactionValidationErrorResultType
- type TransactionValidationErrorStatus
- type TransactionValidationResultType
- type TransactionValidationStatus
- type UsdDiff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AddressAssetExposure ¶
type AddressAssetExposure struct { // description of the asset for the current diff Asset AddressAssetExposureAsset `json:"asset,required"` // dictionary of spender addresses where the exposure has changed during this // transaction for the current address and asset Spenders map[string]AddressAssetExposureSpender `json:"spenders,required"` JSON addressAssetExposureJSON `json:"-"` }
func (*AddressAssetExposure) UnmarshalJSON ¶
func (r *AddressAssetExposure) UnmarshalJSON(data []byte) (err error)
type AddressAssetExposureAsset ¶
type AddressAssetExposureAsset struct { // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` // address of the token Address string `json:"address,required"` // url of the token logo LogoURL string `json:"logo_url"` // asset type. Type AddressAssetExposureAssetType `json:"type,required"` // asset's decimals Decimals int64 `json:"decimals"` JSON addressAssetExposureAssetJSON `json:"-"` // contains filtered or unexported fields }
description of the asset for the current diff
func (AddressAssetExposureAsset) AsUnion ¶
func (r AddressAssetExposureAsset) AsUnion() AddressAssetExposureAssetUnion
AsUnion returns a AddressAssetExposureAssetUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc20TokenDetails, Erc1155TokenDetails, Erc721TokenDetails, NonercTokenDetails.
func (*AddressAssetExposureAsset) UnmarshalJSON ¶
func (r *AddressAssetExposureAsset) UnmarshalJSON(data []byte) (err error)
type AddressAssetExposureAssetType ¶
type AddressAssetExposureAssetType string
asset type.
const ( AddressAssetExposureAssetTypeErc20 AddressAssetExposureAssetType = "ERC20" AddressAssetExposureAssetTypeErc1155 AddressAssetExposureAssetType = "ERC1155" AddressAssetExposureAssetTypeErc721 AddressAssetExposureAssetType = "ERC721" AddressAssetExposureAssetTypeNonerc AddressAssetExposureAssetType = "NONERC" )
func (AddressAssetExposureAssetType) IsKnown ¶
func (r AddressAssetExposureAssetType) IsKnown() bool
type AddressAssetExposureAssetUnion ¶
type AddressAssetExposureAssetUnion interface {
// contains filtered or unexported methods
}
description of the asset for the current diff
Union satisfied by Erc20TokenDetails, Erc1155TokenDetails, Erc721TokenDetails or NonercTokenDetails.
type AddressAssetExposureSpender ¶
type AddressAssetExposureSpender struct { // This field can have the runtime type of [[]Erc20ExposureExposure], // [[]Erc721ExposureExposure], [[]Erc1155ExposureExposure]. Exposure interface{} `json:"exposure"` // user friendly description of the approval Summary string `json:"summary"` // the amount that was asked in the approval request for this spender from the // current address and asset Approval int64 `json:"approval"` // the expiration time of the permit2 protocol Expiration time.Time `json:"expiration" format:"date-time"` // boolean indicates whether an is_approved_for_all function was used (missing in // case of ERC20 / ERC1155) IsApprovedForAll bool `json:"is_approved_for_all"` JSON addressAssetExposureSpenderJSON `json:"-"` // contains filtered or unexported fields }
func (AddressAssetExposureSpender) AsUnion ¶
func (r AddressAssetExposureSpender) AsUnion() AddressAssetExposureSpendersUnion
AsUnion returns a AddressAssetExposureSpendersUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc20Exposure, Erc721Exposure, Erc1155Exposure.
func (*AddressAssetExposureSpender) UnmarshalJSON ¶
func (r *AddressAssetExposureSpender) UnmarshalJSON(data []byte) (err error)
type AddressAssetExposureSpendersUnion ¶
type AddressAssetExposureSpendersUnion interface {
// contains filtered or unexported methods
}
Union satisfied by Erc20Exposure, Erc721Exposure or Erc1155Exposure.
type AssetDiff ¶ added in v0.7.3
type AssetDiff struct { // description of the asset for the current diff Asset AssetDiffAsset `json:"asset,required"` // amount of the asset that was transferred to the address in this transaction In []AssetDiffIn `json:"in,required"` // amount of the asset that was transferred from the address in this transaction Out []AssetDiffOut `json:"out,required"` JSON assetDiffJSON `json:"-"` }
func (*AssetDiff) UnmarshalJSON ¶ added in v0.7.3
type AssetDiffAsset ¶ added in v0.7.3
type AssetDiffAsset struct { // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` // address of the token Address string `json:"address"` // url of the token logo LogoURL string `json:"logo_url"` // asset type. Type AssetDiffAssetType `json:"type,required"` // asset's decimals Decimals int64 `json:"decimals"` ChainName string `json:"chain_name"` ChainID int64 `json:"chain_id"` JSON assetDiffAssetJSON `json:"-"` // contains filtered or unexported fields }
description of the asset for the current diff
func (AssetDiffAsset) AsUnion ¶ added in v0.7.3
func (r AssetDiffAsset) AsUnion() AssetDiffAssetUnion
AsUnion returns a AssetDiffAssetUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc20TokenDetails, Erc1155TokenDetails, Erc721TokenDetails, NonercTokenDetails, NativeAssetDetails.
func (*AssetDiffAsset) UnmarshalJSON ¶ added in v0.7.3
func (r *AssetDiffAsset) UnmarshalJSON(data []byte) (err error)
type AssetDiffAssetType ¶ added in v0.7.3
type AssetDiffAssetType string
asset type.
const ( AssetDiffAssetTypeErc20 AssetDiffAssetType = "ERC20" AssetDiffAssetTypeErc1155 AssetDiffAssetType = "ERC1155" AssetDiffAssetTypeErc721 AssetDiffAssetType = "ERC721" AssetDiffAssetTypeNonerc AssetDiffAssetType = "NONERC" AssetDiffAssetTypeNative AssetDiffAssetType = "NATIVE" )
func (AssetDiffAssetType) IsKnown ¶ added in v0.7.3
func (r AssetDiffAssetType) IsKnown() bool
type AssetDiffAssetUnion ¶ added in v0.7.3
type AssetDiffAssetUnion interface {
// contains filtered or unexported methods
}
description of the asset for the current diff
Union satisfied by Erc20TokenDetails, Erc1155TokenDetails, Erc721TokenDetails, NonercTokenDetails or NativeAssetDetails.
type AssetDiffIn ¶ added in v0.7.3
type AssetDiffIn struct { // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // user friendly description of the asset transfer Summary string `json:"summary"` // id of the token TokenID int64 `json:"token_id"` // value before divided by decimal, that was transferred from this address Value string `json:"value"` // url of the token logo LogoURL string `json:"logo_url"` // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value"` JSON assetDiffInJSON `json:"-"` // contains filtered or unexported fields }
func (AssetDiffIn) AsUnion ¶ added in v0.7.3
func (r AssetDiffIn) AsUnion() AssetDiffInUnion
AsUnion returns a AssetDiffInUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc1155Diff, Erc721Diff, Erc20Diff, NativeDiff.
func (*AssetDiffIn) UnmarshalJSON ¶ added in v0.7.3
func (r *AssetDiffIn) UnmarshalJSON(data []byte) (err error)
type AssetDiffInUnion ¶ added in v0.7.3
type AssetDiffInUnion interface {
// contains filtered or unexported methods
}
Union satisfied by Erc1155Diff, Erc721Diff, Erc20Diff or NativeDiff.
type AssetDiffOut ¶ added in v0.7.3
type AssetDiffOut struct { // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // user friendly description of the asset transfer Summary string `json:"summary"` // id of the token TokenID int64 `json:"token_id"` // value before divided by decimal, that was transferred from this address Value string `json:"value"` // url of the token logo LogoURL string `json:"logo_url"` // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value"` JSON assetDiffOutJSON `json:"-"` // contains filtered or unexported fields }
func (AssetDiffOut) AsUnion ¶ added in v0.7.3
func (r AssetDiffOut) AsUnion() AssetDiffOutUnion
AsUnion returns a AssetDiffOutUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc1155Diff, Erc721Diff, Erc20Diff, NativeDiff.
func (*AssetDiffOut) UnmarshalJSON ¶ added in v0.7.3
func (r *AssetDiffOut) UnmarshalJSON(data []byte) (err error)
type AssetDiffOutUnion ¶ added in v0.7.3
type AssetDiffOutUnion interface {
// contains filtered or unexported methods
}
Union satisfied by Erc1155Diff, Erc721Diff, Erc20Diff or NativeDiff.
type Client ¶
type Client struct { Options []option.RequestOption Evm *EvmService Stellar *StellarService Site *SiteService Token *TokenService }
Client creates a struct with services and top level methods that help with interacting with the blockaid API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (BLOCKAID_CLIENT_API_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned [url.Values] will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type Erc1155Diff ¶
type Erc1155Diff struct { // id of the token TokenID int64 `json:"token_id,required"` // value before divided by decimal, that was transferred from this address Value string `json:"value,required"` // url of the token logo LogoURL string `json:"logo_url"` // user friendly description of the asset transfer Summary string `json:"summary"` // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` JSON erc1155DiffJSON `json:"-"` }
func (*Erc1155Diff) UnmarshalJSON ¶
func (r *Erc1155Diff) UnmarshalJSON(data []byte) (err error)
type Erc1155Exposure ¶
type Erc1155Exposure struct { Exposure []Erc1155ExposureExposure `json:"exposure,required"` // boolean indicates whether an is_approved_for_all function was used (missing in // case of ERC20 / ERC1155) IsApprovedForAll bool `json:"is_approved_for_all,required"` // user friendly description of the approval Summary string `json:"summary"` JSON erc1155ExposureJSON `json:"-"` }
func (*Erc1155Exposure) UnmarshalJSON ¶
func (r *Erc1155Exposure) UnmarshalJSON(data []byte) (err error)
type Erc1155ExposureExposure ¶
type Erc1155ExposureExposure struct { // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // user friendly description of the asset transfer Summary string `json:"summary"` // id of the token TokenID int64 `json:"token_id"` // value before divided by decimal, that was transferred from this address Value string `json:"value"` // url of the token logo LogoURL string `json:"logo_url"` // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value"` JSON erc1155ExposureExposureJSON `json:"-"` // contains filtered or unexported fields }
func (Erc1155ExposureExposure) AsUnion ¶
func (r Erc1155ExposureExposure) AsUnion() Erc1155ExposureExposureUnion
AsUnion returns a Erc1155ExposureExposureUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc1155Diff, Erc721Diff, Erc20Diff, NativeDiff.
func (*Erc1155ExposureExposure) UnmarshalJSON ¶
func (r *Erc1155ExposureExposure) UnmarshalJSON(data []byte) (err error)
type Erc1155ExposureExposureUnion ¶
type Erc1155ExposureExposureUnion interface {
// contains filtered or unexported methods
}
Union satisfied by Erc1155Diff, Erc721Diff, Erc20Diff or NativeDiff.
type Erc1155TokenDetails ¶
type Erc1155TokenDetails struct { // address of the token Address string `json:"address,required"` // asset type. Type Erc1155TokenDetailsType `json:"type,required"` // url of the token logo LogoURL string `json:"logo_url"` // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` JSON erc1155TokenDetailsJSON `json:"-"` }
func (*Erc1155TokenDetails) UnmarshalJSON ¶
func (r *Erc1155TokenDetails) UnmarshalJSON(data []byte) (err error)
type Erc1155TokenDetailsType ¶
type Erc1155TokenDetailsType string
asset type.
const (
Erc1155TokenDetailsTypeErc1155 Erc1155TokenDetailsType = "ERC1155"
)
func (Erc1155TokenDetailsType) IsKnown ¶
func (r Erc1155TokenDetailsType) IsKnown() bool
type Erc20Diff ¶
type Erc20Diff struct { // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value,required"` // user friendly description of the asset transfer Summary string `json:"summary"` // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // value after divided by decimals, that was transferred from this address Value string `json:"value"` JSON erc20DiffJSON `json:"-"` }
func (*Erc20Diff) UnmarshalJSON ¶
type Erc20Exposure ¶
type Erc20Exposure struct { // the amount that was asked in the approval request for this spender from the // current address and asset Approval int64 `json:"approval,required"` Exposure []Erc20ExposureExposure `json:"exposure,required"` // the expiration time of the permit2 protocol Expiration time.Time `json:"expiration" format:"date-time"` // user friendly description of the approval Summary string `json:"summary"` JSON erc20ExposureJSON `json:"-"` }
func (*Erc20Exposure) UnmarshalJSON ¶
func (r *Erc20Exposure) UnmarshalJSON(data []byte) (err error)
type Erc20ExposureExposure ¶
type Erc20ExposureExposure struct { // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // user friendly description of the asset transfer Summary string `json:"summary"` // id of the token TokenID int64 `json:"token_id"` // value before divided by decimal, that was transferred from this address Value string `json:"value"` // url of the token logo LogoURL string `json:"logo_url"` // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value"` JSON erc20ExposureExposureJSON `json:"-"` // contains filtered or unexported fields }
func (Erc20ExposureExposure) AsUnion ¶
func (r Erc20ExposureExposure) AsUnion() Erc20ExposureExposureUnion
AsUnion returns a Erc20ExposureExposureUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc1155Diff, Erc721Diff, Erc20Diff, NativeDiff.
func (*Erc20ExposureExposure) UnmarshalJSON ¶
func (r *Erc20ExposureExposure) UnmarshalJSON(data []byte) (err error)
type Erc20ExposureExposureUnion ¶
type Erc20ExposureExposureUnion interface {
// contains filtered or unexported methods
}
Union satisfied by Erc1155Diff, Erc721Diff, Erc20Diff or NativeDiff.
type Erc20TokenDetails ¶
type Erc20TokenDetails struct { // address of the token Address string `json:"address,required"` // asset's decimals Decimals int64 `json:"decimals,required"` // asset type. Type Erc20TokenDetailsType `json:"type,required"` // url of the token logo LogoURL string `json:"logo_url"` // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` JSON erc20TokenDetailsJSON `json:"-"` }
func (*Erc20TokenDetails) UnmarshalJSON ¶
func (r *Erc20TokenDetails) UnmarshalJSON(data []byte) (err error)
type Erc20TokenDetailsType ¶
type Erc20TokenDetailsType string
asset type.
const (
Erc20TokenDetailsTypeErc20 Erc20TokenDetailsType = "ERC20"
)
func (Erc20TokenDetailsType) IsKnown ¶
func (r Erc20TokenDetailsType) IsKnown() bool
type Erc721Diff ¶
type Erc721Diff struct { // id of the token TokenID int64 `json:"token_id,required"` // url of the token logo LogoURL string `json:"logo_url"` // user friendly description of the asset transfer Summary string `json:"summary"` // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` JSON erc721DiffJSON `json:"-"` }
func (*Erc721Diff) UnmarshalJSON ¶
func (r *Erc721Diff) UnmarshalJSON(data []byte) (err error)
type Erc721Exposure ¶
type Erc721Exposure struct { Exposure []Erc721ExposureExposure `json:"exposure,required"` // boolean indicates whether an is_approved_for_all function was used (missing in // case of ERC20 / ERC1155) IsApprovedForAll bool `json:"is_approved_for_all,required"` // user friendly description of the approval Summary string `json:"summary"` JSON erc721ExposureJSON `json:"-"` }
func (*Erc721Exposure) UnmarshalJSON ¶
func (r *Erc721Exposure) UnmarshalJSON(data []byte) (err error)
type Erc721ExposureExposure ¶
type Erc721ExposureExposure struct { // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // user friendly description of the asset transfer Summary string `json:"summary"` // id of the token TokenID int64 `json:"token_id"` // value before divided by decimal, that was transferred from this address Value string `json:"value"` // url of the token logo LogoURL string `json:"logo_url"` // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value"` JSON erc721ExposureExposureJSON `json:"-"` // contains filtered or unexported fields }
func (Erc721ExposureExposure) AsUnion ¶
func (r Erc721ExposureExposure) AsUnion() Erc721ExposureExposureUnion
AsUnion returns a Erc721ExposureExposureUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are Erc1155Diff, Erc721Diff, Erc20Diff, NativeDiff.
func (*Erc721ExposureExposure) UnmarshalJSON ¶
func (r *Erc721ExposureExposure) UnmarshalJSON(data []byte) (err error)
type Erc721ExposureExposureUnion ¶
type Erc721ExposureExposureUnion interface {
// contains filtered or unexported methods
}
Union satisfied by Erc1155Diff, Erc721Diff, Erc20Diff or NativeDiff.
type Erc721TokenDetails ¶
type Erc721TokenDetails struct { // address of the token Address string `json:"address,required"` // asset type. Type Erc721TokenDetailsType `json:"type,required"` // url of the token logo LogoURL string `json:"logo_url"` // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` JSON erc721TokenDetailsJSON `json:"-"` }
func (*Erc721TokenDetails) UnmarshalJSON ¶
func (r *Erc721TokenDetails) UnmarshalJSON(data []byte) (err error)
type Erc721TokenDetailsType ¶
type Erc721TokenDetailsType string
asset type.
const (
Erc721TokenDetailsTypeErc721 Erc721TokenDetailsType = "ERC721"
)
func (Erc721TokenDetailsType) IsKnown ¶
func (r Erc721TokenDetailsType) IsKnown() bool
type EvmJsonRpcScanParams ¶
type EvmJsonRpcScanParams struct { // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` // JSON-RPC request that was received by the wallet. Data param.Field[EvmJsonRpcScanParamsData] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // The address of the account (wallet) received the request in hex string format AccountAddress param.Field[string] `json:"account_address"` // list of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmJsonRpcScanParamsOption] `json:"options"` }
func (EvmJsonRpcScanParams) MarshalJSON ¶
func (r EvmJsonRpcScanParams) MarshalJSON() (data []byte, err error)
type EvmJsonRpcScanParamsData ¶
type EvmJsonRpcScanParamsData struct { // The method of the JSON-RPC request Method param.Field[string] `json:"method,required"` // The parameters of the JSON-RPC request in JSON format Params param.Field[[]interface{}] `json:"params,required"` }
JSON-RPC request that was received by the wallet.
func (EvmJsonRpcScanParamsData) MarshalJSON ¶
func (r EvmJsonRpcScanParamsData) MarshalJSON() (data []byte, err error)
type EvmJsonRpcScanParamsOption ¶
type EvmJsonRpcScanParamsOption string
An enumeration.
const ( EvmJsonRpcScanParamsOptionValidation EvmJsonRpcScanParamsOption = "validation" EvmJsonRpcScanParamsOptionSimulation EvmJsonRpcScanParamsOption = "simulation" EvmJsonRpcScanParamsOptionGasEstimation EvmJsonRpcScanParamsOption = "gas_estimation" EvmJsonRpcScanParamsOptionEvents EvmJsonRpcScanParamsOption = "events" )
func (EvmJsonRpcScanParamsOption) IsKnown ¶
func (r EvmJsonRpcScanParamsOption) IsKnown() bool
type EvmJsonRpcService ¶
type EvmJsonRpcService struct {
Options []option.RequestOption
}
EvmJsonRpcService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmJsonRpcService method instead.
func NewEvmJsonRpcService ¶
func NewEvmJsonRpcService(opts ...option.RequestOption) (r *EvmJsonRpcService)
NewEvmJsonRpcService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmJsonRpcService) Scan ¶
func (r *EvmJsonRpcService) Scan(ctx context.Context, body EvmJsonRpcScanParams, opts ...option.RequestOption) (res *TransactionScanResponse, err error)
Gets a json-rpc request and returns a full simulation indicating what will happen in the transaction together with a recommended action and some textual reasons of why the transaction was flagged that way.
type EvmPostTransactionBulkScanParams ¶ added in v0.11.0
type EvmPostTransactionBulkScanParams struct { // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` // Transaction hashes to scan Data param.Field[[]string] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // List of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmPostTransactionBulkScanParamsOption] `json:"options"` }
func (EvmPostTransactionBulkScanParams) MarshalJSON ¶ added in v0.11.0
func (r EvmPostTransactionBulkScanParams) MarshalJSON() (data []byte, err error)
type EvmPostTransactionBulkScanParamsOption ¶ added in v0.11.0
type EvmPostTransactionBulkScanParamsOption string
An enumeration.
const ( EvmPostTransactionBulkScanParamsOptionValidation EvmPostTransactionBulkScanParamsOption = "validation" EvmPostTransactionBulkScanParamsOptionSimulation EvmPostTransactionBulkScanParamsOption = "simulation" EvmPostTransactionBulkScanParamsOptionGasEstimation EvmPostTransactionBulkScanParamsOption = "gas_estimation" EvmPostTransactionBulkScanParamsOptionEvents EvmPostTransactionBulkScanParamsOption = "events" )
func (EvmPostTransactionBulkScanParamsOption) IsKnown ¶ added in v0.11.0
func (r EvmPostTransactionBulkScanParamsOption) IsKnown() bool
type EvmPostTransactionBulkService ¶ added in v0.11.0
type EvmPostTransactionBulkService struct {
Options []option.RequestOption
}
EvmPostTransactionBulkService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmPostTransactionBulkService method instead.
func NewEvmPostTransactionBulkService ¶ added in v0.11.0
func NewEvmPostTransactionBulkService(opts ...option.RequestOption) (r *EvmPostTransactionBulkService)
NewEvmPostTransactionBulkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmPostTransactionBulkService) Scan ¶ added in v0.11.0
func (r *EvmPostTransactionBulkService) Scan(ctx context.Context, body EvmPostTransactionBulkScanParams, opts ...option.RequestOption) (res *[]TransactionScanResponse, err error)
Scan transactions that were already executed on chain, returns validation with features indicating address poisoning entites and malicious operators.
type EvmPostTransactionScanParams ¶ added in v0.11.0
type EvmPostTransactionScanParams struct { // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` Data param.Field[EvmPostTransactionScanParamsData] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // list of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmPostTransactionScanParamsOption] `json:"options"` }
func (EvmPostTransactionScanParams) MarshalJSON ¶ added in v0.11.0
func (r EvmPostTransactionScanParams) MarshalJSON() (data []byte, err error)
type EvmPostTransactionScanParamsData ¶ added in v0.11.0
type EvmPostTransactionScanParamsData struct { // The transaction hash to scan TxHash param.Field[string] `json:"tx_hash,required"` }
func (EvmPostTransactionScanParamsData) MarshalJSON ¶ added in v0.11.0
func (r EvmPostTransactionScanParamsData) MarshalJSON() (data []byte, err error)
type EvmPostTransactionScanParamsOption ¶ added in v0.11.0
type EvmPostTransactionScanParamsOption string
An enumeration.
const ( EvmPostTransactionScanParamsOptionValidation EvmPostTransactionScanParamsOption = "validation" EvmPostTransactionScanParamsOptionSimulation EvmPostTransactionScanParamsOption = "simulation" EvmPostTransactionScanParamsOptionGasEstimation EvmPostTransactionScanParamsOption = "gas_estimation" EvmPostTransactionScanParamsOptionEvents EvmPostTransactionScanParamsOption = "events" )
func (EvmPostTransactionScanParamsOption) IsKnown ¶ added in v0.11.0
func (r EvmPostTransactionScanParamsOption) IsKnown() bool
type EvmPostTransactionService ¶ added in v0.11.0
type EvmPostTransactionService struct {
Options []option.RequestOption
}
EvmPostTransactionService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmPostTransactionService method instead.
func NewEvmPostTransactionService ¶ added in v0.11.0
func NewEvmPostTransactionService(opts ...option.RequestOption) (r *EvmPostTransactionService)
NewEvmPostTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmPostTransactionService) Scan ¶ added in v0.11.0
func (r *EvmPostTransactionService) Scan(ctx context.Context, body EvmPostTransactionScanParams, opts ...option.RequestOption) (res *TransactionScanResponse, err error)
Scan a transaction that was already executed on chain, returns validation with features indicating address poisoning entites and malicious operators.
type EvmService ¶
type EvmService struct { Options []option.RequestOption JsonRpc *EvmJsonRpcService Transaction *EvmTransactionService TransactionBulk *EvmTransactionBulkService TransactionRaw *EvmTransactionRawService UserOperation *EvmUserOperationService PostTransaction *EvmPostTransactionService PostTransactionBulk *EvmPostTransactionBulkService }
EvmService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmService method instead.
func NewEvmService ¶
func NewEvmService(opts ...option.RequestOption) (r *EvmService)
NewEvmService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type EvmTransactionBulkScanParams ¶
type EvmTransactionBulkScanParams struct { // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` // Transaction bulk parameters Data param.Field[[]EvmTransactionBulkScanParamsData] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // List of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmTransactionBulkScanParamsOption] `json:"options"` }
func (EvmTransactionBulkScanParams) MarshalJSON ¶
func (r EvmTransactionBulkScanParams) MarshalJSON() (data []byte, err error)
type EvmTransactionBulkScanParamsData ¶
type EvmTransactionBulkScanParamsData struct { // The source address of the transaction in hex string format From param.Field[string] `json:"from,required"` // The encoded call data of the transaction in hex string format Data param.Field[string] `json:"data"` // The gas required for the transaction in hex string format. Gas param.Field[string] `json:"gas"` // The gas price for the transaction in hex string format. GasPrice param.Field[string] `json:"gas_price"` // The destination address of the transaction in hex string format To param.Field[string] `json:"to"` // The value of the transaction in Wei in hex string format Value param.Field[string] `json:"value"` }
func (EvmTransactionBulkScanParamsData) MarshalJSON ¶
func (r EvmTransactionBulkScanParamsData) MarshalJSON() (data []byte, err error)
type EvmTransactionBulkScanParamsOption ¶
type EvmTransactionBulkScanParamsOption string
An enumeration.
const ( EvmTransactionBulkScanParamsOptionValidation EvmTransactionBulkScanParamsOption = "validation" EvmTransactionBulkScanParamsOptionSimulation EvmTransactionBulkScanParamsOption = "simulation" EvmTransactionBulkScanParamsOptionGasEstimation EvmTransactionBulkScanParamsOption = "gas_estimation" EvmTransactionBulkScanParamsOptionEvents EvmTransactionBulkScanParamsOption = "events" )
func (EvmTransactionBulkScanParamsOption) IsKnown ¶
func (r EvmTransactionBulkScanParamsOption) IsKnown() bool
type EvmTransactionBulkService ¶
type EvmTransactionBulkService struct {
Options []option.RequestOption
}
EvmTransactionBulkService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmTransactionBulkService method instead.
func NewEvmTransactionBulkService ¶
func NewEvmTransactionBulkService(opts ...option.RequestOption) (r *EvmTransactionBulkService)
NewEvmTransactionBulkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmTransactionBulkService) Scan ¶
func (r *EvmTransactionBulkService) Scan(ctx context.Context, body EvmTransactionBulkScanParams, opts ...option.RequestOption) (res *[]TransactionScanResponse, err error)
Gets a bulk of transactions and returns a simulation showcasing the outcome after executing the transactions synchronously, along with a suggested course of action and textual explanations highlighting the reasons for flagging the bulk in that manner.
type EvmTransactionRawScanParams ¶
type EvmTransactionRawScanParams struct { // The address to relate the transaction to. Account address determines in which // perspective the transaction is simulated and validated. AccountAddress param.Field[string] `json:"account_address,required"` // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` // Hex string of the raw transaction data Data param.Field[string] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // list of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmTransactionRawScanParamsOption] `json:"options"` }
func (EvmTransactionRawScanParams) MarshalJSON ¶
func (r EvmTransactionRawScanParams) MarshalJSON() (data []byte, err error)
type EvmTransactionRawScanParamsOption ¶
type EvmTransactionRawScanParamsOption string
An enumeration.
const ( EvmTransactionRawScanParamsOptionValidation EvmTransactionRawScanParamsOption = "validation" EvmTransactionRawScanParamsOptionSimulation EvmTransactionRawScanParamsOption = "simulation" EvmTransactionRawScanParamsOptionGasEstimation EvmTransactionRawScanParamsOption = "gas_estimation" EvmTransactionRawScanParamsOptionEvents EvmTransactionRawScanParamsOption = "events" )
func (EvmTransactionRawScanParamsOption) IsKnown ¶
func (r EvmTransactionRawScanParamsOption) IsKnown() bool
type EvmTransactionRawService ¶
type EvmTransactionRawService struct {
Options []option.RequestOption
}
EvmTransactionRawService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmTransactionRawService method instead.
func NewEvmTransactionRawService ¶
func NewEvmTransactionRawService(opts ...option.RequestOption) (r *EvmTransactionRawService)
NewEvmTransactionRawService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmTransactionRawService) Scan ¶
func (r *EvmTransactionRawService) Scan(ctx context.Context, body EvmTransactionRawScanParams, opts ...option.RequestOption) (res *TransactionScanResponse, err error)
Gets a raw transaction and returns a full simulation indicating what will happen in the transaction together with a recommended action and some textual reasons of why the transaction was flagged that way.
type EvmTransactionScanParams ¶
type EvmTransactionScanParams struct { // The address to relate the transaction to. Account address determines in which // perspective the transaction is simulated and validated. AccountAddress param.Field[string] `json:"account_address,required"` // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` // Transaction parameters Data param.Field[EvmTransactionScanParamsData] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // list of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmTransactionScanParamsOption] `json:"options"` }
func (EvmTransactionScanParams) MarshalJSON ¶
func (r EvmTransactionScanParams) MarshalJSON() (data []byte, err error)
type EvmTransactionScanParamsData ¶
type EvmTransactionScanParamsData struct { // The source address of the transaction in hex string format From param.Field[string] `json:"from,required"` // The encoded call data of the transaction in hex string format Data param.Field[string] `json:"data"` // The gas required for the transaction in hex string format. Gas param.Field[string] `json:"gas"` // The gas price for the transaction in hex string format. GasPrice param.Field[string] `json:"gas_price"` // The destination address of the transaction in hex string format To param.Field[string] `json:"to"` // The value of the transaction in Wei in hex string format Value param.Field[string] `json:"value"` }
Transaction parameters
func (EvmTransactionScanParamsData) MarshalJSON ¶
func (r EvmTransactionScanParamsData) MarshalJSON() (data []byte, err error)
type EvmTransactionScanParamsOption ¶
type EvmTransactionScanParamsOption string
An enumeration.
const ( EvmTransactionScanParamsOptionValidation EvmTransactionScanParamsOption = "validation" EvmTransactionScanParamsOptionSimulation EvmTransactionScanParamsOption = "simulation" EvmTransactionScanParamsOptionGasEstimation EvmTransactionScanParamsOption = "gas_estimation" EvmTransactionScanParamsOptionEvents EvmTransactionScanParamsOption = "events" )
func (EvmTransactionScanParamsOption) IsKnown ¶
func (r EvmTransactionScanParamsOption) IsKnown() bool
type EvmTransactionService ¶
type EvmTransactionService struct {
Options []option.RequestOption
}
EvmTransactionService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmTransactionService method instead.
func NewEvmTransactionService ¶
func NewEvmTransactionService(opts ...option.RequestOption) (r *EvmTransactionService)
NewEvmTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmTransactionService) Scan ¶
func (r *EvmTransactionService) Scan(ctx context.Context, body EvmTransactionScanParams, opts ...option.RequestOption) (res *TransactionScanResponse, err error)
Gets a transaction and returns a full simulation indicating what will happen in the transaction together with a recommended action and some textual reasons of why the transaction was flagged that way.
type EvmUserOperationScanParams ¶ added in v0.7.0
type EvmUserOperationScanParams struct { // The chain name or chain ID Chain param.Field[TransactionScanSupportedChain] `json:"chain,required"` // The user operation request that was received by the wallet Data param.Field[EvmUserOperationScanParamsData] `json:"data,required"` // Object of additional information to validate against. Metadata param.Field[MetadataParam] `json:"metadata,required"` // The address of the account (wallet) sending the request in hex string format AccountAddress param.Field[string] `json:"account_address"` // list of one or both of options for the desired output. "simulation" - include // simulation output in your response. "validation" - include security validation // of the transaction in your response. Default is ["validation"] Options param.Field[[]EvmUserOperationScanParamsOption] `json:"options"` }
func (EvmUserOperationScanParams) MarshalJSON ¶ added in v0.7.0
func (r EvmUserOperationScanParams) MarshalJSON() (data []byte, err error)
type EvmUserOperationScanParamsData ¶ added in v0.7.0
type EvmUserOperationScanParamsData struct { // The operation parameters of the user operation request Operation param.Field[EvmUserOperationScanParamsDataOperation] `json:"operation,required"` // The address of the entrypoint receiving the request in hex string format Entrypoint param.Field[string] `json:"entrypoint"` }
The user operation request that was received by the wallet
func (EvmUserOperationScanParamsData) MarshalJSON ¶ added in v0.7.0
func (r EvmUserOperationScanParamsData) MarshalJSON() (data []byte, err error)
type EvmUserOperationScanParamsDataOperation ¶ added in v0.7.0
type EvmUserOperationScanParamsDataOperation struct { // The call data value in hex string format. CallData param.Field[string] `json:"call_data"` // The call gas limit value in hex string format. CallGasLimit param.Field[string] `json:"call_gas_limit"` // The init code value in hex string format. InitCode param.Field[string] `json:"init_code"` // The max fee per gas value in hex string format. MaxFeePerGas param.Field[string] `json:"max_fee_per_gas"` // The max priority fee per gas value in hex string format. MaxPriorityFeePerGas param.Field[string] `json:"max_priority_fee_per_gas"` // The nonce value in hex string format. Nonce param.Field[string] `json:"nonce"` // The paymaster and data value in hex string format. PaymasterAndData param.Field[string] `json:"paymaster_and_data"` // The pre verification gas value in hex string format. PreVerificationGas param.Field[string] `json:"pre_verification_gas"` // The sender address of the operation in hex string format Sender param.Field[string] `json:"sender"` // The signature value in hex string format. Signature param.Field[string] `json:"signature"` // The verification gas limit value in hex string format. VerificationGasLimit param.Field[string] `json:"verification_gas_limit"` }
The operation parameters of the user operation request
func (EvmUserOperationScanParamsDataOperation) MarshalJSON ¶ added in v0.7.0
func (r EvmUserOperationScanParamsDataOperation) MarshalJSON() (data []byte, err error)
type EvmUserOperationScanParamsOption ¶ added in v0.7.0
type EvmUserOperationScanParamsOption string
An enumeration.
const ( EvmUserOperationScanParamsOptionValidation EvmUserOperationScanParamsOption = "validation" EvmUserOperationScanParamsOptionSimulation EvmUserOperationScanParamsOption = "simulation" EvmUserOperationScanParamsOptionGasEstimation EvmUserOperationScanParamsOption = "gas_estimation" EvmUserOperationScanParamsOptionEvents EvmUserOperationScanParamsOption = "events" )
func (EvmUserOperationScanParamsOption) IsKnown ¶ added in v0.7.0
func (r EvmUserOperationScanParamsOption) IsKnown() bool
type EvmUserOperationService ¶
type EvmUserOperationService struct {
Options []option.RequestOption
}
EvmUserOperationService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEvmUserOperationService method instead.
func NewEvmUserOperationService ¶
func NewEvmUserOperationService(opts ...option.RequestOption) (r *EvmUserOperationService)
NewEvmUserOperationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EvmUserOperationService) Scan ¶ added in v0.7.0
func (r *EvmUserOperationService) Scan(ctx context.Context, body EvmUserOperationScanParams, opts ...option.RequestOption) (res *TransactionScanResponse, err error)
Gets a user operation request and returns a full simulation indicating what will happen in the transaction together with a recommended action and some textual reasons of why the transaction was flagged that way.
type MetadataParam ¶
type MetadataParam struct { // cross reference transaction against the domain. Domain param.Field[string] `json:"domain,required"` }
func (MetadataParam) MarshalJSON ¶
func (r MetadataParam) MarshalJSON() (data []byte, err error)
type NativeAssetDetails ¶ added in v0.7.3
type NativeAssetDetails struct { ChainID int64 `json:"chain_id,required"` ChainName string `json:"chain_name,required"` Decimals int64 `json:"decimals,required"` LogoURL string `json:"logo_url,required"` // asset type. Type NativeAssetDetailsType `json:"type,required"` // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` JSON nativeAssetDetailsJSON `json:"-"` }
func (*NativeAssetDetails) UnmarshalJSON ¶ added in v0.7.3
func (r *NativeAssetDetails) UnmarshalJSON(data []byte) (err error)
type NativeAssetDetailsType ¶ added in v0.7.3
type NativeAssetDetailsType string
asset type.
const (
NativeAssetDetailsTypeNative NativeAssetDetailsType = "NATIVE"
)
func (NativeAssetDetailsType) IsKnown ¶ added in v0.7.3
func (r NativeAssetDetailsType) IsKnown() bool
type NativeDiff ¶
type NativeDiff struct { // value before divided by decimal, that was transferred from this address RawValue string `json:"raw_value,required"` // user friendly description of the asset transfer Summary string `json:"summary"` // usd equal of the asset that was transferred from this address UsdPrice string `json:"usd_price"` // value after divided by decimals, that was transferred from this address Value string `json:"value"` JSON nativeDiffJSON `json:"-"` }
func (*NativeDiff) UnmarshalJSON ¶
func (r *NativeDiff) UnmarshalJSON(data []byte) (err error)
type NonercTokenDetails ¶
type NonercTokenDetails struct { // address of the token Address string `json:"address,required"` // asset type. Type NonercTokenDetailsType `json:"type,required"` // url of the token logo LogoURL string `json:"logo_url"` // string represents the name of the asset Name string `json:"name"` // asset's symbol name Symbol string `json:"symbol"` JSON nonercTokenDetailsJSON `json:"-"` }
func (*NonercTokenDetails) UnmarshalJSON ¶
func (r *NonercTokenDetails) UnmarshalJSON(data []byte) (err error)
type NonercTokenDetailsType ¶
type NonercTokenDetailsType string
asset type.
const (
NonercTokenDetailsTypeNonerc NonercTokenDetailsType = "NONERC"
)
func (NonercTokenDetailsType) IsKnown ¶
func (r NonercTokenDetailsType) IsKnown() bool
type SiteScanHitResponse ¶
type SiteScanHitResponse struct { AttackTypes map[string]SiteScanHitResponseAttackType `json:"attack_types,required"` ContractRead SiteScanHitResponseContractRead `json:"contract_read,required"` ContractWrite SiteScanHitResponseContractWrite `json:"contract_write,required"` IsMalicious bool `json:"is_malicious,required"` IsReachable bool `json:"is_reachable,required"` IsWeb3Site bool `json:"is_web3_site,required"` JsonRpcOperations []string `json:"json_rpc_operations,required"` MaliciousScore float64 `json:"malicious_score,required"` NetworkOperations []string `json:"network_operations,required"` ScanEndTime time.Time `json:"scan_end_time,required" format:"date-time"` ScanStartTime time.Time `json:"scan_start_time,required" format:"date-time"` Status SiteScanHitResponseStatus `json:"status,required"` URL string `json:"url,required"` JSON siteScanHitResponseJSON `json:"-"` }
func (*SiteScanHitResponse) UnmarshalJSON ¶
func (r *SiteScanHitResponse) UnmarshalJSON(data []byte) (err error)
type SiteScanHitResponseAttackType ¶
type SiteScanHitResponseAttackType struct { Score float64 `json:"score,required"` Threshold float64 `json:"threshold,required"` JSON siteScanHitResponseAttackTypeJSON `json:"-"` }
func (*SiteScanHitResponseAttackType) UnmarshalJSON ¶
func (r *SiteScanHitResponseAttackType) UnmarshalJSON(data []byte) (err error)
type SiteScanHitResponseContractRead ¶
type SiteScanHitResponseContractRead struct { ContractAddresses []string `json:"contract_addresses,required"` Functions map[string][]string `json:"functions,required"` JSON siteScanHitResponseContractReadJSON `json:"-"` }
func (*SiteScanHitResponseContractRead) UnmarshalJSON ¶
func (r *SiteScanHitResponseContractRead) UnmarshalJSON(data []byte) (err error)
type SiteScanHitResponseContractWrite ¶
type SiteScanHitResponseContractWrite struct { ContractAddresses []string `json:"contract_addresses,required"` Functions map[string][]string `json:"functions,required"` JSON siteScanHitResponseContractWriteJSON `json:"-"` }
func (*SiteScanHitResponseContractWrite) UnmarshalJSON ¶
func (r *SiteScanHitResponseContractWrite) UnmarshalJSON(data []byte) (err error)
type SiteScanHitResponseStatus ¶
type SiteScanHitResponseStatus string
const (
SiteScanHitResponseStatusHit SiteScanHitResponseStatus = "hit"
)
func (SiteScanHitResponseStatus) IsKnown ¶
func (r SiteScanHitResponseStatus) IsKnown() bool
type SiteScanMissResponse ¶
type SiteScanMissResponse struct { Status SiteScanMissResponseStatus `json:"status,required"` JSON siteScanMissResponseJSON `json:"-"` }
func (*SiteScanMissResponse) UnmarshalJSON ¶
func (r *SiteScanMissResponse) UnmarshalJSON(data []byte) (err error)
type SiteScanMissResponseStatus ¶
type SiteScanMissResponseStatus string
const (
SiteScanMissResponseStatusMiss SiteScanMissResponseStatus = "miss"
)
func (SiteScanMissResponseStatus) IsKnown ¶
func (r SiteScanMissResponseStatus) IsKnown() bool
type SiteScanParams ¶
type SiteScanParams struct { URL param.Field[string] `json:"url,required"` Metadata param.Field[SiteScanParamsMetadataUnion] `json:"metadata"` }
func (SiteScanParams) MarshalJSON ¶
func (r SiteScanParams) MarshalJSON() (data []byte, err error)
type SiteScanParamsMetadata ¶
type SiteScanParamsMetadata struct { Type param.Field[SiteScanParamsMetadataType] `json:"type,required"` AccountAddress param.Field[string] `json:"account_address"` }
func (SiteScanParamsMetadata) MarshalJSON ¶
func (r SiteScanParamsMetadata) MarshalJSON() (data []byte, err error)
type SiteScanParamsMetadataCatalogRequestMetadata ¶
type SiteScanParamsMetadataCatalogRequestMetadata struct {
Type param.Field[SiteScanParamsMetadataCatalogRequestMetadataType] `json:"type,required"`
}
func (SiteScanParamsMetadataCatalogRequestMetadata) MarshalJSON ¶
func (r SiteScanParamsMetadataCatalogRequestMetadata) MarshalJSON() (data []byte, err error)
type SiteScanParamsMetadataCatalogRequestMetadataType ¶
type SiteScanParamsMetadataCatalogRequestMetadataType string
const (
SiteScanParamsMetadataCatalogRequestMetadataTypeCatalog SiteScanParamsMetadataCatalogRequestMetadataType = "catalog"
)
func (SiteScanParamsMetadataCatalogRequestMetadataType) IsKnown ¶
func (r SiteScanParamsMetadataCatalogRequestMetadataType) IsKnown() bool
type SiteScanParamsMetadataType ¶
type SiteScanParamsMetadataType string
const ( SiteScanParamsMetadataTypeCatalog SiteScanParamsMetadataType = "catalog" SiteScanParamsMetadataTypeWallet SiteScanParamsMetadataType = "wallet" )
func (SiteScanParamsMetadataType) IsKnown ¶
func (r SiteScanParamsMetadataType) IsKnown() bool
type SiteScanParamsMetadataUnion ¶
type SiteScanParamsMetadataUnion interface {
// contains filtered or unexported methods
}
Satisfied by SiteScanParamsMetadataCatalogRequestMetadata, SiteScanParamsMetadataWalletRequestMetadata, SiteScanParamsMetadata.
type SiteScanParamsMetadataWalletRequestMetadata ¶
type SiteScanParamsMetadataWalletRequestMetadata struct { AccountAddress param.Field[string] `json:"account_address,required"` Type param.Field[SiteScanParamsMetadataWalletRequestMetadataType] `json:"type,required"` }
func (SiteScanParamsMetadataWalletRequestMetadata) MarshalJSON ¶
func (r SiteScanParamsMetadataWalletRequestMetadata) MarshalJSON() (data []byte, err error)
type SiteScanParamsMetadataWalletRequestMetadataType ¶
type SiteScanParamsMetadataWalletRequestMetadataType string
const (
SiteScanParamsMetadataWalletRequestMetadataTypeWallet SiteScanParamsMetadataWalletRequestMetadataType = "wallet"
)
func (SiteScanParamsMetadataWalletRequestMetadataType) IsKnown ¶
func (r SiteScanParamsMetadataWalletRequestMetadataType) IsKnown() bool
type SiteScanResponse ¶
type SiteScanResponse struct { Status SiteScanResponseStatus `json:"status,required"` URL string `json:"url"` ScanStartTime time.Time `json:"scan_start_time" format:"date-time"` ScanEndTime time.Time `json:"scan_end_time" format:"date-time"` MaliciousScore float64 `json:"malicious_score"` IsReachable bool `json:"is_reachable"` IsWeb3Site bool `json:"is_web3_site"` IsMalicious bool `json:"is_malicious"` // This field can have the runtime type of // [map[string]SiteScanHitResponseAttackType]. AttackTypes interface{} `json:"attack_types,required"` // This field can have the runtime type of [[]string]. NetworkOperations interface{} `json:"network_operations,required"` // This field can have the runtime type of [[]string]. JsonRpcOperations interface{} `json:"json_rpc_operations,required"` // This field can have the runtime type of [SiteScanHitResponseContractWrite]. ContractWrite interface{} `json:"contract_write,required"` // This field can have the runtime type of [SiteScanHitResponseContractRead]. ContractRead interface{} `json:"contract_read,required"` JSON siteScanResponseJSON `json:"-"` // contains filtered or unexported fields }
func (SiteScanResponse) AsUnion ¶
func (r SiteScanResponse) AsUnion() SiteScanResponseUnion
AsUnion returns a SiteScanResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SiteScanHitResponse, SiteScanMissResponse.
func (*SiteScanResponse) UnmarshalJSON ¶
func (r *SiteScanResponse) UnmarshalJSON(data []byte) (err error)
type SiteScanResponseStatus ¶
type SiteScanResponseStatus string
const ( SiteScanResponseStatusHit SiteScanResponseStatus = "hit" SiteScanResponseStatusMiss SiteScanResponseStatus = "miss" )
func (SiteScanResponseStatus) IsKnown ¶
func (r SiteScanResponseStatus) IsKnown() bool
type SiteScanResponseUnion ¶
type SiteScanResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by SiteScanHitResponse or SiteScanMissResponse.
type SiteService ¶
type SiteService struct {
Options []option.RequestOption
}
SiteService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSiteService method instead.
func NewSiteService ¶
func NewSiteService(opts ...option.RequestOption) (r *SiteService)
NewSiteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SiteService) Scan ¶
func (r *SiteService) Scan(ctx context.Context, body SiteScanParams, opts ...option.RequestOption) (res *SiteScanResponse, err error)
Scan Site
type StellarAssetContractDetailsSchema ¶ added in v0.11.0
type StellarAssetContractDetailsSchema struct { // Address of the asset's contract Address string `json:"address,required"` // Asset code Name string `json:"name,required"` // Asset symbol Symbol string `json:"symbol,required"` // Type of the asset (`CONTRACT`) Type StellarAssetContractDetailsSchemaType `json:"type"` JSON stellarAssetContractDetailsSchemaJSON `json:"-"` }
func (*StellarAssetContractDetailsSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarAssetContractDetailsSchema) UnmarshalJSON(data []byte) (err error)
type StellarAssetContractDetailsSchemaType ¶ added in v0.11.0
type StellarAssetContractDetailsSchemaType string
Type of the asset (`CONTRACT`)
const (
StellarAssetContractDetailsSchemaTypeContract StellarAssetContractDetailsSchemaType = "CONTRACT"
)
func (StellarAssetContractDetailsSchemaType) IsKnown ¶ added in v0.11.0
func (r StellarAssetContractDetailsSchemaType) IsKnown() bool
type StellarAssetTransferDetailsSchema ¶ added in v0.11.0
type StellarAssetTransferDetailsSchema struct { // Raw value of the transfer RawValue int64 `json:"raw_value,required"` // Value of the transfer Value float64 `json:"value,required"` // Summarized description of the transfer Summary string `json:"summary,nullable"` // USD price of the asset UsdPrice float64 `json:"usd_price"` JSON stellarAssetTransferDetailsSchemaJSON `json:"-"` }
func (*StellarAssetTransferDetailsSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarAssetTransferDetailsSchema) UnmarshalJSON(data []byte) (err error)
type StellarService ¶ added in v0.11.0
type StellarService struct { Options []option.RequestOption Transaction *StellarTransactionService }
StellarService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStellarService method instead.
func NewStellarService ¶ added in v0.11.0
func NewStellarService(opts ...option.RequestOption) (r *StellarService)
NewStellarService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type StellarTransactionScanParams ¶ added in v0.11.0
type StellarTransactionScanParams struct {
StellarTransactionScanRequest StellarTransactionScanRequestParam `json:"StellarTransactionScanRequest,required"`
}
func (StellarTransactionScanParams) MarshalJSON ¶ added in v0.11.0
func (r StellarTransactionScanParams) MarshalJSON() (data []byte, err error)
type StellarTransactionScanRequestChain ¶ added in v0.11.0
type StellarTransactionScanRequestChain string
A CAIP-2 chain ID or a Stellar network name
const ( StellarTransactionScanRequestChainPubnet StellarTransactionScanRequestChain = "pubnet" StellarTransactionScanRequestChainFuturenet StellarTransactionScanRequestChain = "futurenet" )
func (StellarTransactionScanRequestChain) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanRequestChain) IsKnown() bool
type StellarTransactionScanRequestMetadataParam ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataParam struct { // Metadata for wallet requests Type param.Field[StellarTransactionScanRequestMetadataType] `json:"type"` // URL of the dApp that originated the transaction URL param.Field[string] `json:"url"` }
Metadata
func (StellarTransactionScanRequestMetadataParam) MarshalJSON ¶ added in v0.11.0
func (r StellarTransactionScanRequestMetadataParam) MarshalJSON() (data []byte, err error)
type StellarTransactionScanRequestMetadataStellarInAppRequestMetadataParam ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataStellarInAppRequestMetadataParam struct { // Metadata for in-app requests Type param.Field[StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType] `json:"type"` }
func (StellarTransactionScanRequestMetadataStellarInAppRequestMetadataParam) MarshalJSON ¶ added in v0.11.0
func (r StellarTransactionScanRequestMetadataStellarInAppRequestMetadataParam) MarshalJSON() (data []byte, err error)
type StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType string
Metadata for in-app requests
const (
StellarTransactionScanRequestMetadataStellarInAppRequestMetadataTypeInApp StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType = "in_app"
)
func (StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanRequestMetadataStellarInAppRequestMetadataType) IsKnown() bool
type StellarTransactionScanRequestMetadataStellarWalletRequestMetadataParam ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataStellarWalletRequestMetadataParam struct { // URL of the dApp that originated the transaction URL param.Field[string] `json:"url,required"` // Metadata for wallet requests Type param.Field[StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType] `json:"type"` }
func (StellarTransactionScanRequestMetadataStellarWalletRequestMetadataParam) MarshalJSON ¶ added in v0.11.0
func (r StellarTransactionScanRequestMetadataStellarWalletRequestMetadataParam) MarshalJSON() (data []byte, err error)
type StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType string
Metadata for wallet requests
const (
StellarTransactionScanRequestMetadataStellarWalletRequestMetadataTypeWallet StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType = "wallet"
)
func (StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanRequestMetadataStellarWalletRequestMetadataType) IsKnown() bool
type StellarTransactionScanRequestMetadataType ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataType string
Metadata for wallet requests
const ( StellarTransactionScanRequestMetadataTypeWallet StellarTransactionScanRequestMetadataType = "wallet" StellarTransactionScanRequestMetadataTypeInApp StellarTransactionScanRequestMetadataType = "in_app" )
func (StellarTransactionScanRequestMetadataType) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanRequestMetadataType) IsKnown() bool
type StellarTransactionScanRequestMetadataUnionParam ¶ added in v0.11.0
type StellarTransactionScanRequestMetadataUnionParam interface {
// contains filtered or unexported methods
}
Metadata
Satisfied by StellarTransactionScanRequestMetadataStellarWalletRequestMetadataParam, StellarTransactionScanRequestMetadataStellarInAppRequestMetadataParam, StellarTransactionScanRequestMetadataParam.
type StellarTransactionScanRequestOption ¶ added in v0.11.0
type StellarTransactionScanRequestOption string
const ( StellarTransactionScanRequestOptionValidation StellarTransactionScanRequestOption = "validation" StellarTransactionScanRequestOptionSimulation StellarTransactionScanRequestOption = "simulation" )
func (StellarTransactionScanRequestOption) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanRequestOption) IsKnown() bool
type StellarTransactionScanRequestParam ¶ added in v0.11.0
type StellarTransactionScanRequestParam struct { AccountAddress param.Field[string] `json:"account_address,required"` // A CAIP-2 chain ID or a Stellar network name Chain param.Field[StellarTransactionScanRequestChain] `json:"chain,required"` // Metadata Metadata param.Field[StellarTransactionScanRequestMetadataUnionParam] `json:"metadata,required"` // List of XDR-encoded transactions to be scanned Transactions param.Field[[]string] `json:"transactions,required"` // List of options to include in the response // // - `simulation`: Include simulation output in the response // - `validation`: Include security validation of the transaction in the response Options param.Field[[]StellarTransactionScanRequestOption] `json:"options"` }
func (StellarTransactionScanRequestParam) MarshalJSON ¶ added in v0.11.0
func (r StellarTransactionScanRequestParam) MarshalJSON() (data []byte, err error)
type StellarTransactionScanResponse ¶ added in v0.11.0
type StellarTransactionScanResponse struct { // Simulation result; Only present if simulation option is included in the request Simulation StellarTransactionScanResponseSimulation `json:"simulation,nullable"` // Validation result; Only present if validation option is included in the request Validation StellarTransactionScanResponseValidation `json:"validation,nullable"` JSON stellarTransactionScanResponseJSON `json:"-"` }
func (*StellarTransactionScanResponse) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponse) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulation ¶ added in v0.11.0
type StellarTransactionScanResponseSimulation struct { Status StellarTransactionScanResponseSimulationStatus `json:"status,required"` // This field can have the runtime type of // [map[string][]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff]. AssetsDiffs interface{} `json:"assets_diffs,required"` // This field can have the runtime type of // [map[string]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure]. Exposures interface{} `json:"exposures,required"` // This field can have the runtime type of // [map[string]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff]. AssetsOwnershipDiff interface{} `json:"assets_ownership_diff,required"` // This field can have the runtime type of // [[]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail]. AddressDetails interface{} `json:"address_details,required"` // This field can have the runtime type of // [StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary]. AccountSummary interface{} `json:"account_summary,required"` // Error message Error string `json:"error"` JSON stellarTransactionScanResponseSimulationJSON `json:"-"` // contains filtered or unexported fields }
Simulation result; Only present if simulation option is included in the request
func (StellarTransactionScanResponseSimulation) AsUnion ¶ added in v0.11.0
func (r StellarTransactionScanResponseSimulation) AsUnion() StellarTransactionScanResponseSimulationUnion
AsUnion returns a StellarTransactionScanResponseSimulationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are StellarTransactionScanResponseSimulationStellarSimulationResultSchema, StellarTransactionScanResponseSimulationStellarSimulationErrorSchema.
func (*StellarTransactionScanResponseSimulation) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulation) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStatus ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStatus string
const ( StellarTransactionScanResponseSimulationStatusSuccess StellarTransactionScanResponseSimulationStatus = "Success" StellarTransactionScanResponseSimulationStatusError StellarTransactionScanResponseSimulationStatus = "Error" )
func (StellarTransactionScanResponseSimulationStatus) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseSimulationStatus) IsKnown() bool
type StellarTransactionScanResponseSimulationStellarSimulationErrorSchema ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationErrorSchema struct { // Error message Error string `json:"error,required"` Status StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus `json:"status,required"` JSON stellarTransactionScanResponseSimulationStellarSimulationErrorSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationErrorSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationErrorSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus string
const (
StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatusError StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus = "Error"
)
func (StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseSimulationStellarSimulationErrorSchemaStatus) IsKnown() bool
type StellarTransactionScanResponseSimulationStellarSimulationResultSchema ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchema struct { // Summary of the actions and asset transfers that were made by the requested // account address AccountSummary StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary `json:"account_summary,required"` Status StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus `json:"status,required"` // Details of addresses involved in the transaction AddressDetails []StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail `json:"address_details"` // Mapping between the address of an account to the assets diff during the // transaction AssetsDiffs map[string][]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff `json:"assets_diffs"` // Mapping between the address of an account to the ownership diff of the account // during the transaction AssetsOwnershipDiff map[string]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff `json:"assets_ownership_diff"` // Mapping between the address of an account to the exposure of the assets during // the transaction Exposures map[string]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure `json:"exposures"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary struct { // Exposures made by the requested account address AccountExposures StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposures `json:"account_exposures,required"` // Account ownerships diff of the requested account address AccountOwnershipsDiff StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiff `json:"account_ownerships_diff,required"` // Total USD diff for the requested account address TotalUsdDiff StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiff `json:"total_usd_diff,required"` // Assets diffs of the requested account address AssetsDiffs []StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiff `json:"assets_diffs"` // Total USD exposure for each of the spender addresses during the transaction TotalUsdExposure map[string]float64 `json:"total_usd_exposure"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryJSON `json:"-"` }
Summary of the actions and asset transfers that were made by the requested account address
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummary) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposures ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposures struct { Asset StellarAssetContractDetailsSchema `json:"asset,required"` // Mapping between the address of a Spender to the exposure of the asset during the // transaction Spenders map[string]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpender `json:"spenders"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresJSON `json:"-"` }
Exposures made by the requested account address
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposures) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposures) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpender ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpender struct { // Raw value of the exposure RawValue int64 `json:"raw_value,required"` // Value of the exposure Value float64 `json:"value,required"` // Summarized description of the exposure Summary string `json:"summary,nullable"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpenderJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpender) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountExposuresSpender) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiff ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiff struct { // List of public keys that can sign on behalf of the account post-transaction PostSigners []string `json:"post_signers,required"` // List of public keys that can sign on behalf of the account pre-transaction PreSigners []string `json:"pre_signers,required"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiffJSON `json:"-"` }
Account ownerships diff of the requested account address
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiff) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAccountOwnershipsDiff) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiff ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiff struct { // Asset involved in the transfer Asset StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset `json:"asset,required"` // Incoming transfers of the asset In StellarAssetTransferDetailsSchema `json:"in,nullable"` // Outgoing transfers of the asset Out StellarAssetTransferDetailsSchema `json:"out,nullable"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiff) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiff) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset struct { // Type of the asset (`ASSET`) Type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType `json:"type"` // Asset code Code string `json:"code"` // Asset issuer address Issuer string `json:"issuer"` // Organization name OrgName string `json:"org_name"` // Organization URL OrgURL string `json:"org_url"` // Address of the asset's contract Address string `json:"address"` // Asset code Name string `json:"name"` // Asset symbol Symbol string `json:"symbol"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetJSON `json:"-"` // contains filtered or unexported fields }
Asset involved in the transfer
func (StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset) AsUnion ¶ added in v0.11.0
func (r StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset) AsUnion() StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetUnion
AsUnion returns a StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema, StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema, StellarAssetContractDetailsSchema.
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAsset) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema struct { // Asset code Code string `json:"code,required"` // Asset issuer address Issuer string `json:"issuer,required"` // Organization name OrgName string `json:"org_name,required"` // Organization URL OrgURL string `json:"org_url,required"` // Type of the asset (`ASSET`) Type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType `json:"type"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType string
Type of the asset (`ASSET`)
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaTypeAsset StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType = "ASSET"
)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema struct { // Asset code Code StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode `json:"code"` // Type of the asset (`NATIVE`) Type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaType `json:"type"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode string
Asset code
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaCodeXlm StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode = "XLM"
)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaType ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaType string
Type of the asset (`NATIVE`)
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaTypeNative StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchemaType = "NATIVE"
)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType string
Type of the asset (`ASSET`)
const ( StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetTypeAsset StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType = "ASSET" StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetTypeNative StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType = "NATIVE" StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetTypeContract StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetType = "CONTRACT" )
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetUnion ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetUnion interface {
// contains filtered or unexported methods
}
Asset involved in the transfer
Union satisfied by StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarLegacyAssetDetailsSchema, StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryAssetsDiffsAssetStellarNativeAssetDetailsSchema or StellarAssetContractDetailsSchema.
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiff ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiff struct { // Total incoming USD transfers In float64 `json:"in,required"` // Total outgoing USD transfers Out float64 `json:"out,required"` // Total USD transfers Total float64 `json:"total"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiffJSON `json:"-"` }
Total USD diff for the requested account address
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiff) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAccountSummaryTotalUsdDiff) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail struct { // Encoded public key of the account AccountAddress string `json:"account_address,required"` // Description of the account Description string `json:"description,nullable"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetailJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAddressDetail) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff struct { // Asset involved in the transfer Asset StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset `json:"asset,required"` // Incoming transfers of the asset In StellarAssetTransferDetailsSchema `json:"in,nullable"` // Outgoing transfers of the asset Out StellarAssetTransferDetailsSchema `json:"out,nullable"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiff) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset struct { // Type of the asset (`ASSET`) Type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType `json:"type"` // Asset code Code string `json:"code"` // Asset issuer address Issuer string `json:"issuer"` // Organization name OrgName string `json:"org_name"` // Organization URL OrgURL string `json:"org_url"` // Address of the asset's contract Address string `json:"address"` // Asset code Name string `json:"name"` // Asset symbol Symbol string `json:"symbol"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetJSON `json:"-"` // contains filtered or unexported fields }
Asset involved in the transfer
func (StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset) AsUnion ¶ added in v0.11.0
func (r StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset) AsUnion() StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetUnion
AsUnion returns a StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema, StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema, StellarAssetContractDetailsSchema.
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAsset) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema struct { // Asset code Code string `json:"code,required"` // Asset issuer address Issuer string `json:"issuer,required"` // Organization name OrgName string `json:"org_name,required"` // Organization URL OrgURL string `json:"org_url,required"` // Type of the asset (`ASSET`) Type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType `json:"type"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType string
Type of the asset (`ASSET`)
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaTypeAsset StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchemaType = "ASSET"
)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema struct { // Asset code Code StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode `json:"code"` // Type of the asset (`NATIVE`) Type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaType `json:"type"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode string
Asset code
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaCodeXlm StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaCode = "XLM"
)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaType ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaType string
Type of the asset (`NATIVE`)
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaTypeNative StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchemaType = "NATIVE"
)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType string
Type of the asset (`ASSET`)
const ( StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetTypeAsset StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType = "ASSET" StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetTypeNative StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType = "NATIVE" StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetTypeContract StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetType = "CONTRACT" )
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetUnion ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetUnion interface {
// contains filtered or unexported methods
}
Asset involved in the transfer
Union satisfied by StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarLegacyAssetDetailsSchema, StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsDiffsAssetStellarNativeAssetDetailsSchema or StellarAssetContractDetailsSchema.
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff struct { // List of public keys that can sign on behalf of the account post-transaction PostSigners []string `json:"post_signers,required"` // List of public keys that can sign on behalf of the account pre-transaction PreSigners []string `json:"pre_signers,required"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiffJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaAssetsOwnershipDiff) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure struct { Asset StellarAssetContractDetailsSchema `json:"asset,required"` // Mapping between the address of a Spender to the exposure of the asset during the // transaction Spenders map[string]StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpender `json:"spenders"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposureJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposure) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpender ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpender struct { // Raw value of the exposure RawValue int64 `json:"raw_value,required"` // Value of the exposure Value float64 `json:"value,required"` // Summarized description of the exposure Summary string `json:"summary,nullable"` JSON stellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpenderJSON `json:"-"` }
func (*StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpender) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseSimulationStellarSimulationResultSchemaExposuresSpender) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus string
const (
StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatusSuccess StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus = "Success"
)
func (StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseSimulationStellarSimulationResultSchemaStatus) IsKnown() bool
type StellarTransactionScanResponseSimulationUnion ¶ added in v0.11.0
type StellarTransactionScanResponseSimulationUnion interface {
// contains filtered or unexported methods
}
Simulation result; Only present if simulation option is included in the request
Union satisfied by StellarTransactionScanResponseSimulationStellarSimulationResultSchema or StellarTransactionScanResponseSimulationStellarSimulationErrorSchema.
type StellarTransactionScanResponseValidation ¶ added in v0.11.0
type StellarTransactionScanResponseValidation struct { Status StellarTransactionScanResponseValidationStatus `json:"status,required"` // Verdict of the validation ResultType StellarTransactionScanResponseValidationResultType `json:"result_type"` // A textual description about the validation result Description string `json:"description"` // A textual description about the reasons the transaction was flagged with // result_type Reason StellarTransactionScanResponseValidationReason `json:"reason"` // A textual classification that can be presented to the user explaining the // reason. Classification string `json:"classification"` // This field can have the runtime type of // [[]StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature]. Features interface{} `json:"features,required"` // Error message Error string `json:"error"` JSON stellarTransactionScanResponseValidationJSON `json:"-"` // contains filtered or unexported fields }
Validation result; Only present if validation option is included in the request
func (StellarTransactionScanResponseValidation) AsUnion ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidation) AsUnion() StellarTransactionScanResponseValidationUnion
AsUnion returns a StellarTransactionScanResponseValidationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are StellarTransactionScanResponseValidationStellarValidationResultSchema, StellarTransactionScanResponseValidationStellarValidationErrorSchema.
func (*StellarTransactionScanResponseValidation) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseValidation) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseValidationReason ¶ added in v0.11.0
type StellarTransactionScanResponseValidationReason string
A textual description about the reasons the transaction was flagged with result_type
const ( StellarTransactionScanResponseValidationReasonEmpty StellarTransactionScanResponseValidationReason = "" StellarTransactionScanResponseValidationReasonKnownAttacker StellarTransactionScanResponseValidationReason = "known_attacker" StellarTransactionScanResponseValidationReasonKnownFraudulentAsset StellarTransactionScanResponseValidationReason = "known_fraudulent_asset" StellarTransactionScanResponseValidationReasonMaliciousMemo StellarTransactionScanResponseValidationReason = "malicious_memo" StellarTransactionScanResponseValidationReasonUnfairTrade StellarTransactionScanResponseValidationReason = "unfair_trade" StellarTransactionScanResponseValidationReasonTransferFarming StellarTransactionScanResponseValidationReason = "transfer_farming" StellarTransactionScanResponseValidationReasonNativeOwnershipChange StellarTransactionScanResponseValidationReason = "native_ownership_change" StellarTransactionScanResponseValidationReasonOther StellarTransactionScanResponseValidationReason = "other" )
func (StellarTransactionScanResponseValidationReason) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidationReason) IsKnown() bool
type StellarTransactionScanResponseValidationResultType ¶ added in v0.11.0
type StellarTransactionScanResponseValidationResultType string
Verdict of the validation
const ( StellarTransactionScanResponseValidationResultTypeBenign StellarTransactionScanResponseValidationResultType = "Benign" StellarTransactionScanResponseValidationResultTypeWarning StellarTransactionScanResponseValidationResultType = "Warning" StellarTransactionScanResponseValidationResultTypeMalicious StellarTransactionScanResponseValidationResultType = "Malicious" )
func (StellarTransactionScanResponseValidationResultType) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidationResultType) IsKnown() bool
type StellarTransactionScanResponseValidationStatus ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStatus string
const ( StellarTransactionScanResponseValidationStatusSuccess StellarTransactionScanResponseValidationStatus = "Success" StellarTransactionScanResponseValidationStatusError StellarTransactionScanResponseValidationStatus = "Error" )
func (StellarTransactionScanResponseValidationStatus) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidationStatus) IsKnown() bool
type StellarTransactionScanResponseValidationStellarValidationErrorSchema ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationErrorSchema struct { // Error message Error string `json:"error,required"` Status StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus `json:"status,required"` JSON stellarTransactionScanResponseValidationStellarValidationErrorSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseValidationStellarValidationErrorSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseValidationStellarValidationErrorSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus string
const (
StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatusError StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus = "Error"
)
func (StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidationStellarValidationErrorSchemaStatus) IsKnown() bool
type StellarTransactionScanResponseValidationStellarValidationResultSchema ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationResultSchema struct { // A textual classification that can be presented to the user explaining the // reason. Classification string `json:"classification,required"` // A textual description about the validation result Description string `json:"description,required"` // A list of features about this transaction explaining the validation Features []StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature `json:"features,required"` // A textual description about the reasons the transaction was flagged with // result_type Reason StellarTransactionScanResponseValidationStellarValidationResultSchemaReason `json:"reason,required"` // Verdict of the validation ResultType StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType `json:"result_type,required"` Status StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus `json:"status,required"` JSON stellarTransactionScanResponseValidationStellarValidationResultSchemaJSON `json:"-"` }
func (*StellarTransactionScanResponseValidationStellarValidationResultSchema) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseValidationStellarValidationResultSchema) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature struct { // Address the feature refers to Address string `json:"address,required"` // Textual description Description string `json:"description,required"` FeatureID string `json:"feature_id,required"` // Feature Classification Type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType `json:"type,required"` JSON stellarTransactionScanResponseValidationStellarValidationResultSchemaFeatureJSON `json:"-"` }
func (*StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature) UnmarshalJSON ¶ added in v0.11.0
func (r *StellarTransactionScanResponseValidationStellarValidationResultSchemaFeature) UnmarshalJSON(data []byte) (err error)
type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType string
Feature Classification
const ( StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesTypeBenign StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType = "Benign" StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesTypeWarning StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType = "Warning" StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesTypeMalicious StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType = "Malicious" StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesTypeInfo StellarTransactionScanResponseValidationStellarValidationResultSchemaFeaturesType = "Info" )
type StellarTransactionScanResponseValidationStellarValidationResultSchemaReason ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationResultSchemaReason string
A textual description about the reasons the transaction was flagged with result_type
const ( StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonEmpty StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonKnownAttacker StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "known_attacker" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonKnownFraudulentAsset StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "known_fraudulent_asset" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonMaliciousMemo StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "malicious_memo" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonUnfairTrade StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "unfair_trade" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonTransferFarming StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "transfer_farming" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonNativeOwnershipChange StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "native_ownership_change" StellarTransactionScanResponseValidationStellarValidationResultSchemaReasonOther StellarTransactionScanResponseValidationStellarValidationResultSchemaReason = "other" )
func (StellarTransactionScanResponseValidationStellarValidationResultSchemaReason) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidationStellarValidationResultSchemaReason) IsKnown() bool
type StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType string
Verdict of the validation
const ( StellarTransactionScanResponseValidationStellarValidationResultSchemaResultTypeBenign StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType = "Benign" StellarTransactionScanResponseValidationStellarValidationResultSchemaResultTypeWarning StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType = "Warning" StellarTransactionScanResponseValidationStellarValidationResultSchemaResultTypeMalicious StellarTransactionScanResponseValidationStellarValidationResultSchemaResultType = "Malicious" )
type StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus ¶ added in v0.11.0
type StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus string
const (
StellarTransactionScanResponseValidationStellarValidationResultSchemaStatusSuccess StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus = "Success"
)
func (StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus) IsKnown ¶ added in v0.11.0
func (r StellarTransactionScanResponseValidationStellarValidationResultSchemaStatus) IsKnown() bool
type StellarTransactionScanResponseValidationUnion ¶ added in v0.11.0
type StellarTransactionScanResponseValidationUnion interface {
// contains filtered or unexported methods
}
Validation result; Only present if validation option is included in the request
Union satisfied by StellarTransactionScanResponseValidationStellarValidationResultSchema or StellarTransactionScanResponseValidationStellarValidationErrorSchema.
type StellarTransactionService ¶ added in v0.11.0
type StellarTransactionService struct {
Options []option.RequestOption
}
StellarTransactionService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewStellarTransactionService method instead.
func NewStellarTransactionService ¶ added in v0.11.0
func NewStellarTransactionService(opts ...option.RequestOption) (r *StellarTransactionService)
NewStellarTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*StellarTransactionService) Scan ¶ added in v0.11.0
func (r *StellarTransactionService) Scan(ctx context.Context, body StellarTransactionScanParams, opts ...option.RequestOption) (res *StellarTransactionScanResponse, err error)
Scan Transactions
type TokenScanParams ¶ added in v0.7.6
type TokenScanParams struct { // Token address to validate (EVM / Solana / Stellar) Address param.Field[string] `json:"address,required"` // The chain name Chain param.Field[TokenScanSupportedChain] `json:"chain,required"` // Object of additional information to validate against. Metadata param.Field[TokenScanParamsMetadata] `json:"metadata"` }
func (TokenScanParams) MarshalJSON ¶ added in v0.7.6
func (r TokenScanParams) MarshalJSON() (data []byte, err error)
type TokenScanParamsMetadata ¶ added in v0.7.6
type TokenScanParamsMetadata struct { // cross reference transaction against the domain. Domain param.Field[string] `json:"domain"` }
Object of additional information to validate against.
func (TokenScanParamsMetadata) MarshalJSON ¶ added in v0.7.6
func (r TokenScanParamsMetadata) MarshalJSON() (data []byte, err error)
type TokenScanResponse ¶ added in v0.7.6
type TokenScanResponse struct { // Dictionary of detected attacks found during the scan AttackTypes map[string]TokenScanResponseAttackType `json:"attack_types,required"` // Score between 0 to 1 (double) MaliciousScore string `json:"malicious_score,required"` // An enumeration. ResultType TokenScanResponseResultType `json:"result_type,required"` JSON tokenScanResponseJSON `json:"-"` }
func (*TokenScanResponse) UnmarshalJSON ¶ added in v0.7.6
func (r *TokenScanResponse) UnmarshalJSON(data []byte) (err error)
type TokenScanResponseAttackType ¶ added in v0.7.6
type TokenScanResponseAttackType struct { // Score between 0 to 1 (double) that indicates the assurance this attack happened Score string `json:"score,required"` // Object contains an extra information related to the attack Features interface{} `json:"features"` // If score is higher or equal to this field, the token is using this attack type Threshold string `json:"threshold"` JSON tokenScanResponseAttackTypeJSON `json:"-"` }
func (*TokenScanResponseAttackType) UnmarshalJSON ¶ added in v0.7.6
func (r *TokenScanResponseAttackType) UnmarshalJSON(data []byte) (err error)
type TokenScanResponseResultType ¶ added in v0.7.6
type TokenScanResponseResultType string
An enumeration.
const ( TokenScanResponseResultTypeBenign TokenScanResponseResultType = "Benign" TokenScanResponseResultTypeWarning TokenScanResponseResultType = "Warning" TokenScanResponseResultTypeMalicious TokenScanResponseResultType = "Malicious" TokenScanResponseResultTypeSpam TokenScanResponseResultType = "Spam" )
func (TokenScanResponseResultType) IsKnown ¶ added in v0.7.6
func (r TokenScanResponseResultType) IsKnown() bool
type TokenScanSupportedChain ¶ added in v0.7.6
type TokenScanSupportedChain string
The chain name
const ( TokenScanSupportedChainArbitrum TokenScanSupportedChain = "arbitrum" TokenScanSupportedChainAvalanche TokenScanSupportedChain = "avalanche" TokenScanSupportedChainBase TokenScanSupportedChain = "base" TokenScanSupportedChainBsc TokenScanSupportedChain = "bsc" TokenScanSupportedChainEthereum TokenScanSupportedChain = "ethereum" TokenScanSupportedChainOptimism TokenScanSupportedChain = "optimism" TokenScanSupportedChainPolygon TokenScanSupportedChain = "polygon" TokenScanSupportedChainZora TokenScanSupportedChain = "zora" TokenScanSupportedChainSolana TokenScanSupportedChain = "solana" TokenScanSupportedChainStellar TokenScanSupportedChain = "stellar" TokenScanSupportedChainUnknown TokenScanSupportedChain = "unknown" )
func (TokenScanSupportedChain) IsKnown ¶ added in v0.7.6
func (r TokenScanSupportedChain) IsKnown() bool
type TokenService ¶ added in v0.7.6
type TokenService struct {
Options []option.RequestOption
}
TokenService contains methods and other services that help with interacting with the blockaid API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenService method instead.
func NewTokenService ¶ added in v0.7.6
func NewTokenService(opts ...option.RequestOption) (r *TokenService)
NewTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenService) Scan ¶ added in v0.7.6
func (r *TokenService) Scan(ctx context.Context, body TokenScanParams, opts ...option.RequestOption) (res *TokenScanResponse, err error)
Gets a token address and scan the token to identify any indication of malicious behaviour
type TransactionScanFeature ¶
type TransactionScanFeature struct { // Textual description Description string `json:"description,required"` // Feature name FeatureID string `json:"feature_id,required"` // An enumeration. Type TransactionScanFeatureType `json:"type,required"` // Address the feature refers to Address string `json:"address"` JSON transactionScanFeatureJSON `json:"-"` }
func (*TransactionScanFeature) UnmarshalJSON ¶
func (r *TransactionScanFeature) UnmarshalJSON(data []byte) (err error)
type TransactionScanFeatureType ¶
type TransactionScanFeatureType string
An enumeration.
const ( TransactionScanFeatureTypeMalicious TransactionScanFeatureType = "Malicious" TransactionScanFeatureTypeWarning TransactionScanFeatureType = "Warning" TransactionScanFeatureTypeBenign TransactionScanFeatureType = "Benign" TransactionScanFeatureTypeInfo TransactionScanFeatureType = "Info" )
func (TransactionScanFeatureType) IsKnown ¶
func (r TransactionScanFeatureType) IsKnown() bool
type TransactionScanResponse ¶
type TransactionScanResponse struct { Block string `json:"block,required"` Chain string `json:"chain,required"` AccountAddress string `json:"account_address"` Events []TransactionScanResponseEvent `json:"events"` Features interface{} `json:"features"` GasEstimation TransactionScanResponseGasEstimation `json:"gas_estimation"` Simulation TransactionScanResponseSimulation `json:"simulation"` Validation TransactionScanResponseValidation `json:"validation"` JSON transactionScanResponseJSON `json:"-"` }
func (*TransactionScanResponse) UnmarshalJSON ¶
func (r *TransactionScanResponse) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseEvent ¶ added in v0.7.5
type TransactionScanResponseEvent struct { Data string `json:"data,required"` EmitterAddress string `json:"emitter_address,required"` Topics []string `json:"topics,required"` EmitterName string `json:"emitter_name"` Name string `json:"name"` Params []TransactionScanResponseEventsParam `json:"params"` JSON transactionScanResponseEventJSON `json:"-"` }
func (*TransactionScanResponseEvent) UnmarshalJSON ¶ added in v0.7.5
func (r *TransactionScanResponseEvent) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseEventsParam ¶ added in v0.7.5
type TransactionScanResponseEventsParam struct { Type string `json:"type,required"` Value TransactionScanResponseEventsParamsValueUnion `json:"value,required"` InternalType string `json:"internalType"` Name string `json:"name"` JSON transactionScanResponseEventsParamJSON `json:"-"` }
func (*TransactionScanResponseEventsParam) UnmarshalJSON ¶ added in v0.7.5
func (r *TransactionScanResponseEventsParam) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseEventsParamsValueArray ¶ added in v0.7.5
type TransactionScanResponseEventsParamsValueArray []interface{}
func (TransactionScanResponseEventsParamsValueArray) ImplementsTransactionScanResponseEventsParamsValueUnion ¶ added in v0.7.5
func (r TransactionScanResponseEventsParamsValueArray) ImplementsTransactionScanResponseEventsParamsValueUnion()
type TransactionScanResponseEventsParamsValueUnion ¶ added in v0.7.5
type TransactionScanResponseEventsParamsValueUnion interface {
ImplementsTransactionScanResponseEventsParamsValueUnion()
}
Union satisfied by shared.UnionString, [TransactionScanResponseEventsParamsValueUnknown] or TransactionScanResponseEventsParamsValueArray.
type TransactionScanResponseGasEstimation ¶ added in v0.7.5
type TransactionScanResponseGasEstimation struct { Status TransactionScanResponseGasEstimationStatus `json:"status,required"` Used int64 `json:"used"` Estimate int64 `json:"estimate"` Error string `json:"error"` JSON transactionScanResponseGasEstimationJSON `json:"-"` // contains filtered or unexported fields }
func (TransactionScanResponseGasEstimation) AsUnion ¶ added in v0.7.5
func (r TransactionScanResponseGasEstimation) AsUnion() TransactionScanResponseGasEstimationUnion
AsUnion returns a TransactionScanResponseGasEstimationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are TransactionScanResponseGasEstimationTransactionScanGasEstimation, TransactionScanResponseGasEstimationTransactionScanGasEstimationError.
func (*TransactionScanResponseGasEstimation) UnmarshalJSON ¶ added in v0.7.5
func (r *TransactionScanResponseGasEstimation) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseGasEstimationStatus ¶ added in v0.8.0
type TransactionScanResponseGasEstimationStatus string
const ( TransactionScanResponseGasEstimationStatusSuccess TransactionScanResponseGasEstimationStatus = "Success" TransactionScanResponseGasEstimationStatusError TransactionScanResponseGasEstimationStatus = "Error" )
func (TransactionScanResponseGasEstimationStatus) IsKnown ¶ added in v0.8.0
func (r TransactionScanResponseGasEstimationStatus) IsKnown() bool
type TransactionScanResponseGasEstimationTransactionScanGasEstimation ¶ added in v0.7.5
type TransactionScanResponseGasEstimationTransactionScanGasEstimation struct { Estimate int64 `json:"estimate,required"` Status TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus `json:"status,required"` Used int64 `json:"used,required"` JSON transactionScanResponseGasEstimationTransactionScanGasEstimationJSON `json:"-"` }
func (*TransactionScanResponseGasEstimationTransactionScanGasEstimation) UnmarshalJSON ¶ added in v0.7.5
func (r *TransactionScanResponseGasEstimationTransactionScanGasEstimation) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseGasEstimationTransactionScanGasEstimationError ¶ added in v0.7.5
type TransactionScanResponseGasEstimationTransactionScanGasEstimationError struct { Error string `json:"error,required"` Status TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus `json:"status,required"` JSON transactionScanResponseGasEstimationTransactionScanGasEstimationErrorJSON `json:"-"` }
func (*TransactionScanResponseGasEstimationTransactionScanGasEstimationError) UnmarshalJSON ¶ added in v0.7.5
func (r *TransactionScanResponseGasEstimationTransactionScanGasEstimationError) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus ¶ added in v0.8.0
type TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus string
const (
TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatusError TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus = "Error"
)
func (TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus) IsKnown ¶ added in v0.8.0
func (r TransactionScanResponseGasEstimationTransactionScanGasEstimationErrorStatus) IsKnown() bool
type TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus ¶ added in v0.8.0
type TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus string
const (
TransactionScanResponseGasEstimationTransactionScanGasEstimationStatusSuccess TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus = "Success"
)
func (TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus) IsKnown ¶ added in v0.8.0
func (r TransactionScanResponseGasEstimationTransactionScanGasEstimationStatus) IsKnown() bool
type TransactionScanResponseGasEstimationUnion ¶ added in v0.7.5
type TransactionScanResponseGasEstimationUnion interface {
// contains filtered or unexported methods
}
Union satisfied by TransactionScanResponseGasEstimationTransactionScanGasEstimation or TransactionScanResponseGasEstimationTransactionScanGasEstimationError.
type TransactionScanResponseSimulation ¶
type TransactionScanResponseSimulation struct { // A string indicating if the simulation was successful or not. Status TransactionScanResponseSimulationStatus `json:"status,required"` // This field can have the runtime type of [map[string][]AssetDiff]. AssetsDiffs interface{} `json:"assets_diffs,required"` // This field can have the runtime type of [map[string]UsdDiff]. TotalUsdDiff interface{} `json:"total_usd_diff,required"` // This field can have the runtime type of [map[string][]AddressAssetExposure]. Exposures interface{} `json:"exposures,required"` // This field can have the runtime type of [map[string]map[string]string]. TotalUsdExposure interface{} `json:"total_usd_exposure,required"` // This field can have the runtime type of // [map[string]TransactionSimulationAddressDetail]. AddressDetails interface{} `json:"address_details,required"` // This field can have the runtime type of [TransactionSimulationAccountSummary]. AccountSummary interface{} `json:"account_summary,required"` // An error message if the simulation failed. Error string `json:"error"` JSON transactionScanResponseSimulationJSON `json:"-"` // contains filtered or unexported fields }
func (TransactionScanResponseSimulation) AsUnion ¶
func (r TransactionScanResponseSimulation) AsUnion() TransactionScanResponseSimulationUnion
AsUnion returns a TransactionScanResponseSimulationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are TransactionSimulation, TransactionSimulationError.
func (*TransactionScanResponseSimulation) UnmarshalJSON ¶
func (r *TransactionScanResponseSimulation) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseSimulationStatus ¶ added in v0.8.0
type TransactionScanResponseSimulationStatus string
A string indicating if the simulation was successful or not.
const ( TransactionScanResponseSimulationStatusSuccess TransactionScanResponseSimulationStatus = "Success" TransactionScanResponseSimulationStatusError TransactionScanResponseSimulationStatus = "Error" )
func (TransactionScanResponseSimulationStatus) IsKnown ¶ added in v0.8.0
func (r TransactionScanResponseSimulationStatus) IsKnown() bool
type TransactionScanResponseSimulationUnion ¶
type TransactionScanResponseSimulationUnion interface {
// contains filtered or unexported methods
}
Union satisfied by TransactionSimulation or TransactionSimulationError.
type TransactionScanResponseValidation ¶
type TransactionScanResponseValidation struct { // A string indicating if the simulation was successful or not. Status TransactionScanResponseValidationStatus `json:"status,required"` // An enumeration. ResultType TransactionScanResponseValidationResultType `json:"result_type,required"` // A textual description that can be presented to the user about what this // transaction is doing. Description string `json:"description"` // A textual description about the reasons the transaction was flagged with // result_type. Reason string `json:"reason"` // A textual classification that can be presented to the user explaining the // reason. Classification string `json:"classification"` // This field can have the runtime type of [[]TransactionScanFeature]. Features interface{} `json:"features"` // An error message if the validation failed. Error string `json:"error"` JSON transactionScanResponseValidationJSON `json:"-"` // contains filtered or unexported fields }
func (TransactionScanResponseValidation) AsUnion ¶
func (r TransactionScanResponseValidation) AsUnion() TransactionScanResponseValidationUnion
AsUnion returns a TransactionScanResponseValidationUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are TransactionValidation, TransactionValidationError.
func (*TransactionScanResponseValidation) UnmarshalJSON ¶
func (r *TransactionScanResponseValidation) UnmarshalJSON(data []byte) (err error)
type TransactionScanResponseValidationResultType ¶
type TransactionScanResponseValidationResultType string
An enumeration.
const ( TransactionScanResponseValidationResultTypeBenign TransactionScanResponseValidationResultType = "Benign" TransactionScanResponseValidationResultTypeWarning TransactionScanResponseValidationResultType = "Warning" TransactionScanResponseValidationResultTypeMalicious TransactionScanResponseValidationResultType = "Malicious" TransactionScanResponseValidationResultTypeError TransactionScanResponseValidationResultType = "Error" )
func (TransactionScanResponseValidationResultType) IsKnown ¶
func (r TransactionScanResponseValidationResultType) IsKnown() bool
type TransactionScanResponseValidationStatus ¶ added in v0.9.1
type TransactionScanResponseValidationStatus string
A string indicating if the simulation was successful or not.
const (
TransactionScanResponseValidationStatusSuccess TransactionScanResponseValidationStatus = "Success"
)
func (TransactionScanResponseValidationStatus) IsKnown ¶ added in v0.9.1
func (r TransactionScanResponseValidationStatus) IsKnown() bool
type TransactionScanResponseValidationUnion ¶
type TransactionScanResponseValidationUnion interface {
// contains filtered or unexported methods
}
Union satisfied by TransactionValidation or TransactionValidationError.
type TransactionScanSupportedChain ¶ added in v0.7.5
type TransactionScanSupportedChain string
The chain name
const ( TransactionScanSupportedChainArbitrum TransactionScanSupportedChain = "arbitrum" TransactionScanSupportedChainAvalanche TransactionScanSupportedChain = "avalanche" TransactionScanSupportedChainBase TransactionScanSupportedChain = "base" TransactionScanSupportedChainBaseSepolia TransactionScanSupportedChain = "base-sepolia" TransactionScanSupportedChainBsc TransactionScanSupportedChain = "bsc" TransactionScanSupportedChainEthereum TransactionScanSupportedChain = "ethereum" TransactionScanSupportedChainOptimism TransactionScanSupportedChain = "optimism" TransactionScanSupportedChainPolygon TransactionScanSupportedChain = "polygon" TransactionScanSupportedChainZksync TransactionScanSupportedChain = "zksync" TransactionScanSupportedChainZksyncSepolia TransactionScanSupportedChain = "zksync-sepolia" TransactionScanSupportedChainZora TransactionScanSupportedChain = "zora" TransactionScanSupportedChainLinea TransactionScanSupportedChain = "linea" TransactionScanSupportedChainBlast TransactionScanSupportedChain = "blast" TransactionScanSupportedChainScroll TransactionScanSupportedChain = "scroll" TransactionScanSupportedChainEthereumSepolia TransactionScanSupportedChain = "ethereum-sepolia" TransactionScanSupportedChainDegen TransactionScanSupportedChain = "degen" TransactionScanSupportedChainAvalancheFuji TransactionScanSupportedChain = "avalanche-fuji" )
func (TransactionScanSupportedChain) IsKnown ¶ added in v0.7.5
func (r TransactionScanSupportedChain) IsKnown() bool
type TransactionSimulation ¶
type TransactionSimulation struct { // Account summary for the account address. account address is determined implicit // by the `from` field in the transaction request, or explicit by the // account_address field in the request. AccountSummary TransactionSimulationAccountSummary `json:"account_summary,required"` // a dictionary including additional information about each relevant address in the // transaction. AddressDetails map[string]TransactionSimulationAddressDetail `json:"address_details,required"` // dictionary describes the assets differences as a result of this transaction for // every involved address AssetsDiffs map[string][]AssetDiff `json:"assets_diffs,required"` // dictionary describes the exposure differences as a result of this transaction // for every involved address (as a result of any approval / setApproval / permit // function) Exposures map[string][]AddressAssetExposure `json:"exposures,required"` // A string indicating if the simulation was successful or not. Status TransactionSimulationStatus `json:"status,required"` // dictionary represents the usd value each address gained / lost during this // transaction TotalUsdDiff map[string]UsdDiff `json:"total_usd_diff,required"` // a dictionary representing the usd value each address is exposed to, split by // spenders TotalUsdExposure map[string]map[string]string `json:"total_usd_exposure,required"` JSON transactionSimulationJSON `json:"-"` }
func (*TransactionSimulation) UnmarshalJSON ¶
func (r *TransactionSimulation) UnmarshalJSON(data []byte) (err error)
type TransactionSimulationAccountSummary ¶
type TransactionSimulationAccountSummary struct { // All assets diffs related to the account address AssetsDiffs []AssetDiff `json:"assets_diffs,required"` // All assets exposures related to the account address Exposures []AddressAssetExposure `json:"exposures,required"` // Total usd diff related to the account address TotalUsdDiff UsdDiff `json:"total_usd_diff,required"` // Total usd exposure related to the account address TotalUsdExposure map[string]string `json:"total_usd_exposure,required"` JSON transactionSimulationAccountSummaryJSON `json:"-"` }
Account summary for the account address. account address is determined implicit by the `from` field in the transaction request, or explicit by the account_address field in the request.
func (*TransactionSimulationAccountSummary) UnmarshalJSON ¶
func (r *TransactionSimulationAccountSummary) UnmarshalJSON(data []byte) (err error)
type TransactionSimulationAddressDetail ¶
type TransactionSimulationAddressDetail struct { // contains the contract's name if the address is a verified contract ContractName string `json:"contract_name"` // known name tag for the address NameTag string `json:"name_tag"` JSON transactionSimulationAddressDetailJSON `json:"-"` }
func (*TransactionSimulationAddressDetail) UnmarshalJSON ¶
func (r *TransactionSimulationAddressDetail) UnmarshalJSON(data []byte) (err error)
type TransactionSimulationError ¶ added in v0.7.3
type TransactionSimulationError struct { // An error message if the simulation failed. Error string `json:"error,required"` // A string indicating if the simulation was successful or not. Status TransactionSimulationErrorStatus `json:"status,required"` JSON transactionSimulationErrorJSON `json:"-"` }
func (*TransactionSimulationError) UnmarshalJSON ¶ added in v0.7.3
func (r *TransactionSimulationError) UnmarshalJSON(data []byte) (err error)
type TransactionSimulationErrorStatus ¶ added in v0.8.0
type TransactionSimulationErrorStatus string
A string indicating if the simulation was successful or not.
const (
TransactionSimulationErrorStatusError TransactionSimulationErrorStatus = "Error"
)
func (TransactionSimulationErrorStatus) IsKnown ¶ added in v0.8.0
func (r TransactionSimulationErrorStatus) IsKnown() bool
type TransactionSimulationStatus ¶ added in v0.8.0
type TransactionSimulationStatus string
A string indicating if the simulation was successful or not.
const (
TransactionSimulationStatusSuccess TransactionSimulationStatus = "Success"
)
func (TransactionSimulationStatus) IsKnown ¶ added in v0.8.0
func (r TransactionSimulationStatus) IsKnown() bool
type TransactionValidation ¶
type TransactionValidation struct { // A list of features about this transaction explaining the validation. Features []TransactionScanFeature `json:"features,required"` // An enumeration. ResultType TransactionValidationResultType `json:"result_type,required"` // A string indicating if the simulation was successful or not. Status TransactionValidationStatus `json:"status,required"` // A textual classification that can be presented to the user explaining the // reason. Classification string `json:"classification"` // A textual description that can be presented to the user about what this // transaction is doing. Description string `json:"description"` // A textual description about the reasons the transaction was flagged with // result_type. Reason string `json:"reason"` JSON transactionValidationJSON `json:"-"` }
func (*TransactionValidation) UnmarshalJSON ¶
func (r *TransactionValidation) UnmarshalJSON(data []byte) (err error)
type TransactionValidationError ¶ added in v0.7.3
type TransactionValidationError struct { // A textual classification that can be presented to the user explaining the // reason. Classification TransactionValidationErrorClassification `json:"classification,required"` // A textual description that can be presented to the user about what this // transaction is doing. Description TransactionValidationErrorDescription `json:"description,required"` // An error message if the validation failed. Error string `json:"error,required"` // A list of features about this transaction explaining the validation. Features []TransactionScanFeature `json:"features,required"` // A textual description about the reasons the transaction was flagged with // result_type. Reason TransactionValidationErrorReason `json:"reason,required"` // A string indicating if the transaction is safe to sign or not. ResultType TransactionValidationErrorResultType `json:"result_type,required"` // A string indicating if the simulation was successful or not. Status TransactionValidationErrorStatus `json:"status,required"` JSON transactionValidationErrorJSON `json:"-"` }
func (*TransactionValidationError) UnmarshalJSON ¶ added in v0.7.3
func (r *TransactionValidationError) UnmarshalJSON(data []byte) (err error)
type TransactionValidationErrorClassification ¶ added in v0.7.3
type TransactionValidationErrorClassification string
A textual classification that can be presented to the user explaining the reason.
const (
TransactionValidationErrorClassificationEmpty TransactionValidationErrorClassification = ""
)
func (TransactionValidationErrorClassification) IsKnown ¶ added in v0.7.3
func (r TransactionValidationErrorClassification) IsKnown() bool
type TransactionValidationErrorDescription ¶ added in v0.7.3
type TransactionValidationErrorDescription string
A textual description that can be presented to the user about what this transaction is doing.
const (
TransactionValidationErrorDescriptionEmpty TransactionValidationErrorDescription = ""
)
func (TransactionValidationErrorDescription) IsKnown ¶ added in v0.7.3
func (r TransactionValidationErrorDescription) IsKnown() bool
type TransactionValidationErrorReason ¶ added in v0.7.3
type TransactionValidationErrorReason string
A textual description about the reasons the transaction was flagged with result_type.
const (
TransactionValidationErrorReasonEmpty TransactionValidationErrorReason = ""
)
func (TransactionValidationErrorReason) IsKnown ¶ added in v0.7.3
func (r TransactionValidationErrorReason) IsKnown() bool
type TransactionValidationErrorResultType ¶ added in v0.7.3
type TransactionValidationErrorResultType string
A string indicating if the transaction is safe to sign or not.
const (
TransactionValidationErrorResultTypeError TransactionValidationErrorResultType = "Error"
)
func (TransactionValidationErrorResultType) IsKnown ¶ added in v0.7.3
func (r TransactionValidationErrorResultType) IsKnown() bool
type TransactionValidationErrorStatus ¶ added in v0.9.1
type TransactionValidationErrorStatus string
A string indicating if the simulation was successful or not.
const (
TransactionValidationErrorStatusSuccess TransactionValidationErrorStatus = "Success"
)
func (TransactionValidationErrorStatus) IsKnown ¶ added in v0.9.1
func (r TransactionValidationErrorStatus) IsKnown() bool
type TransactionValidationResultType ¶
type TransactionValidationResultType string
An enumeration.
const ( TransactionValidationResultTypeBenign TransactionValidationResultType = "Benign" TransactionValidationResultTypeWarning TransactionValidationResultType = "Warning" TransactionValidationResultTypeMalicious TransactionValidationResultType = "Malicious" )
func (TransactionValidationResultType) IsKnown ¶
func (r TransactionValidationResultType) IsKnown() bool
type TransactionValidationStatus ¶ added in v0.9.1
type TransactionValidationStatus string
A string indicating if the simulation was successful or not.
const (
TransactionValidationStatusSuccess TransactionValidationStatus = "Success"
)
func (TransactionValidationStatus) IsKnown ¶ added in v0.9.1
func (r TransactionValidationStatus) IsKnown() bool