Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func RequestExpiry(durationMsFromNow int64) int64
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type AbiParameter
- type AbiParameterResp
- type AbiSchema
- type AbiSchemaItem
- type AbiSchemaItemResp
- type AbiSchemaResp
- type AccessListEntry
- type AccessListEntryResp
- type AccountService
- type ActionRequestBodyCondition
- type ActionRequestBodyConditionFieldSource
- type ActionRequestBodyConditionResp
- type AdditionalSignerInput
- type AdditionalSignerInputResp
- type AdditionalSignerItemInput
- type AdditionalSignerItemInputResp
- type Address
- type AggregationCondition
- type AggregationConditionFieldSource
- type AggregationConditionResp
- type AggregationService
- type AlchemyPaymasterContext
- type AllowlistDeletionResponse
- type AllowlistEntry
- type AmountType
- type AnalyticsService
- type AppAllowlistConfig
- type AppAllowlistDeleteParams
- type AppAllowlistNewParams
- type AppAllowlistService
- func (r *AppAllowlistService) Delete(ctx context.Context, appID string, body AppAllowlistDeleteParams, ...) (res *AllowlistDeletionResponse, err error)
- func (r *AppAllowlistService) List(ctx context.Context, appID string, opts ...option.RequestOption) (res *[]AllowlistEntry, err error)
- func (r *AppAllowlistService) New(ctx context.Context, appID string, body AppAllowlistNewParams, ...) (res *AllowlistEntry, err error)
- type AppCustomOAuthProvider
- type AppGetGasSpendParams
- type AppResponse
- type AppResponseDataClassification
- type AppService
- func (r *AppService) Get(ctx context.Context, appID string, opts ...option.RequestOption) (res *AppResponse, err error)
- func (r *AppService) GetGasSpend(ctx context.Context, query AppGetGasSpendParams, opts ...option.RequestOption) (res *GasSpendResponseBody, err error)
- func (r *AppService) GetTestCredentials(ctx context.Context, appID string, opts ...option.RequestOption) (res *TestAccountsResponse, err error)
- type AuthorizationKey
- type BaseActionResult
- type BaseIntentResponse
- type BlockInfo
- type BridgeCryptoDepositMetadata
- type BridgeCryptoDepositMetadataMethod
- type BridgeCryptoDepositMetadataType
- type BridgeCryptoTransferMetadata
- type BridgeCryptoTransferMetadataMethod
- type BridgeCryptoTransferMetadataType
- type BridgeFiatDepositMetadata
- type BridgeFiatDepositMetadataMethod
- type BridgeFiatDepositMetadataType
- type BridgeFiatTransferMetadata
- type BridgeFiatTransferMetadataMethod
- type BridgeFiatTransferMetadataType
- type BridgeMetadataUnion
- func (u BridgeMetadataUnion) AsBridgeCryptoDepositMetadata() (v BridgeCryptoDepositMetadata)
- func (u BridgeMetadataUnion) AsBridgeCryptoTransferMetadata() (v BridgeCryptoTransferMetadata)
- func (u BridgeMetadataUnion) AsBridgeFiatDepositMetadata() (v BridgeFiatDepositMetadata)
- func (u BridgeMetadataUnion) AsBridgeFiatTransferMetadata() (v BridgeFiatTransferMetadata)
- func (u BridgeMetadataUnion) AsBridgeRefundMetadata() (v BridgeRefundMetadata)
- func (u BridgeMetadataUnion) AsBridgeStaticMemoDepositMetadata() (v BridgeStaticMemoDepositMetadata)
- func (u BridgeMetadataUnion) AsBridgeTransferRefundMetadata() (v BridgeTransferRefundMetadata)
- func (u BridgeMetadataUnion) RawJSON() string
- func (r *BridgeMetadataUnion) UnmarshalJSON(data []byte) error
- type BridgeRefundMetadata
- type BridgeRefundMetadataMethod
- type BridgeRefundMetadataType
- type BridgeStaticMemoDepositMetadata
- type BridgeStaticMemoDepositMetadataMethod
- type BridgeStaticMemoDepositMetadataType
- type BridgeTransferRefundMetadata
- type BridgeTransferRefundMetadataMethod
- type BridgeTransferRefundMetadataType
- type Caip2
- type CaptchaProvider
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type ClientAuthService
- type ConditionOperator
- type ConditionValueUnion
- type ConditionValueUnionResp
- type CrossAppEmbeddedWallet
- type CrossAppService
- type CrossAppSmartWallet
- type Currency
- type CurrencyAsset
- type CurveSigningChainType
- type CustodianTransactionWalletActionStep
- type CustodianTransactionWalletActionStepStatus
- type CustodianTransactionWalletActionStepType
- type CustomMetadata
- type CustomMetadataItemUnion
- type CustomMetadataItemUnionResp
- type CustomMetadataResp
- type CustomOAuthProviderID
- type CustomTokenTransferSource
- type CustomTokenTransferSourceResp
- type DeveloperFee
- type DeveloperFeeType
- type EarnDepositActionResponse
- type EarnDepositActionResponseType
- type EarnDepositRequestBody
- type EarnFeeCollectActionResponse
- type EarnFeeCollectActionResponseType
- type EarnIncentiveClaimActionResponse
- type EarnIncentiveClaimActionResponseType
- type EarnIncentiveClaimRequestBody
- type EarnIncetiveClaimRewardEntry
- type EarnWithdrawActionResponse
- type EarnWithdrawActionResponseType
- type EarnWithdrawRequestBody
- type EmailDomain
- type EmailDomainInviteInput
- type EmailDomainInviteInputType
- type EmailInviteInput
- type EmailInviteInputType
- type EmailMfaMethod
- type EmailMfaMethodType
- type EmbeddedWalletChainConfig
- type EmbeddedWalletConfigSchema
- type EmbeddedWalletCreateOnLogin
- type EmbeddedWalletInputSchema
- type EmbeddedWalletMode
- type EmbeddedWalletRecoveryMethod
- type EmbeddedWalletService
- type EncryptedAuthorizationKey
- type EncryptedAuthorizationKeyEncryptionType
- type EncryptedWalletAuthenticateResponse
- type Error
- type Ethereum7702AuthorizationCondition
- type Ethereum7702AuthorizationConditionField
- type Ethereum7702AuthorizationConditionFieldSource
- type Ethereum7702AuthorizationConditionResp
- type EthereumCalldataCondition
- type EthereumCalldataConditionFieldSource
- type EthereumCalldataConditionResp
- type EthereumPersonalSignRpcInput
- type EthereumPersonalSignRpcInputChainType
- type EthereumPersonalSignRpcInputMethod
- type EthereumPersonalSignRpcInputParams
- type EthereumPersonalSignRpcInputParamsEncoding
- type EthereumPersonalSignRpcInputParamsResp
- type EthereumPersonalSignRpcInputResp
- type EthereumPersonalSignRpcResponse
- type EthereumPersonalSignRpcResponseData
- type EthereumPersonalSignRpcResponseDataEncoding
- type EthereumPersonalSignRpcResponseMethod
- type EthereumSecp256k1SignRpcInput
- type EthereumSecp256k1SignRpcInputChainType
- type EthereumSecp256k1SignRpcInputMethod
- type EthereumSecp256k1SignRpcInputParams
- type EthereumSecp256k1SignRpcInputParamsResp
- type EthereumSecp256k1SignRpcInputResp
- type EthereumSecp256k1SignRpcResponse
- type EthereumSecp256k1SignRpcResponseData
- type EthereumSecp256k1SignRpcResponseDataEncoding
- type EthereumSecp256k1SignRpcResponseMethod
- type EthereumSendCallsCall
- type EthereumSendCallsCallResp
- type EthereumSendCallsRpcInput
- type EthereumSendCallsRpcInputChainType
- type EthereumSendCallsRpcInputMethod
- type EthereumSendCallsRpcInputParams
- type EthereumSendCallsRpcInputParamsResp
- type EthereumSendCallsRpcInputResp
- type EthereumSendCallsRpcResponse
- type EthereumSendCallsRpcResponseData
- type EthereumSendCallsRpcResponseMethod
- type EthereumSendTransactionRpcInput
- type EthereumSendTransactionRpcInputChainType
- type EthereumSendTransactionRpcInputMethod
- type EthereumSendTransactionRpcInputParams
- type EthereumSendTransactionRpcInputParamsResp
- type EthereumSendTransactionRpcInputResp
- type EthereumSendTransactionRpcResponse
- type EthereumSendTransactionRpcResponseData
- type EthereumSendTransactionRpcResponseMethod
- type EthereumSign7702Authorization
- type EthereumSign7702AuthorizationResp
- type EthereumSign7702AuthorizationRpcInput
- type EthereumSign7702AuthorizationRpcInputChainType
- type EthereumSign7702AuthorizationRpcInputMethod
- type EthereumSign7702AuthorizationRpcInputParams
- type EthereumSign7702AuthorizationRpcInputParamsExecutor
- type EthereumSign7702AuthorizationRpcInputParamsResp
- type EthereumSign7702AuthorizationRpcInputResp
- type EthereumSign7702AuthorizationRpcResponse
- type EthereumSign7702AuthorizationRpcResponseData
- type EthereumSign7702AuthorizationRpcResponseMethod
- type EthereumSignTransactionRpcInput
- type EthereumSignTransactionRpcInputChainType
- type EthereumSignTransactionRpcInputMethod
- type EthereumSignTransactionRpcInputParams
- type EthereumSignTransactionRpcInputParamsResp
- type EthereumSignTransactionRpcInputResp
- type EthereumSignTransactionRpcResponse
- type EthereumSignTransactionRpcResponseData
- type EthereumSignTransactionRpcResponseDataEncoding
- type EthereumSignTransactionRpcResponseMethod
- type EthereumSignTypedDataRpcInput
- type EthereumSignTypedDataRpcInputChainType
- type EthereumSignTypedDataRpcInputMethod
- type EthereumSignTypedDataRpcInputParams
- type EthereumSignTypedDataRpcInputParamsResp
- type EthereumSignTypedDataRpcInputResp
- type EthereumSignTypedDataRpcResponse
- type EthereumSignTypedDataRpcResponseData
- type EthereumSignTypedDataRpcResponseDataEncoding
- type EthereumSignTypedDataRpcResponseMethod
- type EthereumSignUserOperationRpcInput
- type EthereumSignUserOperationRpcInputChainType
- type EthereumSignUserOperationRpcInputMethod
- type EthereumSignUserOperationRpcInputParams
- type EthereumSignUserOperationRpcInputParamsResp
- type EthereumSignUserOperationRpcInputResp
- type EthereumSignUserOperationRpcResponse
- type EthereumSignUserOperationRpcResponseData
- type EthereumSignUserOperationRpcResponseDataEncoding
- type EthereumSignUserOperationRpcResponseMethod
- type EthereumTransactionCondition
- type EthereumTransactionConditionField
- type EthereumTransactionConditionFieldSource
- type EthereumTransactionConditionResp
- type EthereumTypedDataDomainCondition
- type EthereumTypedDataDomainConditionField
- type EthereumTypedDataDomainConditionFieldSource
- type EthereumTypedDataDomainConditionResp
- type EthereumTypedDataInput
- type EthereumTypedDataInputResp
- type EthereumTypedDataMessageCondition
- type EthereumTypedDataMessageConditionFieldSource
- type EthereumTypedDataMessageConditionResp
- type EvmTransactionWalletActionStep
- type EvmTransactionWalletActionStepType
- type EvmUserOperationEntrypointVersion
- type EvmUserOperationWalletActionStep
- type EvmUserOperationWalletActionStepType
- type EvmWalletActionStepStatus
- type ExportPrivateKeyRpcInput
- type ExportPrivateKeyRpcInputMethod
- type ExportPrivateKeyRpcInputResp
- type ExportPrivateKeyRpcResponse
- type ExportPrivateKeyRpcResponseMethod
- type ExportSeedPhraseRpcInput
- type ExportSeedPhraseRpcInputMethod
- type ExportSeedPhraseRpcInputResp
- type ExportSeedPhraseRpcResponse
- type ExportSeedPhraseRpcResponseMethod
- type ExportType
- type ExternalTransactionWalletActionStep
- type ExternalTransactionWalletActionStepStatus
- type ExternalTransactionWalletActionStepType
- type FailureReason
- type FeeConfiguration
- type FeeConfigurationResp
- type FeeConfigurationType
- type FeeLineItemUnion
- func (u FeeLineItemUnion) AsAny() anyFeeLineItem
- func (u FeeLineItemUnion) AsDeveloper() (v DeveloperFee)
- func (u FeeLineItemUnion) AsPrivy() (v PrivyFee)
- func (u FeeLineItemUnion) AsRelayer() (v RelayerFee)
- func (u FeeLineItemUnion) RawJSON() string
- func (r *FeeLineItemUnion) UnmarshalJSON(data []byte) error
- type FirstClassChainType
- type FundingConfigResponseSchema
- type FundingMethodEnum
- type FundingOption
- type FundingService
- type FundsDepositedWebhookPayload
- type FundsDepositedWebhookPayloadType
- type FundsWithdrawnWebhookPayload
- type FundsWithdrawnWebhookPayloadType
- type Gas
- type GasSpendCurrency
- type GasSpendResponseBody
- type GetByWalletAddressRequestBody
- type HDInitInput
- type HDInitInputEntropyType
- type HDSubmitInput
- type HDSubmitInputEntropyType
- type Hex
- type HpkeAeadAlgorithm
- type HpkeEncryption
- type HpkeImportConfig
- type IntentAuthorization
- type IntentAuthorizationKeyMember
- type IntentAuthorizationKeyMemberType
- type IntentAuthorizationKeyQuorum
- type IntentAuthorizationKeyQuorumMemberUnion
- func (u IntentAuthorizationKeyQuorumMemberUnion) AsAny() anyIntentAuthorizationKeyQuorumMember
- func (u IntentAuthorizationKeyQuorumMemberUnion) AsKey() (v IntentAuthorizationKeyMember)
- func (u IntentAuthorizationKeyQuorumMemberUnion) AsUser() (v IntentAuthorizationUserMember)
- func (u IntentAuthorizationKeyQuorumMemberUnion) RawJSON() string
- func (r *IntentAuthorizationKeyQuorumMemberUnion) UnmarshalJSON(data []byte) error
- type IntentAuthorizationKeyQuorumType
- type IntentAuthorizationMemberUnion
- func (u IntentAuthorizationMemberUnion) AsAny() anyIntentAuthorizationMember
- func (u IntentAuthorizationMemberUnion) AsKey() (v IntentAuthorizationKeyMember)
- func (u IntentAuthorizationMemberUnion) AsKeyQuorum() (v IntentAuthorizationKeyQuorum)
- func (u IntentAuthorizationMemberUnion) AsUser() (v IntentAuthorizationUserMember)
- func (u IntentAuthorizationMemberUnion) RawJSON() string
- func (r *IntentAuthorizationMemberUnion) UnmarshalJSON(data []byte) error
- type IntentAuthorizationUserMember
- type IntentAuthorizationUserMemberType
- type IntentAuthorizedWebhookPayload
- type IntentAuthorizedWebhookPayloadType
- type IntentCreatedWebhookPayload
- type IntentCreatedWebhookPayloadType
- type IntentDeletePolicyRuleParams
- type IntentExecutedWebhookPayload
- type IntentExecutedWebhookPayloadType
- type IntentFailedWebhookPayload
- type IntentFailedWebhookPayloadType
- type IntentListParams
- type IntentListParamsCurrentUserHasSigned
- type IntentListParamsSortBy
- type IntentNewPolicyRuleParams
- type IntentRejectedWebhookPayload
- type IntentRejectedWebhookPayloadType
- type IntentResponseUnion
- func (u IntentResponseUnion) AsAny() anyIntentResponse
- func (u IntentResponseUnion) AsKeyQuorum() (v KeyQuorumIntentResponse)
- func (u IntentResponseUnion) AsPolicy() (v PolicyIntentResponse)
- func (u IntentResponseUnion) AsRpc() (v RpcIntentResponse)
- func (u IntentResponseUnion) AsRule() (v RuleIntentResponse)
- func (u IntentResponseUnion) AsTransfer() (v TransferIntentResponse)
- func (u IntentResponseUnion) AsWallet() (v WalletIntentResponse)
- func (u IntentResponseUnion) RawJSON() string
- func (r *IntentResponseUnion) UnmarshalJSON(data []byte) error
- type IntentResponseUnionCurrentResourceData
- type IntentResponseUnionRequestDetails
- type IntentResponseUnionRequestDetailsBody
- type IntentResponseUnionRequestDetailsBodyParams
- type IntentResponseUnionRequestDetailsBodyParamsRawData
- type IntentResponseUnionRequestDetailsBodyParamsTransaction
- type IntentRpcParams
- type IntentService
- func (r *IntentService) DeletePolicyRule(ctx context.Context, ruleID string, params IntentDeletePolicyRuleParams, ...) (res *RuleDeleteIntentResponse, err error)
- func (r *IntentService) Get(ctx context.Context, intentID string, opts ...option.RequestOption) (res *IntentResponseUnion, err error)
- func (r *IntentService) List(ctx context.Context, query IntentListParams, opts ...option.RequestOption) (res *pagination.Cursor[IntentResponseUnion], err error)
- func (r *IntentService) ListAutoPaging(ctx context.Context, query IntentListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[IntentResponseUnion]
- func (r *IntentService) NewPolicyRule(ctx context.Context, policyID string, params IntentNewPolicyRuleParams, ...) (res *RuleMutateIntentResponse, err error)
- func (r *IntentService) Rpc(ctx context.Context, walletID string, params IntentRpcParams, ...) (res *RpcIntentResponse, err error)
- func (r *IntentService) Transfer(ctx context.Context, walletID string, params IntentTransferParams, ...) (res *TransferIntentResponse, err error)
- func (r *IntentService) UpdateKeyQuorum(ctx context.Context, keyQuorumID string, params IntentUpdateKeyQuorumParams, ...) (res *KeyQuorumIntentResponse, err error)
- func (r *IntentService) UpdatePolicy(ctx context.Context, policyID string, params IntentUpdatePolicyParams, ...) (res *PolicyIntentResponse, err error)
- func (r *IntentService) UpdatePolicyRule(ctx context.Context, ruleID string, params IntentUpdatePolicyRuleParams, ...) (res *RuleMutateIntentResponse, err error)
- func (r *IntentService) UpdateWallet(ctx context.Context, walletID string, params IntentUpdateWalletParams, ...) (res *WalletIntentResponse, err error)
- type IntentStatus
- type IntentTransferParams
- type IntentType
- type IntentUpdateKeyQuorumParams
- type IntentUpdatePolicyParams
- type IntentUpdatePolicyRuleParams
- type IntentUpdateWalletParams
- type InvalidWebhookError
- type KeyQuorum
- type KeyQuorumCreateRequestBody
- type KeyQuorumDeleteParams
- type KeyQuorumID
- type KeyQuorumIntentResponse
- type KeyQuorumIntentResponseRequestDetails
- type KeyQuorumNewParams
- type KeyQuorumService
- func (r *KeyQuorumService) Delete(ctx context.Context, keyQuorumID KeyQuorumID, body KeyQuorumDeleteParams, ...) (res *SuccessResponse, err error)
- func (r *KeyQuorumService) Get(ctx context.Context, keyQuorumID KeyQuorumID, opts ...option.RequestOption) (res *KeyQuorum, err error)
- func (r *KeyQuorumService) New(ctx context.Context, body KeyQuorumNewParams, opts ...option.RequestOption) (res *KeyQuorum, err error)
- func (r *KeyQuorumService) Update(ctx context.Context, keyQuorumID KeyQuorumID, params KeyQuorumUpdateParams, ...) (res *KeyQuorum, err error)
- type KeyQuorumUpdateParams
- type KeyQuorumUpdateRequestBody
- type KeyQuorumUpdateRequestBodyResp
- type KrakenEmbedService
- type LinkedAccountAppleInput
- type LinkedAccountAppleOAuth
- type LinkedAccountAppleOAuthType
- type LinkedAccountAuthorizationKey
- type LinkedAccountAuthorizationKeyType
- type LinkedAccountBaseWallet
- type LinkedAccountBaseWalletType
- type LinkedAccountBitcoinSegwitEmbeddedWallet
- type LinkedAccountBitcoinSegwitEmbeddedWalletChainType
- type LinkedAccountBitcoinSegwitEmbeddedWalletConnectorType
- type LinkedAccountBitcoinSegwitEmbeddedWalletType
- type LinkedAccountBitcoinSegwitEmbeddedWalletWalletClient
- type LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientType
- type LinkedAccountBitcoinTaprootEmbeddedWallet
- type LinkedAccountBitcoinTaprootEmbeddedWalletChainType
- type LinkedAccountBitcoinTaprootEmbeddedWalletConnectorType
- type LinkedAccountBitcoinTaprootEmbeddedWalletType
- type LinkedAccountBitcoinTaprootEmbeddedWalletWalletClient
- type LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientType
- type LinkedAccountCrossApp
- type LinkedAccountCrossAppType
- type LinkedAccountCurveSigningEmbeddedWallet
- type LinkedAccountCurveSigningEmbeddedWalletConnectorType
- type LinkedAccountCurveSigningEmbeddedWalletType
- type LinkedAccountCurveSigningEmbeddedWalletWalletClient
- type LinkedAccountCurveSigningEmbeddedWalletWalletClientType
- type LinkedAccountCustomJwt
- type LinkedAccountCustomJwtInput
- type LinkedAccountCustomJwtType
- type LinkedAccountCustomOAuth
- type LinkedAccountDiscordInput
- type LinkedAccountDiscordOAuth
- type LinkedAccountDiscordOAuthType
- type LinkedAccountEmail
- type LinkedAccountEmailInput
- type LinkedAccountEmailType
- type LinkedAccountEthereum
- type LinkedAccountEthereumChainType
- type LinkedAccountEthereumEmbeddedWallet
- type LinkedAccountEthereumEmbeddedWalletChainType
- type LinkedAccountEthereumEmbeddedWalletConnectorType
- type LinkedAccountEthereumEmbeddedWalletType
- type LinkedAccountEthereumEmbeddedWalletWalletClient
- type LinkedAccountEthereumEmbeddedWalletWalletClientType
- type LinkedAccountEthereumType
- type LinkedAccountEthereumWalletClient
- type LinkedAccountFarcaster
- type LinkedAccountFarcasterInput
- type LinkedAccountFarcasterType
- type LinkedAccountGitHubInput
- type LinkedAccountGitHubOAuth
- type LinkedAccountGitHubOAuthType
- type LinkedAccountGoogleInput
- type LinkedAccountGoogleOAuth
- type LinkedAccountGoogleOAuthType
- type LinkedAccountInputUnion
- type LinkedAccountInstagramInput
- type LinkedAccountInstagramOAuth
- type LinkedAccountInstagramOAuthType
- type LinkedAccountLineInput
- type LinkedAccountLineOAuth
- type LinkedAccountLineOAuthType
- type LinkedAccountLinkedInInput
- type LinkedAccountLinkedInOAuth
- type LinkedAccountLinkedInOAuthType
- type LinkedAccountPasskey
- type LinkedAccountPasskeyCredentialDeviceType
- type LinkedAccountPasskeyInput
- type LinkedAccountPasskeyType
- type LinkedAccountPhone
- type LinkedAccountPhoneInput
- type LinkedAccountPhoneType
- type LinkedAccountSmartWallet
- type LinkedAccountSmartWalletType
- type LinkedAccountSolana
- type LinkedAccountSolanaChainType
- type LinkedAccountSolanaEmbeddedWallet
- type LinkedAccountSolanaEmbeddedWalletChainType
- type LinkedAccountSolanaEmbeddedWalletConnectorType
- type LinkedAccountSolanaEmbeddedWalletType
- type LinkedAccountSolanaEmbeddedWalletWalletClient
- type LinkedAccountSolanaEmbeddedWalletWalletClientType
- type LinkedAccountSolanaType
- type LinkedAccountSolanaWalletClient
- type LinkedAccountSpotifyInput
- type LinkedAccountSpotifyOAuth
- type LinkedAccountSpotifyOAuthType
- type LinkedAccountTelegram
- type LinkedAccountTelegramInput
- type LinkedAccountTelegramType
- type LinkedAccountTiktokInput
- type LinkedAccountTiktokOAuth
- type LinkedAccountTiktokOAuthType
- type LinkedAccountTwitchInput
- type LinkedAccountTwitchOAuth
- type LinkedAccountTwitchOAuthType
- type LinkedAccountTwitterInput
- type LinkedAccountTwitterOAuth
- type LinkedAccountTwitterOAuthType
- type LinkedAccountType
- type LinkedAccountUnion
- func (u LinkedAccountUnion) AsLinkedAccountAppleOAuth() (v LinkedAccountAppleOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountAuthorizationKey() (v LinkedAccountAuthorizationKey)
- func (u LinkedAccountUnion) AsLinkedAccountBitcoinSegwitEmbeddedWallet() (v LinkedAccountBitcoinSegwitEmbeddedWallet)
- func (u LinkedAccountUnion) AsLinkedAccountBitcoinTaprootEmbeddedWallet() (v LinkedAccountBitcoinTaprootEmbeddedWallet)
- func (u LinkedAccountUnion) AsLinkedAccountCrossApp() (v LinkedAccountCrossApp)
- func (u LinkedAccountUnion) AsLinkedAccountCurveSigningEmbeddedWallet() (v LinkedAccountCurveSigningEmbeddedWallet)
- func (u LinkedAccountUnion) AsLinkedAccountCustomJwt() (v LinkedAccountCustomJwt)
- func (u LinkedAccountUnion) AsLinkedAccountCustomOAuth() (v LinkedAccountCustomOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountDiscordOAuth() (v LinkedAccountDiscordOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountEmail() (v LinkedAccountEmail)
- func (u LinkedAccountUnion) AsLinkedAccountEthereum() (v LinkedAccountEthereum)
- func (u LinkedAccountUnion) AsLinkedAccountEthereumEmbeddedWallet() (v LinkedAccountEthereumEmbeddedWallet)
- func (u LinkedAccountUnion) AsLinkedAccountFarcaster() (v LinkedAccountFarcaster)
- func (u LinkedAccountUnion) AsLinkedAccountGitHubOAuth() (v LinkedAccountGitHubOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountGoogleOAuth() (v LinkedAccountGoogleOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountInstagramOAuth() (v LinkedAccountInstagramOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountLineOAuth() (v LinkedAccountLineOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountLinkedInOAuth() (v LinkedAccountLinkedInOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountPasskey() (v LinkedAccountPasskey)
- func (u LinkedAccountUnion) AsLinkedAccountPhone() (v LinkedAccountPhone)
- func (u LinkedAccountUnion) AsLinkedAccountSmartWallet() (v LinkedAccountSmartWallet)
- func (u LinkedAccountUnion) AsLinkedAccountSolana() (v LinkedAccountSolana)
- func (u LinkedAccountUnion) AsLinkedAccountSolanaEmbeddedWallet() (v LinkedAccountSolanaEmbeddedWallet)
- func (u LinkedAccountUnion) AsLinkedAccountSpotifyOAuth() (v LinkedAccountSpotifyOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountTelegram() (v LinkedAccountTelegram)
- func (u LinkedAccountUnion) AsLinkedAccountTiktokOAuth() (v LinkedAccountTiktokOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountTwitchOAuth() (v LinkedAccountTwitchOAuth)
- func (u LinkedAccountUnion) AsLinkedAccountTwitterOAuth() (v LinkedAccountTwitterOAuth)
- func (u LinkedAccountUnion) RawJSON() string
- func (r *LinkedAccountUnion) UnmarshalJSON(data []byte) error
- type LinkedAccountWalletInput
- type LinkedMfaMethodUnion
- func (u LinkedMfaMethodUnion) AsAny() anyLinkedMfaMethod
- func (u LinkedMfaMethodUnion) AsEmail() (v EmailMfaMethod)
- func (u LinkedMfaMethodUnion) AsPasskey() (v PasskeyMfaMethod)
- func (u LinkedMfaMethodUnion) AsSMS() (v SMSMfaMethod)
- func (u LinkedMfaMethodUnion) AsTotp() (v TotpMfaMethod)
- func (u LinkedMfaMethodUnion) RawJSON() string
- func (r *LinkedMfaMethodUnion) UnmarshalJSON(data []byte) error
- type LogLevel
- type MessageSigningCondition
- type MessageSigningConditionFieldSource
- type MessageSigningConditionResp
- type MessageSigningField
- type MfaDisabledWebhookPayload
- type MfaDisabledWebhookPayloadType
- type MfaEnabledWebhookPayload
- type MfaEnabledWebhookPayloadType
- type MfaMethod
- type NamedTokenTransferSource
- type NamedTokenTransferSourceResp
- type OAuthService
- type OnrampService
- type OrganizationService
- type OutputWithPreviousTransactionData
- type OutputWithPreviousTransactionDataResp
- type OwnerIDInput
- type OwnerInputPublicKey
- type OwnerInputPublicKeyResp
- type OwnerInputUnion
- type OwnerInputUnionResp
- func (u OwnerInputUnionResp) AsOwnerInputPublicKey() (v OwnerInputPublicKeyResp)
- func (u OwnerInputUnionResp) AsOwnerInputUser() (v OwnerInputUserResp)
- func (u OwnerInputUnionResp) RawJSON() string
- func (r OwnerInputUnionResp) ToParam() OwnerInputUnion
- func (r *OwnerInputUnionResp) UnmarshalJSON(data []byte) error
- type OwnerInputUser
- type OwnerInputUserResp
- type P256PublicKey
- type PasskeyMfaMethod
- type PasskeyMfaMethodType
- type PhoneInviteInput
- type PhoneInviteInputType
- type Policy
- type PolicyAction
- type PolicyConditionUnion
- type PolicyConditionUnionResp
- func (u PolicyConditionUnionResp) AsActionRequestBody() (v ActionRequestBodyConditionResp)
- func (u PolicyConditionUnionResp) AsAny() anyPolicyConditionResp
- func (u PolicyConditionUnionResp) AsEthereum7702Authorization() (v Ethereum7702AuthorizationConditionResp)
- func (u PolicyConditionUnionResp) AsEthereumCalldata() (v EthereumCalldataConditionResp)
- func (u PolicyConditionUnionResp) AsEthereumTransaction() (v EthereumTransactionConditionResp)
- func (u PolicyConditionUnionResp) AsEthereumTypedDataDomain() (v EthereumTypedDataDomainConditionResp)
- func (u PolicyConditionUnionResp) AsEthereumTypedDataMessage() (v EthereumTypedDataMessageConditionResp)
- func (u PolicyConditionUnionResp) AsMessage() (v MessageSigningConditionResp)
- func (u PolicyConditionUnionResp) AsReference() (v AggregationConditionResp)
- func (u PolicyConditionUnionResp) AsSolanaProgramInstruction() (v SolanaProgramInstructionConditionResp)
- func (u PolicyConditionUnionResp) AsSolanaSystemProgramInstruction() (v SolanaSystemProgramInstructionConditionResp)
- func (u PolicyConditionUnionResp) AsSolanaTokenProgramInstruction() (v SolanaTokenProgramInstructionConditionResp)
- func (u PolicyConditionUnionResp) AsSuiTransactionCommand() (v SuiTransactionCommandConditionResp)
- func (u PolicyConditionUnionResp) AsSuiTransferObjectsCommand() (v SuiTransferObjectsCommandConditionResp)
- func (u PolicyConditionUnionResp) AsSystem() (v SystemConditionResp)
- func (u PolicyConditionUnionResp) AsTempoTransaction() (v TempoTransactionConditionResp)
- func (u PolicyConditionUnionResp) AsTronTransaction() (v TronTransactionConditionResp)
- func (u PolicyConditionUnionResp) AsTronTriggerSmartContractData() (v TronCalldataConditionResp)
- func (u PolicyConditionUnionResp) RawJSON() string
- func (r PolicyConditionUnionResp) ToParam() PolicyConditionUnion
- func (r *PolicyConditionUnionResp) UnmarshalJSON(data []byte) error
- type PolicyConditionUnionRespValue
- type PolicyDeleteParams
- type PolicyDeleteRuleParams
- type PolicyGetRuleParams
- type PolicyInput
- type PolicyIntentResponse
- type PolicyIntentResponseRequestDetails
- type PolicyIntentResponseRequestDetailsBody
- type PolicyMethod
- type PolicyNewParams
- type PolicyNewParamsRule
- type PolicyNewParamsVersion
- type PolicyNewRuleParams
- type PolicyRuleRequestBody
- type PolicyRuleRequestBodyResp
- type PolicyRuleResponse
- type PolicyService
- func (r *PolicyService) Delete(ctx context.Context, policyID string, body PolicyDeleteParams, ...) (res *SuccessResponse, err error)
- func (r *PolicyService) DeleteRule(ctx context.Context, ruleID string, params PolicyDeleteRuleParams, ...) (res *SuccessResponse, err error)
- func (r *PolicyService) Get(ctx context.Context, policyID string, opts ...option.RequestOption) (res *Policy, err error)
- func (r *PolicyService) GetRule(ctx context.Context, ruleID string, query PolicyGetRuleParams, ...) (res *PolicyRuleResponse, err error)
- func (r *PolicyService) New(ctx context.Context, params PolicyNewParams, opts ...option.RequestOption) (res *Policy, err error)
- func (r *PolicyService) NewRule(ctx context.Context, policyID string, params PolicyNewRuleParams, ...) (res *PolicyRuleResponse, err error)
- func (r *PolicyService) Update(ctx context.Context, policyID string, params PolicyUpdateParams, ...) (res *Policy, err error)
- func (r *PolicyService) UpdateRule(ctx context.Context, ruleID string, params PolicyUpdateRuleParams, ...) (res *PolicyRuleResponse, err error)
- type PolicyUpdateParams
- type PolicyUpdateRuleParams
- type PolicyVersion
- type PrivateKeyExportInput
- type PrivateKeyExportInputResp
- type PrivateKeyExportWebhookPayload
- type PrivateKeyExportWebhookPayloadType
- type PrivateKeyInitInput
- type PrivateKeyInitInputEntropyType
- type PrivateKeySubmitInput
- type PrivateKeySubmitInputEntropyType
- type PrivyAggregationService
- type PrivyAnalyticsService
- type PrivyAppService
- type PrivyClient
- type PrivyClientOptions
- type PrivyEthereumWalletService
- func (s *PrivyEthereumWalletService) SendTransaction(ctx context.Context, walletID string, caip2 string, ...) (*EthereumSendTransactionRpcResponseData, error)
- func (s *PrivyEthereumWalletService) Sign7702Authorization(ctx context.Context, walletID string, ...) (*EthereumSign7702AuthorizationRpcResponseData, error)
- func (s *PrivyEthereumWalletService) SignMessage(ctx context.Context, walletID string, message string, opts ...RequestOption) (*EthereumPersonalSignRpcResponseData, error)
- func (s *PrivyEthereumWalletService) SignMessageBytes(ctx context.Context, walletID string, message []byte, opts ...RequestOption) (*EthereumPersonalSignRpcResponseData, error)
- func (s *PrivyEthereumWalletService) SignSecp256k1(ctx context.Context, walletID string, ...) (*EthereumSecp256k1SignRpcResponseData, error)
- func (s *PrivyEthereumWalletService) SignTransaction(ctx context.Context, walletID string, ...) (*EthereumSignTransactionRpcResponseData, error)
- func (s *PrivyEthereumWalletService) SignTypedData(ctx context.Context, walletID string, ...) (*EthereumSignTypedDataRpcResponseData, error)
- func (s *PrivyEthereumWalletService) SignUserOperation(ctx context.Context, walletID string, ...) (*EthereumSignUserOperationRpcResponseData, error)
- type PrivyFee
- type PrivyFeeType
- type PrivyIntentService
- func (s *PrivyIntentService) DeletePolicyRule(ctx context.Context, ruleID string, params IntentDeletePolicyRuleParams, ...) (*RuleDeleteIntentResponse, error)
- func (s *PrivyIntentService) NewPolicyRule(ctx context.Context, policyID string, params IntentNewPolicyRuleParams, ...) (*RuleMutateIntentResponse, error)
- func (s *PrivyIntentService) Rpc(ctx context.Context, walletID string, params IntentRpcParams, ...) (*RpcIntentResponse, error)
- func (s *PrivyIntentService) Transfer(ctx context.Context, walletID string, params IntentTransferParams, ...) (*TransferIntentResponse, error)
- func (s *PrivyIntentService) UpdateKeyQuorum(ctx context.Context, keyQuorumID string, params IntentUpdateKeyQuorumParams, ...) (*KeyQuorumIntentResponse, error)
- func (s *PrivyIntentService) UpdatePolicy(ctx context.Context, policyID string, params IntentUpdatePolicyParams, ...) (*PolicyIntentResponse, error)
- func (s *PrivyIntentService) UpdatePolicyRule(ctx context.Context, ruleID string, params IntentUpdatePolicyRuleParams, ...) (*RuleMutateIntentResponse, error)
- func (s *PrivyIntentService) UpdateWallet(ctx context.Context, walletID string, params IntentUpdateWalletParams, ...) (*WalletIntentResponse, error)
- type PrivyJwtExchangeService
- type PrivyKeyQuorumService
- type PrivyPolicyService
- func (s *PrivyPolicyService) Delete(ctx context.Context, policyID string, params PolicyDeleteParams, ...) (*SuccessResponse, error)
- func (s *PrivyPolicyService) DeleteRule(ctx context.Context, ruleID string, params PolicyDeleteRuleParams, ...) (*SuccessResponse, error)
- func (s *PrivyPolicyService) NewRule(ctx context.Context, policyID string, params PolicyNewRuleParams, ...) (*PolicyRuleResponse, error)
- func (s *PrivyPolicyService) Update(ctx context.Context, policyID string, params PolicyUpdateParams, ...) (*Policy, error)
- func (s *PrivyPolicyService) UpdateRule(ctx context.Context, ruleID string, params PolicyUpdateRuleParams, ...) (*PolicyRuleResponse, error)
- type PrivyRequestExpiryOptions
- type PrivySolanaWalletService
- func (s *PrivySolanaWalletService) SignAndSendTransaction(ctx context.Context, walletID string, caip2 string, ...) (*SolanaSignAndSendTransactionRpcResponseData, error)
- func (s *PrivySolanaWalletService) SignAndSendTransactionBytes(ctx context.Context, walletID string, caip2 string, transaction []byte, ...) (*SolanaSignAndSendTransactionRpcResponseData, error)
- func (s *PrivySolanaWalletService) SignMessage(ctx context.Context, walletID string, message string, opts ...RequestOption) (*SolanaSignMessageRpcResponseData, error)
- func (s *PrivySolanaWalletService) SignMessageBytes(ctx context.Context, walletID string, message []byte, opts ...RequestOption) (*SolanaSignMessageRpcResponseData, error)
- func (s *PrivySolanaWalletService) SignTransaction(ctx context.Context, walletID string, ...) (*SolanaSignTransactionRpcResponseData, error)
- func (s *PrivySolanaWalletService) SignTransactionBytes(ctx context.Context, walletID string, transaction []byte, ...) (*SolanaSignTransactionRpcResponseData, error)
- type PrivyTransactionService
- type PrivyTronWalletService
- func (s *PrivyTronWalletService) SendTransaction(ctx context.Context, walletID string, caip2 string, ...) (*TronSendTransactionRpcResponseData, error)
- func (s *PrivyTronWalletService) SignTransaction(ctx context.Context, walletID string, params TronSignTransactionRpcInputParams, ...) (*TronSignTransactionRpcResponseData, error)
- type PrivyUserService
- type PrivyWalletService
- func (s *PrivyWalletService) Export(ctx context.Context, walletID string, opts ...RequestOption) (*WalletExportResult, error)
- func (s *PrivyWalletService) Import(ctx context.Context, params WalletImportParams, opts ...RequestOption) (*Wallet, error)
- func (s *PrivyWalletService) RawSign(ctx context.Context, walletID string, params WalletRawSignParams, ...) (*RawSignResponse, error)
- func (s *PrivyWalletService) Rpc(ctx context.Context, walletID string, params WalletRpcParams, ...) (*WalletRpcResponseUnion, error)
- func (s *PrivyWalletService) Update(ctx context.Context, walletID string, params WalletUpdateParams, ...) (*Wallet, error)
- type PrivyWebhookService
- type QuantityUnion
- type QuantityUnionResp
- type RawSignBytesEncoding
- type RawSignBytesHashFunction
- type RawSignBytesParams
- type RawSignHashParams
- type RawSignInput
- type RawSignInputParamsUnion
- type RawSignResponse
- type RawSignResponseData
- type RawSignResponseDataEncoding
- type RawSignResponseMethod
- type RawWalletAuthenticateResponse
- type RecipientPublicKey
- type RelayerFee
- type RelayerFeeType
- type RequestOption
- type RpcIntentResponse
- type RpcIntentResponseRequestDetails
- type RpcOption
- type RuleDeleteIntentResponse
- type RuleIntentCreateRequestDetails
- type RuleIntentCreateRequestDetailsMethod
- type RuleIntentDeleteRequestBody
- type RuleIntentDeleteRequestDetails
- type RuleIntentDeleteRequestDetailsMethod
- type RuleIntentRequestDetailsUnion
- func (u RuleIntentRequestDetailsUnion) AsAny() anyRuleIntentRequestDetails
- func (u RuleIntentRequestDetailsUnion) AsDelete() (v RuleIntentDeleteRequestDetails)
- func (u RuleIntentRequestDetailsUnion) AsPatch() (v RuleIntentUpdateRequestDetails)
- func (u RuleIntentRequestDetailsUnion) AsPost() (v RuleIntentCreateRequestDetails)
- func (u RuleIntentRequestDetailsUnion) RawJSON() string
- func (r *RuleIntentRequestDetailsUnion) UnmarshalJSON(data []byte) error
- type RuleIntentRequestDetailsUnionBody
- type RuleIntentResponse
- type RuleIntentUpdateRequestDetails
- type RuleIntentUpdateRequestDetailsMethod
- type RuleMutateIntentResponse
- type SMSMfaMethod
- type SMSMfaMethodType
- type SeedPhraseExportInput
- type SeedPhraseExportInputResp
- type SeedPhraseExportResponse
- type SharedService
- type SignatureOptions
- type SignatureOptionsResp
- type SignatureType
- type SmartWalletConfigurationDisabled
- type SmartWalletConfigurationEnabled
- type SmartWalletConfigurationUnion
- func (u SmartWalletConfigurationUnion) AsSmartWalletConfigurationDisabled() (v SmartWalletConfigurationDisabled)
- func (u SmartWalletConfigurationUnion) AsSmartWalletConfigurationEnabled() (v SmartWalletConfigurationEnabled)
- func (u SmartWalletConfigurationUnion) RawJSON() string
- func (r *SmartWalletConfigurationUnion) UnmarshalJSON(data []byte) error
- type SmartWalletNetworkConfiguration
- type SmartWalletType
- type SolanaProgramInstructionCondition
- type SolanaProgramInstructionConditionField
- type SolanaProgramInstructionConditionFieldSource
- type SolanaProgramInstructionConditionResp
- type SolanaSignAndSendTransactionRpcInput
- type SolanaSignAndSendTransactionRpcInputChainType
- type SolanaSignAndSendTransactionRpcInputMethod
- type SolanaSignAndSendTransactionRpcInputParams
- type SolanaSignAndSendTransactionRpcInputParamsEncoding
- type SolanaSignAndSendTransactionRpcInputParamsResp
- type SolanaSignAndSendTransactionRpcInputResp
- type SolanaSignAndSendTransactionRpcResponse
- type SolanaSignAndSendTransactionRpcResponseData
- type SolanaSignAndSendTransactionRpcResponseMethod
- type SolanaSignMessageRpcInput
- type SolanaSignMessageRpcInputChainType
- type SolanaSignMessageRpcInputMethod
- type SolanaSignMessageRpcInputParams
- type SolanaSignMessageRpcInputParamsEncoding
- type SolanaSignMessageRpcInputParamsResp
- type SolanaSignMessageRpcInputResp
- type SolanaSignMessageRpcResponse
- type SolanaSignMessageRpcResponseData
- type SolanaSignMessageRpcResponseDataEncoding
- type SolanaSignMessageRpcResponseMethod
- type SolanaSignTransactionRpcInput
- type SolanaSignTransactionRpcInputChainType
- type SolanaSignTransactionRpcInputMethod
- type SolanaSignTransactionRpcInputParams
- type SolanaSignTransactionRpcInputParamsEncoding
- type SolanaSignTransactionRpcInputParamsResp
- type SolanaSignTransactionRpcInputResp
- type SolanaSignTransactionRpcResponse
- type SolanaSignTransactionRpcResponseData
- type SolanaSignTransactionRpcResponseDataEncoding
- type SolanaSignTransactionRpcResponseMethod
- type SolanaSystemProgramInstructionCondition
- type SolanaSystemProgramInstructionConditionField
- type SolanaSystemProgramInstructionConditionFieldSource
- type SolanaSystemProgramInstructionConditionResp
- type SolanaTokenProgramInstructionCondition
- type SolanaTokenProgramInstructionConditionField
- type SolanaTokenProgramInstructionConditionFieldSource
- type SolanaTokenProgramInstructionConditionResp
- type SparkBalance
- type SparkClaimStaticDepositRpcInput
- type SparkClaimStaticDepositRpcInputMethod
- type SparkClaimStaticDepositRpcInputParams
- type SparkClaimStaticDepositRpcInputParamsResp
- type SparkClaimStaticDepositRpcInputResp
- type SparkClaimStaticDepositRpcResponse
- type SparkClaimStaticDepositRpcResponseData
- type SparkClaimStaticDepositRpcResponseMethod
- type SparkCoopExitFeeQuote
- type SparkCoopExitRequest
- type SparkCreateLightningInvoiceRpcInput
- type SparkCreateLightningInvoiceRpcInputMethod
- type SparkCreateLightningInvoiceRpcInputParams
- type SparkCreateLightningInvoiceRpcInputParamsResp
- type SparkCreateLightningInvoiceRpcInputResp
- type SparkCreateLightningInvoiceRpcResponse
- type SparkCreateLightningInvoiceRpcResponseMethod
- type SparkCurrencyAmount
- type SparkExitSpeed
- type SparkGetBalanceRpcInput
- type SparkGetBalanceRpcInputMethod
- type SparkGetBalanceRpcInputResp
- type SparkGetBalanceRpcResponse
- type SparkGetBalanceRpcResponseMethod
- type SparkGetClaimStaticDepositQuoteRpcInput
- type SparkGetClaimStaticDepositQuoteRpcInputMethod
- type SparkGetClaimStaticDepositQuoteRpcInputParams
- type SparkGetClaimStaticDepositQuoteRpcInputParamsResp
- type SparkGetClaimStaticDepositQuoteRpcInputResp
- type SparkGetClaimStaticDepositQuoteRpcResponse
- type SparkGetClaimStaticDepositQuoteRpcResponseData
- type SparkGetClaimStaticDepositQuoteRpcResponseMethod
- type SparkGetStaticDepositAddressRpcInput
- type SparkGetStaticDepositAddressRpcInputMethod
- type SparkGetStaticDepositAddressRpcInputResp
- type SparkGetStaticDepositAddressRpcResponse
- type SparkGetStaticDepositAddressRpcResponseData
- type SparkGetStaticDepositAddressRpcResponseMethod
- type SparkGetWithdrawalFeeQuoteRpcInput
- type SparkGetWithdrawalFeeQuoteRpcInputMethod
- type SparkGetWithdrawalFeeQuoteRpcInputParams
- type SparkGetWithdrawalFeeQuoteRpcInputParamsResp
- type SparkGetWithdrawalFeeQuoteRpcInputResp
- type SparkGetWithdrawalFeeQuoteRpcResponse
- type SparkGetWithdrawalFeeQuoteRpcResponseMethod
- type SparkLightningFee
- type SparkLightningReceiveRequest
- type SparkLightningSendRequest
- type SparkNetwork
- type SparkOutputSelectionStrategy
- type SparkPayLightningInvoiceRpcInput
- type SparkPayLightningInvoiceRpcInputMethod
- type SparkPayLightningInvoiceRpcInputParams
- type SparkPayLightningInvoiceRpcInputParamsResp
- type SparkPayLightningInvoiceRpcInputResp
- type SparkPayLightningInvoiceRpcResponse
- type SparkPayLightningInvoiceRpcResponseDataUnion
- func (u SparkPayLightningInvoiceRpcResponseDataUnion) AsSparkLightningSendRequest() (v SparkLightningSendRequest)
- func (u SparkPayLightningInvoiceRpcResponseDataUnion) AsSparkTransfer() (v SparkTransfer)
- func (u SparkPayLightningInvoiceRpcResponseDataUnion) RawJSON() string
- func (r *SparkPayLightningInvoiceRpcResponseDataUnion) UnmarshalJSON(data []byte) error
- type SparkPayLightningInvoiceRpcResponseMethod
- type SparkSignMessageWithIdentityKeyRpcInput
- type SparkSignMessageWithIdentityKeyRpcInputMethod
- type SparkSignMessageWithIdentityKeyRpcInputParams
- type SparkSignMessageWithIdentityKeyRpcInputParamsResp
- type SparkSignMessageWithIdentityKeyRpcInputResp
- type SparkSignMessageWithIdentityKeyRpcResponse
- type SparkSignMessageWithIdentityKeyRpcResponseData
- type SparkSignMessageWithIdentityKeyRpcResponseMethod
- type SparkSigningKeyshare
- type SparkTokenBalance
- type SparkTransfer
- type SparkTransferLeaf
- type SparkTransferRpcInput
- type SparkTransferRpcInputMethod
- type SparkTransferRpcInputParams
- type SparkTransferRpcInputParamsResp
- type SparkTransferRpcInputResp
- type SparkTransferRpcResponse
- type SparkTransferRpcResponseMethod
- type SparkTransferTokensRpcInput
- type SparkTransferTokensRpcInputMethod
- type SparkTransferTokensRpcInputParams
- type SparkTransferTokensRpcInputParamsResp
- type SparkTransferTokensRpcInputResp
- type SparkTransferTokensRpcResponse
- type SparkTransferTokensRpcResponseData
- type SparkTransferTokensRpcResponseMethod
- type SparkUserTokenMetadata
- type SparkWalletLeaf
- type SparkWithdrawRpcInput
- type SparkWithdrawRpcInputMethod
- type SparkWithdrawRpcInputParams
- type SparkWithdrawRpcInputParamsResp
- type SparkWithdrawRpcInputResp
- type SparkWithdrawRpcResponse
- type SparkWithdrawRpcResponseMethod
- type SuccessResponse
- type SuiCommandName
- type SuiTransactionCommandCondition
- type SuiTransactionCommandConditionField
- type SuiTransactionCommandConditionFieldSource
- type SuiTransactionCommandConditionResp
- type SuiTransactionCommandConditionValueUnion
- type SuiTransactionCommandConditionValueUnionResp
- func (u SuiTransactionCommandConditionValueUnionResp) AsSuiCommandName() (v SuiCommandName)
- func (u SuiTransactionCommandConditionValueUnionResp) AsSuiCommandNameArray() (v []SuiCommandName)
- func (u SuiTransactionCommandConditionValueUnionResp) RawJSON() string
- func (r *SuiTransactionCommandConditionValueUnionResp) UnmarshalJSON(data []byte) error
- type SuiTransactionCommandOperator
- type SuiTransferObjectsCommandCondition
- type SuiTransferObjectsCommandConditionFieldSource
- type SuiTransferObjectsCommandConditionResp
- type SuiTransferObjectsCommandField
- type SvmTransactionWalletActionStep
- type SvmTransactionWalletActionStepType
- type SvmWalletActionStepStatus
- type SwapActionResponse
- type SwapActionResponseType
- type SwapDestination
- type SwapQuoteDestination
- type SwapQuoteRequestBody
- type SwapQuoteResponse
- type SwapRequestBody
- type SwapService
- type SwapSource
- type SystemCondition
- type SystemConditionField
- type SystemConditionFieldSource
- type SystemConditionResp
- type TelegramAuthConfigSchema
- type TempoAaAuthorization
- type TempoAaAuthorizationResp
- type TempoCall
- type TempoCallResp
- type TempoFeePayerSignature
- type TempoFeePayerSignatureResp
- type TempoTransactionCondition
- type TempoTransactionConditionField
- type TempoTransactionConditionFieldSource
- type TempoTransactionConditionResp
- type TestAccount
- type TestAccountsResponse
- type TokenOutput
- type TokenOutputResp
- type TokenTransferDestination
- type TokenTransferDestinationResp
- type TokenTransferSourceUnion
- type TokenTransferSourceUnionResp
- func (u TokenTransferSourceUnionResp) AsCustomTokenTransferSource() (v CustomTokenTransferSourceResp)
- func (u TokenTransferSourceUnionResp) AsNamedTokenTransferSource() (v NamedTokenTransferSourceResp)
- func (u TokenTransferSourceUnionResp) RawJSON() string
- func (r TokenTransferSourceUnionResp) ToParam() TokenTransferSourceUnion
- func (r *TokenTransferSourceUnionResp) UnmarshalJSON(data []byte) error
- type TotpMfaMethod
- type TotpMfaMethodType
- type TransactionBroadcastedWebhookPayload
- type TransactionBroadcastedWebhookPayloadType
- type TransactionConfirmedWebhookPayload
- type TransactionConfirmedWebhookPayloadType
- type TransactionExecutionRevertedWebhookPayload
- type TransactionExecutionRevertedWebhookPayloadType
- type TransactionFailedWebhookPayload
- type TransactionFailedWebhookPayloadType
- type TransactionProviderErrorWebhookPayload
- type TransactionProviderErrorWebhookPayloadType
- type TransactionReplacedWebhookPayload
- type TransactionReplacedWebhookPayloadType
- type TransactionService
- type TransactionStillPendingWebhookPayload
- type TransactionStillPendingWebhookPayloadType
- type TransferActionResponse
- type TransferActionResponseType
- type TransferIntentResponse
- type TransferIntentResponseRequestDetails
- type TransferRequestBody
- type TransferRequestBodyResp
- type TronCalldataCondition
- type TronCalldataConditionFieldSource
- type TronCalldataConditionResp
- type TronContractUnion
- type TronContractUnionResp
- func (u TronContractUnionResp) AsAny() anyTronContractResp
- func (u TronContractUnionResp) AsTransferContract() (v TronTransferContractResp)
- func (u TronContractUnionResp) AsTriggerSmartContract() (v TronTriggerSmartContractResp)
- func (u TronContractUnionResp) RawJSON() string
- func (r TronContractUnionResp) ToParam() TronContractUnion
- func (r *TronContractUnionResp) UnmarshalJSON(data []byte) error
- type TronHexAddress
- type TronRawDataForSend
- type TronRawDataForSendResp
- type TronRawDataForSign
- type TronRawDataForSignResp
- type TronSendTransactionRpcInput
- type TronSendTransactionRpcInputMethod
- type TronSendTransactionRpcInputParams
- type TronSendTransactionRpcInputParamsResp
- type TronSendTransactionRpcInputResp
- type TronSendTransactionRpcResponse
- type TronSendTransactionRpcResponseData
- type TronSendTransactionRpcResponseMethod
- type TronSignTransactionRpcInput
- type TronSignTransactionRpcInputMethod
- type TronSignTransactionRpcInputParams
- type TronSignTransactionRpcInputParamsResp
- type TronSignTransactionRpcInputResp
- type TronSignTransactionRpcResponse
- type TronSignTransactionRpcResponseData
- type TronSignTransactionRpcResponseDataEncoding
- type TronSignTransactionRpcResponseMethod
- type TronTransactionCondition
- type TronTransactionConditionField
- type TronTransactionConditionFieldSource
- type TronTransactionConditionResp
- type TronTransferContract
- type TronTransferContractResp
- type TronTransferContractType
- type TronTriggerSmartContract
- type TronTriggerSmartContractResp
- type TronTriggerSmartContractType
- type TvmTransactionWalletActionStep
- type TvmTransactionWalletActionStepType
- type TvmWalletActionStepStatus
- type TypedDataDomainInputParams
- type TypedDataInput
- type TypedDataInputResp
- type TypedDataTypeFieldInput
- type TypedDataTypeFieldInputResp
- type TypedDataTypesInputParams
- type TypedDataTypesInputParamsResp
- type UnsafeUnwrapWebhookEventUnion
- func (u UnsafeUnwrapWebhookEventUnion) AsAny() anyUnsafeUnwrapWebhookEvent
- func (u UnsafeUnwrapWebhookEventUnion) AsIntentAuthorized() (v IntentAuthorizedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsIntentCreated() (v IntentCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsIntentExecuted() (v IntentExecutedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsIntentFailed() (v IntentFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsIntentRejected() (v IntentRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsMfaDisabled() (v MfaDisabledWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsMfaEnabled() (v MfaEnabledWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionBroadcasted() (v TransactionBroadcastedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionConfirmed() (v TransactionConfirmedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionExecutionReverted() (v TransactionExecutionRevertedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionFailed() (v TransactionFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionProviderError() (v TransactionProviderErrorWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionReplaced() (v TransactionReplacedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsTransactionStillPending() (v TransactionStillPendingWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserAuthenticated() (v UserAuthenticatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserCreated() (v UserCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserLinkedAccount() (v UserLinkedAccountWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserOperationCompleted() (v UserOperationCompletedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserTransferredAccount() (v UserTransferredAccountWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserUnlinkedAccount() (v UserUnlinkedAccountWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserUpdatedAccount() (v UserUpdatedAccountWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsUserWalletCreated() (v UserWalletCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositCreated() (v WalletActionEarnDepositCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositFailed() (v WalletActionEarnDepositFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositRejected() (v WalletActionEarnDepositRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositSucceeded() (v WalletActionEarnDepositSucceededWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectCreated() (v WalletActionEarnFeeCollectCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectFailed() (v WalletActionEarnFeeCollectFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectRejected() (v WalletActionEarnFeeCollectRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectSucceeded() (v WalletActionEarnFeeCollectSucceededWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimCreated() (v WalletActionEarnIncentiveClaimCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimFailed() (v WalletActionEarnIncentiveClaimFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimRejected() (v WalletActionEarnIncentiveClaimRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimSucceeded() (v WalletActionEarnIncentiveClaimSucceededWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawCreated() (v WalletActionEarnWithdrawCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawFailed() (v WalletActionEarnWithdrawFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawRejected() (v WalletActionEarnWithdrawRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawSucceeded() (v WalletActionEarnWithdrawSucceededWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapCreated() (v WalletActionSwapCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapFailed() (v WalletActionSwapFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapRejected() (v WalletActionSwapRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapSucceeded() (v WalletActionSwapSucceededWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferCreated() (v WalletActionTransferCreatedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferFailed() (v WalletActionTransferFailedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferRejected() (v WalletActionTransferRejectedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferSucceeded() (v WalletActionTransferSucceededWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletArchived() (v WalletArchivedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletFundsDeposited() (v FundsDepositedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletFundsWithdrawn() (v FundsWithdrawnWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletPrivateKeyExport() (v PrivateKeyExportWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletRecovered() (v WalletRecoveredWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletRecoverySetup() (v WalletRecoverySetupWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsWalletRestored() (v WalletRestoredWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsYieldClaimConfirmed() (v YieldClaimConfirmedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsYieldDepositConfirmed() (v YieldDepositConfirmedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) AsYieldWithdrawConfirmed() (v YieldWithdrawConfirmedWebhookPayload)
- func (u UnsafeUnwrapWebhookEventUnion) RawJSON() string
- func (r *UnsafeUnwrapWebhookEventUnion) UnmarshalJSON(data []byte) error
- type UnsafeUnwrapWebhookEventUnionAsset
- type UnsafeUnwrapWebhookEventUnionAssetAddress
- type UnsafeUnwrapWebhookEventUnionCreatedAt
- type UnsafeUnwrapWebhookEventUnionRejectedAt
- type UnsafeUnwrapWebhookEventUnionRewards
- type UnsignedEthereumTransactionUnion
- type UnsignedEthereumTransactionUnionResp
- func (u UnsignedEthereumTransactionUnionResp) AsUnsignedStandardEthereumTransaction() (v UnsignedStandardEthereumTransactionResp)
- func (u UnsignedEthereumTransactionUnionResp) AsUnsignedTempoTransaction() (v UnsignedTempoTransactionResp)
- func (u UnsignedEthereumTransactionUnionResp) RawJSON() string
- func (r UnsignedEthereumTransactionUnionResp) ToParam() UnsignedEthereumTransactionUnion
- func (r *UnsignedEthereumTransactionUnionResp) UnmarshalJSON(data []byte) error
- type UnsignedStandardEthereumTransaction
- type UnsignedStandardEthereumTransactionResp
- type UnsignedTempoTransaction
- type UnsignedTempoTransactionResp
- type User
- type UserAuthenticatedWebhookPayload
- type UserAuthenticatedWebhookPayloadType
- type UserCreatedWebhookPayload
- type UserCreatedWebhookPayloadType
- type UserGetByCustomAuthIDParams
- type UserGetByDiscordUsernameParams
- type UserGetByEmailAddressParams
- type UserGetByFarcasterIDParams
- type UserGetByGitHubUsernameParams
- type UserGetByPhoneNumberParams
- type UserGetBySmartWalletAddressParams
- type UserGetByTelegramUserIDParams
- type UserGetByTelegramUsernameParams
- type UserGetByTwitterSubjectParams
- type UserGetByTwitterUsernameParams
- type UserGetByWalletAddressParams
- type UserInviteInputUnion
- type UserLinkedAccountWebhookPayload
- type UserLinkedAccountWebhookPayloadType
- type UserListParams
- type UserNewParams
- type UserNewParamsWallet
- type UserNewParamsWalletAdditionalSigner
- type UserOperationCompletedWebhookPayload
- type UserOperationCompletedWebhookPayloadType
- type UserOperationInput
- type UserOperationInputResp
- type UserOwnedRecoveryOption
- type UserPregenerateWalletsParams
- type UserReference
- type UserSearchParams
- type UserSearchParamsBodyObject
- type UserSearchParamsBodySearchTerm
- type UserService
- func (r *UserService) Delete(ctx context.Context, userID string, opts ...option.RequestOption) (err error)
- func (r *UserService) Get(ctx context.Context, userID string, opts ...option.RequestOption) (res *User, err error)
- func (r *UserService) GetByCustomAuthID(ctx context.Context, body UserGetByCustomAuthIDParams, ...) (res *User, err error)
- func (r *UserService) GetByDiscordUsername(ctx context.Context, body UserGetByDiscordUsernameParams, ...) (res *User, err error)
- func (r *UserService) GetByEmailAddress(ctx context.Context, body UserGetByEmailAddressParams, ...) (res *User, err error)
- func (r *UserService) GetByFarcasterID(ctx context.Context, body UserGetByFarcasterIDParams, ...) (res *User, err error)
- func (r *UserService) GetByGitHubUsername(ctx context.Context, body UserGetByGitHubUsernameParams, ...) (res *User, err error)
- func (r *UserService) GetByPhoneNumber(ctx context.Context, body UserGetByPhoneNumberParams, ...) (res *User, err error)
- func (r *UserService) GetBySmartWalletAddress(ctx context.Context, body UserGetBySmartWalletAddressParams, ...) (res *User, err error)
- func (r *UserService) GetByTelegramUserID(ctx context.Context, body UserGetByTelegramUserIDParams, ...) (res *User, err error)
- func (r *UserService) GetByTelegramUsername(ctx context.Context, body UserGetByTelegramUsernameParams, ...) (res *User, err error)
- func (r *UserService) GetByTwitterSubject(ctx context.Context, body UserGetByTwitterSubjectParams, ...) (res *User, err error)
- func (r *UserService) GetByTwitterUsername(ctx context.Context, body UserGetByTwitterUsernameParams, ...) (res *User, err error)
- func (r *UserService) GetByWalletAddress(ctx context.Context, body UserGetByWalletAddressParams, ...) (res *User, err error)
- func (r *UserService) List(ctx context.Context, query UserListParams, opts ...option.RequestOption) (res *pagination.Cursor[User], err error)
- func (r *UserService) ListAutoPaging(ctx context.Context, query UserListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[User]
- func (r *UserService) New(ctx context.Context, body UserNewParams, opts ...option.RequestOption) (res *User, err error)
- func (r *UserService) PregenerateWallets(ctx context.Context, userID string, body UserPregenerateWalletsParams, ...) (res *User, err error)
- func (r *UserService) Search(ctx context.Context, body UserSearchParams, opts ...option.RequestOption) (res *User, err error)
- func (r *UserService) SetCustomMetadata(ctx context.Context, userID string, body UserSetCustomMetadataParams, ...) (res *User, err error)
- func (r *UserService) UnlinkLinkedAccount(ctx context.Context, userID string, body UserUnlinkLinkedAccountParams, ...) (res *User, err error)
- type UserSetCustomMetadataParams
- type UserTransferredAccountWebhookPayload
- type UserTransferredAccountWebhookPayloadType
- type UserUnlinkLinkedAccountParams
- type UserUnlinkedAccountWebhookPayload
- type UserUnlinkedAccountWebhookPayloadType
- type UserUpdatedAccountWebhookPayload
- type UserUpdatedAccountWebhookPayloadType
- type UserWalletCreatedWebhookPayload
- type UserWalletCreatedWebhookPayloadType
- type VerifyInput
- type Wallet
- type WalletActionEarnDepositCreatedWebhookPayload
- type WalletActionEarnDepositCreatedWebhookPayloadStatus
- type WalletActionEarnDepositCreatedWebhookPayloadType
- type WalletActionEarnDepositFailedWebhookPayload
- type WalletActionEarnDepositFailedWebhookPayloadStatus
- type WalletActionEarnDepositFailedWebhookPayloadType
- type WalletActionEarnDepositRejectedWebhookPayload
- type WalletActionEarnDepositRejectedWebhookPayloadStatus
- type WalletActionEarnDepositRejectedWebhookPayloadType
- type WalletActionEarnDepositSucceededWebhookPayload
- type WalletActionEarnDepositSucceededWebhookPayloadStatus
- type WalletActionEarnDepositSucceededWebhookPayloadType
- type WalletActionEarnFeeCollectCreatedWebhookPayload
- type WalletActionEarnFeeCollectCreatedWebhookPayloadStatus
- type WalletActionEarnFeeCollectCreatedWebhookPayloadType
- type WalletActionEarnFeeCollectFailedWebhookPayload
- type WalletActionEarnFeeCollectFailedWebhookPayloadStatus
- type WalletActionEarnFeeCollectFailedWebhookPayloadType
- type WalletActionEarnFeeCollectRejectedWebhookPayload
- type WalletActionEarnFeeCollectRejectedWebhookPayloadStatus
- type WalletActionEarnFeeCollectRejectedWebhookPayloadType
- type WalletActionEarnFeeCollectSucceededWebhookPayload
- type WalletActionEarnFeeCollectSucceededWebhookPayloadStatus
- type WalletActionEarnFeeCollectSucceededWebhookPayloadType
- type WalletActionEarnIncentiveClaimCreatedWebhookPayload
- type WalletActionEarnIncentiveClaimCreatedWebhookPayloadStatus
- type WalletActionEarnIncentiveClaimCreatedWebhookPayloadType
- type WalletActionEarnIncentiveClaimFailedWebhookPayload
- type WalletActionEarnIncentiveClaimFailedWebhookPayloadStatus
- type WalletActionEarnIncentiveClaimFailedWebhookPayloadType
- type WalletActionEarnIncentiveClaimRejectedWebhookPayload
- type WalletActionEarnIncentiveClaimRejectedWebhookPayloadStatus
- type WalletActionEarnIncentiveClaimRejectedWebhookPayloadType
- type WalletActionEarnIncentiveClaimSucceededWebhookPayload
- type WalletActionEarnIncentiveClaimSucceededWebhookPayloadStatus
- type WalletActionEarnIncentiveClaimSucceededWebhookPayloadType
- type WalletActionEarnWithdrawCreatedWebhookPayload
- type WalletActionEarnWithdrawCreatedWebhookPayloadStatus
- type WalletActionEarnWithdrawCreatedWebhookPayloadType
- type WalletActionEarnWithdrawFailedWebhookPayload
- type WalletActionEarnWithdrawFailedWebhookPayloadStatus
- type WalletActionEarnWithdrawFailedWebhookPayloadType
- type WalletActionEarnWithdrawRejectedWebhookPayload
- type WalletActionEarnWithdrawRejectedWebhookPayloadStatus
- type WalletActionEarnWithdrawRejectedWebhookPayloadType
- type WalletActionEarnWithdrawSucceededWebhookPayload
- type WalletActionEarnWithdrawSucceededWebhookPayloadStatus
- type WalletActionEarnWithdrawSucceededWebhookPayloadType
- type WalletActionGetParams
- type WalletActionInclude
- type WalletActionResponseUnion
- func (u WalletActionResponseUnion) AsAny() anyWalletActionResponse
- func (u WalletActionResponseUnion) AsEarnDeposit() (v EarnDepositActionResponse)
- func (u WalletActionResponseUnion) AsEarnFeeCollect() (v EarnFeeCollectActionResponse)
- func (u WalletActionResponseUnion) AsEarnIncentiveClaim() (v EarnIncentiveClaimActionResponse)
- func (u WalletActionResponseUnion) AsEarnWithdraw() (v EarnWithdrawActionResponse)
- func (u WalletActionResponseUnion) AsSwap() (v SwapActionResponse)
- func (u WalletActionResponseUnion) AsTransfer() (v TransferActionResponse)
- func (u WalletActionResponseUnion) RawJSON() string
- func (r *WalletActionResponseUnion) UnmarshalJSON(data []byte) error
- type WalletActionService
- type WalletActionStatus
- type WalletActionStepUnion
- func (u WalletActionStepUnion) AsAny() anyWalletActionStep
- func (u WalletActionStepUnion) AsCustodianTransaction() (v CustodianTransactionWalletActionStep)
- func (u WalletActionStepUnion) AsEvmTransaction() (v EvmTransactionWalletActionStep)
- func (u WalletActionStepUnion) AsEvmUserOperation() (v EvmUserOperationWalletActionStep)
- func (u WalletActionStepUnion) AsExternalTransaction() (v ExternalTransactionWalletActionStep)
- func (u WalletActionStepUnion) AsSvmTransaction() (v SvmTransactionWalletActionStep)
- func (u WalletActionStepUnion) AsTvmTransaction() (v TvmTransactionWalletActionStep)
- func (u WalletActionStepUnion) RawJSON() string
- func (r *WalletActionStepUnion) UnmarshalJSON(data []byte) error
- type WalletActionSwapCreatedWebhookPayload
- type WalletActionSwapCreatedWebhookPayloadStatus
- type WalletActionSwapCreatedWebhookPayloadType
- type WalletActionSwapFailedWebhookPayload
- type WalletActionSwapFailedWebhookPayloadStatus
- type WalletActionSwapFailedWebhookPayloadType
- type WalletActionSwapRejectedWebhookPayload
- type WalletActionSwapRejectedWebhookPayloadStatus
- type WalletActionSwapRejectedWebhookPayloadType
- type WalletActionSwapSucceededWebhookPayload
- type WalletActionSwapSucceededWebhookPayloadStatus
- type WalletActionSwapSucceededWebhookPayloadType
- type WalletActionTransferCreatedWebhookPayload
- type WalletActionTransferCreatedWebhookPayloadStatus
- type WalletActionTransferCreatedWebhookPayloadType
- type WalletActionTransferFailedWebhookPayload
- type WalletActionTransferFailedWebhookPayloadStatus
- type WalletActionTransferFailedWebhookPayloadType
- type WalletActionTransferRejectedWebhookPayload
- type WalletActionTransferRejectedWebhookPayloadStatus
- type WalletActionTransferRejectedWebhookPayloadType
- type WalletActionTransferSucceededWebhookPayload
- type WalletActionTransferSucceededWebhookPayloadStatus
- type WalletActionTransferSucceededWebhookPayloadType
- type WalletActionType
- type WalletAdditionalSigner
- type WalletAdditionalSignerItem
- type WalletArchivedWebhookPayload
- type WalletArchivedWebhookPayloadType
- type WalletAsset
- type WalletAssetChainNameInput
- type WalletAuthenticateRequestBody
- type WalletAuthenticateRequestBodyEncryptionType
- type WalletAuthenticateWithJwtParams
- type WalletAuthenticateWithJwtResponseUnion
- func (u WalletAuthenticateWithJwtResponseUnion) AsEncryptedWalletAuthenticateResponse() (v EncryptedWalletAuthenticateResponse)
- func (u WalletAuthenticateWithJwtResponseUnion) AsRawWalletAuthenticateResponse() (v RawWalletAuthenticateResponse)
- func (u WalletAuthenticateWithJwtResponseUnion) RawJSON() string
- func (r *WalletAuthenticateWithJwtResponseUnion) UnmarshalJSON(data []byte) error
- type WalletBalanceGetParams
- type WalletBalanceGetParamsAssetString
- type WalletBalanceGetParamsAssetUnion
- type WalletBalanceGetParamsChainUnion
- type WalletBalanceGetParamsIncludeCurrency
- type WalletBalanceGetParamsTokenUnion
- type WalletBalanceGetResponse
- type WalletBalanceGetResponseBalance
- type WalletBalanceGetResponseBalanceAsset
- type WalletBalanceService
- type WalletBatchCreateInput
- type WalletBatchCreateResponse
- type WalletBatchCreateResultUnion
- func (u WalletBatchCreateResultUnion) AsWalletBatchCreateFailure() (v WalletBatchCreateResultWalletBatchCreateFailure)
- func (u WalletBatchCreateResultUnion) AsWalletBatchCreateSuccess() (v WalletBatchCreateResultWalletBatchCreateSuccess)
- func (u WalletBatchCreateResultUnion) RawJSON() string
- func (r *WalletBatchCreateResultUnion) UnmarshalJSON(data []byte) error
- type WalletBatchCreateResultWalletBatchCreateFailure
- type WalletBatchCreateResultWalletBatchCreateSuccess
- type WalletBatchItemInput
- type WalletChainType
- type WalletCreationAdditionalSignerItem
- type WalletCreationInput
- type WalletCustodian
- type WalletEarnEthereumDepositParams
- type WalletEarnEthereumIncentiveClaimParams
- type WalletEarnEthereumIncentiveService
- type WalletEarnEthereumService
- func (r *WalletEarnEthereumService) Deposit(ctx context.Context, walletID string, params WalletEarnEthereumDepositParams, ...) (res *EarnDepositActionResponse, err error)
- func (r *WalletEarnEthereumService) Withdraw(ctx context.Context, walletID string, params WalletEarnEthereumWithdrawParams, ...) (res *EarnWithdrawActionResponse, err error)
- type WalletEarnEthereumWithdrawParams
- type WalletEarnService
- type WalletExportParams
- type WalletExportRequestBody
- type WalletExportResponseBody
- type WalletExportResult
- type WalletFundsAssetUnion
- func (u WalletFundsAssetUnion) AsAny() anyWalletFundsAsset
- func (u WalletFundsAssetUnion) AsErc20() (v WalletFundsErc20Asset)
- func (u WalletFundsAssetUnion) AsNativeToken() (v WalletFundsNativeTokenAsset)
- func (u WalletFundsAssetUnion) AsSac() (v WalletFundsSacAsset)
- func (u WalletFundsAssetUnion) AsSpl() (v WalletFundsSplAsset)
- func (u WalletFundsAssetUnion) RawJSON() string
- func (r *WalletFundsAssetUnion) UnmarshalJSON(data []byte) error
- type WalletFundsAssetUnionAddress
- type WalletFundsErc20Asset
- type WalletFundsErc20AssetType
- type WalletFundsNativeTokenAsset
- type WalletFundsNativeTokenAssetType
- type WalletFundsSacAsset
- type WalletFundsSacAssetType
- type WalletFundsSplAsset
- type WalletFundsSplAssetType
- type WalletGetParams
- type WalletGetWalletByAddressParams
- type WalletImportParams
- type WalletImportParamsWalletHD
- type WalletImportParamsWalletPrivateKey
- type WalletImportParamsWalletUnion
- type WalletImportSupportedChains
- type WalletInitImportParams
- type WalletInitImportResponse
- type WalletIntentResponse
- type WalletIntentResponseRequestDetails
- type WalletIntentResponseRequestDetailsBody
- type WalletInviteInput
- type WalletInviteInputType
- type WalletListParams
- type WalletNewBatchParams
- type WalletNewParams
- type WalletRawSignParams
- type WalletRecoveredWebhookPayload
- type WalletRecoveredWebhookPayloadType
- type WalletRecoverySetupMethod
- type WalletRecoverySetupWebhookPayload
- type WalletRecoverySetupWebhookPayloadType
- type WalletRestoredWebhookPayload
- type WalletRestoredWebhookPayloadType
- type WalletRpcParams
- type WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfClaimStaticDeposit(params SparkClaimStaticDepositRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfCreateLightningInvoice(params SparkCreateLightningInvoiceRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfEthSendTransaction(caip2 Caip2, method EthereumSendTransactionRpcInputMethod, ...) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfEthSign7702Authorization(params EthereumSign7702AuthorizationRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfEthSignTransaction(params EthereumSignTransactionRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfEthSignTypedDataV4(params EthereumSignTypedDataRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfEthSignUserOperation(params EthereumSignUserOperationRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfExportPrivateKey(address string, method ExportPrivateKeyRpcInputMethod, ...) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfExportSeedPhrase(address string, method ExportSeedPhraseRpcInputMethod, ...) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfGetBalance(method SparkGetBalanceRpcInputMethod) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfGetClaimStaticDepositQuote(params SparkGetClaimStaticDepositQuoteRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfGetStaticDepositAddress(method SparkGetStaticDepositAddressRpcInputMethod) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfGetWithdrawalFeeQuote(params SparkGetWithdrawalFeeQuoteRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfPayLightningInvoice(params SparkPayLightningInvoiceRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfPersonalSign(params EthereumPersonalSignRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfSecp256k1Sign(params EthereumSecp256k1SignRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfSignAndSendTransaction(caip2 Caip2, method SolanaSignAndSendTransactionRpcInputMethod, ...) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfSignMessage(params SolanaSignMessageRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfSignMessageWithIdentityKey(params SparkSignMessageWithIdentityKeyRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfSignTransaction(params SolanaSignTransactionRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfTransfer(params SparkTransferRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfTransferTokens(params SparkTransferTokensRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfTronSendTransaction(params TronSendTransactionRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfTronSignTransaction(params TronSignTransactionRpcInputParams) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfWalletSendCalls(caip2 Caip2, method EthereumSendCallsRpcInputMethod, ...) WalletRpcRequestBodyUnion
- func WalletRpcRequestBodyOfWithdraw(params SparkWithdrawRpcInputParams) WalletRpcRequestBodyUnion
- type WalletRpcRequestBodyUnionResp
- func (u WalletRpcRequestBodyUnionResp) AsAny() anyWalletRpcRequestBodyResp
- func (u WalletRpcRequestBodyUnionResp) AsClaimStaticDeposit() (v SparkClaimStaticDepositRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsCreateLightningInvoice() (v SparkCreateLightningInvoiceRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsEthSendTransaction() (v EthereumSendTransactionRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsEthSign7702Authorization() (v EthereumSign7702AuthorizationRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsEthSignTransaction() (v EthereumSignTransactionRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsEthSignTypedDataV4() (v EthereumSignTypedDataRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsEthSignUserOperation() (v EthereumSignUserOperationRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsExportPrivateKey() (v ExportPrivateKeyRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsExportSeedPhrase() (v ExportSeedPhraseRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsGetBalance() (v SparkGetBalanceRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsGetClaimStaticDepositQuote() (v SparkGetClaimStaticDepositQuoteRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsGetStaticDepositAddress() (v SparkGetStaticDepositAddressRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsGetWithdrawalFeeQuote() (v SparkGetWithdrawalFeeQuoteRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsPayLightningInvoice() (v SparkPayLightningInvoiceRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsPersonalSign() (v EthereumPersonalSignRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsSecp256k1Sign() (v EthereumSecp256k1SignRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsSignAndSendTransaction() (v SolanaSignAndSendTransactionRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsSignMessage() (v SolanaSignMessageRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsSignMessageWithIdentityKey() (v SparkSignMessageWithIdentityKeyRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsSignTransaction() (v SolanaSignTransactionRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsTransfer() (v SparkTransferRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsTransferTokens() (v SparkTransferTokensRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsTronSendTransaction() (v TronSendTransactionRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsTronSignTransaction() (v TronSignTransactionRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsWalletSendCalls() (v EthereumSendCallsRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) AsWithdraw() (v SparkWithdrawRpcInputResp)
- func (u WalletRpcRequestBodyUnionResp) RawJSON() string
- func (r WalletRpcRequestBodyUnionResp) ToParam() WalletRpcRequestBodyUnion
- func (r *WalletRpcRequestBodyUnionResp) UnmarshalJSON(data []byte) error
- type WalletRpcRequestBodyUnionRespParams
- type WalletRpcRequestBodyUnionRespParamsRawData
- type WalletRpcRequestBodyUnionRespParamsTransaction
- type WalletRpcResponseUnion
- func (u WalletRpcResponseUnion) AsAny() anyWalletRpcResponse
- func (u WalletRpcResponseUnion) AsClaimStaticDeposit() (v SparkClaimStaticDepositRpcResponse)
- func (u WalletRpcResponseUnion) AsCreateLightningInvoice() (v SparkCreateLightningInvoiceRpcResponse)
- func (u WalletRpcResponseUnion) AsEthSendTransaction() (v EthereumSendTransactionRpcResponse)
- func (u WalletRpcResponseUnion) AsEthSign7702Authorization() (v EthereumSign7702AuthorizationRpcResponse)
- func (u WalletRpcResponseUnion) AsEthSignTransaction() (v EthereumSignTransactionRpcResponse)
- func (u WalletRpcResponseUnion) AsEthSignTypedDataV4() (v EthereumSignTypedDataRpcResponse)
- func (u WalletRpcResponseUnion) AsEthSignUserOperation() (v EthereumSignUserOperationRpcResponse)
- func (u WalletRpcResponseUnion) AsExportPrivateKey() (v ExportPrivateKeyRpcResponse)
- func (u WalletRpcResponseUnion) AsExportSeedPhrase() (v ExportSeedPhraseRpcResponse)
- func (u WalletRpcResponseUnion) AsGetBalance() (v SparkGetBalanceRpcResponse)
- func (u WalletRpcResponseUnion) AsGetClaimStaticDepositQuote() (v SparkGetClaimStaticDepositQuoteRpcResponse)
- func (u WalletRpcResponseUnion) AsGetStaticDepositAddress() (v SparkGetStaticDepositAddressRpcResponse)
- func (u WalletRpcResponseUnion) AsGetWithdrawalFeeQuote() (v SparkGetWithdrawalFeeQuoteRpcResponse)
- func (u WalletRpcResponseUnion) AsPayLightningInvoice() (v SparkPayLightningInvoiceRpcResponse)
- func (u WalletRpcResponseUnion) AsPersonalSign() (v EthereumPersonalSignRpcResponse)
- func (u WalletRpcResponseUnion) AsSecp256k1Sign() (v EthereumSecp256k1SignRpcResponse)
- func (u WalletRpcResponseUnion) AsSignAndSendTransaction() (v SolanaSignAndSendTransactionRpcResponse)
- func (u WalletRpcResponseUnion) AsSignMessage() (v SolanaSignMessageRpcResponse)
- func (u WalletRpcResponseUnion) AsSignMessageWithIdentityKey() (v SparkSignMessageWithIdentityKeyRpcResponse)
- func (u WalletRpcResponseUnion) AsSignTransaction() (v SolanaSignTransactionRpcResponse)
- func (u WalletRpcResponseUnion) AsTransfer() (v SparkTransferRpcResponse)
- func (u WalletRpcResponseUnion) AsTransferTokens() (v SparkTransferTokensRpcResponse)
- func (u WalletRpcResponseUnion) AsTronSendTransaction() (v TronSendTransactionRpcResponse)
- func (u WalletRpcResponseUnion) AsTronSignTransaction() (v TronSignTransactionRpcResponse)
- func (u WalletRpcResponseUnion) AsWalletSendCalls() (v EthereumSendCallsRpcResponse)
- func (u WalletRpcResponseUnion) AsWithdraw() (v SparkWithdrawRpcResponse)
- func (u WalletRpcResponseUnion) RawJSON() string
- func (r *WalletRpcResponseUnion) UnmarshalJSON(data []byte) error
- type WalletRpcResponseUnionData
- type WalletRpcResponseUnionDataFee
- type WalletService
- func (r *WalletService) Archive(ctx context.Context, walletID string, opts ...option.RequestOption) (res *Wallet, err error)
- func (r *WalletService) AuthenticateWithJwt(ctx context.Context, body WalletAuthenticateWithJwtParams, ...) (res *WalletAuthenticateWithJwtResponseUnion, err error)
- func (r *WalletService) Export(ctx context.Context, walletID string, params WalletExportParams, ...) (res *WalletExportResponseBody, err error)
- func (r *WalletService) Get(ctx context.Context, walletID string, query WalletGetParams, ...) (res *Wallet, err error)
- func (r *WalletService) GetWalletByAddress(ctx context.Context, body WalletGetWalletByAddressParams, ...) (res *Wallet, err error)
- func (r *WalletService) InitImport(ctx context.Context, body WalletInitImportParams, opts ...option.RequestOption) (res *WalletInitImportResponse, err error)
- func (r *WalletService) List(ctx context.Context, query WalletListParams, opts ...option.RequestOption) (res *pagination.Cursor[Wallet], err error)
- func (r *WalletService) ListAutoPaging(ctx context.Context, query WalletListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[Wallet]
- func (r *WalletService) New(ctx context.Context, params WalletNewParams, opts ...option.RequestOption) (res *Wallet, err error)
- func (r *WalletService) NewBatch(ctx context.Context, body WalletNewBatchParams, opts ...option.RequestOption) (res *WalletBatchCreateResponse, err error)
- func (r *WalletService) RawSign(ctx context.Context, walletID string, params WalletRawSignParams, ...) (res *RawSignResponse, err error)
- func (r *WalletService) Rpc(ctx context.Context, walletID string, params WalletRpcParams, ...) (res *WalletRpcResponseUnion, err error)
- func (r *WalletService) SubmitImport(ctx context.Context, body WalletSubmitImportParams, ...) (res *Wallet, err error)
- func (r *WalletService) Transfer(ctx context.Context, walletID string, params WalletTransferParams, ...) (res *TransferActionResponse, err error)
- func (r *WalletService) Update(ctx context.Context, walletID string, params WalletUpdateParams, ...) (res *Wallet, err error)
- type WalletSubmitImportParams
- type WalletSubmitImportParamsWalletUnion
- type WalletSwapExecuteParams
- type WalletSwapQuoteParams
- type WalletSwapService
- type WalletTransactionService
- type WalletTransferParams
- type WalletUpdateParams
- type WalletUpdateRequestBody
- type WebhookPayload
- type WebhookService
- type YieldClaimConfirmedWebhookPayload
- type YieldClaimConfirmedWebhookPayloadType
- type YieldClaimReward
- type YieldDepositConfirmedWebhookPayload
- type YieldDepositConfirmedWebhookPayloadType
- type YieldService
- type YieldWithdrawConfirmedWebhookPayload
- type YieldWithdrawConfirmedWebhookPayloadType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (PRIVY_APP_ID, PRIVY_APP_SECRET, PRIVY_API_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
func RequestExpiry ¶ added in v0.4.0
RequestExpiry computes a request expiry timestamp (Unix milliseconds) from a duration offset. For example, RequestExpiry(20 * 60 * 1000) returns a timestamp 20 minutes from now.
Types ¶
type AbiParameter ¶ added in v0.5.0
type AbiParameter struct {
Type string `json:"type" api:"required"`
Indexed param.Opt[bool] `json:"indexed,omitzero"`
InternalType param.Opt[string] `json:"internalType,omitzero"`
Name param.Opt[string] `json:"name,omitzero"`
Components []map[string]any `json:"components,omitzero"`
// contains filtered or unexported fields
}
A parameter in a Solidity ABI function or event definition.
The property Type is required.
func (AbiParameter) MarshalJSON ¶ added in v0.5.0
func (r AbiParameter) MarshalJSON() (data []byte, err error)
func (*AbiParameter) UnmarshalJSON ¶ added in v0.5.0
func (r *AbiParameter) UnmarshalJSON(data []byte) error
type AbiParameterResp ¶ added in v0.5.0
type AbiParameterResp struct {
Type string `json:"type" api:"required"`
Components []map[string]any `json:"components"`
Indexed bool `json:"indexed"`
InternalType string `json:"internalType"`
Name string `json:"name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
Components respjson.Field
Indexed respjson.Field
InternalType respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A parameter in a Solidity ABI function or event definition.
func (AbiParameterResp) RawJSON ¶ added in v0.5.0
func (r AbiParameterResp) RawJSON() string
Returns the unmodified JSON received from the API
func (AbiParameterResp) ToParam ¶ added in v0.5.0
func (r AbiParameterResp) ToParam() AbiParameter
ToParam converts this AbiParameterResp to a AbiParameter.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AbiParameter.Overrides()
func (*AbiParameterResp) UnmarshalJSON ¶ added in v0.5.0
func (r *AbiParameterResp) UnmarshalJSON(data []byte) error
type AbiSchema ¶ added in v0.5.0
type AbiSchema []AbiSchemaItem
type AbiSchemaItem ¶ added in v0.5.0
type AbiSchemaItem struct {
// Any of "function", "constructor", "event", "fallback", "receive".
Type string `json:"type,omitzero" api:"required"`
Anonymous param.Opt[bool] `json:"anonymous,omitzero"`
Name param.Opt[string] `json:"name,omitzero"`
Inputs []AbiParameter `json:"inputs,omitzero"`
Outputs []AbiParameter `json:"outputs,omitzero"`
// Any of "pure", "view", "nonpayable", "payable".
StateMutability string `json:"stateMutability,omitzero"`
// contains filtered or unexported fields
}
The property Type is required.
func (AbiSchemaItem) MarshalJSON ¶ added in v0.6.0
func (r AbiSchemaItem) MarshalJSON() (data []byte, err error)
func (*AbiSchemaItem) UnmarshalJSON ¶ added in v0.5.0
func (r *AbiSchemaItem) UnmarshalJSON(data []byte) error
type AbiSchemaItemResp ¶ added in v0.6.0
type AbiSchemaItemResp struct {
// Any of "function", "constructor", "event", "fallback", "receive".
Type string `json:"type" api:"required"`
Anonymous bool `json:"anonymous"`
Inputs []AbiParameterResp `json:"inputs"`
Name string `json:"name"`
Outputs []AbiParameterResp `json:"outputs"`
// Any of "pure", "view", "nonpayable", "payable".
StateMutability string `json:"stateMutability"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
Anonymous respjson.Field
Inputs respjson.Field
Name respjson.Field
Outputs respjson.Field
StateMutability respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AbiSchemaItemResp) RawJSON ¶ added in v0.6.0
func (r AbiSchemaItemResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*AbiSchemaItemResp) UnmarshalJSON ¶ added in v0.6.0
func (r *AbiSchemaItemResp) UnmarshalJSON(data []byte) error
type AbiSchemaResp ¶ added in v0.6.0
type AbiSchemaResp []AbiSchemaItemResp
type AccessListEntry ¶ added in v0.11.0
type AccessListEntry struct {
Address string `json:"address" api:"required"`
StorageKeys []Hex `json:"storage_keys,omitzero" api:"required"`
// contains filtered or unexported fields
}
An entry in an EIP-2930 access list, specifying an address and its storage keys.
The properties Address, StorageKeys are required.
func (AccessListEntry) MarshalJSON ¶ added in v0.11.0
func (r AccessListEntry) MarshalJSON() (data []byte, err error)
func (*AccessListEntry) UnmarshalJSON ¶ added in v0.11.0
func (r *AccessListEntry) UnmarshalJSON(data []byte) error
type AccessListEntryResp ¶ added in v0.11.0
type AccessListEntryResp struct {
Address string `json:"address" api:"required"`
StorageKeys []Hex `json:"storage_keys" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
StorageKeys respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An entry in an EIP-2930 access list, specifying an address and its storage keys.
func (AccessListEntryResp) RawJSON ¶ added in v0.11.0
func (r AccessListEntryResp) RawJSON() string
Returns the unmodified JSON received from the API
func (AccessListEntryResp) ToParam ¶ added in v0.11.0
func (r AccessListEntryResp) ToParam() AccessListEntry
ToParam converts this AccessListEntryResp to a AccessListEntry.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AccessListEntry.Overrides()
func (*AccessListEntryResp) UnmarshalJSON ¶ added in v0.11.0
func (r *AccessListEntryResp) UnmarshalJSON(data []byte) error
type AccountService ¶ added in v0.2.0
type AccountService struct {
Options []option.RequestOption
}
AccountService contains methods and other services that help with interacting with the Privy API 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 NewAccountService method instead.
func NewAccountService ¶ added in v0.2.0
func NewAccountService(opts ...option.RequestOption) (r AccountService)
NewAccountService 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 ActionRequestBodyCondition ¶ added in v0.6.0
type ActionRequestBodyCondition struct {
Field string `json:"field" api:"required"`
// Any of "action_request_body".
FieldSource ActionRequestBodyConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Condition on the original wallet action API request body fields.
The properties Field, FieldSource, Operator, Value are required.
func (ActionRequestBodyCondition) MarshalJSON ¶ added in v0.6.0
func (r ActionRequestBodyCondition) MarshalJSON() (data []byte, err error)
func (*ActionRequestBodyCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *ActionRequestBodyCondition) UnmarshalJSON(data []byte) error
type ActionRequestBodyConditionFieldSource ¶ added in v0.6.0
type ActionRequestBodyConditionFieldSource string
const (
ActionRequestBodyConditionFieldSourceActionRequestBody ActionRequestBodyConditionFieldSource = "action_request_body"
)
type ActionRequestBodyConditionResp ¶ added in v0.6.0
type ActionRequestBodyConditionResp struct {
Field string `json:"field" api:"required"`
// Any of "action_request_body".
FieldSource ActionRequestBodyConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Condition on the original wallet action API request body fields.
func (ActionRequestBodyConditionResp) RawJSON ¶ added in v0.6.0
func (r ActionRequestBodyConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ActionRequestBodyConditionResp) ToParam ¶ added in v0.6.0
func (r ActionRequestBodyConditionResp) ToParam() ActionRequestBodyCondition
ToParam converts this ActionRequestBodyConditionResp to a ActionRequestBodyCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ActionRequestBodyCondition.Overrides()
func (*ActionRequestBodyConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *ActionRequestBodyConditionResp) UnmarshalJSON(data []byte) error
type AdditionalSignerInput ¶ added in v0.4.0
type AdditionalSignerInput []AdditionalSignerItemInput
type AdditionalSignerInputResp ¶ added in v0.6.0
type AdditionalSignerInputResp []AdditionalSignerItemInputResp
type AdditionalSignerItemInput ¶ added in v0.4.0
type AdditionalSignerItemInput struct {
// A unique identifier for a key quorum.
SignerID KeyQuorumID `json:"signer_id" api:"required" format:"cuid2"`
// An optional list of up to one policy ID to enforce on the wallet.
OverridePolicyIDs PolicyInput `json:"override_policy_ids,omitzero" format:"cuid2"`
// contains filtered or unexported fields
}
A single additional signer for a wallet, with an optional policy override.
The property SignerID is required.
func (AdditionalSignerItemInput) MarshalJSON ¶ added in v0.6.0
func (r AdditionalSignerItemInput) MarshalJSON() (data []byte, err error)
func (*AdditionalSignerItemInput) UnmarshalJSON ¶ added in v0.4.0
func (r *AdditionalSignerItemInput) UnmarshalJSON(data []byte) error
type AdditionalSignerItemInputResp ¶ added in v0.6.0
type AdditionalSignerItemInputResp struct {
// A unique identifier for a key quorum.
SignerID KeyQuorumID `json:"signer_id" api:"required" format:"cuid2"`
// An optional list of up to one policy ID to enforce on the wallet.
OverridePolicyIDs PolicyInput `json:"override_policy_ids" format:"cuid2"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SignerID respjson.Field
OverridePolicyIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single additional signer for a wallet, with an optional policy override.
func (AdditionalSignerItemInputResp) RawJSON ¶ added in v0.6.0
func (r AdditionalSignerItemInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (AdditionalSignerItemInputResp) ToParam ¶ added in v0.6.0
func (r AdditionalSignerItemInputResp) ToParam() AdditionalSignerItemInput
ToParam converts this AdditionalSignerItemInputResp to a AdditionalSignerItemInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AdditionalSignerItemInput.Overrides()
func (*AdditionalSignerItemInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *AdditionalSignerItemInputResp) UnmarshalJSON(data []byte) error
type AggregationCondition ¶ added in v0.4.0
type AggregationCondition struct {
Field string `json:"field" api:"required"`
// Any of "reference".
FieldSource AggregationConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Condition referencing an aggregation value. The field must start with "aggregation." followed by the aggregation ID.
The properties Field, FieldSource, Operator, Value are required.
func (AggregationCondition) MarshalJSON ¶ added in v0.6.0
func (r AggregationCondition) MarshalJSON() (data []byte, err error)
func (*AggregationCondition) UnmarshalJSON ¶ added in v0.4.0
func (r *AggregationCondition) UnmarshalJSON(data []byte) error
type AggregationConditionFieldSource ¶ added in v0.4.0
type AggregationConditionFieldSource string
const (
AggregationConditionFieldSourceReference AggregationConditionFieldSource = "reference"
)
type AggregationConditionResp ¶ added in v0.6.0
type AggregationConditionResp struct {
Field string `json:"field" api:"required"`
// Any of "reference".
FieldSource AggregationConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Condition referencing an aggregation value. The field must start with "aggregation." followed by the aggregation ID.
func (AggregationConditionResp) RawJSON ¶ added in v0.6.0
func (r AggregationConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (AggregationConditionResp) ToParam ¶ added in v0.6.0
func (r AggregationConditionResp) ToParam() AggregationCondition
ToParam converts this AggregationConditionResp to a AggregationCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AggregationCondition.Overrides()
func (*AggregationConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *AggregationConditionResp) UnmarshalJSON(data []byte) error
type AggregationService ¶
type AggregationService struct {
Options []option.RequestOption
}
AggregationService contains methods and other services that help with interacting with the Privy API 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 NewAggregationService method instead.
func NewAggregationService ¶
func NewAggregationService(opts ...option.RequestOption) (r AggregationService)
NewAggregationService 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 AlchemyPaymasterContext ¶ added in v0.4.0
type AlchemyPaymasterContext struct {
PolicyID string `json:"policy_id" api:"required" format:"uuid"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PolicyID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The Alchemy paymaster context for a smart wallet network configuration.
func (AlchemyPaymasterContext) RawJSON ¶ added in v0.4.0
func (r AlchemyPaymasterContext) RawJSON() string
Returns the unmodified JSON received from the API
func (*AlchemyPaymasterContext) UnmarshalJSON ¶ added in v0.4.0
func (r *AlchemyPaymasterContext) UnmarshalJSON(data []byte) error
type AllowlistDeletionResponse ¶ added in v0.4.0
type AllowlistDeletionResponse struct {
Message string `json:"message" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Confirmation response for deleting an allowlist entry.
func (AllowlistDeletionResponse) RawJSON ¶ added in v0.4.0
func (r AllowlistDeletionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AllowlistDeletionResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *AllowlistDeletionResponse) UnmarshalJSON(data []byte) error
type AllowlistEntry ¶ added in v0.4.0
type AllowlistEntry struct {
ID string `json:"id" api:"required"`
AcceptedAt float64 `json:"acceptedAt" api:"required"`
AppID string `json:"appId" api:"required"`
Type string `json:"type" api:"required"`
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AcceptedAt respjson.Field
AppID respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An allowlist entry for an app.
func (AllowlistEntry) RawJSON ¶ added in v0.4.0
func (r AllowlistEntry) RawJSON() string
Returns the unmodified JSON received from the API
func (*AllowlistEntry) UnmarshalJSON ¶ added in v0.4.0
func (r *AllowlistEntry) UnmarshalJSON(data []byte) error
type AmountType ¶ added in v0.6.0
type AmountType string
Whether the amount refers to the input token or output token.
const ( AmountTypeExactInput AmountType = "exact_input" AmountTypeExactOutput AmountType = "exact_output" )
type AnalyticsService ¶
type AnalyticsService struct {
Options []option.RequestOption
}
AnalyticsService contains methods and other services that help with interacting with the Privy API 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 NewAnalyticsService method instead.
func NewAnalyticsService ¶
func NewAnalyticsService(opts ...option.RequestOption) (r AnalyticsService)
NewAnalyticsService 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 AppAllowlistConfig ¶ added in v0.11.0
type AppAllowlistConfig struct {
CtaLink string `json:"cta_link" api:"required"`
CtaText string `json:"cta_text" api:"required"`
ErrorDetail string `json:"error_detail" api:"required"`
ErrorTitle string `json:"error_title" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CtaLink respjson.Field
CtaText respjson.Field
ErrorDetail respjson.Field
ErrorTitle respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for the allowlist error page shown to users not on the allowlist.
func (AppAllowlistConfig) RawJSON ¶ added in v0.11.0
func (r AppAllowlistConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppAllowlistConfig) UnmarshalJSON ¶ added in v0.11.0
func (r *AppAllowlistConfig) UnmarshalJSON(data []byte) error
type AppAllowlistDeleteParams ¶ added in v0.4.0
type AppAllowlistDeleteParams struct {
// Input for adding or removing an allowlist entry. Discriminated by type.
UserInviteInput UserInviteInputUnion
// contains filtered or unexported fields
}
func (AppAllowlistDeleteParams) MarshalJSON ¶ added in v0.4.0
func (r AppAllowlistDeleteParams) MarshalJSON() (data []byte, err error)
func (*AppAllowlistDeleteParams) UnmarshalJSON ¶ added in v0.4.0
func (r *AppAllowlistDeleteParams) UnmarshalJSON(data []byte) error
type AppAllowlistNewParams ¶ added in v0.4.0
type AppAllowlistNewParams struct {
// Input for adding or removing an allowlist entry. Discriminated by type.
UserInviteInput UserInviteInputUnion
// contains filtered or unexported fields
}
func (AppAllowlistNewParams) MarshalJSON ¶ added in v0.4.0
func (r AppAllowlistNewParams) MarshalJSON() (data []byte, err error)
func (*AppAllowlistNewParams) UnmarshalJSON ¶ added in v0.4.0
func (r *AppAllowlistNewParams) UnmarshalJSON(data []byte) error
type AppAllowlistService ¶ added in v0.4.0
type AppAllowlistService struct {
Options []option.RequestOption
}
Operations related to app settings and allowlist management
AppAllowlistService contains methods and other services that help with interacting with the Privy API 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 NewAppAllowlistService method instead.
func NewAppAllowlistService ¶ added in v0.4.0
func NewAppAllowlistService(opts ...option.RequestOption) (r AppAllowlistService)
NewAppAllowlistService 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 (*AppAllowlistService) Delete ¶ added in v0.4.0
func (r *AppAllowlistService) Delete(ctx context.Context, appID string, body AppAllowlistDeleteParams, opts ...option.RequestOption) (res *AllowlistDeletionResponse, err error)
Remove an entry from the allowlist for an app. The allowlist must be enabled.
func (*AppAllowlistService) List ¶ added in v0.4.0
func (r *AppAllowlistService) List(ctx context.Context, appID string, opts ...option.RequestOption) (res *[]AllowlistEntry, err error)
Get all allowlist entries for an app. Returns the list of users allowed to access the app when the allowlist is enabled.
func (*AppAllowlistService) New ¶ added in v0.4.0
func (r *AppAllowlistService) New(ctx context.Context, appID string, body AppAllowlistNewParams, opts ...option.RequestOption) (res *AllowlistEntry, err error)
Add a new entry to the allowlist for an app. The allowlist must be enabled.
type AppCustomOAuthProvider ¶ added in v0.11.0
type AppCustomOAuthProvider struct {
Enabled bool `json:"enabled" api:"required"`
// The ID of a custom OAuth provider, set up for this app. Must start with
// "custom:".
Provider CustomOAuthProviderID `json:"provider" api:"required"`
ProviderDisplayName string `json:"provider_display_name" api:"required"`
ProviderIconURL string `json:"provider_icon_url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Provider respjson.Field
ProviderDisplayName respjson.Field
ProviderIconURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A custom OAuth provider configured for an app.
func (AppCustomOAuthProvider) RawJSON ¶ added in v0.11.0
func (r AppCustomOAuthProvider) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppCustomOAuthProvider) UnmarshalJSON ¶ added in v0.11.0
func (r *AppCustomOAuthProvider) UnmarshalJSON(data []byte) error
type AppGetGasSpendParams ¶ added in v0.6.0
type AppGetGasSpendParams struct {
EndTimestamp float64 `query:"end_timestamp" api:"required" json:"-"`
StartTimestamp float64 `query:"start_timestamp" api:"required" json:"-"`
WalletIDs []string `query:"wallet_ids,omitzero" api:"required" json:"-"`
// contains filtered or unexported fields
}
func (AppGetGasSpendParams) URLQuery ¶ added in v0.6.0
func (r AppGetGasSpendParams) URLQuery() (v url.Values, err error)
URLQuery serializes AppGetGasSpendParams's query parameters as `url.Values`.
type AppResponse ¶ added in v0.4.0
type AppResponse struct {
ID string `json:"id" api:"required"`
AccentColor string `json:"accent_color" api:"required"`
AllowedDomains []string `json:"allowed_domains" api:"required"`
AllowedNativeAppIDs []string `json:"allowed_native_app_ids" api:"required"`
AllowedNativeAppURLSchemes []string `json:"allowed_native_app_url_schemes" api:"required"`
// Configuration for the allowlist error page shown to users not on the allowlist.
AllowlistConfig AppAllowlistConfig `json:"allowlist_config" api:"required"`
AllowlistEnabled bool `json:"allowlist_enabled" api:"required"`
AppleOAuth bool `json:"apple_oauth" api:"required"`
CaptchaEnabled bool `json:"captcha_enabled" api:"required"`
CustomAPIURL string `json:"custom_api_url" api:"required"`
CustomJwtAuth bool `json:"custom_jwt_auth" api:"required"`
CustomOAuthProviders []AppCustomOAuthProvider `json:"custom_oauth_providers" api:"required"`
// Indicates that this response contains only publicly accessible data, not a
// privileged resource
//
// Any of "public".
DataClassification AppResponseDataClassification `json:"data_classification" api:"required"`
DisablePlusEmails bool `json:"disable_plus_emails" api:"required"`
DiscordOAuth bool `json:"discord_oauth" api:"required"`
EmailAuth bool `json:"email_auth" api:"required"`
// Configuration for embedded wallets including the mode.
EmbeddedWalletConfig EmbeddedWalletConfigSchema `json:"embedded_wallet_config" api:"required"`
// The captcha provider enabled for an app.
//
// Any of "turnstile", "hcaptcha".
EnabledCaptchaProvider CaptchaProvider `json:"enabled_captcha_provider" api:"required"`
EnforceWalletUis bool `json:"enforce_wallet_uis" api:"required"`
ExternalWalletsForSignupEnabled bool `json:"external_wallets_for_signup_enabled" api:"required"`
FarcasterAuth bool `json:"farcaster_auth" api:"required"`
FarcasterLinkWalletsEnabled bool `json:"farcaster_link_wallets_enabled" api:"required"`
FiatOnRampEnabled bool `json:"fiat_on_ramp_enabled" api:"required"`
GitHubOAuth bool `json:"github_oauth" api:"required"`
GoogleOAuth bool `json:"google_oauth" api:"required"`
GuestAuth bool `json:"guest_auth" api:"required"`
IconURL string `json:"icon_url" api:"required"`
InstagramOAuth bool `json:"instagram_oauth" api:"required"`
LegacyWalletUiConfig bool `json:"legacy_wallet_ui_config" api:"required"`
LineOAuth bool `json:"line_oauth" api:"required"`
LinkedinOAuth bool `json:"linkedin_oauth" api:"required"`
LogoURL string `json:"logo_url" api:"required"`
MaxLinkedWalletsPerUser float64 `json:"max_linked_wallets_per_user" api:"required"`
MergeAccountsByEmail bool `json:"merge_accounts_by_email" api:"required"`
MfaMethods []MfaMethod `json:"mfa_methods" api:"required"`
Name string `json:"name" api:"required"`
PasskeyAuth bool `json:"passkey_auth" api:"required"`
PasskeysForSignupEnabled bool `json:"passkeys_for_signup_enabled" api:"required"`
PrivacyPolicyURL string `json:"privacy_policy_url" api:"required"`
RequireUsersAcceptTerms bool `json:"require_users_accept_terms" api:"required"`
ShowWalletLoginFirst bool `json:"show_wallet_login_first" api:"required"`
// The configuration object for smart wallets.
SmartWalletConfig SmartWalletConfigurationUnion `json:"smart_wallet_config" api:"required"`
SMSAuth bool `json:"sms_auth" api:"required"`
SolanaWalletAuth bool `json:"solana_wallet_auth" api:"required"`
SpotifyOAuth bool `json:"spotify_oauth" api:"required"`
TelegramAuth bool `json:"telegram_auth" api:"required"`
TelegramOAuth bool `json:"telegram_oauth" api:"required"`
TermsAndConditionsURL string `json:"terms_and_conditions_url" api:"required"`
Theme string `json:"theme" api:"required"`
TiktokOAuth bool `json:"tiktok_oauth" api:"required"`
TwitchOAuth bool `json:"twitch_oauth" api:"required"`
TwitterOAuth bool `json:"twitter_oauth" api:"required"`
TwitterOAuthOnMobileEnabled bool `json:"twitter_oauth_on_mobile_enabled" api:"required"`
VerificationKey string `json:"verification_key" api:"required"`
WalletAuth bool `json:"wallet_auth" api:"required"`
WalletConnectCloudProjectID string `json:"wallet_connect_cloud_project_id" api:"required"`
WhatsappEnabled bool `json:"whatsapp_enabled" api:"required"`
CaptchaSiteKey string `json:"captcha_site_key"`
// Configuration for funding and on-ramp options.
FundingConfig FundingConfigResponseSchema `json:"funding_config"`
// Configuration for Telegram authentication.
TelegramAuthConfig TelegramAuthConfigSchema `json:"telegram_auth_config"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccentColor respjson.Field
AllowedDomains respjson.Field
AllowedNativeAppIDs respjson.Field
AllowedNativeAppURLSchemes respjson.Field
AllowlistConfig respjson.Field
AllowlistEnabled respjson.Field
AppleOAuth respjson.Field
CaptchaEnabled respjson.Field
CustomAPIURL respjson.Field
CustomJwtAuth respjson.Field
CustomOAuthProviders respjson.Field
DataClassification respjson.Field
DisablePlusEmails respjson.Field
DiscordOAuth respjson.Field
EmailAuth respjson.Field
EmbeddedWalletConfig respjson.Field
EnabledCaptchaProvider respjson.Field
EnforceWalletUis respjson.Field
ExternalWalletsForSignupEnabled respjson.Field
FarcasterAuth respjson.Field
FarcasterLinkWalletsEnabled respjson.Field
FiatOnRampEnabled respjson.Field
GitHubOAuth respjson.Field
GoogleOAuth respjson.Field
GuestAuth respjson.Field
IconURL respjson.Field
InstagramOAuth respjson.Field
LegacyWalletUiConfig respjson.Field
LineOAuth respjson.Field
LinkedinOAuth respjson.Field
LogoURL respjson.Field
MaxLinkedWalletsPerUser respjson.Field
MergeAccountsByEmail respjson.Field
MfaMethods respjson.Field
Name respjson.Field
PasskeyAuth respjson.Field
PasskeysForSignupEnabled respjson.Field
PrivacyPolicyURL respjson.Field
RequireUsersAcceptTerms respjson.Field
ShowWalletLoginFirst respjson.Field
SmartWalletConfig respjson.Field
SMSAuth respjson.Field
SolanaWalletAuth respjson.Field
SpotifyOAuth respjson.Field
TelegramAuth respjson.Field
TelegramOAuth respjson.Field
TermsAndConditionsURL respjson.Field
Theme respjson.Field
TiktokOAuth respjson.Field
TwitchOAuth respjson.Field
TwitterOAuth respjson.Field
TwitterOAuthOnMobileEnabled respjson.Field
VerificationKey respjson.Field
WalletAuth respjson.Field
WalletConnectCloudProjectID respjson.Field
WhatsappEnabled respjson.Field
CaptchaSiteKey respjson.Field
FundingConfig respjson.Field
TelegramAuthConfig respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The response for getting an app.
func (AppResponse) RawJSON ¶ added in v0.4.0
func (r AppResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AppResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *AppResponse) UnmarshalJSON(data []byte) error
type AppResponseDataClassification ¶ added in v0.7.0
type AppResponseDataClassification string
Indicates that this response contains only publicly accessible data, not a privileged resource
const (
AppResponseDataClassificationPublic AppResponseDataClassification = "public"
)
type AppService ¶
type AppService struct {
Options []option.RequestOption
// Operations related to app settings and allowlist management
Allowlist AppAllowlistService
}
Operations related to app settings and allowlist management
AppService contains methods and other services that help with interacting with the Privy API 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 NewAppService method instead.
func NewAppService ¶
func NewAppService(opts ...option.RequestOption) (r AppService)
NewAppService 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 (*AppService) Get ¶ added in v0.4.0
func (r *AppService) Get(ctx context.Context, appID string, opts ...option.RequestOption) (res *AppResponse, err error)
Get the settings and configuration for an app.
func (*AppService) GetGasSpend ¶ added in v0.6.0
func (r *AppService) GetGasSpend(ctx context.Context, query AppGetGasSpendParams, opts ...option.RequestOption) (res *GasSpendResponseBody, err error)
Get aggregated Privy gas credits charged for a set of wallets over a time range. Maximum 100 wallet IDs and 30-day range per request.
func (*AppService) GetTestCredentials ¶ added in v0.4.0
func (r *AppService) GetTestCredentials(ctx context.Context, appID string, opts ...option.RequestOption) (res *TestAccountsResponse, err error)
Get the test accounts and credentials for an app.
type AuthorizationKey ¶ added in v0.11.0
type AuthorizationKey struct {
DisplayName string `json:"display_name" api:"required"`
PublicKey string `json:"public_key" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DisplayName respjson.Field
PublicKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A public key authorized to sign on a key quorum.
func (AuthorizationKey) RawJSON ¶ added in v0.11.0
func (r AuthorizationKey) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuthorizationKey) UnmarshalJSON ¶ added in v0.11.0
func (r *AuthorizationKey) UnmarshalJSON(data []byte) error
type BaseActionResult ¶ added in v0.4.0
type BaseActionResult struct {
// Unix timestamp when the action was executed
ExecutedAt float64 `json:"executed_at" api:"required"`
// HTTP status code from the action execution
StatusCode float64 `json:"status_code" api:"required"`
// Display name of the key quorum that authorized execution
AuthorizedByDisplayName string `json:"authorized_by_display_name"`
// ID of the key quorum that authorized execution
AuthorizedByID string `json:"authorized_by_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExecutedAt respjson.Field
StatusCode respjson.Field
AuthorizedByDisplayName respjson.Field
AuthorizedByID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Common fields for intent action execution results.
func (BaseActionResult) RawJSON ¶ added in v0.4.0
func (r BaseActionResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaseActionResult) UnmarshalJSON ¶ added in v0.4.0
func (r *BaseActionResult) UnmarshalJSON(data []byte) error
type BaseIntentResponse ¶ added in v0.5.0
type BaseIntentResponse struct {
// Detailed authorization information including key quorum members, thresholds, and
// signature status
AuthorizationDetails []IntentAuthorization `json:"authorization_details" api:"required"`
// Unix timestamp when the intent was created
CreatedAt float64 `json:"created_at" api:"required"`
// Display name of the user who created the intent
CreatedByDisplayName string `json:"created_by_display_name" api:"required"`
// Whether this intent has a custom expiry time set by the client. If false, the
// intent expires after a default duration.
CustomExpiry bool `json:"custom_expiry" api:"required"`
// Unix timestamp when the intent expires
ExpiresAt float64 `json:"expires_at" api:"required"`
// Unique ID for the intent
IntentID string `json:"intent_id" api:"required"`
// ID of the resource being modified (wallet_id, policy_id, etc)
ResourceID string `json:"resource_id" api:"required"`
// Current status of an intent.
//
// Any of "pending", "processing", "executed", "failed", "expired", "rejected",
// "dismissed".
Status IntentStatus `json:"status" api:"required"`
// ID of the user who created the intent. If undefined, the intent was created
// using the app secret
CreatedByID string `json:"created_by_id"`
// Human-readable reason for dismissal, present when status is 'dismissed'
DismissalReason string `json:"dismissal_reason"`
// Unix timestamp when the intent was dismissed, present when status is 'dismissed'
DismissedAt float64 `json:"dismissed_at"`
// Unix timestamp when the intent was rejected, present when status is 'rejected'
RejectedAt float64 `json:"rejected_at"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AuthorizationDetails respjson.Field
CreatedAt respjson.Field
CreatedByDisplayName respjson.Field
CustomExpiry respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
ResourceID respjson.Field
Status respjson.Field
CreatedByID respjson.Field
DismissalReason respjson.Field
DismissedAt respjson.Field
RejectedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Common fields shared by all intent response types.
func (BaseIntentResponse) RawJSON ¶ added in v0.5.0
func (r BaseIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BaseIntentResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *BaseIntentResponse) UnmarshalJSON(data []byte) error
type BlockInfo ¶ added in v0.11.0
type BlockInfo struct {
// The block number.
Number float64 `json:"number" api:"required"`
// The block timestamp.
Timestamp float64 `json:"timestamp" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Number respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Block metadata for a wallet transfer event.
func (*BlockInfo) UnmarshalJSON ¶ added in v0.11.0
type BridgeCryptoDepositMetadata ¶ added in v0.7.0
type BridgeCryptoDepositMetadata struct {
DrainID string `json:"drain_id" api:"required"`
// The crypto address of the liquidation address that received the deposit.
LiquidationAddress string `json:"liquidation_address" api:"required"`
LiquidationAddressID string `json:"liquidation_address_id" api:"required"`
// Any of "liquidation_address".
Method BridgeCryptoDepositMetadataMethod `json:"method" api:"required"`
// The address that sent the deposit.
SourceWalletAddress string `json:"source_wallet_address" api:"required"`
// Any of "crypto_deposit".
Type BridgeCryptoDepositMetadataType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DrainID respjson.Field
LiquidationAddress respjson.Field
LiquidationAddressID respjson.Field
Method respjson.Field
SourceWalletAddress respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a crypto deposit via liquidation address.
func (BridgeCryptoDepositMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeCryptoDepositMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeCryptoDepositMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeCryptoDepositMetadata) UnmarshalJSON(data []byte) error
type BridgeCryptoDepositMetadataMethod ¶ added in v0.7.0
type BridgeCryptoDepositMetadataMethod string
const (
BridgeCryptoDepositMetadataMethodLiquidationAddress BridgeCryptoDepositMetadataMethod = "liquidation_address"
)
type BridgeCryptoDepositMetadataType ¶ added in v0.7.0
type BridgeCryptoDepositMetadataType string
const (
BridgeCryptoDepositMetadataTypeCryptoDeposit BridgeCryptoDepositMetadataType = "crypto_deposit"
)
type BridgeCryptoTransferMetadata ¶ added in v0.7.0
type BridgeCryptoTransferMetadata struct {
// Any of "transfer".
Method BridgeCryptoTransferMetadataMethod `json:"method" api:"required"`
// The wallet address that sent the transfer.
SourceWalletAddress string `json:"source_wallet_address" api:"required"`
TransferID string `json:"transfer_id" api:"required"`
// Any of "crypto_deposit".
Type BridgeCryptoTransferMetadataType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
SourceWalletAddress respjson.Field
TransferID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a crypto deposit via transfer.
func (BridgeCryptoTransferMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeCryptoTransferMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeCryptoTransferMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeCryptoTransferMetadata) UnmarshalJSON(data []byte) error
type BridgeCryptoTransferMetadataMethod ¶ added in v0.7.0
type BridgeCryptoTransferMetadataMethod string
const (
BridgeCryptoTransferMetadataMethodTransfer BridgeCryptoTransferMetadataMethod = "transfer"
)
type BridgeCryptoTransferMetadataType ¶ added in v0.7.0
type BridgeCryptoTransferMetadataType string
const (
BridgeCryptoTransferMetadataTypeCryptoDeposit BridgeCryptoTransferMetadataType = "crypto_deposit"
)
type BridgeFiatDepositMetadata ¶ added in v0.7.0
type BridgeFiatDepositMetadata struct {
ActivityID string `json:"activity_id" api:"required"`
// Any of "virtual_account".
Method BridgeFiatDepositMetadataMethod `json:"method" api:"required"`
// Any of "fiat_deposit".
Type BridgeFiatDepositMetadataType `json:"type" api:"required"`
VirtualAccountID string `json:"virtual_account_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActivityID respjson.Field
Method respjson.Field
Type respjson.Field
VirtualAccountID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a fiat deposit via virtual account.
func (BridgeFiatDepositMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeFiatDepositMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeFiatDepositMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeFiatDepositMetadata) UnmarshalJSON(data []byte) error
type BridgeFiatDepositMetadataMethod ¶ added in v0.7.0
type BridgeFiatDepositMetadataMethod string
const (
BridgeFiatDepositMetadataMethodVirtualAccount BridgeFiatDepositMetadataMethod = "virtual_account"
)
type BridgeFiatDepositMetadataType ¶ added in v0.7.0
type BridgeFiatDepositMetadataType string
const (
BridgeFiatDepositMetadataTypeFiatDeposit BridgeFiatDepositMetadataType = "fiat_deposit"
)
type BridgeFiatTransferMetadata ¶ added in v0.7.0
type BridgeFiatTransferMetadata struct {
// Any of "transfer".
Method BridgeFiatTransferMetadataMethod `json:"method" api:"required"`
TransferID string `json:"transfer_id" api:"required"`
// Any of "fiat_deposit".
Type BridgeFiatTransferMetadataType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
TransferID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a fiat deposit via transfer.
func (BridgeFiatTransferMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeFiatTransferMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeFiatTransferMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeFiatTransferMetadata) UnmarshalJSON(data []byte) error
type BridgeFiatTransferMetadataMethod ¶ added in v0.7.0
type BridgeFiatTransferMetadataMethod string
const (
BridgeFiatTransferMetadataMethodTransfer BridgeFiatTransferMetadataMethod = "transfer"
)
type BridgeFiatTransferMetadataType ¶ added in v0.7.0
type BridgeFiatTransferMetadataType string
const (
BridgeFiatTransferMetadataTypeFiatDeposit BridgeFiatTransferMetadataType = "fiat_deposit"
)
type BridgeMetadataUnion ¶ added in v0.7.0
type BridgeMetadataUnion struct {
DrainID string `json:"drain_id"`
// This field is from variant [BridgeCryptoDepositMetadata].
LiquidationAddress string `json:"liquidation_address"`
LiquidationAddressID string `json:"liquidation_address_id"`
Method string `json:"method"`
SourceWalletAddress string `json:"source_wallet_address"`
Type string `json:"type"`
OriginalTransactionHash string `json:"original_transaction_hash"`
// This field is from variant [BridgeFiatDepositMetadata].
ActivityID string `json:"activity_id"`
// This field is from variant [BridgeFiatDepositMetadata].
VirtualAccountID string `json:"virtual_account_id"`
TransferID string `json:"transfer_id"`
// This field is from variant [BridgeStaticMemoDepositMetadata].
StaticMemoEventID string `json:"static_memo_event_id"`
// This field is from variant [BridgeStaticMemoDepositMetadata].
StaticMemoID string `json:"static_memo_id"`
JSON struct {
DrainID respjson.Field
LiquidationAddress respjson.Field
LiquidationAddressID respjson.Field
Method respjson.Field
SourceWalletAddress respjson.Field
Type respjson.Field
OriginalTransactionHash respjson.Field
ActivityID respjson.Field
VirtualAccountID respjson.Field
TransferID respjson.Field
StaticMemoEventID respjson.Field
StaticMemoID respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
BridgeMetadataUnion contains all possible properties and values from BridgeCryptoDepositMetadata, BridgeRefundMetadata, BridgeFiatDepositMetadata, BridgeCryptoTransferMetadata, BridgeFiatTransferMetadata, BridgeTransferRefundMetadata, BridgeStaticMemoDepositMetadata.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (BridgeMetadataUnion) AsBridgeCryptoDepositMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeCryptoDepositMetadata() (v BridgeCryptoDepositMetadata)
func (BridgeMetadataUnion) AsBridgeCryptoTransferMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeCryptoTransferMetadata() (v BridgeCryptoTransferMetadata)
func (BridgeMetadataUnion) AsBridgeFiatDepositMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeFiatDepositMetadata() (v BridgeFiatDepositMetadata)
func (BridgeMetadataUnion) AsBridgeFiatTransferMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeFiatTransferMetadata() (v BridgeFiatTransferMetadata)
func (BridgeMetadataUnion) AsBridgeRefundMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeRefundMetadata() (v BridgeRefundMetadata)
func (BridgeMetadataUnion) AsBridgeStaticMemoDepositMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeStaticMemoDepositMetadata() (v BridgeStaticMemoDepositMetadata)
func (BridgeMetadataUnion) AsBridgeTransferRefundMetadata ¶ added in v0.7.0
func (u BridgeMetadataUnion) AsBridgeTransferRefundMetadata() (v BridgeTransferRefundMetadata)
func (BridgeMetadataUnion) RawJSON ¶ added in v0.7.0
func (u BridgeMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeMetadataUnion) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeMetadataUnion) UnmarshalJSON(data []byte) error
type BridgeRefundMetadata ¶ added in v0.7.0
type BridgeRefundMetadata struct {
DrainID string `json:"drain_id" api:"required"`
LiquidationAddressID string `json:"liquidation_address_id" api:"required"`
// Any of "liquidation_address".
Method BridgeRefundMetadataMethod `json:"method" api:"required"`
// The original deposit transaction hash that triggered the failed drain.
OriginalTransactionHash string `json:"original_transaction_hash" api:"required"`
// Any of "refund".
Type BridgeRefundMetadataType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DrainID respjson.Field
LiquidationAddressID respjson.Field
Method respjson.Field
OriginalTransactionHash respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a refund via liquidation address.
func (BridgeRefundMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeRefundMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeRefundMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeRefundMetadata) UnmarshalJSON(data []byte) error
type BridgeRefundMetadataMethod ¶ added in v0.7.0
type BridgeRefundMetadataMethod string
const (
BridgeRefundMetadataMethodLiquidationAddress BridgeRefundMetadataMethod = "liquidation_address"
)
type BridgeRefundMetadataType ¶ added in v0.7.0
type BridgeRefundMetadataType string
const (
BridgeRefundMetadataTypeRefund BridgeRefundMetadataType = "refund"
)
type BridgeStaticMemoDepositMetadata ¶ added in v0.7.0
type BridgeStaticMemoDepositMetadata struct {
// Any of "static_memo".
Method BridgeStaticMemoDepositMetadataMethod `json:"method" api:"required"`
StaticMemoEventID string `json:"static_memo_event_id" api:"required"`
StaticMemoID string `json:"static_memo_id" api:"required"`
// Any of "fiat_deposit".
Type BridgeStaticMemoDepositMetadataType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
StaticMemoEventID respjson.Field
StaticMemoID respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a fiat deposit via static memo.
func (BridgeStaticMemoDepositMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeStaticMemoDepositMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeStaticMemoDepositMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeStaticMemoDepositMetadata) UnmarshalJSON(data []byte) error
type BridgeStaticMemoDepositMetadataMethod ¶ added in v0.7.0
type BridgeStaticMemoDepositMetadataMethod string
const (
BridgeStaticMemoDepositMetadataMethodStaticMemo BridgeStaticMemoDepositMetadataMethod = "static_memo"
)
type BridgeStaticMemoDepositMetadataType ¶ added in v0.7.0
type BridgeStaticMemoDepositMetadataType string
const (
BridgeStaticMemoDepositMetadataTypeFiatDeposit BridgeStaticMemoDepositMetadataType = "fiat_deposit"
)
type BridgeTransferRefundMetadata ¶ added in v0.7.0
type BridgeTransferRefundMetadata struct {
// Any of "transfer".
Method BridgeTransferRefundMetadataMethod `json:"method" api:"required"`
TransferID string `json:"transfer_id" api:"required"`
// Any of "refund".
Type BridgeTransferRefundMetadataType `json:"type" api:"required"`
// The original transfer transaction hash (if available).
OriginalTransactionHash string `json:"original_transaction_hash"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
TransferID respjson.Field
Type respjson.Field
OriginalTransactionHash respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Bridge metadata for a transfer refund.
func (BridgeTransferRefundMetadata) RawJSON ¶ added in v0.7.0
func (r BridgeTransferRefundMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*BridgeTransferRefundMetadata) UnmarshalJSON ¶ added in v0.7.0
func (r *BridgeTransferRefundMetadata) UnmarshalJSON(data []byte) error
type BridgeTransferRefundMetadataMethod ¶ added in v0.7.0
type BridgeTransferRefundMetadataMethod string
const (
BridgeTransferRefundMetadataMethodTransfer BridgeTransferRefundMetadataMethod = "transfer"
)
type BridgeTransferRefundMetadataType ¶ added in v0.7.0
type BridgeTransferRefundMetadataType string
const (
BridgeTransferRefundMetadataTypeRefund BridgeTransferRefundMetadataType = "refund"
)
type CaptchaProvider ¶ added in v0.11.0
type CaptchaProvider string
The captcha provider enabled for an app.
const ( CaptchaProviderTurnstile CaptchaProvider = "turnstile" CaptchaProviderHcaptcha CaptchaProvider = "hcaptcha" )
type Client ¶
type Client struct {
Options []option.RequestOption
Wallets WalletService
// Operations related to users
Users UserService
// Operations related to policies
Policies PolicyService
// Operations related to transactions
Transactions TransactionService
// Operations related to key quorums
KeyQuorums KeyQuorumService
// Operations related to authorization intents for wallet actions
Intents IntentService
// Operations related to app settings and allowlist management
Apps AppService
Webhooks WebhookService
Accounts AccountService
Aggregations AggregationService
EmbeddedWallets EmbeddedWalletService
Analytics AnalyticsService
ClientAuth ClientAuthService
Onramps OnrampService
Funding FundingService
Organizations OrganizationService
CrossApp CrossAppService
OAuth OAuthService
Yield YieldService
KrakenEmbed KrakenEmbedService
Swaps SwapService
}
Client creates a struct with services and top level methods that help with interacting with the Privy API 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 (PRIVY_APP_ID, PRIVY_APP_SECRET, PRIVY_API_BASE_URL). 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 any, res any, 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 any, res any, 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 any, res any, 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 any, res any, 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.
type ClientAuthService ¶
type ClientAuthService struct {
Options []option.RequestOption
}
ClientAuthService contains methods and other services that help with interacting with the Privy API 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 NewClientAuthService method instead.
func NewClientAuthService ¶
func NewClientAuthService(opts ...option.RequestOption) (r ClientAuthService)
NewClientAuthService 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 ConditionOperator ¶ added in v0.6.0
type ConditionOperator string
Operator to use for policy conditions.
const ( ConditionOperatorEq ConditionOperator = "eq" ConditionOperatorGt ConditionOperator = "gt" ConditionOperatorGte ConditionOperator = "gte" ConditionOperatorLt ConditionOperator = "lt" ConditionOperatorLte ConditionOperator = "lte" ConditionOperatorIn ConditionOperator = "in" ConditionOperatorInConditionSet ConditionOperator = "in_condition_set" ConditionOperatorContains ConditionOperator = "contains" ConditionOperatorStartsWith ConditionOperator = "starts_with" ConditionOperatorEndsWith ConditionOperator = "ends_with" )
type ConditionValueUnion ¶ added in v0.6.0
type ConditionValueUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfStringArray []string `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ConditionValueUnion) MarshalJSON ¶ added in v0.6.0
func (u ConditionValueUnion) MarshalJSON() ([]byte, error)
func (*ConditionValueUnion) UnmarshalJSON ¶ added in v0.6.0
func (u *ConditionValueUnion) UnmarshalJSON(data []byte) error
type ConditionValueUnionResp ¶ added in v0.6.0
type ConditionValueUnionResp struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
JSON struct {
OfString respjson.Field
OfStringArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ConditionValueUnionResp contains all possible properties and values from [string], [[]string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfStringArray]
func (ConditionValueUnionResp) AsString ¶ added in v0.6.0
func (u ConditionValueUnionResp) AsString() (v string)
func (ConditionValueUnionResp) AsStringArray ¶ added in v0.6.0
func (u ConditionValueUnionResp) AsStringArray() (v []string)
func (ConditionValueUnionResp) RawJSON ¶ added in v0.6.0
func (u ConditionValueUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ConditionValueUnionResp) ToParam ¶ added in v0.6.0
func (r ConditionValueUnionResp) ToParam() ConditionValueUnion
ToParam converts this ConditionValueUnionResp to a ConditionValueUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ConditionValueUnion.Overrides()
func (*ConditionValueUnionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *ConditionValueUnionResp) UnmarshalJSON(data []byte) error
type CrossAppEmbeddedWallet ¶
type CrossAppEmbeddedWallet struct {
Address string `json:"address" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An embedded wallet associated with a cross-app account.
func (CrossAppEmbeddedWallet) RawJSON ¶
func (r CrossAppEmbeddedWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*CrossAppEmbeddedWallet) UnmarshalJSON ¶
func (r *CrossAppEmbeddedWallet) UnmarshalJSON(data []byte) error
type CrossAppService ¶ added in v0.4.0
type CrossAppService struct {
Options []option.RequestOption
}
CrossAppService contains methods and other services that help with interacting with the Privy API 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 NewCrossAppService method instead.
func NewCrossAppService ¶ added in v0.4.0
func NewCrossAppService(opts ...option.RequestOption) (r CrossAppService)
NewCrossAppService 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 CrossAppSmartWallet ¶
type CrossAppSmartWallet struct {
Address string `json:"address" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A smart wallet associated with a cross-app account.
func (CrossAppSmartWallet) RawJSON ¶
func (r CrossAppSmartWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*CrossAppSmartWallet) UnmarshalJSON ¶
func (r *CrossAppSmartWallet) UnmarshalJSON(data []byte) error
type Currency ¶ added in v0.4.0
type Currency struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Chain Caip2 `json:"chain" api:"required"`
// A currency asset type.
//
// Any of "native-currency", "USDC".
Asset CurrencyAsset `json:"asset"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Chain respjson.Field
Asset respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A crypto currency identified by a CAIP-2 chain ID and optional asset.
func (*Currency) UnmarshalJSON ¶ added in v0.4.0
type CurrencyAsset ¶ added in v0.4.0
type CurrencyAsset string
A currency asset type.
const ( CurrencyAssetNativeCurrency CurrencyAsset = "native-currency" CurrencyAssetUsdc CurrencyAsset = "USDC" )
type CurveSigningChainType ¶
type CurveSigningChainType string
The wallet chain types that support curve-based signing.
const ( CurveSigningChainTypeCosmos CurveSigningChainType = "cosmos" CurveSigningChainTypeStellar CurveSigningChainType = "stellar" CurveSigningChainTypeSui CurveSigningChainType = "sui" CurveSigningChainTypeAptos CurveSigningChainType = "aptos" CurveSigningChainTypeMovement CurveSigningChainType = "movement" CurveSigningChainTypeTron CurveSigningChainType = "tron" CurveSigningChainTypeBitcoinSegwit CurveSigningChainType = "bitcoin-segwit" CurveSigningChainTypeBitcoinTaproot CurveSigningChainType = "bitcoin-taproot" CurveSigningChainTypePearl CurveSigningChainType = "pearl" CurveSigningChainTypeNear CurveSigningChainType = "near" CurveSigningChainTypeTon CurveSigningChainType = "ton" CurveSigningChainTypeStarknet CurveSigningChainType = "starknet" )
type CustodianTransactionWalletActionStep ¶ added in v0.11.0
type CustodianTransactionWalletActionStep struct {
// Identifier of the custodian executing this transaction (e.g. "bridge").
Custodian string `json:"custodian" api:"required"`
// Status of a custodian transaction step in a wallet action.
//
// Any of "preparing", "queued", "custodian_reviewing", "pending", "confirmed",
// "rejected", "failed".
Status CustodianTransactionWalletActionStepStatus `json:"status" api:"required"`
// Any of "custodian_transaction".
Type CustodianTransactionWalletActionStepType `json:"type" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Custodian respjson.Field
Status respjson.Field
Type respjson.Field
FailureReason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet action step representing a transaction executed by a custodian (e.g. Bridge).
func (CustodianTransactionWalletActionStep) RawJSON ¶ added in v0.11.0
func (r CustodianTransactionWalletActionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustodianTransactionWalletActionStep) UnmarshalJSON ¶ added in v0.11.0
func (r *CustodianTransactionWalletActionStep) UnmarshalJSON(data []byte) error
type CustodianTransactionWalletActionStepStatus ¶ added in v0.11.0
type CustodianTransactionWalletActionStepStatus string
Status of a custodian transaction step in a wallet action.
const ( CustodianTransactionWalletActionStepStatusPreparing CustodianTransactionWalletActionStepStatus = "preparing" CustodianTransactionWalletActionStepStatusQueued CustodianTransactionWalletActionStepStatus = "queued" CustodianTransactionWalletActionStepStatusCustodianReviewing CustodianTransactionWalletActionStepStatus = "custodian_reviewing" CustodianTransactionWalletActionStepStatusPending CustodianTransactionWalletActionStepStatus = "pending" CustodianTransactionWalletActionStepStatusConfirmed CustodianTransactionWalletActionStepStatus = "confirmed" CustodianTransactionWalletActionStepStatusRejected CustodianTransactionWalletActionStepStatus = "rejected" CustodianTransactionWalletActionStepStatusFailed CustodianTransactionWalletActionStepStatus = "failed" )
type CustodianTransactionWalletActionStepType ¶ added in v0.11.0
type CustodianTransactionWalletActionStepType string
const (
CustodianTransactionWalletActionStepTypeCustodianTransaction CustodianTransactionWalletActionStepType = "custodian_transaction"
)
type CustomMetadata ¶
type CustomMetadata map[string]CustomMetadataItemUnion
type CustomMetadataItemUnion ¶
type CustomMetadataItemUnion struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (CustomMetadataItemUnion) MarshalJSON ¶ added in v0.6.0
func (u CustomMetadataItemUnion) MarshalJSON() ([]byte, error)
func (*CustomMetadataItemUnion) UnmarshalJSON ¶
func (u *CustomMetadataItemUnion) UnmarshalJSON(data []byte) error
type CustomMetadataItemUnionResp ¶ added in v0.6.0
type CustomMetadataItemUnionResp struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
CustomMetadataItemUnionResp contains all possible properties and values from [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool]
func (CustomMetadataItemUnionResp) AsBool ¶ added in v0.6.0
func (u CustomMetadataItemUnionResp) AsBool() (v bool)
func (CustomMetadataItemUnionResp) AsFloat ¶ added in v0.6.0
func (u CustomMetadataItemUnionResp) AsFloat() (v float64)
func (CustomMetadataItemUnionResp) AsString ¶ added in v0.6.0
func (u CustomMetadataItemUnionResp) AsString() (v string)
func (CustomMetadataItemUnionResp) RawJSON ¶ added in v0.6.0
func (u CustomMetadataItemUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomMetadataItemUnionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *CustomMetadataItemUnionResp) UnmarshalJSON(data []byte) error
type CustomMetadataResp ¶ added in v0.6.0
type CustomMetadataResp map[string]CustomMetadataItemUnionResp
type CustomOAuthProviderID ¶
type CustomOAuthProviderID = string
type CustomTokenTransferSource ¶ added in v0.7.0
type CustomTokenTransferSource struct {
// The token contract address (EVM) or mint address (Solana) of the asset to
// transfer.
AssetAddress string `json:"asset_address" api:"required"`
// The blockchain network on which to perform the transfer. Supported chains
// include: 'tempo', 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and their
// respective testnets.
Chain string `json:"chain" api:"required"`
// Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
// USDC, "0.01" for 0.01 ETH). For exact_input, specifies the amount to send. Not
// in the smallest on-chain unit (wei, lamports, etc.). Maximum 100 characters.
// Deprecated: use the top-level `amount` field instead.
//
// Deprecated: deprecated
Amount param.Opt[string] `json:"amount,omitzero"`
// contains filtered or unexported fields
}
Source for a transfer identified by a token contract address (EVM) or mint address (Solana). Use this variant for tokens that are not first-class assets.
The properties AssetAddress, Chain are required.
func (CustomTokenTransferSource) MarshalJSON ¶ added in v0.7.0
func (r CustomTokenTransferSource) MarshalJSON() (data []byte, err error)
func (*CustomTokenTransferSource) UnmarshalJSON ¶ added in v0.7.0
func (r *CustomTokenTransferSource) UnmarshalJSON(data []byte) error
type CustomTokenTransferSourceResp ¶ added in v0.7.0
type CustomTokenTransferSourceResp struct {
// The token contract address (EVM) or mint address (Solana) of the asset to
// transfer.
AssetAddress string `json:"asset_address" api:"required"`
// The blockchain network on which to perform the transfer. Supported chains
// include: 'tempo', 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and their
// respective testnets.
Chain string `json:"chain" api:"required"`
// Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
// USDC, "0.01" for 0.01 ETH). For exact_input, specifies the amount to send. Not
// in the smallest on-chain unit (wei, lamports, etc.). Maximum 100 characters.
// Deprecated: use the top-level `amount` field instead.
//
// Deprecated: deprecated
Amount string `json:"amount"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AssetAddress respjson.Field
Chain respjson.Field
Amount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Source for a transfer identified by a token contract address (EVM) or mint address (Solana). Use this variant for tokens that are not first-class assets.
func (CustomTokenTransferSourceResp) RawJSON ¶ added in v0.7.0
func (r CustomTokenTransferSourceResp) RawJSON() string
Returns the unmodified JSON received from the API
func (CustomTokenTransferSourceResp) ToParam ¶ added in v0.7.0
func (r CustomTokenTransferSourceResp) ToParam() CustomTokenTransferSource
ToParam converts this CustomTokenTransferSourceResp to a CustomTokenTransferSource.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with CustomTokenTransferSource.Overrides()
func (*CustomTokenTransferSourceResp) UnmarshalJSON ¶ added in v0.7.0
func (r *CustomTokenTransferSourceResp) UnmarshalJSON(data []byte) error
type DeveloperFee ¶ added in v0.8.0
type DeveloperFee struct {
// Amount in USD (in decimals).
Amount string `json:"amount" api:"required"`
// Any of "developer".
Type DeveloperFeeType `json:"type" api:"required"`
Recipient string `json:"recipient"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Type respjson.Field
Recipient respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Estimated fee paid to the developer.
func (DeveloperFee) RawJSON ¶ added in v0.8.0
func (r DeveloperFee) RawJSON() string
Returns the unmodified JSON received from the API
func (*DeveloperFee) UnmarshalJSON ¶ added in v0.8.0
func (r *DeveloperFee) UnmarshalJSON(data []byte) error
type DeveloperFeeType ¶ added in v0.8.0
type DeveloperFeeType string
const (
DeveloperFeeTypeDeveloper DeveloperFeeType = "developer"
)
type EarnDepositActionResponse ¶ added in v0.6.0
type EarnDepositActionResponse struct {
// The ID of the wallet action.
ID string `json:"id" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Base-unit amount of asset deposited (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
ShareAmount string `json:"share_amount" api:"required"`
// Status of a wallet action.
//
// Any of "pending", "succeeded", "rejected", "failed".
Status WalletActionStatus `json:"status" api:"required"`
// Any of "earn_deposit".
Type EarnDepositActionResponseType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// The steps of the wallet action. Only returned if `?include=steps` is provided.
Steps []WalletActionStepUnion `json:"steps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
ShareAmount respjson.Field
Status respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
FailureReason respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for an earn deposit action.
func (EarnDepositActionResponse) RawJSON ¶ added in v0.6.0
func (r EarnDepositActionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EarnDepositActionResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnDepositActionResponse) UnmarshalJSON(data []byte) error
type EarnDepositActionResponseType ¶ added in v0.6.0
type EarnDepositActionResponseType string
const (
EarnDepositActionResponseTypeEarnDeposit EarnDepositActionResponseType = "earn_deposit"
)
type EarnDepositRequestBody ¶ added in v0.6.0
type EarnDepositRequestBody struct {
// The ID of the vault to deposit into.
VaultID string `json:"vault_id" api:"required"`
// Human-readable decimal amount to deposit (e.g. "1.5" for 1.5 USDC). Exactly one
// of `amount` or `raw_amount` must be provided.
Amount param.Opt[string] `json:"amount,omitzero"`
// Amount in smallest unit to deposit (e.g. "1500000" for 1.5 USDC with 6
// decimals). Exactly one of `amount` or `raw_amount` must be provided.
RawAmount param.Opt[string] `json:"raw_amount,omitzero"`
// contains filtered or unexported fields
}
Input for depositing assets into an ERC-4626 vault. Exactly one of `amount` or `raw_amount` must be provided.
The property VaultID is required.
func (EarnDepositRequestBody) MarshalJSON ¶ added in v0.6.0
func (r EarnDepositRequestBody) MarshalJSON() (data []byte, err error)
func (*EarnDepositRequestBody) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnDepositRequestBody) UnmarshalJSON(data []byte) error
type EarnFeeCollectActionResponse ¶ added in v0.13.0
type EarnFeeCollectActionResponse struct {
// The ID of the wallet action.
ID string `json:"id" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Base-unit amount of fees collected (e.g. "1500000"). Populated after on-chain
// confirmation.
RawAmount string `json:"raw_amount" api:"required"`
// Status of a wallet action.
//
// Any of "pending", "succeeded", "rejected", "failed".
Status WalletActionStatus `json:"status" api:"required"`
// Any of "earn_fee_collect".
Type EarnFeeCollectActionResponseType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of fees collected (e.g. "1.5"). Omitted when the
// token is not in the asset registry. Null while the action is pending; populated
// after on-chain confirmation.
Amount string `json:"amount" api:"nullable"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// The steps of the wallet action. Only returned if `?include=steps` is provided.
Steps []WalletActionStepUnion `json:"steps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
Status respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
FailureReason respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for an earn fee collect action.
func (EarnFeeCollectActionResponse) RawJSON ¶ added in v0.13.0
func (r EarnFeeCollectActionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EarnFeeCollectActionResponse) UnmarshalJSON ¶ added in v0.13.0
func (r *EarnFeeCollectActionResponse) UnmarshalJSON(data []byte) error
type EarnFeeCollectActionResponseType ¶ added in v0.13.0
type EarnFeeCollectActionResponseType string
const (
EarnFeeCollectActionResponseTypeEarnFeeCollect EarnFeeCollectActionResponseType = "earn_fee_collect"
)
type EarnIncentiveClaimActionResponse ¶ added in v0.6.0
type EarnIncentiveClaimActionResponse struct {
// The ID of the wallet action.
ID string `json:"id" api:"required"`
// EVM chain name (e.g. "tempo", "base").
Chain string `json:"chain" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Claimed reward tokens. Populated after the preparation step fetches from Merkl.
Rewards []EarnIncetiveClaimRewardEntry `json:"rewards" api:"required"`
// Status of a wallet action.
//
// Any of "pending", "succeeded", "rejected", "failed".
Status WalletActionStatus `json:"status" api:"required"`
// Any of "earn_incentive_claim".
Type EarnIncentiveClaimActionResponseType `json:"type" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// The steps of the wallet action. Only returned if `?include=steps` is provided.
Steps []WalletActionStepUnion `json:"steps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Chain respjson.Field
CreatedAt respjson.Field
Rewards respjson.Field
Status respjson.Field
Type respjson.Field
WalletID respjson.Field
FailureReason respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for an earn incentive claim action.
func (EarnIncentiveClaimActionResponse) RawJSON ¶ added in v0.6.0
func (r EarnIncentiveClaimActionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EarnIncentiveClaimActionResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnIncentiveClaimActionResponse) UnmarshalJSON(data []byte) error
type EarnIncentiveClaimActionResponseType ¶ added in v0.6.0
type EarnIncentiveClaimActionResponseType string
const (
EarnIncentiveClaimActionResponseTypeEarnIncentiveClaim EarnIncentiveClaimActionResponseType = "earn_incentive_claim"
)
type EarnIncentiveClaimRequestBody ¶ added in v0.6.0
type EarnIncentiveClaimRequestBody struct {
// The blockchain network on which to perform the incentive claim. Supported chains
// include: 'tempo', 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and more,
// along with their respective testnets.
Chain string `json:"chain" api:"required"`
// contains filtered or unexported fields
}
Input for claiming incentive rewards.
The property Chain is required.
func (EarnIncentiveClaimRequestBody) MarshalJSON ¶ added in v0.6.0
func (r EarnIncentiveClaimRequestBody) MarshalJSON() (data []byte, err error)
func (*EarnIncentiveClaimRequestBody) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnIncentiveClaimRequestBody) UnmarshalJSON(data []byte) error
type EarnIncetiveClaimRewardEntry ¶ added in v0.6.0
type EarnIncetiveClaimRewardEntry struct {
// Claimable amount in base units.
Amount string `json:"amount" api:"required"`
// Address of the reward token.
TokenAddress string `json:"token_address" api:"required"`
// Symbol of the reward token (e.g. "MORPHO").
TokenSymbol string `json:"token_symbol" api:"required"`
// Number of decimal places for the reward token.
TokenDecimals int64 `json:"token_decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
TokenAddress respjson.Field
TokenSymbol respjson.Field
TokenDecimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A specific reward token and amount associated with an earn incentive claim.
func (EarnIncetiveClaimRewardEntry) RawJSON ¶ added in v0.6.0
func (r EarnIncetiveClaimRewardEntry) RawJSON() string
Returns the unmodified JSON received from the API
func (*EarnIncetiveClaimRewardEntry) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnIncetiveClaimRewardEntry) UnmarshalJSON(data []byte) error
type EarnWithdrawActionResponse ¶ added in v0.6.0
type EarnWithdrawActionResponse struct {
// The ID of the wallet action.
ID string `json:"id" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Base-unit amount of asset withdrawn (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
ShareAmount string `json:"share_amount" api:"required"`
// Status of a wallet action.
//
// Any of "pending", "succeeded", "rejected", "failed".
Status WalletActionStatus `json:"status" api:"required"`
// Any of "earn_withdraw".
Type EarnWithdrawActionResponseType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// The steps of the wallet action. Only returned if `?include=steps` is provided.
Steps []WalletActionStepUnion `json:"steps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
ShareAmount respjson.Field
Status respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
FailureReason respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for an earn withdraw action.
func (EarnWithdrawActionResponse) RawJSON ¶ added in v0.6.0
func (r EarnWithdrawActionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EarnWithdrawActionResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnWithdrawActionResponse) UnmarshalJSON(data []byte) error
type EarnWithdrawActionResponseType ¶ added in v0.6.0
type EarnWithdrawActionResponseType string
const (
EarnWithdrawActionResponseTypeEarnWithdraw EarnWithdrawActionResponseType = "earn_withdraw"
)
type EarnWithdrawRequestBody ¶ added in v0.6.0
type EarnWithdrawRequestBody struct {
// The ID of the vault to withdraw from.
VaultID string `json:"vault_id" api:"required"`
// Human-readable decimal amount to withdraw (e.g. "1.5" for 1.5 USDC). Exactly one
// of `amount` or `raw_amount` must be provided.
Amount param.Opt[string] `json:"amount,omitzero"`
// Amount in smallest unit to withdraw (e.g. "1500000" for 1.5 USDC with 6
// decimals). Exactly one of `amount` or `raw_amount` must be provided.
RawAmount param.Opt[string] `json:"raw_amount,omitzero"`
// contains filtered or unexported fields
}
Input for withdrawing assets from an ERC-4626 vault. Exactly one of `amount` or `raw_amount` must be provided.
The property VaultID is required.
func (EarnWithdrawRequestBody) MarshalJSON ¶ added in v0.6.0
func (r EarnWithdrawRequestBody) MarshalJSON() (data []byte, err error)
func (*EarnWithdrawRequestBody) UnmarshalJSON ¶ added in v0.6.0
func (r *EarnWithdrawRequestBody) UnmarshalJSON(data []byte) error
type EmailDomain ¶ added in v0.6.0
type EmailDomain = string
type EmailDomainInviteInput ¶ added in v0.6.0
type EmailDomainInviteInput struct {
// Any of "emailDomain".
Type EmailDomainInviteInputType `json:"type,omitzero" api:"required"`
// An email domain.
Value EmailDomain `json:"value" api:"required"`
// contains filtered or unexported fields
}
Allowlist invite input for an email domain.
The properties Type, Value are required.
func (EmailDomainInviteInput) MarshalJSON ¶ added in v0.6.0
func (r EmailDomainInviteInput) MarshalJSON() (data []byte, err error)
func (*EmailDomainInviteInput) UnmarshalJSON ¶ added in v0.6.0
func (r *EmailDomainInviteInput) UnmarshalJSON(data []byte) error
type EmailDomainInviteInputType ¶ added in v0.6.0
type EmailDomainInviteInputType string
const (
EmailDomainInviteInputTypeEmailDomain EmailDomainInviteInputType = "emailDomain"
)
type EmailInviteInput ¶ added in v0.4.0
type EmailInviteInput struct {
// Any of "email".
Type EmailInviteInputType `json:"type,omitzero" api:"required"`
Value string `json:"value" api:"required" format:"email"`
// contains filtered or unexported fields
}
Allowlist invite input for an email address.
The properties Type, Value are required.
func (EmailInviteInput) MarshalJSON ¶ added in v0.4.0
func (r EmailInviteInput) MarshalJSON() (data []byte, err error)
func (*EmailInviteInput) UnmarshalJSON ¶ added in v0.4.0
func (r *EmailInviteInput) UnmarshalJSON(data []byte) error
type EmailInviteInputType ¶ added in v0.4.0
type EmailInviteInputType string
const (
EmailInviteInputTypeEmail EmailInviteInputType = "email"
)
type EmailMfaMethod ¶ added in v0.15.0
type EmailMfaMethod struct {
// Any of "email".
Type EmailMfaMethodType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Email MFA method.
func (EmailMfaMethod) RawJSON ¶ added in v0.15.0
func (r EmailMfaMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmailMfaMethod) UnmarshalJSON ¶ added in v0.15.0
func (r *EmailMfaMethod) UnmarshalJSON(data []byte) error
type EmailMfaMethodType ¶ added in v0.15.0
type EmailMfaMethodType string
const (
EmailMfaMethodTypeEmail EmailMfaMethodType = "email"
)
type EmbeddedWalletChainConfig ¶ added in v0.4.0
type EmbeddedWalletChainConfig struct {
// Whether to create embedded wallets on login.
//
// Any of "users-without-wallets", "all-users", "off".
CreateOnLogin EmbeddedWalletCreateOnLogin `json:"create_on_login" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreateOnLogin respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Chain-specific configuration for embedded wallets.
func (EmbeddedWalletChainConfig) RawJSON ¶ added in v0.4.0
func (r EmbeddedWalletChainConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmbeddedWalletChainConfig) UnmarshalJSON ¶ added in v0.4.0
func (r *EmbeddedWalletChainConfig) UnmarshalJSON(data []byte) error
type EmbeddedWalletConfigSchema ¶ added in v0.4.0
type EmbeddedWalletConfigSchema struct {
// The mode for embedded wallets.
//
// Any of "legacy-embedded-wallets-only", "user-controlled-server-wallets-only".
Mode EmbeddedWalletMode `json:"mode" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
EmbeddedWalletInputSchema
}
Configuration for embedded wallets including the mode.
func (EmbeddedWalletConfigSchema) RawJSON ¶ added in v0.4.0
func (r EmbeddedWalletConfigSchema) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmbeddedWalletConfigSchema) UnmarshalJSON ¶ added in v0.4.0
func (r *EmbeddedWalletConfigSchema) UnmarshalJSON(data []byte) error
type EmbeddedWalletCreateOnLogin ¶ added in v0.4.0
type EmbeddedWalletCreateOnLogin string
Whether to create embedded wallets on login.
const ( EmbeddedWalletCreateOnLoginUsersWithoutWallets EmbeddedWalletCreateOnLogin = "users-without-wallets" EmbeddedWalletCreateOnLoginAllUsers EmbeddedWalletCreateOnLogin = "all-users" EmbeddedWalletCreateOnLoginOff EmbeddedWalletCreateOnLogin = "off" )
type EmbeddedWalletInputSchema ¶ added in v0.4.0
type EmbeddedWalletInputSchema struct {
// Whether to create embedded wallets on login.
//
// Any of "users-without-wallets", "all-users", "off".
CreateOnLogin EmbeddedWalletCreateOnLogin `json:"create_on_login" api:"required"`
// Chain-specific configuration for embedded wallets.
Ethereum EmbeddedWalletChainConfig `json:"ethereum" api:"required"`
// Chain-specific configuration for embedded wallets.
Solana EmbeddedWalletChainConfig `json:"solana" api:"required"`
UserOwnedRecoveryOptions []UserOwnedRecoveryOption `json:"user_owned_recovery_options" api:"required"`
RequireUserOwnedRecoveryOnCreate bool `json:"require_user_owned_recovery_on_create"`
RequireUserPasswordOnCreate bool `json:"require_user_password_on_create"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreateOnLogin respjson.Field
Ethereum respjson.Field
Solana respjson.Field
UserOwnedRecoveryOptions respjson.Field
RequireUserOwnedRecoveryOnCreate respjson.Field
RequireUserPasswordOnCreate respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Input configuration for embedded wallets.
func (EmbeddedWalletInputSchema) RawJSON ¶ added in v0.4.0
func (r EmbeddedWalletInputSchema) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmbeddedWalletInputSchema) UnmarshalJSON ¶ added in v0.4.0
func (r *EmbeddedWalletInputSchema) UnmarshalJSON(data []byte) error
type EmbeddedWalletMode ¶ added in v0.4.0
type EmbeddedWalletMode string
The mode for embedded wallets.
const ( EmbeddedWalletModeLegacyEmbeddedWalletsOnly EmbeddedWalletMode = "legacy-embedded-wallets-only" EmbeddedWalletModeUserControlledServerWalletsOnly EmbeddedWalletMode = "user-controlled-server-wallets-only" )
type EmbeddedWalletRecoveryMethod ¶
type EmbeddedWalletRecoveryMethod string
The method used to recover an embedded wallet account.
const ( EmbeddedWalletRecoveryMethodPrivy EmbeddedWalletRecoveryMethod = "privy" EmbeddedWalletRecoveryMethodUserPasscode EmbeddedWalletRecoveryMethod = "user-passcode" EmbeddedWalletRecoveryMethodGoogleDrive EmbeddedWalletRecoveryMethod = "google-drive" EmbeddedWalletRecoveryMethodICloud EmbeddedWalletRecoveryMethod = "icloud" EmbeddedWalletRecoveryMethodRecoveryEncryptionKey EmbeddedWalletRecoveryMethod = "recovery-encryption-key" EmbeddedWalletRecoveryMethodPrivyV2 EmbeddedWalletRecoveryMethod = "privy-v2" )
type EmbeddedWalletService ¶ added in v0.4.0
type EmbeddedWalletService struct {
Options []option.RequestOption
}
EmbeddedWalletService contains methods and other services that help with interacting with the Privy API 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 NewEmbeddedWalletService method instead.
func NewEmbeddedWalletService ¶ added in v0.4.0
func NewEmbeddedWalletService(opts ...option.RequestOption) (r EmbeddedWalletService)
NewEmbeddedWalletService 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 EncryptedAuthorizationKey ¶ added in v0.11.0
type EncryptedAuthorizationKey struct {
// The encrypted authorization key corresponding to the user's current
// authentication session.
Ciphertext string `json:"ciphertext" api:"required"`
// Base64-encoded ephemeral public key used in the HPKE encryption process.
// Required for decryption.
EncapsulatedKey string `json:"encapsulated_key" api:"required"`
// The encryption type used. Currently only supports HPKE.
//
// Any of "HPKE".
EncryptionType EncryptedAuthorizationKeyEncryptionType `json:"encryption_type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Ciphertext respjson.Field
EncapsulatedKey respjson.Field
EncryptionType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
HPKE-encrypted authorization key with encapsulated key and ciphertext.
func (EncryptedAuthorizationKey) RawJSON ¶ added in v0.11.0
func (r EncryptedAuthorizationKey) RawJSON() string
Returns the unmodified JSON received from the API
func (*EncryptedAuthorizationKey) UnmarshalJSON ¶ added in v0.11.0
func (r *EncryptedAuthorizationKey) UnmarshalJSON(data []byte) error
type EncryptedAuthorizationKeyEncryptionType ¶ added in v0.11.0
type EncryptedAuthorizationKeyEncryptionType string
The encryption type used. Currently only supports HPKE.
const (
EncryptedAuthorizationKeyEncryptionTypeHpke EncryptedAuthorizationKeyEncryptionType = "HPKE"
)
type EncryptedWalletAuthenticateResponse ¶ added in v0.11.0
type EncryptedWalletAuthenticateResponse struct {
// HPKE-encrypted authorization key with encapsulated key and ciphertext.
EncryptedAuthorizationKey EncryptedAuthorizationKey `json:"encrypted_authorization_key" api:"required"`
// The expiration time of the authorization key in milliseconds since the epoch.
ExpiresAt float64 `json:"expires_at" api:"required"`
Wallets []Wallet `json:"wallets" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EncryptedAuthorizationKey respjson.Field
ExpiresAt respjson.Field
Wallets respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The response from authenticating a wallet with HPKE encryption, containing an encrypted authorization key and wallet data.
func (EncryptedWalletAuthenticateResponse) RawJSON ¶ added in v0.11.0
func (r EncryptedWalletAuthenticateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EncryptedWalletAuthenticateResponse) UnmarshalJSON ¶ added in v0.11.0
func (r *EncryptedWalletAuthenticateResponse) UnmarshalJSON(data []byte) error
type Ethereum7702AuthorizationCondition ¶ added in v0.6.0
type Ethereum7702AuthorizationCondition struct {
// Any of "contract".
Field Ethereum7702AuthorizationConditionField `json:"field,omitzero" api:"required"`
// Any of "ethereum_7702_authorization".
FieldSource Ethereum7702AuthorizationConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Allowed contract addresses for eth_sign7702Authorization requests.
The properties Field, FieldSource, Operator, Value are required.
func (Ethereum7702AuthorizationCondition) MarshalJSON ¶ added in v0.6.0
func (r Ethereum7702AuthorizationCondition) MarshalJSON() (data []byte, err error)
func (*Ethereum7702AuthorizationCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *Ethereum7702AuthorizationCondition) UnmarshalJSON(data []byte) error
type Ethereum7702AuthorizationConditionField ¶ added in v0.6.0
type Ethereum7702AuthorizationConditionField string
const (
Ethereum7702AuthorizationConditionFieldContract Ethereum7702AuthorizationConditionField = "contract"
)
type Ethereum7702AuthorizationConditionFieldSource ¶ added in v0.6.0
type Ethereum7702AuthorizationConditionFieldSource string
const (
Ethereum7702AuthorizationConditionFieldSourceEthereum7702Authorization Ethereum7702AuthorizationConditionFieldSource = "ethereum_7702_authorization"
)
type Ethereum7702AuthorizationConditionResp ¶ added in v0.6.0
type Ethereum7702AuthorizationConditionResp struct {
// Any of "contract".
Field Ethereum7702AuthorizationConditionField `json:"field" api:"required"`
// Any of "ethereum_7702_authorization".
FieldSource Ethereum7702AuthorizationConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Allowed contract addresses for eth_sign7702Authorization requests.
func (Ethereum7702AuthorizationConditionResp) RawJSON ¶ added in v0.6.0
func (r Ethereum7702AuthorizationConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (Ethereum7702AuthorizationConditionResp) ToParam ¶ added in v0.6.0
func (r Ethereum7702AuthorizationConditionResp) ToParam() Ethereum7702AuthorizationCondition
ToParam converts this Ethereum7702AuthorizationConditionResp to a Ethereum7702AuthorizationCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with Ethereum7702AuthorizationCondition.Overrides()
func (*Ethereum7702AuthorizationConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *Ethereum7702AuthorizationConditionResp) UnmarshalJSON(data []byte) error
type EthereumCalldataCondition ¶ added in v0.6.0
type EthereumCalldataCondition struct {
// A Solidity ABI definition for decoding smart contract calldata.
Abi AbiSchema `json:"abi,omitzero" api:"required"`
Field string `json:"field" api:"required"`
// Any of "ethereum_calldata".
FieldSource EthereumCalldataConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The decoded calldata in a smart contract interaction as the smart contract method's parameters. Note that 'ethereum_calldata' conditions must contain an abi parameter with the JSON ABI of the smart contract.
The properties Abi, Field, FieldSource, Operator, Value are required.
func (EthereumCalldataCondition) MarshalJSON ¶ added in v0.6.0
func (r EthereumCalldataCondition) MarshalJSON() (data []byte, err error)
func (*EthereumCalldataCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumCalldataCondition) UnmarshalJSON(data []byte) error
type EthereumCalldataConditionFieldSource ¶ added in v0.6.0
type EthereumCalldataConditionFieldSource string
const (
EthereumCalldataConditionFieldSourceEthereumCalldata EthereumCalldataConditionFieldSource = "ethereum_calldata"
)
type EthereumCalldataConditionResp ¶ added in v0.6.0
type EthereumCalldataConditionResp struct {
// A Solidity ABI definition for decoding smart contract calldata.
Abi AbiSchemaResp `json:"abi" api:"required"`
Field string `json:"field" api:"required"`
// Any of "ethereum_calldata".
FieldSource EthereumCalldataConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Abi respjson.Field
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The decoded calldata in a smart contract interaction as the smart contract method's parameters. Note that 'ethereum_calldata' conditions must contain an abi parameter with the JSON ABI of the smart contract.
func (EthereumCalldataConditionResp) RawJSON ¶ added in v0.6.0
func (r EthereumCalldataConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumCalldataConditionResp) ToParam ¶ added in v0.6.0
func (r EthereumCalldataConditionResp) ToParam() EthereumCalldataCondition
ToParam converts this EthereumCalldataConditionResp to a EthereumCalldataCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumCalldataCondition.Overrides()
func (*EthereumCalldataConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumCalldataConditionResp) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcInput ¶ added in v0.0.4
type EthereumPersonalSignRpcInput struct {
// Any of "personal_sign".
Method EthereumPersonalSignRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `personal_sign` RPC.
Params EthereumPersonalSignRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 param.Opt[Caip2] `json:"caip2,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumPersonalSignRpcInputChainType `json:"chain_type,omitzero"`
// Options controlling signature production for personal_sign and
// eth_signTypedData_v4.
SignatureOptions SignatureOptions `json:"signature_options,omitzero"`
// contains filtered or unexported fields
}
Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
The properties Method, Params are required.
func (EthereumPersonalSignRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumPersonalSignRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumPersonalSignRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumPersonalSignRpcInput) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcInputChainType ¶
type EthereumPersonalSignRpcInputChainType string
const (
EthereumPersonalSignRpcInputChainTypeEthereum EthereumPersonalSignRpcInputChainType = "ethereum"
)
type EthereumPersonalSignRpcInputMethod ¶
type EthereumPersonalSignRpcInputMethod string
const (
EthereumPersonalSignRpcInputMethodPersonalSign EthereumPersonalSignRpcInputMethod = "personal_sign"
)
type EthereumPersonalSignRpcInputParams ¶ added in v0.0.4
type EthereumPersonalSignRpcInputParams struct {
// Any of "utf-8", "hex".
Encoding EthereumPersonalSignRpcInputParamsEncoding `json:"encoding,omitzero" api:"required"`
Message string `json:"message" api:"required"`
// contains filtered or unexported fields
}
Parameters for the EVM `personal_sign` RPC.
The properties Encoding, Message are required.
func (EthereumPersonalSignRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumPersonalSignRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumPersonalSignRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumPersonalSignRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcInputParamsEncoding ¶
type EthereumPersonalSignRpcInputParamsEncoding string
const ( EthereumPersonalSignRpcInputParamsEncodingUtf8 EthereumPersonalSignRpcInputParamsEncoding = "utf-8" EthereumPersonalSignRpcInputParamsEncodingHex EthereumPersonalSignRpcInputParamsEncoding = "hex" )
type EthereumPersonalSignRpcInputParamsResp ¶ added in v0.4.0
type EthereumPersonalSignRpcInputParamsResp struct {
// Any of "utf-8", "hex".
Encoding EthereumPersonalSignRpcInputParamsEncoding `json:"encoding" api:"required"`
Message string `json:"message" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `personal_sign` RPC.
func (EthereumPersonalSignRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumPersonalSignRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumPersonalSignRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumPersonalSignRpcInputParamsResp) ToParam() EthereumPersonalSignRpcInputParams
ToParam converts this EthereumPersonalSignRpcInputParamsResp to a EthereumPersonalSignRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumPersonalSignRpcInputParams.Overrides()
func (*EthereumPersonalSignRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumPersonalSignRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcInputResp ¶ added in v0.6.0
type EthereumPersonalSignRpcInputResp struct {
// Any of "personal_sign".
Method EthereumPersonalSignRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `personal_sign` RPC.
Params EthereumPersonalSignRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2"`
// Any of "ethereum".
ChainType EthereumPersonalSignRpcInputChainType `json:"chain_type"`
// Options controlling signature production for personal_sign and
// eth_signTypedData_v4.
SignatureOptions SignatureOptionsResp `json:"signature_options"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
Caip2 respjson.Field
ChainType respjson.Field
SignatureOptions respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the EVM `personal_sign` RPC (EIP-191) to sign a message.
func (EthereumPersonalSignRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumPersonalSignRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumPersonalSignRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumPersonalSignRpcInputResp) ToParam() EthereumPersonalSignRpcInput
ToParam converts this EthereumPersonalSignRpcInputResp to a EthereumPersonalSignRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumPersonalSignRpcInput.Overrides()
func (*EthereumPersonalSignRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumPersonalSignRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcResponse ¶
type EthereumPersonalSignRpcResponse struct {
// Data returned by the EVM `personal_sign` RPC.
Data EthereumPersonalSignRpcResponseData `json:"data" api:"required"`
// Any of "personal_sign".
Method EthereumPersonalSignRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `personal_sign` RPC.
func (EthereumPersonalSignRpcResponse) RawJSON ¶
func (r EthereumPersonalSignRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumPersonalSignRpcResponse) UnmarshalJSON ¶
func (r *EthereumPersonalSignRpcResponse) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcResponseData ¶
type EthereumPersonalSignRpcResponseData struct {
// Any of "hex".
Encoding EthereumPersonalSignRpcResponseDataEncoding `json:"encoding" api:"required"`
Signature string `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `personal_sign` RPC.
func (EthereumPersonalSignRpcResponseData) RawJSON ¶
func (r EthereumPersonalSignRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumPersonalSignRpcResponseData) UnmarshalJSON ¶
func (r *EthereumPersonalSignRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumPersonalSignRpcResponseDataEncoding ¶ added in v0.4.0
type EthereumPersonalSignRpcResponseDataEncoding string
const (
EthereumPersonalSignRpcResponseDataEncodingHex EthereumPersonalSignRpcResponseDataEncoding = "hex"
)
type EthereumPersonalSignRpcResponseMethod ¶
type EthereumPersonalSignRpcResponseMethod string
const (
EthereumPersonalSignRpcResponseMethodPersonalSign EthereumPersonalSignRpcResponseMethod = "personal_sign"
)
type EthereumSecp256k1SignRpcInput ¶ added in v0.0.4
type EthereumSecp256k1SignRpcInput struct {
// Any of "secp256k1_sign".
Method EthereumSecp256k1SignRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `secp256k1_sign` RPC.
Params EthereumSecp256k1SignRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSecp256k1SignRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Signs a raw hash on the secp256k1 curve.
The properties Method, Params are required.
func (EthereumSecp256k1SignRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumSecp256k1SignRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSecp256k1SignRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSecp256k1SignRpcInput) UnmarshalJSON(data []byte) error
type EthereumSecp256k1SignRpcInputChainType ¶
type EthereumSecp256k1SignRpcInputChainType string
const (
EthereumSecp256k1SignRpcInputChainTypeEthereum EthereumSecp256k1SignRpcInputChainType = "ethereum"
)
type EthereumSecp256k1SignRpcInputMethod ¶
type EthereumSecp256k1SignRpcInputMethod string
const (
EthereumSecp256k1SignRpcInputMethodSecp256k1Sign EthereumSecp256k1SignRpcInputMethod = "secp256k1_sign"
)
type EthereumSecp256k1SignRpcInputParams ¶ added in v0.0.4
type EthereumSecp256k1SignRpcInputParams struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Hash Hex `json:"hash" api:"required"`
// contains filtered or unexported fields
}
Parameters for the EVM `secp256k1_sign` RPC.
The property Hash is required.
func (EthereumSecp256k1SignRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumSecp256k1SignRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSecp256k1SignRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSecp256k1SignRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSecp256k1SignRpcInputParamsResp ¶ added in v0.4.0
type EthereumSecp256k1SignRpcInputParamsResp struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Hash Hex `json:"hash" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Hash respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `secp256k1_sign` RPC.
func (EthereumSecp256k1SignRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumSecp256k1SignRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSecp256k1SignRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumSecp256k1SignRpcInputParamsResp) ToParam() EthereumSecp256k1SignRpcInputParams
ToParam converts this EthereumSecp256k1SignRpcInputParamsResp to a EthereumSecp256k1SignRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSecp256k1SignRpcInputParams.Overrides()
func (*EthereumSecp256k1SignRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSecp256k1SignRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSecp256k1SignRpcInputResp ¶ added in v0.6.0
type EthereumSecp256k1SignRpcInputResp struct {
// Any of "secp256k1_sign".
Method EthereumSecp256k1SignRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `secp256k1_sign` RPC.
Params EthereumSecp256k1SignRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "ethereum".
ChainType EthereumSecp256k1SignRpcInputChainType `json:"chain_type"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signs a raw hash on the secp256k1 curve.
func (EthereumSecp256k1SignRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSecp256k1SignRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSecp256k1SignRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSecp256k1SignRpcInputResp) ToParam() EthereumSecp256k1SignRpcInput
ToParam converts this EthereumSecp256k1SignRpcInputResp to a EthereumSecp256k1SignRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSecp256k1SignRpcInput.Overrides()
func (*EthereumSecp256k1SignRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSecp256k1SignRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSecp256k1SignRpcResponse ¶
type EthereumSecp256k1SignRpcResponse struct {
// Data returned by the EVM `secp256k1_sign` RPC.
Data EthereumSecp256k1SignRpcResponseData `json:"data" api:"required"`
// Any of "secp256k1_sign".
Method EthereumSecp256k1SignRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `secp256k1_sign` RPC.
func (EthereumSecp256k1SignRpcResponse) RawJSON ¶
func (r EthereumSecp256k1SignRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSecp256k1SignRpcResponse) UnmarshalJSON ¶
func (r *EthereumSecp256k1SignRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSecp256k1SignRpcResponseData ¶
type EthereumSecp256k1SignRpcResponseData struct {
// Any of "hex".
Encoding EthereumSecp256k1SignRpcResponseDataEncoding `json:"encoding" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Signature Hex `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `secp256k1_sign` RPC.
func (EthereumSecp256k1SignRpcResponseData) RawJSON ¶
func (r EthereumSecp256k1SignRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSecp256k1SignRpcResponseData) UnmarshalJSON ¶
func (r *EthereumSecp256k1SignRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSecp256k1SignRpcResponseDataEncoding ¶ added in v0.4.0
type EthereumSecp256k1SignRpcResponseDataEncoding string
const (
EthereumSecp256k1SignRpcResponseDataEncodingHex EthereumSecp256k1SignRpcResponseDataEncoding = "hex"
)
type EthereumSecp256k1SignRpcResponseMethod ¶
type EthereumSecp256k1SignRpcResponseMethod string
const (
EthereumSecp256k1SignRpcResponseMethodSecp256k1Sign EthereumSecp256k1SignRpcResponseMethod = "secp256k1_sign"
)
type EthereumSendCallsCall ¶ added in v0.5.0
type EthereumSendCallsCall struct {
To string `json:"to" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Data param.Opt[Hex] `json:"data,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Value QuantityUnion `json:"value,omitzero"`
// contains filtered or unexported fields
}
A single call within a batched wallet_sendCalls request.
The property To is required.
func (EthereumSendCallsCall) MarshalJSON ¶ added in v0.6.0
func (r EthereumSendCallsCall) MarshalJSON() (data []byte, err error)
func (*EthereumSendCallsCall) UnmarshalJSON ¶ added in v0.5.0
func (r *EthereumSendCallsCall) UnmarshalJSON(data []byte) error
type EthereumSendCallsCallResp ¶ added in v0.6.0
type EthereumSendCallsCallResp struct {
To string `json:"to" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Data Hex `json:"data"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Value QuantityUnionResp `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
To respjson.Field
Data respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single call within a batched wallet_sendCalls request.
func (EthereumSendCallsCallResp) RawJSON ¶ added in v0.6.0
func (r EthereumSendCallsCallResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSendCallsCallResp) ToParam ¶ added in v0.6.0
func (r EthereumSendCallsCallResp) ToParam() EthereumSendCallsCall
ToParam converts this EthereumSendCallsCallResp to a EthereumSendCallsCall.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSendCallsCall.Overrides()
func (*EthereumSendCallsCallResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSendCallsCallResp) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcInput ¶ added in v0.5.0
type EthereumSendCallsRpcInput struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
// Any of "wallet_sendCalls".
Method EthereumSendCallsRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the `wallet_sendCalls` RPC.
Params EthereumSendCallsRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
ExperimentalDataSuffix param.Opt[Hex] `json:"experimental_data_suffix,omitzero"`
Sponsor param.Opt[bool] `json:"sponsor,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSendCallsRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes the `wallet_sendCalls` RPC (EIP-5792) to batch multiple calls into a single atomic transaction.
The properties Caip2, Method, Params are required.
func (EthereumSendCallsRpcInput) MarshalJSON ¶ added in v0.6.0
func (r EthereumSendCallsRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSendCallsRpcInput) UnmarshalJSON ¶ added in v0.5.0
func (r *EthereumSendCallsRpcInput) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcInputChainType ¶ added in v0.5.0
type EthereumSendCallsRpcInputChainType string
const (
EthereumSendCallsRpcInputChainTypeEthereum EthereumSendCallsRpcInputChainType = "ethereum"
)
type EthereumSendCallsRpcInputMethod ¶ added in v0.5.0
type EthereumSendCallsRpcInputMethod string
const (
EthereumSendCallsRpcInputMethodWalletSendCalls EthereumSendCallsRpcInputMethod = "wallet_sendCalls"
)
type EthereumSendCallsRpcInputParams ¶ added in v0.5.0
type EthereumSendCallsRpcInputParams struct {
Calls []EthereumSendCallsCall `json:"calls,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for the `wallet_sendCalls` RPC.
The property Calls is required.
func (EthereumSendCallsRpcInputParams) MarshalJSON ¶ added in v0.5.0
func (r EthereumSendCallsRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSendCallsRpcInputParams) UnmarshalJSON ¶ added in v0.5.0
func (r *EthereumSendCallsRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcInputParamsResp ¶ added in v0.5.0
type EthereumSendCallsRpcInputParamsResp struct {
Calls []EthereumSendCallsCallResp `json:"calls" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Calls respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the `wallet_sendCalls` RPC.
func (EthereumSendCallsRpcInputParamsResp) RawJSON ¶ added in v0.5.0
func (r EthereumSendCallsRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSendCallsRpcInputParamsResp) ToParam ¶ added in v0.5.0
func (r EthereumSendCallsRpcInputParamsResp) ToParam() EthereumSendCallsRpcInputParams
ToParam converts this EthereumSendCallsRpcInputParamsResp to a EthereumSendCallsRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSendCallsRpcInputParams.Overrides()
func (*EthereumSendCallsRpcInputParamsResp) UnmarshalJSON ¶ added in v0.5.0
func (r *EthereumSendCallsRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcInputResp ¶ added in v0.6.0
type EthereumSendCallsRpcInputResp struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
// Any of "wallet_sendCalls".
Method EthereumSendCallsRpcInputMethod `json:"method" api:"required"`
// Parameters for the `wallet_sendCalls` RPC.
Params EthereumSendCallsRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "ethereum".
ChainType EthereumSendCallsRpcInputChainType `json:"chain_type"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
ExperimentalDataSuffix Hex `json:"experimental_data_suffix"`
Sponsor bool `json:"sponsor"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
ExperimentalDataSuffix respjson.Field
Sponsor respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the `wallet_sendCalls` RPC (EIP-5792) to batch multiple calls into a single atomic transaction.
func (EthereumSendCallsRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSendCallsRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSendCallsRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSendCallsRpcInputResp) ToParam() EthereumSendCallsRpcInput
ToParam converts this EthereumSendCallsRpcInputResp to a EthereumSendCallsRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSendCallsRpcInput.Overrides()
func (*EthereumSendCallsRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSendCallsRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcResponse ¶ added in v0.5.0
type EthereumSendCallsRpcResponse struct {
// Data returned by the `wallet_sendCalls` RPC.
Data EthereumSendCallsRpcResponseData `json:"data" api:"required"`
// Any of "wallet_sendCalls".
Method EthereumSendCallsRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the `wallet_sendCalls` RPC.
func (EthereumSendCallsRpcResponse) RawJSON ¶ added in v0.5.0
func (r EthereumSendCallsRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSendCallsRpcResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *EthereumSendCallsRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcResponseData ¶ added in v0.5.0
type EthereumSendCallsRpcResponseData struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
TransactionID string `json:"transaction_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the `wallet_sendCalls` RPC.
func (EthereumSendCallsRpcResponseData) RawJSON ¶ added in v0.5.0
func (r EthereumSendCallsRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSendCallsRpcResponseData) UnmarshalJSON ¶ added in v0.5.0
func (r *EthereumSendCallsRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSendCallsRpcResponseMethod ¶ added in v0.5.0
type EthereumSendCallsRpcResponseMethod string
const (
EthereumSendCallsRpcResponseMethodWalletSendCalls EthereumSendCallsRpcResponseMethod = "wallet_sendCalls"
)
type EthereumSendTransactionRpcInput ¶ added in v0.0.4
type EthereumSendTransactionRpcInput struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
// Any of "eth_sendTransaction".
Method EthereumSendTransactionRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `eth_sendTransaction` RPC.
Params EthereumSendTransactionRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
ExperimentalDataSuffix param.Opt[Hex] `json:"experimental_data_suffix,omitzero"`
ReferenceID param.Opt[string] `json:"reference_id,omitzero"`
Sponsor param.Opt[bool] `json:"sponsor,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSendTransactionRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
The properties Caip2, Method, Params are required.
func (EthereumSendTransactionRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumSendTransactionRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSendTransactionRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSendTransactionRpcInput) UnmarshalJSON(data []byte) error
type EthereumSendTransactionRpcInputChainType ¶
type EthereumSendTransactionRpcInputChainType string
const (
EthereumSendTransactionRpcInputChainTypeEthereum EthereumSendTransactionRpcInputChainType = "ethereum"
)
type EthereumSendTransactionRpcInputMethod ¶
type EthereumSendTransactionRpcInputMethod string
const (
EthereumSendTransactionRpcInputMethodEthSendTransaction EthereumSendTransactionRpcInputMethod = "eth_sendTransaction"
)
type EthereumSendTransactionRpcInputParams ¶ added in v0.0.4
type EthereumSendTransactionRpcInputParams struct {
// An unsigned Ethereum transaction object. Supports standard EVM transaction types
// (0, 1, 2, 4) and Tempo transactions (type 118).
Transaction UnsignedEthereumTransactionUnion `json:"transaction,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for the EVM `eth_sendTransaction` RPC.
The property Transaction is required.
func (EthereumSendTransactionRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumSendTransactionRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSendTransactionRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSendTransactionRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSendTransactionRpcInputParamsResp ¶ added in v0.4.0
type EthereumSendTransactionRpcInputParamsResp struct {
// An unsigned Ethereum transaction object. Supports standard EVM transaction types
// (0, 1, 2, 4) and Tempo transactions (type 118).
Transaction UnsignedEthereumTransactionUnionResp `json:"transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Transaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `eth_sendTransaction` RPC.
func (EthereumSendTransactionRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumSendTransactionRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSendTransactionRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumSendTransactionRpcInputParamsResp) ToParam() EthereumSendTransactionRpcInputParams
ToParam converts this EthereumSendTransactionRpcInputParamsResp to a EthereumSendTransactionRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSendTransactionRpcInputParams.Overrides()
func (*EthereumSendTransactionRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSendTransactionRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSendTransactionRpcInputResp ¶ added in v0.6.0
type EthereumSendTransactionRpcInputResp struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
// Any of "eth_sendTransaction".
Method EthereumSendTransactionRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `eth_sendTransaction` RPC.
Params EthereumSendTransactionRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "ethereum".
ChainType EthereumSendTransactionRpcInputChainType `json:"chain_type"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
ExperimentalDataSuffix Hex `json:"experimental_data_suffix"`
ReferenceID string `json:"reference_id"`
Sponsor bool `json:"sponsor"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
ExperimentalDataSuffix respjson.Field
ReferenceID respjson.Field
Sponsor respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the EVM `eth_sendTransaction` RPC to sign and broadcast a transaction.
func (EthereumSendTransactionRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSendTransactionRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSendTransactionRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSendTransactionRpcInputResp) ToParam() EthereumSendTransactionRpcInput
ToParam converts this EthereumSendTransactionRpcInputResp to a EthereumSendTransactionRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSendTransactionRpcInput.Overrides()
func (*EthereumSendTransactionRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSendTransactionRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSendTransactionRpcResponse ¶
type EthereumSendTransactionRpcResponse struct {
// Data returned by the EVM `eth_sendTransaction` RPC.
Data EthereumSendTransactionRpcResponseData `json:"data" api:"required"`
// Any of "eth_sendTransaction".
Method EthereumSendTransactionRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `eth_sendTransaction` RPC.
func (EthereumSendTransactionRpcResponse) RawJSON ¶
func (r EthereumSendTransactionRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSendTransactionRpcResponse) UnmarshalJSON ¶
func (r *EthereumSendTransactionRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSendTransactionRpcResponseData ¶
type EthereumSendTransactionRpcResponseData struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
Hash string `json:"hash" api:"required"`
ReferenceID string `json:"reference_id" api:"nullable"`
TransactionID string `json:"transaction_id"`
// An unsigned Ethereum transaction object. Supports standard EVM transaction types
// (0, 1, 2, 4) and Tempo transactions (type 118).
TransactionRequest UnsignedEthereumTransactionUnionResp `json:"transaction_request"`
UserOperationHash string `json:"user_operation_hash"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Hash respjson.Field
ReferenceID respjson.Field
TransactionID respjson.Field
TransactionRequest respjson.Field
UserOperationHash respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `eth_sendTransaction` RPC.
func (EthereumSendTransactionRpcResponseData) RawJSON ¶
func (r EthereumSendTransactionRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSendTransactionRpcResponseData) UnmarshalJSON ¶
func (r *EthereumSendTransactionRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSendTransactionRpcResponseMethod ¶
type EthereumSendTransactionRpcResponseMethod string
const (
EthereumSendTransactionRpcResponseMethodEthSendTransaction EthereumSendTransactionRpcResponseMethod = "eth_sendTransaction"
)
type EthereumSign7702Authorization ¶ added in v0.4.0
type EthereumSign7702Authorization struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnion `json:"chain_id,omitzero" api:"required"`
Contract string `json:"contract" api:"required"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnion `json:"nonce,omitzero" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
R Hex `json:"r" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
S Hex `json:"s" api:"required"`
YParity float64 `json:"y_parity" api:"required"`
// contains filtered or unexported fields
}
A signed EIP-7702 authorization that delegates code execution to a contract address.
The properties ChainID, Contract, Nonce, R, S, YParity are required.
func (EthereumSign7702Authorization) MarshalJSON ¶ added in v0.6.0
func (r EthereumSign7702Authorization) MarshalJSON() (data []byte, err error)
func (*EthereumSign7702Authorization) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSign7702Authorization) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationResp ¶ added in v0.6.0
type EthereumSign7702AuthorizationResp struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnionResp `json:"chain_id" api:"required"`
Contract string `json:"contract" api:"required"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnionResp `json:"nonce" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
R Hex `json:"r" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
S Hex `json:"s" api:"required"`
YParity float64 `json:"y_parity" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChainID respjson.Field
Contract respjson.Field
Nonce respjson.Field
R respjson.Field
S respjson.Field
YParity respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A signed EIP-7702 authorization that delegates code execution to a contract address.
func (EthereumSign7702AuthorizationResp) RawJSON ¶ added in v0.6.0
func (r EthereumSign7702AuthorizationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSign7702AuthorizationResp) ToParam ¶ added in v0.6.0
func (r EthereumSign7702AuthorizationResp) ToParam() EthereumSign7702Authorization
ToParam converts this EthereumSign7702AuthorizationResp to a EthereumSign7702Authorization.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSign7702Authorization.Overrides()
func (*EthereumSign7702AuthorizationResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSign7702AuthorizationResp) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcInput ¶ added in v0.0.4
type EthereumSign7702AuthorizationRpcInput struct {
// Any of "eth_sign7702Authorization".
Method EthereumSign7702AuthorizationRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `eth_sign7702Authorization` RPC.
Params EthereumSign7702AuthorizationRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSign7702AuthorizationRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Signs an EIP-7702 authorization.
The properties Method, Params are required.
func (EthereumSign7702AuthorizationRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumSign7702AuthorizationRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSign7702AuthorizationRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSign7702AuthorizationRpcInput) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcInputChainType ¶
type EthereumSign7702AuthorizationRpcInputChainType string
const (
EthereumSign7702AuthorizationRpcInputChainTypeEthereum EthereumSign7702AuthorizationRpcInputChainType = "ethereum"
)
type EthereumSign7702AuthorizationRpcInputMethod ¶
type EthereumSign7702AuthorizationRpcInputMethod string
const (
EthereumSign7702AuthorizationRpcInputMethodEthSign7702Authorization EthereumSign7702AuthorizationRpcInputMethod = "eth_sign7702Authorization"
)
type EthereumSign7702AuthorizationRpcInputParams ¶ added in v0.0.4
type EthereumSign7702AuthorizationRpcInputParams struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnion `json:"chain_id,omitzero" api:"required"`
Contract string `json:"contract" api:"required"`
// Any of "self".
Executor EthereumSign7702AuthorizationRpcInputParamsExecutor `json:"executor,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnion `json:"nonce,omitzero"`
// contains filtered or unexported fields
}
Parameters for the EVM `eth_sign7702Authorization` RPC.
The properties ChainID, Contract are required.
func (EthereumSign7702AuthorizationRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumSign7702AuthorizationRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSign7702AuthorizationRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSign7702AuthorizationRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcInputParamsExecutor ¶ added in v0.4.0
type EthereumSign7702AuthorizationRpcInputParamsExecutor string
const (
EthereumSign7702AuthorizationRpcInputParamsExecutorSelf EthereumSign7702AuthorizationRpcInputParamsExecutor = "self"
)
type EthereumSign7702AuthorizationRpcInputParamsResp ¶ added in v0.4.0
type EthereumSign7702AuthorizationRpcInputParamsResp struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnionResp `json:"chain_id" api:"required"`
Contract string `json:"contract" api:"required"`
// Any of "self".
Executor EthereumSign7702AuthorizationRpcInputParamsExecutor `json:"executor"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnionResp `json:"nonce"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChainID respjson.Field
Contract respjson.Field
Executor respjson.Field
Nonce respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `eth_sign7702Authorization` RPC.
func (EthereumSign7702AuthorizationRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumSign7702AuthorizationRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSign7702AuthorizationRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumSign7702AuthorizationRpcInputParamsResp) ToParam() EthereumSign7702AuthorizationRpcInputParams
ToParam converts this EthereumSign7702AuthorizationRpcInputParamsResp to a EthereumSign7702AuthorizationRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSign7702AuthorizationRpcInputParams.Overrides()
func (*EthereumSign7702AuthorizationRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSign7702AuthorizationRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcInputResp ¶ added in v0.6.0
type EthereumSign7702AuthorizationRpcInputResp struct {
// Any of "eth_sign7702Authorization".
Method EthereumSign7702AuthorizationRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `eth_sign7702Authorization` RPC.
Params EthereumSign7702AuthorizationRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "ethereum".
ChainType EthereumSign7702AuthorizationRpcInputChainType `json:"chain_type"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signs an EIP-7702 authorization.
func (EthereumSign7702AuthorizationRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSign7702AuthorizationRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSign7702AuthorizationRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSign7702AuthorizationRpcInputResp) ToParam() EthereumSign7702AuthorizationRpcInput
ToParam converts this EthereumSign7702AuthorizationRpcInputResp to a EthereumSign7702AuthorizationRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSign7702AuthorizationRpcInput.Overrides()
func (*EthereumSign7702AuthorizationRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSign7702AuthorizationRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcResponse ¶
type EthereumSign7702AuthorizationRpcResponse struct {
// Data returned by the EVM `eth_sign7702Authorization` RPC.
Data EthereumSign7702AuthorizationRpcResponseData `json:"data" api:"required"`
// Any of "eth_sign7702Authorization".
Method EthereumSign7702AuthorizationRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `eth_sign7702Authorization` RPC.
func (EthereumSign7702AuthorizationRpcResponse) RawJSON ¶
func (r EthereumSign7702AuthorizationRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSign7702AuthorizationRpcResponse) UnmarshalJSON ¶
func (r *EthereumSign7702AuthorizationRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcResponseData ¶
type EthereumSign7702AuthorizationRpcResponseData struct {
// A signed EIP-7702 authorization that delegates code execution to a contract
// address.
Authorization EthereumSign7702AuthorizationResp `json:"authorization" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Authorization respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `eth_sign7702Authorization` RPC.
func (EthereumSign7702AuthorizationRpcResponseData) RawJSON ¶
func (r EthereumSign7702AuthorizationRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSign7702AuthorizationRpcResponseData) UnmarshalJSON ¶
func (r *EthereumSign7702AuthorizationRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSign7702AuthorizationRpcResponseMethod ¶
type EthereumSign7702AuthorizationRpcResponseMethod string
const (
EthereumSign7702AuthorizationRpcResponseMethodEthSign7702Authorization EthereumSign7702AuthorizationRpcResponseMethod = "eth_sign7702Authorization"
)
type EthereumSignTransactionRpcInput ¶ added in v0.0.4
type EthereumSignTransactionRpcInput struct {
// Any of "eth_signTransaction".
Method EthereumSignTransactionRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `eth_signTransaction` RPC.
Params EthereumSignTransactionRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSignTransactionRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes the EVM `eth_signTransaction` RPC to sign a transaction.
The properties Method, Params are required.
func (EthereumSignTransactionRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumSignTransactionRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSignTransactionRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSignTransactionRpcInput) UnmarshalJSON(data []byte) error
type EthereumSignTransactionRpcInputChainType ¶
type EthereumSignTransactionRpcInputChainType string
const (
EthereumSignTransactionRpcInputChainTypeEthereum EthereumSignTransactionRpcInputChainType = "ethereum"
)
type EthereumSignTransactionRpcInputMethod ¶
type EthereumSignTransactionRpcInputMethod string
const (
EthereumSignTransactionRpcInputMethodEthSignTransaction EthereumSignTransactionRpcInputMethod = "eth_signTransaction"
)
type EthereumSignTransactionRpcInputParams ¶ added in v0.0.4
type EthereumSignTransactionRpcInputParams struct {
// An unsigned Ethereum transaction object. Supports standard EVM transaction types
// (0, 1, 2, 4) and Tempo transactions (type 118).
Transaction UnsignedEthereumTransactionUnion `json:"transaction,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for the EVM `eth_signTransaction` RPC.
The property Transaction is required.
func (EthereumSignTransactionRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumSignTransactionRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSignTransactionRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSignTransactionRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSignTransactionRpcInputParamsResp ¶ added in v0.4.0
type EthereumSignTransactionRpcInputParamsResp struct {
// An unsigned Ethereum transaction object. Supports standard EVM transaction types
// (0, 1, 2, 4) and Tempo transactions (type 118).
Transaction UnsignedEthereumTransactionUnionResp `json:"transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Transaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `eth_signTransaction` RPC.
func (EthereumSignTransactionRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumSignTransactionRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSignTransactionRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumSignTransactionRpcInputParamsResp) ToParam() EthereumSignTransactionRpcInputParams
ToParam converts this EthereumSignTransactionRpcInputParamsResp to a EthereumSignTransactionRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSignTransactionRpcInputParams.Overrides()
func (*EthereumSignTransactionRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSignTransactionRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSignTransactionRpcInputResp ¶ added in v0.6.0
type EthereumSignTransactionRpcInputResp struct {
// Any of "eth_signTransaction".
Method EthereumSignTransactionRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `eth_signTransaction` RPC.
Params EthereumSignTransactionRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "ethereum".
ChainType EthereumSignTransactionRpcInputChainType `json:"chain_type"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the EVM `eth_signTransaction` RPC to sign a transaction.
func (EthereumSignTransactionRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSignTransactionRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSignTransactionRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSignTransactionRpcInputResp) ToParam() EthereumSignTransactionRpcInput
ToParam converts this EthereumSignTransactionRpcInputResp to a EthereumSignTransactionRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSignTransactionRpcInput.Overrides()
func (*EthereumSignTransactionRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSignTransactionRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSignTransactionRpcResponse ¶
type EthereumSignTransactionRpcResponse struct {
// Data returned by the EVM `eth_signTransaction` RPC.
Data EthereumSignTransactionRpcResponseData `json:"data" api:"required"`
// Any of "eth_signTransaction".
Method EthereumSignTransactionRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `eth_signTransaction` RPC.
func (EthereumSignTransactionRpcResponse) RawJSON ¶
func (r EthereumSignTransactionRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSignTransactionRpcResponse) UnmarshalJSON ¶
func (r *EthereumSignTransactionRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSignTransactionRpcResponseData ¶
type EthereumSignTransactionRpcResponseData struct {
// Any of "rlp".
Encoding EthereumSignTransactionRpcResponseDataEncoding `json:"encoding" api:"required"`
SignedTransaction string `json:"signed_transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
SignedTransaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `eth_signTransaction` RPC.
func (EthereumSignTransactionRpcResponseData) RawJSON ¶
func (r EthereumSignTransactionRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSignTransactionRpcResponseData) UnmarshalJSON ¶
func (r *EthereumSignTransactionRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSignTransactionRpcResponseDataEncoding ¶ added in v0.4.0
type EthereumSignTransactionRpcResponseDataEncoding string
const (
EthereumSignTransactionRpcResponseDataEncodingRlp EthereumSignTransactionRpcResponseDataEncoding = "rlp"
)
type EthereumSignTransactionRpcResponseMethod ¶
type EthereumSignTransactionRpcResponseMethod string
const (
EthereumSignTransactionRpcResponseMethodEthSignTransaction EthereumSignTransactionRpcResponseMethod = "eth_signTransaction"
)
type EthereumSignTypedDataRpcInput ¶ added in v0.0.4
type EthereumSignTypedDataRpcInput struct {
// Any of "eth_signTypedData_v4".
Method EthereumSignTypedDataRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `eth_signTypedData_v4` RPC.
Params EthereumSignTypedDataRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 param.Opt[Caip2] `json:"caip2,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSignTypedDataRpcInputChainType `json:"chain_type,omitzero"`
// Options controlling signature production for personal_sign and
// eth_signTypedData_v4.
SignatureOptions SignatureOptions `json:"signature_options,omitzero"`
// contains filtered or unexported fields
}
Executes the EVM `eth_signTypedData_v4` RPC (EIP-712) to sign a typed data object.
The properties Method, Params are required.
func (EthereumSignTypedDataRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumSignTypedDataRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSignTypedDataRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSignTypedDataRpcInput) UnmarshalJSON(data []byte) error
type EthereumSignTypedDataRpcInputChainType ¶
type EthereumSignTypedDataRpcInputChainType string
const (
EthereumSignTypedDataRpcInputChainTypeEthereum EthereumSignTypedDataRpcInputChainType = "ethereum"
)
type EthereumSignTypedDataRpcInputMethod ¶
type EthereumSignTypedDataRpcInputMethod string
const (
EthereumSignTypedDataRpcInputMethodEthSignTypedDataV4 EthereumSignTypedDataRpcInputMethod = "eth_signTypedData_v4"
)
type EthereumSignTypedDataRpcInputParams ¶ added in v0.0.4
type EthereumSignTypedDataRpcInputParams struct {
// EIP-712 typed data object.
TypedData EthereumTypedDataInput `json:"typed_data,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for the EVM `eth_signTypedData_v4` RPC.
The property TypedData is required.
func (EthereumSignTypedDataRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumSignTypedDataRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSignTypedDataRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSignTypedDataRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSignTypedDataRpcInputParamsResp ¶ added in v0.4.0
type EthereumSignTypedDataRpcInputParamsResp struct {
// EIP-712 typed data object.
TypedData EthereumTypedDataInputResp `json:"typed_data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
TypedData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `eth_signTypedData_v4` RPC.
func (EthereumSignTypedDataRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumSignTypedDataRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSignTypedDataRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumSignTypedDataRpcInputParamsResp) ToParam() EthereumSignTypedDataRpcInputParams
ToParam converts this EthereumSignTypedDataRpcInputParamsResp to a EthereumSignTypedDataRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSignTypedDataRpcInputParams.Overrides()
func (*EthereumSignTypedDataRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSignTypedDataRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSignTypedDataRpcInputResp ¶ added in v0.6.0
type EthereumSignTypedDataRpcInputResp struct {
// Any of "eth_signTypedData_v4".
Method EthereumSignTypedDataRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `eth_signTypedData_v4` RPC.
Params EthereumSignTypedDataRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2"`
// Any of "ethereum".
ChainType EthereumSignTypedDataRpcInputChainType `json:"chain_type"`
// Options controlling signature production for personal_sign and
// eth_signTypedData_v4.
SignatureOptions SignatureOptionsResp `json:"signature_options"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
Caip2 respjson.Field
ChainType respjson.Field
SignatureOptions respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the EVM `eth_signTypedData_v4` RPC (EIP-712) to sign a typed data object.
func (EthereumSignTypedDataRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSignTypedDataRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSignTypedDataRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSignTypedDataRpcInputResp) ToParam() EthereumSignTypedDataRpcInput
ToParam converts this EthereumSignTypedDataRpcInputResp to a EthereumSignTypedDataRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSignTypedDataRpcInput.Overrides()
func (*EthereumSignTypedDataRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSignTypedDataRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSignTypedDataRpcResponse ¶
type EthereumSignTypedDataRpcResponse struct {
// Data returned by the EVM `eth_signTypedData_v4` RPC.
Data EthereumSignTypedDataRpcResponseData `json:"data" api:"required"`
// Any of "eth_signTypedData_v4".
Method EthereumSignTypedDataRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `eth_signTypedData_v4` RPC.
func (EthereumSignTypedDataRpcResponse) RawJSON ¶
func (r EthereumSignTypedDataRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSignTypedDataRpcResponse) UnmarshalJSON ¶
func (r *EthereumSignTypedDataRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSignTypedDataRpcResponseData ¶
type EthereumSignTypedDataRpcResponseData struct {
// Any of "hex".
Encoding EthereumSignTypedDataRpcResponseDataEncoding `json:"encoding" api:"required"`
Signature string `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `eth_signTypedData_v4` RPC.
func (EthereumSignTypedDataRpcResponseData) RawJSON ¶
func (r EthereumSignTypedDataRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSignTypedDataRpcResponseData) UnmarshalJSON ¶
func (r *EthereumSignTypedDataRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSignTypedDataRpcResponseDataEncoding ¶ added in v0.4.0
type EthereumSignTypedDataRpcResponseDataEncoding string
const (
EthereumSignTypedDataRpcResponseDataEncodingHex EthereumSignTypedDataRpcResponseDataEncoding = "hex"
)
type EthereumSignTypedDataRpcResponseMethod ¶
type EthereumSignTypedDataRpcResponseMethod string
const (
EthereumSignTypedDataRpcResponseMethodEthSignTypedDataV4 EthereumSignTypedDataRpcResponseMethod = "eth_signTypedData_v4"
)
type EthereumSignUserOperationRpcInput ¶ added in v0.0.4
type EthereumSignUserOperationRpcInput struct {
// Any of "eth_signUserOperation".
Method EthereumSignUserOperationRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the EVM `eth_signUserOperation` RPC.
Params EthereumSignUserOperationRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "ethereum".
ChainType EthereumSignUserOperationRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes an RPC method to hash and sign a UserOperation.
The properties Method, Params are required.
func (EthereumSignUserOperationRpcInput) MarshalJSON ¶ added in v0.0.4
func (r EthereumSignUserOperationRpcInput) MarshalJSON() (data []byte, err error)
func (*EthereumSignUserOperationRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSignUserOperationRpcInput) UnmarshalJSON(data []byte) error
type EthereumSignUserOperationRpcInputChainType ¶
type EthereumSignUserOperationRpcInputChainType string
const (
EthereumSignUserOperationRpcInputChainTypeEthereum EthereumSignUserOperationRpcInputChainType = "ethereum"
)
type EthereumSignUserOperationRpcInputMethod ¶
type EthereumSignUserOperationRpcInputMethod string
const (
EthereumSignUserOperationRpcInputMethodEthSignUserOperation EthereumSignUserOperationRpcInputMethod = "eth_signUserOperation"
)
type EthereumSignUserOperationRpcInputParams ¶ added in v0.0.4
type EthereumSignUserOperationRpcInputParams struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnion `json:"chain_id,omitzero" api:"required"`
Contract string `json:"contract" api:"required"`
// An ERC-4337 user operation.
UserOperation UserOperationInput `json:"user_operation,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for the EVM `eth_signUserOperation` RPC.
The properties ChainID, Contract, UserOperation are required.
func (EthereumSignUserOperationRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r EthereumSignUserOperationRpcInputParams) MarshalJSON() (data []byte, err error)
func (*EthereumSignUserOperationRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *EthereumSignUserOperationRpcInputParams) UnmarshalJSON(data []byte) error
type EthereumSignUserOperationRpcInputParamsResp ¶ added in v0.4.0
type EthereumSignUserOperationRpcInputParamsResp struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnionResp `json:"chain_id" api:"required"`
Contract string `json:"contract" api:"required"`
// An ERC-4337 user operation.
UserOperation UserOperationInputResp `json:"user_operation" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChainID respjson.Field
Contract respjson.Field
UserOperation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the EVM `eth_signUserOperation` RPC.
func (EthereumSignUserOperationRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r EthereumSignUserOperationRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSignUserOperationRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r EthereumSignUserOperationRpcInputParamsResp) ToParam() EthereumSignUserOperationRpcInputParams
ToParam converts this EthereumSignUserOperationRpcInputParamsResp to a EthereumSignUserOperationRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSignUserOperationRpcInputParams.Overrides()
func (*EthereumSignUserOperationRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumSignUserOperationRpcInputParamsResp) UnmarshalJSON(data []byte) error
type EthereumSignUserOperationRpcInputResp ¶ added in v0.6.0
type EthereumSignUserOperationRpcInputResp struct {
// Any of "eth_signUserOperation".
Method EthereumSignUserOperationRpcInputMethod `json:"method" api:"required"`
// Parameters for the EVM `eth_signUserOperation` RPC.
Params EthereumSignUserOperationRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "ethereum".
ChainType EthereumSignUserOperationRpcInputChainType `json:"chain_type"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes an RPC method to hash and sign a UserOperation.
func (EthereumSignUserOperationRpcInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumSignUserOperationRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumSignUserOperationRpcInputResp) ToParam ¶ added in v0.6.0
func (r EthereumSignUserOperationRpcInputResp) ToParam() EthereumSignUserOperationRpcInput
ToParam converts this EthereumSignUserOperationRpcInputResp to a EthereumSignUserOperationRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumSignUserOperationRpcInput.Overrides()
func (*EthereumSignUserOperationRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumSignUserOperationRpcInputResp) UnmarshalJSON(data []byte) error
type EthereumSignUserOperationRpcResponse ¶
type EthereumSignUserOperationRpcResponse struct {
// Data returned by the EVM `eth_signUserOperation` RPC.
Data EthereumSignUserOperationRpcResponseData `json:"data" api:"required"`
// Any of "eth_signUserOperation".
Method EthereumSignUserOperationRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the EVM `eth_signUserOperation` RPC.
func (EthereumSignUserOperationRpcResponse) RawJSON ¶
func (r EthereumSignUserOperationRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSignUserOperationRpcResponse) UnmarshalJSON ¶
func (r *EthereumSignUserOperationRpcResponse) UnmarshalJSON(data []byte) error
type EthereumSignUserOperationRpcResponseData ¶
type EthereumSignUserOperationRpcResponseData struct {
// Any of "hex".
Encoding EthereumSignUserOperationRpcResponseDataEncoding `json:"encoding" api:"required"`
Signature string `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the EVM `eth_signUserOperation` RPC.
func (EthereumSignUserOperationRpcResponseData) RawJSON ¶
func (r EthereumSignUserOperationRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*EthereumSignUserOperationRpcResponseData) UnmarshalJSON ¶
func (r *EthereumSignUserOperationRpcResponseData) UnmarshalJSON(data []byte) error
type EthereumSignUserOperationRpcResponseDataEncoding ¶ added in v0.4.0
type EthereumSignUserOperationRpcResponseDataEncoding string
const (
EthereumSignUserOperationRpcResponseDataEncodingHex EthereumSignUserOperationRpcResponseDataEncoding = "hex"
)
type EthereumSignUserOperationRpcResponseMethod ¶
type EthereumSignUserOperationRpcResponseMethod string
const (
EthereumSignUserOperationRpcResponseMethodEthSignUserOperation EthereumSignUserOperationRpcResponseMethod = "eth_signUserOperation"
)
type EthereumTransactionCondition ¶ added in v0.6.0
type EthereumTransactionCondition struct {
// Ethereum transaction-level fields that can be referenced in a policy condition.
//
// Any of "to", "value", "chain_id".
Field EthereumTransactionConditionField `json:"field,omitzero" api:"required"`
// Any of "ethereum_transaction".
FieldSource EthereumTransactionConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.
The properties Field, FieldSource, Operator, Value are required.
func (EthereumTransactionCondition) MarshalJSON ¶ added in v0.6.0
func (r EthereumTransactionCondition) MarshalJSON() (data []byte, err error)
func (*EthereumTransactionCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTransactionCondition) UnmarshalJSON(data []byte) error
type EthereumTransactionConditionField ¶ added in v0.6.0
type EthereumTransactionConditionField string
Ethereum transaction-level fields that can be referenced in a policy condition.
const ( EthereumTransactionConditionFieldTo EthereumTransactionConditionField = "to" EthereumTransactionConditionFieldValue EthereumTransactionConditionField = "value" EthereumTransactionConditionFieldChainID EthereumTransactionConditionField = "chain_id" )
type EthereumTransactionConditionFieldSource ¶ added in v0.6.0
type EthereumTransactionConditionFieldSource string
const (
EthereumTransactionConditionFieldSourceEthereumTransaction EthereumTransactionConditionFieldSource = "ethereum_transaction"
)
type EthereumTransactionConditionResp ¶ added in v0.6.0
type EthereumTransactionConditionResp struct {
// Ethereum transaction-level fields that can be referenced in a policy condition.
//
// Any of "to", "value", "chain_id".
Field EthereumTransactionConditionField `json:"field" api:"required"`
// Any of "ethereum_transaction".
FieldSource EthereumTransactionConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.
func (EthereumTransactionConditionResp) RawJSON ¶ added in v0.6.0
func (r EthereumTransactionConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumTransactionConditionResp) ToParam ¶ added in v0.6.0
func (r EthereumTransactionConditionResp) ToParam() EthereumTransactionCondition
ToParam converts this EthereumTransactionConditionResp to a EthereumTransactionCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumTransactionCondition.Overrides()
func (*EthereumTransactionConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTransactionConditionResp) UnmarshalJSON(data []byte) error
type EthereumTypedDataDomainCondition ¶ added in v0.6.0
type EthereumTypedDataDomainCondition struct {
// Supported fields for Ethereum typed data domain conditions.
//
// Any of "chainId", "verifyingContract", "chain_id", "verifying_contract".
Field EthereumTypedDataDomainConditionField `json:"field,omitzero" api:"required"`
// Any of "ethereum_typed_data_domain".
FieldSource EthereumTypedDataDomainConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Attributes from the signing domain that will verify the signature.
The properties Field, FieldSource, Operator, Value are required.
func (EthereumTypedDataDomainCondition) MarshalJSON ¶ added in v0.6.0
func (r EthereumTypedDataDomainCondition) MarshalJSON() (data []byte, err error)
func (*EthereumTypedDataDomainCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTypedDataDomainCondition) UnmarshalJSON(data []byte) error
type EthereumTypedDataDomainConditionField ¶ added in v0.6.0
type EthereumTypedDataDomainConditionField string
Supported fields for Ethereum typed data domain conditions.
const ( EthereumTypedDataDomainConditionFieldChainIDMixedCase EthereumTypedDataDomainConditionField = "chainId" EthereumTypedDataDomainConditionFieldVerifyingContractCamelCase EthereumTypedDataDomainConditionField = "verifyingContract" EthereumTypedDataDomainConditionFieldChainID EthereumTypedDataDomainConditionField = "chain_id" EthereumTypedDataDomainConditionFieldVerifyingContract EthereumTypedDataDomainConditionField = "verifying_contract" )
type EthereumTypedDataDomainConditionFieldSource ¶ added in v0.6.0
type EthereumTypedDataDomainConditionFieldSource string
const (
EthereumTypedDataDomainConditionFieldSourceEthereumTypedDataDomain EthereumTypedDataDomainConditionFieldSource = "ethereum_typed_data_domain"
)
type EthereumTypedDataDomainConditionResp ¶ added in v0.6.0
type EthereumTypedDataDomainConditionResp struct {
// Supported fields for Ethereum typed data domain conditions.
//
// Any of "chainId", "verifyingContract", "chain_id", "verifying_contract".
Field EthereumTypedDataDomainConditionField `json:"field" api:"required"`
// Any of "ethereum_typed_data_domain".
FieldSource EthereumTypedDataDomainConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Attributes from the signing domain that will verify the signature.
func (EthereumTypedDataDomainConditionResp) RawJSON ¶ added in v0.6.0
func (r EthereumTypedDataDomainConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumTypedDataDomainConditionResp) ToParam ¶ added in v0.6.0
func (r EthereumTypedDataDomainConditionResp) ToParam() EthereumTypedDataDomainCondition
ToParam converts this EthereumTypedDataDomainConditionResp to a EthereumTypedDataDomainCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumTypedDataDomainCondition.Overrides()
func (*EthereumTypedDataDomainConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTypedDataDomainConditionResp) UnmarshalJSON(data []byte) error
type EthereumTypedDataInput ¶ added in v0.4.0
type EthereumTypedDataInput struct {
// The domain parameters for EIP-712 typed data signing.
Domain TypedDataDomainInputParams `json:"domain,omitzero" api:"required"`
Message map[string]any `json:"message,omitzero" api:"required"`
PrimaryType string `json:"primary_type" api:"required"`
// The type definitions for EIP-712 typed data signing.
Types TypedDataTypesInputParams `json:"types,omitzero" api:"required"`
// contains filtered or unexported fields
}
EIP-712 typed data object.
The properties Domain, Message, PrimaryType, Types are required.
func (EthereumTypedDataInput) MarshalJSON ¶ added in v0.6.0
func (r EthereumTypedDataInput) MarshalJSON() (data []byte, err error)
func (*EthereumTypedDataInput) UnmarshalJSON ¶ added in v0.4.0
func (r *EthereumTypedDataInput) UnmarshalJSON(data []byte) error
type EthereumTypedDataInputResp ¶ added in v0.6.0
type EthereumTypedDataInputResp struct {
// The domain parameters for EIP-712 typed data signing.
Domain TypedDataDomainInputParams `json:"domain" api:"required"`
Message map[string]any `json:"message" api:"required"`
PrimaryType string `json:"primary_type" api:"required"`
// The type definitions for EIP-712 typed data signing.
Types TypedDataTypesInputParamsResp `json:"types" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Domain respjson.Field
Message respjson.Field
PrimaryType respjson.Field
Types respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
EIP-712 typed data object.
func (EthereumTypedDataInputResp) RawJSON ¶ added in v0.6.0
func (r EthereumTypedDataInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumTypedDataInputResp) ToParam ¶ added in v0.6.0
func (r EthereumTypedDataInputResp) ToParam() EthereumTypedDataInput
ToParam converts this EthereumTypedDataInputResp to a EthereumTypedDataInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumTypedDataInput.Overrides()
func (*EthereumTypedDataInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTypedDataInputResp) UnmarshalJSON(data []byte) error
type EthereumTypedDataMessageCondition ¶ added in v0.6.0
type EthereumTypedDataMessageCondition struct {
Field string `json:"field" api:"required"`
// Any of "ethereum_typed_data_message".
FieldSource EthereumTypedDataMessageConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// The typed data structure containing EIP-712 types and the primary type for typed
// data message policy conditions.
TypedData TypedDataInput `json:"typed_data,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
'types' and 'primary_type' attributes of the TypedData JSON object defined in EIP-712.
The properties Field, FieldSource, Operator, TypedData, Value are required.
func (EthereumTypedDataMessageCondition) MarshalJSON ¶ added in v0.6.0
func (r EthereumTypedDataMessageCondition) MarshalJSON() (data []byte, err error)
func (*EthereumTypedDataMessageCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTypedDataMessageCondition) UnmarshalJSON(data []byte) error
type EthereumTypedDataMessageConditionFieldSource ¶ added in v0.6.0
type EthereumTypedDataMessageConditionFieldSource string
const (
EthereumTypedDataMessageConditionFieldSourceEthereumTypedDataMessage EthereumTypedDataMessageConditionFieldSource = "ethereum_typed_data_message"
)
type EthereumTypedDataMessageConditionResp ¶ added in v0.6.0
type EthereumTypedDataMessageConditionResp struct {
Field string `json:"field" api:"required"`
// Any of "ethereum_typed_data_message".
FieldSource EthereumTypedDataMessageConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// The typed data structure containing EIP-712 types and the primary type for typed
// data message policy conditions.
TypedData TypedDataInputResp `json:"typed_data" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
TypedData respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
'types' and 'primary_type' attributes of the TypedData JSON object defined in EIP-712.
func (EthereumTypedDataMessageConditionResp) RawJSON ¶ added in v0.6.0
func (r EthereumTypedDataMessageConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (EthereumTypedDataMessageConditionResp) ToParam ¶ added in v0.6.0
func (r EthereumTypedDataMessageConditionResp) ToParam() EthereumTypedDataMessageCondition
ToParam converts this EthereumTypedDataMessageConditionResp to a EthereumTypedDataMessageCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with EthereumTypedDataMessageCondition.Overrides()
func (*EthereumTypedDataMessageConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *EthereumTypedDataMessageConditionResp) UnmarshalJSON(data []byte) error
type EvmTransactionWalletActionStep ¶ added in v0.6.0
type EvmTransactionWalletActionStep struct {
// CAIP-2 chain identifier of the transaction, containing the chain ID.
Caip2 string `json:"caip2" api:"required"`
// Status of an EVM step in a wallet action.
//
// Any of "preparing", "queued", "pending", "retrying", "confirmed", "rejected",
// "reverted", "replaced", "abandoned".
Status EvmWalletActionStepStatus `json:"status" api:"required"`
// The transaction hash for this step. May change while the step status is
// non-terminal.
TransactionHash string `json:"transaction_hash" api:"required"`
// Any of "evm_transaction".
Type EvmTransactionWalletActionStepType `json:"type" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// Whether this step has reached on-chain finality. Absent until finality is
// confirmed.
Finalized bool `json:"finalized"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Status respjson.Field
TransactionHash respjson.Field
Type respjson.Field
FailureReason respjson.Field
Finalized respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet action step consisting of an EVM transaction.
func (EvmTransactionWalletActionStep) RawJSON ¶ added in v0.6.0
func (r EvmTransactionWalletActionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*EvmTransactionWalletActionStep) UnmarshalJSON ¶ added in v0.6.0
func (r *EvmTransactionWalletActionStep) UnmarshalJSON(data []byte) error
type EvmTransactionWalletActionStepType ¶ added in v0.6.0
type EvmTransactionWalletActionStepType string
const (
EvmTransactionWalletActionStepTypeEvmTransaction EvmTransactionWalletActionStepType = "evm_transaction"
)
type EvmUserOperationEntrypointVersion ¶ added in v0.11.0
type EvmUserOperationEntrypointVersion string
The ERC-4337 entrypoint contract version used by the user operation.
const ( EvmUserOperationEntrypointVersion0_6 EvmUserOperationEntrypointVersion = "0.6" EvmUserOperationEntrypointVersion0_7 EvmUserOperationEntrypointVersion = "0.7" EvmUserOperationEntrypointVersion0_8 EvmUserOperationEntrypointVersion = "0.8" EvmUserOperationEntrypointVersion0_9 EvmUserOperationEntrypointVersion = "0.9" )
type EvmUserOperationWalletActionStep ¶ added in v0.6.0
type EvmUserOperationWalletActionStep struct {
// Transaction hash of the bundle in which this user operation was included. Null
// until included by a bundler.
BundleTransactionHash string `json:"bundle_transaction_hash" api:"required"`
// CAIP-2 network identifier, containing the chain ID of the user operation.
Caip2 string `json:"caip2" api:"required"`
// The ERC-4337 entrypoint contract version used by the user operation.
//
// Any of "0.6", "0.7", "0.8", "0.9".
EntrypointVersion EvmUserOperationEntrypointVersion `json:"entrypoint_version" api:"required"`
// Status of an EVM step in a wallet action.
//
// Any of "preparing", "queued", "pending", "retrying", "confirmed", "rejected",
// "reverted", "replaced", "abandoned".
Status EvmWalletActionStepStatus `json:"status" api:"required"`
// Any of "evm_user_operation".
Type EvmUserOperationWalletActionStepType `json:"type" api:"required"`
// The user operation hash for this step. May change while the step status is
// non-terminal.
UserOperationHash string `json:"user_operation_hash" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// Whether this step has reached on-chain finality. Absent until finality is
// confirmed.
Finalized bool `json:"finalized"`
// Amount charged in USD for gas sponsorship on this step.
GasCreditsChargedUsd string `json:"gas_credits_charged_usd"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BundleTransactionHash respjson.Field
Caip2 respjson.Field
EntrypointVersion respjson.Field
Status respjson.Field
Type respjson.Field
UserOperationHash respjson.Field
FailureReason respjson.Field
Finalized respjson.Field
GasCreditsChargedUsd respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet action step consisting of an EVM user operation.
func (EvmUserOperationWalletActionStep) RawJSON ¶ added in v0.6.0
func (r EvmUserOperationWalletActionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*EvmUserOperationWalletActionStep) UnmarshalJSON ¶ added in v0.6.0
func (r *EvmUserOperationWalletActionStep) UnmarshalJSON(data []byte) error
type EvmUserOperationWalletActionStepType ¶ added in v0.6.0
type EvmUserOperationWalletActionStepType string
const (
EvmUserOperationWalletActionStepTypeEvmUserOperation EvmUserOperationWalletActionStepType = "evm_user_operation"
)
type EvmWalletActionStepStatus ¶ added in v0.6.0
type EvmWalletActionStepStatus string
Status of an EVM step in a wallet action.
const ( EvmWalletActionStepStatusPreparing EvmWalletActionStepStatus = "preparing" EvmWalletActionStepStatusQueued EvmWalletActionStepStatus = "queued" EvmWalletActionStepStatusPending EvmWalletActionStepStatus = "pending" EvmWalletActionStepStatusRetrying EvmWalletActionStepStatus = "retrying" EvmWalletActionStepStatusConfirmed EvmWalletActionStepStatus = "confirmed" EvmWalletActionStepStatusRejected EvmWalletActionStepStatus = "rejected" EvmWalletActionStepStatusReverted EvmWalletActionStepStatus = "reverted" EvmWalletActionStepStatusReplaced EvmWalletActionStepStatus = "replaced" EvmWalletActionStepStatusAbandoned EvmWalletActionStepStatus = "abandoned" )
type ExportPrivateKeyRpcInput ¶ added in v0.4.0
type ExportPrivateKeyRpcInput struct {
Address string `json:"address" api:"required"`
// Any of "exportPrivateKey".
Method ExportPrivateKeyRpcInputMethod `json:"method,omitzero" api:"required"`
// Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
Params PrivateKeyExportInput `json:"params,omitzero" api:"required"`
// contains filtered or unexported fields
}
Exports the private key of the wallet.
The properties Address, Method, Params are required.
func (ExportPrivateKeyRpcInput) MarshalJSON ¶ added in v0.6.0
func (r ExportPrivateKeyRpcInput) MarshalJSON() (data []byte, err error)
func (*ExportPrivateKeyRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *ExportPrivateKeyRpcInput) UnmarshalJSON(data []byte) error
type ExportPrivateKeyRpcInputMethod ¶ added in v0.4.0
type ExportPrivateKeyRpcInputMethod string
const (
ExportPrivateKeyRpcInputMethodExportPrivateKey ExportPrivateKeyRpcInputMethod = "exportPrivateKey"
)
type ExportPrivateKeyRpcInputResp ¶ added in v0.6.0
type ExportPrivateKeyRpcInputResp struct {
Address string `json:"address" api:"required"`
// Any of "exportPrivateKey".
Method ExportPrivateKeyRpcInputMethod `json:"method" api:"required"`
// Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
Params PrivateKeyExportInputResp `json:"params" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
Method respjson.Field
Params respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Exports the private key of the wallet.
func (ExportPrivateKeyRpcInputResp) RawJSON ¶ added in v0.6.0
func (r ExportPrivateKeyRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ExportPrivateKeyRpcInputResp) ToParam ¶ added in v0.6.0
func (r ExportPrivateKeyRpcInputResp) ToParam() ExportPrivateKeyRpcInput
ToParam converts this ExportPrivateKeyRpcInputResp to a ExportPrivateKeyRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ExportPrivateKeyRpcInput.Overrides()
func (*ExportPrivateKeyRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *ExportPrivateKeyRpcInputResp) UnmarshalJSON(data []byte) error
type ExportPrivateKeyRpcResponse ¶ added in v0.4.0
type ExportPrivateKeyRpcResponse struct {
// Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
Data PrivateKeyExportInputResp `json:"data" api:"required"`
// Any of "exportPrivateKey".
Method ExportPrivateKeyRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the `exportPrivateKey` RPC.
func (ExportPrivateKeyRpcResponse) RawJSON ¶ added in v0.4.0
func (r ExportPrivateKeyRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExportPrivateKeyRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *ExportPrivateKeyRpcResponse) UnmarshalJSON(data []byte) error
type ExportPrivateKeyRpcResponseMethod ¶ added in v0.4.0
type ExportPrivateKeyRpcResponseMethod string
const (
ExportPrivateKeyRpcResponseMethodExportPrivateKey ExportPrivateKeyRpcResponseMethod = "exportPrivateKey"
)
type ExportSeedPhraseRpcInput ¶ added in v0.5.0
type ExportSeedPhraseRpcInput struct {
Address string `json:"address" api:"required"`
// Any of "exportSeedPhrase".
Method ExportSeedPhraseRpcInputMethod `json:"method,omitzero" api:"required"`
// Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
Params SeedPhraseExportInput `json:"params,omitzero" api:"required"`
// contains filtered or unexported fields
}
Exports the seed phrase of the wallet.
The properties Address, Method, Params are required.
func (ExportSeedPhraseRpcInput) MarshalJSON ¶ added in v0.6.0
func (r ExportSeedPhraseRpcInput) MarshalJSON() (data []byte, err error)
func (*ExportSeedPhraseRpcInput) UnmarshalJSON ¶ added in v0.5.0
func (r *ExportSeedPhraseRpcInput) UnmarshalJSON(data []byte) error
type ExportSeedPhraseRpcInputMethod ¶ added in v0.5.0
type ExportSeedPhraseRpcInputMethod string
const (
ExportSeedPhraseRpcInputMethodExportSeedPhrase ExportSeedPhraseRpcInputMethod = "exportSeedPhrase"
)
type ExportSeedPhraseRpcInputResp ¶ added in v0.6.0
type ExportSeedPhraseRpcInputResp struct {
Address string `json:"address" api:"required"`
// Any of "exportSeedPhrase".
Method ExportSeedPhraseRpcInputMethod `json:"method" api:"required"`
// Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
Params SeedPhraseExportInputResp `json:"params" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
Method respjson.Field
Params respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Exports the seed phrase of the wallet.
func (ExportSeedPhraseRpcInputResp) RawJSON ¶ added in v0.6.0
func (r ExportSeedPhraseRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ExportSeedPhraseRpcInputResp) ToParam ¶ added in v0.6.0
func (r ExportSeedPhraseRpcInputResp) ToParam() ExportSeedPhraseRpcInput
ToParam converts this ExportSeedPhraseRpcInputResp to a ExportSeedPhraseRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ExportSeedPhraseRpcInput.Overrides()
func (*ExportSeedPhraseRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *ExportSeedPhraseRpcInputResp) UnmarshalJSON(data []byte) error
type ExportSeedPhraseRpcResponse ¶ added in v0.5.0
type ExportSeedPhraseRpcResponse struct {
// Response containing HPKE-encrypted wallet data (private key or seed phrase).
Data SeedPhraseExportResponse `json:"data" api:"required"`
// Any of "exportSeedPhrase".
Method ExportSeedPhraseRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the `exportSeedPhrase` RPC.
func (ExportSeedPhraseRpcResponse) RawJSON ¶ added in v0.5.0
func (r ExportSeedPhraseRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExportSeedPhraseRpcResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *ExportSeedPhraseRpcResponse) UnmarshalJSON(data []byte) error
type ExportSeedPhraseRpcResponseMethod ¶ added in v0.5.0
type ExportSeedPhraseRpcResponseMethod string
const (
ExportSeedPhraseRpcResponseMethodExportSeedPhrase ExportSeedPhraseRpcResponseMethod = "exportSeedPhrase"
)
type ExportType ¶ added in v0.4.0
type ExportType string
The export type. 'display' is for showing the key to the user in the UI, 'client' is for exporting to the client application.
const ( ExportTypeDisplay ExportType = "display" ExportTypeClient ExportType = "client" )
type ExternalTransactionWalletActionStep ¶ added in v0.7.0
type ExternalTransactionWalletActionStep struct {
// Status of an external transaction step in a wallet action.
//
// Any of "preparing", "queued", "pending", "confirmed", "rejected", "failed".
Status ExternalTransactionWalletActionStepStatus `json:"status" api:"required"`
// Any of "external_transaction".
Type ExternalTransactionWalletActionStepType `json:"type" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
Type respjson.Field
FailureReason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet action step representing a cross-chain/cross-asset fill by an external provider.
func (ExternalTransactionWalletActionStep) RawJSON ¶ added in v0.7.0
func (r ExternalTransactionWalletActionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExternalTransactionWalletActionStep) UnmarshalJSON ¶ added in v0.7.0
func (r *ExternalTransactionWalletActionStep) UnmarshalJSON(data []byte) error
type ExternalTransactionWalletActionStepStatus ¶ added in v0.7.0
type ExternalTransactionWalletActionStepStatus string
Status of an external transaction step in a wallet action.
const ( ExternalTransactionWalletActionStepStatusPreparing ExternalTransactionWalletActionStepStatus = "preparing" ExternalTransactionWalletActionStepStatusQueued ExternalTransactionWalletActionStepStatus = "queued" ExternalTransactionWalletActionStepStatusPending ExternalTransactionWalletActionStepStatus = "pending" ExternalTransactionWalletActionStepStatusConfirmed ExternalTransactionWalletActionStepStatus = "confirmed" ExternalTransactionWalletActionStepStatusRejected ExternalTransactionWalletActionStepStatus = "rejected" ExternalTransactionWalletActionStepStatusFailed ExternalTransactionWalletActionStepStatus = "failed" )
type ExternalTransactionWalletActionStepType ¶ added in v0.7.0
type ExternalTransactionWalletActionStepType string
const (
ExternalTransactionWalletActionStepTypeExternalTransaction ExternalTransactionWalletActionStepType = "external_transaction"
)
type FailureReason ¶ added in v0.6.0
type FailureReason struct {
// Human-readable failure message.
Message string `json:"message" api:"required"`
// Additional error details, if available.
Details any `json:"details"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Details respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A description of why a wallet action (or a step within a wallet action) failed.
func (FailureReason) RawJSON ¶ added in v0.6.0
func (r FailureReason) RawJSON() string
Returns the unmodified JSON received from the API
func (*FailureReason) UnmarshalJSON ¶ added in v0.6.0
func (r *FailureReason) UnmarshalJSON(data []byte) error
type FeeConfiguration ¶ added in v0.8.0
type FeeConfiguration struct {
// Discriminator: total fee specified in BPS.
//
// Any of "total_fee_bps".
Type FeeConfigurationType `json:"type,omitzero" api:"required"`
// Total fee in basis points (1 bps = 0.01%).
Value int64 `json:"value" api:"required"`
// contains filtered or unexported fields
}
Total fees assessed on a transfer, in BPS
The properties Type, Value are required.
func (FeeConfiguration) MarshalJSON ¶ added in v0.8.0
func (r FeeConfiguration) MarshalJSON() (data []byte, err error)
func (*FeeConfiguration) UnmarshalJSON ¶ added in v0.8.0
func (r *FeeConfiguration) UnmarshalJSON(data []byte) error
type FeeConfigurationResp ¶ added in v0.8.0
type FeeConfigurationResp struct {
// Discriminator: total fee specified in BPS.
//
// Any of "total_fee_bps".
Type FeeConfigurationType `json:"type" api:"required"`
// Total fee in basis points (1 bps = 0.01%).
Value int64 `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Total fees assessed on a transfer, in BPS
func (FeeConfigurationResp) RawJSON ¶ added in v0.8.0
func (r FeeConfigurationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (FeeConfigurationResp) ToParam ¶ added in v0.8.0
func (r FeeConfigurationResp) ToParam() FeeConfiguration
ToParam converts this FeeConfigurationResp to a FeeConfiguration.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with FeeConfiguration.Overrides()
func (*FeeConfigurationResp) UnmarshalJSON ¶ added in v0.8.0
func (r *FeeConfigurationResp) UnmarshalJSON(data []byte) error
type FeeConfigurationType ¶ added in v0.8.0
type FeeConfigurationType string
Discriminator: total fee specified in BPS.
const (
FeeConfigurationTypeTotalFeeBps FeeConfigurationType = "total_fee_bps"
)
type FeeLineItemUnion ¶ added in v0.8.0
type FeeLineItemUnion struct {
Amount string `json:"amount"`
// Any of "relayer", "privy", "developer".
Type string `json:"type"`
Recipient string `json:"recipient"`
JSON struct {
Amount respjson.Field
Type respjson.Field
Recipient respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
FeeLineItemUnion contains all possible properties and values from RelayerFee, PrivyFee, DeveloperFee.
Use the FeeLineItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (FeeLineItemUnion) AsAny ¶ added in v0.8.0
func (u FeeLineItemUnion) AsAny() anyFeeLineItem
Use the following switch statement to find the correct variant
switch variant := FeeLineItemUnion.AsAny().(type) {
case privyclient.RelayerFee:
case privyclient.PrivyFee:
case privyclient.DeveloperFee:
default:
fmt.Errorf("no variant present")
}
func (FeeLineItemUnion) AsDeveloper ¶ added in v0.8.0
func (u FeeLineItemUnion) AsDeveloper() (v DeveloperFee)
func (FeeLineItemUnion) AsPrivy ¶ added in v0.8.0
func (u FeeLineItemUnion) AsPrivy() (v PrivyFee)
func (FeeLineItemUnion) AsRelayer ¶ added in v0.8.0
func (u FeeLineItemUnion) AsRelayer() (v RelayerFee)
func (FeeLineItemUnion) RawJSON ¶ added in v0.8.0
func (u FeeLineItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*FeeLineItemUnion) UnmarshalJSON ¶ added in v0.8.0
func (r *FeeLineItemUnion) UnmarshalJSON(data []byte) error
type FirstClassChainType ¶ added in v0.11.0
type FirstClassChainType string
The wallet chain types that offer first class support.
const ( FirstClassChainTypeEthereum FirstClassChainType = "ethereum" FirstClassChainTypeSolana FirstClassChainType = "solana" )
type FundingConfigResponseSchema ¶ added in v0.4.0
type FundingConfigResponseSchema struct {
CrossChainBridgingEnabled bool `json:"cross_chain_bridging_enabled" api:"required"`
DefaultRecommendedAmount string `json:"default_recommended_amount" api:"required"`
// A crypto currency identified by a CAIP-2 chain ID and optional asset.
DefaultRecommendedCurrency Currency `json:"default_recommended_currency" api:"required"`
Methods []FundingMethodEnum `json:"methods" api:"required"`
Options []FundingOption `json:"options" api:"required"`
PromptFundingOnWalletCreation bool `json:"prompt_funding_on_wallet_creation" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CrossChainBridgingEnabled respjson.Field
DefaultRecommendedAmount respjson.Field
DefaultRecommendedCurrency respjson.Field
Methods respjson.Field
Options respjson.Field
PromptFundingOnWalletCreation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for funding and on-ramp options.
func (FundingConfigResponseSchema) RawJSON ¶ added in v0.4.0
func (r FundingConfigResponseSchema) RawJSON() string
Returns the unmodified JSON received from the API
func (*FundingConfigResponseSchema) UnmarshalJSON ¶ added in v0.4.0
func (r *FundingConfigResponseSchema) UnmarshalJSON(data []byte) error
type FundingMethodEnum ¶ added in v0.4.0
type FundingMethodEnum string
A funding method for on-ramp.
const ( FundingMethodEnumMoonpay FundingMethodEnum = "moonpay" FundingMethodEnumCoinbaseOnramp FundingMethodEnum = "coinbase-onramp" FundingMethodEnumExternal FundingMethodEnum = "external" )
type FundingOption ¶ added in v0.4.0
type FundingOption struct {
Method string `json:"method" api:"required"`
Provider string `json:"provider" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Provider respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A funding option with method and provider.
func (FundingOption) RawJSON ¶ added in v0.4.0
func (r FundingOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*FundingOption) UnmarshalJSON ¶ added in v0.4.0
func (r *FundingOption) UnmarshalJSON(data []byte) error
type FundingService ¶ added in v0.4.0
type FundingService struct {
Options []option.RequestOption
}
FundingService contains methods and other services that help with interacting with the Privy API 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 NewFundingService method instead.
func NewFundingService ¶ added in v0.4.0
func NewFundingService(opts ...option.RequestOption) (r FundingService)
NewFundingService 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 FundsDepositedWebhookPayload ¶ added in v0.7.0
type FundsDepositedWebhookPayload struct {
// The amount transferred, as a stringified bigint.
Amount string `json:"amount" api:"required"`
// An asset involved in a wallet transfer.
Asset WalletFundsAssetUnion `json:"asset" api:"required"`
// Block metadata for a wallet transfer event.
Block BlockInfo `json:"block" api:"required"`
// The CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// A unique key for this event.
IdempotencyKey string `json:"idempotency_key" api:"required"`
// The recipient address.
Recipient string `json:"recipient" api:"required"`
// The sender address.
Sender string `json:"sender" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The type of webhook event.
//
// Any of "wallet.funds_deposited".
Type FundsDepositedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet.
WalletID string `json:"wallet_id" api:"required"`
// Metadata about a Bridge transaction associated with a wallet event.
BridgeMetadata BridgeMetadataUnion `json:"bridge_metadata"`
// The transaction fee paid, as a stringified bigint in the chain's native token.
TransactionFee string `json:"transaction_fee"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Block respjson.Field
Caip2 respjson.Field
IdempotencyKey respjson.Field
Recipient respjson.Field
Sender respjson.Field
TransactionHash respjson.Field
Type respjson.Field
WalletID respjson.Field
BridgeMetadata respjson.Field
TransactionFee respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet.funds_deposited webhook event.
func (FundsDepositedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r FundsDepositedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*FundsDepositedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *FundsDepositedWebhookPayload) UnmarshalJSON(data []byte) error
type FundsDepositedWebhookPayloadType ¶ added in v0.7.0
type FundsDepositedWebhookPayloadType string
The type of webhook event.
const (
FundsDepositedWebhookPayloadTypeWalletFundsDeposited FundsDepositedWebhookPayloadType = "wallet.funds_deposited"
)
type FundsWithdrawnWebhookPayload ¶ added in v0.7.0
type FundsWithdrawnWebhookPayload struct {
// The amount transferred, as a stringified bigint.
Amount string `json:"amount" api:"required"`
// An asset involved in a wallet transfer.
Asset WalletFundsAssetUnion `json:"asset" api:"required"`
// Block metadata for a wallet transfer event.
Block BlockInfo `json:"block" api:"required"`
// The CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// A unique key for this event.
IdempotencyKey string `json:"idempotency_key" api:"required"`
// The recipient address.
Recipient string `json:"recipient" api:"required"`
// The sender address.
Sender string `json:"sender" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The type of webhook event.
//
// Any of "wallet.funds_withdrawn".
Type FundsWithdrawnWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet.
WalletID string `json:"wallet_id" api:"required"`
// The transaction fee paid, as a stringified bigint in the chain's native token.
TransactionFee string `json:"transaction_fee"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Asset respjson.Field
Block respjson.Field
Caip2 respjson.Field
IdempotencyKey respjson.Field
Recipient respjson.Field
Sender respjson.Field
TransactionHash respjson.Field
Type respjson.Field
WalletID respjson.Field
TransactionFee respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet.funds_withdrawn webhook event.
func (FundsWithdrawnWebhookPayload) RawJSON ¶ added in v0.7.0
func (r FundsWithdrawnWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*FundsWithdrawnWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *FundsWithdrawnWebhookPayload) UnmarshalJSON(data []byte) error
type FundsWithdrawnWebhookPayloadType ¶ added in v0.7.0
type FundsWithdrawnWebhookPayloadType string
The type of webhook event.
const (
FundsWithdrawnWebhookPayloadTypeWalletFundsWithdrawn FundsWithdrawnWebhookPayloadType = "wallet.funds_withdrawn"
)
type Gas ¶ added in v0.10.0
type Gas struct {
// Gas cost in the gas token as a human-readable decimal string (e.g. "0.0001").
Amount string `json:"amount" api:"required"`
// Gas cost in the gas token's base units (e.g. wei).
BaseAmount string `json:"base_amount" api:"required"`
// Gas token symbol (e.g. "ETH", "USDC").
GasAsset string `json:"gas_asset" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
BaseAmount respjson.Field
GasAsset respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Gas cost for a blockchain action. Includes both raw base-unit amount and a human-readable decimal string, plus the gas token symbol.
func (*Gas) UnmarshalJSON ¶ added in v0.10.0
type GasSpendCurrency ¶ added in v0.6.0
type GasSpendCurrency string
Currency for gas spend values.
const (
GasSpendCurrencyUsd GasSpendCurrency = "usd"
)
type GasSpendResponseBody ¶ added in v0.6.0
type GasSpendResponseBody struct {
// Currency for gas spend values.
//
// Any of "usd".
Currency GasSpendCurrency `json:"currency" api:"required"`
// Total Privy credits charged as a decimal string.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Currency respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Aggregated Privy gas credits charged for a set of wallets over a time range.
func (GasSpendResponseBody) RawJSON ¶ added in v0.6.0
func (r GasSpendResponseBody) RawJSON() string
Returns the unmodified JSON received from the API
func (*GasSpendResponseBody) UnmarshalJSON ¶ added in v0.6.0
func (r *GasSpendResponseBody) UnmarshalJSON(data []byte) error
type GetByWalletAddressRequestBody ¶ added in v0.6.0
type GetByWalletAddressRequestBody struct {
// A blockchain wallet address. Ethereum addresses are normalized to EIP-55
// checksum format. Solana addresses are validated as base58. All other chain
// addresses (Stellar, Tron, Sui, Aptos, etc.) are accepted as-is.
Address Address `json:"address" api:"required"`
// Include archived wallets in lookup. Defaults to false (archived wallets return
// 404).
IncludeArchived param.Opt[bool] `json:"include_archived,omitzero"`
// contains filtered or unexported fields
}
Request body for looking up a wallet by its blockchain address.
The property Address is required.
func (GetByWalletAddressRequestBody) MarshalJSON ¶ added in v0.6.0
func (r GetByWalletAddressRequestBody) MarshalJSON() (data []byte, err error)
func (*GetByWalletAddressRequestBody) UnmarshalJSON ¶ added in v0.6.0
func (r *GetByWalletAddressRequestBody) UnmarshalJSON(data []byte) error
type HDInitInput ¶ added in v0.6.0
type HDInitInput struct {
// The address of the wallet to import.
Address string `json:"address" api:"required"`
// The chain type of the wallet to import. Supports `ethereum`, `solana`,
// `stellar`, `tron`, `sui`, and `aptos`.
//
// Any of "ethereum", "solana", "stellar", "tron", "sui", "aptos".
ChainType WalletImportSupportedChains `json:"chain_type,omitzero" api:"required"`
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type,omitzero" api:"required"`
// The entropy type of the wallet to import.
//
// Any of "hd".
EntropyType HDInitInputEntropyType `json:"entropy_type,omitzero" api:"required"`
// The index of the wallet to import.
Index int64 `json:"index" api:"required"`
// contains filtered or unexported fields
}
The input for HD wallets.
The properties Address, ChainType, EncryptionType, EntropyType, Index are required.
func (HDInitInput) MarshalJSON ¶ added in v0.6.0
func (r HDInitInput) MarshalJSON() (data []byte, err error)
func (*HDInitInput) UnmarshalJSON ¶ added in v0.6.0
func (r *HDInitInput) UnmarshalJSON(data []byte) error
type HDInitInputEntropyType ¶ added in v0.6.0
type HDInitInputEntropyType string
The entropy type of the wallet to import.
const (
HDInitInputEntropyTypeHD HDInitInputEntropyType = "hd"
)
type HDSubmitInput ¶ added in v0.6.0
type HDSubmitInput struct {
// The address of the wallet to import.
Address string `json:"address" api:"required"`
// The chain type of the wallet to import. Supports `ethereum`, `solana`,
// `stellar`, `tron`, `sui`, and `aptos`.
//
// Any of "ethereum", "solana", "stellar", "tron", "sui", "aptos".
ChainType WalletImportSupportedChains `json:"chain_type,omitzero" api:"required"`
// The encrypted entropy of the wallet to import.
Ciphertext string `json:"ciphertext" api:"required"`
// The base64-encoded encapsulated key that was generated during encryption, for
// use during decryption inside the TEE.
EncapsulatedKey string `json:"encapsulated_key" api:"required"`
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type,omitzero" api:"required"`
// The entropy type of the wallet to import.
//
// Any of "hd".
EntropyType HDSubmitInputEntropyType `json:"entropy_type,omitzero" api:"required"`
// The index of the wallet to import.
Index int64 `json:"index" api:"required"`
// Optional HPKE configuration for wallet import decryption. These parameters allow
// importing wallets encrypted by external providers that use different HPKE
// configurations.
HpkeConfig HpkeImportConfig `json:"hpke_config,omitzero"`
// contains filtered or unexported fields
}
The submission input for importing an HD wallet.
The properties Address, ChainType, Ciphertext, EncapsulatedKey, EncryptionType, EntropyType, Index are required.
func (HDSubmitInput) MarshalJSON ¶ added in v0.6.0
func (r HDSubmitInput) MarshalJSON() (data []byte, err error)
func (*HDSubmitInput) UnmarshalJSON ¶ added in v0.6.0
func (r *HDSubmitInput) UnmarshalJSON(data []byte) error
type HDSubmitInputEntropyType ¶ added in v0.6.0
type HDSubmitInputEntropyType string
The entropy type of the wallet to import.
const (
HDSubmitInputEntropyTypeHD HDSubmitInputEntropyType = "hd"
)
type HpkeAeadAlgorithm ¶ added in v0.4.0
type HpkeAeadAlgorithm string
The AEAD algorithm used for HPKE encryption.
const ( HpkeAeadAlgorithmChacha20Poly1305 HpkeAeadAlgorithm = "CHACHA20_POLY1305" HpkeAeadAlgorithmAesGcm256 HpkeAeadAlgorithm = "AES_GCM256" )
type HpkeEncryption ¶ added in v0.4.0
type HpkeEncryption string
The encryption type of the wallet to import. Currently only supports `HPKE`.
const (
HpkeEncryptionHpke HpkeEncryption = "HPKE"
)
type HpkeImportConfig ¶ added in v0.0.4
type HpkeImportConfig struct {
// Additional Authenticated Data (AAD) used during encryption. Should be
// base64-encoded bytes.
Aad param.Opt[string] `json:"aad,omitzero"`
// Application-specific context information (INFO) used during HPKE encryption.
// Should be base64-encoded bytes.
Info param.Opt[string] `json:"info,omitzero"`
// The AEAD algorithm used for HPKE encryption.
//
// Any of "CHACHA20_POLY1305", "AES_GCM256".
AeadAlgorithm HpkeAeadAlgorithm `json:"aead_algorithm,omitzero"`
// contains filtered or unexported fields
}
Optional HPKE configuration for wallet import decryption. These parameters allow importing wallets encrypted by external providers that use different HPKE configurations.
func (HpkeImportConfig) MarshalJSON ¶ added in v0.0.4
func (r HpkeImportConfig) MarshalJSON() (data []byte, err error)
func (*HpkeImportConfig) UnmarshalJSON ¶ added in v0.0.4
func (r *HpkeImportConfig) UnmarshalJSON(data []byte) error
type IntentAuthorization ¶ added in v0.4.0
type IntentAuthorization struct {
// Members in this authorization quorum
Members []IntentAuthorizationMemberUnion `json:"members" api:"required"`
// Number of signatures required to satisfy this quorum
Threshold float64 `json:"threshold" api:"required"`
// Display name of the key quorum
DisplayName string `json:"display_name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Members respjson.Field
Threshold respjson.Field
DisplayName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Authorization quorum for an intent
func (IntentAuthorization) RawJSON ¶ added in v0.4.0
func (r IntentAuthorization) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorization) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentAuthorization) UnmarshalJSON(data []byte) error
type IntentAuthorizationKeyMember ¶ added in v0.11.0
type IntentAuthorizationKeyMember struct {
// Public key of the key quorum member
PublicKey string `json:"public_key" api:"required"`
// Unix timestamp when this member signed, or null if not yet signed.
SignedAt float64 `json:"signed_at" api:"required"`
// Any of "key".
Type IntentAuthorizationKeyMemberType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PublicKey respjson.Field
SignedAt respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key member of an intent authorization quorum.
func (IntentAuthorizationKeyMember) RawJSON ¶ added in v0.11.0
func (r IntentAuthorizationKeyMember) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorizationKeyMember) UnmarshalJSON ¶ added in v0.11.0
func (r *IntentAuthorizationKeyMember) UnmarshalJSON(data []byte) error
type IntentAuthorizationKeyMemberType ¶ added in v0.11.0
type IntentAuthorizationKeyMemberType string
const (
IntentAuthorizationKeyMemberTypeKey IntentAuthorizationKeyMemberType = "key"
)
type IntentAuthorizationKeyQuorum ¶ added in v0.11.0
type IntentAuthorizationKeyQuorum struct {
// ID of the child key quorum member
KeyQuorumID string `json:"key_quorum_id" api:"required"`
// Members of this child quorum
Members []IntentAuthorizationKeyQuorumMemberUnion `json:"members" api:"required"`
// Number of signatures required from this child quorum
Threshold float64 `json:"threshold" api:"required"`
// Whether this child key quorum has met its signature threshold
ThresholdMet bool `json:"threshold_met" api:"required"`
// Any of "key_quorum".
Type IntentAuthorizationKeyQuorumType `json:"type" api:"required"`
// Display name for the child key quorum (if any)
DisplayName string `json:"display_name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
KeyQuorumID respjson.Field
Members respjson.Field
Threshold respjson.Field
ThresholdMet respjson.Field
Type respjson.Field
DisplayName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A nested key quorum member of an intent authorization quorum.
func (IntentAuthorizationKeyQuorum) RawJSON ¶ added in v0.11.0
func (r IntentAuthorizationKeyQuorum) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorizationKeyQuorum) UnmarshalJSON ¶ added in v0.11.0
func (r *IntentAuthorizationKeyQuorum) UnmarshalJSON(data []byte) error
type IntentAuthorizationKeyQuorumMemberUnion ¶ added in v0.4.0
type IntentAuthorizationKeyQuorumMemberUnion struct {
SignedAt float64 `json:"signed_at"`
// Any of "user", "key".
Type string `json:"type"`
// This field is from variant [IntentAuthorizationUserMember].
UserID string `json:"user_id"`
// This field is from variant [IntentAuthorizationKeyMember].
PublicKey string `json:"public_key"`
JSON struct {
SignedAt respjson.Field
Type respjson.Field
UserID respjson.Field
PublicKey respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentAuthorizationKeyQuorumMemberUnion contains all possible properties and values from IntentAuthorizationUserMember, IntentAuthorizationKeyMember.
Use the IntentAuthorizationKeyQuorumMemberUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (IntentAuthorizationKeyQuorumMemberUnion) AsAny ¶ added in v0.11.0
func (u IntentAuthorizationKeyQuorumMemberUnion) AsAny() anyIntentAuthorizationKeyQuorumMember
Use the following switch statement to find the correct variant
switch variant := IntentAuthorizationKeyQuorumMemberUnion.AsAny().(type) {
case privyclient.IntentAuthorizationUserMember:
case privyclient.IntentAuthorizationKeyMember:
default:
fmt.Errorf("no variant present")
}
func (IntentAuthorizationKeyQuorumMemberUnion) AsKey ¶ added in v0.11.0
func (u IntentAuthorizationKeyQuorumMemberUnion) AsKey() (v IntentAuthorizationKeyMember)
func (IntentAuthorizationKeyQuorumMemberUnion) AsUser ¶ added in v0.11.0
func (u IntentAuthorizationKeyQuorumMemberUnion) AsUser() (v IntentAuthorizationUserMember)
func (IntentAuthorizationKeyQuorumMemberUnion) RawJSON ¶ added in v0.4.0
func (u IntentAuthorizationKeyQuorumMemberUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorizationKeyQuorumMemberUnion) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentAuthorizationKeyQuorumMemberUnion) UnmarshalJSON(data []byte) error
type IntentAuthorizationKeyQuorumType ¶ added in v0.11.0
type IntentAuthorizationKeyQuorumType string
const (
IntentAuthorizationKeyQuorumTypeKeyQuorum IntentAuthorizationKeyQuorumType = "key_quorum"
)
type IntentAuthorizationMemberUnion ¶ added in v0.4.0
type IntentAuthorizationMemberUnion struct {
SignedAt float64 `json:"signed_at"`
// Any of "user", "key", "key_quorum".
Type string `json:"type"`
// This field is from variant [IntentAuthorizationUserMember].
UserID string `json:"user_id"`
// This field is from variant [IntentAuthorizationKeyMember].
PublicKey string `json:"public_key"`
// This field is from variant [IntentAuthorizationKeyQuorum].
KeyQuorumID string `json:"key_quorum_id"`
// This field is from variant [IntentAuthorizationKeyQuorum].
Members []IntentAuthorizationKeyQuorumMemberUnion `json:"members"`
// This field is from variant [IntentAuthorizationKeyQuorum].
Threshold float64 `json:"threshold"`
// This field is from variant [IntentAuthorizationKeyQuorum].
ThresholdMet bool `json:"threshold_met"`
// This field is from variant [IntentAuthorizationKeyQuorum].
DisplayName string `json:"display_name"`
JSON struct {
SignedAt respjson.Field
Type respjson.Field
UserID respjson.Field
PublicKey respjson.Field
KeyQuorumID respjson.Field
Members respjson.Field
Threshold respjson.Field
ThresholdMet respjson.Field
DisplayName respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentAuthorizationMemberUnion contains all possible properties and values from IntentAuthorizationUserMember, IntentAuthorizationKeyMember, IntentAuthorizationKeyQuorum.
Use the IntentAuthorizationMemberUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (IntentAuthorizationMemberUnion) AsAny ¶ added in v0.11.0
func (u IntentAuthorizationMemberUnion) AsAny() anyIntentAuthorizationMember
Use the following switch statement to find the correct variant
switch variant := IntentAuthorizationMemberUnion.AsAny().(type) {
case privyclient.IntentAuthorizationUserMember:
case privyclient.IntentAuthorizationKeyMember:
case privyclient.IntentAuthorizationKeyQuorum:
default:
fmt.Errorf("no variant present")
}
func (IntentAuthorizationMemberUnion) AsKey ¶ added in v0.11.0
func (u IntentAuthorizationMemberUnion) AsKey() (v IntentAuthorizationKeyMember)
func (IntentAuthorizationMemberUnion) AsKeyQuorum ¶ added in v0.11.0
func (u IntentAuthorizationMemberUnion) AsKeyQuorum() (v IntentAuthorizationKeyQuorum)
func (IntentAuthorizationMemberUnion) AsUser ¶ added in v0.11.0
func (u IntentAuthorizationMemberUnion) AsUser() (v IntentAuthorizationUserMember)
func (IntentAuthorizationMemberUnion) RawJSON ¶ added in v0.4.0
func (u IntentAuthorizationMemberUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorizationMemberUnion) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentAuthorizationMemberUnion) UnmarshalJSON(data []byte) error
type IntentAuthorizationUserMember ¶ added in v0.11.0
type IntentAuthorizationUserMember struct {
// Unix timestamp when this member signed, or null if not yet signed.
SignedAt float64 `json:"signed_at" api:"required"`
// Any of "user".
Type IntentAuthorizationUserMemberType `json:"type" api:"required"`
// User ID of the key quorum member
UserID string `json:"user_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
SignedAt respjson.Field
Type respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A user member of an intent authorization quorum.
func (IntentAuthorizationUserMember) RawJSON ¶ added in v0.11.0
func (r IntentAuthorizationUserMember) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorizationUserMember) UnmarshalJSON ¶ added in v0.11.0
func (r *IntentAuthorizationUserMember) UnmarshalJSON(data []byte) error
type IntentAuthorizationUserMemberType ¶ added in v0.11.0
type IntentAuthorizationUserMemberType string
const (
IntentAuthorizationUserMemberTypeUser IntentAuthorizationUserMemberType = "user"
)
type IntentAuthorizedWebhookPayload ¶ added in v0.7.0
type IntentAuthorizedWebhookPayload struct {
// Unix timestamp when the authorization was recorded.
AuthorizedAt float64 `json:"authorized_at" api:"required"`
// Unix timestamp when the intent was created.
CreatedAt float64 `json:"created_at" api:"required"`
// Unix timestamp when the intent expires.
ExpiresAt float64 `json:"expires_at" api:"required"`
// The unique ID of the intent.
IntentID string `json:"intent_id" api:"required"`
// Type of intent.
//
// Any of "KEY_QUORUM", "POLICY", "RULE", "RPC", "TRANSFER", "WALLET".
IntentType IntentType `json:"intent_type" api:"required"`
// A leaf member (user or key) of a nested key quorum in an intent authorization.
Member IntentAuthorizationKeyQuorumMemberUnion `json:"member" api:"required"`
// The current status of the intent.
Status string `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "intent.authorized".
Type IntentAuthorizedWebhookPayloadType `json:"type" api:"required"`
// Display name of the user who created the intent.
CreatedByDisplayName string `json:"created_by_display_name"`
// The ID of the user who created the intent.
CreatedByID string `json:"created_by_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AuthorizedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
IntentType respjson.Field
Member respjson.Field
Status respjson.Field
Type respjson.Field
CreatedByDisplayName respjson.Field
CreatedByID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the intent.authorized webhook event.
func (IntentAuthorizedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r IntentAuthorizedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentAuthorizedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *IntentAuthorizedWebhookPayload) UnmarshalJSON(data []byte) error
type IntentAuthorizedWebhookPayloadType ¶ added in v0.7.0
type IntentAuthorizedWebhookPayloadType string
The type of webhook event.
const (
IntentAuthorizedWebhookPayloadTypeIntentAuthorized IntentAuthorizedWebhookPayloadType = "intent.authorized"
)
type IntentCreatedWebhookPayload ¶ added in v0.7.0
type IntentCreatedWebhookPayload struct {
// Unix timestamp when the intent was created.
CreatedAt float64 `json:"created_at" api:"required"`
// Unix timestamp when the intent expires.
ExpiresAt float64 `json:"expires_at" api:"required"`
// The unique ID of the intent.
IntentID string `json:"intent_id" api:"required"`
// Type of intent.
//
// Any of "KEY_QUORUM", "POLICY", "RULE", "RPC", "TRANSFER", "WALLET".
IntentType IntentType `json:"intent_type" api:"required"`
// The current status of the intent.
Status string `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "intent.created".
Type IntentCreatedWebhookPayloadType `json:"type" api:"required"`
// Key quorums that can authorize this intent.
AuthorizationDetails []IntentAuthorization `json:"authorization_details"`
// Display name of the user who created the intent.
CreatedByDisplayName string `json:"created_by_display_name"`
// The ID of the user who created the intent.
CreatedByID string `json:"created_by_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreatedAt respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
IntentType respjson.Field
Status respjson.Field
Type respjson.Field
AuthorizationDetails respjson.Field
CreatedByDisplayName respjson.Field
CreatedByID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the intent.created webhook event.
func (IntentCreatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r IntentCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *IntentCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type IntentCreatedWebhookPayloadType ¶ added in v0.7.0
type IntentCreatedWebhookPayloadType string
The type of webhook event.
const (
IntentCreatedWebhookPayloadTypeIntentCreated IntentCreatedWebhookPayloadType = "intent.created"
)
type IntentDeletePolicyRuleParams ¶ added in v0.4.0
type IntentDeletePolicyRuleParams struct {
// ID of the policy.
PolicyID string `path:"policy_id" api:"required" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
type IntentExecutedWebhookPayload ¶ added in v0.7.0
type IntentExecutedWebhookPayload struct {
// Result of the successful intent execution.
ActionResult BaseActionResult `json:"action_result" api:"required"`
// Unix timestamp when the intent was created.
CreatedAt float64 `json:"created_at" api:"required"`
// Unix timestamp when the intent expires.
ExpiresAt float64 `json:"expires_at" api:"required"`
// The unique ID of the intent.
IntentID string `json:"intent_id" api:"required"`
// Type of intent.
//
// Any of "KEY_QUORUM", "POLICY", "RULE", "RPC", "TRANSFER", "WALLET".
IntentType IntentType `json:"intent_type" api:"required"`
// The current status of the intent.
Status string `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "intent.executed".
Type IntentExecutedWebhookPayloadType `json:"type" api:"required"`
// Display name of the user who created the intent.
CreatedByDisplayName string `json:"created_by_display_name"`
// The ID of the user who created the intent.
CreatedByID string `json:"created_by_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionResult respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
IntentType respjson.Field
Status respjson.Field
Type respjson.Field
CreatedByDisplayName respjson.Field
CreatedByID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the intent.executed webhook event.
func (IntentExecutedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r IntentExecutedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentExecutedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *IntentExecutedWebhookPayload) UnmarshalJSON(data []byte) error
type IntentExecutedWebhookPayloadType ¶ added in v0.7.0
type IntentExecutedWebhookPayloadType string
The type of webhook event.
const (
IntentExecutedWebhookPayloadTypeIntentExecuted IntentExecutedWebhookPayloadType = "intent.executed"
)
type IntentFailedWebhookPayload ¶ added in v0.7.0
type IntentFailedWebhookPayload struct {
// Result of the failed intent execution.
ActionResult BaseActionResult `json:"action_result" api:"required"`
// Unix timestamp when the intent was created.
CreatedAt float64 `json:"created_at" api:"required"`
// Unix timestamp when the intent expires.
ExpiresAt float64 `json:"expires_at" api:"required"`
// The unique ID of the intent.
IntentID string `json:"intent_id" api:"required"`
// Type of intent.
//
// Any of "KEY_QUORUM", "POLICY", "RULE", "RPC", "TRANSFER", "WALLET".
IntentType IntentType `json:"intent_type" api:"required"`
// The current status of the intent.
Status string `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "intent.failed".
Type IntentFailedWebhookPayloadType `json:"type" api:"required"`
// Display name of the user who created the intent.
CreatedByDisplayName string `json:"created_by_display_name"`
// The ID of the user who created the intent.
CreatedByID string `json:"created_by_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionResult respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
IntentType respjson.Field
Status respjson.Field
Type respjson.Field
CreatedByDisplayName respjson.Field
CreatedByID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the intent.failed webhook event.
func (IntentFailedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r IntentFailedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentFailedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *IntentFailedWebhookPayload) UnmarshalJSON(data []byte) error
type IntentFailedWebhookPayloadType ¶ added in v0.7.0
type IntentFailedWebhookPayloadType string
The type of webhook event.
const (
IntentFailedWebhookPayloadTypeIntentFailed IntentFailedWebhookPayloadType = "intent.failed"
)
type IntentListParams ¶ added in v0.4.0
type IntentListParams struct {
Limit param.Opt[float64] `query:"limit,omitzero" json:"-"`
CreatedByID param.Opt[string] `query:"created_by_id,omitzero" json:"-"`
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
PendingMemberID param.Opt[string] `query:"pending_member_id,omitzero" json:"-"`
ResourceID param.Opt[string] `query:"resource_id,omitzero" json:"-"`
// Any of "true", "false".
CurrentUserHasSigned IntentListParamsCurrentUserHasSigned `query:"current_user_has_signed,omitzero" json:"-"`
// Type of intent.
//
// Any of "KEY_QUORUM", "POLICY", "RULE", "RPC", "TRANSFER", "WALLET".
IntentType IntentType `query:"intent_type,omitzero" json:"-"`
// Any of "created_at_desc", "expires_at_asc", "updated_at_desc".
SortBy IntentListParamsSortBy `query:"sort_by,omitzero" json:"-"`
// Current status of an intent.
//
// Any of "pending", "processing", "executed", "failed", "expired", "rejected",
// "dismissed".
Status IntentStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentListParams) URLQuery ¶ added in v0.4.0
func (r IntentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes IntentListParams's query parameters as `url.Values`.
type IntentListParamsCurrentUserHasSigned ¶ added in v0.4.0
type IntentListParamsCurrentUserHasSigned string
const ( IntentListParamsCurrentUserHasSignedTrue IntentListParamsCurrentUserHasSigned = "true" IntentListParamsCurrentUserHasSignedFalse IntentListParamsCurrentUserHasSigned = "false" )
type IntentListParamsSortBy ¶ added in v0.4.0
type IntentListParamsSortBy string
const ( IntentListParamsSortByCreatedAtDesc IntentListParamsSortBy = "created_at_desc" IntentListParamsSortByExpiresAtAsc IntentListParamsSortBy = "expires_at_asc" IntentListParamsSortByUpdatedAtDesc IntentListParamsSortBy = "updated_at_desc" )
type IntentNewPolicyRuleParams ¶ added in v0.4.0
type IntentNewPolicyRuleParams struct {
// The rules that apply to each method the policy covers.
PolicyRuleRequestBody PolicyRuleRequestBody
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentNewPolicyRuleParams) MarshalJSON ¶ added in v0.4.0
func (r IntentNewPolicyRuleParams) MarshalJSON() (data []byte, err error)
func (*IntentNewPolicyRuleParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentNewPolicyRuleParams) UnmarshalJSON(data []byte) error
type IntentRejectedWebhookPayload ¶ added in v0.8.0
type IntentRejectedWebhookPayload struct {
// Unix timestamp when the intent was created.
CreatedAt float64 `json:"created_at" api:"required"`
// Unix timestamp when the intent expires.
ExpiresAt float64 `json:"expires_at" api:"required"`
// The unique ID of the intent.
IntentID string `json:"intent_id" api:"required"`
// Type of intent.
//
// Any of "KEY_QUORUM", "POLICY", "RULE", "RPC", "TRANSFER", "WALLET".
IntentType IntentType `json:"intent_type" api:"required"`
// Unix timestamp when the intent was rejected.
RejectedAt float64 `json:"rejected_at" api:"required"`
// The current status of the intent.
Status string `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "intent.rejected".
Type IntentRejectedWebhookPayloadType `json:"type" api:"required"`
// Display name of the user who created the intent.
CreatedByDisplayName string `json:"created_by_display_name"`
// The ID of the user who created the intent.
CreatedByID string `json:"created_by_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreatedAt respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
IntentType respjson.Field
RejectedAt respjson.Field
Status respjson.Field
Type respjson.Field
CreatedByDisplayName respjson.Field
CreatedByID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the intent.rejected webhook event.
func (IntentRejectedWebhookPayload) RawJSON ¶ added in v0.8.0
func (r IntentRejectedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentRejectedWebhookPayload) UnmarshalJSON ¶ added in v0.8.0
func (r *IntentRejectedWebhookPayload) UnmarshalJSON(data []byte) error
type IntentRejectedWebhookPayloadType ¶ added in v0.8.0
type IntentRejectedWebhookPayloadType string
The type of webhook event.
const (
IntentRejectedWebhookPayloadTypeIntentRejected IntentRejectedWebhookPayloadType = "intent.rejected"
)
type IntentResponseUnion ¶ added in v0.4.0
type IntentResponseUnion struct {
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
AuthorizationDetails []IntentAuthorization `json:"authorization_details"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
CreatedAt float64 `json:"created_at"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
CreatedByDisplayName string `json:"created_by_display_name"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
CustomExpiry bool `json:"custom_expiry"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
ExpiresAt float64 `json:"expires_at"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
IntentID string `json:"intent_id"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
ResourceID string `json:"resource_id"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
Status IntentStatus `json:"status"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
CreatedByID string `json:"created_by_id"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
DismissalReason string `json:"dismissal_reason"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
DismissedAt float64 `json:"dismissed_at"`
// This field is from variant [RpcIntentResponse], [TransferIntentResponse],
// [WalletIntentResponse], [PolicyIntentResponse], [RuleIntentResponse],
// [KeyQuorumIntentResponse].
RejectedAt float64 `json:"rejected_at"`
// Any of "RPC", "TRANSFER", "WALLET", "POLICY", "RULE", "KEY_QUORUM".
IntentType string `json:"intent_type"`
// This field is a union of [RpcIntentResponseRequestDetails],
// [TransferIntentResponseRequestDetails], [WalletIntentResponseRequestDetails],
// [PolicyIntentResponseRequestDetails], [RuleIntentRequestDetailsUnion],
// [KeyQuorumIntentResponseRequestDetails]
RequestDetails IntentResponseUnionRequestDetails `json:"request_details"`
// This field is from variant [RpcIntentResponse].
ActionResult BaseActionResult `json:"action_result"`
// This field is a union of [Wallet], [Policy], [PolicyRuleResponse], [KeyQuorum]
CurrentResourceData IntentResponseUnionCurrentResourceData `json:"current_resource_data"`
// This field is from variant [RuleIntentResponse].
Policy Policy `json:"policy"`
JSON struct {
AuthorizationDetails respjson.Field
CreatedAt respjson.Field
CreatedByDisplayName respjson.Field
CustomExpiry respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
ResourceID respjson.Field
Status respjson.Field
CreatedByID respjson.Field
DismissalReason respjson.Field
DismissedAt respjson.Field
RejectedAt respjson.Field
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
Policy respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnion contains all possible properties and values from RpcIntentResponse, TransferIntentResponse, WalletIntentResponse, PolicyIntentResponse, RuleIntentResponse, KeyQuorumIntentResponse.
Use the IntentResponseUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (IntentResponseUnion) AsAny ¶ added in v0.4.0
func (u IntentResponseUnion) AsAny() anyIntentResponse
Use the following switch statement to find the correct variant
switch variant := IntentResponseUnion.AsAny().(type) {
case privyclient.RpcIntentResponse:
case privyclient.TransferIntentResponse:
case privyclient.WalletIntentResponse:
case privyclient.PolicyIntentResponse:
case privyclient.RuleIntentResponse:
case privyclient.KeyQuorumIntentResponse:
default:
fmt.Errorf("no variant present")
}
func (IntentResponseUnion) AsKeyQuorum ¶ added in v0.4.0
func (u IntentResponseUnion) AsKeyQuorum() (v KeyQuorumIntentResponse)
func (IntentResponseUnion) AsPolicy ¶ added in v0.4.0
func (u IntentResponseUnion) AsPolicy() (v PolicyIntentResponse)
func (IntentResponseUnion) AsRpc ¶ added in v0.4.0
func (u IntentResponseUnion) AsRpc() (v RpcIntentResponse)
func (IntentResponseUnion) AsRule ¶ added in v0.4.0
func (u IntentResponseUnion) AsRule() (v RuleIntentResponse)
func (IntentResponseUnion) AsTransfer ¶ added in v0.5.0
func (u IntentResponseUnion) AsTransfer() (v TransferIntentResponse)
func (IntentResponseUnion) AsWallet ¶ added in v0.4.0
func (u IntentResponseUnion) AsWallet() (v WalletIntentResponse)
func (IntentResponseUnion) RawJSON ¶ added in v0.4.0
func (u IntentResponseUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntentResponseUnion) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentResponseUnion) UnmarshalJSON(data []byte) error
type IntentResponseUnionCurrentResourceData ¶ added in v0.4.0
type IntentResponseUnionCurrentResourceData struct {
ID string `json:"id"`
// This field is from variant [Wallet].
AdditionalSigners WalletAdditionalSigner `json:"additional_signers"`
// This field is from variant [Wallet].
Address string `json:"address"`
// This field is from variant [Wallet].
ChainType WalletChainType `json:"chain_type"`
CreatedAt float64 `json:"created_at"`
// This field is from variant [Wallet].
ExportedAt float64 `json:"exported_at"`
// This field is from variant [Wallet].
ImportedAt float64 `json:"imported_at"`
OwnerID string `json:"owner_id"`
// This field is from variant [Wallet].
PolicyIDs []string `json:"policy_ids"`
// This field is from variant [Wallet].
ArchivedAt float64 `json:"archived_at"`
AuthorizationThreshold float64 `json:"authorization_threshold"`
// This field is from variant [Wallet].
Custody WalletCustodian `json:"custody"`
DisplayName string `json:"display_name"`
// This field is from variant [Wallet].
ExternalID string `json:"external_id"`
// This field is from variant [Wallet].
PublicKey string `json:"public_key"`
Name string `json:"name"`
// This field is from variant [Policy].
Rules []PolicyRuleResponse `json:"rules"`
// This field is from variant [Policy].
Version PolicyVersion `json:"version"`
// This field is from variant [PolicyRuleResponse].
Action PolicyAction `json:"action"`
// This field is from variant [PolicyRuleResponse].
Conditions []PolicyConditionUnionResp `json:"conditions"`
// This field is from variant [PolicyRuleResponse].
Method PolicyMethod `json:"method"`
// This field is from variant [KeyQuorum].
AuthorizationKeys []AuthorizationKey `json:"authorization_keys"`
// This field is from variant [KeyQuorum].
UserIDs []string `json:"user_ids"`
// This field is from variant [KeyQuorum].
KeyQuorumIDs []string `json:"key_quorum_ids"`
JSON struct {
ID respjson.Field
AdditionalSigners respjson.Field
Address respjson.Field
ChainType respjson.Field
CreatedAt respjson.Field
ExportedAt respjson.Field
ImportedAt respjson.Field
OwnerID respjson.Field
PolicyIDs respjson.Field
ArchivedAt respjson.Field
AuthorizationThreshold respjson.Field
Custody respjson.Field
DisplayName respjson.Field
ExternalID respjson.Field
PublicKey respjson.Field
Name respjson.Field
Rules respjson.Field
Version respjson.Field
Action respjson.Field
Conditions respjson.Field
Method respjson.Field
AuthorizationKeys respjson.Field
UserIDs respjson.Field
KeyQuorumIDs respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnionCurrentResourceData is an implicit subunion of IntentResponseUnion. IntentResponseUnionCurrentResourceData provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the IntentResponseUnion.
func (*IntentResponseUnionCurrentResourceData) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentResponseUnionCurrentResourceData) UnmarshalJSON(data []byte) error
type IntentResponseUnionRequestDetails ¶ added in v0.4.0
type IntentResponseUnionRequestDetails struct {
// This field is a union of [WalletRpcRequestBodyUnionResp],
// [TransferRequestBodyResp], [WalletIntentResponseRequestDetailsBody],
// [PolicyIntentResponseRequestDetailsBody], [PolicyRuleRequestBodyResp],
// [RuleIntentDeleteRequestBody], [KeyQuorumUpdateRequestBodyResp]
Body IntentResponseUnionRequestDetailsBody `json:"body"`
Method string `json:"method"`
URL string `json:"url"`
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnionRequestDetails is an implicit subunion of IntentResponseUnion. IntentResponseUnionRequestDetails provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the IntentResponseUnion.
func (*IntentResponseUnionRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentResponseUnionRequestDetails) UnmarshalJSON(data []byte) error
type IntentResponseUnionRequestDetailsBody ¶ added in v0.4.0
type IntentResponseUnionRequestDetailsBody struct {
Method string `json:"method"`
// This field is a union of [EthereumSignTransactionRpcInputParamsResp],
// [EthereumSendTransactionRpcInputParamsResp],
// [EthereumPersonalSignRpcInputParamsResp],
// [EthereumSignTypedDataRpcInputParamsResp],
// [EthereumSecp256k1SignRpcInputParamsResp],
// [EthereumSign7702AuthorizationRpcInputParamsResp],
// [EthereumSignUserOperationRpcInputParamsResp],
// [EthereumSendCallsRpcInputParamsResp],
// [SolanaSignTransactionRpcInputParamsResp],
// [SolanaSignAndSendTransactionRpcInputParamsResp],
// [SolanaSignMessageRpcInputParamsResp], [SparkTransferRpcInputParamsResp],
// [SparkTransferTokensRpcInputParamsResp],
// [SparkGetClaimStaticDepositQuoteRpcInputParamsResp],
// [SparkClaimStaticDepositRpcInputParamsResp],
// [SparkCreateLightningInvoiceRpcInputParamsResp],
// [SparkPayLightningInvoiceRpcInputParamsResp],
// [SparkSignMessageWithIdentityKeyRpcInputParamsResp],
// [SparkWithdrawRpcInputParamsResp],
// [SparkGetWithdrawalFeeQuoteRpcInputParamsResp],
// [TronSignTransactionRpcInputParamsResp],
// [TronSendTransactionRpcInputParamsResp], [PrivateKeyExportInputResp],
// [SeedPhraseExportInputResp]
Params IntentResponseUnionRequestDetailsBodyParams `json:"params"`
Address string `json:"address"`
ChainType string `json:"chain_type"`
WalletID string `json:"wallet_id"`
// This field is from variant [WalletRpcRequestBodyUnionResp].
Caip2 Caip2 `json:"caip2"`
// This field is from variant [WalletRpcRequestBodyUnionResp].
ExperimentalDataSuffix Hex `json:"experimental_data_suffix"`
ReferenceID string `json:"reference_id"`
Sponsor bool `json:"sponsor"`
// This field is from variant [WalletRpcRequestBodyUnionResp].
SignatureOptions SignatureOptionsResp `json:"signature_options"`
// This field is from variant [WalletRpcRequestBodyUnionResp].
OptimisticBroadcast bool `json:"optimistic_broadcast"`
// This field is from variant [WalletRpcRequestBodyUnionResp].
Network SparkNetwork `json:"network"`
// This field is from variant [TransferRequestBodyResp].
Destination TokenTransferDestinationResp `json:"destination"`
// This field is from variant [TransferRequestBodyResp].
Source TokenTransferSourceUnionResp `json:"source"`
// This field is from variant [TransferRequestBodyResp].
Amount string `json:"amount"`
// This field is from variant [TransferRequestBodyResp].
AmountType AmountType `json:"amount_type"`
// This field is from variant [TransferRequestBodyResp].
FeeConfiguration FeeConfigurationResp `json:"fee_configuration"`
// This field is from variant [TransferRequestBodyResp].
SlippageBps int64 `json:"slippage_bps"`
// This field is from variant [WalletIntentResponseRequestDetailsBody].
AdditionalSigners AdditionalSignerInputResp `json:"additional_signers"`
// This field is from variant [WalletIntentResponseRequestDetailsBody].
AuthorizationKeyIDs []string `json:"authorization_key_ids"`
AuthorizationThreshold float64 `json:"authorization_threshold"`
DisplayName string `json:"display_name"`
// This field is from variant [WalletIntentResponseRequestDetailsBody].
Owner OwnerInputUnionResp `json:"owner"`
// This field is from variant [WalletIntentResponseRequestDetailsBody].
OwnerID OwnerIDInput `json:"owner_id"`
// This field is from variant [WalletIntentResponseRequestDetailsBody].
PolicyIDs PolicyInput `json:"policy_ids"`
Name string `json:"name"`
// This field is from variant [PolicyIntentResponseRequestDetailsBody].
Rules []PolicyRuleRequestBodyResp `json:"rules"`
// This field is from variant [PolicyRuleRequestBodyResp].
Action PolicyAction `json:"action"`
// This field is from variant [PolicyRuleRequestBodyResp].
Conditions []PolicyConditionUnionResp `json:"conditions"`
// This field is from variant [KeyQuorumUpdateRequestBodyResp].
KeyQuorumIDs []string `json:"key_quorum_ids"`
// This field is from variant [KeyQuorumUpdateRequestBodyResp].
PublicKeys []string `json:"public_keys"`
// This field is from variant [KeyQuorumUpdateRequestBodyResp].
UserIDs []string `json:"user_ids"`
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
Caip2 respjson.Field
ExperimentalDataSuffix respjson.Field
ReferenceID respjson.Field
Sponsor respjson.Field
SignatureOptions respjson.Field
OptimisticBroadcast respjson.Field
Network respjson.Field
Destination respjson.Field
Source respjson.Field
Amount respjson.Field
AmountType respjson.Field
FeeConfiguration respjson.Field
SlippageBps respjson.Field
AdditionalSigners respjson.Field
AuthorizationKeyIDs respjson.Field
AuthorizationThreshold respjson.Field
DisplayName respjson.Field
Owner respjson.Field
OwnerID respjson.Field
PolicyIDs respjson.Field
Name respjson.Field
Rules respjson.Field
Action respjson.Field
Conditions respjson.Field
KeyQuorumIDs respjson.Field
PublicKeys respjson.Field
UserIDs respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnionRequestDetailsBody is an implicit subunion of IntentResponseUnion. IntentResponseUnionRequestDetailsBody provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the IntentResponseUnion.
func (*IntentResponseUnionRequestDetailsBody) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentResponseUnionRequestDetailsBody) UnmarshalJSON(data []byte) error
type IntentResponseUnionRequestDetailsBodyParams ¶ added in v0.4.0
type IntentResponseUnionRequestDetailsBodyParams struct {
// This field is a union of [UnsignedEthereumTransactionUnionResp], [string],
// [string]
Transaction IntentResponseUnionRequestDetailsBodyParamsTransaction `json:"transaction"`
Encoding string `json:"encoding"`
Message string `json:"message"`
// This field is from variant [EthereumSignTypedDataRpcInputParamsResp].
TypedData EthereumTypedDataInputResp `json:"typed_data"`
// This field is from variant [EthereumSecp256k1SignRpcInputParamsResp].
Hash Hex `json:"hash"`
// This field is from variant [EthereumSign7702AuthorizationRpcInputParamsResp].
ChainID QuantityUnionResp `json:"chain_id"`
Contract string `json:"contract"`
// This field is from variant [EthereumSign7702AuthorizationRpcInputParamsResp].
Executor EthereumSign7702AuthorizationRpcInputParamsExecutor `json:"executor"`
// This field is from variant [EthereumSign7702AuthorizationRpcInputParamsResp].
Nonce QuantityUnionResp `json:"nonce"`
// This field is from variant [EthereumSignUserOperationRpcInputParamsResp].
UserOperation UserOperationInputResp `json:"user_operation"`
// This field is from variant [EthereumSendCallsRpcInputParamsResp].
Calls []EthereumSendCallsCallResp `json:"calls"`
AmountSats float64 `json:"amount_sats"`
ReceiverSparkAddress string `json:"receiver_spark_address"`
// This field is from variant [SparkTransferTokensRpcInputParamsResp].
TokenAmount float64 `json:"token_amount"`
// This field is from variant [SparkTransferTokensRpcInputParamsResp].
TokenIdentifier string `json:"token_identifier"`
// This field is from variant [SparkTransferTokensRpcInputParamsResp].
OutputSelectionStrategy SparkOutputSelectionStrategy `json:"output_selection_strategy"`
// This field is from variant [SparkTransferTokensRpcInputParamsResp].
SelectedOutputs []OutputWithPreviousTransactionDataResp `json:"selected_outputs"`
TransactionID string `json:"transaction_id"`
OutputIndex float64 `json:"output_index"`
// This field is from variant [SparkClaimStaticDepositRpcInputParamsResp].
CreditAmountSats float64 `json:"credit_amount_sats"`
// This field is from variant [SparkClaimStaticDepositRpcInputParamsResp].
Signature string `json:"signature"`
// This field is from variant [SparkCreateLightningInvoiceRpcInputParamsResp].
DescriptionHash string `json:"description_hash"`
// This field is from variant [SparkCreateLightningInvoiceRpcInputParamsResp].
ExpirySeconds float64 `json:"expiry_seconds"`
// This field is from variant [SparkCreateLightningInvoiceRpcInputParamsResp].
IncludeSparkAddress bool `json:"include_spark_address"`
// This field is from variant [SparkCreateLightningInvoiceRpcInputParamsResp].
Memo string `json:"memo"`
// This field is from variant [SparkCreateLightningInvoiceRpcInputParamsResp].
ReceiverIdentityPubkey string `json:"receiver_identity_pubkey"`
// This field is from variant [SparkPayLightningInvoiceRpcInputParamsResp].
Invoice string `json:"invoice"`
// This field is from variant [SparkPayLightningInvoiceRpcInputParamsResp].
MaxFeeSats float64 `json:"max_fee_sats"`
// This field is from variant [SparkPayLightningInvoiceRpcInputParamsResp].
AmountSatsToSend float64 `json:"amount_sats_to_send"`
// This field is from variant [SparkPayLightningInvoiceRpcInputParamsResp].
PreferSpark bool `json:"prefer_spark"`
// This field is from variant [SparkSignMessageWithIdentityKeyRpcInputParamsResp].
Compact bool `json:"compact"`
// This field is from variant [SparkWithdrawRpcInputParamsResp].
ExitSpeed SparkExitSpeed `json:"exit_speed"`
OnchainAddress string `json:"onchain_address"`
// This field is from variant [SparkWithdrawRpcInputParamsResp].
DeductFeeFromWithdrawalAmount bool `json:"deduct_fee_from_withdrawal_amount"`
// This field is from variant [SparkWithdrawRpcInputParamsResp].
FeeAmountSats float64 `json:"fee_amount_sats"`
// This field is from variant [SparkWithdrawRpcInputParamsResp].
FeeQuoteID string `json:"fee_quote_id"`
// This field is a union of [TronRawDataForSignResp], [TronRawDataForSendResp]
RawData IntentResponseUnionRequestDetailsBodyParamsRawData `json:"raw_data"`
// This field is from variant [TronSendTransactionRpcInputParamsResp].
ReferenceID string `json:"reference_id"`
// This field is from variant [PrivateKeyExportInputResp].
EncryptionType HpkeEncryption `json:"encryption_type"`
// This field is from variant [PrivateKeyExportInputResp].
RecipientPublicKey RecipientPublicKey `json:"recipient_public_key"`
ExportSeedPhrase bool `json:"export_seed_phrase"`
// This field is from variant [PrivateKeyExportInputResp].
ExportType ExportType `json:"export_type"`
JSON struct {
Transaction respjson.Field
Encoding respjson.Field
Message respjson.Field
TypedData respjson.Field
Hash respjson.Field
ChainID respjson.Field
Contract respjson.Field
Executor respjson.Field
Nonce respjson.Field
UserOperation respjson.Field
Calls respjson.Field
AmountSats respjson.Field
ReceiverSparkAddress respjson.Field
TokenAmount respjson.Field
TokenIdentifier respjson.Field
OutputSelectionStrategy respjson.Field
SelectedOutputs respjson.Field
TransactionID respjson.Field
OutputIndex respjson.Field
CreditAmountSats respjson.Field
Signature respjson.Field
DescriptionHash respjson.Field
ExpirySeconds respjson.Field
IncludeSparkAddress respjson.Field
Memo respjson.Field
ReceiverIdentityPubkey respjson.Field
Invoice respjson.Field
MaxFeeSats respjson.Field
AmountSatsToSend respjson.Field
PreferSpark respjson.Field
Compact respjson.Field
ExitSpeed respjson.Field
OnchainAddress respjson.Field
DeductFeeFromWithdrawalAmount respjson.Field
FeeAmountSats respjson.Field
FeeQuoteID respjson.Field
RawData respjson.Field
ReferenceID respjson.Field
EncryptionType respjson.Field
RecipientPublicKey respjson.Field
ExportSeedPhrase respjson.Field
ExportType respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnionRequestDetailsBodyParams is an implicit subunion of IntentResponseUnion. IntentResponseUnionRequestDetailsBodyParams provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the IntentResponseUnion.
func (*IntentResponseUnionRequestDetailsBodyParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentResponseUnionRequestDetailsBodyParams) UnmarshalJSON(data []byte) error
type IntentResponseUnionRequestDetailsBodyParamsRawData ¶ added in v0.11.0
type IntentResponseUnionRequestDetailsBodyParamsRawData struct {
Contract []TronContractUnionResp `json:"contract"`
Expiration int64 `json:"expiration"`
RefBlockBytes string `json:"ref_block_bytes"`
RefBlockHash string `json:"ref_block_hash"`
Data string `json:"data"`
FeeLimit int64 `json:"fee_limit"`
Timestamp int64 `json:"timestamp"`
JSON struct {
Contract respjson.Field
Expiration respjson.Field
RefBlockBytes respjson.Field
RefBlockHash respjson.Field
Data respjson.Field
FeeLimit respjson.Field
Timestamp respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnionRequestDetailsBodyParamsRawData is an implicit subunion of IntentResponseUnion. IntentResponseUnionRequestDetailsBodyParamsRawData provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the IntentResponseUnion.
func (*IntentResponseUnionRequestDetailsBodyParamsRawData) UnmarshalJSON ¶ added in v0.11.0
func (r *IntentResponseUnionRequestDetailsBodyParamsRawData) UnmarshalJSON(data []byte) error
type IntentResponseUnionRequestDetailsBodyParamsTransaction ¶ added in v0.4.0
type IntentResponseUnionRequestDetailsBodyParamsTransaction struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
AuthorizationList []EthereumSign7702AuthorizationResp `json:"authorization_list"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
ChainID QuantityUnionResp `json:"chain_id"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
Data Hex `json:"data"`
From string `json:"from"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
GasLimit QuantityUnionResp `json:"gas_limit"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
GasPrice QuantityUnionResp `json:"gas_price"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
MaxFeePerGas QuantityUnionResp `json:"max_fee_per_gas"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
MaxPriorityFeePerGas QuantityUnionResp `json:"max_priority_fee_per_gas"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
Nonce QuantityUnionResp `json:"nonce"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
To string `json:"to"`
Type float64 `json:"type"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
Value QuantityUnionResp `json:"value"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
Calls []TempoCallResp `json:"calls"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
AaAuthorizationList []TempoAaAuthorizationResp `json:"aa_authorization_list"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
AccessList []AccessListEntryResp `json:"access_list"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
FeePayerSignature TempoFeePayerSignatureResp `json:"fee_payer_signature"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
FeeToken string `json:"fee_token"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
NonceKey QuantityUnionResp `json:"nonce_key"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
ValidAfter QuantityUnionResp `json:"valid_after"`
// This field is from variant [UnsignedEthereumTransactionUnionResp].
ValidBefore QuantityUnionResp `json:"valid_before"`
JSON struct {
OfString respjson.Field
AuthorizationList respjson.Field
ChainID respjson.Field
Data respjson.Field
From respjson.Field
GasLimit respjson.Field
GasPrice respjson.Field
MaxFeePerGas respjson.Field
MaxPriorityFeePerGas respjson.Field
Nonce respjson.Field
To respjson.Field
Type respjson.Field
Value respjson.Field
Calls respjson.Field
AaAuthorizationList respjson.Field
AccessList respjson.Field
FeePayerSignature respjson.Field
FeeToken respjson.Field
NonceKey respjson.Field
ValidAfter respjson.Field
ValidBefore respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
IntentResponseUnionRequestDetailsBodyParamsTransaction is an implicit subunion of IntentResponseUnion. IntentResponseUnionRequestDetailsBodyParamsTransaction provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the IntentResponseUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString]
func (*IntentResponseUnionRequestDetailsBodyParamsTransaction) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentResponseUnionRequestDetailsBodyParamsTransaction) UnmarshalJSON(data []byte) error
type IntentRpcParams ¶ added in v0.4.0
type IntentRpcParams struct {
// Request body for wallet RPC operations, discriminated by method.
WalletRpcRequestBody WalletRpcRequestBodyUnion
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentRpcParams) MarshalJSON ¶ added in v0.4.0
func (r IntentRpcParams) MarshalJSON() (data []byte, err error)
func (*IntentRpcParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentRpcParams) UnmarshalJSON(data []byte) error
type IntentService ¶ added in v0.2.0
type IntentService struct {
Options []option.RequestOption
}
Operations related to authorization intents for wallet actions
IntentService contains methods and other services that help with interacting with the Privy API 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 NewIntentService method instead.
func NewIntentService ¶ added in v0.2.0
func NewIntentService(opts ...option.RequestOption) (r IntentService)
NewIntentService 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 (*IntentService) DeletePolicyRule ¶ added in v0.4.0
func (r *IntentService) DeletePolicyRule(ctx context.Context, ruleID string, params IntentDeletePolicyRuleParams, opts ...option.RequestOption) (res *RuleDeleteIntentResponse, err error)
Create an intent to delete a rule from a policy. The intent must be authorized by the policy owner before it can be executed.
func (*IntentService) Get ¶ added in v0.4.0
func (r *IntentService) Get(ctx context.Context, intentID string, opts ...option.RequestOption) (res *IntentResponseUnion, err error)
Retrieve an intent by ID. Returns the intent details including its current status, authorization details, and execution result if applicable.
func (*IntentService) List ¶ added in v0.4.0
func (r *IntentService) List(ctx context.Context, query IntentListParams, opts ...option.RequestOption) (res *pagination.Cursor[IntentResponseUnion], err error)
List intents for an app. Returns a paginated list of intents with their current status and details.
func (*IntentService) ListAutoPaging ¶ added in v0.4.0
func (r *IntentService) ListAutoPaging(ctx context.Context, query IntentListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[IntentResponseUnion]
List intents for an app. Returns a paginated list of intents with their current status and details.
func (*IntentService) NewPolicyRule ¶ added in v0.4.0
func (r *IntentService) NewPolicyRule(ctx context.Context, policyID string, params IntentNewPolicyRuleParams, opts ...option.RequestOption) (res *RuleMutateIntentResponse, err error)
Create an intent to add a rule to a policy. The intent must be authorized by the policy owner before it can be executed.
func (*IntentService) Rpc ¶ added in v0.4.0
func (r *IntentService) Rpc(ctx context.Context, walletID string, params IntentRpcParams, opts ...option.RequestOption) (res *RpcIntentResponse, err error)
Create an intent to execute an RPC method on a wallet. The intent must be authorized by either the wallet owner or signers before it can be executed.
func (*IntentService) Transfer ¶ added in v0.6.0
func (r *IntentService) Transfer(ctx context.Context, walletID string, params IntentTransferParams, opts ...option.RequestOption) (res *TransferIntentResponse, err error)
Create an intent to execute a token transfer via a wallet. The intent must be authorized by either the wallet owner or signers before it can be executed.
func (*IntentService) UpdateKeyQuorum ¶ added in v0.4.0
func (r *IntentService) UpdateKeyQuorum(ctx context.Context, keyQuorumID string, params IntentUpdateKeyQuorumParams, opts ...option.RequestOption) (res *KeyQuorumIntentResponse, err error)
Create an intent to update a key quorum. The intent must be authorized by the key quorum members before it can be executed.
func (*IntentService) UpdatePolicy ¶ added in v0.4.0
func (r *IntentService) UpdatePolicy(ctx context.Context, policyID string, params IntentUpdatePolicyParams, opts ...option.RequestOption) (res *PolicyIntentResponse, err error)
Create an intent to update a policy. The intent must be authorized by the policy owner before it can be executed.
func (*IntentService) UpdatePolicyRule ¶ added in v0.4.0
func (r *IntentService) UpdatePolicyRule(ctx context.Context, ruleID string, params IntentUpdatePolicyRuleParams, opts ...option.RequestOption) (res *RuleMutateIntentResponse, err error)
Create an intent to update a rule on a policy. The intent must be authorized by the policy owner before it can be executed.
func (*IntentService) UpdateWallet ¶ added in v0.4.0
func (r *IntentService) UpdateWallet(ctx context.Context, walletID string, params IntentUpdateWalletParams, opts ...option.RequestOption) (res *WalletIntentResponse, err error)
Create an intent to update a wallet. The intent must be authorized by the wallet owner before it can be executed.
type IntentStatus ¶ added in v0.4.0
type IntentStatus string
Current status of an intent.
const ( IntentStatusPending IntentStatus = "pending" IntentStatusProcessing IntentStatus = "processing" IntentStatusExecuted IntentStatus = "executed" IntentStatusFailed IntentStatus = "failed" IntentStatusExpired IntentStatus = "expired" IntentStatusRejected IntentStatus = "rejected" IntentStatusDismissed IntentStatus = "dismissed" )
type IntentTransferParams ¶ added in v0.6.0
type IntentTransferParams struct {
// Request body for initiating a sponsored token transfer from an embedded wallet.
TransferRequestBody TransferRequestBody
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentTransferParams) MarshalJSON ¶ added in v0.6.0
func (r IntentTransferParams) MarshalJSON() (data []byte, err error)
func (*IntentTransferParams) UnmarshalJSON ¶ added in v0.6.0
func (r *IntentTransferParams) UnmarshalJSON(data []byte) error
type IntentType ¶ added in v0.4.0
type IntentType string
Type of intent.
const ( IntentTypeKeyQuorum IntentType = "KEY_QUORUM" IntentTypePolicy IntentType = "POLICY" IntentTypeRule IntentType = "RULE" IntentTypeRpc IntentType = "RPC" IntentTypeTransfer IntentType = "TRANSFER" IntentTypeWallet IntentType = "WALLET" )
type IntentUpdateKeyQuorumParams ¶ added in v0.4.0
type IntentUpdateKeyQuorumParams struct {
// Request input for updating an existing key quorum. At least one field must be
// provided.
KeyQuorumUpdateRequestBody KeyQuorumUpdateRequestBody
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentUpdateKeyQuorumParams) MarshalJSON ¶ added in v0.4.0
func (r IntentUpdateKeyQuorumParams) MarshalJSON() (data []byte, err error)
func (*IntentUpdateKeyQuorumParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentUpdateKeyQuorumParams) UnmarshalJSON(data []byte) error
type IntentUpdatePolicyParams ¶ added in v0.4.0
type IntentUpdatePolicyParams struct {
// The key quorum ID to set as the owner of the resource. If you provide this, do
// not specify an owner.
OwnerID param.Opt[OwnerIDInput] `json:"owner_id,omitzero" format:"cuid2"`
// Name to assign to policy.
Name param.Opt[string] `json:"name,omitzero"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// The owner of the resource, specified as a Privy user ID, a P-256 public key, or
// null to remove the current owner.
Owner OwnerInputUnion `json:"owner,omitzero"`
Rules []PolicyRuleRequestBody `json:"rules,omitzero"`
// contains filtered or unexported fields
}
func (IntentUpdatePolicyParams) MarshalJSON ¶ added in v0.4.0
func (r IntentUpdatePolicyParams) MarshalJSON() (data []byte, err error)
func (*IntentUpdatePolicyParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentUpdatePolicyParams) UnmarshalJSON(data []byte) error
type IntentUpdatePolicyRuleParams ¶ added in v0.4.0
type IntentUpdatePolicyRuleParams struct {
// ID of the policy.
PolicyID string `path:"policy_id" api:"required" json:"-"`
// The rules that apply to each method the policy covers.
PolicyRuleRequestBody PolicyRuleRequestBody
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentUpdatePolicyRuleParams) MarshalJSON ¶ added in v0.4.0
func (r IntentUpdatePolicyRuleParams) MarshalJSON() (data []byte, err error)
func (*IntentUpdatePolicyRuleParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentUpdatePolicyRuleParams) UnmarshalJSON(data []byte) error
type IntentUpdateWalletParams ¶ added in v0.4.0
type IntentUpdateWalletParams struct {
// Request body for updating a wallet. `owner` and `owner_id` are mutually
// exclusive.
WalletUpdateRequestBody WalletUpdateRequestBody
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IntentUpdateWalletParams) MarshalJSON ¶ added in v0.4.0
func (r IntentUpdateWalletParams) MarshalJSON() (data []byte, err error)
func (*IntentUpdateWalletParams) UnmarshalJSON ¶ added in v0.4.0
func (r *IntentUpdateWalletParams) UnmarshalJSON(data []byte) error
type InvalidWebhookError ¶ added in v0.7.0
type InvalidWebhookError struct {
Err error
}
InvalidWebhookError is returned when webhook signature verification fails.
func (*InvalidWebhookError) Error ¶ added in v0.7.0
func (e *InvalidWebhookError) Error() string
func (*InvalidWebhookError) Unwrap ¶ added in v0.7.0
func (e *InvalidWebhookError) Unwrap() error
type KeyQuorum ¶
type KeyQuorum struct {
ID string `json:"id" api:"required" format:"cuid2"`
AuthorizationKeys []AuthorizationKey `json:"authorization_keys" api:"required"`
AuthorizationThreshold float64 `json:"authorization_threshold" api:"required"`
DisplayName string `json:"display_name" api:"required"`
UserIDs []string `json:"user_ids" api:"required"`
// List of nested key quorum IDs that are members of this key quorum.
KeyQuorumIDs []string `json:"key_quorum_ids"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AuthorizationKeys respjson.Field
AuthorizationThreshold respjson.Field
DisplayName respjson.Field
UserIDs respjson.Field
KeyQuorumIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A key quorum for authorizing wallet operations.
func (*KeyQuorum) UnmarshalJSON ¶
type KeyQuorumCreateRequestBody ¶ added in v0.4.0
type KeyQuorumCreateRequestBody struct {
// The number of keys that must sign for an action to be valid. Must be less than
// or equal to total number of key quorum members.
AuthorizationThreshold param.Opt[float64] `json:"authorization_threshold,omitzero"`
DisplayName param.Opt[string] `json:"display_name,omitzero"`
// List of key quorum IDs that should be members of this key quorum. Key quorums
// can only be nested 1 level deep. At least one of `user_ids`, `public_keys`, or
// `key_quorum_ids` is required.
KeyQuorumIDs []string `json:"key_quorum_ids,omitzero"`
// List of P-256 public keys of the keys that should be authorized to sign on the
// key quorum, in base64-encoded DER format. At least one of `user_ids`,
// `public_keys`, or `key_quorum_ids` is required.
PublicKeys []string `json:"public_keys,omitzero"`
// List of user IDs of the users that should be authorized to sign on the key
// quorum. At least one of `user_ids`, `public_keys`, or `key_quorum_ids` is
// required.
UserIDs []string `json:"user_ids,omitzero"`
// contains filtered or unexported fields
}
Request input for creating a key quorum. At least one of `user_ids`, `public_keys`, or `key_quorum_ids` is required.
func (KeyQuorumCreateRequestBody) MarshalJSON ¶ added in v0.4.0
func (r KeyQuorumCreateRequestBody) MarshalJSON() (data []byte, err error)
func (*KeyQuorumCreateRequestBody) UnmarshalJSON ¶ added in v0.4.0
func (r *KeyQuorumCreateRequestBody) UnmarshalJSON(data []byte) error
type KeyQuorumDeleteParams ¶
type KeyQuorumDeleteParams struct {
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
type KeyQuorumID ¶ added in v0.4.0
type KeyQuorumID = string
type KeyQuorumIntentResponse ¶ added in v0.4.0
type KeyQuorumIntentResponse struct {
// Any of "KEY_QUORUM".
IntentType string `json:"intent_type" api:"required"`
// The original key quorum update request that would be sent to the key quorum
// endpoint
RequestDetails KeyQuorumIntentResponseRequestDetails `json:"request_details" api:"required"`
// Result of key quorum update execution (only present if status is 'executed' or
// 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A key quorum for authorizing wallet operations.
CurrentResourceData KeyQuorum `json:"current_resource_data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for a key quorum intent
func (KeyQuorumIntentResponse) RawJSON ¶ added in v0.4.0
func (r KeyQuorumIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*KeyQuorumIntentResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *KeyQuorumIntentResponse) UnmarshalJSON(data []byte) error
type KeyQuorumIntentResponseRequestDetails ¶ added in v0.4.0
type KeyQuorumIntentResponseRequestDetails struct {
// Request input for updating an existing key quorum. At least one field must be
// provided.
Body KeyQuorumUpdateRequestBodyResp `json:"body" api:"required"`
// Any of "PATCH".
Method string `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The original key quorum update request that would be sent to the key quorum endpoint
func (KeyQuorumIntentResponseRequestDetails) RawJSON ¶ added in v0.4.0
func (r KeyQuorumIntentResponseRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*KeyQuorumIntentResponseRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *KeyQuorumIntentResponseRequestDetails) UnmarshalJSON(data []byte) error
type KeyQuorumNewParams ¶
type KeyQuorumNewParams struct {
// Request input for creating a key quorum. At least one of `user_ids`,
// `public_keys`, or `key_quorum_ids` is required.
KeyQuorumCreateRequestBody KeyQuorumCreateRequestBody
// contains filtered or unexported fields
}
func (KeyQuorumNewParams) MarshalJSON ¶
func (r KeyQuorumNewParams) MarshalJSON() (data []byte, err error)
func (*KeyQuorumNewParams) UnmarshalJSON ¶
func (r *KeyQuorumNewParams) UnmarshalJSON(data []byte) error
type KeyQuorumService ¶
type KeyQuorumService struct {
Options []option.RequestOption
}
Operations related to key quorums
KeyQuorumService contains methods and other services that help with interacting with the Privy API 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 NewKeyQuorumService method instead.
func NewKeyQuorumService ¶
func NewKeyQuorumService(opts ...option.RequestOption) (r KeyQuorumService)
NewKeyQuorumService 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 (*KeyQuorumService) Delete ¶
func (r *KeyQuorumService) Delete(ctx context.Context, keyQuorumID KeyQuorumID, body KeyQuorumDeleteParams, opts ...option.RequestOption) (res *SuccessResponse, err error)
Delete a key quorum by key quorum ID.
func (*KeyQuorumService) Get ¶
func (r *KeyQuorumService) Get(ctx context.Context, keyQuorumID KeyQuorumID, opts ...option.RequestOption) (res *KeyQuorum, err error)
Get a key quorum by ID.
func (*KeyQuorumService) New ¶
func (r *KeyQuorumService) New(ctx context.Context, body KeyQuorumNewParams, opts ...option.RequestOption) (res *KeyQuorum, err error)
Create a new key quorum.
func (*KeyQuorumService) Update ¶
func (r *KeyQuorumService) Update(ctx context.Context, keyQuorumID KeyQuorumID, params KeyQuorumUpdateParams, opts ...option.RequestOption) (res *KeyQuorum, err error)
Update a key quorum by key quorum ID.
type KeyQuorumUpdateParams ¶
type KeyQuorumUpdateParams struct {
// Request input for updating an existing key quorum. At least one field must be
// provided.
KeyQuorumUpdateRequestBody KeyQuorumUpdateRequestBody
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (KeyQuorumUpdateParams) MarshalJSON ¶
func (r KeyQuorumUpdateParams) MarshalJSON() (data []byte, err error)
func (*KeyQuorumUpdateParams) UnmarshalJSON ¶
func (r *KeyQuorumUpdateParams) UnmarshalJSON(data []byte) error
type KeyQuorumUpdateRequestBody ¶ added in v0.4.0
type KeyQuorumUpdateRequestBody struct {
// The number of keys that must sign for an action to be valid. Must be less than
// or equal to total number of key quorum members.
AuthorizationThreshold param.Opt[float64] `json:"authorization_threshold,omitzero"`
DisplayName param.Opt[string] `json:"display_name,omitzero"`
// List of key quorum IDs that should be members of this key quorum. Key quorums
// can only be nested 1 level deep.
KeyQuorumIDs []string `json:"key_quorum_ids,omitzero"`
// List of P-256 public keys of the keys that should be authorized to sign on the
// key quorum, in base64-encoded DER format.
PublicKeys []string `json:"public_keys,omitzero"`
// List of user IDs of the users that should be authorized to sign on the key
// quorum.
UserIDs []string `json:"user_ids,omitzero"`
// contains filtered or unexported fields
}
Request input for updating an existing key quorum. At least one field must be provided.
func (KeyQuorumUpdateRequestBody) MarshalJSON ¶ added in v0.6.0
func (r KeyQuorumUpdateRequestBody) MarshalJSON() (data []byte, err error)
func (*KeyQuorumUpdateRequestBody) UnmarshalJSON ¶ added in v0.4.0
func (r *KeyQuorumUpdateRequestBody) UnmarshalJSON(data []byte) error
type KeyQuorumUpdateRequestBodyResp ¶ added in v0.6.0
type KeyQuorumUpdateRequestBodyResp struct {
// The number of keys that must sign for an action to be valid. Must be less than
// or equal to total number of key quorum members.
AuthorizationThreshold float64 `json:"authorization_threshold"`
DisplayName string `json:"display_name"`
// List of key quorum IDs that should be members of this key quorum. Key quorums
// can only be nested 1 level deep.
KeyQuorumIDs []string `json:"key_quorum_ids"`
// List of P-256 public keys of the keys that should be authorized to sign on the
// key quorum, in base64-encoded DER format.
PublicKeys []string `json:"public_keys"`
// List of user IDs of the users that should be authorized to sign on the key
// quorum.
UserIDs []string `json:"user_ids"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AuthorizationThreshold respjson.Field
DisplayName respjson.Field
KeyQuorumIDs respjson.Field
PublicKeys respjson.Field
UserIDs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request input for updating an existing key quorum. At least one field must be provided.
func (KeyQuorumUpdateRequestBodyResp) RawJSON ¶ added in v0.6.0
func (r KeyQuorumUpdateRequestBodyResp) RawJSON() string
Returns the unmodified JSON received from the API
func (KeyQuorumUpdateRequestBodyResp) ToParam ¶ added in v0.6.0
func (r KeyQuorumUpdateRequestBodyResp) ToParam() KeyQuorumUpdateRequestBody
ToParam converts this KeyQuorumUpdateRequestBodyResp to a KeyQuorumUpdateRequestBody.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with KeyQuorumUpdateRequestBody.Overrides()
func (*KeyQuorumUpdateRequestBodyResp) UnmarshalJSON ¶ added in v0.6.0
func (r *KeyQuorumUpdateRequestBodyResp) UnmarshalJSON(data []byte) error
type KrakenEmbedService ¶ added in v0.4.0
type KrakenEmbedService struct {
Options []option.RequestOption
}
KrakenEmbedService contains methods and other services that help with interacting with the Privy API 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 NewKrakenEmbedService method instead.
func NewKrakenEmbedService ¶ added in v0.4.0
func NewKrakenEmbedService(opts ...option.RequestOption) (r KrakenEmbedService)
NewKrakenEmbedService 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 LinkedAccountAppleInput ¶ added in v0.0.4
type LinkedAccountAppleInput struct {
Subject string `json:"subject" api:"required"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
// This field can be elided, and will marshal its zero value as "apple_oauth".
Type constant.AppleOAuth `json:"type" default:"apple_oauth"`
// contains filtered or unexported fields
}
The payload for importing an Apple account.
The properties Subject, Type are required.
func (LinkedAccountAppleInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountAppleInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountAppleInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountAppleInput) UnmarshalJSON(data []byte) error
type LinkedAccountAppleOAuth ¶
type LinkedAccountAppleOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "apple_oauth".
Type LinkedAccountAppleOAuthType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Apple OAuth account linked to the user.
func (LinkedAccountAppleOAuth) RawJSON ¶
func (r LinkedAccountAppleOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountAppleOAuth) UnmarshalJSON ¶
func (r *LinkedAccountAppleOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountAppleOAuthType ¶
type LinkedAccountAppleOAuthType string
const (
LinkedAccountAppleOAuthTypeAppleOAuth LinkedAccountAppleOAuthType = "apple_oauth"
)
type LinkedAccountAuthorizationKey ¶
type LinkedAccountAuthorizationKey struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
PublicKey string `json:"public_key" api:"required"`
// Any of "authorization_key".
Type LinkedAccountAuthorizationKeyType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
PublicKey respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An authorization key linked to the user.
func (LinkedAccountAuthorizationKey) RawJSON ¶
func (r LinkedAccountAuthorizationKey) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountAuthorizationKey) UnmarshalJSON ¶
func (r *LinkedAccountAuthorizationKey) UnmarshalJSON(data []byte) error
type LinkedAccountAuthorizationKeyType ¶
type LinkedAccountAuthorizationKeyType string
const (
LinkedAccountAuthorizationKeyTypeAuthorizationKey LinkedAccountAuthorizationKeyType = "authorization_key"
)
type LinkedAccountBaseWallet ¶ added in v0.7.0
type LinkedAccountBaseWallet struct {
Address string `json:"address" api:"required"`
// The wallet chain types that offer first class support.
//
// Any of "ethereum", "solana".
ChainType FirstClassChainType `json:"chain_type" api:"required"`
// The type of wallet linked account (external wallet or smart wallet).
//
// Any of "wallet", "smart_wallet".
Type LinkedAccountBaseWalletType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ChainType respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Base schema for wallet accounts linked to the user.
func (LinkedAccountBaseWallet) RawJSON ¶ added in v0.7.0
func (r LinkedAccountBaseWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountBaseWallet) UnmarshalJSON ¶ added in v0.7.0
func (r *LinkedAccountBaseWallet) UnmarshalJSON(data []byte) error
type LinkedAccountBaseWalletType ¶ added in v0.7.0
type LinkedAccountBaseWalletType string
The type of wallet linked account (external wallet or smart wallet).
const ( LinkedAccountBaseWalletTypeWallet LinkedAccountBaseWalletType = "wallet" LinkedAccountBaseWalletTypeSmartWallet LinkedAccountBaseWalletType = "smart_wallet" )
type LinkedAccountBitcoinSegwitEmbeddedWallet ¶
type LinkedAccountBitcoinSegwitEmbeddedWallet struct {
ID string `json:"id" api:"required"`
Address string `json:"address" api:"required"`
ChainID string `json:"chain_id" api:"required"`
// Any of "bitcoin-segwit".
ChainType LinkedAccountBitcoinSegwitEmbeddedWalletChainType `json:"chain_type" api:"required"`
// Any of "embedded".
ConnectorType LinkedAccountBitcoinSegwitEmbeddedWalletConnectorType `json:"connector_type" api:"required"`
Delegated bool `json:"delegated" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
Imported bool `json:"imported" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
PublicKey string `json:"public_key" api:"required"`
// The method used to recover an embedded wallet account.
//
// Any of "privy", "user-passcode", "google-drive", "icloud",
// "recovery-encryption-key", "privy-v2".
RecoveryMethod EmbeddedWalletRecoveryMethod `json:"recovery_method" api:"required"`
// Any of "wallet".
Type LinkedAccountBitcoinSegwitEmbeddedWalletType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "privy".
WalletClient LinkedAccountBitcoinSegwitEmbeddedWalletWalletClient `json:"wallet_client" api:"required"`
// Any of "privy".
WalletClientType LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientType `json:"wallet_client_type" api:"required"`
WalletIndex float64 `json:"wallet_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
ChainID respjson.Field
ChainType respjson.Field
ConnectorType respjson.Field
Delegated respjson.Field
FirstVerifiedAt respjson.Field
Imported respjson.Field
LatestVerifiedAt respjson.Field
PublicKey respjson.Field
RecoveryMethod respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
WalletClientType respjson.Field
WalletIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Bitcoin SegWit embedded wallet account linked to the user.
func (LinkedAccountBitcoinSegwitEmbeddedWallet) RawJSON ¶
func (r LinkedAccountBitcoinSegwitEmbeddedWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountBitcoinSegwitEmbeddedWallet) UnmarshalJSON ¶
func (r *LinkedAccountBitcoinSegwitEmbeddedWallet) UnmarshalJSON(data []byte) error
type LinkedAccountBitcoinSegwitEmbeddedWalletChainType ¶
type LinkedAccountBitcoinSegwitEmbeddedWalletChainType string
const (
LinkedAccountBitcoinSegwitEmbeddedWalletChainTypeBitcoinSegwit LinkedAccountBitcoinSegwitEmbeddedWalletChainType = "bitcoin-segwit"
)
type LinkedAccountBitcoinSegwitEmbeddedWalletConnectorType ¶
type LinkedAccountBitcoinSegwitEmbeddedWalletConnectorType string
const (
LinkedAccountBitcoinSegwitEmbeddedWalletConnectorTypeEmbedded LinkedAccountBitcoinSegwitEmbeddedWalletConnectorType = "embedded"
)
type LinkedAccountBitcoinSegwitEmbeddedWalletType ¶
type LinkedAccountBitcoinSegwitEmbeddedWalletType string
const (
LinkedAccountBitcoinSegwitEmbeddedWalletTypeWallet LinkedAccountBitcoinSegwitEmbeddedWalletType = "wallet"
)
type LinkedAccountBitcoinSegwitEmbeddedWalletWalletClient ¶
type LinkedAccountBitcoinSegwitEmbeddedWalletWalletClient string
const (
LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientPrivy LinkedAccountBitcoinSegwitEmbeddedWalletWalletClient = "privy"
)
type LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientType ¶
type LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientType string
const (
LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientTypePrivy LinkedAccountBitcoinSegwitEmbeddedWalletWalletClientType = "privy"
)
type LinkedAccountBitcoinTaprootEmbeddedWallet ¶
type LinkedAccountBitcoinTaprootEmbeddedWallet struct {
ID string `json:"id" api:"required"`
Address string `json:"address" api:"required"`
ChainID string `json:"chain_id" api:"required"`
// Any of "bitcoin-taproot".
ChainType LinkedAccountBitcoinTaprootEmbeddedWalletChainType `json:"chain_type" api:"required"`
// Any of "embedded".
ConnectorType LinkedAccountBitcoinTaprootEmbeddedWalletConnectorType `json:"connector_type" api:"required"`
Delegated bool `json:"delegated" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
Imported bool `json:"imported" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
PublicKey string `json:"public_key" api:"required"`
// The method used to recover an embedded wallet account.
//
// Any of "privy", "user-passcode", "google-drive", "icloud",
// "recovery-encryption-key", "privy-v2".
RecoveryMethod EmbeddedWalletRecoveryMethod `json:"recovery_method" api:"required"`
// Any of "wallet".
Type LinkedAccountBitcoinTaprootEmbeddedWalletType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "privy".
WalletClient LinkedAccountBitcoinTaprootEmbeddedWalletWalletClient `json:"wallet_client" api:"required"`
// Any of "privy".
WalletClientType LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientType `json:"wallet_client_type" api:"required"`
WalletIndex float64 `json:"wallet_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
ChainID respjson.Field
ChainType respjson.Field
ConnectorType respjson.Field
Delegated respjson.Field
FirstVerifiedAt respjson.Field
Imported respjson.Field
LatestVerifiedAt respjson.Field
PublicKey respjson.Field
RecoveryMethod respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
WalletClientType respjson.Field
WalletIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Bitcoin Taproot embedded wallet account linked to the user.
func (LinkedAccountBitcoinTaprootEmbeddedWallet) RawJSON ¶
func (r LinkedAccountBitcoinTaprootEmbeddedWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountBitcoinTaprootEmbeddedWallet) UnmarshalJSON ¶
func (r *LinkedAccountBitcoinTaprootEmbeddedWallet) UnmarshalJSON(data []byte) error
type LinkedAccountBitcoinTaprootEmbeddedWalletChainType ¶
type LinkedAccountBitcoinTaprootEmbeddedWalletChainType string
const (
LinkedAccountBitcoinTaprootEmbeddedWalletChainTypeBitcoinTaproot LinkedAccountBitcoinTaprootEmbeddedWalletChainType = "bitcoin-taproot"
)
type LinkedAccountBitcoinTaprootEmbeddedWalletConnectorType ¶
type LinkedAccountBitcoinTaprootEmbeddedWalletConnectorType string
const (
LinkedAccountBitcoinTaprootEmbeddedWalletConnectorTypeEmbedded LinkedAccountBitcoinTaprootEmbeddedWalletConnectorType = "embedded"
)
type LinkedAccountBitcoinTaprootEmbeddedWalletType ¶
type LinkedAccountBitcoinTaprootEmbeddedWalletType string
const (
LinkedAccountBitcoinTaprootEmbeddedWalletTypeWallet LinkedAccountBitcoinTaprootEmbeddedWalletType = "wallet"
)
type LinkedAccountBitcoinTaprootEmbeddedWalletWalletClient ¶
type LinkedAccountBitcoinTaprootEmbeddedWalletWalletClient string
const (
LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientPrivy LinkedAccountBitcoinTaprootEmbeddedWalletWalletClient = "privy"
)
type LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientType ¶
type LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientType string
const (
LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientTypePrivy LinkedAccountBitcoinTaprootEmbeddedWalletWalletClientType = "privy"
)
type LinkedAccountCrossApp ¶
type LinkedAccountCrossApp struct {
EmbeddedWallets []CrossAppEmbeddedWallet `json:"embedded_wallets" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
ProviderAppID string `json:"provider_app_id" api:"required"`
SmartWallets []CrossAppSmartWallet `json:"smart_wallets" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "cross_app".
Type LinkedAccountCrossAppType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EmbeddedWallets respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
ProviderAppID respjson.Field
SmartWallets respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A cross-app account linked to the user.
func (LinkedAccountCrossApp) RawJSON ¶
func (r LinkedAccountCrossApp) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountCrossApp) UnmarshalJSON ¶
func (r *LinkedAccountCrossApp) UnmarshalJSON(data []byte) error
type LinkedAccountCrossAppType ¶
type LinkedAccountCrossAppType string
const (
LinkedAccountCrossAppTypeCrossApp LinkedAccountCrossAppType = "cross_app"
)
type LinkedAccountCurveSigningEmbeddedWallet ¶
type LinkedAccountCurveSigningEmbeddedWallet struct {
ID string `json:"id" api:"required"`
Address string `json:"address" api:"required"`
ChainID string `json:"chain_id" api:"required"`
// The wallet chain types that support curve-based signing.
//
// Any of "cosmos", "stellar", "sui", "aptos", "movement", "tron",
// "bitcoin-segwit", "bitcoin-taproot", "pearl", "near", "ton", "starknet".
ChainType CurveSigningChainType `json:"chain_type" api:"required"`
// Any of "embedded".
ConnectorType LinkedAccountCurveSigningEmbeddedWalletConnectorType `json:"connector_type" api:"required"`
Delegated bool `json:"delegated" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
Imported bool `json:"imported" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
PublicKey string `json:"public_key" api:"required"`
// The method used to recover an embedded wallet account.
//
// Any of "privy", "user-passcode", "google-drive", "icloud",
// "recovery-encryption-key", "privy-v2".
RecoveryMethod EmbeddedWalletRecoveryMethod `json:"recovery_method" api:"required"`
// Any of "wallet".
Type LinkedAccountCurveSigningEmbeddedWalletType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "privy".
WalletClient LinkedAccountCurveSigningEmbeddedWalletWalletClient `json:"wallet_client" api:"required"`
// Any of "privy".
WalletClientType LinkedAccountCurveSigningEmbeddedWalletWalletClientType `json:"wallet_client_type" api:"required"`
WalletIndex float64 `json:"wallet_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
ChainID respjson.Field
ChainType respjson.Field
ConnectorType respjson.Field
Delegated respjson.Field
FirstVerifiedAt respjson.Field
Imported respjson.Field
LatestVerifiedAt respjson.Field
PublicKey respjson.Field
RecoveryMethod respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
WalletClientType respjson.Field
WalletIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A curve signing embedded wallet account linked to the user.
func (LinkedAccountCurveSigningEmbeddedWallet) RawJSON ¶
func (r LinkedAccountCurveSigningEmbeddedWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountCurveSigningEmbeddedWallet) UnmarshalJSON ¶
func (r *LinkedAccountCurveSigningEmbeddedWallet) UnmarshalJSON(data []byte) error
type LinkedAccountCurveSigningEmbeddedWalletConnectorType ¶
type LinkedAccountCurveSigningEmbeddedWalletConnectorType string
const (
LinkedAccountCurveSigningEmbeddedWalletConnectorTypeEmbedded LinkedAccountCurveSigningEmbeddedWalletConnectorType = "embedded"
)
type LinkedAccountCurveSigningEmbeddedWalletType ¶
type LinkedAccountCurveSigningEmbeddedWalletType string
const (
LinkedAccountCurveSigningEmbeddedWalletTypeWallet LinkedAccountCurveSigningEmbeddedWalletType = "wallet"
)
type LinkedAccountCurveSigningEmbeddedWalletWalletClient ¶
type LinkedAccountCurveSigningEmbeddedWalletWalletClient string
const (
LinkedAccountCurveSigningEmbeddedWalletWalletClientPrivy LinkedAccountCurveSigningEmbeddedWalletWalletClient = "privy"
)
type LinkedAccountCurveSigningEmbeddedWalletWalletClientType ¶
type LinkedAccountCurveSigningEmbeddedWalletWalletClientType string
const (
LinkedAccountCurveSigningEmbeddedWalletWalletClientTypePrivy LinkedAccountCurveSigningEmbeddedWalletWalletClientType = "privy"
)
type LinkedAccountCustomJwt ¶
type LinkedAccountCustomJwt struct {
CustomUserID string `json:"custom_user_id" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// Any of "custom_auth".
Type LinkedAccountCustomJwtType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CustomUserID respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A custom JWT account linked to the user.
func (LinkedAccountCustomJwt) RawJSON ¶
func (r LinkedAccountCustomJwt) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountCustomJwt) UnmarshalJSON ¶
func (r *LinkedAccountCustomJwt) UnmarshalJSON(data []byte) error
type LinkedAccountCustomJwtInput ¶ added in v0.0.4
type LinkedAccountCustomJwtInput struct {
CustomUserID string `json:"custom_user_id" api:"required"`
// This field can be elided, and will marshal its zero value as "custom_auth".
Type constant.CustomAuth `json:"type" default:"custom_auth"`
// contains filtered or unexported fields
}
The payload for importing a Custom JWT account.
The properties CustomUserID, Type are required.
func (LinkedAccountCustomJwtInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountCustomJwtInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountCustomJwtInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountCustomJwtInput) UnmarshalJSON(data []byte) error
type LinkedAccountCustomJwtType ¶
type LinkedAccountCustomJwtType string
const (
LinkedAccountCustomJwtTypeCustomAuth LinkedAccountCustomJwtType = "custom_auth"
)
type LinkedAccountCustomOAuth ¶
type LinkedAccountCustomOAuth struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Subject string `json:"subject" api:"required"`
// The ID of a custom OAuth provider, set up for this app. Must start with
// "custom:".
Type CustomOAuthProviderID `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
Email string `json:"email"`
Name string `json:"name"`
ProfilePictureURL string `json:"profile_picture_url"`
Username string `json:"username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
Email respjson.Field
Name respjson.Field
ProfilePictureURL respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A custom OAuth account linked to the user.
func (LinkedAccountCustomOAuth) RawJSON ¶
func (r LinkedAccountCustomOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountCustomOAuth) UnmarshalJSON ¶
func (r *LinkedAccountCustomOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountDiscordInput ¶ added in v0.0.4
type LinkedAccountDiscordInput struct {
Subject string `json:"subject" api:"required"`
Username string `json:"username" api:"required"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
// This field can be elided, and will marshal its zero value as "discord_oauth".
Type constant.DiscordOAuth `json:"type" default:"discord_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Discord account.
The properties Subject, Type, Username are required.
func (LinkedAccountDiscordInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountDiscordInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountDiscordInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountDiscordInput) UnmarshalJSON(data []byte) error
type LinkedAccountDiscordOAuth ¶
type LinkedAccountDiscordOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "discord_oauth".
Type LinkedAccountDiscordOAuthType `json:"type" api:"required"`
Username string `json:"username" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Subject respjson.Field
Type respjson.Field
Username respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Discord OAuth account linked to the user.
func (LinkedAccountDiscordOAuth) RawJSON ¶
func (r LinkedAccountDiscordOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountDiscordOAuth) UnmarshalJSON ¶
func (r *LinkedAccountDiscordOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountDiscordOAuthType ¶
type LinkedAccountDiscordOAuthType string
const (
LinkedAccountDiscordOAuthTypeDiscordOAuth LinkedAccountDiscordOAuthType = "discord_oauth"
)
type LinkedAccountEmail ¶
type LinkedAccountEmail struct {
Address string `json:"address" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// Any of "email".
Type LinkedAccountEmailType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An email account linked to the user.
func (LinkedAccountEmail) RawJSON ¶
func (r LinkedAccountEmail) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountEmail) UnmarshalJSON ¶
func (r *LinkedAccountEmail) UnmarshalJSON(data []byte) error
type LinkedAccountEmailInput ¶ added in v0.0.4
type LinkedAccountEmailInput struct {
Address string `json:"address" api:"required" format:"email"`
// This field can be elided, and will marshal its zero value as "email".
Type constant.Email `json:"type" default:"email"`
// contains filtered or unexported fields
}
The payload for importing an email account.
The properties Address, Type are required.
func (LinkedAccountEmailInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountEmailInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountEmailInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountEmailInput) UnmarshalJSON(data []byte) error
type LinkedAccountEmailType ¶
type LinkedAccountEmailType string
const (
LinkedAccountEmailTypeEmail LinkedAccountEmailType = "email"
)
type LinkedAccountEthereum ¶
type LinkedAccountEthereum struct {
Address string `json:"address" api:"required"`
// Any of "ethereum".
ChainType LinkedAccountEthereumChainType `json:"chain_type" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// Any of "wallet".
Type LinkedAccountEthereumType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "unknown".
WalletClient LinkedAccountEthereumWalletClient `json:"wallet_client" api:"required"`
ChainID string `json:"chain_id"`
ConnectorType string `json:"connector_type"`
WalletClientType string `json:"wallet_client_type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ChainType respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
ChainID respjson.Field
ConnectorType respjson.Field
WalletClientType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Ethereum wallet account linked to the user.
func (LinkedAccountEthereum) RawJSON ¶
func (r LinkedAccountEthereum) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountEthereum) UnmarshalJSON ¶
func (r *LinkedAccountEthereum) UnmarshalJSON(data []byte) error
type LinkedAccountEthereumChainType ¶
type LinkedAccountEthereumChainType string
const (
LinkedAccountEthereumChainTypeEthereum LinkedAccountEthereumChainType = "ethereum"
)
type LinkedAccountEthereumEmbeddedWallet ¶
type LinkedAccountEthereumEmbeddedWallet struct {
ID string `json:"id" api:"required"`
Address string `json:"address" api:"required"`
ChainID string `json:"chain_id" api:"required"`
// Any of "ethereum".
ChainType LinkedAccountEthereumEmbeddedWalletChainType `json:"chain_type" api:"required"`
// Any of "embedded".
ConnectorType LinkedAccountEthereumEmbeddedWalletConnectorType `json:"connector_type" api:"required"`
Delegated bool `json:"delegated" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
Imported bool `json:"imported" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// The method used to recover an embedded wallet account.
//
// Any of "privy", "user-passcode", "google-drive", "icloud",
// "recovery-encryption-key", "privy-v2".
RecoveryMethod EmbeddedWalletRecoveryMethod `json:"recovery_method" api:"required"`
// Any of "wallet".
Type LinkedAccountEthereumEmbeddedWalletType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "privy".
WalletClient LinkedAccountEthereumEmbeddedWalletWalletClient `json:"wallet_client" api:"required"`
// Any of "privy".
WalletClientType LinkedAccountEthereumEmbeddedWalletWalletClientType `json:"wallet_client_type" api:"required"`
WalletIndex float64 `json:"wallet_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
ChainID respjson.Field
ChainType respjson.Field
ConnectorType respjson.Field
Delegated respjson.Field
FirstVerifiedAt respjson.Field
Imported respjson.Field
LatestVerifiedAt respjson.Field
RecoveryMethod respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
WalletClientType respjson.Field
WalletIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Ethereum embedded wallet account linked to the user.
func (LinkedAccountEthereumEmbeddedWallet) RawJSON ¶
func (r LinkedAccountEthereumEmbeddedWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountEthereumEmbeddedWallet) UnmarshalJSON ¶
func (r *LinkedAccountEthereumEmbeddedWallet) UnmarshalJSON(data []byte) error
type LinkedAccountEthereumEmbeddedWalletChainType ¶
type LinkedAccountEthereumEmbeddedWalletChainType string
const (
LinkedAccountEthereumEmbeddedWalletChainTypeEthereum LinkedAccountEthereumEmbeddedWalletChainType = "ethereum"
)
type LinkedAccountEthereumEmbeddedWalletConnectorType ¶
type LinkedAccountEthereumEmbeddedWalletConnectorType string
const (
LinkedAccountEthereumEmbeddedWalletConnectorTypeEmbedded LinkedAccountEthereumEmbeddedWalletConnectorType = "embedded"
)
type LinkedAccountEthereumEmbeddedWalletType ¶
type LinkedAccountEthereumEmbeddedWalletType string
const (
LinkedAccountEthereumEmbeddedWalletTypeWallet LinkedAccountEthereumEmbeddedWalletType = "wallet"
)
type LinkedAccountEthereumEmbeddedWalletWalletClient ¶
type LinkedAccountEthereumEmbeddedWalletWalletClient string
const (
LinkedAccountEthereumEmbeddedWalletWalletClientPrivy LinkedAccountEthereumEmbeddedWalletWalletClient = "privy"
)
type LinkedAccountEthereumEmbeddedWalletWalletClientType ¶
type LinkedAccountEthereumEmbeddedWalletWalletClientType string
const (
LinkedAccountEthereumEmbeddedWalletWalletClientTypePrivy LinkedAccountEthereumEmbeddedWalletWalletClientType = "privy"
)
type LinkedAccountEthereumType ¶
type LinkedAccountEthereumType string
const (
LinkedAccountEthereumTypeWallet LinkedAccountEthereumType = "wallet"
)
type LinkedAccountEthereumWalletClient ¶
type LinkedAccountEthereumWalletClient string
const (
LinkedAccountEthereumWalletClientUnknown LinkedAccountEthereumWalletClient = "unknown"
)
type LinkedAccountFarcaster ¶
type LinkedAccountFarcaster struct {
Fid float64 `json:"fid" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
OwnerAddress string `json:"owner_address" api:"required"`
// Any of "farcaster".
Type LinkedAccountFarcasterType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
Bio string `json:"bio"`
DisplayName string `json:"display_name"`
HomepageURL string `json:"homepage_url"`
ProfilePicture string `json:"profile_picture"`
ProfilePictureURL string `json:"profile_picture_url"`
SignerPublicKey string `json:"signer_public_key"`
Username string `json:"username"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Fid respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
OwnerAddress respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
Bio respjson.Field
DisplayName respjson.Field
HomepageURL respjson.Field
ProfilePicture respjson.Field
ProfilePictureURL respjson.Field
SignerPublicKey respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Farcaster account linked to the user.
func (LinkedAccountFarcaster) RawJSON ¶
func (r LinkedAccountFarcaster) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountFarcaster) UnmarshalJSON ¶
func (r *LinkedAccountFarcaster) UnmarshalJSON(data []byte) error
type LinkedAccountFarcasterInput ¶ added in v0.0.4
type LinkedAccountFarcasterInput struct {
Fid int64 `json:"fid" api:"required"`
OwnerAddress string `json:"owner_address" api:"required"`
Bio param.Opt[string] `json:"bio,omitzero"`
DisplayName param.Opt[string] `json:"display_name,omitzero"`
HomepageURL param.Opt[string] `json:"homepage_url,omitzero"`
ProfilePictureURL param.Opt[string] `json:"profile_picture_url,omitzero"`
Username param.Opt[string] `json:"username,omitzero"`
// This field can be elided, and will marshal its zero value as "farcaster".
Type constant.Farcaster `json:"type" default:"farcaster"`
// contains filtered or unexported fields
}
The payload for importing a Farcaster account.
The properties Fid, OwnerAddress, Type are required.
func (LinkedAccountFarcasterInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountFarcasterInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountFarcasterInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountFarcasterInput) UnmarshalJSON(data []byte) error
type LinkedAccountFarcasterType ¶
type LinkedAccountFarcasterType string
const (
LinkedAccountFarcasterTypeFarcaster LinkedAccountFarcasterType = "farcaster"
)
type LinkedAccountGitHubInput ¶ added in v0.0.4
type LinkedAccountGitHubInput struct {
Subject string `json:"subject" api:"required"`
Username string `json:"username" api:"required"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
Name param.Opt[string] `json:"name,omitzero"`
// This field can be elided, and will marshal its zero value as "github_oauth".
Type constant.GitHubOAuth `json:"type" default:"github_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Github account.
The properties Subject, Type, Username are required.
func (LinkedAccountGitHubInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountGitHubInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountGitHubInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountGitHubInput) UnmarshalJSON(data []byte) error
type LinkedAccountGitHubOAuth ¶
type LinkedAccountGitHubOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Name string `json:"name" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "github_oauth".
Type LinkedAccountGitHubOAuthType `json:"type" api:"required"`
Username string `json:"username" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Name respjson.Field
Subject respjson.Field
Type respjson.Field
Username respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A GitHub OAuth account linked to the user.
func (LinkedAccountGitHubOAuth) RawJSON ¶
func (r LinkedAccountGitHubOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountGitHubOAuth) UnmarshalJSON ¶
func (r *LinkedAccountGitHubOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountGitHubOAuthType ¶
type LinkedAccountGitHubOAuthType string
const (
LinkedAccountGitHubOAuthTypeGitHubOAuth LinkedAccountGitHubOAuthType = "github_oauth"
)
type LinkedAccountGoogleInput ¶ added in v0.0.4
type LinkedAccountGoogleInput struct {
Email string `json:"email" api:"required" format:"email"`
Name string `json:"name" api:"required"`
Subject string `json:"subject" api:"required"`
// This field can be elided, and will marshal its zero value as "google_oauth".
Type constant.GoogleOAuth `json:"type" default:"google_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Google account.
The properties Email, Name, Subject, Type are required.
func (LinkedAccountGoogleInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountGoogleInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountGoogleInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountGoogleInput) UnmarshalJSON(data []byte) error
type LinkedAccountGoogleOAuth ¶
type LinkedAccountGoogleOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Name string `json:"name" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "google_oauth".
Type LinkedAccountGoogleOAuthType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Name respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Google OAuth account linked to the user.
func (LinkedAccountGoogleOAuth) RawJSON ¶
func (r LinkedAccountGoogleOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountGoogleOAuth) UnmarshalJSON ¶
func (r *LinkedAccountGoogleOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountGoogleOAuthType ¶
type LinkedAccountGoogleOAuthType string
const (
LinkedAccountGoogleOAuthTypeGoogleOAuth LinkedAccountGoogleOAuthType = "google_oauth"
)
type LinkedAccountInputUnion ¶ added in v0.0.4
type LinkedAccountInputUnion struct {
OfWallet *LinkedAccountWalletInput `json:",omitzero,inline"`
OfEmail *LinkedAccountEmailInput `json:",omitzero,inline"`
OfPhone *LinkedAccountPhoneInput `json:",omitzero,inline"`
OfGoogleOAuth *LinkedAccountGoogleInput `json:",omitzero,inline"`
OfTwitterOAuth *LinkedAccountTwitterInput `json:",omitzero,inline"`
OfDiscordOAuth *LinkedAccountDiscordInput `json:",omitzero,inline"`
OfGitHubOAuth *LinkedAccountGitHubInput `json:",omitzero,inline"`
OfSpotifyOAuth *LinkedAccountSpotifyInput `json:",omitzero,inline"`
OfInstagramOAuth *LinkedAccountInstagramInput `json:",omitzero,inline"`
OfTiktokOAuth *LinkedAccountTiktokInput `json:",omitzero,inline"`
OfLineOAuth *LinkedAccountLineInput `json:",omitzero,inline"`
OfTwitchOAuth *LinkedAccountTwitchInput `json:",omitzero,inline"`
OfAppleOAuth *LinkedAccountAppleInput `json:",omitzero,inline"`
OfLinkedinOAuth *LinkedAccountLinkedInInput `json:",omitzero,inline"`
OfFarcaster *LinkedAccountFarcasterInput `json:",omitzero,inline"`
OfTelegram *LinkedAccountTelegramInput `json:",omitzero,inline"`
OfCustomAuth *LinkedAccountCustomJwtInput `json:",omitzero,inline"`
OfPasskey *LinkedAccountPasskeyInput `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (LinkedAccountInputUnion) MarshalJSON ¶ added in v0.0.4
func (u LinkedAccountInputUnion) MarshalJSON() ([]byte, error)
func (*LinkedAccountInputUnion) UnmarshalJSON ¶ added in v0.0.4
func (u *LinkedAccountInputUnion) UnmarshalJSON(data []byte) error
type LinkedAccountInstagramInput ¶ added in v0.0.4
type LinkedAccountInstagramInput struct {
Subject string `json:"subject" api:"required"`
Username string `json:"username" api:"required"`
// This field can be elided, and will marshal its zero value as "instagram_oauth".
Type constant.InstagramOAuth `json:"type" default:"instagram_oauth"`
// contains filtered or unexported fields
}
The payload for importing an Instagram account.
The properties Subject, Type, Username are required.
func (LinkedAccountInstagramInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountInstagramInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountInstagramInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountInstagramInput) UnmarshalJSON(data []byte) error
type LinkedAccountInstagramOAuth ¶
type LinkedAccountInstagramOAuth struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "instagram_oauth".
Type LinkedAccountInstagramOAuthType `json:"type" api:"required"`
Username string `json:"username" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Subject respjson.Field
Type respjson.Field
Username respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An Instagram OAuth account linked to the user.
func (LinkedAccountInstagramOAuth) RawJSON ¶
func (r LinkedAccountInstagramOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountInstagramOAuth) UnmarshalJSON ¶
func (r *LinkedAccountInstagramOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountInstagramOAuthType ¶
type LinkedAccountInstagramOAuthType string
const (
LinkedAccountInstagramOAuthTypeInstagramOAuth LinkedAccountInstagramOAuthType = "instagram_oauth"
)
type LinkedAccountLineInput ¶ added in v0.0.4
type LinkedAccountLineInput struct {
Subject string `json:"subject" api:"required"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
Name param.Opt[string] `json:"name,omitzero"`
ProfilePictureURL param.Opt[string] `json:"profile_picture_url,omitzero" format:"uri"`
// This field can be elided, and will marshal its zero value as "line_oauth".
Type constant.LineOAuth `json:"type" default:"line_oauth"`
// contains filtered or unexported fields
}
The payload for importing a LINE account.
The properties Subject, Type are required.
func (LinkedAccountLineInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountLineInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountLineInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountLineInput) UnmarshalJSON(data []byte) error
type LinkedAccountLineOAuth ¶
type LinkedAccountLineOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Name string `json:"name" api:"required"`
ProfilePictureURL string `json:"profile_picture_url" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "line_oauth".
Type LinkedAccountLineOAuthType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Name respjson.Field
ProfilePictureURL respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A LINE OAuth account linked to the user.
func (LinkedAccountLineOAuth) RawJSON ¶
func (r LinkedAccountLineOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountLineOAuth) UnmarshalJSON ¶
func (r *LinkedAccountLineOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountLineOAuthType ¶
type LinkedAccountLineOAuthType string
const (
LinkedAccountLineOAuthTypeLineOAuth LinkedAccountLineOAuthType = "line_oauth"
)
type LinkedAccountLinkedInInput ¶ added in v0.0.4
type LinkedAccountLinkedInInput struct {
Subject string `json:"subject" api:"required"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
Name param.Opt[string] `json:"name,omitzero"`
VanityName param.Opt[string] `json:"vanityName,omitzero"`
// This field can be elided, and will marshal its zero value as "linkedin_oauth".
Type constant.LinkedinOAuth `json:"type" default:"linkedin_oauth"`
// contains filtered or unexported fields
}
The payload for importing a LinkedIn account.
The properties Subject, Type are required.
func (LinkedAccountLinkedInInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountLinkedInInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountLinkedInInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountLinkedInInput) UnmarshalJSON(data []byte) error
type LinkedAccountLinkedInOAuth ¶
type LinkedAccountLinkedInOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "linkedin_oauth".
Type LinkedAccountLinkedInOAuthType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
Name string `json:"name"`
VanityName string `json:"vanity_name"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
Name respjson.Field
VanityName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A LinkedIn OAuth account linked to the user.
func (LinkedAccountLinkedInOAuth) RawJSON ¶
func (r LinkedAccountLinkedInOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountLinkedInOAuth) UnmarshalJSON ¶
func (r *LinkedAccountLinkedInOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountLinkedInOAuthType ¶
type LinkedAccountLinkedInOAuthType string
const (
LinkedAccountLinkedInOAuthTypeLinkedinOAuth LinkedAccountLinkedInOAuthType = "linkedin_oauth"
)
type LinkedAccountPasskey ¶
type LinkedAccountPasskey struct {
CredentialID string `json:"credential_id" api:"required"`
EnrolledInMfa bool `json:"enrolled_in_mfa" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// Any of "passkey".
Type LinkedAccountPasskeyType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
AuthenticatorName string `json:"authenticator_name"`
CreatedWithBrowser string `json:"created_with_browser"`
CreatedWithDevice string `json:"created_with_device"`
CreatedWithOs string `json:"created_with_os"`
PublicKey string `json:"public_key"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CredentialID respjson.Field
EnrolledInMfa respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
AuthenticatorName respjson.Field
CreatedWithBrowser respjson.Field
CreatedWithDevice respjson.Field
CreatedWithOs respjson.Field
PublicKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A passkey account linked to the user.
func (LinkedAccountPasskey) RawJSON ¶
func (r LinkedAccountPasskey) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountPasskey) UnmarshalJSON ¶
func (r *LinkedAccountPasskey) UnmarshalJSON(data []byte) error
type LinkedAccountPasskeyCredentialDeviceType ¶ added in v0.11.0
type LinkedAccountPasskeyCredentialDeviceType string
WebAuthn credential device type indicating platform or cross-platform authenticator residency.
const ( LinkedAccountPasskeyCredentialDeviceTypeSingleDevice LinkedAccountPasskeyCredentialDeviceType = "singleDevice" LinkedAccountPasskeyCredentialDeviceTypeMultiDevice LinkedAccountPasskeyCredentialDeviceType = "multiDevice" )
type LinkedAccountPasskeyInput ¶ added in v0.0.4
type LinkedAccountPasskeyInput struct {
// WebAuthn credential device type indicating platform or cross-platform
// authenticator residency.
//
// Any of "singleDevice", "multiDevice".
CredentialDeviceType LinkedAccountPasskeyCredentialDeviceType `json:"credential_device_type,omitzero" api:"required"`
CredentialID string `json:"credential_id" api:"required"`
CredentialPublicKey string `json:"credential_public_key" api:"required"`
CredentialUsername string `json:"credential_username" api:"required"`
// This field can be elided, and will marshal its zero value as "passkey".
Type constant.Passkey `json:"type" default:"passkey"`
// contains filtered or unexported fields
}
The payload for importing a passkey account.
The properties CredentialDeviceType, CredentialID, CredentialPublicKey, CredentialUsername, Type are required.
func (LinkedAccountPasskeyInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountPasskeyInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountPasskeyInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountPasskeyInput) UnmarshalJSON(data []byte) error
type LinkedAccountPasskeyType ¶
type LinkedAccountPasskeyType string
const (
LinkedAccountPasskeyTypePasskey LinkedAccountPasskeyType = "passkey"
)
type LinkedAccountPhone ¶
type LinkedAccountPhone struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
PhoneNumber string `json:"phoneNumber" api:"required"`
// Any of "phone".
Type LinkedAccountPhoneType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
Number string `json:"number"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
PhoneNumber respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
Number respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A phone number account linked to the user.
func (LinkedAccountPhone) RawJSON ¶
func (r LinkedAccountPhone) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountPhone) UnmarshalJSON ¶
func (r *LinkedAccountPhone) UnmarshalJSON(data []byte) error
type LinkedAccountPhoneInput ¶ added in v0.0.4
type LinkedAccountPhoneInput struct {
Number string `json:"number" api:"required"`
// This field can be elided, and will marshal its zero value as "phone".
Type constant.Phone `json:"type" default:"phone"`
// contains filtered or unexported fields
}
The payload for importing a phone account.
The properties Number, Type are required.
func (LinkedAccountPhoneInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountPhoneInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountPhoneInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountPhoneInput) UnmarshalJSON(data []byte) error
type LinkedAccountPhoneType ¶
type LinkedAccountPhoneType string
const (
LinkedAccountPhoneTypePhone LinkedAccountPhoneType = "phone"
)
type LinkedAccountSmartWallet ¶
type LinkedAccountSmartWallet struct {
Address string `json:"address" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// The supported smart wallet providers.
//
// Any of "safe", "kernel", "light_account", "biconomy", "coinbase_smart_wallet",
// "thirdweb", "nexus".
SmartWalletType SmartWalletType `json:"smart_wallet_type" api:"required"`
// Any of "smart_wallet".
Type LinkedAccountSmartWalletType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
SmartWalletVersion string `json:"smart_wallet_version"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
SmartWalletType respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
SmartWalletVersion respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A smart wallet account linked to the user.
func (LinkedAccountSmartWallet) RawJSON ¶
func (r LinkedAccountSmartWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountSmartWallet) UnmarshalJSON ¶
func (r *LinkedAccountSmartWallet) UnmarshalJSON(data []byte) error
type LinkedAccountSmartWalletType ¶
type LinkedAccountSmartWalletType string
const (
LinkedAccountSmartWalletTypeSmartWallet LinkedAccountSmartWalletType = "smart_wallet"
)
type LinkedAccountSolana ¶
type LinkedAccountSolana struct {
Address string `json:"address" api:"required"`
// Any of "solana".
ChainType LinkedAccountSolanaChainType `json:"chain_type" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
// Any of "wallet".
Type LinkedAccountSolanaType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "unknown".
WalletClient LinkedAccountSolanaWalletClient `json:"wallet_client" api:"required"`
ConnectorType string `json:"connector_type"`
WalletClientType string `json:"wallet_client_type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ChainType respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
ConnectorType respjson.Field
WalletClientType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Solana wallet account linked to the user.
func (LinkedAccountSolana) RawJSON ¶
func (r LinkedAccountSolana) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountSolana) UnmarshalJSON ¶
func (r *LinkedAccountSolana) UnmarshalJSON(data []byte) error
type LinkedAccountSolanaChainType ¶
type LinkedAccountSolanaChainType string
const (
LinkedAccountSolanaChainTypeSolana LinkedAccountSolanaChainType = "solana"
)
type LinkedAccountSolanaEmbeddedWallet ¶
type LinkedAccountSolanaEmbeddedWallet struct {
ID string `json:"id" api:"required"`
Address string `json:"address" api:"required"`
ChainID string `json:"chain_id" api:"required"`
// Any of "solana".
ChainType LinkedAccountSolanaEmbeddedWalletChainType `json:"chain_type" api:"required"`
// Any of "embedded".
ConnectorType LinkedAccountSolanaEmbeddedWalletConnectorType `json:"connector_type" api:"required"`
Delegated bool `json:"delegated" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
Imported bool `json:"imported" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
PublicKey string `json:"public_key" api:"required"`
// The method used to recover an embedded wallet account.
//
// Any of "privy", "user-passcode", "google-drive", "icloud",
// "recovery-encryption-key", "privy-v2".
RecoveryMethod EmbeddedWalletRecoveryMethod `json:"recovery_method" api:"required"`
// Any of "wallet".
Type LinkedAccountSolanaEmbeddedWalletType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// Any of "privy".
WalletClient LinkedAccountSolanaEmbeddedWalletWalletClient `json:"wallet_client" api:"required"`
// Any of "privy".
WalletClientType LinkedAccountSolanaEmbeddedWalletWalletClientType `json:"wallet_client_type" api:"required"`
WalletIndex float64 `json:"wallet_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
ChainID respjson.Field
ChainType respjson.Field
ConnectorType respjson.Field
Delegated respjson.Field
FirstVerifiedAt respjson.Field
Imported respjson.Field
LatestVerifiedAt respjson.Field
PublicKey respjson.Field
RecoveryMethod respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
WalletClient respjson.Field
WalletClientType respjson.Field
WalletIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Solana embedded wallet account linked to the user.
func (LinkedAccountSolanaEmbeddedWallet) RawJSON ¶
func (r LinkedAccountSolanaEmbeddedWallet) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountSolanaEmbeddedWallet) UnmarshalJSON ¶
func (r *LinkedAccountSolanaEmbeddedWallet) UnmarshalJSON(data []byte) error
type LinkedAccountSolanaEmbeddedWalletChainType ¶
type LinkedAccountSolanaEmbeddedWalletChainType string
const (
LinkedAccountSolanaEmbeddedWalletChainTypeSolana LinkedAccountSolanaEmbeddedWalletChainType = "solana"
)
type LinkedAccountSolanaEmbeddedWalletConnectorType ¶
type LinkedAccountSolanaEmbeddedWalletConnectorType string
const (
LinkedAccountSolanaEmbeddedWalletConnectorTypeEmbedded LinkedAccountSolanaEmbeddedWalletConnectorType = "embedded"
)
type LinkedAccountSolanaEmbeddedWalletType ¶
type LinkedAccountSolanaEmbeddedWalletType string
const (
LinkedAccountSolanaEmbeddedWalletTypeWallet LinkedAccountSolanaEmbeddedWalletType = "wallet"
)
type LinkedAccountSolanaEmbeddedWalletWalletClient ¶
type LinkedAccountSolanaEmbeddedWalletWalletClient string
const (
LinkedAccountSolanaEmbeddedWalletWalletClientPrivy LinkedAccountSolanaEmbeddedWalletWalletClient = "privy"
)
type LinkedAccountSolanaEmbeddedWalletWalletClientType ¶
type LinkedAccountSolanaEmbeddedWalletWalletClientType string
const (
LinkedAccountSolanaEmbeddedWalletWalletClientTypePrivy LinkedAccountSolanaEmbeddedWalletWalletClientType = "privy"
)
type LinkedAccountSolanaType ¶
type LinkedAccountSolanaType string
const (
LinkedAccountSolanaTypeWallet LinkedAccountSolanaType = "wallet"
)
type LinkedAccountSolanaWalletClient ¶
type LinkedAccountSolanaWalletClient string
const (
LinkedAccountSolanaWalletClientUnknown LinkedAccountSolanaWalletClient = "unknown"
)
type LinkedAccountSpotifyInput ¶ added in v0.0.4
type LinkedAccountSpotifyInput struct {
Subject string `json:"subject" api:"required"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
Name param.Opt[string] `json:"name,omitzero"`
// This field can be elided, and will marshal its zero value as "spotify_oauth".
Type constant.SpotifyOAuth `json:"type" default:"spotify_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Spotify account.
The properties Subject, Type are required.
func (LinkedAccountSpotifyInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountSpotifyInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountSpotifyInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountSpotifyInput) UnmarshalJSON(data []byte) error
type LinkedAccountSpotifyOAuth ¶
type LinkedAccountSpotifyOAuth struct {
Email string `json:"email" api:"required"`
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Name string `json:"name" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "spotify_oauth".
Type LinkedAccountSpotifyOAuthType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Name respjson.Field
Subject respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spotify OAuth account linked to the user.
func (LinkedAccountSpotifyOAuth) RawJSON ¶
func (r LinkedAccountSpotifyOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountSpotifyOAuth) UnmarshalJSON ¶
func (r *LinkedAccountSpotifyOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountSpotifyOAuthType ¶
type LinkedAccountSpotifyOAuthType string
const (
LinkedAccountSpotifyOAuthTypeSpotifyOAuth LinkedAccountSpotifyOAuthType = "spotify_oauth"
)
type LinkedAccountTelegram ¶
type LinkedAccountTelegram struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
TelegramUserID string `json:"telegram_user_id" api:"required"`
// Any of "telegram".
Type LinkedAccountTelegramType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
FirstName string `json:"first_name" api:"nullable"`
LastName string `json:"last_name" api:"nullable"`
PhotoURL string `json:"photo_url" api:"nullable"`
Username string `json:"username" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
TelegramUserID respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
FirstName respjson.Field
LastName respjson.Field
PhotoURL respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Telegram account linked to the user.
func (LinkedAccountTelegram) RawJSON ¶
func (r LinkedAccountTelegram) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountTelegram) UnmarshalJSON ¶
func (r *LinkedAccountTelegram) UnmarshalJSON(data []byte) error
type LinkedAccountTelegramInput ¶ added in v0.0.4
type LinkedAccountTelegramInput struct {
TelegramUserID string `json:"telegram_user_id" api:"required"`
FirstName param.Opt[string] `json:"first_name,omitzero"`
LastName param.Opt[string] `json:"last_name,omitzero"`
PhotoURL param.Opt[string] `json:"photo_url,omitzero"`
Username param.Opt[string] `json:"username,omitzero"`
// This field can be elided, and will marshal its zero value as "telegram".
Type constant.Telegram `json:"type" default:"telegram"`
// contains filtered or unexported fields
}
The payload for importing a Telegram account.
The properties TelegramUserID, Type are required.
func (LinkedAccountTelegramInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountTelegramInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountTelegramInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountTelegramInput) UnmarshalJSON(data []byte) error
type LinkedAccountTelegramType ¶
type LinkedAccountTelegramType string
const (
LinkedAccountTelegramTypeTelegram LinkedAccountTelegramType = "telegram"
)
type LinkedAccountTiktokInput ¶ added in v0.0.4
type LinkedAccountTiktokInput struct {
Name param.Opt[string] `json:"name,omitzero" api:"required"`
Subject string `json:"subject" api:"required"`
Username string `json:"username" api:"required"`
// This field can be elided, and will marshal its zero value as "tiktok_oauth".
Type constant.TiktokOAuth `json:"type" default:"tiktok_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Tiktok account.
The properties Name, Subject, Type, Username are required.
func (LinkedAccountTiktokInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountTiktokInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountTiktokInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountTiktokInput) UnmarshalJSON(data []byte) error
type LinkedAccountTiktokOAuth ¶
type LinkedAccountTiktokOAuth struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Name string `json:"name" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "tiktok_oauth".
Type LinkedAccountTiktokOAuthType `json:"type" api:"required"`
Username string `json:"username" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Name respjson.Field
Subject respjson.Field
Type respjson.Field
Username respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A TikTok OAuth account linked to the user.
func (LinkedAccountTiktokOAuth) RawJSON ¶
func (r LinkedAccountTiktokOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountTiktokOAuth) UnmarshalJSON ¶
func (r *LinkedAccountTiktokOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountTiktokOAuthType ¶
type LinkedAccountTiktokOAuthType string
const (
LinkedAccountTiktokOAuthTypeTiktokOAuth LinkedAccountTiktokOAuthType = "tiktok_oauth"
)
type LinkedAccountTwitchInput ¶ added in v0.0.4
type LinkedAccountTwitchInput struct {
Subject string `json:"subject" api:"required"`
Username param.Opt[string] `json:"username,omitzero"`
// This field can be elided, and will marshal its zero value as "twitch_oauth".
Type constant.TwitchOAuth `json:"type" default:"twitch_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Twitch account.
The properties Subject, Type are required.
func (LinkedAccountTwitchInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountTwitchInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountTwitchInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountTwitchInput) UnmarshalJSON(data []byte) error
type LinkedAccountTwitchOAuth ¶
type LinkedAccountTwitchOAuth struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "twitch_oauth".
Type LinkedAccountTwitchOAuthType `json:"type" api:"required"`
Username string `json:"username" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Subject respjson.Field
Type respjson.Field
Username respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Twitch OAuth account linked to the user.
func (LinkedAccountTwitchOAuth) RawJSON ¶
func (r LinkedAccountTwitchOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountTwitchOAuth) UnmarshalJSON ¶
func (r *LinkedAccountTwitchOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountTwitchOAuthType ¶
type LinkedAccountTwitchOAuthType string
const (
LinkedAccountTwitchOAuthTypeTwitchOAuth LinkedAccountTwitchOAuthType = "twitch_oauth"
)
type LinkedAccountTwitterInput ¶ added in v0.0.4
type LinkedAccountTwitterInput struct {
Name string `json:"name" api:"required"`
Subject string `json:"subject" api:"required"`
Username string `json:"username" api:"required"`
ProfilePictureURL param.Opt[string] `json:"profile_picture_url,omitzero" format:"uri"`
// This field can be elided, and will marshal its zero value as "twitter_oauth".
Type constant.TwitterOAuth `json:"type" default:"twitter_oauth"`
// contains filtered or unexported fields
}
The payload for importing a Twitter account.
The properties Name, Subject, Type, Username are required.
func (LinkedAccountTwitterInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountTwitterInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountTwitterInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountTwitterInput) UnmarshalJSON(data []byte) error
type LinkedAccountTwitterOAuth ¶
type LinkedAccountTwitterOAuth struct {
FirstVerifiedAt float64 `json:"first_verified_at" api:"required"`
LatestVerifiedAt float64 `json:"latest_verified_at" api:"required"`
Name string `json:"name" api:"required"`
ProfilePictureURL string `json:"profile_picture_url" api:"required"`
Subject string `json:"subject" api:"required"`
// Any of "twitter_oauth".
Type LinkedAccountTwitterOAuthType `json:"type" api:"required"`
Username string `json:"username" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Name respjson.Field
ProfilePictureURL respjson.Field
Subject respjson.Field
Type respjson.Field
Username respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Twitter OAuth account linked to the user.
func (LinkedAccountTwitterOAuth) RawJSON ¶
func (r LinkedAccountTwitterOAuth) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountTwitterOAuth) UnmarshalJSON ¶
func (r *LinkedAccountTwitterOAuth) UnmarshalJSON(data []byte) error
type LinkedAccountTwitterOAuthType ¶
type LinkedAccountTwitterOAuthType string
const (
LinkedAccountTwitterOAuthTypeTwitterOAuth LinkedAccountTwitterOAuthType = "twitter_oauth"
)
type LinkedAccountType ¶
type LinkedAccountType string
The possible types of linked accounts.
const ( LinkedAccountTypeEmail LinkedAccountType = "email" LinkedAccountTypePhone LinkedAccountType = "phone" LinkedAccountTypeWallet LinkedAccountType = "wallet" LinkedAccountTypeSmartWallet LinkedAccountType = "smart_wallet" LinkedAccountTypeGoogleOAuth LinkedAccountType = "google_oauth" LinkedAccountTypeTwitterOAuth LinkedAccountType = "twitter_oauth" LinkedAccountTypeDiscordOAuth LinkedAccountType = "discord_oauth" LinkedAccountTypeGitHubOAuth LinkedAccountType = "github_oauth" LinkedAccountTypeSpotifyOAuth LinkedAccountType = "spotify_oauth" LinkedAccountTypeInstagramOAuth LinkedAccountType = "instagram_oauth" LinkedAccountTypeTiktokOAuth LinkedAccountType = "tiktok_oauth" LinkedAccountTypeLineOAuth LinkedAccountType = "line_oauth" LinkedAccountTypeTwitchOAuth LinkedAccountType = "twitch_oauth" LinkedAccountTypeLinkedinOAuth LinkedAccountType = "linkedin_oauth" LinkedAccountTypeAppleOAuth LinkedAccountType = "apple_oauth" LinkedAccountTypeCustomAuth LinkedAccountType = "custom_auth" LinkedAccountTypeFarcaster LinkedAccountType = "farcaster" LinkedAccountTypePasskey LinkedAccountType = "passkey" LinkedAccountTypeTelegram LinkedAccountType = "telegram" LinkedAccountTypeCrossApp LinkedAccountType = "cross_app" LinkedAccountTypeAuthorizationKey LinkedAccountType = "authorization_key" )
type LinkedAccountUnion ¶
type LinkedAccountUnion struct {
Address string `json:"address"`
FirstVerifiedAt float64 `json:"first_verified_at"`
LatestVerifiedAt float64 `json:"latest_verified_at"`
Type string `json:"type"`
VerifiedAt float64 `json:"verified_at"`
// This field is from variant [LinkedAccountPhone].
PhoneNumber string `json:"phoneNumber"`
// This field is from variant [LinkedAccountPhone].
Number string `json:"number"`
ChainType string `json:"chain_type"`
WalletClient string `json:"wallet_client"`
ChainID string `json:"chain_id"`
ConnectorType string `json:"connector_type"`
WalletClientType string `json:"wallet_client_type"`
// This field is from variant [LinkedAccountSmartWallet].
SmartWalletType SmartWalletType `json:"smart_wallet_type"`
// This field is from variant [LinkedAccountSmartWallet].
SmartWalletVersion string `json:"smart_wallet_version"`
ID string `json:"id"`
Delegated bool `json:"delegated"`
Imported bool `json:"imported"`
// This field is from variant [LinkedAccountEthereumEmbeddedWallet].
RecoveryMethod EmbeddedWalletRecoveryMethod `json:"recovery_method"`
WalletIndex float64 `json:"wallet_index"`
PublicKey string `json:"public_key"`
Email string `json:"email"`
Name string `json:"name"`
Subject string `json:"subject"`
ProfilePictureURL string `json:"profile_picture_url"`
Username string `json:"username"`
// This field is from variant [LinkedAccountLinkedInOAuth].
VanityName string `json:"vanity_name"`
// This field is from variant [LinkedAccountCustomJwt].
CustomUserID string `json:"custom_user_id"`
// This field is from variant [LinkedAccountFarcaster].
Fid float64 `json:"fid"`
// This field is from variant [LinkedAccountFarcaster].
OwnerAddress string `json:"owner_address"`
// This field is from variant [LinkedAccountFarcaster].
Bio string `json:"bio"`
// This field is from variant [LinkedAccountFarcaster].
DisplayName string `json:"display_name"`
// This field is from variant [LinkedAccountFarcaster].
HomepageURL string `json:"homepage_url"`
// This field is from variant [LinkedAccountFarcaster].
ProfilePicture string `json:"profile_picture"`
// This field is from variant [LinkedAccountFarcaster].
SignerPublicKey string `json:"signer_public_key"`
// This field is from variant [LinkedAccountPasskey].
CredentialID string `json:"credential_id"`
// This field is from variant [LinkedAccountPasskey].
EnrolledInMfa bool `json:"enrolled_in_mfa"`
// This field is from variant [LinkedAccountPasskey].
AuthenticatorName string `json:"authenticator_name"`
// This field is from variant [LinkedAccountPasskey].
CreatedWithBrowser string `json:"created_with_browser"`
// This field is from variant [LinkedAccountPasskey].
CreatedWithDevice string `json:"created_with_device"`
// This field is from variant [LinkedAccountPasskey].
CreatedWithOs string `json:"created_with_os"`
// This field is from variant [LinkedAccountTelegram].
TelegramUserID string `json:"telegram_user_id"`
// This field is from variant [LinkedAccountTelegram].
FirstName string `json:"first_name"`
// This field is from variant [LinkedAccountTelegram].
LastName string `json:"last_name"`
// This field is from variant [LinkedAccountTelegram].
PhotoURL string `json:"photo_url"`
// This field is from variant [LinkedAccountCrossApp].
EmbeddedWallets []CrossAppEmbeddedWallet `json:"embedded_wallets"`
// This field is from variant [LinkedAccountCrossApp].
ProviderAppID string `json:"provider_app_id"`
// This field is from variant [LinkedAccountCrossApp].
SmartWallets []CrossAppSmartWallet `json:"smart_wallets"`
JSON struct {
Address respjson.Field
FirstVerifiedAt respjson.Field
LatestVerifiedAt respjson.Field
Type respjson.Field
VerifiedAt respjson.Field
PhoneNumber respjson.Field
Number respjson.Field
ChainType respjson.Field
WalletClient respjson.Field
ChainID respjson.Field
ConnectorType respjson.Field
WalletClientType respjson.Field
SmartWalletType respjson.Field
SmartWalletVersion respjson.Field
ID respjson.Field
Delegated respjson.Field
Imported respjson.Field
RecoveryMethod respjson.Field
WalletIndex respjson.Field
PublicKey respjson.Field
Email respjson.Field
Name respjson.Field
Subject respjson.Field
ProfilePictureURL respjson.Field
Username respjson.Field
VanityName respjson.Field
CustomUserID respjson.Field
Fid respjson.Field
OwnerAddress respjson.Field
Bio respjson.Field
DisplayName respjson.Field
HomepageURL respjson.Field
ProfilePicture respjson.Field
SignerPublicKey respjson.Field
CredentialID respjson.Field
EnrolledInMfa respjson.Field
AuthenticatorName respjson.Field
CreatedWithBrowser respjson.Field
CreatedWithDevice respjson.Field
CreatedWithOs respjson.Field
TelegramUserID respjson.Field
FirstName respjson.Field
LastName respjson.Field
PhotoURL respjson.Field
EmbeddedWallets respjson.Field
ProviderAppID respjson.Field
SmartWallets respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LinkedAccountUnion contains all possible properties and values from LinkedAccountEmail, LinkedAccountPhone, LinkedAccountEthereum, LinkedAccountSolana, LinkedAccountSmartWallet, LinkedAccountEthereumEmbeddedWallet, LinkedAccountSolanaEmbeddedWallet, LinkedAccountBitcoinSegwitEmbeddedWallet, LinkedAccountBitcoinTaprootEmbeddedWallet, LinkedAccountCurveSigningEmbeddedWallet, LinkedAccountGoogleOAuth, LinkedAccountTwitterOAuth, LinkedAccountDiscordOAuth, LinkedAccountGitHubOAuth, LinkedAccountSpotifyOAuth, LinkedAccountInstagramOAuth, LinkedAccountTiktokOAuth, LinkedAccountLineOAuth, LinkedAccountTwitchOAuth, LinkedAccountLinkedInOAuth, LinkedAccountAppleOAuth, LinkedAccountCustomOAuth, LinkedAccountCustomJwt, LinkedAccountFarcaster, LinkedAccountPasskey, LinkedAccountTelegram, LinkedAccountCrossApp, LinkedAccountAuthorizationKey.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LinkedAccountUnion) AsLinkedAccountAppleOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountAppleOAuth() (v LinkedAccountAppleOAuth)
func (LinkedAccountUnion) AsLinkedAccountAuthorizationKey ¶
func (u LinkedAccountUnion) AsLinkedAccountAuthorizationKey() (v LinkedAccountAuthorizationKey)
func (LinkedAccountUnion) AsLinkedAccountBitcoinSegwitEmbeddedWallet ¶
func (u LinkedAccountUnion) AsLinkedAccountBitcoinSegwitEmbeddedWallet() (v LinkedAccountBitcoinSegwitEmbeddedWallet)
func (LinkedAccountUnion) AsLinkedAccountBitcoinTaprootEmbeddedWallet ¶
func (u LinkedAccountUnion) AsLinkedAccountBitcoinTaprootEmbeddedWallet() (v LinkedAccountBitcoinTaprootEmbeddedWallet)
func (LinkedAccountUnion) AsLinkedAccountCrossApp ¶
func (u LinkedAccountUnion) AsLinkedAccountCrossApp() (v LinkedAccountCrossApp)
func (LinkedAccountUnion) AsLinkedAccountCurveSigningEmbeddedWallet ¶
func (u LinkedAccountUnion) AsLinkedAccountCurveSigningEmbeddedWallet() (v LinkedAccountCurveSigningEmbeddedWallet)
func (LinkedAccountUnion) AsLinkedAccountCustomJwt ¶
func (u LinkedAccountUnion) AsLinkedAccountCustomJwt() (v LinkedAccountCustomJwt)
func (LinkedAccountUnion) AsLinkedAccountCustomOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountCustomOAuth() (v LinkedAccountCustomOAuth)
func (LinkedAccountUnion) AsLinkedAccountDiscordOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountDiscordOAuth() (v LinkedAccountDiscordOAuth)
func (LinkedAccountUnion) AsLinkedAccountEmail ¶
func (u LinkedAccountUnion) AsLinkedAccountEmail() (v LinkedAccountEmail)
func (LinkedAccountUnion) AsLinkedAccountEthereum ¶
func (u LinkedAccountUnion) AsLinkedAccountEthereum() (v LinkedAccountEthereum)
func (LinkedAccountUnion) AsLinkedAccountEthereumEmbeddedWallet ¶
func (u LinkedAccountUnion) AsLinkedAccountEthereumEmbeddedWallet() (v LinkedAccountEthereumEmbeddedWallet)
func (LinkedAccountUnion) AsLinkedAccountFarcaster ¶
func (u LinkedAccountUnion) AsLinkedAccountFarcaster() (v LinkedAccountFarcaster)
func (LinkedAccountUnion) AsLinkedAccountGitHubOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountGitHubOAuth() (v LinkedAccountGitHubOAuth)
func (LinkedAccountUnion) AsLinkedAccountGoogleOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountGoogleOAuth() (v LinkedAccountGoogleOAuth)
func (LinkedAccountUnion) AsLinkedAccountInstagramOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountInstagramOAuth() (v LinkedAccountInstagramOAuth)
func (LinkedAccountUnion) AsLinkedAccountLineOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountLineOAuth() (v LinkedAccountLineOAuth)
func (LinkedAccountUnion) AsLinkedAccountLinkedInOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountLinkedInOAuth() (v LinkedAccountLinkedInOAuth)
func (LinkedAccountUnion) AsLinkedAccountPasskey ¶
func (u LinkedAccountUnion) AsLinkedAccountPasskey() (v LinkedAccountPasskey)
func (LinkedAccountUnion) AsLinkedAccountPhone ¶
func (u LinkedAccountUnion) AsLinkedAccountPhone() (v LinkedAccountPhone)
func (LinkedAccountUnion) AsLinkedAccountSmartWallet ¶
func (u LinkedAccountUnion) AsLinkedAccountSmartWallet() (v LinkedAccountSmartWallet)
func (LinkedAccountUnion) AsLinkedAccountSolana ¶
func (u LinkedAccountUnion) AsLinkedAccountSolana() (v LinkedAccountSolana)
func (LinkedAccountUnion) AsLinkedAccountSolanaEmbeddedWallet ¶
func (u LinkedAccountUnion) AsLinkedAccountSolanaEmbeddedWallet() (v LinkedAccountSolanaEmbeddedWallet)
func (LinkedAccountUnion) AsLinkedAccountSpotifyOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountSpotifyOAuth() (v LinkedAccountSpotifyOAuth)
func (LinkedAccountUnion) AsLinkedAccountTelegram ¶
func (u LinkedAccountUnion) AsLinkedAccountTelegram() (v LinkedAccountTelegram)
func (LinkedAccountUnion) AsLinkedAccountTiktokOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountTiktokOAuth() (v LinkedAccountTiktokOAuth)
func (LinkedAccountUnion) AsLinkedAccountTwitchOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountTwitchOAuth() (v LinkedAccountTwitchOAuth)
func (LinkedAccountUnion) AsLinkedAccountTwitterOAuth ¶
func (u LinkedAccountUnion) AsLinkedAccountTwitterOAuth() (v LinkedAccountTwitterOAuth)
func (LinkedAccountUnion) RawJSON ¶
func (u LinkedAccountUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedAccountUnion) UnmarshalJSON ¶
func (r *LinkedAccountUnion) UnmarshalJSON(data []byte) error
type LinkedAccountWalletInput ¶ added in v0.0.4
type LinkedAccountWalletInput struct {
Address string `json:"address" api:"required"`
// The wallet chain types that offer first class support.
//
// Any of "ethereum", "solana".
ChainType FirstClassChainType `json:"chain_type,omitzero" api:"required"`
// This field can be elided, and will marshal its zero value as "wallet".
Type constant.Wallet `json:"type" default:"wallet"`
// contains filtered or unexported fields
}
The payload for importing a wallet account.
The properties Address, ChainType, Type are required.
func (LinkedAccountWalletInput) MarshalJSON ¶ added in v0.0.4
func (r LinkedAccountWalletInput) MarshalJSON() (data []byte, err error)
func (*LinkedAccountWalletInput) UnmarshalJSON ¶ added in v0.0.4
func (r *LinkedAccountWalletInput) UnmarshalJSON(data []byte) error
type LinkedMfaMethodUnion ¶
type LinkedMfaMethodUnion struct {
// Any of "sms", "totp", "passkey", "email".
Type string `json:"type"`
VerifiedAt float64 `json:"verified_at"`
JSON struct {
Type respjson.Field
VerifiedAt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
LinkedMfaMethodUnion contains all possible properties and values from SMSMfaMethod, TotpMfaMethod, PasskeyMfaMethod, EmailMfaMethod.
Use the LinkedMfaMethodUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (LinkedMfaMethodUnion) AsAny ¶
func (u LinkedMfaMethodUnion) AsAny() anyLinkedMfaMethod
Use the following switch statement to find the correct variant
switch variant := LinkedMfaMethodUnion.AsAny().(type) {
case privyclient.SMSMfaMethod:
case privyclient.TotpMfaMethod:
case privyclient.PasskeyMfaMethod:
case privyclient.EmailMfaMethod:
default:
fmt.Errorf("no variant present")
}
func (LinkedMfaMethodUnion) AsEmail ¶ added in v0.15.0
func (u LinkedMfaMethodUnion) AsEmail() (v EmailMfaMethod)
func (LinkedMfaMethodUnion) AsPasskey ¶
func (u LinkedMfaMethodUnion) AsPasskey() (v PasskeyMfaMethod)
func (LinkedMfaMethodUnion) AsSMS ¶
func (u LinkedMfaMethodUnion) AsSMS() (v SMSMfaMethod)
func (LinkedMfaMethodUnion) AsTotp ¶
func (u LinkedMfaMethodUnion) AsTotp() (v TotpMfaMethod)
func (LinkedMfaMethodUnion) RawJSON ¶
func (u LinkedMfaMethodUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedMfaMethodUnion) UnmarshalJSON ¶
func (r *LinkedMfaMethodUnion) UnmarshalJSON(data []byte) error
type LogLevel ¶
type LogLevel int
LogLevel represents the severity level for logging
const ( // LogLevelNone disables all logging (default) LogLevelNone LogLevel = iota // LogLevelError shows only error messages LogLevelError // LogLevelInfo shows error and info messages LogLevelInfo // LogLevelDebug shows error, info, and debug messages LogLevelDebug // LogLevelVerbose shows all messages (error, info, debug, verbose) LogLevelVerbose )
type MessageSigningCondition ¶ added in v0.11.0
type MessageSigningCondition struct {
// Supported fields for message signing conditions.
//
// Any of "content", "byte_length".
Field MessageSigningField `json:"field,omitzero" api:"required"`
// Any of "message".
FieldSource MessageSigningConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Condition on the message being signed (e.g. in personal_sign).
The properties Field, FieldSource, Operator, Value are required.
func (MessageSigningCondition) MarshalJSON ¶ added in v0.11.0
func (r MessageSigningCondition) MarshalJSON() (data []byte, err error)
func (*MessageSigningCondition) UnmarshalJSON ¶ added in v0.11.0
func (r *MessageSigningCondition) UnmarshalJSON(data []byte) error
type MessageSigningConditionFieldSource ¶ added in v0.11.0
type MessageSigningConditionFieldSource string
const (
MessageSigningConditionFieldSourceMessage MessageSigningConditionFieldSource = "message"
)
type MessageSigningConditionResp ¶ added in v0.11.0
type MessageSigningConditionResp struct {
// Supported fields for message signing conditions.
//
// Any of "content", "byte_length".
Field MessageSigningField `json:"field" api:"required"`
// Any of "message".
FieldSource MessageSigningConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Condition on the message being signed (e.g. in personal_sign).
func (MessageSigningConditionResp) RawJSON ¶ added in v0.11.0
func (r MessageSigningConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (MessageSigningConditionResp) ToParam ¶ added in v0.11.0
func (r MessageSigningConditionResp) ToParam() MessageSigningCondition
ToParam converts this MessageSigningConditionResp to a MessageSigningCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MessageSigningCondition.Overrides()
func (*MessageSigningConditionResp) UnmarshalJSON ¶ added in v0.11.0
func (r *MessageSigningConditionResp) UnmarshalJSON(data []byte) error
type MessageSigningField ¶ added in v0.11.0
type MessageSigningField string
Supported fields for message signing conditions.
const ( MessageSigningFieldContent MessageSigningField = "content" MessageSigningFieldByteLength MessageSigningField = "byte_length" )
type MfaDisabledWebhookPayload ¶ added in v0.7.0
type MfaDisabledWebhookPayload struct {
// A multi-factor authentication method supported by the app.
//
// Any of "sms", "totp", "passkey", "email".
Method MfaMethod `json:"method" api:"required"`
// The type of webhook event.
//
// Any of "mfa.disabled".
Type MfaDisabledWebhookPayloadType `json:"type" api:"required"`
// The ID of the user who disabled MFA.
UserID string `json:"user_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Type respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the mfa.disabled webhook event.
func (MfaDisabledWebhookPayload) RawJSON ¶ added in v0.7.0
func (r MfaDisabledWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*MfaDisabledWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *MfaDisabledWebhookPayload) UnmarshalJSON(data []byte) error
type MfaDisabledWebhookPayloadType ¶ added in v0.7.0
type MfaDisabledWebhookPayloadType string
The type of webhook event.
const (
MfaDisabledWebhookPayloadTypeMfaDisabled MfaDisabledWebhookPayloadType = "mfa.disabled"
)
type MfaEnabledWebhookPayload ¶ added in v0.7.0
type MfaEnabledWebhookPayload struct {
// A multi-factor authentication method supported by the app.
//
// Any of "sms", "totp", "passkey", "email".
Method MfaMethod `json:"method" api:"required"`
// The type of webhook event.
//
// Any of "mfa.enabled".
Type MfaEnabledWebhookPayloadType `json:"type" api:"required"`
// The ID of the user who enabled MFA.
UserID string `json:"user_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Type respjson.Field
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the mfa.enabled webhook event.
func (MfaEnabledWebhookPayload) RawJSON ¶ added in v0.7.0
func (r MfaEnabledWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*MfaEnabledWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *MfaEnabledWebhookPayload) UnmarshalJSON(data []byte) error
type MfaEnabledWebhookPayloadType ¶ added in v0.7.0
type MfaEnabledWebhookPayloadType string
The type of webhook event.
const (
MfaEnabledWebhookPayloadTypeMfaEnabled MfaEnabledWebhookPayloadType = "mfa.enabled"
)
type MfaMethod ¶ added in v0.11.0
type MfaMethod string
A multi-factor authentication method supported by the app.
type NamedTokenTransferSource ¶ added in v0.7.0
type NamedTokenTransferSource struct {
// The asset to transfer. Supported: 'usdc', 'usdb', 'usdt', 'pathusd'
// (stablecoins), 'eth' (native Ethereum), 'sol' (native Solana).
Asset string `json:"asset" api:"required"`
// The blockchain network on which to perform the transfer. Supported chains
// include: 'tempo', 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and their
// respective testnets.
Chain string `json:"chain" api:"required"`
// Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
// USDC, "0.01" for 0.01 ETH). For exact_input, specifies the amount to send. Not
// in the smallest on-chain unit (wei, lamports, etc.). Maximum 100 characters.
// Deprecated: use the top-level `amount` field instead.
//
// Deprecated: deprecated
Amount param.Opt[string] `json:"amount,omitzero"`
// contains filtered or unexported fields
}
Source for a transfer identified by a named asset (e.g. "usdc", "eth"). Use this variant for first-class assets maintained by Privy.
The properties Asset, Chain are required.
func (NamedTokenTransferSource) MarshalJSON ¶ added in v0.7.0
func (r NamedTokenTransferSource) MarshalJSON() (data []byte, err error)
func (*NamedTokenTransferSource) UnmarshalJSON ¶ added in v0.7.0
func (r *NamedTokenTransferSource) UnmarshalJSON(data []byte) error
type NamedTokenTransferSourceResp ¶ added in v0.7.0
type NamedTokenTransferSourceResp struct {
// The asset to transfer. Supported: 'usdc', 'usdb', 'usdt', 'pathusd'
// (stablecoins), 'eth' (native Ethereum), 'sol' (native Solana).
Asset string `json:"asset" api:"required"`
// The blockchain network on which to perform the transfer. Supported chains
// include: 'tempo', 'ethereum', 'base', 'arbitrum', 'polygon', 'solana', and their
// respective testnets.
Chain string `json:"chain" api:"required"`
// Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
// USDC, "0.01" for 0.01 ETH). For exact_input, specifies the amount to send. Not
// in the smallest on-chain unit (wei, lamports, etc.). Maximum 100 characters.
// Deprecated: use the top-level `amount` field instead.
//
// Deprecated: deprecated
Amount string `json:"amount"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Asset respjson.Field
Chain respjson.Field
Amount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Source for a transfer identified by a named asset (e.g. "usdc", "eth"). Use this variant for first-class assets maintained by Privy.
func (NamedTokenTransferSourceResp) RawJSON ¶ added in v0.7.0
func (r NamedTokenTransferSourceResp) RawJSON() string
Returns the unmodified JSON received from the API
func (NamedTokenTransferSourceResp) ToParam ¶ added in v0.7.0
func (r NamedTokenTransferSourceResp) ToParam() NamedTokenTransferSource
ToParam converts this NamedTokenTransferSourceResp to a NamedTokenTransferSource.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with NamedTokenTransferSource.Overrides()
func (*NamedTokenTransferSourceResp) UnmarshalJSON ¶ added in v0.7.0
func (r *NamedTokenTransferSourceResp) UnmarshalJSON(data []byte) error
type OAuthService ¶ added in v0.9.0
type OAuthService struct {
Options []option.RequestOption
}
OAuthService contains methods and other services that help with interacting with the Privy API 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 NewOAuthService method instead.
func NewOAuthService ¶ added in v0.9.0
func NewOAuthService(opts ...option.RequestOption) (r OAuthService)
NewOAuthService 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 OnrampService ¶ added in v0.9.0
type OnrampService struct {
Options []option.RequestOption
}
OnrampService contains methods and other services that help with interacting with the Privy API 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 NewOnrampService method instead.
func NewOnrampService ¶ added in v0.9.0
func NewOnrampService(opts ...option.RequestOption) (r OnrampService)
NewOnrampService 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 OrganizationService ¶ added in v0.7.0
type OrganizationService struct {
Options []option.RequestOption
}
OrganizationService contains methods and other services that help with interacting with the Privy API 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 NewOrganizationService method instead.
func NewOrganizationService ¶ added in v0.7.0
func NewOrganizationService(opts ...option.RequestOption) (r OrganizationService)
NewOrganizationService 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 OutputWithPreviousTransactionData ¶ added in v0.4.0
type OutputWithPreviousTransactionData struct {
PreviousTransactionHash string `json:"previous_transaction_hash" api:"required"`
PreviousTransactionVout float64 `json:"previous_transaction_vout" api:"required"`
// A Spark token output.
Output TokenOutput `json:"output,omitzero"`
// contains filtered or unexported fields
}
A Spark token output with its previous transaction data.
The properties PreviousTransactionHash, PreviousTransactionVout are required.
func (OutputWithPreviousTransactionData) MarshalJSON ¶ added in v0.6.0
func (r OutputWithPreviousTransactionData) MarshalJSON() (data []byte, err error)
func (*OutputWithPreviousTransactionData) UnmarshalJSON ¶ added in v0.4.0
func (r *OutputWithPreviousTransactionData) UnmarshalJSON(data []byte) error
type OutputWithPreviousTransactionDataResp ¶ added in v0.6.0
type OutputWithPreviousTransactionDataResp struct {
PreviousTransactionHash string `json:"previous_transaction_hash" api:"required"`
PreviousTransactionVout float64 `json:"previous_transaction_vout" api:"required"`
// A Spark token output.
Output TokenOutputResp `json:"output"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PreviousTransactionHash respjson.Field
PreviousTransactionVout respjson.Field
Output respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark token output with its previous transaction data.
func (OutputWithPreviousTransactionDataResp) RawJSON ¶ added in v0.6.0
func (r OutputWithPreviousTransactionDataResp) RawJSON() string
Returns the unmodified JSON received from the API
func (OutputWithPreviousTransactionDataResp) ToParam ¶ added in v0.6.0
func (r OutputWithPreviousTransactionDataResp) ToParam() OutputWithPreviousTransactionData
ToParam converts this OutputWithPreviousTransactionDataResp to a OutputWithPreviousTransactionData.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OutputWithPreviousTransactionData.Overrides()
func (*OutputWithPreviousTransactionDataResp) UnmarshalJSON ¶ added in v0.6.0
func (r *OutputWithPreviousTransactionDataResp) UnmarshalJSON(data []byte) error
type OwnerIDInput ¶ added in v0.5.0
type OwnerIDInput = string
type OwnerInputPublicKey ¶ added in v0.5.0
type OwnerInputPublicKey struct {
// A P-256 (secp256r1) public key.
PublicKey P256PublicKey `json:"public_key" api:"required"`
// contains filtered or unexported fields
}
Owner input specifying a P-256 public key.
The property PublicKey is required.
func (OwnerInputPublicKey) MarshalJSON ¶ added in v0.6.0
func (r OwnerInputPublicKey) MarshalJSON() (data []byte, err error)
func (*OwnerInputPublicKey) UnmarshalJSON ¶ added in v0.5.0
func (r *OwnerInputPublicKey) UnmarshalJSON(data []byte) error
type OwnerInputPublicKeyResp ¶ added in v0.6.0
type OwnerInputPublicKeyResp struct {
// A P-256 (secp256r1) public key.
PublicKey P256PublicKey `json:"public_key" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PublicKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Owner input specifying a P-256 public key.
func (OwnerInputPublicKeyResp) RawJSON ¶ added in v0.6.0
func (r OwnerInputPublicKeyResp) RawJSON() string
Returns the unmodified JSON received from the API
func (OwnerInputPublicKeyResp) ToParam ¶ added in v0.6.0
func (r OwnerInputPublicKeyResp) ToParam() OwnerInputPublicKey
ToParam converts this OwnerInputPublicKeyResp to a OwnerInputPublicKey.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OwnerInputPublicKey.Overrides()
func (*OwnerInputPublicKeyResp) UnmarshalJSON ¶ added in v0.6.0
func (r *OwnerInputPublicKeyResp) UnmarshalJSON(data []byte) error
type OwnerInputUnion ¶ added in v0.4.0
type OwnerInputUnion struct {
OfOwnerInputUser *OwnerInputUser `json:",omitzero,inline"`
OfOwnerInputPublicKey *OwnerInputPublicKey `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func OwnerInputOfOwnerInputPublicKey ¶ added in v0.6.0
func OwnerInputOfOwnerInputPublicKey(publicKey P256PublicKey) OwnerInputUnion
func OwnerInputOfOwnerInputUser ¶ added in v0.6.0
func OwnerInputOfOwnerInputUser(userID string) OwnerInputUnion
func (OwnerInputUnion) MarshalJSON ¶ added in v0.6.0
func (u OwnerInputUnion) MarshalJSON() ([]byte, error)
func (*OwnerInputUnion) UnmarshalJSON ¶ added in v0.4.0
func (u *OwnerInputUnion) UnmarshalJSON(data []byte) error
type OwnerInputUnionResp ¶ added in v0.6.0
type OwnerInputUnionResp struct {
// This field is from variant [OwnerInputUserResp].
UserID string `json:"user_id"`
// This field is from variant [OwnerInputPublicKeyResp].
PublicKey P256PublicKey `json:"public_key"`
JSON struct {
UserID respjson.Field
PublicKey respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OwnerInputUnionResp contains all possible properties and values from OwnerInputUserResp, OwnerInputPublicKeyResp.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (OwnerInputUnionResp) AsOwnerInputPublicKey ¶ added in v0.6.0
func (u OwnerInputUnionResp) AsOwnerInputPublicKey() (v OwnerInputPublicKeyResp)
func (OwnerInputUnionResp) AsOwnerInputUser ¶ added in v0.6.0
func (u OwnerInputUnionResp) AsOwnerInputUser() (v OwnerInputUserResp)
func (OwnerInputUnionResp) RawJSON ¶ added in v0.6.0
func (u OwnerInputUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (OwnerInputUnionResp) ToParam ¶ added in v0.6.0
func (r OwnerInputUnionResp) ToParam() OwnerInputUnion
ToParam converts this OwnerInputUnionResp to a OwnerInputUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OwnerInputUnion.Overrides()
func (*OwnerInputUnionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *OwnerInputUnionResp) UnmarshalJSON(data []byte) error
type OwnerInputUser ¶ added in v0.5.0
type OwnerInputUser struct {
UserID string `json:"user_id" api:"required"`
// contains filtered or unexported fields
}
Owner input specifying a Privy user ID.
The property UserID is required.
func (OwnerInputUser) MarshalJSON ¶ added in v0.6.0
func (r OwnerInputUser) MarshalJSON() (data []byte, err error)
func (*OwnerInputUser) UnmarshalJSON ¶ added in v0.5.0
func (r *OwnerInputUser) UnmarshalJSON(data []byte) error
type OwnerInputUserResp ¶ added in v0.6.0
type OwnerInputUserResp struct {
UserID string `json:"user_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
UserID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Owner input specifying a Privy user ID.
func (OwnerInputUserResp) RawJSON ¶ added in v0.6.0
func (r OwnerInputUserResp) RawJSON() string
Returns the unmodified JSON received from the API
func (OwnerInputUserResp) ToParam ¶ added in v0.6.0
func (r OwnerInputUserResp) ToParam() OwnerInputUser
ToParam converts this OwnerInputUserResp to a OwnerInputUser.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OwnerInputUser.Overrides()
func (*OwnerInputUserResp) UnmarshalJSON ¶ added in v0.6.0
func (r *OwnerInputUserResp) UnmarshalJSON(data []byte) error
type P256PublicKey ¶ added in v0.4.0
type P256PublicKey = string
type PasskeyMfaMethod ¶
type PasskeyMfaMethod struct {
// Any of "passkey".
Type PasskeyMfaMethodType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Passkey MFA method.
func (PasskeyMfaMethod) RawJSON ¶
func (r PasskeyMfaMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*PasskeyMfaMethod) UnmarshalJSON ¶
func (r *PasskeyMfaMethod) UnmarshalJSON(data []byte) error
type PasskeyMfaMethodType ¶
type PasskeyMfaMethodType string
const (
PasskeyMfaMethodTypePasskey PasskeyMfaMethodType = "passkey"
)
type PhoneInviteInput ¶ added in v0.4.0
type PhoneInviteInput struct {
// Any of "phone".
Type PhoneInviteInputType `json:"type,omitzero" api:"required"`
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
Allowlist invite input for a phone number.
The properties Type, Value are required.
func (PhoneInviteInput) MarshalJSON ¶ added in v0.4.0
func (r PhoneInviteInput) MarshalJSON() (data []byte, err error)
func (*PhoneInviteInput) UnmarshalJSON ¶ added in v0.4.0
func (r *PhoneInviteInput) UnmarshalJSON(data []byte) error
type PhoneInviteInputType ¶ added in v0.4.0
type PhoneInviteInputType string
const (
PhoneInviteInputTypePhone PhoneInviteInputType = "phone"
)
type Policy ¶
type Policy struct {
// Unique ID of the created policy. This will be the primary identifier when using
// the policy in the future.
ID string `json:"id" api:"required"`
// The wallet chain types.
//
// Any of "ethereum", "solana", "cosmos", "stellar", "sui", "aptos", "movement",
// "tron", "bitcoin-segwit", "bitcoin-taproot", "pearl", "near", "ton", "starknet",
// "spark".
ChainType WalletChainType `json:"chain_type" api:"required"`
// Unix timestamp of when the policy was created in milliseconds.
CreatedAt float64 `json:"created_at" api:"required"`
// Name to assign to policy.
Name string `json:"name" api:"required"`
// A unique identifier for a key quorum.
OwnerID KeyQuorumID `json:"owner_id" api:"required" format:"cuid2"`
Rules []PolicyRuleResponse `json:"rules" api:"required"`
// Version of the policy. Currently, 1.0 is the only version.
//
// Any of "1.0".
Version PolicyVersion `json:"version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ChainType respjson.Field
CreatedAt respjson.Field
Name respjson.Field
OwnerID respjson.Field
Rules respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A policy for controlling wallet operations.
func (*Policy) UnmarshalJSON ¶
type PolicyAction ¶ added in v0.5.0
type PolicyAction string
The action to take when a policy rule matches.
const ( PolicyActionAllow PolicyAction = "ALLOW" PolicyActionDeny PolicyAction = "DENY" )
type PolicyConditionUnion ¶ added in v0.5.0
type PolicyConditionUnion struct {
OfEthereumTransaction *EthereumTransactionCondition `json:",omitzero,inline"`
OfEthereumCalldata *EthereumCalldataCondition `json:",omitzero,inline"`
OfEthereumTypedDataDomain *EthereumTypedDataDomainCondition `json:",omitzero,inline"`
OfEthereumTypedDataMessage *EthereumTypedDataMessageCondition `json:",omitzero,inline"`
OfEthereum7702Authorization *Ethereum7702AuthorizationCondition `json:",omitzero,inline"`
OfTempoTransaction *TempoTransactionCondition `json:",omitzero,inline"`
OfSolanaProgramInstruction *SolanaProgramInstructionCondition `json:",omitzero,inline"`
OfSolanaSystemProgramInstruction *SolanaSystemProgramInstructionCondition `json:",omitzero,inline"`
OfSolanaTokenProgramInstruction *SolanaTokenProgramInstructionCondition `json:",omitzero,inline"`
OfSystem *SystemCondition `json:",omitzero,inline"`
OfTronTransaction *TronTransactionCondition `json:",omitzero,inline"`
OfTronTriggerSmartContractData *TronCalldataCondition `json:",omitzero,inline"`
OfSuiTransactionCommand *SuiTransactionCommandCondition `json:",omitzero,inline"`
OfSuiTransferObjectsCommand *SuiTransferObjectsCommandCondition `json:",omitzero,inline"`
OfActionRequestBody *ActionRequestBodyCondition `json:",omitzero,inline"`
OfReference *AggregationCondition `json:",omitzero,inline"`
OfMessage *MessageSigningCondition `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PolicyConditionUnion) MarshalJSON ¶ added in v0.6.0
func (u PolicyConditionUnion) MarshalJSON() ([]byte, error)
func (*PolicyConditionUnion) UnmarshalJSON ¶ added in v0.5.0
func (u *PolicyConditionUnion) UnmarshalJSON(data []byte) error
type PolicyConditionUnionResp ¶ added in v0.6.0
type PolicyConditionUnionResp struct {
Field string `json:"field"`
// Any of "ethereum_transaction", "ethereum_calldata",
// "ethereum_typed_data_domain", "ethereum_typed_data_message",
// "ethereum_7702_authorization", "tempo_transaction",
// "solana_program_instruction", "solana_system_program_instruction",
// "solana_token_program_instruction", "system", "tron_transaction",
// "tron_trigger_smart_contract_data", "sui_transaction_command",
// "sui_transfer_objects_command", "action_request_body", "reference", "message".
FieldSource string `json:"field_source"`
Operator string `json:"operator"`
// This field is a union of [ConditionValueUnionResp],
// [SuiTransactionCommandConditionValueUnionResp]
Value PolicyConditionUnionRespValue `json:"value"`
// This field is from variant [EthereumCalldataConditionResp].
Abi AbiSchemaResp `json:"abi"`
// This field is from variant [EthereumTypedDataMessageConditionResp].
TypedData TypedDataInputResp `json:"typed_data"`
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
Abi respjson.Field
TypedData respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PolicyConditionUnionResp contains all possible properties and values from EthereumTransactionConditionResp, EthereumCalldataConditionResp, EthereumTypedDataDomainConditionResp, EthereumTypedDataMessageConditionResp, Ethereum7702AuthorizationConditionResp, TempoTransactionConditionResp, SolanaProgramInstructionConditionResp, SolanaSystemProgramInstructionConditionResp, SolanaTokenProgramInstructionConditionResp, SystemConditionResp, TronTransactionConditionResp, TronCalldataConditionResp, SuiTransactionCommandConditionResp, SuiTransferObjectsCommandConditionResp, ActionRequestBodyConditionResp, AggregationConditionResp, MessageSigningConditionResp.
Use the PolicyConditionUnionResp.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (PolicyConditionUnionResp) AsActionRequestBody ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsActionRequestBody() (v ActionRequestBodyConditionResp)
func (PolicyConditionUnionResp) AsAny ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsAny() anyPolicyConditionResp
Use the following switch statement to find the correct variant
switch variant := PolicyConditionUnionResp.AsAny().(type) {
case privyclient.EthereumTransactionConditionResp:
case privyclient.EthereumCalldataConditionResp:
case privyclient.EthereumTypedDataDomainConditionResp:
case privyclient.EthereumTypedDataMessageConditionResp:
case privyclient.Ethereum7702AuthorizationConditionResp:
case privyclient.TempoTransactionConditionResp:
case privyclient.SolanaProgramInstructionConditionResp:
case privyclient.SolanaSystemProgramInstructionConditionResp:
case privyclient.SolanaTokenProgramInstructionConditionResp:
case privyclient.SystemConditionResp:
case privyclient.TronTransactionConditionResp:
case privyclient.TronCalldataConditionResp:
case privyclient.SuiTransactionCommandConditionResp:
case privyclient.SuiTransferObjectsCommandConditionResp:
case privyclient.ActionRequestBodyConditionResp:
case privyclient.AggregationConditionResp:
case privyclient.MessageSigningConditionResp:
default:
fmt.Errorf("no variant present")
}
func (PolicyConditionUnionResp) AsEthereum7702Authorization ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsEthereum7702Authorization() (v Ethereum7702AuthorizationConditionResp)
func (PolicyConditionUnionResp) AsEthereumCalldata ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsEthereumCalldata() (v EthereumCalldataConditionResp)
func (PolicyConditionUnionResp) AsEthereumTransaction ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsEthereumTransaction() (v EthereumTransactionConditionResp)
func (PolicyConditionUnionResp) AsEthereumTypedDataDomain ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsEthereumTypedDataDomain() (v EthereumTypedDataDomainConditionResp)
func (PolicyConditionUnionResp) AsEthereumTypedDataMessage ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsEthereumTypedDataMessage() (v EthereumTypedDataMessageConditionResp)
func (PolicyConditionUnionResp) AsMessage ¶ added in v0.11.0
func (u PolicyConditionUnionResp) AsMessage() (v MessageSigningConditionResp)
func (PolicyConditionUnionResp) AsReference ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsReference() (v AggregationConditionResp)
func (PolicyConditionUnionResp) AsSolanaProgramInstruction ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsSolanaProgramInstruction() (v SolanaProgramInstructionConditionResp)
func (PolicyConditionUnionResp) AsSolanaSystemProgramInstruction ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsSolanaSystemProgramInstruction() (v SolanaSystemProgramInstructionConditionResp)
func (PolicyConditionUnionResp) AsSolanaTokenProgramInstruction ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsSolanaTokenProgramInstruction() (v SolanaTokenProgramInstructionConditionResp)
func (PolicyConditionUnionResp) AsSuiTransactionCommand ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsSuiTransactionCommand() (v SuiTransactionCommandConditionResp)
func (PolicyConditionUnionResp) AsSuiTransferObjectsCommand ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsSuiTransferObjectsCommand() (v SuiTransferObjectsCommandConditionResp)
func (PolicyConditionUnionResp) AsSystem ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsSystem() (v SystemConditionResp)
func (PolicyConditionUnionResp) AsTempoTransaction ¶ added in v0.8.0
func (u PolicyConditionUnionResp) AsTempoTransaction() (v TempoTransactionConditionResp)
func (PolicyConditionUnionResp) AsTronTransaction ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsTronTransaction() (v TronTransactionConditionResp)
func (PolicyConditionUnionResp) AsTronTriggerSmartContractData ¶ added in v0.6.0
func (u PolicyConditionUnionResp) AsTronTriggerSmartContractData() (v TronCalldataConditionResp)
func (PolicyConditionUnionResp) RawJSON ¶ added in v0.6.0
func (u PolicyConditionUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (PolicyConditionUnionResp) ToParam ¶ added in v0.6.0
func (r PolicyConditionUnionResp) ToParam() PolicyConditionUnion
ToParam converts this PolicyConditionUnionResp to a PolicyConditionUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PolicyConditionUnion.Overrides()
func (*PolicyConditionUnionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *PolicyConditionUnionResp) UnmarshalJSON(data []byte) error
type PolicyConditionUnionRespValue ¶ added in v0.6.0
type PolicyConditionUnionRespValue struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field will be present if the value is a [SuiCommandName] instead of an
// object.
OfSuiCommandName SuiCommandName `json:",inline"`
// This field will be present if the value is a [[]SuiCommandName] instead of an
// object.
OfSuiCommandNameArray []SuiCommandName `json:",inline"`
JSON struct {
OfString respjson.Field
OfStringArray respjson.Field
OfSuiCommandName respjson.Field
OfSuiCommandNameArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PolicyConditionUnionRespValue is an implicit subunion of PolicyConditionUnionResp. PolicyConditionUnionRespValue provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the PolicyConditionUnionResp.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfStringArray OfSuiCommandName OfSuiCommandNameArray]
func (*PolicyConditionUnionRespValue) UnmarshalJSON ¶ added in v0.6.0
func (r *PolicyConditionUnionRespValue) UnmarshalJSON(data []byte) error
type PolicyDeleteParams ¶
type PolicyDeleteParams struct {
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
type PolicyDeleteRuleParams ¶
type PolicyDeleteRuleParams struct {
PolicyID string `path:"policy_id" api:"required" json:"-"`
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
type PolicyGetRuleParams ¶
type PolicyGetRuleParams struct {
PolicyID string `path:"policy_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type PolicyInput ¶ added in v0.4.0
type PolicyInput []string
type PolicyIntentResponse ¶ added in v0.4.0
type PolicyIntentResponse struct {
// Any of "POLICY".
IntentType string `json:"intent_type" api:"required"`
// The original policy update request that would be sent to the policy endpoint
RequestDetails PolicyIntentResponseRequestDetails `json:"request_details" api:"required"`
// Result of policy update execution (only present if status is 'executed' or
// 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A policy for controlling wallet operations.
CurrentResourceData Policy `json:"current_resource_data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for a policy intent
func (PolicyIntentResponse) RawJSON ¶ added in v0.4.0
func (r PolicyIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PolicyIntentResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *PolicyIntentResponse) UnmarshalJSON(data []byte) error
type PolicyIntentResponseRequestDetails ¶ added in v0.4.0
type PolicyIntentResponseRequestDetails struct {
Body PolicyIntentResponseRequestDetailsBody `json:"body" api:"required"`
// Any of "PATCH".
Method string `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The original policy update request that would be sent to the policy endpoint
func (PolicyIntentResponseRequestDetails) RawJSON ¶ added in v0.4.0
func (r PolicyIntentResponseRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*PolicyIntentResponseRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *PolicyIntentResponseRequestDetails) UnmarshalJSON(data []byte) error
type PolicyIntentResponseRequestDetailsBody ¶ added in v0.4.0
type PolicyIntentResponseRequestDetailsBody struct {
// Name to assign to policy.
Name string `json:"name"`
// The owner of the resource, specified as a Privy user ID, a P-256 public key, or
// null to remove the current owner.
Owner OwnerInputUnionResp `json:"owner" api:"nullable"`
// The key quorum ID to set as the owner of the resource. If you provide this, do
// not specify an owner.
OwnerID OwnerIDInput `json:"owner_id" api:"nullable" format:"cuid2"`
Rules []PolicyRuleRequestBodyResp `json:"rules"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Owner respjson.Field
OwnerID respjson.Field
Rules respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (PolicyIntentResponseRequestDetailsBody) RawJSON ¶ added in v0.4.0
func (r PolicyIntentResponseRequestDetailsBody) RawJSON() string
Returns the unmodified JSON received from the API
func (*PolicyIntentResponseRequestDetailsBody) UnmarshalJSON ¶ added in v0.4.0
func (r *PolicyIntentResponseRequestDetailsBody) UnmarshalJSON(data []byte) error
type PolicyMethod ¶ added in v0.5.0
type PolicyMethod string
Method the rule applies to.
const ( PolicyMethodEthSendTransaction PolicyMethod = "eth_sendTransaction" PolicyMethodEthSignTransaction PolicyMethod = "eth_signTransaction" PolicyMethodEthSignUserOperation PolicyMethod = "eth_signUserOperation" PolicyMethodEthSignTypedDataV4 PolicyMethod = "eth_signTypedData_v4" PolicyMethodPersonalSign PolicyMethod = "personal_sign" PolicyMethodEthSign7702Authorization PolicyMethod = "eth_sign7702Authorization" PolicyMethodWalletSendCalls PolicyMethod = "wallet_sendCalls" PolicyMethodSignTransaction PolicyMethod = "signTransaction" PolicyMethodSignAndSendTransaction PolicyMethod = "signAndSendTransaction" PolicyMethodSignMessage PolicyMethod = "signMessage" PolicyMethodExportPrivateKey PolicyMethod = "exportPrivateKey" PolicyMethodExportSeedPhrase PolicyMethod = "exportSeedPhrase" PolicyMethodSignTransactionBytes PolicyMethod = "signTransactionBytes" PolicyMethodSignRawMessageBytes PolicyMethod = "signRawMessageBytes" PolicyMethodTronSendTransaction PolicyMethod = "tron_sendTransaction" PolicyMethodTronSignTransaction PolicyMethod = "tron_signTransaction" PolicyMethodEarnDeposit PolicyMethod = "earn_deposit" PolicyMethodEarnWithdraw PolicyMethod = "earn_withdraw" PolicyMethodTransfer PolicyMethod = "transfer" PolicyMethodStar PolicyMethod = "*" )
type PolicyNewParams ¶
type PolicyNewParams struct {
// The wallet chain types.
//
// Any of "ethereum", "solana", "cosmos", "stellar", "sui", "aptos", "movement",
// "tron", "bitcoin-segwit", "bitcoin-taproot", "pearl", "near", "ton", "starknet",
// "spark".
ChainType WalletChainType `json:"chain_type,omitzero" api:"required"`
// Name to assign to policy.
Name string `json:"name" api:"required"`
Rules []PolicyNewParamsRule `json:"rules,omitzero" api:"required"`
// Version of the policy. Currently, 1.0 is the only version.
//
// Any of "1.0".
Version PolicyNewParamsVersion `json:"version,omitzero" api:"required"`
// The key quorum ID to set as the owner of the resource. If you provide this, do
// not specify an owner.
OwnerID param.Opt[OwnerIDInput] `json:"owner_id,omitzero" format:"cuid2"`
// Idempotency keys ensure API requests are executed only once within a 24-hour
// window.
PrivyIdempotencyKey param.Opt[string] `header:"privy-idempotency-key,omitzero" json:"-"`
// The owner of the resource, specified as a Privy user ID, a P-256 public key, or
// null to remove the current owner.
Owner OwnerInputUnion `json:"owner,omitzero"`
// contains filtered or unexported fields
}
func (PolicyNewParams) MarshalJSON ¶
func (r PolicyNewParams) MarshalJSON() (data []byte, err error)
func (*PolicyNewParams) UnmarshalJSON ¶
func (r *PolicyNewParams) UnmarshalJSON(data []byte) error
type PolicyNewParamsRule ¶
type PolicyNewParamsRule struct {
// The action to take when a policy rule matches.
//
// Any of "ALLOW", "DENY".
Action PolicyAction `json:"action,omitzero" api:"required"`
Conditions []PolicyConditionUnion `json:"conditions,omitzero" api:"required"`
// Method the rule applies to.
//
// Any of "eth_sendTransaction", "eth_signTransaction", "eth_signUserOperation",
// "eth_signTypedData_v4", "personal_sign", "eth_sign7702Authorization",
// "wallet_sendCalls", "signTransaction", "signAndSendTransaction", "signMessage",
// "exportPrivateKey", "exportSeedPhrase", "signTransactionBytes",
// "signRawMessageBytes", "tron_sendTransaction", "tron_signTransaction",
// "earn_deposit", "earn_withdraw", "transfer", "\*".
Method PolicyMethod `json:"method,omitzero" api:"required"`
Name string `json:"name" api:"required"`
ID param.Opt[string] `json:"id,omitzero"`
// contains filtered or unexported fields
}
The properties Action, Conditions, Method, Name are required.
func (PolicyNewParamsRule) MarshalJSON ¶
func (r PolicyNewParamsRule) MarshalJSON() (data []byte, err error)
func (*PolicyNewParamsRule) UnmarshalJSON ¶
func (r *PolicyNewParamsRule) UnmarshalJSON(data []byte) error
type PolicyNewParamsVersion ¶
type PolicyNewParamsVersion string
Version of the policy. Currently, 1.0 is the only version.
const (
PolicyNewParamsVersion1_0 PolicyNewParamsVersion = "1.0"
)
type PolicyNewRuleParams ¶
type PolicyNewRuleParams struct {
// The rules that apply to each method the policy covers.
PolicyRuleRequestBody PolicyRuleRequestBody
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PolicyNewRuleParams) MarshalJSON ¶
func (r PolicyNewRuleParams) MarshalJSON() (data []byte, err error)
func (*PolicyNewRuleParams) UnmarshalJSON ¶
func (r *PolicyNewRuleParams) UnmarshalJSON(data []byte) error
type PolicyRuleRequestBody ¶ added in v0.5.0
type PolicyRuleRequestBody struct {
// The action to take when a policy rule matches.
//
// Any of "ALLOW", "DENY".
Action PolicyAction `json:"action,omitzero" api:"required"`
Conditions []PolicyConditionUnion `json:"conditions,omitzero" api:"required"`
// Method the rule applies to.
//
// Any of "eth_sendTransaction", "eth_signTransaction", "eth_signUserOperation",
// "eth_signTypedData_v4", "personal_sign", "eth_sign7702Authorization",
// "wallet_sendCalls", "signTransaction", "signAndSendTransaction", "signMessage",
// "exportPrivateKey", "exportSeedPhrase", "signTransactionBytes",
// "signRawMessageBytes", "tron_sendTransaction", "tron_signTransaction",
// "earn_deposit", "earn_withdraw", "transfer", "\*".
Method PolicyMethod `json:"method,omitzero" api:"required"`
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
The rules that apply to each method the policy covers.
The properties Action, Conditions, Method, Name are required.
func (PolicyRuleRequestBody) MarshalJSON ¶ added in v0.6.0
func (r PolicyRuleRequestBody) MarshalJSON() (data []byte, err error)
func (*PolicyRuleRequestBody) UnmarshalJSON ¶ added in v0.5.0
func (r *PolicyRuleRequestBody) UnmarshalJSON(data []byte) error
type PolicyRuleRequestBodyResp ¶ added in v0.6.0
type PolicyRuleRequestBodyResp struct {
// The action to take when a policy rule matches.
//
// Any of "ALLOW", "DENY".
Action PolicyAction `json:"action" api:"required"`
Conditions []PolicyConditionUnionResp `json:"conditions" api:"required"`
// Method the rule applies to.
//
// Any of "eth_sendTransaction", "eth_signTransaction", "eth_signUserOperation",
// "eth_signTypedData_v4", "personal_sign", "eth_sign7702Authorization",
// "wallet_sendCalls", "signTransaction", "signAndSendTransaction", "signMessage",
// "exportPrivateKey", "exportSeedPhrase", "signTransactionBytes",
// "signRawMessageBytes", "tron_sendTransaction", "tron_signTransaction",
// "earn_deposit", "earn_withdraw", "transfer", "\*".
Method PolicyMethod `json:"method" api:"required"`
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Action respjson.Field
Conditions respjson.Field
Method respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The rules that apply to each method the policy covers.
func (PolicyRuleRequestBodyResp) RawJSON ¶ added in v0.6.0
func (r PolicyRuleRequestBodyResp) RawJSON() string
Returns the unmodified JSON received from the API
func (PolicyRuleRequestBodyResp) ToParam ¶ added in v0.6.0
func (r PolicyRuleRequestBodyResp) ToParam() PolicyRuleRequestBody
ToParam converts this PolicyRuleRequestBodyResp to a PolicyRuleRequestBody.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PolicyRuleRequestBody.Overrides()
func (*PolicyRuleRequestBodyResp) UnmarshalJSON ¶ added in v0.6.0
func (r *PolicyRuleRequestBodyResp) UnmarshalJSON(data []byte) error
type PolicyRuleResponse ¶ added in v0.5.0
type PolicyRuleResponse struct {
ID string `json:"id" api:"required"`
// The action to take when a policy rule matches.
//
// Any of "ALLOW", "DENY".
Action PolicyAction `json:"action" api:"required"`
Conditions []PolicyConditionUnionResp `json:"conditions" api:"required"`
// Method the rule applies to.
//
// Any of "eth_sendTransaction", "eth_signTransaction", "eth_signUserOperation",
// "eth_signTypedData_v4", "personal_sign", "eth_sign7702Authorization",
// "wallet_sendCalls", "signTransaction", "signAndSendTransaction", "signMessage",
// "exportPrivateKey", "exportSeedPhrase", "signTransactionBytes",
// "signRawMessageBytes", "tron_sendTransaction", "tron_signTransaction",
// "earn_deposit", "earn_withdraw", "transfer", "\*".
Method PolicyMethod `json:"method" api:"required"`
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
Conditions respjson.Field
Method respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A rule that defines the conditions and action to take if the conditions are true.
func (PolicyRuleResponse) RawJSON ¶ added in v0.5.0
func (r PolicyRuleResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PolicyRuleResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *PolicyRuleResponse) UnmarshalJSON(data []byte) error
type PolicyService ¶
type PolicyService struct {
Options []option.RequestOption
}
Operations related to policies
PolicyService contains methods and other services that help with interacting with the Privy API 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 NewPolicyService method instead.
func NewPolicyService ¶
func NewPolicyService(opts ...option.RequestOption) (r PolicyService)
NewPolicyService 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 (*PolicyService) Delete ¶
func (r *PolicyService) Delete(ctx context.Context, policyID string, body PolicyDeleteParams, opts ...option.RequestOption) (res *SuccessResponse, err error)
Delete a policy by policy ID.
func (*PolicyService) DeleteRule ¶
func (r *PolicyService) DeleteRule(ctx context.Context, ruleID string, params PolicyDeleteRuleParams, opts ...option.RequestOption) (res *SuccessResponse, err error)
Delete a rule by policy ID and rule ID.
func (*PolicyService) Get ¶
func (r *PolicyService) Get(ctx context.Context, policyID string, opts ...option.RequestOption) (res *Policy, err error)
Get a policy by policy ID.
func (*PolicyService) GetRule ¶
func (r *PolicyService) GetRule(ctx context.Context, ruleID string, query PolicyGetRuleParams, opts ...option.RequestOption) (res *PolicyRuleResponse, err error)
Get a rule by policy ID and rule ID.
func (*PolicyService) New ¶
func (r *PolicyService) New(ctx context.Context, params PolicyNewParams, opts ...option.RequestOption) (res *Policy, err error)
Create a new policy.
func (*PolicyService) NewRule ¶
func (r *PolicyService) NewRule(ctx context.Context, policyID string, params PolicyNewRuleParams, opts ...option.RequestOption) (res *PolicyRuleResponse, err error)
Create a new rule for a policy.
func (*PolicyService) Update ¶
func (r *PolicyService) Update(ctx context.Context, policyID string, params PolicyUpdateParams, opts ...option.RequestOption) (res *Policy, err error)
Update a policy by policy ID.
func (*PolicyService) UpdateRule ¶
func (r *PolicyService) UpdateRule(ctx context.Context, ruleID string, params PolicyUpdateRuleParams, opts ...option.RequestOption) (res *PolicyRuleResponse, err error)
Update a rule by policy ID and rule ID.
type PolicyUpdateParams ¶
type PolicyUpdateParams struct {
// The key quorum ID to set as the owner of the resource. If you provide this, do
// not specify an owner.
OwnerID param.Opt[OwnerIDInput] `json:"owner_id,omitzero" format:"cuid2"`
// Name to assign to policy.
Name param.Opt[string] `json:"name,omitzero"`
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// The owner of the resource, specified as a Privy user ID, a P-256 public key, or
// null to remove the current owner.
Owner OwnerInputUnion `json:"owner,omitzero"`
Rules []PolicyRuleRequestBody `json:"rules,omitzero"`
// contains filtered or unexported fields
}
func (PolicyUpdateParams) MarshalJSON ¶
func (r PolicyUpdateParams) MarshalJSON() (data []byte, err error)
func (*PolicyUpdateParams) UnmarshalJSON ¶
func (r *PolicyUpdateParams) UnmarshalJSON(data []byte) error
type PolicyUpdateRuleParams ¶
type PolicyUpdateRuleParams struct {
PolicyID string `path:"policy_id" api:"required" json:"-"`
// The rules that apply to each method the policy covers.
PolicyRuleRequestBody PolicyRuleRequestBody
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Request expiry. Value is a Unix timestamp in milliseconds representing the
// deadline by which the request must be processed.
PrivyRequestExpiry param.Opt[string] `header:"privy-request-expiry,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (PolicyUpdateRuleParams) MarshalJSON ¶
func (r PolicyUpdateRuleParams) MarshalJSON() (data []byte, err error)
func (*PolicyUpdateRuleParams) UnmarshalJSON ¶
func (r *PolicyUpdateRuleParams) UnmarshalJSON(data []byte) error
type PolicyVersion ¶
type PolicyVersion string
Version of the policy. Currently, 1.0 is the only version.
const (
PolicyVersion1_0 PolicyVersion = "1.0"
)
type PrivateKeyExportInput ¶ added in v0.4.0
type PrivateKeyExportInput struct {
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type,omitzero" api:"required"`
// The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
// format.
RecipientPublicKey RecipientPublicKey `json:"recipient_public_key" api:"required"`
ExportSeedPhrase param.Opt[bool] `json:"export_seed_phrase,omitzero"`
// The export type. 'display' is for showing the key to the user in the UI,
// 'client' is for exporting to the client application.
//
// Any of "display", "client".
ExportType ExportType `json:"export_type,omitzero"`
// contains filtered or unexported fields
}
Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
The properties EncryptionType, RecipientPublicKey are required.
func (PrivateKeyExportInput) MarshalJSON ¶ added in v0.6.0
func (r PrivateKeyExportInput) MarshalJSON() (data []byte, err error)
func (*PrivateKeyExportInput) UnmarshalJSON ¶ added in v0.4.0
func (r *PrivateKeyExportInput) UnmarshalJSON(data []byte) error
type PrivateKeyExportInputResp ¶ added in v0.6.0
type PrivateKeyExportInputResp struct {
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type" api:"required"`
// The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
// format.
RecipientPublicKey RecipientPublicKey `json:"recipient_public_key" api:"required"`
ExportSeedPhrase bool `json:"export_seed_phrase"`
// The export type. 'display' is for showing the key to the user in the UI,
// 'client' is for exporting to the client application.
//
// Any of "display", "client".
ExportType ExportType `json:"export_type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EncryptionType respjson.Field
RecipientPublicKey respjson.Field
ExportSeedPhrase respjson.Field
ExportType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
func (PrivateKeyExportInputResp) RawJSON ¶ added in v0.6.0
func (r PrivateKeyExportInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (PrivateKeyExportInputResp) ToParam ¶ added in v0.6.0
func (r PrivateKeyExportInputResp) ToParam() PrivateKeyExportInput
ToParam converts this PrivateKeyExportInputResp to a PrivateKeyExportInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PrivateKeyExportInput.Overrides()
func (*PrivateKeyExportInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *PrivateKeyExportInputResp) UnmarshalJSON(data []byte) error
type PrivateKeyExportWebhookPayload ¶ added in v0.7.0
type PrivateKeyExportWebhookPayload struct {
// The type of webhook event.
//
// Any of "wallet.private_key_export".
Type PrivateKeyExportWebhookPayloadType `json:"type" api:"required"`
// The ID of the user who exported the key.
UserID string `json:"user_id" api:"required"`
// The address of the wallet.
WalletAddress string `json:"wallet_address" api:"required"`
// The ID of the wallet.
WalletID string `json:"wallet_id" api:"required"`
// The export type. 'display' is for showing the key to the user in the UI,
// 'client' is for exporting to the client application.
//
// Any of "display", "client".
ExportSource ExportType `json:"export_source"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
UserID respjson.Field
WalletAddress respjson.Field
WalletID respjson.Field
ExportSource respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet.private_key_export webhook event.
func (PrivateKeyExportWebhookPayload) RawJSON ¶ added in v0.7.0
func (r PrivateKeyExportWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*PrivateKeyExportWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *PrivateKeyExportWebhookPayload) UnmarshalJSON(data []byte) error
type PrivateKeyExportWebhookPayloadType ¶ added in v0.7.0
type PrivateKeyExportWebhookPayloadType string
The type of webhook event.
const (
PrivateKeyExportWebhookPayloadTypeWalletPrivateKeyExport PrivateKeyExportWebhookPayloadType = "wallet.private_key_export"
)
type PrivateKeyInitInput ¶ added in v0.6.0
type PrivateKeyInitInput struct {
// The address of the wallet to import.
Address string `json:"address" api:"required"`
// The chain type of the wallet to import. Supports `ethereum`, `solana`,
// `stellar`, `tron`, `sui`, and `aptos`.
//
// Any of "ethereum", "solana", "stellar", "tron", "sui", "aptos".
ChainType WalletImportSupportedChains `json:"chain_type,omitzero" api:"required"`
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type,omitzero" api:"required"`
// Any of "private-key".
EntropyType PrivateKeyInitInputEntropyType `json:"entropy_type,omitzero" api:"required"`
// contains filtered or unexported fields
}
The input for private key wallets.
The properties Address, ChainType, EncryptionType, EntropyType are required.
func (PrivateKeyInitInput) MarshalJSON ¶ added in v0.6.0
func (r PrivateKeyInitInput) MarshalJSON() (data []byte, err error)
func (*PrivateKeyInitInput) UnmarshalJSON ¶ added in v0.6.0
func (r *PrivateKeyInitInput) UnmarshalJSON(data []byte) error
type PrivateKeyInitInputEntropyType ¶ added in v0.6.0
type PrivateKeyInitInputEntropyType string
const (
PrivateKeyInitInputEntropyTypePrivateKey PrivateKeyInitInputEntropyType = "private-key"
)
type PrivateKeySubmitInput ¶ added in v0.6.0
type PrivateKeySubmitInput struct {
// The address of the wallet to import.
Address string `json:"address" api:"required"`
// The chain type of the wallet to import. Supports `ethereum`, `solana`,
// `stellar`, `tron`, `sui`, and `aptos`.
//
// Any of "ethereum", "solana", "stellar", "tron", "sui", "aptos".
ChainType WalletImportSupportedChains `json:"chain_type,omitzero" api:"required"`
// The encrypted entropy of the wallet to import.
Ciphertext string `json:"ciphertext" api:"required"`
// The base64-encoded encapsulated key that was generated during encryption, for
// use during decryption inside the TEE.
EncapsulatedKey string `json:"encapsulated_key" api:"required"`
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type,omitzero" api:"required"`
// Any of "private-key".
EntropyType PrivateKeySubmitInputEntropyType `json:"entropy_type,omitzero" api:"required"`
// Optional HPKE configuration for wallet import decryption. These parameters allow
// importing wallets encrypted by external providers that use different HPKE
// configurations.
HpkeConfig HpkeImportConfig `json:"hpke_config,omitzero"`
// contains filtered or unexported fields
}
The submission input for importing a private key wallet.
The properties Address, ChainType, Ciphertext, EncapsulatedKey, EncryptionType, EntropyType are required.
func (PrivateKeySubmitInput) MarshalJSON ¶ added in v0.6.0
func (r PrivateKeySubmitInput) MarshalJSON() (data []byte, err error)
func (*PrivateKeySubmitInput) UnmarshalJSON ¶ added in v0.6.0
func (r *PrivateKeySubmitInput) UnmarshalJSON(data []byte) error
type PrivateKeySubmitInputEntropyType ¶ added in v0.6.0
type PrivateKeySubmitInputEntropyType string
const (
PrivateKeySubmitInputEntropyTypePrivateKey PrivateKeySubmitInputEntropyType = "private-key"
)
type PrivyAggregationService ¶
type PrivyAggregationService struct {
// Directly embed the generated AggregationService to expose all its methods through PrivyAggregationService
AggregationService
// contains filtered or unexported fields
}
type PrivyAnalyticsService ¶
type PrivyAnalyticsService struct {
// Directly embed the generated AnalyticsService to expose all its methods through PrivyAnalyticsService
AnalyticsService
// contains filtered or unexported fields
}
type PrivyAppService ¶
type PrivyAppService struct {
// Directly embed the generated AppService to expose all its methods through PrivyAppService
AppService
// contains filtered or unexported fields
}
type PrivyClient ¶
type PrivyClient struct {
Wallets *PrivyWalletService
Users *PrivyUserService
Policies *PrivyPolicyService
Transactions *PrivyTransactionService
KeyQuorums *PrivyKeyQuorumService
Intents *PrivyIntentService
Analytics *PrivyAnalyticsService
Apps *PrivyAppService
Aggregations *PrivyAggregationService
Webhooks *PrivyWebhookService
JwtExchange *PrivyJwtExchangeService
// contains filtered or unexported fields
}
PrivyClient is the main entrypoint for the Privy API Go SDK.
Example:
client := privyclient.NewPrivyClient(privyclient.PrivyClientOptions{
AppID: "my-app-id",
AppSecret: "my-app-secret",
APIUrl: "https://api.staging.privy.io", // optional
})
func NewPrivyClient ¶
func NewPrivyClient(opts PrivyClientOptions) *PrivyClient
NewPrivyClient creates a new enhanced Privy client. This is the recommended way to create a client for most use cases.
Example:
client := privyclient.NewPrivyClient(privyclient.PrivyClientOptions{
AppID: "my-app-id",
AppSecret: "my-app-secret",
})
For staging environment:
client := privyclient.NewPrivyClient(privyclient.PrivyClientOptions{
AppID: "my-app-id",
AppSecret: "my-app-secret",
APIUrl: "https://api.staging.privy.io",
})
With logging enabled:
client := privyclient.NewPrivyClient(privyclient.PrivyClientOptions{
AppID: "my-app-id",
AppSecret: "my-app-secret",
LogLevel: privyclient.LogLevelDebug,
})
func (*PrivyClient) GenerateAuthorizationSignaturesForRequest ¶ added in v0.3.0
func (c *PrivyClient) GenerateAuthorizationSignaturesForRequest( ctx context.Context, auth authorization.AuthorizationContext, input authorization.WalletApiRequestSignatureInput, ) ([]string, error)
GenerateAuthorizationSignaturesForRequest formats a request and generates signatures for all credentials in an AuthorizationContext, using the client's built-in JWT exchanger for any JWTs in the authorization context.
This is a convenience method that delegates to authorization.GenerateAuthorizationSignaturesForRequest with the client's JWT exchange service, so callers don't need to pass the exchanger explicitly.
Example:
signatures, err := client.GenerateAuthorizationSignaturesForRequest(ctx,
authorization.AuthorizationContext{
UserJwts: []string{userJWT},
},
authorization.WalletApiRequestSignatureInput{
Version: 1,
Method: "POST",
URL: "https://api.privy.io/v1/wallets/my-wallet/rpc",
Body: requestBody,
Headers: map[string]string{"privy-app-id": "my-app-id"},
},
)
type PrivyClientOptions ¶
type PrivyClientOptions struct {
// AppID is your Privy application ID (required).
AppID string
// AppSecret is your Privy application secret (required).
AppSecret string
// APIUrl is the base URL for the Privy API (optional).
// If not provided, defaults to the production environment.
// Use "https://api.staging.privy.io" for staging.
APIUrl string
// LogLevel sets the verbosity of SDK logging (optional).
// If not provided, defaults to LogLevelNone (no logging).
// Available levels: LogLevelNone, LogLevelError, LogLevelInfo, LogLevelDebug, LogLevelVerbose
LogLevel LogLevel
// DefaultRequestExpiryMs sets the default request expiry duration in milliseconds (optional).
// This is used as the offset from the current time to compute the "privy-request-expiry" header.
// If not provided, defaults to 15 minutes (900000 ms).
// Can be overridden per-request, where applicable, using WithRequestExpiry.
//
// Deprecated: Use RequestExpiry.DefaultMs instead.
DefaultRequestExpiryMs int64
// DisableRequestExpiry opts out of automatically setting the "privy-request-expiry"
// header on requests. When true, no expiry header will be sent unless explicitly
// provided per-request via WithRequestExpiry. Defaults to false.
//
// Deprecated: Use RequestExpiry.Disabled instead.
DisableRequestExpiry bool
// RequestExpiry configures request-expiry behaviour. Recommended over
// the deprecated top-level DefaultRequestExpiryMs and DisableRequestExpiry.
RequestExpiry PrivyRequestExpiryOptions
// HTTPClient sets the default *http.Client used across all requests (optional).
// If not provided, defaults to http.DefaultClient.
// Can be overridden per-request using WithHTTPClient.
HTTPClient *http.Client
// WebhookSigningSecret is used to verify incoming webhook signatures (optional).
// Can be overridden per-call via VerifyInput.SigningSecret.
WebhookSigningSecret string
}
PrivyClientOptions contains configuration options for creating a PrivyClient.
type PrivyEthereumWalletService ¶
type PrivyEthereumWalletService struct {
// contains filtered or unexported fields
}
PrivyEthereumWalletService provides convenience methods for Ethereum wallet operations. Each method wraps PrivyWalletService.Rpc with the appropriate RPC input.
func (*PrivyEthereumWalletService) SendTransaction ¶
func (s *PrivyEthereumWalletService) SendTransaction( ctx context.Context, walletID string, caip2 string, params EthereumSendTransactionRpcInputParams, opts ...RequestOption, ) (*EthereumSendTransactionRpcResponseData, error)
SendTransaction calls eth_sendTransaction with the given wallet
func (*PrivyEthereumWalletService) Sign7702Authorization ¶
func (s *PrivyEthereumWalletService) Sign7702Authorization( ctx context.Context, walletID string, params EthereumSign7702AuthorizationRpcInputParams, opts ...RequestOption, ) (*EthereumSign7702AuthorizationRpcResponseData, error)
Sign7702Authorization calls eth_sign7702authorization with the given wallet
func (*PrivyEthereumWalletService) SignMessage ¶
func (s *PrivyEthereumWalletService) SignMessage( ctx context.Context, walletID string, message string, opts ...RequestOption, ) (*EthereumPersonalSignRpcResponseData, error)
SignMessage calls personal_sign with the given wallet. If the message starts with "0x", it is treated as hex-encoded data. Otherwise, it is treated as a UTF-8 string.
func (*PrivyEthereumWalletService) SignMessageBytes ¶
func (s *PrivyEthereumWalletService) SignMessageBytes( ctx context.Context, walletID string, message []byte, opts ...RequestOption, ) (*EthereumPersonalSignRpcResponseData, error)
SignMessageBytes calls personal_sign with the given wallet using raw bytes. The bytes are hex-encoded for transmission.
func (*PrivyEthereumWalletService) SignSecp256k1 ¶
func (s *PrivyEthereumWalletService) SignSecp256k1( ctx context.Context, walletID string, params EthereumSecp256k1SignRpcInputParams, opts ...RequestOption, ) (*EthereumSecp256k1SignRpcResponseData, error)
SignSecp256k1 calls secp256k1_sign with the given wallet
func (*PrivyEthereumWalletService) SignTransaction ¶
func (s *PrivyEthereumWalletService) SignTransaction( ctx context.Context, walletID string, params EthereumSignTransactionRpcInputParams, opts ...RequestOption, ) (*EthereumSignTransactionRpcResponseData, error)
SignTransaction calls eth_signTransaction with the given wallet
func (*PrivyEthereumWalletService) SignTypedData ¶
func (s *PrivyEthereumWalletService) SignTypedData( ctx context.Context, walletID string, params EthereumSignTypedDataRpcInputParams, opts ...RequestOption, ) (*EthereumSignTypedDataRpcResponseData, error)
SignTypedData calls eth_signTypedData_v4 with the given wallet
func (*PrivyEthereumWalletService) SignUserOperation ¶
func (s *PrivyEthereumWalletService) SignUserOperation( ctx context.Context, walletID string, params EthereumSignUserOperationRpcInputParams, opts ...RequestOption, ) (*EthereumSignUserOperationRpcResponseData, error)
SignUserOperation calls eth_signUserOperation with the given wallet
type PrivyFee ¶ added in v0.8.0
type PrivyFee struct {
// Amount in USD (in decimals).
Amount string `json:"amount" api:"required"`
// Any of "privy".
Type PrivyFeeType `json:"type" api:"required"`
Recipient string `json:"recipient"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Type respjson.Field
Recipient respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Estimated fee paid to Privy.
func (*PrivyFee) UnmarshalJSON ¶ added in v0.8.0
type PrivyFeeType ¶ added in v0.8.0
type PrivyFeeType string
const (
PrivyFeeTypePrivy PrivyFeeType = "privy"
)
type PrivyIntentService ¶ added in v0.5.0
type PrivyIntentService struct {
IntentService
// contains filtered or unexported fields
}
PrivyIntentService wraps the generated IntentService. Intents represent pending operations that require dashboard signing before they can be executed.
The wrapper auto-populates the "privy-request-expiry" header on every mutating intent call, unless the client was constructed with DisableRequestExpiry: true (in which case no expiry header is sent on intents calls). Resolution order when not disabled, highest priority first:
- Per-call WithRequestExpiry(...).
- params.PrivyRequestExpiry already set explicitly by the caller.
- DefaultIntentRequestExpiryMs from client options.
- Hardcoded 72 hours.
func (*PrivyIntentService) DeletePolicyRule ¶ added in v0.7.0
func (s *PrivyIntentService) DeletePolicyRule( ctx context.Context, ruleID string, params IntentDeletePolicyRuleParams, opts ...RequestOption, ) (*RuleDeleteIntentResponse, error)
DeletePolicyRule executes a delete-policy-rule intent.
func (*PrivyIntentService) NewPolicyRule ¶ added in v0.7.0
func (s *PrivyIntentService) NewPolicyRule( ctx context.Context, policyID string, params IntentNewPolicyRuleParams, opts ...RequestOption, ) (*RuleMutateIntentResponse, error)
NewPolicyRule executes a new-policy-rule intent.
func (*PrivyIntentService) Rpc ¶ added in v0.7.0
func (s *PrivyIntentService) Rpc( ctx context.Context, walletID string, params IntentRpcParams, opts ...RequestOption, ) (*RpcIntentResponse, error)
Rpc executes a wallet RPC intent.
func (*PrivyIntentService) Transfer ¶ added in v0.7.0
func (s *PrivyIntentService) Transfer( ctx context.Context, walletID string, params IntentTransferParams, opts ...RequestOption, ) (*TransferIntentResponse, error)
Transfer executes a wallet transfer intent.
func (*PrivyIntentService) UpdateKeyQuorum ¶ added in v0.7.0
func (s *PrivyIntentService) UpdateKeyQuorum( ctx context.Context, keyQuorumID string, params IntentUpdateKeyQuorumParams, opts ...RequestOption, ) (*KeyQuorumIntentResponse, error)
UpdateKeyQuorum executes an update-key-quorum intent.
func (*PrivyIntentService) UpdatePolicy ¶ added in v0.7.0
func (s *PrivyIntentService) UpdatePolicy( ctx context.Context, policyID string, params IntentUpdatePolicyParams, opts ...RequestOption, ) (*PolicyIntentResponse, error)
UpdatePolicy executes an update-policy intent.
func (*PrivyIntentService) UpdatePolicyRule ¶ added in v0.7.0
func (s *PrivyIntentService) UpdatePolicyRule( ctx context.Context, ruleID string, params IntentUpdatePolicyRuleParams, opts ...RequestOption, ) (*RuleMutateIntentResponse, error)
UpdatePolicyRule executes an update-policy-rule intent.
func (*PrivyIntentService) UpdateWallet ¶ added in v0.7.0
func (s *PrivyIntentService) UpdateWallet( ctx context.Context, walletID string, params IntentUpdateWalletParams, opts ...RequestOption, ) (*WalletIntentResponse, error)
UpdateWallet executes a wallet update intent.
type PrivyJwtExchangeService ¶
type PrivyJwtExchangeService struct {
// contains filtered or unexported fields
}
PrivyJwtExchangeService provides JWT-to-authorization-key exchange functionality. It implements the internal/jwtexchange.JwtExchanger interface. The service is safe for concurrent use.
func (*PrivyJwtExchangeService) ExchangeJwtForAuthorizationKey ¶
func (s *PrivyJwtExchangeService) ExchangeJwtForAuthorizationKey(ctx context.Context, jwt string) (string, error)
ExchangeJwtForAuthorizationKey exchanges a user JWT for a short-lived authorization private key. The returned string is a base64-encoded PKCS8-formatted P-256 private key.
type PrivyKeyQuorumService ¶
type PrivyKeyQuorumService struct {
// Directly embed the generated KeyQuorumService to expose all its methods through PrivyKeyQuorumService
KeyQuorumService
// contains filtered or unexported fields
}
func (*PrivyKeyQuorumService) Delete ¶
func (s *PrivyKeyQuorumService) Delete( ctx context.Context, keyQuorumID string, params KeyQuorumDeleteParams, opts ...RequestOption, ) (*SuccessResponse, error)
Delete removes a key quorum
Parameters:
- ctx: Context for cancellation and timeouts
- keyQuorumID: The key quorum ID to delete
- params: The delete parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
func (*PrivyKeyQuorumService) Update ¶
func (s *PrivyKeyQuorumService) Update( ctx context.Context, keyQuorumID string, params KeyQuorumUpdateParams, opts ...RequestOption, ) (*KeyQuorum, error)
Update modifies a key quorum
Parameters:
- ctx: Context for cancellation and timeouts
- keyQuorumID: The key quorum ID to update
- params: The update parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
type PrivyPolicyService ¶
type PrivyPolicyService struct {
// Directly embed the generated PolicyService to expose all its methods through PrivyPolicyService
PolicyService
// contains filtered or unexported fields
}
PrivyPolicyService wraps the generated PolicyService with automatic authorization signature generation for policy operations.
func (*PrivyPolicyService) Delete ¶ added in v0.0.2
func (s *PrivyPolicyService) Delete( ctx context.Context, policyID string, params PolicyDeleteParams, opts ...RequestOption, ) (*SuccessResponse, error)
Delete removes a policy with automatic authorization signature generation.
This method wraps the generated PolicyService.Delete and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
Parameters:
- ctx: Context for cancellation and timeouts
- policyID: The policy ID to delete
- params: The delete parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
func (*PrivyPolicyService) DeleteRule ¶ added in v0.0.2
func (s *PrivyPolicyService) DeleteRule( ctx context.Context, ruleID string, params PolicyDeleteRuleParams, opts ...RequestOption, ) (*SuccessResponse, error)
DeleteRule removes a rule from a policy with automatic authorization signature generation.
This method wraps the generated PolicyService.DeleteRule and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
Parameters:
- ctx: Context for cancellation and timeouts
- ruleID: The rule ID to delete
- params: The delete parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
func (*PrivyPolicyService) NewRule ¶ added in v0.0.2
func (s *PrivyPolicyService) NewRule( ctx context.Context, policyID string, params PolicyNewRuleParams, opts ...RequestOption, ) (*PolicyRuleResponse, error)
NewRule creates a new rule on a policy with automatic authorization signature generation.
This method wraps the generated PolicyService.NewRule and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
Parameters:
- ctx: Context for cancellation and timeouts
- policyID: The policy ID to add a rule to
- params: The new rule parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
func (*PrivyPolicyService) Update ¶ added in v0.0.2
func (s *PrivyPolicyService) Update( ctx context.Context, policyID string, params PolicyUpdateParams, opts ...RequestOption, ) (*Policy, error)
Update modifies a policy with automatic authorization signature generation.
This method wraps the generated PolicyService.Update and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
Parameters:
- ctx: Context for cancellation and timeouts
- policyID: The policy ID to update
- params: The update parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
func (*PrivyPolicyService) UpdateRule ¶ added in v0.0.2
func (s *PrivyPolicyService) UpdateRule( ctx context.Context, ruleID string, params PolicyUpdateRuleParams, opts ...RequestOption, ) (*PolicyRuleResponse, error)
UpdateRule modifies a rule on a policy with automatic authorization signature generation.
This method wraps the generated PolicyService.UpdateRule and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
Parameters:
- ctx: Context for cancellation and timeouts
- ruleID: The rule ID to update
- params: The update parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
type PrivyRequestExpiryOptions ¶ added in v0.7.0
type PrivyRequestExpiryOptions struct {
// DefaultMs is the default request expiry duration in milliseconds
// for non-intents endpoints. If zero, defaults to 15 minutes.
DefaultMs int64
// DefaultIntentMs is the default request expiry duration in
// milliseconds for intents-endpoint calls. If zero, defaults to 72 hours.
DefaultIntentMs int64
// Disabled, when true, suppresses the `privy-request-expiry` header on
// all outgoing requests unless explicitly provided per-request.
// Defaults to false.
Disabled bool
}
PrivyRequestExpiryOptions groups the request-expiry configuration for a PrivyClient. Prefer this over the deprecated top-level fields on PrivyClientOptions.
Resolution rules when both this struct and a deprecated top-level alias are provided on PrivyClientOptions:
- DefaultMs / DefaultIntentMs: non-zero nested value wins per-field. Zero means "unset"; the deprecated alias (for DefaultMs only) and then the hardcoded default are consulted in order.
- Disabled: OR semantics. Expiry is disabled if either this field or the deprecated DisableRequestExpiry is true. Go cannot distinguish "unset" from "false" on a bool, so an explicit false in the nested struct cannot override a true in the deprecated alias.
type PrivySolanaWalletService ¶
type PrivySolanaWalletService struct {
// contains filtered or unexported fields
}
PrivySolanaWalletService provides convenience methods for Solana wallet operations. Each method wraps PrivyWalletService.Rpc with the appropriate RPC input.
func (*PrivySolanaWalletService) SignAndSendTransaction ¶
func (s *PrivySolanaWalletService) SignAndSendTransaction( ctx context.Context, walletID string, caip2 string, params SolanaSignAndSendTransactionRpcInputParams, opts ...RequestOption, ) (*SolanaSignAndSendTransactionRpcResponseData, error)
SignAndSendTransaction calls signAndSendTransaction with the given wallet. The transaction should be a base64-encoded string.
func (*PrivySolanaWalletService) SignAndSendTransactionBytes ¶
func (s *PrivySolanaWalletService) SignAndSendTransactionBytes( ctx context.Context, walletID string, caip2 string, transaction []byte, opts ...RequestOption, ) (*SolanaSignAndSendTransactionRpcResponseData, error)
SignAndSendTransactionBytes calls signAndSendTransaction with raw transaction bytes. The bytes are base64-encoded for transmission.
func (*PrivySolanaWalletService) SignMessage ¶
func (s *PrivySolanaWalletService) SignMessage( ctx context.Context, walletID string, message string, opts ...RequestOption, ) (*SolanaSignMessageRpcResponseData, error)
SignMessage calls signMessage with the given wallet. The message should be a base64-encoded string.
func (*PrivySolanaWalletService) SignMessageBytes ¶
func (s *PrivySolanaWalletService) SignMessageBytes( ctx context.Context, walletID string, message []byte, opts ...RequestOption, ) (*SolanaSignMessageRpcResponseData, error)
SignMessageBytes calls signMessage with raw bytes. The bytes are base64-encoded for transmission.
func (*PrivySolanaWalletService) SignTransaction ¶
func (s *PrivySolanaWalletService) SignTransaction( ctx context.Context, walletID string, params SolanaSignTransactionRpcInputParams, opts ...RequestOption, ) (*SolanaSignTransactionRpcResponseData, error)
SignTransaction calls signTransaction with the given wallet.
func (*PrivySolanaWalletService) SignTransactionBytes ¶
func (s *PrivySolanaWalletService) SignTransactionBytes( ctx context.Context, walletID string, transaction []byte, opts ...RequestOption, ) (*SolanaSignTransactionRpcResponseData, error)
SignTransactionBytes calls signTransaction with raw bytes. The bytes are base64-encoded for transmission.
type PrivyTransactionService ¶
type PrivyTransactionService struct {
// Directly embed the generated TransactionService to expose all its methods through PrivyTransactionService
TransactionService
// contains filtered or unexported fields
}
type PrivyTronWalletService ¶ added in v0.12.0
type PrivyTronWalletService struct {
// contains filtered or unexported fields
}
PrivyTronWalletService provides convenience methods for Tron wallet operations. Each method wraps PrivyWalletService.Rpc with the appropriate RPC input.
func (*PrivyTronWalletService) SendTransaction ¶ added in v0.12.0
func (s *PrivyTronWalletService) SendTransaction( ctx context.Context, walletID string, caip2 string, params TronSendTransactionRpcInputParams, opts ...RequestOption, ) (*TronSendTransactionRpcResponseData, error)
SendTransaction calls tron_sendTransaction with the given wallet. Signs and broadcasts the transaction. caip2 identifies the target network (e.g. "tron:0xcd8690dc" for Nile testnet).
func (*PrivyTronWalletService) SignTransaction ¶ added in v0.12.0
func (s *PrivyTronWalletService) SignTransaction( ctx context.Context, walletID string, params TronSignTransactionRpcInputParams, opts ...RequestOption, ) (*TronSignTransactionRpcResponseData, error)
SignTransaction calls tron_signTransaction with the given wallet. Returns TronSignTransactionRpcResponseData. The caller is responsible for broadcasting.
type PrivyUserService ¶
type PrivyUserService struct {
// Directly embed the generated UserService to expose all its methods through PrivyUserService
UserService
// contains filtered or unexported fields
}
type PrivyWalletService ¶
type PrivyWalletService struct {
// Directly embed the generated WalletService to expose all its methods through PrivyWalletService
WalletService
// Ethereum provides convenience methods for Ethereum wallet operations.
Ethereum *PrivyEthereumWalletService
// Solana provides convenience methods for Solana wallet operations.
Solana *PrivySolanaWalletService
// Tron provides convenience methods for Tron wallet operations.
Tron *PrivyTronWalletService
// contains filtered or unexported fields
}
PrivyWalletService wraps the generated WalletService with automatic authorization signature generation for RPC calls.
func (*PrivyWalletService) Export ¶ added in v0.2.0
func (s *PrivyWalletService) Export( ctx context.Context, walletID string, opts ...RequestOption, ) (*WalletExportResult, error)
Export exports a wallet's private key, handling HPKE key exchange automatically for an end-to-end encrypted flow.
This method wraps the generated WalletService.Export and handles:
- Generating an ephemeral HPKE keypair for encryption
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
- Decrypting the response to extract the plaintext private key
Parameters:
- ctx: Context for cancellation and timeouts
- walletID: The wallet ID to export
- opts: use WithAuthorizationContext and WithRequestExpiry
func (*PrivyWalletService) Import ¶ added in v0.3.0
func (s *PrivyWalletService) Import(ctx context.Context, params WalletImportParams, opts ...RequestOption) (*Wallet, error)
Import imports a wallet by orchestrating the two-step InitImport/SubmitImport flow with automatic HPKE encryption of the private key material.
func (*PrivyWalletService) RawSign ¶
func (s *PrivyWalletService) RawSign( ctx context.Context, walletID string, params WalletRawSignParams, opts ...RequestOption, ) (*RawSignResponse, error)
RawSign signs a hash or bytes with a wallet, with automatic authorization signature generation.
This method wraps the generated WalletService.RawSign and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the idempotency key and request expiry headers
Parameters:
- ctx: Context for cancellation and timeouts
- walletID: The wallet ID to sign with
- params: The raw sign parameters (callers can skip PrivyAuthorizationSignature, PrivyIdempotencyKey, and PrivyRequestExpiry)
- opts: use WithAuthorizationContext, WithIdempotencyKey, and WithRequestExpiry
func (*PrivyWalletService) Rpc ¶
func (s *PrivyWalletService) Rpc( ctx context.Context, walletID string, params WalletRpcParams, opts ...RequestOption, ) (*WalletRpcResponseUnion, error)
Rpc executes an RPC method on a wallet with automatic authorization signature generation.
This method wraps the generated WalletService.Rpc and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the idempotency key and request expiry headers
Parameters:
- ctx: Context for cancellation and timeouts
- walletID: The wallet ID to execute the RPC on
- params: The RPC parameters (callers can skip PrivyAuthorizationSignature, PrivyIdempotencyKey, and PrivyRequestExpiry)
- opts: use WithAuthorizationContext, WithIdempotencyKey, and WithRequestExpiry
func (*PrivyWalletService) Update ¶
func (s *PrivyWalletService) Update( ctx context.Context, walletID string, params WalletUpdateParams, opts ...RequestOption, ) (*Wallet, error)
Update modifies a wallet with automatic authorization signature generation.
This method wraps the generated WalletService.Update and handles:
- Building the authorization signature from an AuthorizationContext
- Setting the request expiry header
Parameters:
- ctx: Context for cancellation and timeouts
- walletID: The wallet ID to update
- params: The update parameters (callers can skip PrivyAuthorizationSignature and PrivyRequestExpiry)
- opts: use WithAuthorizationContext and WithRequestExpiry
type PrivyWebhookService ¶
type PrivyWebhookService struct {
WebhookService
// contains filtered or unexported fields
}
PrivyWebhookService wraps the generated WebhookService with signature verification.
func (*PrivyWebhookService) Verify ¶ added in v0.7.0
func (s *PrivyWebhookService) Verify(input VerifyInput) (*WebhookPayload, error)
Verify checks the svix webhook signature and returns the typed event payload. Returns an InvalidWebhookError if verification fails.
type QuantityUnion ¶ added in v0.4.0
type QuantityUnion struct {
OfString param.Opt[Hex] `json:",omitzero,inline"`
OfInt param.Opt[int64] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (QuantityUnion) MarshalJSON ¶ added in v0.6.0
func (u QuantityUnion) MarshalJSON() ([]byte, error)
func (*QuantityUnion) UnmarshalJSON ¶ added in v0.4.0
func (u *QuantityUnion) UnmarshalJSON(data []byte) error
type QuantityUnionResp ¶ added in v0.6.0
type QuantityUnionResp struct {
// This field will be present if the value is a [Hex] instead of an object.
OfString Hex `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QuantityUnionResp contains all possible properties and values from Hex, [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (QuantityUnionResp) AsInt ¶ added in v0.6.0
func (u QuantityUnionResp) AsInt() (v int64)
func (QuantityUnionResp) AsString ¶ added in v0.6.0
func (u QuantityUnionResp) AsString() (v Hex)
func (QuantityUnionResp) RawJSON ¶ added in v0.6.0
func (u QuantityUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (QuantityUnionResp) ToParam ¶ added in v0.6.0
func (r QuantityUnionResp) ToParam() QuantityUnion
ToParam converts this QuantityUnionResp to a QuantityUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with QuantityUnion.Overrides()
func (*QuantityUnionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *QuantityUnionResp) UnmarshalJSON(data []byte) error
type RawSignBytesEncoding ¶ added in v0.4.0
type RawSignBytesEncoding string
Encoding scheme for bytes in the `raw_sign` RPC.
const ( RawSignBytesEncodingUtf8 RawSignBytesEncoding = "utf-8" RawSignBytesEncodingHex RawSignBytesEncoding = "hex" RawSignBytesEncodingBase64 RawSignBytesEncoding = "base64" )
type RawSignBytesHashFunction ¶ added in v0.4.0
type RawSignBytesHashFunction string
Hash function for bytes in the `raw_sign` RPC.
const ( RawSignBytesHashFunctionKeccak256 RawSignBytesHashFunction = "keccak256" RawSignBytesHashFunctionSha256 RawSignBytesHashFunction = "sha256" RawSignBytesHashFunctionBlake2b256 RawSignBytesHashFunction = "blake2b256" )
type RawSignBytesParams ¶ added in v0.4.0
type RawSignBytesParams struct {
// The bytes to hash and sign.
Bytes string `json:"bytes" api:"required"`
// Encoding scheme for bytes in the `raw_sign` RPC.
//
// Any of "utf-8", "hex", "base64".
Encoding RawSignBytesEncoding `json:"encoding,omitzero" api:"required"`
// Hash function for bytes in the `raw_sign` RPC.
//
// Any of "keccak256", "sha256", "blake2b256".
HashFunction RawSignBytesHashFunction `json:"hash_function,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for hashing and signing bytes with the `raw_sign` RPC.
The properties Bytes, Encoding, HashFunction are required.
func (RawSignBytesParams) MarshalJSON ¶ added in v0.4.0
func (r RawSignBytesParams) MarshalJSON() (data []byte, err error)
func (*RawSignBytesParams) UnmarshalJSON ¶ added in v0.4.0
func (r *RawSignBytesParams) UnmarshalJSON(data []byte) error
type RawSignHashParams ¶ added in v0.4.0
type RawSignHashParams struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Hash Hex `json:"hash" api:"required"`
// contains filtered or unexported fields
}
Parameters for signing a pre-computed hash with the `raw_sign` RPC.
The property Hash is required.
func (RawSignHashParams) MarshalJSON ¶ added in v0.4.0
func (r RawSignHashParams) MarshalJSON() (data []byte, err error)
func (*RawSignHashParams) UnmarshalJSON ¶ added in v0.4.0
func (r *RawSignHashParams) UnmarshalJSON(data []byte) error
type RawSignInput ¶ added in v0.4.0
type RawSignInput struct {
// Parameters for the `raw_sign` RPC.
Params RawSignInputParamsUnion `json:"params,omitzero" api:"required"`
// contains filtered or unexported fields
}
Provide either `hash` (to sign a pre-computed hash) OR `bytes`, `encoding`, and `hash_function` (to hash and then sign). These options are mutually exclusive.
The property Params is required.
func (RawSignInput) MarshalJSON ¶ added in v0.4.0
func (r RawSignInput) MarshalJSON() (data []byte, err error)
func (*RawSignInput) UnmarshalJSON ¶ added in v0.4.0
func (r *RawSignInput) UnmarshalJSON(data []byte) error
type RawSignInputParamsUnion ¶ added in v0.4.0
type RawSignInputParamsUnion struct {
OfRawSignHashs *RawSignHashParams `json:",omitzero,inline"`
OfRawSignBytess *RawSignBytesParams `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func RawSignInputParamsOfRawSignBytess ¶ added in v0.4.0
func RawSignInputParamsOfRawSignBytess(bytes string, encoding RawSignBytesEncoding, hashFunction RawSignBytesHashFunction) RawSignInputParamsUnion
func RawSignInputParamsOfRawSignHashs ¶ added in v0.4.0
func RawSignInputParamsOfRawSignHashs(hash Hex) RawSignInputParamsUnion
func (RawSignInputParamsUnion) MarshalJSON ¶ added in v0.4.0
func (u RawSignInputParamsUnion) MarshalJSON() ([]byte, error)
func (*RawSignInputParamsUnion) UnmarshalJSON ¶ added in v0.4.0
func (u *RawSignInputParamsUnion) UnmarshalJSON(data []byte) error
type RawSignResponse ¶ added in v0.4.0
type RawSignResponse struct {
// Data returned by the `raw_sign` RPC.
Data RawSignResponseData `json:"data" api:"required"`
// Any of "raw_sign".
Method RawSignResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the `raw_sign` RPC.
func (RawSignResponse) RawJSON ¶ added in v0.4.0
func (r RawSignResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawSignResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *RawSignResponse) UnmarshalJSON(data []byte) error
type RawSignResponseData ¶ added in v0.4.0
type RawSignResponseData struct {
// Any of "hex".
Encoding RawSignResponseDataEncoding `json:"encoding" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Signature Hex `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the `raw_sign` RPC.
func (RawSignResponseData) RawJSON ¶ added in v0.4.0
func (r RawSignResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawSignResponseData) UnmarshalJSON ¶ added in v0.4.0
func (r *RawSignResponseData) UnmarshalJSON(data []byte) error
type RawSignResponseDataEncoding ¶ added in v0.4.0
type RawSignResponseDataEncoding string
const (
RawSignResponseDataEncodingHex RawSignResponseDataEncoding = "hex"
)
type RawSignResponseMethod ¶ added in v0.4.0
type RawSignResponseMethod string
const (
RawSignResponseMethodRawSign RawSignResponseMethod = "raw_sign"
)
type RawWalletAuthenticateResponse ¶ added in v0.11.0
type RawWalletAuthenticateResponse struct {
// The raw authorization key data.
AuthorizationKey string `json:"authorization_key" api:"required"`
// The expiration time of the authorization key in milliseconds since the epoch.
ExpiresAt float64 `json:"expires_at" api:"required"`
Wallets []Wallet `json:"wallets" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AuthorizationKey respjson.Field
ExpiresAt respjson.Field
Wallets respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The response from authenticating a wallet without encryption, containing a raw authorization key and wallet data.
func (RawWalletAuthenticateResponse) RawJSON ¶ added in v0.11.0
func (r RawWalletAuthenticateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RawWalletAuthenticateResponse) UnmarshalJSON ¶ added in v0.11.0
func (r *RawWalletAuthenticateResponse) UnmarshalJSON(data []byte) error
type RecipientPublicKey ¶ added in v0.4.0
type RecipientPublicKey = string
type RelayerFee ¶ added in v0.8.0
type RelayerFee struct {
// Amount in USD (in decimals).
Amount string `json:"amount" api:"required"`
// Any of "relayer".
Type RelayerFeeType `json:"type" api:"required"`
Recipient string `json:"recipient"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Type respjson.Field
Recipient respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Estimated fee paid to the relayer.
func (RelayerFee) RawJSON ¶ added in v0.8.0
func (r RelayerFee) RawJSON() string
Returns the unmodified JSON received from the API
func (*RelayerFee) UnmarshalJSON ¶ added in v0.8.0
func (r *RelayerFee) UnmarshalJSON(data []byte) error
type RelayerFeeType ¶ added in v0.8.0
type RelayerFeeType string
const (
RelayerFeeTypeRelayer RelayerFeeType = "relayer"
)
type RequestOption ¶ added in v0.4.0
type RequestOption interface {
// contains filtered or unexported methods
}
RequestOption configures optional parameters for API requests.
Not all options apply to every API method. Callers should only use the options that are relevant to the method being called — unsupported options are ignored, similar to sending an HTTP header the server doesn't read.
Available options:
- WithAuthorizationContext: sets the authorization context for user-owned wallet operations.
- WithIdempotencyKey: sets an idempotency key (applicable to Rpc, RawSign, and Ethereum/Solana convenience methods).
- WithRequestExpiry: sets the request expiry timestamp in milliseconds.
func WithAuthorizationContext ¶
func WithAuthorizationContext(ctx *authorization.AuthorizationContext) RequestOption
WithAuthorizationContext sets the authorization context for user-owned wallet operations.
func WithIdempotencyKey ¶
func WithIdempotencyKey(key string) RequestOption
WithIdempotencyKey sets the idempotency key for the request. This is applicable to Rpc, RawSign, and Ethereum/Solana convenience methods.
func WithRequestExpiry ¶ added in v0.4.0
func WithRequestExpiry(expiry int64) RequestOption
WithRequestExpiry sets the request expiry for the request. The value should be a Unix timestamp in milliseconds. If not set, the client's DefaultRequestExpiryMs is used, or 15 minutes from now.
func WithRequestOptions ¶ added in v0.7.0
func WithRequestOptions(opts ...option.RequestOption) RequestOption
WithRequestOptions passes through option.RequestOption values to the underlying API call. This allows per-call overrides of transport-level settings such as option.WithHTTPClient or option.WithRequestTimeout.
type RpcIntentResponse ¶ added in v0.4.0
type RpcIntentResponse struct {
// Any of "RPC".
IntentType string `json:"intent_type" api:"required"`
// The original RPC request that would be sent to the wallet endpoint
RequestDetails RpcIntentResponseRequestDetails `json:"request_details" api:"required"`
// Result of RPC execution (only present if status is 'executed' or 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A wallet managed by Privy's wallet infrastructure.
CurrentResourceData Wallet `json:"current_resource_data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for an RPC intent
func (RpcIntentResponse) RawJSON ¶ added in v0.4.0
func (r RpcIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RpcIntentResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *RpcIntentResponse) UnmarshalJSON(data []byte) error
type RpcIntentResponseRequestDetails ¶ added in v0.4.0
type RpcIntentResponseRequestDetails struct {
// Request body for wallet RPC operations, discriminated by method.
Body WalletRpcRequestBodyUnionResp `json:"body" api:"required"`
// Any of "POST".
Method string `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The original RPC request that would be sent to the wallet endpoint
func (RpcIntentResponseRequestDetails) RawJSON ¶ added in v0.4.0
func (r RpcIntentResponseRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*RpcIntentResponseRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *RpcIntentResponseRequestDetails) UnmarshalJSON(data []byte) error
type RpcOption ¶
type RpcOption = RequestOption
RpcOption is a backwards-compatible alias for RequestOption.
type RuleDeleteIntentResponse ¶ added in v0.9.0
type RuleDeleteIntentResponse struct {
// Any of "RULE".
IntentType string `json:"intent_type" api:"required"`
// Request details for deleting a rule via intent.
RequestDetails RuleIntentDeleteRequestDetails `json:"request_details" api:"required"`
// Result of rule execution (only present if status is 'executed' or 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A rule that defines the conditions and action to take if the conditions are
// true.
CurrentResourceData PolicyRuleResponse `json:"current_resource_data"`
// A policy for controlling wallet operations.
Policy Policy `json:"policy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
Policy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for a delete rule intent
func (RuleDeleteIntentResponse) RawJSON ¶ added in v0.9.0
func (r RuleDeleteIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleDeleteIntentResponse) UnmarshalJSON ¶ added in v0.9.0
func (r *RuleDeleteIntentResponse) UnmarshalJSON(data []byte) error
type RuleIntentCreateRequestDetails ¶ added in v0.4.0
type RuleIntentCreateRequestDetails struct {
// The rules that apply to each method the policy covers.
Body PolicyRuleRequestBodyResp `json:"body" api:"required"`
// Any of "POST".
Method RuleIntentCreateRequestDetailsMethod `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request details for creating a rule via intent.
func (RuleIntentCreateRequestDetails) RawJSON ¶ added in v0.4.0
func (r RuleIntentCreateRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleIntentCreateRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *RuleIntentCreateRequestDetails) UnmarshalJSON(data []byte) error
type RuleIntentCreateRequestDetailsMethod ¶ added in v0.4.0
type RuleIntentCreateRequestDetailsMethod string
const (
RuleIntentCreateRequestDetailsMethodPost RuleIntentCreateRequestDetailsMethod = "POST"
)
type RuleIntentDeleteRequestBody ¶ added in v0.11.0
type RuleIntentDeleteRequestBody struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Empty request body for a rule delete intent.
func (RuleIntentDeleteRequestBody) RawJSON ¶ added in v0.11.0
func (r RuleIntentDeleteRequestBody) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleIntentDeleteRequestBody) UnmarshalJSON ¶ added in v0.11.0
func (r *RuleIntentDeleteRequestBody) UnmarshalJSON(data []byte) error
type RuleIntentDeleteRequestDetails ¶ added in v0.4.0
type RuleIntentDeleteRequestDetails struct {
// Any of "DELETE".
Method RuleIntentDeleteRequestDetailsMethod `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// Empty request body for a rule delete intent.
Body RuleIntentDeleteRequestBody `json:"body"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
URL respjson.Field
Body respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request details for deleting a rule via intent.
func (RuleIntentDeleteRequestDetails) RawJSON ¶ added in v0.4.0
func (r RuleIntentDeleteRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleIntentDeleteRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *RuleIntentDeleteRequestDetails) UnmarshalJSON(data []byte) error
type RuleIntentDeleteRequestDetailsMethod ¶ added in v0.4.0
type RuleIntentDeleteRequestDetailsMethod string
const (
RuleIntentDeleteRequestDetailsMethodDelete RuleIntentDeleteRequestDetailsMethod = "DELETE"
)
type RuleIntentRequestDetailsUnion ¶ added in v0.4.0
type RuleIntentRequestDetailsUnion struct {
// This field is a union of [PolicyRuleRequestBodyResp],
// [RuleIntentDeleteRequestBody]
Body RuleIntentRequestDetailsUnionBody `json:"body"`
// Any of "POST", "PATCH", "DELETE".
Method string `json:"method"`
URL string `json:"url"`
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
RuleIntentRequestDetailsUnion contains all possible properties and values from RuleIntentCreateRequestDetails, RuleIntentUpdateRequestDetails, RuleIntentDeleteRequestDetails.
Use the RuleIntentRequestDetailsUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (RuleIntentRequestDetailsUnion) AsAny ¶ added in v0.4.0
func (u RuleIntentRequestDetailsUnion) AsAny() anyRuleIntentRequestDetails
Use the following switch statement to find the correct variant
switch variant := RuleIntentRequestDetailsUnion.AsAny().(type) {
case privyclient.RuleIntentCreateRequestDetails:
case privyclient.RuleIntentUpdateRequestDetails:
case privyclient.RuleIntentDeleteRequestDetails:
default:
fmt.Errorf("no variant present")
}
func (RuleIntentRequestDetailsUnion) AsDelete ¶ added in v0.4.0
func (u RuleIntentRequestDetailsUnion) AsDelete() (v RuleIntentDeleteRequestDetails)
func (RuleIntentRequestDetailsUnion) AsPatch ¶ added in v0.4.0
func (u RuleIntentRequestDetailsUnion) AsPatch() (v RuleIntentUpdateRequestDetails)
func (RuleIntentRequestDetailsUnion) AsPost ¶ added in v0.4.0
func (u RuleIntentRequestDetailsUnion) AsPost() (v RuleIntentCreateRequestDetails)
func (RuleIntentRequestDetailsUnion) RawJSON ¶ added in v0.4.0
func (u RuleIntentRequestDetailsUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleIntentRequestDetailsUnion) UnmarshalJSON ¶ added in v0.4.0
func (r *RuleIntentRequestDetailsUnion) UnmarshalJSON(data []byte) error
type RuleIntentRequestDetailsUnionBody ¶ added in v0.4.0
type RuleIntentRequestDetailsUnionBody struct {
// This field is from variant [PolicyRuleRequestBodyResp].
Action PolicyAction `json:"action"`
// This field is from variant [PolicyRuleRequestBodyResp].
Conditions []PolicyConditionUnionResp `json:"conditions"`
// This field is from variant [PolicyRuleRequestBodyResp].
Method PolicyMethod `json:"method"`
// This field is from variant [PolicyRuleRequestBodyResp].
Name string `json:"name"`
JSON struct {
Action respjson.Field
Conditions respjson.Field
Method respjson.Field
Name respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
RuleIntentRequestDetailsUnionBody is an implicit subunion of RuleIntentRequestDetailsUnion. RuleIntentRequestDetailsUnionBody provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the RuleIntentRequestDetailsUnion.
func (*RuleIntentRequestDetailsUnionBody) UnmarshalJSON ¶ added in v0.4.0
func (r *RuleIntentRequestDetailsUnionBody) UnmarshalJSON(data []byte) error
type RuleIntentResponse ¶ added in v0.4.0
type RuleIntentResponse struct {
// Any of "RULE".
IntentType string `json:"intent_type" api:"required"`
// The original rule request. Method is POST (create), PATCH (update), or DELETE
// (delete)
RequestDetails RuleIntentRequestDetailsUnion `json:"request_details" api:"required"`
// Result of rule execution (only present if status is 'executed' or 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A rule that defines the conditions and action to take if the conditions are
// true.
CurrentResourceData PolicyRuleResponse `json:"current_resource_data"`
// A policy for controlling wallet operations.
Policy Policy `json:"policy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
Policy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for a rule intent
func (RuleIntentResponse) RawJSON ¶ added in v0.4.0
func (r RuleIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleIntentResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *RuleIntentResponse) UnmarshalJSON(data []byte) error
type RuleIntentUpdateRequestDetails ¶ added in v0.4.0
type RuleIntentUpdateRequestDetails struct {
// The rules that apply to each method the policy covers.
Body PolicyRuleRequestBodyResp `json:"body" api:"required"`
// Any of "PATCH".
Method RuleIntentUpdateRequestDetailsMethod `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request details for updating a rule via intent.
func (RuleIntentUpdateRequestDetails) RawJSON ¶ added in v0.4.0
func (r RuleIntentUpdateRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleIntentUpdateRequestDetails) UnmarshalJSON ¶ added in v0.4.0
func (r *RuleIntentUpdateRequestDetails) UnmarshalJSON(data []byte) error
type RuleIntentUpdateRequestDetailsMethod ¶ added in v0.4.0
type RuleIntentUpdateRequestDetailsMethod string
const (
RuleIntentUpdateRequestDetailsMethodPatch RuleIntentUpdateRequestDetailsMethod = "PATCH"
)
type RuleMutateIntentResponse ¶ added in v0.9.0
type RuleMutateIntentResponse struct {
// Any of "RULE".
IntentType string `json:"intent_type" api:"required"`
// The original rule request. Method is POST (create), PATCH (update), or DELETE
// (delete)
RequestDetails RuleIntentRequestDetailsUnion `json:"request_details" api:"required"`
// Result of rule execution (only present if status is 'executed' or 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A rule that defines the conditions and action to take if the conditions are
// true.
CurrentResourceData PolicyRuleResponse `json:"current_resource_data"`
// A policy for controlling wallet operations.
Policy Policy `json:"policy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
Policy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for a create or update rule intent
func (RuleMutateIntentResponse) RawJSON ¶ added in v0.9.0
func (r RuleMutateIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RuleMutateIntentResponse) UnmarshalJSON ¶ added in v0.9.0
func (r *RuleMutateIntentResponse) UnmarshalJSON(data []byte) error
type SMSMfaMethod ¶
type SMSMfaMethod struct {
// Any of "sms".
Type SMSMfaMethodType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A SMS MFA method.
func (SMSMfaMethod) RawJSON ¶
func (r SMSMfaMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*SMSMfaMethod) UnmarshalJSON ¶
func (r *SMSMfaMethod) UnmarshalJSON(data []byte) error
type SMSMfaMethodType ¶
type SMSMfaMethodType string
const (
SMSMfaMethodTypeSMS SMSMfaMethodType = "sms"
)
type SeedPhraseExportInput ¶ added in v0.5.0
type SeedPhraseExportInput struct {
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type,omitzero" api:"required"`
// The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
// format.
RecipientPublicKey RecipientPublicKey `json:"recipient_public_key" api:"required"`
ExportSeedPhrase param.Opt[bool] `json:"export_seed_phrase,omitzero"`
// The export type. 'display' is for showing the key to the user in the UI,
// 'client' is for exporting to the client application.
//
// Any of "display", "client".
ExportType ExportType `json:"export_type,omitzero"`
// contains filtered or unexported fields
}
Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
The properties EncryptionType, RecipientPublicKey are required.
func (SeedPhraseExportInput) MarshalJSON ¶ added in v0.6.0
func (r SeedPhraseExportInput) MarshalJSON() (data []byte, err error)
func (*SeedPhraseExportInput) UnmarshalJSON ¶ added in v0.5.0
func (r *SeedPhraseExportInput) UnmarshalJSON(data []byte) error
type SeedPhraseExportInputResp ¶ added in v0.6.0
type SeedPhraseExportInputResp struct {
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type" api:"required"`
// The recipient public key for HPKE encryption, in PEM or DER (base64-encoded)
// format.
RecipientPublicKey RecipientPublicKey `json:"recipient_public_key" api:"required"`
ExportSeedPhrase bool `json:"export_seed_phrase"`
// The export type. 'display' is for showing the key to the user in the UI,
// 'client' is for exporting to the client application.
//
// Any of "display", "client".
ExportType ExportType `json:"export_type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EncryptionType respjson.Field
RecipientPublicKey respjson.Field
ExportSeedPhrase respjson.Field
ExportType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Input for exporting a wallet (private key or seed phrase) with HPKE encryption.
func (SeedPhraseExportInputResp) RawJSON ¶ added in v0.6.0
func (r SeedPhraseExportInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SeedPhraseExportInputResp) ToParam ¶ added in v0.6.0
func (r SeedPhraseExportInputResp) ToParam() SeedPhraseExportInput
ToParam converts this SeedPhraseExportInputResp to a SeedPhraseExportInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SeedPhraseExportInput.Overrides()
func (*SeedPhraseExportInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SeedPhraseExportInputResp) UnmarshalJSON(data []byte) error
type SeedPhraseExportResponse ¶ added in v0.5.0
type SeedPhraseExportResponse struct {
Ciphertext string `json:"ciphertext" api:"required"`
EncapsulatedKey string `json:"encapsulated_key" api:"required"`
// The encryption type of the wallet to import. Currently only supports `HPKE`.
//
// Any of "HPKE".
EncryptionType HpkeEncryption `json:"encryption_type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Ciphertext respjson.Field
EncapsulatedKey respjson.Field
EncryptionType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response containing HPKE-encrypted wallet data (private key or seed phrase).
func (SeedPhraseExportResponse) RawJSON ¶ added in v0.5.0
func (r SeedPhraseExportResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SeedPhraseExportResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *SeedPhraseExportResponse) UnmarshalJSON(data []byte) error
type SharedService ¶ added in v0.4.0
type SharedService struct {
}
SharedService contains methods and other services that help with interacting with the Privy API 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 NewSharedService method instead.
func NewSharedService ¶ added in v0.4.0
func NewSharedService(opts ...option.RequestOption) (r SharedService)
NewSharedService 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 SignatureOptions ¶ added in v0.11.0
type SignatureOptions struct {
// The type of cryptographic signature to produce. Use "ecdsa" for standard ECDSA
// signatures, or "erc1271" for ERC-1271 compliant signatures for smart account
// wallets.
//
// Any of "ecdsa", "erc1271".
Type SignatureType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Options controlling signature production for personal_sign and eth_signTypedData_v4.
The property Type is required.
func (SignatureOptions) MarshalJSON ¶ added in v0.11.0
func (r SignatureOptions) MarshalJSON() (data []byte, err error)
func (*SignatureOptions) UnmarshalJSON ¶ added in v0.11.0
func (r *SignatureOptions) UnmarshalJSON(data []byte) error
type SignatureOptionsResp ¶ added in v0.11.0
type SignatureOptionsResp struct {
// The type of cryptographic signature to produce. Use "ecdsa" for standard ECDSA
// signatures, or "erc1271" for ERC-1271 compliant signatures for smart account
// wallets.
//
// Any of "ecdsa", "erc1271".
Type SignatureType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Options controlling signature production for personal_sign and eth_signTypedData_v4.
func (SignatureOptionsResp) RawJSON ¶ added in v0.11.0
func (r SignatureOptionsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SignatureOptionsResp) ToParam ¶ added in v0.11.0
func (r SignatureOptionsResp) ToParam() SignatureOptions
ToParam converts this SignatureOptionsResp to a SignatureOptions.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SignatureOptions.Overrides()
func (*SignatureOptionsResp) UnmarshalJSON ¶ added in v0.11.0
func (r *SignatureOptionsResp) UnmarshalJSON(data []byte) error
type SignatureType ¶ added in v0.11.0
type SignatureType string
The type of cryptographic signature to produce. Use "ecdsa" for standard ECDSA signatures, or "erc1271" for ERC-1271 compliant signatures for smart account wallets.
const ( SignatureTypeEcdsa SignatureType = "ecdsa" SignatureTypeErc1271 SignatureType = "erc1271" )
type SmartWalletConfigurationDisabled ¶ added in v0.4.0
type SmartWalletConfigurationDisabled struct {
// Any of false.
Enabled bool `json:"enabled" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A disabled smart wallet configuration.
func (SmartWalletConfigurationDisabled) RawJSON ¶ added in v0.4.0
func (r SmartWalletConfigurationDisabled) RawJSON() string
Returns the unmodified JSON received from the API
func (*SmartWalletConfigurationDisabled) UnmarshalJSON ¶ added in v0.4.0
func (r *SmartWalletConfigurationDisabled) UnmarshalJSON(data []byte) error
type SmartWalletConfigurationEnabled ¶ added in v0.4.0
type SmartWalletConfigurationEnabled struct {
ConfiguredNetworks []SmartWalletNetworkConfiguration `json:"configured_networks" api:"required"`
// Any of true.
Enabled bool `json:"enabled" api:"required"`
// The supported smart wallet providers.
//
// Any of "safe", "kernel", "light_account", "biconomy", "coinbase_smart_wallet",
// "thirdweb", "nexus".
SmartWalletType SmartWalletType `json:"smart_wallet_type" api:"required"`
SmartWalletVersion string `json:"smart_wallet_version"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ConfiguredNetworks respjson.Field
Enabled respjson.Field
SmartWalletType respjson.Field
SmartWalletVersion respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An enabled smart wallet configuration.
func (SmartWalletConfigurationEnabled) RawJSON ¶ added in v0.4.0
func (r SmartWalletConfigurationEnabled) RawJSON() string
Returns the unmodified JSON received from the API
func (*SmartWalletConfigurationEnabled) UnmarshalJSON ¶ added in v0.4.0
func (r *SmartWalletConfigurationEnabled) UnmarshalJSON(data []byte) error
type SmartWalletConfigurationUnion ¶ added in v0.4.0
type SmartWalletConfigurationUnion struct {
Enabled bool `json:"enabled"`
// This field is from variant [SmartWalletConfigurationEnabled].
ConfiguredNetworks []SmartWalletNetworkConfiguration `json:"configured_networks"`
// This field is from variant [SmartWalletConfigurationEnabled].
SmartWalletType SmartWalletType `json:"smart_wallet_type"`
// This field is from variant [SmartWalletConfigurationEnabled].
SmartWalletVersion string `json:"smart_wallet_version"`
JSON struct {
Enabled respjson.Field
ConfiguredNetworks respjson.Field
SmartWalletType respjson.Field
SmartWalletVersion respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SmartWalletConfigurationUnion contains all possible properties and values from SmartWalletConfigurationDisabled, SmartWalletConfigurationEnabled.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (SmartWalletConfigurationUnion) AsSmartWalletConfigurationDisabled ¶ added in v0.4.0
func (u SmartWalletConfigurationUnion) AsSmartWalletConfigurationDisabled() (v SmartWalletConfigurationDisabled)
func (SmartWalletConfigurationUnion) AsSmartWalletConfigurationEnabled ¶ added in v0.4.0
func (u SmartWalletConfigurationUnion) AsSmartWalletConfigurationEnabled() (v SmartWalletConfigurationEnabled)
func (SmartWalletConfigurationUnion) RawJSON ¶ added in v0.4.0
func (u SmartWalletConfigurationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SmartWalletConfigurationUnion) UnmarshalJSON ¶ added in v0.4.0
func (r *SmartWalletConfigurationUnion) UnmarshalJSON(data []byte) error
type SmartWalletNetworkConfiguration ¶ added in v0.4.0
type SmartWalletNetworkConfiguration struct {
BundlerURL string `json:"bundler_url" api:"required"`
ChainID string `json:"chain_id" api:"required"`
ChainName string `json:"chain_name"`
// The Alchemy paymaster context for a smart wallet network configuration.
PaymasterContext AlchemyPaymasterContext `json:"paymaster_context"`
PaymasterURL string `json:"paymaster_url"`
RpcURL string `json:"rpc_url"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BundlerURL respjson.Field
ChainID respjson.Field
ChainName respjson.Field
PaymasterContext respjson.Field
PaymasterURL respjson.Field
RpcURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Network configuration for a smart wallet.
func (SmartWalletNetworkConfiguration) RawJSON ¶ added in v0.4.0
func (r SmartWalletNetworkConfiguration) RawJSON() string
Returns the unmodified JSON received from the API
func (*SmartWalletNetworkConfiguration) UnmarshalJSON ¶ added in v0.4.0
func (r *SmartWalletNetworkConfiguration) UnmarshalJSON(data []byte) error
type SmartWalletType ¶
type SmartWalletType string
The supported smart wallet providers.
const ( SmartWalletTypeSafe SmartWalletType = "safe" SmartWalletTypeKernel SmartWalletType = "kernel" SmartWalletTypeLightAccount SmartWalletType = "light_account" SmartWalletTypeBiconomy SmartWalletType = "biconomy" SmartWalletTypeCoinbaseSmartWallet SmartWalletType = "coinbase_smart_wallet" SmartWalletTypeThirdweb SmartWalletType = "thirdweb" SmartWalletTypeNexus SmartWalletType = "nexus" )
type SolanaProgramInstructionCondition ¶ added in v0.6.0
type SolanaProgramInstructionCondition struct {
// Any of "programId".
Field SolanaProgramInstructionConditionField `json:"field,omitzero" api:"required"`
// Any of "solana_program_instruction".
FieldSource SolanaProgramInstructionConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Solana Program attributes, enables allowlisting Solana Programs.
The properties Field, FieldSource, Operator, Value are required.
func (SolanaProgramInstructionCondition) MarshalJSON ¶ added in v0.6.0
func (r SolanaProgramInstructionCondition) MarshalJSON() (data []byte, err error)
func (*SolanaProgramInstructionCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaProgramInstructionCondition) UnmarshalJSON(data []byte) error
type SolanaProgramInstructionConditionField ¶ added in v0.6.0
type SolanaProgramInstructionConditionField string
const (
SolanaProgramInstructionConditionFieldProgramID SolanaProgramInstructionConditionField = "programId"
)
type SolanaProgramInstructionConditionFieldSource ¶ added in v0.6.0
type SolanaProgramInstructionConditionFieldSource string
const (
SolanaProgramInstructionConditionFieldSourceSolanaProgramInstruction SolanaProgramInstructionConditionFieldSource = "solana_program_instruction"
)
type SolanaProgramInstructionConditionResp ¶ added in v0.6.0
type SolanaProgramInstructionConditionResp struct {
// Any of "programId".
Field SolanaProgramInstructionConditionField `json:"field" api:"required"`
// Any of "solana_program_instruction".
FieldSource SolanaProgramInstructionConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Solana Program attributes, enables allowlisting Solana Programs.
func (SolanaProgramInstructionConditionResp) RawJSON ¶ added in v0.6.0
func (r SolanaProgramInstructionConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaProgramInstructionConditionResp) ToParam ¶ added in v0.6.0
func (r SolanaProgramInstructionConditionResp) ToParam() SolanaProgramInstructionCondition
ToParam converts this SolanaProgramInstructionConditionResp to a SolanaProgramInstructionCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaProgramInstructionCondition.Overrides()
func (*SolanaProgramInstructionConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaProgramInstructionConditionResp) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcInput ¶ added in v0.0.4
type SolanaSignAndSendTransactionRpcInput struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
// Any of "signAndSendTransaction".
Method SolanaSignAndSendTransactionRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the SVM `signAndSendTransaction` RPC.
Params SolanaSignAndSendTransactionRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
OptimisticBroadcast param.Opt[bool] `json:"optimistic_broadcast,omitzero"`
ReferenceID param.Opt[string] `json:"reference_id,omitzero"`
Sponsor param.Opt[bool] `json:"sponsor,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "solana".
ChainType SolanaSignAndSendTransactionRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a transaction.
The properties Caip2, Method, Params are required.
func (SolanaSignAndSendTransactionRpcInput) MarshalJSON ¶ added in v0.0.4
func (r SolanaSignAndSendTransactionRpcInput) MarshalJSON() (data []byte, err error)
func (*SolanaSignAndSendTransactionRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *SolanaSignAndSendTransactionRpcInput) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcInputChainType ¶
type SolanaSignAndSendTransactionRpcInputChainType string
const (
SolanaSignAndSendTransactionRpcInputChainTypeSolana SolanaSignAndSendTransactionRpcInputChainType = "solana"
)
type SolanaSignAndSendTransactionRpcInputMethod ¶
type SolanaSignAndSendTransactionRpcInputMethod string
const (
SolanaSignAndSendTransactionRpcInputMethodSignAndSendTransaction SolanaSignAndSendTransactionRpcInputMethod = "signAndSendTransaction"
)
type SolanaSignAndSendTransactionRpcInputParams ¶ added in v0.0.4
type SolanaSignAndSendTransactionRpcInputParams struct {
// Any of "base64".
Encoding SolanaSignAndSendTransactionRpcInputParamsEncoding `json:"encoding,omitzero" api:"required"`
Transaction string `json:"transaction" api:"required"`
// contains filtered or unexported fields
}
Parameters for the SVM `signAndSendTransaction` RPC.
The properties Encoding, Transaction are required.
func (SolanaSignAndSendTransactionRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r SolanaSignAndSendTransactionRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SolanaSignAndSendTransactionRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *SolanaSignAndSendTransactionRpcInputParams) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcInputParamsEncoding ¶ added in v0.4.0
type SolanaSignAndSendTransactionRpcInputParamsEncoding string
const (
SolanaSignAndSendTransactionRpcInputParamsEncodingBase64 SolanaSignAndSendTransactionRpcInputParamsEncoding = "base64"
)
type SolanaSignAndSendTransactionRpcInputParamsResp ¶ added in v0.4.0
type SolanaSignAndSendTransactionRpcInputParamsResp struct {
// Any of "base64".
Encoding SolanaSignAndSendTransactionRpcInputParamsEncoding `json:"encoding" api:"required"`
Transaction string `json:"transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Transaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the SVM `signAndSendTransaction` RPC.
func (SolanaSignAndSendTransactionRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SolanaSignAndSendTransactionRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSignAndSendTransactionRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SolanaSignAndSendTransactionRpcInputParamsResp) ToParam() SolanaSignAndSendTransactionRpcInputParams
ToParam converts this SolanaSignAndSendTransactionRpcInputParamsResp to a SolanaSignAndSendTransactionRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSignAndSendTransactionRpcInputParams.Overrides()
func (*SolanaSignAndSendTransactionRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SolanaSignAndSendTransactionRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcInputResp ¶ added in v0.6.0
type SolanaSignAndSendTransactionRpcInputResp struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
// Any of "signAndSendTransaction".
Method SolanaSignAndSendTransactionRpcInputMethod `json:"method" api:"required"`
// Parameters for the SVM `signAndSendTransaction` RPC.
Params SolanaSignAndSendTransactionRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "solana".
ChainType SolanaSignAndSendTransactionRpcInputChainType `json:"chain_type"`
OptimisticBroadcast bool `json:"optimistic_broadcast"`
ReferenceID string `json:"reference_id"`
Sponsor bool `json:"sponsor"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
OptimisticBroadcast respjson.Field
ReferenceID respjson.Field
Sponsor respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the SVM `signAndSendTransaction` RPC to sign and broadcast a transaction.
func (SolanaSignAndSendTransactionRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SolanaSignAndSendTransactionRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSignAndSendTransactionRpcInputResp) ToParam ¶ added in v0.6.0
func (r SolanaSignAndSendTransactionRpcInputResp) ToParam() SolanaSignAndSendTransactionRpcInput
ToParam converts this SolanaSignAndSendTransactionRpcInputResp to a SolanaSignAndSendTransactionRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSignAndSendTransactionRpcInput.Overrides()
func (*SolanaSignAndSendTransactionRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaSignAndSendTransactionRpcInputResp) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcResponse ¶
type SolanaSignAndSendTransactionRpcResponse struct {
// Data returned by the SVM `signAndSendTransaction` RPC.
Data SolanaSignAndSendTransactionRpcResponseData `json:"data" api:"required"`
// Any of "signAndSendTransaction".
Method SolanaSignAndSendTransactionRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the SVM `signAndSendTransaction` RPC.
func (SolanaSignAndSendTransactionRpcResponse) RawJSON ¶
func (r SolanaSignAndSendTransactionRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SolanaSignAndSendTransactionRpcResponse) UnmarshalJSON ¶
func (r *SolanaSignAndSendTransactionRpcResponse) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcResponseData ¶
type SolanaSignAndSendTransactionRpcResponseData struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
Hash string `json:"hash" api:"required"`
ReferenceID string `json:"reference_id" api:"nullable"`
SignedTransaction string `json:"signed_transaction"`
TransactionID string `json:"transaction_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Hash respjson.Field
ReferenceID respjson.Field
SignedTransaction respjson.Field
TransactionID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the SVM `signAndSendTransaction` RPC.
func (SolanaSignAndSendTransactionRpcResponseData) RawJSON ¶
func (r SolanaSignAndSendTransactionRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SolanaSignAndSendTransactionRpcResponseData) UnmarshalJSON ¶
func (r *SolanaSignAndSendTransactionRpcResponseData) UnmarshalJSON(data []byte) error
type SolanaSignAndSendTransactionRpcResponseMethod ¶
type SolanaSignAndSendTransactionRpcResponseMethod string
const (
SolanaSignAndSendTransactionRpcResponseMethodSignAndSendTransaction SolanaSignAndSendTransactionRpcResponseMethod = "signAndSendTransaction"
)
type SolanaSignMessageRpcInput ¶ added in v0.0.4
type SolanaSignMessageRpcInput struct {
// Any of "signMessage".
Method SolanaSignMessageRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the SVM `signMessage` RPC.
Params SolanaSignMessageRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "solana".
ChainType SolanaSignMessageRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes the SVM `signMessage` RPC to sign a message.
The properties Method, Params are required.
func (SolanaSignMessageRpcInput) MarshalJSON ¶ added in v0.0.4
func (r SolanaSignMessageRpcInput) MarshalJSON() (data []byte, err error)
func (*SolanaSignMessageRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *SolanaSignMessageRpcInput) UnmarshalJSON(data []byte) error
type SolanaSignMessageRpcInputChainType ¶
type SolanaSignMessageRpcInputChainType string
const (
SolanaSignMessageRpcInputChainTypeSolana SolanaSignMessageRpcInputChainType = "solana"
)
type SolanaSignMessageRpcInputMethod ¶
type SolanaSignMessageRpcInputMethod string
const (
SolanaSignMessageRpcInputMethodSignMessage SolanaSignMessageRpcInputMethod = "signMessage"
)
type SolanaSignMessageRpcInputParams ¶ added in v0.0.4
type SolanaSignMessageRpcInputParams struct {
// Any of "base64".
Encoding SolanaSignMessageRpcInputParamsEncoding `json:"encoding,omitzero" api:"required"`
Message string `json:"message" api:"required"`
// contains filtered or unexported fields
}
Parameters for the SVM `signMessage` RPC.
The properties Encoding, Message are required.
func (SolanaSignMessageRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r SolanaSignMessageRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SolanaSignMessageRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *SolanaSignMessageRpcInputParams) UnmarshalJSON(data []byte) error
type SolanaSignMessageRpcInputParamsEncoding ¶ added in v0.4.0
type SolanaSignMessageRpcInputParamsEncoding string
const (
SolanaSignMessageRpcInputParamsEncodingBase64 SolanaSignMessageRpcInputParamsEncoding = "base64"
)
type SolanaSignMessageRpcInputParamsResp ¶ added in v0.4.0
type SolanaSignMessageRpcInputParamsResp struct {
// Any of "base64".
Encoding SolanaSignMessageRpcInputParamsEncoding `json:"encoding" api:"required"`
Message string `json:"message" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the SVM `signMessage` RPC.
func (SolanaSignMessageRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SolanaSignMessageRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSignMessageRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SolanaSignMessageRpcInputParamsResp) ToParam() SolanaSignMessageRpcInputParams
ToParam converts this SolanaSignMessageRpcInputParamsResp to a SolanaSignMessageRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSignMessageRpcInputParams.Overrides()
func (*SolanaSignMessageRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SolanaSignMessageRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SolanaSignMessageRpcInputResp ¶ added in v0.6.0
type SolanaSignMessageRpcInputResp struct {
// Any of "signMessage".
Method SolanaSignMessageRpcInputMethod `json:"method" api:"required"`
// Parameters for the SVM `signMessage` RPC.
Params SolanaSignMessageRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "solana".
ChainType SolanaSignMessageRpcInputChainType `json:"chain_type"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the SVM `signMessage` RPC to sign a message.
func (SolanaSignMessageRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SolanaSignMessageRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSignMessageRpcInputResp) ToParam ¶ added in v0.6.0
func (r SolanaSignMessageRpcInputResp) ToParam() SolanaSignMessageRpcInput
ToParam converts this SolanaSignMessageRpcInputResp to a SolanaSignMessageRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSignMessageRpcInput.Overrides()
func (*SolanaSignMessageRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaSignMessageRpcInputResp) UnmarshalJSON(data []byte) error
type SolanaSignMessageRpcResponse ¶
type SolanaSignMessageRpcResponse struct {
// Data returned by the SVM `signMessage` RPC.
Data SolanaSignMessageRpcResponseData `json:"data" api:"required"`
// Any of "signMessage".
Method SolanaSignMessageRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the SVM `signMessage` RPC.
func (SolanaSignMessageRpcResponse) RawJSON ¶
func (r SolanaSignMessageRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SolanaSignMessageRpcResponse) UnmarshalJSON ¶
func (r *SolanaSignMessageRpcResponse) UnmarshalJSON(data []byte) error
type SolanaSignMessageRpcResponseData ¶
type SolanaSignMessageRpcResponseData struct {
// Any of "base64".
Encoding SolanaSignMessageRpcResponseDataEncoding `json:"encoding" api:"required"`
Signature string `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the SVM `signMessage` RPC.
func (SolanaSignMessageRpcResponseData) RawJSON ¶
func (r SolanaSignMessageRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SolanaSignMessageRpcResponseData) UnmarshalJSON ¶
func (r *SolanaSignMessageRpcResponseData) UnmarshalJSON(data []byte) error
type SolanaSignMessageRpcResponseDataEncoding ¶ added in v0.4.0
type SolanaSignMessageRpcResponseDataEncoding string
const (
SolanaSignMessageRpcResponseDataEncodingBase64 SolanaSignMessageRpcResponseDataEncoding = "base64"
)
type SolanaSignMessageRpcResponseMethod ¶
type SolanaSignMessageRpcResponseMethod string
const (
SolanaSignMessageRpcResponseMethodSignMessage SolanaSignMessageRpcResponseMethod = "signMessage"
)
type SolanaSignTransactionRpcInput ¶ added in v0.0.4
type SolanaSignTransactionRpcInput struct {
// Any of "signTransaction".
Method SolanaSignTransactionRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the SVM `signTransaction` RPC.
Params SolanaSignTransactionRpcInputParams `json:"params,omitzero" api:"required"`
Address param.Opt[string] `json:"address,omitzero"`
WalletID param.Opt[string] `json:"wallet_id,omitzero"`
// Any of "solana".
ChainType SolanaSignTransactionRpcInputChainType `json:"chain_type,omitzero"`
// contains filtered or unexported fields
}
Executes the SVM `signTransaction` RPC to sign a transaction.
The properties Method, Params are required.
func (SolanaSignTransactionRpcInput) MarshalJSON ¶ added in v0.0.4
func (r SolanaSignTransactionRpcInput) MarshalJSON() (data []byte, err error)
func (*SolanaSignTransactionRpcInput) UnmarshalJSON ¶ added in v0.0.4
func (r *SolanaSignTransactionRpcInput) UnmarshalJSON(data []byte) error
type SolanaSignTransactionRpcInputChainType ¶
type SolanaSignTransactionRpcInputChainType string
const (
SolanaSignTransactionRpcInputChainTypeSolana SolanaSignTransactionRpcInputChainType = "solana"
)
type SolanaSignTransactionRpcInputMethod ¶
type SolanaSignTransactionRpcInputMethod string
const (
SolanaSignTransactionRpcInputMethodSignTransaction SolanaSignTransactionRpcInputMethod = "signTransaction"
)
type SolanaSignTransactionRpcInputParams ¶ added in v0.0.4
type SolanaSignTransactionRpcInputParams struct {
// Any of "base64".
Encoding SolanaSignTransactionRpcInputParamsEncoding `json:"encoding,omitzero" api:"required"`
Transaction string `json:"transaction" api:"required"`
// contains filtered or unexported fields
}
Parameters for the SVM `signTransaction` RPC.
The properties Encoding, Transaction are required.
func (SolanaSignTransactionRpcInputParams) MarshalJSON ¶ added in v0.0.4
func (r SolanaSignTransactionRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SolanaSignTransactionRpcInputParams) UnmarshalJSON ¶ added in v0.0.4
func (r *SolanaSignTransactionRpcInputParams) UnmarshalJSON(data []byte) error
type SolanaSignTransactionRpcInputParamsEncoding ¶ added in v0.4.0
type SolanaSignTransactionRpcInputParamsEncoding string
const (
SolanaSignTransactionRpcInputParamsEncodingBase64 SolanaSignTransactionRpcInputParamsEncoding = "base64"
)
type SolanaSignTransactionRpcInputParamsResp ¶ added in v0.4.0
type SolanaSignTransactionRpcInputParamsResp struct {
// Any of "base64".
Encoding SolanaSignTransactionRpcInputParamsEncoding `json:"encoding" api:"required"`
Transaction string `json:"transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
Transaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the SVM `signTransaction` RPC.
func (SolanaSignTransactionRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SolanaSignTransactionRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSignTransactionRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SolanaSignTransactionRpcInputParamsResp) ToParam() SolanaSignTransactionRpcInputParams
ToParam converts this SolanaSignTransactionRpcInputParamsResp to a SolanaSignTransactionRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSignTransactionRpcInputParams.Overrides()
func (*SolanaSignTransactionRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SolanaSignTransactionRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SolanaSignTransactionRpcInputResp ¶ added in v0.6.0
type SolanaSignTransactionRpcInputResp struct {
// Any of "signTransaction".
Method SolanaSignTransactionRpcInputMethod `json:"method" api:"required"`
// Parameters for the SVM `signTransaction` RPC.
Params SolanaSignTransactionRpcInputParamsResp `json:"params" api:"required"`
Address string `json:"address"`
// Any of "solana".
ChainType SolanaSignTransactionRpcInputChainType `json:"chain_type"`
WalletID string `json:"wallet_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Address respjson.Field
ChainType respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the SVM `signTransaction` RPC to sign a transaction.
func (SolanaSignTransactionRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SolanaSignTransactionRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSignTransactionRpcInputResp) ToParam ¶ added in v0.6.0
func (r SolanaSignTransactionRpcInputResp) ToParam() SolanaSignTransactionRpcInput
ToParam converts this SolanaSignTransactionRpcInputResp to a SolanaSignTransactionRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSignTransactionRpcInput.Overrides()
func (*SolanaSignTransactionRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaSignTransactionRpcInputResp) UnmarshalJSON(data []byte) error
type SolanaSignTransactionRpcResponse ¶
type SolanaSignTransactionRpcResponse struct {
// Data returned by the SVM `signTransaction` RPC.
Data SolanaSignTransactionRpcResponseData `json:"data" api:"required"`
// Any of "signTransaction".
Method SolanaSignTransactionRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the SVM `signTransaction` RPC.
func (SolanaSignTransactionRpcResponse) RawJSON ¶
func (r SolanaSignTransactionRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SolanaSignTransactionRpcResponse) UnmarshalJSON ¶
func (r *SolanaSignTransactionRpcResponse) UnmarshalJSON(data []byte) error
type SolanaSignTransactionRpcResponseData ¶
type SolanaSignTransactionRpcResponseData struct {
// Any of "base64".
Encoding SolanaSignTransactionRpcResponseDataEncoding `json:"encoding" api:"required"`
SignedTransaction string `json:"signed_transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
SignedTransaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the SVM `signTransaction` RPC.
func (SolanaSignTransactionRpcResponseData) RawJSON ¶
func (r SolanaSignTransactionRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SolanaSignTransactionRpcResponseData) UnmarshalJSON ¶
func (r *SolanaSignTransactionRpcResponseData) UnmarshalJSON(data []byte) error
type SolanaSignTransactionRpcResponseDataEncoding ¶ added in v0.4.0
type SolanaSignTransactionRpcResponseDataEncoding string
const (
SolanaSignTransactionRpcResponseDataEncodingBase64 SolanaSignTransactionRpcResponseDataEncoding = "base64"
)
type SolanaSignTransactionRpcResponseMethod ¶
type SolanaSignTransactionRpcResponseMethod string
const (
SolanaSignTransactionRpcResponseMethodSignTransaction SolanaSignTransactionRpcResponseMethod = "signTransaction"
)
type SolanaSystemProgramInstructionCondition ¶ added in v0.6.0
type SolanaSystemProgramInstructionCondition struct {
// Supported fields for Solana System Program conditions including Transfer
// instruction fields.
//
// Any of "instructionName", "Transfer.from", "Transfer.to", "Transfer.lamports".
Field SolanaSystemProgramInstructionConditionField `json:"field,omitzero" api:"required"`
// Any of "solana_system_program_instruction".
FieldSource SolanaSystemProgramInstructionConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Solana System Program attributes, including more granular Transfer instruction fields.
The properties Field, FieldSource, Operator, Value are required.
func (SolanaSystemProgramInstructionCondition) MarshalJSON ¶ added in v0.6.0
func (r SolanaSystemProgramInstructionCondition) MarshalJSON() (data []byte, err error)
func (*SolanaSystemProgramInstructionCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaSystemProgramInstructionCondition) UnmarshalJSON(data []byte) error
type SolanaSystemProgramInstructionConditionField ¶ added in v0.6.0
type SolanaSystemProgramInstructionConditionField string
Supported fields for Solana System Program conditions including Transfer instruction fields.
const ( SolanaSystemProgramInstructionConditionFieldInstructionName SolanaSystemProgramInstructionConditionField = "instructionName" SolanaSystemProgramInstructionConditionFieldTransferFrom SolanaSystemProgramInstructionConditionField = "Transfer.from" SolanaSystemProgramInstructionConditionFieldTransferTo SolanaSystemProgramInstructionConditionField = "Transfer.to" SolanaSystemProgramInstructionConditionFieldTransferLamports SolanaSystemProgramInstructionConditionField = "Transfer.lamports" )
type SolanaSystemProgramInstructionConditionFieldSource ¶ added in v0.6.0
type SolanaSystemProgramInstructionConditionFieldSource string
const (
SolanaSystemProgramInstructionConditionFieldSourceSolanaSystemProgramInstruction SolanaSystemProgramInstructionConditionFieldSource = "solana_system_program_instruction"
)
type SolanaSystemProgramInstructionConditionResp ¶ added in v0.6.0
type SolanaSystemProgramInstructionConditionResp struct {
// Supported fields for Solana System Program conditions including Transfer
// instruction fields.
//
// Any of "instructionName", "Transfer.from", "Transfer.to", "Transfer.lamports".
Field SolanaSystemProgramInstructionConditionField `json:"field" api:"required"`
// Any of "solana_system_program_instruction".
FieldSource SolanaSystemProgramInstructionConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Solana System Program attributes, including more granular Transfer instruction fields.
func (SolanaSystemProgramInstructionConditionResp) RawJSON ¶ added in v0.6.0
func (r SolanaSystemProgramInstructionConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaSystemProgramInstructionConditionResp) ToParam ¶ added in v0.6.0
func (r SolanaSystemProgramInstructionConditionResp) ToParam() SolanaSystemProgramInstructionCondition
ToParam converts this SolanaSystemProgramInstructionConditionResp to a SolanaSystemProgramInstructionCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaSystemProgramInstructionCondition.Overrides()
func (*SolanaSystemProgramInstructionConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaSystemProgramInstructionConditionResp) UnmarshalJSON(data []byte) error
type SolanaTokenProgramInstructionCondition ¶ added in v0.6.0
type SolanaTokenProgramInstructionCondition struct {
// Supported fields for Solana Token Program conditions including Transfer,
// TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction
// fields.
//
// Any of "instructionName", "Transfer.source", "Transfer.destination",
// "Transfer.authority", "Transfer.amount", "TransferChecked.source",
// "TransferChecked.destination", "TransferChecked.authority",
// "TransferChecked.amount", "TransferChecked.mint", "Burn.account", "Burn.mint",
// "Burn.authority", "Burn.amount", "MintTo.mint", "MintTo.account",
// "MintTo.authority", "MintTo.amount", "CloseAccount.account",
// "CloseAccount.destination", "CloseAccount.authority",
// "InitializeAccount3.account", "InitializeAccount3.mint",
// "InitializeAccount3.owner".
Field SolanaTokenProgramInstructionConditionField `json:"field,omitzero" api:"required"`
// Any of "solana_token_program_instruction".
FieldSource SolanaTokenProgramInstructionConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Solana Token Program attributes, including more granular TransferChecked instruction fields.
The properties Field, FieldSource, Operator, Value are required.
func (SolanaTokenProgramInstructionCondition) MarshalJSON ¶ added in v0.6.0
func (r SolanaTokenProgramInstructionCondition) MarshalJSON() (data []byte, err error)
func (*SolanaTokenProgramInstructionCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaTokenProgramInstructionCondition) UnmarshalJSON(data []byte) error
type SolanaTokenProgramInstructionConditionField ¶ added in v0.6.0
type SolanaTokenProgramInstructionConditionField string
Supported fields for Solana Token Program conditions including Transfer, TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction fields.
const ( SolanaTokenProgramInstructionConditionFieldInstructionName SolanaTokenProgramInstructionConditionField = "instructionName" SolanaTokenProgramInstructionConditionFieldTransferSource SolanaTokenProgramInstructionConditionField = "Transfer.source" SolanaTokenProgramInstructionConditionFieldTransferDestination SolanaTokenProgramInstructionConditionField = "Transfer.destination" SolanaTokenProgramInstructionConditionFieldTransferAuthority SolanaTokenProgramInstructionConditionField = "Transfer.authority" SolanaTokenProgramInstructionConditionFieldTransferAmount SolanaTokenProgramInstructionConditionField = "Transfer.amount" SolanaTokenProgramInstructionConditionFieldTransferCheckedSource SolanaTokenProgramInstructionConditionField = "TransferChecked.source" SolanaTokenProgramInstructionConditionFieldTransferCheckedDestination SolanaTokenProgramInstructionConditionField = "TransferChecked.destination" SolanaTokenProgramInstructionConditionFieldTransferCheckedAuthority SolanaTokenProgramInstructionConditionField = "TransferChecked.authority" SolanaTokenProgramInstructionConditionFieldTransferCheckedAmount SolanaTokenProgramInstructionConditionField = "TransferChecked.amount" SolanaTokenProgramInstructionConditionFieldTransferCheckedMint SolanaTokenProgramInstructionConditionField = "TransferChecked.mint" SolanaTokenProgramInstructionConditionFieldBurnAccount SolanaTokenProgramInstructionConditionField = "Burn.account" SolanaTokenProgramInstructionConditionFieldBurnMint SolanaTokenProgramInstructionConditionField = "Burn.mint" SolanaTokenProgramInstructionConditionFieldBurnAuthority SolanaTokenProgramInstructionConditionField = "Burn.authority" SolanaTokenProgramInstructionConditionFieldBurnAmount SolanaTokenProgramInstructionConditionField = "Burn.amount" SolanaTokenProgramInstructionConditionFieldMintToMint SolanaTokenProgramInstructionConditionField = "MintTo.mint" SolanaTokenProgramInstructionConditionFieldMintToAccount SolanaTokenProgramInstructionConditionField = "MintTo.account" SolanaTokenProgramInstructionConditionFieldMintToAuthority SolanaTokenProgramInstructionConditionField = "MintTo.authority" SolanaTokenProgramInstructionConditionFieldMintToAmount SolanaTokenProgramInstructionConditionField = "MintTo.amount" SolanaTokenProgramInstructionConditionFieldCloseAccountAccount SolanaTokenProgramInstructionConditionField = "CloseAccount.account" SolanaTokenProgramInstructionConditionFieldCloseAccountDestination SolanaTokenProgramInstructionConditionField = "CloseAccount.destination" SolanaTokenProgramInstructionConditionFieldCloseAccountAuthority SolanaTokenProgramInstructionConditionField = "CloseAccount.authority" SolanaTokenProgramInstructionConditionFieldInitializeAccount3Account SolanaTokenProgramInstructionConditionField = "InitializeAccount3.account" SolanaTokenProgramInstructionConditionFieldInitializeAccount3Mint SolanaTokenProgramInstructionConditionField = "InitializeAccount3.mint" SolanaTokenProgramInstructionConditionFieldInitializeAccount3Owner SolanaTokenProgramInstructionConditionField = "InitializeAccount3.owner" )
type SolanaTokenProgramInstructionConditionFieldSource ¶ added in v0.6.0
type SolanaTokenProgramInstructionConditionFieldSource string
const (
SolanaTokenProgramInstructionConditionFieldSourceSolanaTokenProgramInstruction SolanaTokenProgramInstructionConditionFieldSource = "solana_token_program_instruction"
)
type SolanaTokenProgramInstructionConditionResp ¶ added in v0.6.0
type SolanaTokenProgramInstructionConditionResp struct {
// Supported fields for Solana Token Program conditions including Transfer,
// TransferChecked, Burn, MintTo, CloseAccount, and InitializeAccount3 instruction
// fields.
//
// Any of "instructionName", "Transfer.source", "Transfer.destination",
// "Transfer.authority", "Transfer.amount", "TransferChecked.source",
// "TransferChecked.destination", "TransferChecked.authority",
// "TransferChecked.amount", "TransferChecked.mint", "Burn.account", "Burn.mint",
// "Burn.authority", "Burn.amount", "MintTo.mint", "MintTo.account",
// "MintTo.authority", "MintTo.amount", "CloseAccount.account",
// "CloseAccount.destination", "CloseAccount.authority",
// "InitializeAccount3.account", "InitializeAccount3.mint",
// "InitializeAccount3.owner".
Field SolanaTokenProgramInstructionConditionField `json:"field" api:"required"`
// Any of "solana_token_program_instruction".
FieldSource SolanaTokenProgramInstructionConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Solana Token Program attributes, including more granular TransferChecked instruction fields.
func (SolanaTokenProgramInstructionConditionResp) RawJSON ¶ added in v0.6.0
func (r SolanaTokenProgramInstructionConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SolanaTokenProgramInstructionConditionResp) ToParam ¶ added in v0.6.0
func (r SolanaTokenProgramInstructionConditionResp) ToParam() SolanaTokenProgramInstructionCondition
ToParam converts this SolanaTokenProgramInstructionConditionResp to a SolanaTokenProgramInstructionCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SolanaTokenProgramInstructionCondition.Overrides()
func (*SolanaTokenProgramInstructionConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SolanaTokenProgramInstructionConditionResp) UnmarshalJSON(data []byte) error
type SparkBalance ¶ added in v0.4.0
type SparkBalance struct {
Balance string `json:"balance" api:"required"`
TokenBalances map[string]SparkTokenBalance `json:"token_balances" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Balance respjson.Field
TokenBalances respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The balance of a Spark wallet.
func (SparkBalance) RawJSON ¶ added in v0.4.0
func (r SparkBalance) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkBalance) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkBalance) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcInput ¶ added in v0.4.0
type SparkClaimStaticDepositRpcInput struct {
// Any of "claimStaticDeposit".
Method SparkClaimStaticDepositRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `claimStaticDeposit` RPC.
Params SparkClaimStaticDepositRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Claims a static deposit into the Spark wallet.
The properties Method, Params are required.
func (SparkClaimStaticDepositRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkClaimStaticDepositRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkClaimStaticDepositRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkClaimStaticDepositRpcInput) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcInputMethod ¶ added in v0.4.0
type SparkClaimStaticDepositRpcInputMethod string
const (
SparkClaimStaticDepositRpcInputMethodClaimStaticDeposit SparkClaimStaticDepositRpcInputMethod = "claimStaticDeposit"
)
type SparkClaimStaticDepositRpcInputParams ¶ added in v0.4.0
type SparkClaimStaticDepositRpcInputParams struct {
CreditAmountSats float64 `json:"credit_amount_sats" api:"required"`
Signature string `json:"signature" api:"required"`
TransactionID string `json:"transaction_id" api:"required"`
OutputIndex param.Opt[float64] `json:"output_index,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `claimStaticDeposit` RPC.
The properties CreditAmountSats, Signature, TransactionID are required.
func (SparkClaimStaticDepositRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkClaimStaticDepositRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkClaimStaticDepositRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkClaimStaticDepositRpcInputParams) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcInputParamsResp ¶ added in v0.4.0
type SparkClaimStaticDepositRpcInputParamsResp struct {
CreditAmountSats float64 `json:"credit_amount_sats" api:"required"`
Signature string `json:"signature" api:"required"`
TransactionID string `json:"transaction_id" api:"required"`
OutputIndex float64 `json:"output_index"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreditAmountSats respjson.Field
Signature respjson.Field
TransactionID respjson.Field
OutputIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `claimStaticDeposit` RPC.
func (SparkClaimStaticDepositRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkClaimStaticDepositRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkClaimStaticDepositRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkClaimStaticDepositRpcInputParamsResp) ToParam() SparkClaimStaticDepositRpcInputParams
ToParam converts this SparkClaimStaticDepositRpcInputParamsResp to a SparkClaimStaticDepositRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkClaimStaticDepositRpcInputParams.Overrides()
func (*SparkClaimStaticDepositRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkClaimStaticDepositRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcInputResp ¶ added in v0.6.0
type SparkClaimStaticDepositRpcInputResp struct {
// Any of "claimStaticDeposit".
Method SparkClaimStaticDepositRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `claimStaticDeposit` RPC.
Params SparkClaimStaticDepositRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Claims a static deposit into the Spark wallet.
func (SparkClaimStaticDepositRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkClaimStaticDepositRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkClaimStaticDepositRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkClaimStaticDepositRpcInputResp) ToParam() SparkClaimStaticDepositRpcInput
ToParam converts this SparkClaimStaticDepositRpcInputResp to a SparkClaimStaticDepositRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkClaimStaticDepositRpcInput.Overrides()
func (*SparkClaimStaticDepositRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkClaimStaticDepositRpcInputResp) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcResponse ¶ added in v0.4.0
type SparkClaimStaticDepositRpcResponse struct {
// Any of "claimStaticDeposit".
Method SparkClaimStaticDepositRpcResponseMethod `json:"method" api:"required"`
// Data returned by the Spark `claimStaticDeposit` RPC.
Data SparkClaimStaticDepositRpcResponseData `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `claimStaticDeposit` RPC.
func (SparkClaimStaticDepositRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkClaimStaticDepositRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkClaimStaticDepositRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkClaimStaticDepositRpcResponse) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcResponseData ¶ added in v0.4.0
type SparkClaimStaticDepositRpcResponseData struct {
TransferID string `json:"transfer_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
TransferID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Spark `claimStaticDeposit` RPC.
func (SparkClaimStaticDepositRpcResponseData) RawJSON ¶ added in v0.4.0
func (r SparkClaimStaticDepositRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkClaimStaticDepositRpcResponseData) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkClaimStaticDepositRpcResponseData) UnmarshalJSON(data []byte) error
type SparkClaimStaticDepositRpcResponseMethod ¶ added in v0.4.0
type SparkClaimStaticDepositRpcResponseMethod string
const (
SparkClaimStaticDepositRpcResponseMethodClaimStaticDeposit SparkClaimStaticDepositRpcResponseMethod = "claimStaticDeposit"
)
type SparkCoopExitFeeQuote ¶ added in v0.12.0
type SparkCoopExitFeeQuote struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
ExpiresAt string `json:"expires_at" api:"required"`
// A currency amount with its original value and unit.
L1BroadcastFeeFast SparkCurrencyAmount `json:"l1_broadcast_fee_fast" api:"required"`
// A currency amount with its original value and unit.
L1BroadcastFeeMedium SparkCurrencyAmount `json:"l1_broadcast_fee_medium" api:"required"`
// A currency amount with its original value and unit.
L1BroadcastFeeSlow SparkCurrencyAmount `json:"l1_broadcast_fee_slow" api:"required"`
Network string `json:"network" api:"required"`
// A currency amount with its original value and unit.
TotalAmount SparkCurrencyAmount `json:"total_amount" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
// A currency amount with its original value and unit.
UserFeeFast SparkCurrencyAmount `json:"user_fee_fast" api:"required"`
// A currency amount with its original value and unit.
UserFeeMedium SparkCurrencyAmount `json:"user_fee_medium" api:"required"`
// A currency amount with its original value and unit.
UserFeeSlow SparkCurrencyAmount `json:"user_fee_slow" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
L1BroadcastFeeFast respjson.Field
L1BroadcastFeeMedium respjson.Field
L1BroadcastFeeSlow respjson.Field
Network respjson.Field
TotalAmount respjson.Field
UpdatedAt respjson.Field
UserFeeFast respjson.Field
UserFeeMedium respjson.Field
UserFeeSlow respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A fee quote for a cooperative exit from Spark to Bitcoin L1.
func (SparkCoopExitFeeQuote) RawJSON ¶ added in v0.12.0
func (r SparkCoopExitFeeQuote) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkCoopExitFeeQuote) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkCoopExitFeeQuote) UnmarshalJSON(data []byte) error
type SparkCoopExitRequest ¶ added in v0.12.0
type SparkCoopExitRequest struct {
ID string `json:"id" api:"required"`
CoopExitTxid string `json:"coop_exit_txid" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
ExpiresAt string `json:"expires_at" api:"required"`
// A currency amount with its original value and unit.
Fee SparkCurrencyAmount `json:"fee" api:"required"`
// A currency amount with its original value and unit.
L1BroadcastFee SparkCurrencyAmount `json:"l1_broadcast_fee" api:"required"`
Network string `json:"network" api:"required"`
Status string `json:"status" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
// The exit speed for a cooperative withdrawal from Spark to L1.
//
// Any of "FAST", "MEDIUM", "SLOW".
ExitSpeed SparkExitSpeed `json:"exit_speed"`
FeeQuoteID string `json:"fee_quote_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CoopExitTxid respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
Fee respjson.Field
L1BroadcastFee respjson.Field
Network respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExitSpeed respjson.Field
FeeQuoteID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A cooperative exit request from Spark to Bitcoin L1.
func (SparkCoopExitRequest) RawJSON ¶ added in v0.12.0
func (r SparkCoopExitRequest) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkCoopExitRequest) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkCoopExitRequest) UnmarshalJSON(data []byte) error
type SparkCreateLightningInvoiceRpcInput ¶ added in v0.4.0
type SparkCreateLightningInvoiceRpcInput struct {
// Any of "createLightningInvoice".
Method SparkCreateLightningInvoiceRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `createLightningInvoice` RPC.
Params SparkCreateLightningInvoiceRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Creates a Lightning invoice for the Spark wallet.
The properties Method, Params are required.
func (SparkCreateLightningInvoiceRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkCreateLightningInvoiceRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkCreateLightningInvoiceRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkCreateLightningInvoiceRpcInput) UnmarshalJSON(data []byte) error
type SparkCreateLightningInvoiceRpcInputMethod ¶ added in v0.4.0
type SparkCreateLightningInvoiceRpcInputMethod string
const (
SparkCreateLightningInvoiceRpcInputMethodCreateLightningInvoice SparkCreateLightningInvoiceRpcInputMethod = "createLightningInvoice"
)
type SparkCreateLightningInvoiceRpcInputParams ¶ added in v0.4.0
type SparkCreateLightningInvoiceRpcInputParams struct {
AmountSats float64 `json:"amount_sats" api:"required"`
DescriptionHash param.Opt[string] `json:"description_hash,omitzero"`
ExpirySeconds param.Opt[float64] `json:"expiry_seconds,omitzero"`
IncludeSparkAddress param.Opt[bool] `json:"include_spark_address,omitzero"`
Memo param.Opt[string] `json:"memo,omitzero"`
ReceiverIdentityPubkey param.Opt[string] `json:"receiver_identity_pubkey,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `createLightningInvoice` RPC.
The property AmountSats is required.
func (SparkCreateLightningInvoiceRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkCreateLightningInvoiceRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkCreateLightningInvoiceRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkCreateLightningInvoiceRpcInputParams) UnmarshalJSON(data []byte) error
type SparkCreateLightningInvoiceRpcInputParamsResp ¶ added in v0.4.0
type SparkCreateLightningInvoiceRpcInputParamsResp struct {
AmountSats float64 `json:"amount_sats" api:"required"`
DescriptionHash string `json:"description_hash"`
ExpirySeconds float64 `json:"expiry_seconds"`
IncludeSparkAddress bool `json:"include_spark_address"`
Memo string `json:"memo"`
ReceiverIdentityPubkey string `json:"receiver_identity_pubkey"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AmountSats respjson.Field
DescriptionHash respjson.Field
ExpirySeconds respjson.Field
IncludeSparkAddress respjson.Field
Memo respjson.Field
ReceiverIdentityPubkey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `createLightningInvoice` RPC.
func (SparkCreateLightningInvoiceRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkCreateLightningInvoiceRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkCreateLightningInvoiceRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkCreateLightningInvoiceRpcInputParamsResp) ToParam() SparkCreateLightningInvoiceRpcInputParams
ToParam converts this SparkCreateLightningInvoiceRpcInputParamsResp to a SparkCreateLightningInvoiceRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkCreateLightningInvoiceRpcInputParams.Overrides()
func (*SparkCreateLightningInvoiceRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkCreateLightningInvoiceRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkCreateLightningInvoiceRpcInputResp ¶ added in v0.6.0
type SparkCreateLightningInvoiceRpcInputResp struct {
// Any of "createLightningInvoice".
Method SparkCreateLightningInvoiceRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `createLightningInvoice` RPC.
Params SparkCreateLightningInvoiceRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Creates a Lightning invoice for the Spark wallet.
func (SparkCreateLightningInvoiceRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkCreateLightningInvoiceRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkCreateLightningInvoiceRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkCreateLightningInvoiceRpcInputResp) ToParam() SparkCreateLightningInvoiceRpcInput
ToParam converts this SparkCreateLightningInvoiceRpcInputResp to a SparkCreateLightningInvoiceRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkCreateLightningInvoiceRpcInput.Overrides()
func (*SparkCreateLightningInvoiceRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkCreateLightningInvoiceRpcInputResp) UnmarshalJSON(data []byte) error
type SparkCreateLightningInvoiceRpcResponse ¶ added in v0.4.0
type SparkCreateLightningInvoiceRpcResponse struct {
// Any of "createLightningInvoice".
Method SparkCreateLightningInvoiceRpcResponseMethod `json:"method" api:"required"`
// A Spark Lightning receive request.
Data SparkLightningReceiveRequest `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `createLightningInvoice` RPC.
func (SparkCreateLightningInvoiceRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkCreateLightningInvoiceRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkCreateLightningInvoiceRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkCreateLightningInvoiceRpcResponse) UnmarshalJSON(data []byte) error
type SparkCreateLightningInvoiceRpcResponseMethod ¶ added in v0.4.0
type SparkCreateLightningInvoiceRpcResponseMethod string
const (
SparkCreateLightningInvoiceRpcResponseMethodCreateLightningInvoice SparkCreateLightningInvoiceRpcResponseMethod = "createLightningInvoice"
)
type SparkCurrencyAmount ¶ added in v0.12.0
type SparkCurrencyAmount struct {
OriginalUnit string `json:"original_unit" api:"required"`
OriginalValue float64 `json:"original_value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OriginalUnit respjson.Field
OriginalValue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A currency amount with its original value and unit.
func (SparkCurrencyAmount) RawJSON ¶ added in v0.12.0
func (r SparkCurrencyAmount) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkCurrencyAmount) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkCurrencyAmount) UnmarshalJSON(data []byte) error
type SparkExitSpeed ¶ added in v0.12.0
type SparkExitSpeed string
The exit speed for a cooperative withdrawal from Spark to L1.
const ( SparkExitSpeedFast SparkExitSpeed = "FAST" SparkExitSpeedMedium SparkExitSpeed = "MEDIUM" SparkExitSpeedSlow SparkExitSpeed = "SLOW" )
type SparkGetBalanceRpcInput ¶ added in v0.4.0
type SparkGetBalanceRpcInput struct {
// Any of "getBalance".
Method SparkGetBalanceRpcInputMethod `json:"method,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Gets the balance of the Spark wallet.
The property Method is required.
func (SparkGetBalanceRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkGetBalanceRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkGetBalanceRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetBalanceRpcInput) UnmarshalJSON(data []byte) error
type SparkGetBalanceRpcInputMethod ¶ added in v0.4.0
type SparkGetBalanceRpcInputMethod string
const (
SparkGetBalanceRpcInputMethodGetBalance SparkGetBalanceRpcInputMethod = "getBalance"
)
type SparkGetBalanceRpcInputResp ¶ added in v0.6.0
type SparkGetBalanceRpcInputResp struct {
// Any of "getBalance".
Method SparkGetBalanceRpcInputMethod `json:"method" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Gets the balance of the Spark wallet.
func (SparkGetBalanceRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkGetBalanceRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkGetBalanceRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkGetBalanceRpcInputResp) ToParam() SparkGetBalanceRpcInput
ToParam converts this SparkGetBalanceRpcInputResp to a SparkGetBalanceRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkGetBalanceRpcInput.Overrides()
func (*SparkGetBalanceRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkGetBalanceRpcInputResp) UnmarshalJSON(data []byte) error
type SparkGetBalanceRpcResponse ¶ added in v0.4.0
type SparkGetBalanceRpcResponse struct {
// Any of "getBalance".
Method SparkGetBalanceRpcResponseMethod `json:"method" api:"required"`
// The balance of a Spark wallet.
Data SparkBalance `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `getBalance` RPC.
func (SparkGetBalanceRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkGetBalanceRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkGetBalanceRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetBalanceRpcResponse) UnmarshalJSON(data []byte) error
type SparkGetBalanceRpcResponseMethod ¶ added in v0.4.0
type SparkGetBalanceRpcResponseMethod string
const (
SparkGetBalanceRpcResponseMethodGetBalance SparkGetBalanceRpcResponseMethod = "getBalance"
)
type SparkGetClaimStaticDepositQuoteRpcInput ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcInput struct {
// Any of "getClaimStaticDepositQuote".
Method SparkGetClaimStaticDepositQuoteRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `getClaimStaticDepositQuote` RPC.
Params SparkGetClaimStaticDepositQuoteRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Gets a quote for claiming a static deposit.
The properties Method, Params are required.
func (SparkGetClaimStaticDepositQuoteRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkGetClaimStaticDepositQuoteRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkGetClaimStaticDepositQuoteRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetClaimStaticDepositQuoteRpcInput) UnmarshalJSON(data []byte) error
type SparkGetClaimStaticDepositQuoteRpcInputMethod ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcInputMethod string
const (
SparkGetClaimStaticDepositQuoteRpcInputMethodGetClaimStaticDepositQuote SparkGetClaimStaticDepositQuoteRpcInputMethod = "getClaimStaticDepositQuote"
)
type SparkGetClaimStaticDepositQuoteRpcInputParams ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcInputParams struct {
TransactionID string `json:"transaction_id" api:"required"`
OutputIndex param.Opt[float64] `json:"output_index,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `getClaimStaticDepositQuote` RPC.
The property TransactionID is required.
func (SparkGetClaimStaticDepositQuoteRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkGetClaimStaticDepositQuoteRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkGetClaimStaticDepositQuoteRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetClaimStaticDepositQuoteRpcInputParams) UnmarshalJSON(data []byte) error
type SparkGetClaimStaticDepositQuoteRpcInputParamsResp ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcInputParamsResp struct {
TransactionID string `json:"transaction_id" api:"required"`
OutputIndex float64 `json:"output_index"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
TransactionID respjson.Field
OutputIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `getClaimStaticDepositQuote` RPC.
func (SparkGetClaimStaticDepositQuoteRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkGetClaimStaticDepositQuoteRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkGetClaimStaticDepositQuoteRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkGetClaimStaticDepositQuoteRpcInputParamsResp) ToParam() SparkGetClaimStaticDepositQuoteRpcInputParams
ToParam converts this SparkGetClaimStaticDepositQuoteRpcInputParamsResp to a SparkGetClaimStaticDepositQuoteRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkGetClaimStaticDepositQuoteRpcInputParams.Overrides()
func (*SparkGetClaimStaticDepositQuoteRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetClaimStaticDepositQuoteRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkGetClaimStaticDepositQuoteRpcInputResp ¶ added in v0.6.0
type SparkGetClaimStaticDepositQuoteRpcInputResp struct {
// Any of "getClaimStaticDepositQuote".
Method SparkGetClaimStaticDepositQuoteRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `getClaimStaticDepositQuote` RPC.
Params SparkGetClaimStaticDepositQuoteRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Gets a quote for claiming a static deposit.
func (SparkGetClaimStaticDepositQuoteRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkGetClaimStaticDepositQuoteRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkGetClaimStaticDepositQuoteRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkGetClaimStaticDepositQuoteRpcInputResp) ToParam() SparkGetClaimStaticDepositQuoteRpcInput
ToParam converts this SparkGetClaimStaticDepositQuoteRpcInputResp to a SparkGetClaimStaticDepositQuoteRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkGetClaimStaticDepositQuoteRpcInput.Overrides()
func (*SparkGetClaimStaticDepositQuoteRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkGetClaimStaticDepositQuoteRpcInputResp) UnmarshalJSON(data []byte) error
type SparkGetClaimStaticDepositQuoteRpcResponse ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcResponse struct {
// Any of "getClaimStaticDepositQuote".
Method SparkGetClaimStaticDepositQuoteRpcResponseMethod `json:"method" api:"required"`
// Data returned by the Spark `getClaimStaticDepositQuote` RPC.
Data SparkGetClaimStaticDepositQuoteRpcResponseData `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `getClaimStaticDepositQuote` RPC.
func (SparkGetClaimStaticDepositQuoteRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkGetClaimStaticDepositQuoteRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkGetClaimStaticDepositQuoteRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetClaimStaticDepositQuoteRpcResponse) UnmarshalJSON(data []byte) error
type SparkGetClaimStaticDepositQuoteRpcResponseData ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcResponseData struct {
CreditAmountSats float64 `json:"credit_amount_sats" api:"required"`
Network string `json:"network" api:"required"`
OutputIndex float64 `json:"output_index" api:"required"`
Signature string `json:"signature" api:"required"`
TransactionID string `json:"transaction_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CreditAmountSats respjson.Field
Network respjson.Field
OutputIndex respjson.Field
Signature respjson.Field
TransactionID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Spark `getClaimStaticDepositQuote` RPC.
func (SparkGetClaimStaticDepositQuoteRpcResponseData) RawJSON ¶ added in v0.4.0
func (r SparkGetClaimStaticDepositQuoteRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkGetClaimStaticDepositQuoteRpcResponseData) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetClaimStaticDepositQuoteRpcResponseData) UnmarshalJSON(data []byte) error
type SparkGetClaimStaticDepositQuoteRpcResponseMethod ¶ added in v0.4.0
type SparkGetClaimStaticDepositQuoteRpcResponseMethod string
const (
SparkGetClaimStaticDepositQuoteRpcResponseMethodGetClaimStaticDepositQuote SparkGetClaimStaticDepositQuoteRpcResponseMethod = "getClaimStaticDepositQuote"
)
type SparkGetStaticDepositAddressRpcInput ¶ added in v0.4.0
type SparkGetStaticDepositAddressRpcInput struct {
// Any of "getStaticDepositAddress".
Method SparkGetStaticDepositAddressRpcInputMethod `json:"method,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Gets a static deposit address for the Spark wallet.
The property Method is required.
func (SparkGetStaticDepositAddressRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkGetStaticDepositAddressRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkGetStaticDepositAddressRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetStaticDepositAddressRpcInput) UnmarshalJSON(data []byte) error
type SparkGetStaticDepositAddressRpcInputMethod ¶ added in v0.4.0
type SparkGetStaticDepositAddressRpcInputMethod string
const (
SparkGetStaticDepositAddressRpcInputMethodGetStaticDepositAddress SparkGetStaticDepositAddressRpcInputMethod = "getStaticDepositAddress"
)
type SparkGetStaticDepositAddressRpcInputResp ¶ added in v0.6.0
type SparkGetStaticDepositAddressRpcInputResp struct {
// Any of "getStaticDepositAddress".
Method SparkGetStaticDepositAddressRpcInputMethod `json:"method" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Gets a static deposit address for the Spark wallet.
func (SparkGetStaticDepositAddressRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkGetStaticDepositAddressRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkGetStaticDepositAddressRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkGetStaticDepositAddressRpcInputResp) ToParam() SparkGetStaticDepositAddressRpcInput
ToParam converts this SparkGetStaticDepositAddressRpcInputResp to a SparkGetStaticDepositAddressRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkGetStaticDepositAddressRpcInput.Overrides()
func (*SparkGetStaticDepositAddressRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkGetStaticDepositAddressRpcInputResp) UnmarshalJSON(data []byte) error
type SparkGetStaticDepositAddressRpcResponse ¶ added in v0.4.0
type SparkGetStaticDepositAddressRpcResponse struct {
// Any of "getStaticDepositAddress".
Method SparkGetStaticDepositAddressRpcResponseMethod `json:"method" api:"required"`
// Data returned by the Spark `getStaticDepositAddress` RPC.
Data SparkGetStaticDepositAddressRpcResponseData `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `getStaticDepositAddress` RPC.
func (SparkGetStaticDepositAddressRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkGetStaticDepositAddressRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkGetStaticDepositAddressRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetStaticDepositAddressRpcResponse) UnmarshalJSON(data []byte) error
type SparkGetStaticDepositAddressRpcResponseData ¶ added in v0.4.0
type SparkGetStaticDepositAddressRpcResponseData struct {
Address string `json:"address" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Spark `getStaticDepositAddress` RPC.
func (SparkGetStaticDepositAddressRpcResponseData) RawJSON ¶ added in v0.4.0
func (r SparkGetStaticDepositAddressRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkGetStaticDepositAddressRpcResponseData) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkGetStaticDepositAddressRpcResponseData) UnmarshalJSON(data []byte) error
type SparkGetStaticDepositAddressRpcResponseMethod ¶ added in v0.4.0
type SparkGetStaticDepositAddressRpcResponseMethod string
const (
SparkGetStaticDepositAddressRpcResponseMethodGetStaticDepositAddress SparkGetStaticDepositAddressRpcResponseMethod = "getStaticDepositAddress"
)
type SparkGetWithdrawalFeeQuoteRpcInput ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcInput struct {
// Any of "getWithdrawalFeeQuote".
Method SparkGetWithdrawalFeeQuoteRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `getWithdrawalFeeQuote` RPC.
Params SparkGetWithdrawalFeeQuoteRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Gets a fee quote for withdrawing from Spark to a Bitcoin L1 address.
The properties Method, Params are required.
func (SparkGetWithdrawalFeeQuoteRpcInput) MarshalJSON ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkGetWithdrawalFeeQuoteRpcInput) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkGetWithdrawalFeeQuoteRpcInput) UnmarshalJSON(data []byte) error
type SparkGetWithdrawalFeeQuoteRpcInputMethod ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcInputMethod string
const (
SparkGetWithdrawalFeeQuoteRpcInputMethodGetWithdrawalFeeQuote SparkGetWithdrawalFeeQuoteRpcInputMethod = "getWithdrawalFeeQuote"
)
type SparkGetWithdrawalFeeQuoteRpcInputParams ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcInputParams struct {
AmountSats float64 `json:"amount_sats" api:"required"`
OnchainAddress string `json:"onchain_address" api:"required"`
// contains filtered or unexported fields
}
Parameters for the Spark `getWithdrawalFeeQuote` RPC.
The properties AmountSats, OnchainAddress are required.
func (SparkGetWithdrawalFeeQuoteRpcInputParams) MarshalJSON ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkGetWithdrawalFeeQuoteRpcInputParams) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkGetWithdrawalFeeQuoteRpcInputParams) UnmarshalJSON(data []byte) error
type SparkGetWithdrawalFeeQuoteRpcInputParamsResp ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcInputParamsResp struct {
AmountSats float64 `json:"amount_sats" api:"required"`
OnchainAddress string `json:"onchain_address" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AmountSats respjson.Field
OnchainAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `getWithdrawalFeeQuote` RPC.
func (SparkGetWithdrawalFeeQuoteRpcInputParamsResp) RawJSON ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkGetWithdrawalFeeQuoteRpcInputParamsResp) ToParam ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcInputParamsResp) ToParam() SparkGetWithdrawalFeeQuoteRpcInputParams
ToParam converts this SparkGetWithdrawalFeeQuoteRpcInputParamsResp to a SparkGetWithdrawalFeeQuoteRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkGetWithdrawalFeeQuoteRpcInputParams.Overrides()
func (*SparkGetWithdrawalFeeQuoteRpcInputParamsResp) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkGetWithdrawalFeeQuoteRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkGetWithdrawalFeeQuoteRpcInputResp ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcInputResp struct {
// Any of "getWithdrawalFeeQuote".
Method SparkGetWithdrawalFeeQuoteRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `getWithdrawalFeeQuote` RPC.
Params SparkGetWithdrawalFeeQuoteRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Gets a fee quote for withdrawing from Spark to a Bitcoin L1 address.
func (SparkGetWithdrawalFeeQuoteRpcInputResp) RawJSON ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkGetWithdrawalFeeQuoteRpcInputResp) ToParam ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcInputResp) ToParam() SparkGetWithdrawalFeeQuoteRpcInput
ToParam converts this SparkGetWithdrawalFeeQuoteRpcInputResp to a SparkGetWithdrawalFeeQuoteRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkGetWithdrawalFeeQuoteRpcInput.Overrides()
func (*SparkGetWithdrawalFeeQuoteRpcInputResp) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkGetWithdrawalFeeQuoteRpcInputResp) UnmarshalJSON(data []byte) error
type SparkGetWithdrawalFeeQuoteRpcResponse ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcResponse struct {
// Any of "getWithdrawalFeeQuote".
Method SparkGetWithdrawalFeeQuoteRpcResponseMethod `json:"method" api:"required"`
// A fee quote for a cooperative exit from Spark to Bitcoin L1.
Data SparkCoopExitFeeQuote `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `getWithdrawalFeeQuote` RPC.
func (SparkGetWithdrawalFeeQuoteRpcResponse) RawJSON ¶ added in v0.12.0
func (r SparkGetWithdrawalFeeQuoteRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkGetWithdrawalFeeQuoteRpcResponse) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkGetWithdrawalFeeQuoteRpcResponse) UnmarshalJSON(data []byte) error
type SparkGetWithdrawalFeeQuoteRpcResponseMethod ¶ added in v0.12.0
type SparkGetWithdrawalFeeQuoteRpcResponseMethod string
const (
SparkGetWithdrawalFeeQuoteRpcResponseMethodGetWithdrawalFeeQuote SparkGetWithdrawalFeeQuoteRpcResponseMethod = "getWithdrawalFeeQuote"
)
type SparkLightningFee ¶ added in v0.4.0
type SparkLightningFee struct {
OriginalUnit string `json:"original_unit" api:"required"`
OriginalValue float64 `json:"original_value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OriginalUnit respjson.Field
OriginalValue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The fee for a Spark Lightning payment.
func (SparkLightningFee) RawJSON ¶ added in v0.4.0
func (r SparkLightningFee) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkLightningFee) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkLightningFee) UnmarshalJSON(data []byte) error
type SparkLightningReceiveRequest ¶ added in v0.4.0
type SparkLightningReceiveRequest struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
Network string `json:"network" api:"required"`
Status string `json:"status" api:"required"`
Typename string `json:"typename" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
Invoice any `json:"invoice"`
PaymentPreimage string `json:"payment_preimage"`
ReceiverIdentityPublicKey string `json:"receiver_identity_public_key"`
Transfer any `json:"transfer"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Network respjson.Field
Status respjson.Field
Typename respjson.Field
UpdatedAt respjson.Field
Invoice respjson.Field
PaymentPreimage respjson.Field
ReceiverIdentityPublicKey respjson.Field
Transfer respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark Lightning receive request.
func (SparkLightningReceiveRequest) RawJSON ¶ added in v0.4.0
func (r SparkLightningReceiveRequest) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkLightningReceiveRequest) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkLightningReceiveRequest) UnmarshalJSON(data []byte) error
type SparkLightningSendRequest ¶ added in v0.4.0
type SparkLightningSendRequest struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
EncodedInvoice string `json:"encoded_invoice" api:"required"`
// The fee for a Spark Lightning payment.
Fee SparkLightningFee `json:"fee" api:"required"`
IdempotencyKey string `json:"idempotency_key" api:"required"`
Network string `json:"network" api:"required"`
Status string `json:"status" api:"required"`
Typename string `json:"typename" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
PaymentPreimage string `json:"payment_preimage"`
Transfer any `json:"transfer"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
EncodedInvoice respjson.Field
Fee respjson.Field
IdempotencyKey respjson.Field
Network respjson.Field
Status respjson.Field
Typename respjson.Field
UpdatedAt respjson.Field
PaymentPreimage respjson.Field
Transfer respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark Lightning send request.
func (SparkLightningSendRequest) RawJSON ¶ added in v0.4.0
func (r SparkLightningSendRequest) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkLightningSendRequest) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkLightningSendRequest) UnmarshalJSON(data []byte) error
type SparkNetwork ¶ added in v0.4.0
type SparkNetwork string
The Spark network.
const ( SparkNetworkMainnet SparkNetwork = "MAINNET" SparkNetworkRegtest SparkNetwork = "REGTEST" )
type SparkOutputSelectionStrategy ¶ added in v0.4.0
type SparkOutputSelectionStrategy string
Strategy for selecting outputs in a Spark token transfer.
const ( SparkOutputSelectionStrategySmallFirst SparkOutputSelectionStrategy = "SMALL_FIRST" SparkOutputSelectionStrategyLargeFirst SparkOutputSelectionStrategy = "LARGE_FIRST" )
type SparkPayLightningInvoiceRpcInput ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcInput struct {
// Any of "payLightningInvoice".
Method SparkPayLightningInvoiceRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `payLightningInvoice` RPC.
Params SparkPayLightningInvoiceRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Pays a Lightning invoice from the Spark wallet.
The properties Method, Params are required.
func (SparkPayLightningInvoiceRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkPayLightningInvoiceRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkPayLightningInvoiceRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkPayLightningInvoiceRpcInput) UnmarshalJSON(data []byte) error
type SparkPayLightningInvoiceRpcInputMethod ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcInputMethod string
const (
SparkPayLightningInvoiceRpcInputMethodPayLightningInvoice SparkPayLightningInvoiceRpcInputMethod = "payLightningInvoice"
)
type SparkPayLightningInvoiceRpcInputParams ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcInputParams struct {
Invoice string `json:"invoice" api:"required"`
MaxFeeSats float64 `json:"max_fee_sats" api:"required"`
AmountSatsToSend param.Opt[float64] `json:"amount_sats_to_send,omitzero"`
PreferSpark param.Opt[bool] `json:"prefer_spark,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `payLightningInvoice` RPC.
The properties Invoice, MaxFeeSats are required.
func (SparkPayLightningInvoiceRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkPayLightningInvoiceRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkPayLightningInvoiceRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkPayLightningInvoiceRpcInputParams) UnmarshalJSON(data []byte) error
type SparkPayLightningInvoiceRpcInputParamsResp ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcInputParamsResp struct {
Invoice string `json:"invoice" api:"required"`
MaxFeeSats float64 `json:"max_fee_sats" api:"required"`
AmountSatsToSend float64 `json:"amount_sats_to_send"`
PreferSpark bool `json:"prefer_spark"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Invoice respjson.Field
MaxFeeSats respjson.Field
AmountSatsToSend respjson.Field
PreferSpark respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `payLightningInvoice` RPC.
func (SparkPayLightningInvoiceRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkPayLightningInvoiceRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkPayLightningInvoiceRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkPayLightningInvoiceRpcInputParamsResp) ToParam() SparkPayLightningInvoiceRpcInputParams
ToParam converts this SparkPayLightningInvoiceRpcInputParamsResp to a SparkPayLightningInvoiceRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkPayLightningInvoiceRpcInputParams.Overrides()
func (*SparkPayLightningInvoiceRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkPayLightningInvoiceRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkPayLightningInvoiceRpcInputResp ¶ added in v0.6.0
type SparkPayLightningInvoiceRpcInputResp struct {
// Any of "payLightningInvoice".
Method SparkPayLightningInvoiceRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `payLightningInvoice` RPC.
Params SparkPayLightningInvoiceRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Pays a Lightning invoice from the Spark wallet.
func (SparkPayLightningInvoiceRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkPayLightningInvoiceRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkPayLightningInvoiceRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkPayLightningInvoiceRpcInputResp) ToParam() SparkPayLightningInvoiceRpcInput
ToParam converts this SparkPayLightningInvoiceRpcInputResp to a SparkPayLightningInvoiceRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkPayLightningInvoiceRpcInput.Overrides()
func (*SparkPayLightningInvoiceRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkPayLightningInvoiceRpcInputResp) UnmarshalJSON(data []byte) error
type SparkPayLightningInvoiceRpcResponse ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcResponse struct {
// Any of "payLightningInvoice".
Method SparkPayLightningInvoiceRpcResponseMethod `json:"method" api:"required"`
// A Spark transfer.
Data SparkPayLightningInvoiceRpcResponseDataUnion `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `payLightningInvoice` RPC.
func (SparkPayLightningInvoiceRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkPayLightningInvoiceRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkPayLightningInvoiceRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkPayLightningInvoiceRpcResponse) UnmarshalJSON(data []byte) error
type SparkPayLightningInvoiceRpcResponseDataUnion ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcResponseDataUnion struct {
ID string `json:"id"`
// This field is from variant [SparkTransfer].
Leaves []SparkTransferLeaf `json:"leaves"`
// This field is from variant [SparkTransfer].
ReceiverIdentityPublicKey string `json:"receiver_identity_public_key"`
// This field is from variant [SparkTransfer].
SenderIdentityPublicKey string `json:"sender_identity_public_key"`
Status string `json:"status"`
// This field is from variant [SparkTransfer].
TotalValue float64 `json:"total_value"`
// This field is from variant [SparkTransfer].
TransferDirection string `json:"transfer_direction"`
// This field is from variant [SparkTransfer].
Type string `json:"type"`
// This field is from variant [SparkTransfer].
CreatedTime string `json:"created_time"`
// This field is from variant [SparkTransfer].
ExpiryTime string `json:"expiry_time"`
// This field is from variant [SparkTransfer].
UpdatedTime string `json:"updated_time"`
// This field is from variant [SparkLightningSendRequest].
CreatedAt string `json:"created_at"`
// This field is from variant [SparkLightningSendRequest].
EncodedInvoice string `json:"encoded_invoice"`
// This field is from variant [SparkLightningSendRequest].
Fee SparkLightningFee `json:"fee"`
// This field is from variant [SparkLightningSendRequest].
IdempotencyKey string `json:"idempotency_key"`
// This field is from variant [SparkLightningSendRequest].
Network string `json:"network"`
// This field is from variant [SparkLightningSendRequest].
Typename string `json:"typename"`
// This field is from variant [SparkLightningSendRequest].
UpdatedAt string `json:"updated_at"`
// This field is from variant [SparkLightningSendRequest].
PaymentPreimage string `json:"payment_preimage"`
// This field is from variant [SparkLightningSendRequest].
Transfer any `json:"transfer"`
JSON struct {
ID respjson.Field
Leaves respjson.Field
ReceiverIdentityPublicKey respjson.Field
SenderIdentityPublicKey respjson.Field
Status respjson.Field
TotalValue respjson.Field
TransferDirection respjson.Field
Type respjson.Field
CreatedTime respjson.Field
ExpiryTime respjson.Field
UpdatedTime respjson.Field
CreatedAt respjson.Field
EncodedInvoice respjson.Field
Fee respjson.Field
IdempotencyKey respjson.Field
Network respjson.Field
Typename respjson.Field
UpdatedAt respjson.Field
PaymentPreimage respjson.Field
Transfer respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SparkPayLightningInvoiceRpcResponseDataUnion contains all possible properties and values from SparkTransfer, SparkLightningSendRequest.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (SparkPayLightningInvoiceRpcResponseDataUnion) AsSparkLightningSendRequest ¶ added in v0.4.0
func (u SparkPayLightningInvoiceRpcResponseDataUnion) AsSparkLightningSendRequest() (v SparkLightningSendRequest)
func (SparkPayLightningInvoiceRpcResponseDataUnion) AsSparkTransfer ¶ added in v0.4.0
func (u SparkPayLightningInvoiceRpcResponseDataUnion) AsSparkTransfer() (v SparkTransfer)
func (SparkPayLightningInvoiceRpcResponseDataUnion) RawJSON ¶ added in v0.4.0
func (u SparkPayLightningInvoiceRpcResponseDataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkPayLightningInvoiceRpcResponseDataUnion) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkPayLightningInvoiceRpcResponseDataUnion) UnmarshalJSON(data []byte) error
type SparkPayLightningInvoiceRpcResponseMethod ¶ added in v0.4.0
type SparkPayLightningInvoiceRpcResponseMethod string
const (
SparkPayLightningInvoiceRpcResponseMethodPayLightningInvoice SparkPayLightningInvoiceRpcResponseMethod = "payLightningInvoice"
)
type SparkSignMessageWithIdentityKeyRpcInput ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcInput struct {
// Any of "signMessageWithIdentityKey".
Method SparkSignMessageWithIdentityKeyRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `signMessageWithIdentityKey` RPC.
Params SparkSignMessageWithIdentityKeyRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Signs a message with the Spark identity key.
The properties Method, Params are required.
func (SparkSignMessageWithIdentityKeyRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkSignMessageWithIdentityKeyRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkSignMessageWithIdentityKeyRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkSignMessageWithIdentityKeyRpcInput) UnmarshalJSON(data []byte) error
type SparkSignMessageWithIdentityKeyRpcInputMethod ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcInputMethod string
const (
SparkSignMessageWithIdentityKeyRpcInputMethodSignMessageWithIdentityKey SparkSignMessageWithIdentityKeyRpcInputMethod = "signMessageWithIdentityKey"
)
type SparkSignMessageWithIdentityKeyRpcInputParams ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcInputParams struct {
Message string `json:"message" api:"required"`
Compact param.Opt[bool] `json:"compact,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `signMessageWithIdentityKey` RPC.
The property Message is required.
func (SparkSignMessageWithIdentityKeyRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkSignMessageWithIdentityKeyRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkSignMessageWithIdentityKeyRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkSignMessageWithIdentityKeyRpcInputParams) UnmarshalJSON(data []byte) error
type SparkSignMessageWithIdentityKeyRpcInputParamsResp ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcInputParamsResp struct {
Message string `json:"message" api:"required"`
Compact bool `json:"compact"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Compact respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `signMessageWithIdentityKey` RPC.
func (SparkSignMessageWithIdentityKeyRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkSignMessageWithIdentityKeyRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkSignMessageWithIdentityKeyRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkSignMessageWithIdentityKeyRpcInputParamsResp) ToParam() SparkSignMessageWithIdentityKeyRpcInputParams
ToParam converts this SparkSignMessageWithIdentityKeyRpcInputParamsResp to a SparkSignMessageWithIdentityKeyRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkSignMessageWithIdentityKeyRpcInputParams.Overrides()
func (*SparkSignMessageWithIdentityKeyRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkSignMessageWithIdentityKeyRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkSignMessageWithIdentityKeyRpcInputResp ¶ added in v0.6.0
type SparkSignMessageWithIdentityKeyRpcInputResp struct {
// Any of "signMessageWithIdentityKey".
Method SparkSignMessageWithIdentityKeyRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `signMessageWithIdentityKey` RPC.
Params SparkSignMessageWithIdentityKeyRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Signs a message with the Spark identity key.
func (SparkSignMessageWithIdentityKeyRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkSignMessageWithIdentityKeyRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkSignMessageWithIdentityKeyRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkSignMessageWithIdentityKeyRpcInputResp) ToParam() SparkSignMessageWithIdentityKeyRpcInput
ToParam converts this SparkSignMessageWithIdentityKeyRpcInputResp to a SparkSignMessageWithIdentityKeyRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkSignMessageWithIdentityKeyRpcInput.Overrides()
func (*SparkSignMessageWithIdentityKeyRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkSignMessageWithIdentityKeyRpcInputResp) UnmarshalJSON(data []byte) error
type SparkSignMessageWithIdentityKeyRpcResponse ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcResponse struct {
// Any of "signMessageWithIdentityKey".
Method SparkSignMessageWithIdentityKeyRpcResponseMethod `json:"method" api:"required"`
// Data returned by the Spark `signMessageWithIdentityKey` RPC.
Data SparkSignMessageWithIdentityKeyRpcResponseData `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `signMessageWithIdentityKey` RPC.
func (SparkSignMessageWithIdentityKeyRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkSignMessageWithIdentityKeyRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkSignMessageWithIdentityKeyRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkSignMessageWithIdentityKeyRpcResponse) UnmarshalJSON(data []byte) error
type SparkSignMessageWithIdentityKeyRpcResponseData ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcResponseData struct {
Signature string `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Spark `signMessageWithIdentityKey` RPC.
func (SparkSignMessageWithIdentityKeyRpcResponseData) RawJSON ¶ added in v0.4.0
func (r SparkSignMessageWithIdentityKeyRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkSignMessageWithIdentityKeyRpcResponseData) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkSignMessageWithIdentityKeyRpcResponseData) UnmarshalJSON(data []byte) error
type SparkSignMessageWithIdentityKeyRpcResponseMethod ¶ added in v0.4.0
type SparkSignMessageWithIdentityKeyRpcResponseMethod string
const (
SparkSignMessageWithIdentityKeyRpcResponseMethodSignMessageWithIdentityKey SparkSignMessageWithIdentityKeyRpcResponseMethod = "signMessageWithIdentityKey"
)
type SparkSigningKeyshare ¶ added in v0.4.0
type SparkSigningKeyshare struct {
JSON struct {
OwnerIdentifiers respjson.Field
PublicKey respjson.Field
PublicShares respjson.Field
Threshold respjson.Field
UpdatedTime respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark signing keyshare.
func (SparkSigningKeyshare) RawJSON ¶ added in v0.4.0
func (r SparkSigningKeyshare) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkSigningKeyshare) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkSigningKeyshare) UnmarshalJSON(data []byte) error
type SparkTokenBalance ¶ added in v0.4.0
type SparkTokenBalance struct {
Balance string `json:"balance" api:"required"`
// Metadata for a Spark user token.
TokenMetadata SparkUserTokenMetadata `json:"token_metadata" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Balance respjson.Field
TokenMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Balance of a Spark token.
func (SparkTokenBalance) RawJSON ¶ added in v0.4.0
func (r SparkTokenBalance) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkTokenBalance) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTokenBalance) UnmarshalJSON(data []byte) error
type SparkTransfer ¶ added in v0.4.0
type SparkTransfer struct {
ID string `json:"id" api:"required"`
Leaves []SparkTransferLeaf `json:"leaves" api:"required"`
ReceiverIdentityPublicKey string `json:"receiver_identity_public_key" api:"required"`
SenderIdentityPublicKey string `json:"sender_identity_public_key" api:"required"`
Status string `json:"status" api:"required"`
TotalValue float64 `json:"total_value" api:"required"`
TransferDirection string `json:"transfer_direction" api:"required"`
Type string `json:"type" api:"required"`
CreatedTime string `json:"created_time"`
ExpiryTime string `json:"expiry_time"`
UpdatedTime string `json:"updated_time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Leaves respjson.Field
ReceiverIdentityPublicKey respjson.Field
SenderIdentityPublicKey respjson.Field
Status respjson.Field
TotalValue respjson.Field
TransferDirection respjson.Field
Type respjson.Field
CreatedTime respjson.Field
ExpiryTime respjson.Field
UpdatedTime respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark transfer.
func (SparkTransfer) RawJSON ¶ added in v0.4.0
func (r SparkTransfer) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkTransfer) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransfer) UnmarshalJSON(data []byte) error
type SparkTransferLeaf ¶ added in v0.4.0
type SparkTransferLeaf struct {
IntermediateRefundTx string `json:"intermediate_refund_tx" api:"required"`
SecretCipher string `json:"secret_cipher" api:"required"`
Signature string `json:"signature" api:"required"`
// A Spark wallet leaf node.
Leaf SparkWalletLeaf `json:"leaf"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntermediateRefundTx respjson.Field
SecretCipher respjson.Field
Signature respjson.Field
Leaf respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark transfer leaf.
func (SparkTransferLeaf) RawJSON ¶ added in v0.4.0
func (r SparkTransferLeaf) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkTransferLeaf) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferLeaf) UnmarshalJSON(data []byte) error
type SparkTransferRpcInput ¶ added in v0.4.0
type SparkTransferRpcInput struct {
// Any of "transfer".
Method SparkTransferRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `transfer` RPC.
Params SparkTransferRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Transfers satoshis to a Spark address.
The properties Method, Params are required.
func (SparkTransferRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkTransferRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkTransferRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferRpcInput) UnmarshalJSON(data []byte) error
type SparkTransferRpcInputMethod ¶ added in v0.4.0
type SparkTransferRpcInputMethod string
const (
SparkTransferRpcInputMethodTransfer SparkTransferRpcInputMethod = "transfer"
)
type SparkTransferRpcInputParams ¶ added in v0.4.0
type SparkTransferRpcInputParams struct {
AmountSats float64 `json:"amount_sats" api:"required"`
ReceiverSparkAddress string `json:"receiver_spark_address" api:"required"`
// contains filtered or unexported fields
}
Parameters for the Spark `transfer` RPC.
The properties AmountSats, ReceiverSparkAddress are required.
func (SparkTransferRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkTransferRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkTransferRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferRpcInputParams) UnmarshalJSON(data []byte) error
type SparkTransferRpcInputParamsResp ¶ added in v0.4.0
type SparkTransferRpcInputParamsResp struct {
AmountSats float64 `json:"amount_sats" api:"required"`
ReceiverSparkAddress string `json:"receiver_spark_address" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AmountSats respjson.Field
ReceiverSparkAddress respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `transfer` RPC.
func (SparkTransferRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkTransferRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkTransferRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkTransferRpcInputParamsResp) ToParam() SparkTransferRpcInputParams
ToParam converts this SparkTransferRpcInputParamsResp to a SparkTransferRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkTransferRpcInputParams.Overrides()
func (*SparkTransferRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkTransferRpcInputResp ¶ added in v0.6.0
type SparkTransferRpcInputResp struct {
// Any of "transfer".
Method SparkTransferRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `transfer` RPC.
Params SparkTransferRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Transfers satoshis to a Spark address.
func (SparkTransferRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkTransferRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkTransferRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkTransferRpcInputResp) ToParam() SparkTransferRpcInput
ToParam converts this SparkTransferRpcInputResp to a SparkTransferRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkTransferRpcInput.Overrides()
func (*SparkTransferRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkTransferRpcInputResp) UnmarshalJSON(data []byte) error
type SparkTransferRpcResponse ¶ added in v0.4.0
type SparkTransferRpcResponse struct {
// Any of "transfer".
Method SparkTransferRpcResponseMethod `json:"method" api:"required"`
// A Spark transfer.
Data SparkTransfer `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `transfer` RPC.
func (SparkTransferRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkTransferRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkTransferRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferRpcResponse) UnmarshalJSON(data []byte) error
type SparkTransferRpcResponseMethod ¶ added in v0.4.0
type SparkTransferRpcResponseMethod string
const (
SparkTransferRpcResponseMethodTransfer SparkTransferRpcResponseMethod = "transfer"
)
type SparkTransferTokensRpcInput ¶ added in v0.4.0
type SparkTransferTokensRpcInput struct {
// Any of "transferTokens".
Method SparkTransferTokensRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `transferTokens` RPC.
Params SparkTransferTokensRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Transfers tokens to a Spark address.
The properties Method, Params are required.
func (SparkTransferTokensRpcInput) MarshalJSON ¶ added in v0.6.0
func (r SparkTransferTokensRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkTransferTokensRpcInput) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferTokensRpcInput) UnmarshalJSON(data []byte) error
type SparkTransferTokensRpcInputMethod ¶ added in v0.4.0
type SparkTransferTokensRpcInputMethod string
const (
SparkTransferTokensRpcInputMethodTransferTokens SparkTransferTokensRpcInputMethod = "transferTokens"
)
type SparkTransferTokensRpcInputParams ¶ added in v0.4.0
type SparkTransferTokensRpcInputParams struct {
ReceiverSparkAddress string `json:"receiver_spark_address" api:"required"`
TokenAmount float64 `json:"token_amount" api:"required"`
TokenIdentifier string `json:"token_identifier" api:"required"`
// Strategy for selecting outputs in a Spark token transfer.
//
// Any of "SMALL_FIRST", "LARGE_FIRST".
OutputSelectionStrategy SparkOutputSelectionStrategy `json:"output_selection_strategy,omitzero"`
SelectedOutputs []OutputWithPreviousTransactionData `json:"selected_outputs,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `transferTokens` RPC.
The properties ReceiverSparkAddress, TokenAmount, TokenIdentifier are required.
func (SparkTransferTokensRpcInputParams) MarshalJSON ¶ added in v0.4.0
func (r SparkTransferTokensRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkTransferTokensRpcInputParams) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferTokensRpcInputParams) UnmarshalJSON(data []byte) error
type SparkTransferTokensRpcInputParamsResp ¶ added in v0.4.0
type SparkTransferTokensRpcInputParamsResp struct {
ReceiverSparkAddress string `json:"receiver_spark_address" api:"required"`
TokenAmount float64 `json:"token_amount" api:"required"`
TokenIdentifier string `json:"token_identifier" api:"required"`
// Strategy for selecting outputs in a Spark token transfer.
//
// Any of "SMALL_FIRST", "LARGE_FIRST".
OutputSelectionStrategy SparkOutputSelectionStrategy `json:"output_selection_strategy"`
SelectedOutputs []OutputWithPreviousTransactionDataResp `json:"selected_outputs"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ReceiverSparkAddress respjson.Field
TokenAmount respjson.Field
TokenIdentifier respjson.Field
OutputSelectionStrategy respjson.Field
SelectedOutputs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `transferTokens` RPC.
func (SparkTransferTokensRpcInputParamsResp) RawJSON ¶ added in v0.4.0
func (r SparkTransferTokensRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkTransferTokensRpcInputParamsResp) ToParam ¶ added in v0.4.0
func (r SparkTransferTokensRpcInputParamsResp) ToParam() SparkTransferTokensRpcInputParams
ToParam converts this SparkTransferTokensRpcInputParamsResp to a SparkTransferTokensRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkTransferTokensRpcInputParams.Overrides()
func (*SparkTransferTokensRpcInputParamsResp) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferTokensRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkTransferTokensRpcInputResp ¶ added in v0.6.0
type SparkTransferTokensRpcInputResp struct {
// Any of "transferTokens".
Method SparkTransferTokensRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `transferTokens` RPC.
Params SparkTransferTokensRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Transfers tokens to a Spark address.
func (SparkTransferTokensRpcInputResp) RawJSON ¶ added in v0.6.0
func (r SparkTransferTokensRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkTransferTokensRpcInputResp) ToParam ¶ added in v0.6.0
func (r SparkTransferTokensRpcInputResp) ToParam() SparkTransferTokensRpcInput
ToParam converts this SparkTransferTokensRpcInputResp to a SparkTransferTokensRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkTransferTokensRpcInput.Overrides()
func (*SparkTransferTokensRpcInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SparkTransferTokensRpcInputResp) UnmarshalJSON(data []byte) error
type SparkTransferTokensRpcResponse ¶ added in v0.4.0
type SparkTransferTokensRpcResponse struct {
// Any of "transferTokens".
Method SparkTransferTokensRpcResponseMethod `json:"method" api:"required"`
// Data returned by the Spark `transferTokens` RPC.
Data SparkTransferTokensRpcResponseData `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `transferTokens` RPC.
func (SparkTransferTokensRpcResponse) RawJSON ¶ added in v0.4.0
func (r SparkTransferTokensRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkTransferTokensRpcResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferTokensRpcResponse) UnmarshalJSON(data []byte) error
type SparkTransferTokensRpcResponseData ¶ added in v0.4.0
type SparkTransferTokensRpcResponseData struct {
ID string `json:"id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Spark `transferTokens` RPC.
func (SparkTransferTokensRpcResponseData) RawJSON ¶ added in v0.4.0
func (r SparkTransferTokensRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkTransferTokensRpcResponseData) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkTransferTokensRpcResponseData) UnmarshalJSON(data []byte) error
type SparkTransferTokensRpcResponseMethod ¶ added in v0.4.0
type SparkTransferTokensRpcResponseMethod string
const (
SparkTransferTokensRpcResponseMethodTransferTokens SparkTransferTokensRpcResponseMethod = "transferTokens"
)
type SparkUserTokenMetadata ¶ added in v0.4.0
type SparkUserTokenMetadata struct {
Decimals float64 `json:"decimals" api:"required"`
MaxSupply string `json:"max_supply" api:"required"`
RawTokenIdentifier string `json:"raw_token_identifier" api:"required"`
TokenName string `json:"token_name" api:"required"`
TokenPublicKey string `json:"token_public_key" api:"required"`
TokenTicker string `json:"token_ticker" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Decimals respjson.Field
MaxSupply respjson.Field
RawTokenIdentifier respjson.Field
TokenName respjson.Field
TokenPublicKey respjson.Field
TokenTicker respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Metadata for a Spark user token.
func (SparkUserTokenMetadata) RawJSON ¶ added in v0.4.0
func (r SparkUserTokenMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkUserTokenMetadata) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkUserTokenMetadata) UnmarshalJSON(data []byte) error
type SparkWalletLeaf ¶ added in v0.4.0
type SparkWalletLeaf struct {
ID string `json:"id" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network" api:"required"`
NodeTx string `json:"node_tx" api:"required"`
OwnerIdentityPublicKey string `json:"owner_identity_public_key" api:"required"`
RefundTx string `json:"refund_tx" api:"required"`
Status string `json:"status" api:"required"`
TreeID string `json:"tree_id" api:"required"`
Value float64 `json:"value" api:"required"`
VerifyingPublicKey string `json:"verifying_public_key" api:"required"`
Vout float64 `json:"vout" api:"required"`
ParentNodeID string `json:"parent_node_id"`
SigningKeyshare SparkSigningKeyshare `json:"signing_keyshare"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Network respjson.Field
NodeTx respjson.Field
OwnerIdentityPublicKey respjson.Field
RefundTx respjson.Field
Status respjson.Field
TreeID respjson.Field
Value respjson.Field
VerifyingPublicKey respjson.Field
Vout respjson.Field
ParentNodeID respjson.Field
SigningKeyshare respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark wallet leaf node.
func (SparkWalletLeaf) RawJSON ¶ added in v0.4.0
func (r SparkWalletLeaf) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkWalletLeaf) UnmarshalJSON ¶ added in v0.4.0
func (r *SparkWalletLeaf) UnmarshalJSON(data []byte) error
type SparkWithdrawRpcInput ¶ added in v0.12.0
type SparkWithdrawRpcInput struct {
// Any of "withdraw".
Method SparkWithdrawRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Spark `withdraw` RPC.
Params SparkWithdrawRpcInputParams `json:"params,omitzero" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network,omitzero"`
// contains filtered or unexported fields
}
Withdraws from Spark to a Bitcoin L1 address (cooperative exit).
The properties Method, Params are required.
func (SparkWithdrawRpcInput) MarshalJSON ¶ added in v0.12.0
func (r SparkWithdrawRpcInput) MarshalJSON() (data []byte, err error)
func (*SparkWithdrawRpcInput) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkWithdrawRpcInput) UnmarshalJSON(data []byte) error
type SparkWithdrawRpcInputMethod ¶ added in v0.12.0
type SparkWithdrawRpcInputMethod string
const (
SparkWithdrawRpcInputMethodWithdraw SparkWithdrawRpcInputMethod = "withdraw"
)
type SparkWithdrawRpcInputParams ¶ added in v0.12.0
type SparkWithdrawRpcInputParams struct {
// The exit speed for a cooperative withdrawal from Spark to L1.
//
// Any of "FAST", "MEDIUM", "SLOW".
ExitSpeed SparkExitSpeed `json:"exit_speed,omitzero" api:"required"`
OnchainAddress string `json:"onchain_address" api:"required"`
AmountSats param.Opt[float64] `json:"amount_sats,omitzero"`
DeductFeeFromWithdrawalAmount param.Opt[bool] `json:"deduct_fee_from_withdrawal_amount,omitzero"`
FeeAmountSats param.Opt[float64] `json:"fee_amount_sats,omitzero"`
FeeQuoteID param.Opt[string] `json:"fee_quote_id,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Spark `withdraw` RPC.
The properties ExitSpeed, OnchainAddress are required.
func (SparkWithdrawRpcInputParams) MarshalJSON ¶ added in v0.12.0
func (r SparkWithdrawRpcInputParams) MarshalJSON() (data []byte, err error)
func (*SparkWithdrawRpcInputParams) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkWithdrawRpcInputParams) UnmarshalJSON(data []byte) error
type SparkWithdrawRpcInputParamsResp ¶ added in v0.12.0
type SparkWithdrawRpcInputParamsResp struct {
// The exit speed for a cooperative withdrawal from Spark to L1.
//
// Any of "FAST", "MEDIUM", "SLOW".
ExitSpeed SparkExitSpeed `json:"exit_speed" api:"required"`
OnchainAddress string `json:"onchain_address" api:"required"`
AmountSats float64 `json:"amount_sats"`
DeductFeeFromWithdrawalAmount bool `json:"deduct_fee_from_withdrawal_amount"`
FeeAmountSats float64 `json:"fee_amount_sats"`
FeeQuoteID string `json:"fee_quote_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExitSpeed respjson.Field
OnchainAddress respjson.Field
AmountSats respjson.Field
DeductFeeFromWithdrawalAmount respjson.Field
FeeAmountSats respjson.Field
FeeQuoteID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Spark `withdraw` RPC.
func (SparkWithdrawRpcInputParamsResp) RawJSON ¶ added in v0.12.0
func (r SparkWithdrawRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkWithdrawRpcInputParamsResp) ToParam ¶ added in v0.12.0
func (r SparkWithdrawRpcInputParamsResp) ToParam() SparkWithdrawRpcInputParams
ToParam converts this SparkWithdrawRpcInputParamsResp to a SparkWithdrawRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkWithdrawRpcInputParams.Overrides()
func (*SparkWithdrawRpcInputParamsResp) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkWithdrawRpcInputParamsResp) UnmarshalJSON(data []byte) error
type SparkWithdrawRpcInputResp ¶ added in v0.12.0
type SparkWithdrawRpcInputResp struct {
// Any of "withdraw".
Method SparkWithdrawRpcInputMethod `json:"method" api:"required"`
// Parameters for the Spark `withdraw` RPC.
Params SparkWithdrawRpcInputParamsResp `json:"params" api:"required"`
// The Spark network.
//
// Any of "MAINNET", "REGTEST".
Network SparkNetwork `json:"network"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Network respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Withdraws from Spark to a Bitcoin L1 address (cooperative exit).
func (SparkWithdrawRpcInputResp) RawJSON ¶ added in v0.12.0
func (r SparkWithdrawRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SparkWithdrawRpcInputResp) ToParam ¶ added in v0.12.0
func (r SparkWithdrawRpcInputResp) ToParam() SparkWithdrawRpcInput
ToParam converts this SparkWithdrawRpcInputResp to a SparkWithdrawRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SparkWithdrawRpcInput.Overrides()
func (*SparkWithdrawRpcInputResp) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkWithdrawRpcInputResp) UnmarshalJSON(data []byte) error
type SparkWithdrawRpcResponse ¶ added in v0.12.0
type SparkWithdrawRpcResponse struct {
// Any of "withdraw".
Method SparkWithdrawRpcResponseMethod `json:"method" api:"required"`
// A cooperative exit request from Spark to Bitcoin L1.
Data SparkCoopExitRequest `json:"data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Spark `withdraw` RPC.
func (SparkWithdrawRpcResponse) RawJSON ¶ added in v0.12.0
func (r SparkWithdrawRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SparkWithdrawRpcResponse) UnmarshalJSON ¶ added in v0.12.0
func (r *SparkWithdrawRpcResponse) UnmarshalJSON(data []byte) error
type SparkWithdrawRpcResponseMethod ¶ added in v0.12.0
type SparkWithdrawRpcResponseMethod string
const (
SparkWithdrawRpcResponseMethodWithdraw SparkWithdrawRpcResponseMethod = "withdraw"
)
type SuccessResponse ¶ added in v0.4.0
type SuccessResponse struct {
Success bool `json:"success" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A simple success response.
func (SuccessResponse) RawJSON ¶ added in v0.4.0
func (r SuccessResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SuccessResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *SuccessResponse) UnmarshalJSON(data []byte) error
type SuiCommandName ¶
type SuiCommandName string
SUI transaction commands allowlist for raw_sign endpoint policy evaluation
const ( SuiCommandNameTransferObjects SuiCommandName = "TransferObjects" SuiCommandNameSplitCoins SuiCommandName = "SplitCoins" SuiCommandNameMergeCoins SuiCommandName = "MergeCoins" )
type SuiTransactionCommandCondition ¶
type SuiTransactionCommandCondition struct {
// Any of "commandName".
Field SuiTransactionCommandConditionField `json:"field,omitzero" api:"required"`
// Any of "sui_transaction_command".
FieldSource SuiTransactionCommandConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
// supported for command names.
//
// Any of "eq", "in".
Operator SuiTransactionCommandOperator `json:"operator,omitzero" api:"required"`
// Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
// 'MergeCoins'
Value SuiTransactionCommandConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
SUI transaction command attributes, enables allowlisting specific command types. Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and 'in' operators are supported.
The properties Field, FieldSource, Operator, Value are required.
func (SuiTransactionCommandCondition) MarshalJSON ¶ added in v0.6.0
func (r SuiTransactionCommandCondition) MarshalJSON() (data []byte, err error)
func (*SuiTransactionCommandCondition) UnmarshalJSON ¶
func (r *SuiTransactionCommandCondition) UnmarshalJSON(data []byte) error
type SuiTransactionCommandConditionField ¶
type SuiTransactionCommandConditionField string
const (
SuiTransactionCommandConditionFieldCommandName SuiTransactionCommandConditionField = "commandName"
)
type SuiTransactionCommandConditionFieldSource ¶
type SuiTransactionCommandConditionFieldSource string
const (
SuiTransactionCommandConditionFieldSourceSuiTransactionCommand SuiTransactionCommandConditionFieldSource = "sui_transaction_command"
)
type SuiTransactionCommandConditionResp ¶ added in v0.6.0
type SuiTransactionCommandConditionResp struct {
// Any of "commandName".
Field SuiTransactionCommandConditionField `json:"field" api:"required"`
// Any of "sui_transaction_command".
FieldSource SuiTransactionCommandConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
// supported for command names.
//
// Any of "eq", "in".
Operator SuiTransactionCommandOperator `json:"operator" api:"required"`
// Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
// 'MergeCoins'
Value SuiTransactionCommandConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SUI transaction command attributes, enables allowlisting specific command types. Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and 'in' operators are supported.
func (SuiTransactionCommandConditionResp) RawJSON ¶ added in v0.6.0
func (r SuiTransactionCommandConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SuiTransactionCommandConditionResp) ToParam ¶ added in v0.6.0
func (r SuiTransactionCommandConditionResp) ToParam() SuiTransactionCommandCondition
ToParam converts this SuiTransactionCommandConditionResp to a SuiTransactionCommandCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SuiTransactionCommandCondition.Overrides()
func (*SuiTransactionCommandConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SuiTransactionCommandConditionResp) UnmarshalJSON(data []byte) error
type SuiTransactionCommandConditionValueUnion ¶
type SuiTransactionCommandConditionValueUnion struct {
// Check if union is this variant with !param.IsOmitted(union.OfSuiCommandName)
OfSuiCommandName param.Opt[SuiCommandName] `json:",omitzero,inline"`
OfSuiCommandNameArray []SuiCommandName `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (SuiTransactionCommandConditionValueUnion) MarshalJSON ¶ added in v0.6.0
func (u SuiTransactionCommandConditionValueUnion) MarshalJSON() ([]byte, error)
func (*SuiTransactionCommandConditionValueUnion) UnmarshalJSON ¶
func (u *SuiTransactionCommandConditionValueUnion) UnmarshalJSON(data []byte) error
type SuiTransactionCommandConditionValueUnionResp ¶ added in v0.6.0
type SuiTransactionCommandConditionValueUnionResp struct {
// This field will be present if the value is a [SuiCommandName] instead of an
// object.
OfSuiCommandName SuiCommandName `json:",inline"`
// This field will be present if the value is a [[]SuiCommandName] instead of an
// object.
OfSuiCommandNameArray []SuiCommandName `json:",inline"`
JSON struct {
OfSuiCommandName respjson.Field
OfSuiCommandNameArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SuiTransactionCommandConditionValueUnionResp contains all possible properties and values from SuiCommandName, [[]SuiCommandName].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfSuiCommandName OfSuiCommandNameArray]
func (SuiTransactionCommandConditionValueUnionResp) AsSuiCommandName ¶ added in v0.6.0
func (u SuiTransactionCommandConditionValueUnionResp) AsSuiCommandName() (v SuiCommandName)
func (SuiTransactionCommandConditionValueUnionResp) AsSuiCommandNameArray ¶ added in v0.6.0
func (u SuiTransactionCommandConditionValueUnionResp) AsSuiCommandNameArray() (v []SuiCommandName)
func (SuiTransactionCommandConditionValueUnionResp) RawJSON ¶ added in v0.6.0
func (u SuiTransactionCommandConditionValueUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*SuiTransactionCommandConditionValueUnionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SuiTransactionCommandConditionValueUnionResp) UnmarshalJSON(data []byte) error
type SuiTransactionCommandOperator ¶
type SuiTransactionCommandOperator string
Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are supported for command names.
const ( SuiTransactionCommandOperatorEq SuiTransactionCommandOperator = "eq" SuiTransactionCommandOperatorIn SuiTransactionCommandOperator = "in" )
type SuiTransferObjectsCommandCondition ¶
type SuiTransferObjectsCommandCondition struct {
// Supported fields for SUI TransferObjects command conditions. Only 'recipient'
// and 'amount' are supported.
//
// Any of "recipient", "amount".
Field SuiTransferObjectsCommandField `json:"field,omitzero" api:"required"`
// Any of "sui_transfer_objects_command".
FieldSource SuiTransferObjectsCommandConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
SUI TransferObjects command attributes, including recipient and amount fields.
The properties Field, FieldSource, Operator, Value are required.
func (SuiTransferObjectsCommandCondition) MarshalJSON ¶ added in v0.6.0
func (r SuiTransferObjectsCommandCondition) MarshalJSON() (data []byte, err error)
func (*SuiTransferObjectsCommandCondition) UnmarshalJSON ¶
func (r *SuiTransferObjectsCommandCondition) UnmarshalJSON(data []byte) error
type SuiTransferObjectsCommandConditionFieldSource ¶
type SuiTransferObjectsCommandConditionFieldSource string
const (
SuiTransferObjectsCommandConditionFieldSourceSuiTransferObjectsCommand SuiTransferObjectsCommandConditionFieldSource = "sui_transfer_objects_command"
)
type SuiTransferObjectsCommandConditionResp ¶ added in v0.6.0
type SuiTransferObjectsCommandConditionResp struct {
// Supported fields for SUI TransferObjects command conditions. Only 'recipient'
// and 'amount' are supported.
//
// Any of "recipient", "amount".
Field SuiTransferObjectsCommandField `json:"field" api:"required"`
// Any of "sui_transfer_objects_command".
FieldSource SuiTransferObjectsCommandConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
SUI TransferObjects command attributes, including recipient and amount fields.
func (SuiTransferObjectsCommandConditionResp) RawJSON ¶ added in v0.6.0
func (r SuiTransferObjectsCommandConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SuiTransferObjectsCommandConditionResp) ToParam ¶ added in v0.6.0
func (r SuiTransferObjectsCommandConditionResp) ToParam() SuiTransferObjectsCommandCondition
ToParam converts this SuiTransferObjectsCommandConditionResp to a SuiTransferObjectsCommandCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SuiTransferObjectsCommandCondition.Overrides()
func (*SuiTransferObjectsCommandConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SuiTransferObjectsCommandConditionResp) UnmarshalJSON(data []byte) error
type SuiTransferObjectsCommandField ¶
type SuiTransferObjectsCommandField string
Supported fields for SUI TransferObjects command conditions. Only 'recipient' and 'amount' are supported.
const ( SuiTransferObjectsCommandFieldRecipient SuiTransferObjectsCommandField = "recipient" SuiTransferObjectsCommandFieldAmount SuiTransferObjectsCommandField = "amount" )
type SvmTransactionWalletActionStep ¶ added in v0.6.0
type SvmTransactionWalletActionStep struct {
// CAIP-2 chain identifier for the Solana network.
Caip2 string `json:"caip2" api:"required"`
// Status of an SVM step in a wallet action.
//
// Any of "preparing", "queued", "pending", "confirmed", "rejected", "reverted",
// "failed".
Status SvmWalletActionStepStatus `json:"status" api:"required"`
// The Solana transaction signature (base58-encoded). Null until broadcast.
TransactionSignature string `json:"transaction_signature" api:"required"`
// Any of "svm_transaction".
Type SvmTransactionWalletActionStepType `json:"type" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// Whether this step has reached on-chain finality. Absent until finality is
// confirmed.
Finalized bool `json:"finalized"`
// Amount charged in USD for gas sponsorship on this step.
GasCreditsChargedUsd string `json:"gas_credits_charged_usd"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Status respjson.Field
TransactionSignature respjson.Field
Type respjson.Field
FailureReason respjson.Field
Finalized respjson.Field
GasCreditsChargedUsd respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet action step consisting of an SVM (Solana) transaction.
func (SvmTransactionWalletActionStep) RawJSON ¶ added in v0.6.0
func (r SvmTransactionWalletActionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*SvmTransactionWalletActionStep) UnmarshalJSON ¶ added in v0.6.0
func (r *SvmTransactionWalletActionStep) UnmarshalJSON(data []byte) error
type SvmTransactionWalletActionStepType ¶ added in v0.6.0
type SvmTransactionWalletActionStepType string
const (
SvmTransactionWalletActionStepTypeSvmTransaction SvmTransactionWalletActionStepType = "svm_transaction"
)
type SvmWalletActionStepStatus ¶ added in v0.6.0
type SvmWalletActionStepStatus string
Status of an SVM step in a wallet action.
const ( SvmWalletActionStepStatusPreparing SvmWalletActionStepStatus = "preparing" SvmWalletActionStepStatusQueued SvmWalletActionStepStatus = "queued" SvmWalletActionStepStatusPending SvmWalletActionStepStatus = "pending" SvmWalletActionStepStatusConfirmed SvmWalletActionStepStatus = "confirmed" SvmWalletActionStepStatusRejected SvmWalletActionStepStatus = "rejected" SvmWalletActionStepStatusReverted SvmWalletActionStepStatus = "reverted" SvmWalletActionStepStatusFailed SvmWalletActionStepStatus = "failed" )
type SwapActionResponse ¶ added in v0.9.0
type SwapActionResponse struct {
// The ID of the wallet action.
ID string `json:"id" api:"required"`
// CAIP-2 chain identifier for the swap.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Exact base-unit amount of input token. Populated after on-chain confirmation.
InputAmount string `json:"input_amount" api:"required"`
// Token address or "native" for the token being sold.
InputToken string `json:"input_token" api:"required"`
// Exact base-unit amount of output token. Populated after on-chain confirmation.
OutputAmount string `json:"output_amount" api:"required"`
// Token address or "native" for the token being bought.
OutputToken string `json:"output_token" api:"required"`
// Status of a wallet action.
//
// Any of "pending", "succeeded", "rejected", "failed".
Status WalletActionStatus `json:"status" api:"required"`
// Any of "swap".
Type SwapActionResponseType `json:"type" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Recipient address on the destination chain. Present for cross-chain swaps. May
// differ from the source wallet address when swapping between chain types (e.g.
// EVM to Solana).
DestinationAddress string `json:"destination_address"`
// Destination chain CAIP-2 identifier. Present for cross-chain swaps.
DestinationCaip2 string `json:"destination_caip2"`
// Estimated fee breakdown from the provider quote. Only present for cross-chain
// swaps. Populated after on-chain confirmation.
EstimatedFees []FeeLineItemUnion `json:"estimated_fees" api:"nullable"`
// Gas cost for a blockchain action. Includes both raw base-unit amount and a
// human-readable decimal string, plus the gas token symbol.
EstimatedGas Gas `json:"estimated_gas" api:"nullable"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// Actual fees paid for the swap. Populated after on-chain confirmation. Only
// present for cross-chain swaps.
Fees []FeeLineItemUnion `json:"fees" api:"nullable"`
// Gas cost for a blockchain action. Includes both raw base-unit amount and a
// human-readable decimal string, plus the gas token symbol.
Gas Gas `json:"gas" api:"nullable"`
// The steps of the wallet action. Only returned if `?include=steps` is provided.
Steps []WalletActionStepUnion `json:"steps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
InputAmount respjson.Field
InputToken respjson.Field
OutputAmount respjson.Field
OutputToken respjson.Field
Status respjson.Field
Type respjson.Field
WalletID respjson.Field
DestinationAddress respjson.Field
DestinationCaip2 respjson.Field
EstimatedFees respjson.Field
EstimatedGas respjson.Field
FailureReason respjson.Field
Fees respjson.Field
Gas respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for a swap action.
func (SwapActionResponse) RawJSON ¶ added in v0.9.0
func (r SwapActionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SwapActionResponse) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapActionResponse) UnmarshalJSON(data []byte) error
type SwapActionResponseType ¶ added in v0.9.0
type SwapActionResponseType string
const (
SwapActionResponseTypeSwap SwapActionResponseType = "swap"
)
type SwapDestination ¶ added in v0.9.0
type SwapDestination struct {
// Token contract address to buy, or "native" for the chain's native token.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier for the destination. Defaults to source chain if
// omitted. Specify a different chain for cross-chain swaps.
Caip2 param.Opt[string] `json:"caip2,omitzero"`
// Address to receive the output tokens. Defaults to the swapping wallet address.
// Required when swapping between different chain types (e.g. EVM to Solana).
DestinationAddress param.Opt[string] `json:"destination_address,omitzero"`
// contains filtered or unexported fields
}
The output side of a swap execution request.
The property AssetAddress is required.
func (SwapDestination) MarshalJSON ¶ added in v0.9.0
func (r SwapDestination) MarshalJSON() (data []byte, err error)
func (*SwapDestination) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapDestination) UnmarshalJSON(data []byte) error
type SwapQuoteDestination ¶ added in v0.9.0
type SwapQuoteDestination struct {
// Token contract address to buy, or "native" for the chain's native token.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier for the destination. Defaults to source chain if
// omitted. Will result in a cross-chain swap if source and destination chains
// differ.
Caip2 param.Opt[string] `json:"caip2,omitzero"`
// Address to receive the output tokens. Defaults to the swapping wallet address.
// Required when swapping between chains with different address types (e.g. EVM to
// Solana).
DestinationAddress param.Opt[string] `json:"destination_address,omitzero"`
// contains filtered or unexported fields
}
The output side of a swap quote request.
The property AssetAddress is required.
func (SwapQuoteDestination) MarshalJSON ¶ added in v0.9.0
func (r SwapQuoteDestination) MarshalJSON() (data []byte, err error)
func (*SwapQuoteDestination) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapQuoteDestination) UnmarshalJSON(data []byte) error
type SwapQuoteRequestBody ¶ added in v0.9.0
type SwapQuoteRequestBody struct {
// Amount in base units (e.g., wei for ETH). Must be a non-negative integer string.
BaseAmount string `json:"base_amount" api:"required"`
// The output side of a swap quote request.
Destination SwapQuoteDestination `json:"destination,omitzero" api:"required"`
// The input side of a swap request, including token and chain.
Source SwapSource `json:"source,omitzero" api:"required"`
// Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
// auto-slippage is used.
SlippageBps param.Opt[int64] `json:"slippage_bps,omitzero"`
// Whether the amount refers to the input token or output token.
//
// Any of "exact_input", "exact_output".
AmountType AmountType `json:"amount_type,omitzero"`
// Total fees assessed on a transfer, in BPS
FeeConfiguration FeeConfiguration `json:"fee_configuration,omitzero"`
// contains filtered or unexported fields
}
Input for requesting a token swap quote.
The properties BaseAmount, Destination, Source are required.
func (SwapQuoteRequestBody) MarshalJSON ¶ added in v0.9.0
func (r SwapQuoteRequestBody) MarshalJSON() (data []byte, err error)
func (*SwapQuoteRequestBody) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapQuoteRequestBody) UnmarshalJSON(data []byte) error
type SwapQuoteResponse ¶ added in v0.9.0
type SwapQuoteResponse struct {
// Chain identifier.
Caip2 string `json:"caip2" api:"required"`
// Estimated amount of output token in base units.
EstOutputAmount string `json:"est_output_amount" api:"required"`
// Estimated gas cost in base units of the native token. @deprecated For
// cross-chain swaps, use estimated_gas instead.
GasEstimate string `json:"gas_estimate" api:"required"`
// Amount of input token in base units.
InputAmount string `json:"input_amount" api:"required"`
// Token address being sold.
InputToken string `json:"input_token" api:"required"`
// Minimum output amount accounting for slippage, in base units.
MinimumOutputAmount string `json:"minimum_output_amount" api:"required"`
// Token address being bought.
OutputToken string `json:"output_token" api:"required"`
// Destination chain CAIP-2 identifier for cross-chain swaps. Only present for
// cross-chain swaps.
DestinationCaip2 string `json:"destination_caip2"`
// Estimated fees for the swap. Only present for cross-chain swaps.
EstimatedFees []FeeLineItemUnion `json:"estimated_fees"`
// Gas cost for a blockchain action. Includes both raw base-unit amount and a
// human-readable decimal string, plus the gas token symbol.
EstimatedGas Gas `json:"estimated_gas"`
// Quote expiry as Unix timestamp (seconds). Only present for cross-chain quotes.
ExpiresAt float64 `json:"expires_at"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
EstOutputAmount respjson.Field
GasEstimate respjson.Field
InputAmount respjson.Field
InputToken respjson.Field
MinimumOutputAmount respjson.Field
OutputToken respjson.Field
DestinationCaip2 respjson.Field
EstimatedFees respjson.Field
EstimatedGas respjson.Field
ExpiresAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Pricing data for a token swap.
func (SwapQuoteResponse) RawJSON ¶ added in v0.9.0
func (r SwapQuoteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SwapQuoteResponse) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapQuoteResponse) UnmarshalJSON(data []byte) error
type SwapRequestBody ¶ added in v0.9.0
type SwapRequestBody struct {
// Amount in base units (e.g., wei for ETH). Must be a non-negative integer string.
BaseAmount string `json:"base_amount" api:"required"`
// The output side of a swap execution request.
Destination SwapDestination `json:"destination,omitzero" api:"required"`
// The input side of a swap request, including token and chain.
Source SwapSource `json:"source,omitzero" api:"required"`
// Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
SlippageBps param.Opt[int64] `json:"slippage_bps,omitzero"`
// Whether the amount refers to the input token or output token.
//
// Any of "exact_input", "exact_output".
AmountType AmountType `json:"amount_type,omitzero"`
// Total fees assessed on a transfer, in BPS
FeeConfiguration FeeConfiguration `json:"fee_configuration,omitzero"`
// contains filtered or unexported fields
}
Input for executing a token swap.
The properties BaseAmount, Destination, Source are required.
func (SwapRequestBody) MarshalJSON ¶ added in v0.9.0
func (r SwapRequestBody) MarshalJSON() (data []byte, err error)
func (*SwapRequestBody) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapRequestBody) UnmarshalJSON(data []byte) error
type SwapService ¶ added in v0.4.0
type SwapService struct {
Options []option.RequestOption
}
SwapService contains methods and other services that help with interacting with the Privy API 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 NewSwapService method instead.
func NewSwapService ¶ added in v0.4.0
func NewSwapService(opts ...option.RequestOption) (r SwapService)
NewSwapService 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 SwapSource ¶ added in v0.9.0
type SwapSource struct {
// Token contract address to sell, or "native" for the chain's native token.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier (e.g., "eip155:4217" for Tempo, "eip155:1" for
// Ethereum).
Caip2 string `json:"caip2" api:"required"`
// contains filtered or unexported fields
}
The input side of a swap request, including token and chain.
The properties AssetAddress, Caip2 are required.
func (SwapSource) MarshalJSON ¶ added in v0.9.0
func (r SwapSource) MarshalJSON() (data []byte, err error)
func (*SwapSource) UnmarshalJSON ¶ added in v0.9.0
func (r *SwapSource) UnmarshalJSON(data []byte) error
type SystemCondition ¶ added in v0.6.0
type SystemCondition struct {
// Any of "current_unix_timestamp".
Field SystemConditionField `json:"field,omitzero" api:"required"`
// Any of "system".
FieldSource SystemConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
System attributes, including current unix timestamp (in seconds).
The properties Field, FieldSource, Operator, Value are required.
func (SystemCondition) MarshalJSON ¶ added in v0.6.0
func (r SystemCondition) MarshalJSON() (data []byte, err error)
func (*SystemCondition) UnmarshalJSON ¶ added in v0.6.0
func (r *SystemCondition) UnmarshalJSON(data []byte) error
type SystemConditionField ¶ added in v0.6.0
type SystemConditionField string
const (
SystemConditionFieldCurrentUnixTimestamp SystemConditionField = "current_unix_timestamp"
)
type SystemConditionFieldSource ¶ added in v0.6.0
type SystemConditionFieldSource string
const (
SystemConditionFieldSourceSystem SystemConditionFieldSource = "system"
)
type SystemConditionResp ¶ added in v0.6.0
type SystemConditionResp struct {
// Any of "current_unix_timestamp".
Field SystemConditionField `json:"field" api:"required"`
// Any of "system".
FieldSource SystemConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
System attributes, including current unix timestamp (in seconds).
func (SystemConditionResp) RawJSON ¶ added in v0.6.0
func (r SystemConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (SystemConditionResp) ToParam ¶ added in v0.6.0
func (r SystemConditionResp) ToParam() SystemCondition
ToParam converts this SystemConditionResp to a SystemCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SystemCondition.Overrides()
func (*SystemConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *SystemConditionResp) UnmarshalJSON(data []byte) error
type TelegramAuthConfigSchema ¶ added in v0.4.0
type TelegramAuthConfigSchema struct {
BotID string `json:"bot_id" api:"required"`
BotName string `json:"bot_name" api:"required"`
LinkEnabled bool `json:"link_enabled" api:"required"`
SeamlessAuthEnabled bool `json:"seamless_auth_enabled" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BotID respjson.Field
BotName respjson.Field
LinkEnabled respjson.Field
SeamlessAuthEnabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Configuration for Telegram authentication.
func (TelegramAuthConfigSchema) RawJSON ¶ added in v0.4.0
func (r TelegramAuthConfigSchema) RawJSON() string
Returns the unmodified JSON received from the API
func (*TelegramAuthConfigSchema) UnmarshalJSON ¶ added in v0.4.0
func (r *TelegramAuthConfigSchema) UnmarshalJSON(data []byte) error
type TempoAaAuthorization ¶ added in v0.7.0
type TempoAaAuthorization struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnion `json:"chain_id,omitzero" api:"required"`
Contract string `json:"contract" api:"required"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnion `json:"nonce,omitzero" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Signature Hex `json:"signature" api:"required"`
// contains filtered or unexported fields
}
An AA authorization for Tempo transactions with P256/WebAuthn signatures.
The properties ChainID, Contract, Nonce, Signature are required.
func (TempoAaAuthorization) MarshalJSON ¶ added in v0.7.0
func (r TempoAaAuthorization) MarshalJSON() (data []byte, err error)
func (*TempoAaAuthorization) UnmarshalJSON ¶ added in v0.7.0
func (r *TempoAaAuthorization) UnmarshalJSON(data []byte) error
type TempoAaAuthorizationResp ¶ added in v0.7.0
type TempoAaAuthorizationResp struct {
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnionResp `json:"chain_id" api:"required"`
Contract string `json:"contract" api:"required"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnionResp `json:"nonce" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Signature Hex `json:"signature" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ChainID respjson.Field
Contract respjson.Field
Nonce respjson.Field
Signature respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An AA authorization for Tempo transactions with P256/WebAuthn signatures.
func (TempoAaAuthorizationResp) RawJSON ¶ added in v0.7.0
func (r TempoAaAuthorizationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TempoAaAuthorizationResp) ToParam ¶ added in v0.7.0
func (r TempoAaAuthorizationResp) ToParam() TempoAaAuthorization
ToParam converts this TempoAaAuthorizationResp to a TempoAaAuthorization.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TempoAaAuthorization.Overrides()
func (*TempoAaAuthorizationResp) UnmarshalJSON ¶ added in v0.7.0
func (r *TempoAaAuthorizationResp) UnmarshalJSON(data []byte) error
type TempoCall ¶ added in v0.7.0
type TempoCall struct {
To string `json:"to" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Data param.Opt[Hex] `json:"data,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Value QuantityUnion `json:"value,omitzero"`
// contains filtered or unexported fields
}
A single call within a Tempo batched transaction.
The property To is required.
func (TempoCall) MarshalJSON ¶ added in v0.7.0
func (*TempoCall) UnmarshalJSON ¶ added in v0.7.0
type TempoCallResp ¶ added in v0.7.0
type TempoCallResp struct {
To string `json:"to" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Data Hex `json:"data"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Value QuantityUnionResp `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
To respjson.Field
Data respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single call within a Tempo batched transaction.
func (TempoCallResp) RawJSON ¶ added in v0.7.0
func (r TempoCallResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TempoCallResp) ToParam ¶ added in v0.7.0
func (r TempoCallResp) ToParam() TempoCall
ToParam converts this TempoCallResp to a TempoCall.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TempoCall.Overrides()
func (*TempoCallResp) UnmarshalJSON ¶ added in v0.7.0
func (r *TempoCallResp) UnmarshalJSON(data []byte) error
type TempoFeePayerSignature ¶ added in v0.7.0
type TempoFeePayerSignature struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
R Hex `json:"r" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
S Hex `json:"s" api:"required"`
// Any of 0, 1.
YParity float64 `json:"y_parity,omitzero" api:"required"`
// contains filtered or unexported fields
}
A fee payer signature for sponsored Tempo transactions (secp256k1 only).
The properties R, S, YParity are required.
func (TempoFeePayerSignature) MarshalJSON ¶ added in v0.7.0
func (r TempoFeePayerSignature) MarshalJSON() (data []byte, err error)
func (*TempoFeePayerSignature) UnmarshalJSON ¶ added in v0.7.0
func (r *TempoFeePayerSignature) UnmarshalJSON(data []byte) error
type TempoFeePayerSignatureResp ¶ added in v0.7.0
type TempoFeePayerSignatureResp struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
R Hex `json:"r" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
S Hex `json:"s" api:"required"`
// Any of 0, 1.
YParity float64 `json:"y_parity" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
R respjson.Field
S respjson.Field
YParity respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A fee payer signature for sponsored Tempo transactions (secp256k1 only).
func (TempoFeePayerSignatureResp) RawJSON ¶ added in v0.7.0
func (r TempoFeePayerSignatureResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TempoFeePayerSignatureResp) ToParam ¶ added in v0.7.0
func (r TempoFeePayerSignatureResp) ToParam() TempoFeePayerSignature
ToParam converts this TempoFeePayerSignatureResp to a TempoFeePayerSignature.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TempoFeePayerSignature.Overrides()
func (*TempoFeePayerSignatureResp) UnmarshalJSON ¶ added in v0.7.0
func (r *TempoFeePayerSignatureResp) UnmarshalJSON(data []byte) error
type TempoTransactionCondition ¶ added in v0.8.0
type TempoTransactionCondition struct {
// Tempo (type 118) transaction-level fields that can be referenced in a policy
// condition.
//
// Any of "fee_token", "fee_payer_signature", "nonce_key", "valid_before",
// "valid_after".
Field TempoTransactionConditionField `json:"field,omitzero" api:"required"`
// Any of "tempo_transaction".
FieldSource TempoTransactionConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
A Tempo (type 118) transaction-level field. Evaluated once per transaction (not per call).
The properties Field, FieldSource, Operator, Value are required.
func (TempoTransactionCondition) MarshalJSON ¶ added in v0.8.0
func (r TempoTransactionCondition) MarshalJSON() (data []byte, err error)
func (*TempoTransactionCondition) UnmarshalJSON ¶ added in v0.8.0
func (r *TempoTransactionCondition) UnmarshalJSON(data []byte) error
type TempoTransactionConditionField ¶ added in v0.8.0
type TempoTransactionConditionField string
Tempo (type 118) transaction-level fields that can be referenced in a policy condition.
const ( TempoTransactionConditionFieldFeeToken TempoTransactionConditionField = "fee_token" TempoTransactionConditionFieldFeePayerSignature TempoTransactionConditionField = "fee_payer_signature" TempoTransactionConditionFieldNonceKey TempoTransactionConditionField = "nonce_key" TempoTransactionConditionFieldValidBefore TempoTransactionConditionField = "valid_before" TempoTransactionConditionFieldValidAfter TempoTransactionConditionField = "valid_after" )
type TempoTransactionConditionFieldSource ¶ added in v0.8.0
type TempoTransactionConditionFieldSource string
const (
TempoTransactionConditionFieldSourceTempoTransaction TempoTransactionConditionFieldSource = "tempo_transaction"
)
type TempoTransactionConditionResp ¶ added in v0.8.0
type TempoTransactionConditionResp struct {
// Tempo (type 118) transaction-level fields that can be referenced in a policy
// condition.
//
// Any of "fee_token", "fee_payer_signature", "nonce_key", "valid_before",
// "valid_after".
Field TempoTransactionConditionField `json:"field" api:"required"`
// Any of "tempo_transaction".
FieldSource TempoTransactionConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Tempo (type 118) transaction-level field. Evaluated once per transaction (not per call).
func (TempoTransactionConditionResp) RawJSON ¶ added in v0.8.0
func (r TempoTransactionConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TempoTransactionConditionResp) ToParam ¶ added in v0.8.0
func (r TempoTransactionConditionResp) ToParam() TempoTransactionCondition
ToParam converts this TempoTransactionConditionResp to a TempoTransactionCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TempoTransactionCondition.Overrides()
func (*TempoTransactionConditionResp) UnmarshalJSON ¶ added in v0.8.0
func (r *TempoTransactionConditionResp) UnmarshalJSON(data []byte) error
type TestAccount ¶ added in v0.4.0
type TestAccount struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
Email string `json:"email" api:"required"`
OtpCode string `json:"otp_code" api:"required"`
PhoneNumber string `json:"phone_number" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
Name string `json:"name" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Email respjson.Field
OtpCode respjson.Field
PhoneNumber respjson.Field
UpdatedAt respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A test account for an app.
func (TestAccount) RawJSON ¶ added in v0.4.0
func (r TestAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*TestAccount) UnmarshalJSON ¶ added in v0.4.0
func (r *TestAccount) UnmarshalJSON(data []byte) error
type TestAccountsResponse ¶ added in v0.4.0
type TestAccountsResponse struct {
Data []TestAccount `json:"data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for listing test accounts for an app.
func (TestAccountsResponse) RawJSON ¶ added in v0.4.0
func (r TestAccountsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TestAccountsResponse) UnmarshalJSON ¶ added in v0.4.0
func (r *TestAccountsResponse) UnmarshalJSON(data []byte) error
type TokenOutput ¶ added in v0.4.0
type TokenOutput struct {
OwnerPublicKey string `json:"owner_public_key" api:"required"`
TokenAmount string `json:"token_amount" api:"required"`
ID param.Opt[string] `json:"id,omitzero"`
RevocationCommitment param.Opt[string] `json:"revocation_commitment,omitzero"`
TokenIdentifier param.Opt[string] `json:"token_identifier,omitzero"`
TokenPublicKey param.Opt[string] `json:"token_public_key,omitzero"`
WithdrawBondSats param.Opt[float64] `json:"withdraw_bond_sats,omitzero"`
WithdrawRelativeBlockLocktime param.Opt[float64] `json:"withdraw_relative_block_locktime,omitzero"`
// contains filtered or unexported fields
}
A Spark token output.
The properties OwnerPublicKey, TokenAmount are required.
func (TokenOutput) MarshalJSON ¶ added in v0.6.0
func (r TokenOutput) MarshalJSON() (data []byte, err error)
func (*TokenOutput) UnmarshalJSON ¶ added in v0.4.0
func (r *TokenOutput) UnmarshalJSON(data []byte) error
type TokenOutputResp ¶ added in v0.6.0
type TokenOutputResp struct {
OwnerPublicKey string `json:"owner_public_key" api:"required"`
TokenAmount string `json:"token_amount" api:"required"`
ID string `json:"id"`
RevocationCommitment string `json:"revocation_commitment"`
TokenIdentifier string `json:"token_identifier"`
TokenPublicKey string `json:"token_public_key"`
WithdrawBondSats float64 `json:"withdraw_bond_sats"`
WithdrawRelativeBlockLocktime float64 `json:"withdraw_relative_block_locktime"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OwnerPublicKey respjson.Field
TokenAmount respjson.Field
ID respjson.Field
RevocationCommitment respjson.Field
TokenIdentifier respjson.Field
TokenPublicKey respjson.Field
WithdrawBondSats respjson.Field
WithdrawRelativeBlockLocktime respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Spark token output.
func (TokenOutputResp) RawJSON ¶ added in v0.6.0
func (r TokenOutputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TokenOutputResp) ToParam ¶ added in v0.6.0
func (r TokenOutputResp) ToParam() TokenOutput
ToParam converts this TokenOutputResp to a TokenOutput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TokenOutput.Overrides()
func (*TokenOutputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *TokenOutputResp) UnmarshalJSON(data []byte) error
type TokenTransferDestination ¶ added in v0.5.0
type TokenTransferDestination struct {
// Recipient address (hex for EVM, base58 for Solana, base58check for Tron)
Address string `json:"address" api:"required"`
// The destination asset. Required for cross-asset transfers (e.g., source 'usdt'
// to destination 'usdc').
Asset param.Opt[string] `json:"asset,omitzero"`
// The destination blockchain network. Required for cross-chain transfers (e.g.,
// source 'tempo' to destination 'base').
Chain param.Opt[string] `json:"chain,omitzero"`
// contains filtered or unexported fields
}
The destination address for a token transfer. Optionally specify a different asset or chain for cross-asset or cross-chain transfers.
The property Address is required.
func (TokenTransferDestination) MarshalJSON ¶ added in v0.6.0
func (r TokenTransferDestination) MarshalJSON() (data []byte, err error)
func (*TokenTransferDestination) UnmarshalJSON ¶ added in v0.5.0
func (r *TokenTransferDestination) UnmarshalJSON(data []byte) error
type TokenTransferDestinationResp ¶ added in v0.6.0
type TokenTransferDestinationResp struct {
// Recipient address (hex for EVM, base58 for Solana, base58check for Tron)
Address string `json:"address" api:"required"`
// The destination asset. Required for cross-asset transfers (e.g., source 'usdt'
// to destination 'usdc').
Asset string `json:"asset"`
// The destination blockchain network. Required for cross-chain transfers (e.g.,
// source 'tempo' to destination 'base').
Chain string `json:"chain"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
Asset respjson.Field
Chain respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The destination address for a token transfer. Optionally specify a different asset or chain for cross-asset or cross-chain transfers.
func (TokenTransferDestinationResp) RawJSON ¶ added in v0.6.0
func (r TokenTransferDestinationResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TokenTransferDestinationResp) ToParam ¶ added in v0.6.0
func (r TokenTransferDestinationResp) ToParam() TokenTransferDestination
ToParam converts this TokenTransferDestinationResp to a TokenTransferDestination.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TokenTransferDestination.Overrides()
func (*TokenTransferDestinationResp) UnmarshalJSON ¶ added in v0.6.0
func (r *TokenTransferDestinationResp) UnmarshalJSON(data []byte) error
type TokenTransferSourceUnion ¶ added in v0.7.0
type TokenTransferSourceUnion struct {
OfNamedTokenTransferSource *NamedTokenTransferSource `json:",omitzero,inline"`
OfCustomTokenTransferSource *CustomTokenTransferSource `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func TokenTransferSourceOfCustomTokenTransferSource ¶ added in v0.7.0
func TokenTransferSourceOfCustomTokenTransferSource(assetAddress string, chain string) TokenTransferSourceUnion
func TokenTransferSourceOfNamedTokenTransferSource ¶ added in v0.7.0
func TokenTransferSourceOfNamedTokenTransferSource(asset string, chain string) TokenTransferSourceUnion
func (TokenTransferSourceUnion) MarshalJSON ¶ added in v0.7.0
func (u TokenTransferSourceUnion) MarshalJSON() ([]byte, error)
func (*TokenTransferSourceUnion) UnmarshalJSON ¶ added in v0.7.0
func (u *TokenTransferSourceUnion) UnmarshalJSON(data []byte) error
type TokenTransferSourceUnionResp ¶ added in v0.7.0
type TokenTransferSourceUnionResp struct {
// This field is from variant [NamedTokenTransferSourceResp].
Asset string `json:"asset"`
Chain string `json:"chain"`
Amount string `json:"amount"`
// This field is from variant [CustomTokenTransferSourceResp].
AssetAddress string `json:"asset_address"`
JSON struct {
Asset respjson.Field
Chain respjson.Field
Amount respjson.Field
AssetAddress respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TokenTransferSourceUnionResp contains all possible properties and values from NamedTokenTransferSourceResp, CustomTokenTransferSourceResp.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (TokenTransferSourceUnionResp) AsCustomTokenTransferSource ¶ added in v0.7.0
func (u TokenTransferSourceUnionResp) AsCustomTokenTransferSource() (v CustomTokenTransferSourceResp)
func (TokenTransferSourceUnionResp) AsNamedTokenTransferSource ¶ added in v0.7.0
func (u TokenTransferSourceUnionResp) AsNamedTokenTransferSource() (v NamedTokenTransferSourceResp)
func (TokenTransferSourceUnionResp) RawJSON ¶ added in v0.7.0
func (u TokenTransferSourceUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TokenTransferSourceUnionResp) ToParam ¶ added in v0.7.0
func (r TokenTransferSourceUnionResp) ToParam() TokenTransferSourceUnion
ToParam converts this TokenTransferSourceUnionResp to a TokenTransferSourceUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TokenTransferSourceUnion.Overrides()
func (*TokenTransferSourceUnionResp) UnmarshalJSON ¶ added in v0.7.0
func (r *TokenTransferSourceUnionResp) UnmarshalJSON(data []byte) error
type TotpMfaMethod ¶
type TotpMfaMethod struct {
// Any of "totp".
Type TotpMfaMethodType `json:"type" api:"required"`
VerifiedAt float64 `json:"verified_at" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A TOTP MFA method.
func (TotpMfaMethod) RawJSON ¶
func (r TotpMfaMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*TotpMfaMethod) UnmarshalJSON ¶
func (r *TotpMfaMethod) UnmarshalJSON(data []byte) error
type TotpMfaMethodType ¶
type TotpMfaMethodType string
const (
TotpMfaMethodTypeTotp TotpMfaMethodType = "totp"
)
type TransactionBroadcastedWebhookPayload ¶ added in v0.7.0
type TransactionBroadcastedWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// The type of webhook event.
//
// Any of "transaction.broadcasted".
Type TransactionBroadcastedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.broadcasted webhook event.
func (TransactionBroadcastedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionBroadcastedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionBroadcastedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionBroadcastedWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionBroadcastedWebhookPayloadType ¶ added in v0.7.0
type TransactionBroadcastedWebhookPayloadType string
The type of webhook event.
const (
TransactionBroadcastedWebhookPayloadTypeTransactionBroadcasted TransactionBroadcastedWebhookPayloadType = "transaction.broadcasted"
)
type TransactionConfirmedWebhookPayload ¶ added in v0.7.0
type TransactionConfirmedWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// The type of webhook event.
//
// Any of "transaction.confirmed".
Type TransactionConfirmedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.confirmed webhook event.
func (TransactionConfirmedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionConfirmedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionConfirmedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionConfirmedWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionConfirmedWebhookPayloadType ¶ added in v0.7.0
type TransactionConfirmedWebhookPayloadType string
The type of webhook event.
const (
TransactionConfirmedWebhookPayloadTypeTransactionConfirmed TransactionConfirmedWebhookPayloadType = "transaction.confirmed"
)
type TransactionExecutionRevertedWebhookPayload ¶ added in v0.7.0
type TransactionExecutionRevertedWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// The type of webhook event.
//
// Any of "transaction.execution_reverted".
Type TransactionExecutionRevertedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.execution_reverted webhook event.
func (TransactionExecutionRevertedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionExecutionRevertedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionExecutionRevertedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionExecutionRevertedWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionExecutionRevertedWebhookPayloadType ¶ added in v0.7.0
type TransactionExecutionRevertedWebhookPayloadType string
The type of webhook event.
const (
TransactionExecutionRevertedWebhookPayloadTypeTransactionExecutionReverted TransactionExecutionRevertedWebhookPayloadType = "transaction.execution_reverted"
)
type TransactionFailedWebhookPayload ¶ added in v0.7.0
type TransactionFailedWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// The type of webhook event.
//
// Any of "transaction.failed".
Type TransactionFailedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.failed webhook event.
func (TransactionFailedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionFailedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionFailedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionFailedWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionFailedWebhookPayloadType ¶ added in v0.7.0
type TransactionFailedWebhookPayloadType string
The type of webhook event.
const (
TransactionFailedWebhookPayloadTypeTransactionFailed TransactionFailedWebhookPayloadType = "transaction.failed"
)
type TransactionProviderErrorWebhookPayload ¶ added in v0.7.0
type TransactionProviderErrorWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// The type of webhook event.
//
// Any of "transaction.provider_error".
Type TransactionProviderErrorWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.provider_error webhook event.
func (TransactionProviderErrorWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionProviderErrorWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionProviderErrorWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionProviderErrorWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionProviderErrorWebhookPayloadType ¶ added in v0.7.0
type TransactionProviderErrorWebhookPayloadType string
The type of webhook event.
const (
TransactionProviderErrorWebhookPayloadTypeTransactionProviderError TransactionProviderErrorWebhookPayloadType = "transaction.provider_error"
)
type TransactionReplacedWebhookPayload ¶ added in v0.7.0
type TransactionReplacedWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// The type of webhook event.
//
// Any of "transaction.replaced".
Type TransactionReplacedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.replaced webhook event.
func (TransactionReplacedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionReplacedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionReplacedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionReplacedWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionReplacedWebhookPayloadType ¶ added in v0.7.0
type TransactionReplacedWebhookPayloadType string
The type of webhook event.
const (
TransactionReplacedWebhookPayloadTypeTransactionReplaced TransactionReplacedWebhookPayloadType = "transaction.replaced"
)
type TransactionService ¶
type TransactionService struct {
Options []option.RequestOption
}
Operations related to transactions
TransactionService contains methods and other services that help with interacting with the Privy API 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 NewTransactionService method instead.
func NewTransactionService ¶
func NewTransactionService(opts ...option.RequestOption) (r TransactionService)
NewTransactionService 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 TransactionStillPendingWebhookPayload ¶ added in v0.7.0
type TransactionStillPendingWebhookPayload struct {
// The CAIP-2 chain identifier (e.g., eip155:4217 for Tempo, eip155:1 for Ethereum
// mainnet).
Caip2 string `json:"caip2" api:"required"`
// The blockchain transaction hash.
TransactionHash string `json:"transaction_hash" api:"required"`
// The Privy-assigned ID for this transaction.
TransactionID string `json:"transaction_id" api:"required"`
// An unsigned standard Ethereum transaction object. Supports EVM transaction types
// 0, 1, 2, and 4.
TransactionRequest UnsignedStandardEthereumTransactionResp `json:"transaction_request" api:"required"`
// The type of webhook event.
//
// Any of "transaction.still_pending".
Type TransactionStillPendingWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet that initiated the transaction.
WalletID string `json:"wallet_id" api:"required"`
// Developer-provided reference ID for transaction reconciliation, if one was
// provided.
ReferenceID string `json:"reference_id" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
TransactionRequest respjson.Field
Type respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the transaction.still_pending webhook event.
func (TransactionStillPendingWebhookPayload) RawJSON ¶ added in v0.7.0
func (r TransactionStillPendingWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionStillPendingWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *TransactionStillPendingWebhookPayload) UnmarshalJSON(data []byte) error
type TransactionStillPendingWebhookPayloadType ¶ added in v0.7.0
type TransactionStillPendingWebhookPayloadType string
The type of webhook event.
const (
TransactionStillPendingWebhookPayloadTypeTransactionStillPending TransactionStillPendingWebhookPayloadType = "transaction.still_pending"
)
type TransferActionResponse ¶ added in v0.6.0
type TransferActionResponse struct {
// The ID of the wallet action.
ID string `json:"id" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Recipient address.
DestinationAddress string `json:"destination_address" api:"required"`
// Amount received on the destination chain. For exact_output cross-chain
// transfers, set at creation (the guaranteed exact amount). For exact_input
// cross-chain transfers, null until fill confirmation.
DestinationAmount string `json:"destination_amount" api:"required"`
// Chain name (e.g. "tempo", "base").
SourceChain string `json:"source_chain" api:"required"`
// Status of a wallet action.
//
// Any of "pending", "succeeded", "rejected", "failed".
Status WalletActionStatus `json:"status" api:"required"`
// Any of "transfer".
Type TransferActionResponseType `json:"type" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Whether the amount refers to the input token or output token.
//
// Any of "exact_input", "exact_output".
AmountType AmountType `json:"amount_type"`
// Destination asset for cross-asset transfers. Omitted for same-asset transfers.
DestinationAsset string `json:"destination_asset"`
// Destination chain for cross-chain transfers. Omitted for same-chain transfers.
DestinationChain string `json:"destination_chain"`
// Estimated fee breakdown from the provider quote. Only present for cross-chain or
// cross-asset transfers. Populated after on-chain confirmation.
EstimatedFees []FeeLineItemUnion `json:"estimated_fees" api:"nullable"`
// Gas cost for a blockchain action. Includes both raw base-unit amount and a
// human-readable decimal string, plus the gas token symbol.
EstimatedGas Gas `json:"estimated_gas" api:"nullable"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// Actual fees paid for the transfer. Populated after on-chain confirmation. Only
// present for cross-chain transfers.
Fees []FeeLineItemUnion `json:"fees" api:"nullable"`
// Gas cost for a blockchain action. Includes both raw base-unit amount and a
// human-readable decimal string, plus the gas token symbol.
Gas Gas `json:"gas" api:"nullable"`
// Decimal amount sent on the source chain (e.g. "1.5"). For exact_output
// cross-chain transfers, null until fill confirmation.
SourceAmount string `json:"source_amount"`
// Asset identifier (e.g. "usdc", "eth"). Present when the transfer was initiated
// with a named asset; omitted for custom-token transfers.
SourceAsset string `json:"source_asset"`
// Token contract address (EVM) or mint address (Solana). Present when the transfer
// was initiated with `asset_address`.
SourceAssetAddress string `json:"source_asset_address"`
// Number of decimals for the transferred token. Present when the transfer was
// initiated with `asset_address` and the decimals were resolved on-chain.
SourceAssetDecimals int64 `json:"source_asset_decimals"`
// The steps of the wallet action. Only returned if `?include=steps` is provided.
Steps []WalletActionStepUnion `json:"steps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DestinationAddress respjson.Field
DestinationAmount respjson.Field
SourceChain respjson.Field
Status respjson.Field
Type respjson.Field
WalletID respjson.Field
AmountType respjson.Field
DestinationAsset respjson.Field
DestinationChain respjson.Field
EstimatedFees respjson.Field
EstimatedGas respjson.Field
FailureReason respjson.Field
Fees respjson.Field
Gas respjson.Field
SourceAmount respjson.Field
SourceAsset respjson.Field
SourceAssetAddress respjson.Field
SourceAssetDecimals respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response for a transfer action.
func (TransferActionResponse) RawJSON ¶ added in v0.6.0
func (r TransferActionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransferActionResponse) UnmarshalJSON ¶ added in v0.6.0
func (r *TransferActionResponse) UnmarshalJSON(data []byte) error
type TransferActionResponseType ¶ added in v0.6.0
type TransferActionResponseType string
const (
TransferActionResponseTypeTransfer TransferActionResponseType = "transfer"
)
type TransferIntentResponse ¶ added in v0.5.0
type TransferIntentResponse struct {
// Any of "TRANSFER".
IntentType string `json:"intent_type" api:"required"`
// The original transfer request that would be sent to the wallet transfer endpoint
RequestDetails TransferIntentResponseRequestDetails `json:"request_details" api:"required"`
// Result of transfer execution (only present if intent status is 'executed' or
// 'failed')
ActionResult BaseActionResult `json:"action_result"`
// A wallet managed by Privy's wallet infrastructure.
CurrentResourceData Wallet `json:"current_resource_data"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IntentType respjson.Field
RequestDetails respjson.Field
ActionResult respjson.Field
CurrentResourceData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
BaseIntentResponse
}
Response for a transfer intent
func (TransferIntentResponse) RawJSON ¶ added in v0.5.0
func (r TransferIntentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransferIntentResponse) UnmarshalJSON ¶ added in v0.5.0
func (r *TransferIntentResponse) UnmarshalJSON(data []byte) error
type TransferIntentResponseRequestDetails ¶ added in v0.5.0
type TransferIntentResponseRequestDetails struct {
// Request body for initiating a sponsored token transfer from an embedded wallet.
Body TransferRequestBodyResp `json:"body" api:"required"`
// Any of "POST".
Method string `json:"method" api:"required"`
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Body respjson.Field
Method respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The original transfer request that would be sent to the wallet transfer endpoint
func (TransferIntentResponseRequestDetails) RawJSON ¶ added in v0.5.0
func (r TransferIntentResponseRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransferIntentResponseRequestDetails) UnmarshalJSON ¶ added in v0.5.0
func (r *TransferIntentResponseRequestDetails) UnmarshalJSON(data []byte) error
type TransferRequestBody ¶ added in v0.6.0
type TransferRequestBody struct {
// The destination address for a token transfer. Optionally specify a different
// asset or chain for cross-asset or cross-chain transfers.
Destination TokenTransferDestination `json:"destination,omitzero" api:"required"`
// The source asset, amount, and chain for a token transfer. Specify either `asset`
// (named) or `asset_address` (custom), not both.
Source TokenTransferSourceUnion `json:"source,omitzero" api:"required"`
// Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
// USDC). For exact_input, the amount to send. For exact_output, the exact amount
// to receive. Takes precedence over source.amount when both are provided.
Amount param.Opt[string] `json:"amount,omitzero"`
// Maximum allowed slippage in basis points (1 bps = 0.01%). Only applicable for
// cross-chain or cross-asset transfers; omit to use the provider default.
SlippageBps param.Opt[int64] `json:"slippage_bps,omitzero"`
// Whether the amount refers to the input token or output token.
//
// Any of "exact_input", "exact_output".
AmountType AmountType `json:"amount_type,omitzero"`
// Total fees assessed on a transfer, in BPS
FeeConfiguration FeeConfiguration `json:"fee_configuration,omitzero"`
// contains filtered or unexported fields
}
Request body for initiating a sponsored token transfer from an embedded wallet.
The properties Destination, Source are required.
func (TransferRequestBody) MarshalJSON ¶ added in v0.6.0
func (r TransferRequestBody) MarshalJSON() (data []byte, err error)
func (*TransferRequestBody) UnmarshalJSON ¶ added in v0.6.0
func (r *TransferRequestBody) UnmarshalJSON(data []byte) error
type TransferRequestBodyResp ¶ added in v0.6.0
type TransferRequestBodyResp struct {
// The destination address for a token transfer. Optionally specify a different
// asset or chain for cross-asset or cross-chain transfers.
Destination TokenTransferDestinationResp `json:"destination" api:"required"`
// The source asset, amount, and chain for a token transfer. Specify either `asset`
// (named) or `asset_address` (custom), not both.
Source TokenTransferSourceUnionResp `json:"source" api:"required"`
// Amount as a decimal string in the token's standard unit (e.g. "1.5" for 1.5
// USDC). For exact_input, the amount to send. For exact_output, the exact amount
// to receive. Takes precedence over source.amount when both are provided.
Amount string `json:"amount"`
// Whether the amount refers to the input token or output token.
//
// Any of "exact_input", "exact_output".
AmountType AmountType `json:"amount_type"`
// Total fees assessed on a transfer, in BPS
FeeConfiguration FeeConfigurationResp `json:"fee_configuration"`
// Maximum allowed slippage in basis points (1 bps = 0.01%). Only applicable for
// cross-chain or cross-asset transfers; omit to use the provider default.
SlippageBps int64 `json:"slippage_bps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Destination respjson.Field
Source respjson.Field
Amount respjson.Field
AmountType respjson.Field
FeeConfiguration respjson.Field
SlippageBps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request body for initiating a sponsored token transfer from an embedded wallet.
func (TransferRequestBodyResp) RawJSON ¶ added in v0.6.0
func (r TransferRequestBodyResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TransferRequestBodyResp) ToParam ¶ added in v0.6.0
func (r TransferRequestBodyResp) ToParam() TransferRequestBody
ToParam converts this TransferRequestBodyResp to a TransferRequestBody.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TransferRequestBody.Overrides()
func (*TransferRequestBodyResp) UnmarshalJSON ¶ added in v0.6.0
func (r *TransferRequestBodyResp) UnmarshalJSON(data []byte) error
type TronCalldataCondition ¶ added in v0.4.0
type TronCalldataCondition struct {
// A Solidity ABI definition for decoding smart contract calldata.
Abi AbiSchema `json:"abi,omitzero" api:"required"`
Field string `json:"field" api:"required"`
// Any of "tron_trigger_smart_contract_data".
FieldSource TronCalldataConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
Decoded calldata from a TRON TriggerSmartContract interaction.
The properties Abi, Field, FieldSource, Operator, Value are required.
func (TronCalldataCondition) MarshalJSON ¶ added in v0.6.0
func (r TronCalldataCondition) MarshalJSON() (data []byte, err error)
func (*TronCalldataCondition) UnmarshalJSON ¶ added in v0.4.0
func (r *TronCalldataCondition) UnmarshalJSON(data []byte) error
type TronCalldataConditionFieldSource ¶ added in v0.4.0
type TronCalldataConditionFieldSource string
const (
TronCalldataConditionFieldSourceTronTriggerSmartContractData TronCalldataConditionFieldSource = "tron_trigger_smart_contract_data"
)
type TronCalldataConditionResp ¶ added in v0.6.0
type TronCalldataConditionResp struct {
// A Solidity ABI definition for decoding smart contract calldata.
Abi AbiSchemaResp `json:"abi" api:"required"`
Field string `json:"field" api:"required"`
// Any of "tron_trigger_smart_contract_data".
FieldSource TronCalldataConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Abi respjson.Field
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Decoded calldata from a TRON TriggerSmartContract interaction.
func (TronCalldataConditionResp) RawJSON ¶ added in v0.6.0
func (r TronCalldataConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronCalldataConditionResp) ToParam ¶ added in v0.6.0
func (r TronCalldataConditionResp) ToParam() TronCalldataCondition
ToParam converts this TronCalldataConditionResp to a TronCalldataCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronCalldataCondition.Overrides()
func (*TronCalldataConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *TronCalldataConditionResp) UnmarshalJSON(data []byte) error
type TronContractUnion ¶ added in v0.11.0
type TronContractUnion struct {
OfTransferContract *TronTransferContract `json:",omitzero,inline"`
OfTriggerSmartContract *TronTriggerSmartContract `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func TronContractOfTriggerSmartContract ¶ added in v0.11.0
func TronContractOfTriggerSmartContract(contractAddress TronHexAddress, ownerAddress TronHexAddress, type_ TronTriggerSmartContractType) TronContractUnion
func (TronContractUnion) MarshalJSON ¶ added in v0.11.0
func (u TronContractUnion) MarshalJSON() ([]byte, error)
func (*TronContractUnion) UnmarshalJSON ¶ added in v0.11.0
func (u *TronContractUnion) UnmarshalJSON(data []byte) error
type TronContractUnionResp ¶ added in v0.11.0
type TronContractUnionResp struct {
// This field is from variant [TronTransferContractResp].
Amount int64 `json:"amount"`
// This field is from variant [TronTransferContractResp].
OwnerAddress TronHexAddress `json:"owner_address"`
// This field is from variant [TronTransferContractResp].
ToAddress TronHexAddress `json:"to_address"`
// Any of "TransferContract", "TriggerSmartContract".
Type string `json:"type"`
// This field is from variant [TronTriggerSmartContractResp].
ContractAddress TronHexAddress `json:"contract_address"`
// This field is from variant [TronTriggerSmartContractResp].
CallTokenValue int64 `json:"call_token_value"`
// This field is from variant [TronTriggerSmartContractResp].
CallValue int64 `json:"call_value"`
// This field is from variant [TronTriggerSmartContractResp].
Data string `json:"data"`
// This field is from variant [TronTriggerSmartContractResp].
TokenID int64 `json:"token_id"`
JSON struct {
Amount respjson.Field
OwnerAddress respjson.Field
ToAddress respjson.Field
Type respjson.Field
ContractAddress respjson.Field
CallTokenValue respjson.Field
CallValue respjson.Field
Data respjson.Field
TokenID respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TronContractUnionResp contains all possible properties and values from TronTransferContractResp, TronTriggerSmartContractResp.
Use the TronContractUnionResp.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (TronContractUnionResp) AsAny ¶ added in v0.11.0
func (u TronContractUnionResp) AsAny() anyTronContractResp
Use the following switch statement to find the correct variant
switch variant := TronContractUnionResp.AsAny().(type) {
case privyclient.TronTransferContractResp:
case privyclient.TronTriggerSmartContractResp:
default:
fmt.Errorf("no variant present")
}
func (TronContractUnionResp) AsTransferContract ¶ added in v0.11.0
func (u TronContractUnionResp) AsTransferContract() (v TronTransferContractResp)
func (TronContractUnionResp) AsTriggerSmartContract ¶ added in v0.11.0
func (u TronContractUnionResp) AsTriggerSmartContract() (v TronTriggerSmartContractResp)
func (TronContractUnionResp) RawJSON ¶ added in v0.11.0
func (u TronContractUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronContractUnionResp) ToParam ¶ added in v0.11.0
func (r TronContractUnionResp) ToParam() TronContractUnion
ToParam converts this TronContractUnionResp to a TronContractUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronContractUnion.Overrides()
func (*TronContractUnionResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronContractUnionResp) UnmarshalJSON(data []byte) error
type TronHexAddress ¶ added in v0.11.0
type TronHexAddress = string
type TronRawDataForSend ¶ added in v0.11.0
type TronRawDataForSend struct {
Contract []TronContractUnion `json:"contract,omitzero" api:"required"`
Data param.Opt[string] `json:"data,omitzero"`
Expiration param.Opt[int64] `json:"expiration,omitzero"`
FeeLimit param.Opt[int64] `json:"fee_limit,omitzero"`
RefBlockBytes param.Opt[string] `json:"ref_block_bytes,omitzero"`
RefBlockHash param.Opt[string] `json:"ref_block_hash,omitzero"`
Timestamp param.Opt[int64] `json:"timestamp,omitzero"`
// contains filtered or unexported fields
}
Tron raw_data for tron_sendTransaction. Block reference fields are optional; Privy fetches fresh values if omitted.
The property Contract is required.
func (TronRawDataForSend) MarshalJSON ¶ added in v0.11.0
func (r TronRawDataForSend) MarshalJSON() (data []byte, err error)
func (*TronRawDataForSend) UnmarshalJSON ¶ added in v0.11.0
func (r *TronRawDataForSend) UnmarshalJSON(data []byte) error
type TronRawDataForSendResp ¶ added in v0.11.0
type TronRawDataForSendResp struct {
Contract []TronContractUnionResp `json:"contract" api:"required"`
Data string `json:"data"`
Expiration int64 `json:"expiration"`
FeeLimit int64 `json:"fee_limit"`
RefBlockBytes string `json:"ref_block_bytes"`
RefBlockHash string `json:"ref_block_hash"`
Timestamp int64 `json:"timestamp"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Contract respjson.Field
Data respjson.Field
Expiration respjson.Field
FeeLimit respjson.Field
RefBlockBytes respjson.Field
RefBlockHash respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Tron raw_data for tron_sendTransaction. Block reference fields are optional; Privy fetches fresh values if omitted.
func (TronRawDataForSendResp) RawJSON ¶ added in v0.11.0
func (r TronRawDataForSendResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronRawDataForSendResp) ToParam ¶ added in v0.11.0
func (r TronRawDataForSendResp) ToParam() TronRawDataForSend
ToParam converts this TronRawDataForSendResp to a TronRawDataForSend.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronRawDataForSend.Overrides()
func (*TronRawDataForSendResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronRawDataForSendResp) UnmarshalJSON(data []byte) error
type TronRawDataForSign ¶ added in v0.11.0
type TronRawDataForSign struct {
Contract []TronContractUnion `json:"contract,omitzero" api:"required"`
Expiration int64 `json:"expiration" api:"required"`
RefBlockBytes string `json:"ref_block_bytes" api:"required"`
RefBlockHash string `json:"ref_block_hash" api:"required"`
Data param.Opt[string] `json:"data,omitzero"`
FeeLimit param.Opt[int64] `json:"fee_limit,omitzero"`
Timestamp param.Opt[int64] `json:"timestamp,omitzero"`
// contains filtered or unexported fields
}
Tron raw_data for tron_signTransaction. Block reference fields are required; caller is responsible for fetching them.
The properties Contract, Expiration, RefBlockBytes, RefBlockHash are required.
func (TronRawDataForSign) MarshalJSON ¶ added in v0.11.0
func (r TronRawDataForSign) MarshalJSON() (data []byte, err error)
func (*TronRawDataForSign) UnmarshalJSON ¶ added in v0.11.0
func (r *TronRawDataForSign) UnmarshalJSON(data []byte) error
type TronRawDataForSignResp ¶ added in v0.11.0
type TronRawDataForSignResp struct {
Contract []TronContractUnionResp `json:"contract" api:"required"`
Expiration int64 `json:"expiration" api:"required"`
RefBlockBytes string `json:"ref_block_bytes" api:"required"`
RefBlockHash string `json:"ref_block_hash" api:"required"`
Data string `json:"data"`
FeeLimit int64 `json:"fee_limit"`
Timestamp int64 `json:"timestamp"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Contract respjson.Field
Expiration respjson.Field
RefBlockBytes respjson.Field
RefBlockHash respjson.Field
Data respjson.Field
FeeLimit respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Tron raw_data for tron_signTransaction. Block reference fields are required; caller is responsible for fetching them.
func (TronRawDataForSignResp) RawJSON ¶ added in v0.11.0
func (r TronRawDataForSignResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronRawDataForSignResp) ToParam ¶ added in v0.11.0
func (r TronRawDataForSignResp) ToParam() TronRawDataForSign
ToParam converts this TronRawDataForSignResp to a TronRawDataForSign.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronRawDataForSign.Overrides()
func (*TronRawDataForSignResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronRawDataForSignResp) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcInput ¶ added in v0.11.0
type TronSendTransactionRpcInput struct {
// Any of "tron_sendTransaction".
Method TronSendTransactionRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Tron `tron_sendTransaction` RPC.
Params TronSendTransactionRpcInputParams `json:"params,omitzero" api:"required"`
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 param.Opt[Caip2] `json:"caip2,omitzero"`
// contains filtered or unexported fields
}
Executes the Tron `tron_sendTransaction` RPC to sign and broadcast a transaction.
The properties Method, Params are required.
func (TronSendTransactionRpcInput) MarshalJSON ¶ added in v0.11.0
func (r TronSendTransactionRpcInput) MarshalJSON() (data []byte, err error)
func (*TronSendTransactionRpcInput) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSendTransactionRpcInput) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcInputMethod ¶ added in v0.11.0
type TronSendTransactionRpcInputMethod string
const (
TronSendTransactionRpcInputMethodTronSendTransaction TronSendTransactionRpcInputMethod = "tron_sendTransaction"
)
type TronSendTransactionRpcInputParams ¶ added in v0.11.0
type TronSendTransactionRpcInputParams struct {
// Tron raw_data for tron_sendTransaction. Block reference fields are optional;
// Privy fetches fresh values if omitted.
RawData TronRawDataForSend `json:"raw_data,omitzero" api:"required"`
ReferenceID param.Opt[string] `json:"reference_id,omitzero"`
// contains filtered or unexported fields
}
Parameters for the Tron `tron_sendTransaction` RPC.
The property RawData is required.
func (TronSendTransactionRpcInputParams) MarshalJSON ¶ added in v0.11.0
func (r TronSendTransactionRpcInputParams) MarshalJSON() (data []byte, err error)
func (*TronSendTransactionRpcInputParams) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSendTransactionRpcInputParams) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcInputParamsResp ¶ added in v0.11.0
type TronSendTransactionRpcInputParamsResp struct {
// Tron raw_data for tron_sendTransaction. Block reference fields are optional;
// Privy fetches fresh values if omitted.
RawData TronRawDataForSendResp `json:"raw_data" api:"required"`
ReferenceID string `json:"reference_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RawData respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Tron `tron_sendTransaction` RPC.
func (TronSendTransactionRpcInputParamsResp) RawJSON ¶ added in v0.11.0
func (r TronSendTransactionRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronSendTransactionRpcInputParamsResp) ToParam ¶ added in v0.11.0
func (r TronSendTransactionRpcInputParamsResp) ToParam() TronSendTransactionRpcInputParams
ToParam converts this TronSendTransactionRpcInputParamsResp to a TronSendTransactionRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronSendTransactionRpcInputParams.Overrides()
func (*TronSendTransactionRpcInputParamsResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSendTransactionRpcInputParamsResp) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcInputResp ¶ added in v0.11.0
type TronSendTransactionRpcInputResp struct {
// Any of "tron_sendTransaction".
Method TronSendTransactionRpcInputMethod `json:"method" api:"required"`
// Parameters for the Tron `tron_sendTransaction` RPC.
Params TronSendTransactionRpcInputParamsResp `json:"params" api:"required"`
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
Caip2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the Tron `tron_sendTransaction` RPC to sign and broadcast a transaction.
func (TronSendTransactionRpcInputResp) RawJSON ¶ added in v0.11.0
func (r TronSendTransactionRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronSendTransactionRpcInputResp) ToParam ¶ added in v0.11.0
func (r TronSendTransactionRpcInputResp) ToParam() TronSendTransactionRpcInput
ToParam converts this TronSendTransactionRpcInputResp to a TronSendTransactionRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronSendTransactionRpcInput.Overrides()
func (*TronSendTransactionRpcInputResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSendTransactionRpcInputResp) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcResponse ¶ added in v0.11.0
type TronSendTransactionRpcResponse struct {
// Data returned by the Tron `tron_sendTransaction` RPC.
Data TronSendTransactionRpcResponseData `json:"data" api:"required"`
// Any of "tron_sendTransaction".
Method TronSendTransactionRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Tron `tron_sendTransaction` RPC.
func (TronSendTransactionRpcResponse) RawJSON ¶ added in v0.11.0
func (r TronSendTransactionRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TronSendTransactionRpcResponse) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSendTransactionRpcResponse) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcResponseData ¶ added in v0.11.0
type TronSendTransactionRpcResponseData struct {
// A valid CAIP-2 chain ID (e.g. 'eip155:4217' for Tempo, 'eip155:1' for Ethereum).
Caip2 Caip2 `json:"caip2" api:"required"`
Hash string `json:"hash" api:"required"`
TransactionID string `json:"transaction_id" api:"required"`
ReferenceID string `json:"reference_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Hash respjson.Field
TransactionID respjson.Field
ReferenceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Tron `tron_sendTransaction` RPC.
func (TronSendTransactionRpcResponseData) RawJSON ¶ added in v0.11.0
func (r TronSendTransactionRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*TronSendTransactionRpcResponseData) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSendTransactionRpcResponseData) UnmarshalJSON(data []byte) error
type TronSendTransactionRpcResponseMethod ¶ added in v0.11.0
type TronSendTransactionRpcResponseMethod string
const (
TronSendTransactionRpcResponseMethodTronSendTransaction TronSendTransactionRpcResponseMethod = "tron_sendTransaction"
)
type TronSignTransactionRpcInput ¶ added in v0.11.0
type TronSignTransactionRpcInput struct {
// Any of "tron_signTransaction".
Method TronSignTransactionRpcInputMethod `json:"method,omitzero" api:"required"`
// Parameters for the Tron `tron_signTransaction` RPC.
Params TronSignTransactionRpcInputParams `json:"params,omitzero" api:"required"`
// contains filtered or unexported fields
}
Executes the Tron `tron_signTransaction` RPC to sign a transaction. The caller is responsible for broadcasting.
The properties Method, Params are required.
func (TronSignTransactionRpcInput) MarshalJSON ¶ added in v0.11.0
func (r TronSignTransactionRpcInput) MarshalJSON() (data []byte, err error)
func (*TronSignTransactionRpcInput) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSignTransactionRpcInput) UnmarshalJSON(data []byte) error
type TronSignTransactionRpcInputMethod ¶ added in v0.11.0
type TronSignTransactionRpcInputMethod string
const (
TronSignTransactionRpcInputMethodTronSignTransaction TronSignTransactionRpcInputMethod = "tron_signTransaction"
)
type TronSignTransactionRpcInputParams ¶ added in v0.11.0
type TronSignTransactionRpcInputParams struct {
// Tron raw_data for tron_signTransaction. Block reference fields are required;
// caller is responsible for fetching them.
RawData TronRawDataForSign `json:"raw_data,omitzero" api:"required"`
// contains filtered or unexported fields
}
Parameters for the Tron `tron_signTransaction` RPC.
The property RawData is required.
func (TronSignTransactionRpcInputParams) MarshalJSON ¶ added in v0.11.0
func (r TronSignTransactionRpcInputParams) MarshalJSON() (data []byte, err error)
func (*TronSignTransactionRpcInputParams) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSignTransactionRpcInputParams) UnmarshalJSON(data []byte) error
type TronSignTransactionRpcInputParamsResp ¶ added in v0.11.0
type TronSignTransactionRpcInputParamsResp struct {
// Tron raw_data for tron_signTransaction. Block reference fields are required;
// caller is responsible for fetching them.
RawData TronRawDataForSignResp `json:"raw_data" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RawData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parameters for the Tron `tron_signTransaction` RPC.
func (TronSignTransactionRpcInputParamsResp) RawJSON ¶ added in v0.11.0
func (r TronSignTransactionRpcInputParamsResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronSignTransactionRpcInputParamsResp) ToParam ¶ added in v0.11.0
func (r TronSignTransactionRpcInputParamsResp) ToParam() TronSignTransactionRpcInputParams
ToParam converts this TronSignTransactionRpcInputParamsResp to a TronSignTransactionRpcInputParams.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronSignTransactionRpcInputParams.Overrides()
func (*TronSignTransactionRpcInputParamsResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSignTransactionRpcInputParamsResp) UnmarshalJSON(data []byte) error
type TronSignTransactionRpcInputResp ¶ added in v0.11.0
type TronSignTransactionRpcInputResp struct {
// Any of "tron_signTransaction".
Method TronSignTransactionRpcInputMethod `json:"method" api:"required"`
// Parameters for the Tron `tron_signTransaction` RPC.
Params TronSignTransactionRpcInputParamsResp `json:"params" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Method respjson.Field
Params respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Executes the Tron `tron_signTransaction` RPC to sign a transaction. The caller is responsible for broadcasting.
func (TronSignTransactionRpcInputResp) RawJSON ¶ added in v0.11.0
func (r TronSignTransactionRpcInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronSignTransactionRpcInputResp) ToParam ¶ added in v0.11.0
func (r TronSignTransactionRpcInputResp) ToParam() TronSignTransactionRpcInput
ToParam converts this TronSignTransactionRpcInputResp to a TronSignTransactionRpcInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronSignTransactionRpcInput.Overrides()
func (*TronSignTransactionRpcInputResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSignTransactionRpcInputResp) UnmarshalJSON(data []byte) error
type TronSignTransactionRpcResponse ¶ added in v0.11.0
type TronSignTransactionRpcResponse struct {
// Data returned by the Tron `tron_signTransaction` RPC.
Data TronSignTransactionRpcResponseData `json:"data" api:"required"`
// Any of "tron_signTransaction".
Method TronSignTransactionRpcResponseMethod `json:"method" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Method respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response to the Tron `tron_signTransaction` RPC.
func (TronSignTransactionRpcResponse) RawJSON ¶ added in v0.11.0
func (r TronSignTransactionRpcResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TronSignTransactionRpcResponse) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSignTransactionRpcResponse) UnmarshalJSON(data []byte) error
type TronSignTransactionRpcResponseData ¶ added in v0.11.0
type TronSignTransactionRpcResponseData struct {
// Any of "hex".
Encoding TronSignTransactionRpcResponseDataEncoding `json:"encoding" api:"required"`
SignedTransaction string `json:"signed_transaction" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Encoding respjson.Field
SignedTransaction respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Data returned by the Tron `tron_signTransaction` RPC.
func (TronSignTransactionRpcResponseData) RawJSON ¶ added in v0.11.0
func (r TronSignTransactionRpcResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*TronSignTransactionRpcResponseData) UnmarshalJSON ¶ added in v0.11.0
func (r *TronSignTransactionRpcResponseData) UnmarshalJSON(data []byte) error
type TronSignTransactionRpcResponseDataEncoding ¶ added in v0.11.0
type TronSignTransactionRpcResponseDataEncoding string
const (
TronSignTransactionRpcResponseDataEncodingHex TronSignTransactionRpcResponseDataEncoding = "hex"
)
type TronSignTransactionRpcResponseMethod ¶ added in v0.11.0
type TronSignTransactionRpcResponseMethod string
const (
TronSignTransactionRpcResponseMethodTronSignTransaction TronSignTransactionRpcResponseMethod = "tron_signTransaction"
)
type TronTransactionCondition ¶
type TronTransactionCondition struct {
// Supported TRON transaction fields for TransferContract and TriggerSmartContract
// in format "TransactionType.field_name".
//
// Any of "TransferContract.to_address", "TransferContract.amount",
// "TriggerSmartContract.contract_address", "TriggerSmartContract.call_value",
// "TriggerSmartContract.token_id", "TriggerSmartContract.call_token_value".
Field TronTransactionConditionField `json:"field,omitzero" api:"required"`
// Any of "tron_transaction".
FieldSource TronTransactionConditionFieldSource `json:"field_source,omitzero" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator,omitzero" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnion `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
TRON transaction fields for TransferContract and TriggerSmartContract transaction types.
The properties Field, FieldSource, Operator, Value are required.
func (TronTransactionCondition) MarshalJSON ¶ added in v0.6.0
func (r TronTransactionCondition) MarshalJSON() (data []byte, err error)
func (*TronTransactionCondition) UnmarshalJSON ¶
func (r *TronTransactionCondition) UnmarshalJSON(data []byte) error
type TronTransactionConditionField ¶
type TronTransactionConditionField string
Supported TRON transaction fields for TransferContract and TriggerSmartContract in format "TransactionType.field_name".
const ( TronTransactionConditionFieldTransferContractToAddress TronTransactionConditionField = "TransferContract.to_address" TronTransactionConditionFieldTransferContractAmount TronTransactionConditionField = "TransferContract.amount" TronTransactionConditionFieldTriggerSmartContractContractAddress TronTransactionConditionField = "TriggerSmartContract.contract_address" TronTransactionConditionFieldTriggerSmartContractCallValue TronTransactionConditionField = "TriggerSmartContract.call_value" TronTransactionConditionFieldTriggerSmartContractTokenID TronTransactionConditionField = "TriggerSmartContract.token_id" TronTransactionConditionFieldTriggerSmartContractCallTokenValue TronTransactionConditionField = "TriggerSmartContract.call_token_value" )
type TronTransactionConditionFieldSource ¶
type TronTransactionConditionFieldSource string
const (
TronTransactionConditionFieldSourceTronTransaction TronTransactionConditionFieldSource = "tron_transaction"
)
type TronTransactionConditionResp ¶ added in v0.6.0
type TronTransactionConditionResp struct {
// Supported TRON transaction fields for TransferContract and TriggerSmartContract
// in format "TransactionType.field_name".
//
// Any of "TransferContract.to_address", "TransferContract.amount",
// "TriggerSmartContract.contract_address", "TriggerSmartContract.call_value",
// "TriggerSmartContract.token_id", "TriggerSmartContract.call_token_value".
Field TronTransactionConditionField `json:"field" api:"required"`
// Any of "tron_transaction".
FieldSource TronTransactionConditionFieldSource `json:"field_source" api:"required"`
// Operator to use for policy conditions.
//
// Any of "eq", "gt", "gte", "lt", "lte", "in", "in_condition_set", "contains",
// "starts_with", "ends_with".
Operator ConditionOperator `json:"operator" api:"required"`
// Value to compare against in a policy condition. Can be a single string or an
// array of strings.
Value ConditionValueUnionResp `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
FieldSource respjson.Field
Operator respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
TRON transaction fields for TransferContract and TriggerSmartContract transaction types.
func (TronTransactionConditionResp) RawJSON ¶ added in v0.6.0
func (r TronTransactionConditionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronTransactionConditionResp) ToParam ¶ added in v0.6.0
func (r TronTransactionConditionResp) ToParam() TronTransactionCondition
ToParam converts this TronTransactionConditionResp to a TronTransactionCondition.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronTransactionCondition.Overrides()
func (*TronTransactionConditionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *TronTransactionConditionResp) UnmarshalJSON(data []byte) error
type TronTransferContract ¶ added in v0.11.0
type TronTransferContract struct {
Amount int64 `json:"amount" api:"required"`
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
OwnerAddress TronHexAddress `json:"owner_address" api:"required"`
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
ToAddress TronHexAddress `json:"to_address" api:"required"`
// Any of "TransferContract".
Type TronTransferContractType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Tron native TRX transfer contract.
The properties Amount, OwnerAddress, ToAddress, Type are required.
func (TronTransferContract) MarshalJSON ¶ added in v0.11.0
func (r TronTransferContract) MarshalJSON() (data []byte, err error)
func (*TronTransferContract) UnmarshalJSON ¶ added in v0.11.0
func (r *TronTransferContract) UnmarshalJSON(data []byte) error
type TronTransferContractResp ¶ added in v0.11.0
type TronTransferContractResp struct {
Amount int64 `json:"amount" api:"required"`
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
OwnerAddress TronHexAddress `json:"owner_address" api:"required"`
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
ToAddress TronHexAddress `json:"to_address" api:"required"`
// Any of "TransferContract".
Type TronTransferContractType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
OwnerAddress respjson.Field
ToAddress respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Tron native TRX transfer contract.
func (TronTransferContractResp) RawJSON ¶ added in v0.11.0
func (r TronTransferContractResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronTransferContractResp) ToParam ¶ added in v0.11.0
func (r TronTransferContractResp) ToParam() TronTransferContract
ToParam converts this TronTransferContractResp to a TronTransferContract.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronTransferContract.Overrides()
func (*TronTransferContractResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronTransferContractResp) UnmarshalJSON(data []byte) error
type TronTransferContractType ¶ added in v0.11.0
type TronTransferContractType string
const (
TronTransferContractTypeTransferContract TronTransferContractType = "TransferContract"
)
type TronTriggerSmartContract ¶ added in v0.11.0
type TronTriggerSmartContract struct {
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
ContractAddress TronHexAddress `json:"contract_address" api:"required"`
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
OwnerAddress TronHexAddress `json:"owner_address" api:"required"`
// Any of "TriggerSmartContract".
Type TronTriggerSmartContractType `json:"type,omitzero" api:"required"`
CallTokenValue param.Opt[int64] `json:"call_token_value,omitzero"`
CallValue param.Opt[int64] `json:"call_value,omitzero"`
Data param.Opt[string] `json:"data,omitzero"`
TokenID param.Opt[int64] `json:"token_id,omitzero"`
// contains filtered or unexported fields
}
Tron smart contract call (TRC-20 transfers and general contract interactions).
The properties ContractAddress, OwnerAddress, Type are required.
func (TronTriggerSmartContract) MarshalJSON ¶ added in v0.11.0
func (r TronTriggerSmartContract) MarshalJSON() (data []byte, err error)
func (*TronTriggerSmartContract) UnmarshalJSON ¶ added in v0.11.0
func (r *TronTriggerSmartContract) UnmarshalJSON(data []byte) error
type TronTriggerSmartContractResp ¶ added in v0.11.0
type TronTriggerSmartContractResp struct {
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
ContractAddress TronHexAddress `json:"contract_address" api:"required"`
// Tron address in hex format: 41-prefixed, 42 hex characters (21 bytes), no 0x
// prefix.
OwnerAddress TronHexAddress `json:"owner_address" api:"required"`
// Any of "TriggerSmartContract".
Type TronTriggerSmartContractType `json:"type" api:"required"`
CallTokenValue int64 `json:"call_token_value"`
CallValue int64 `json:"call_value"`
Data string `json:"data"`
TokenID int64 `json:"token_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ContractAddress respjson.Field
OwnerAddress respjson.Field
Type respjson.Field
CallTokenValue respjson.Field
CallValue respjson.Field
Data respjson.Field
TokenID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Tron smart contract call (TRC-20 transfers and general contract interactions).
func (TronTriggerSmartContractResp) RawJSON ¶ added in v0.11.0
func (r TronTriggerSmartContractResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TronTriggerSmartContractResp) ToParam ¶ added in v0.11.0
func (r TronTriggerSmartContractResp) ToParam() TronTriggerSmartContract
ToParam converts this TronTriggerSmartContractResp to a TronTriggerSmartContract.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TronTriggerSmartContract.Overrides()
func (*TronTriggerSmartContractResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TronTriggerSmartContractResp) UnmarshalJSON(data []byte) error
type TronTriggerSmartContractType ¶ added in v0.11.0
type TronTriggerSmartContractType string
const (
TronTriggerSmartContractTypeTriggerSmartContract TronTriggerSmartContractType = "TriggerSmartContract"
)
type TvmTransactionWalletActionStep ¶ added in v0.11.0
type TvmTransactionWalletActionStep struct {
// CAIP-2 chain identifier for the Tron network.
Caip2 string `json:"caip2" api:"required"`
// Status of a TVM (Tron) step in a wallet action.
//
// Any of "preparing", "queued", "pending", "confirmed", "rejected", "reverted",
// "failed".
Status TvmWalletActionStepStatus `json:"status" api:"required"`
// The Tron transaction ID. Null until broadcast.
TransactionID string `json:"transaction_id" api:"required"`
// Any of "tvm_transaction".
Type TvmTransactionWalletActionStepType `json:"type" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caip2 respjson.Field
Status respjson.Field
TransactionID respjson.Field
Type respjson.Field
FailureReason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet action step consisting of a TVM (Tron) transaction.
func (TvmTransactionWalletActionStep) RawJSON ¶ added in v0.11.0
func (r TvmTransactionWalletActionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*TvmTransactionWalletActionStep) UnmarshalJSON ¶ added in v0.11.0
func (r *TvmTransactionWalletActionStep) UnmarshalJSON(data []byte) error
type TvmTransactionWalletActionStepType ¶ added in v0.11.0
type TvmTransactionWalletActionStepType string
const (
TvmTransactionWalletActionStepTypeTvmTransaction TvmTransactionWalletActionStepType = "tvm_transaction"
)
type TvmWalletActionStepStatus ¶ added in v0.11.0
type TvmWalletActionStepStatus string
Status of a TVM (Tron) step in a wallet action.
const ( TvmWalletActionStepStatusPreparing TvmWalletActionStepStatus = "preparing" TvmWalletActionStepStatusQueued TvmWalletActionStepStatus = "queued" TvmWalletActionStepStatusPending TvmWalletActionStepStatus = "pending" TvmWalletActionStepStatusConfirmed TvmWalletActionStepStatus = "confirmed" TvmWalletActionStepStatusRejected TvmWalletActionStepStatus = "rejected" TvmWalletActionStepStatusReverted TvmWalletActionStepStatus = "reverted" TvmWalletActionStepStatusFailed TvmWalletActionStepStatus = "failed" )
type TypedDataDomainInputParams ¶ added in v0.4.0
type TypedDataInput ¶ added in v0.11.0
type TypedDataInput struct {
PrimaryType string `json:"primary_type" api:"required"`
// The type definitions for EIP-712 typed data signing.
Types TypedDataTypesInputParams `json:"types,omitzero" api:"required"`
// contains filtered or unexported fields
}
The typed data structure containing EIP-712 types and the primary type for typed data message policy conditions.
The properties PrimaryType, Types are required.
func (TypedDataInput) MarshalJSON ¶ added in v0.11.0
func (r TypedDataInput) MarshalJSON() (data []byte, err error)
func (*TypedDataInput) UnmarshalJSON ¶ added in v0.11.0
func (r *TypedDataInput) UnmarshalJSON(data []byte) error
type TypedDataInputResp ¶ added in v0.11.0
type TypedDataInputResp struct {
PrimaryType string `json:"primary_type" api:"required"`
// The type definitions for EIP-712 typed data signing.
Types TypedDataTypesInputParamsResp `json:"types" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PrimaryType respjson.Field
Types respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The typed data structure containing EIP-712 types and the primary type for typed data message policy conditions.
func (TypedDataInputResp) RawJSON ¶ added in v0.11.0
func (r TypedDataInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TypedDataInputResp) ToParam ¶ added in v0.11.0
func (r TypedDataInputResp) ToParam() TypedDataInput
ToParam converts this TypedDataInputResp to a TypedDataInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TypedDataInput.Overrides()
func (*TypedDataInputResp) UnmarshalJSON ¶ added in v0.11.0
func (r *TypedDataInputResp) UnmarshalJSON(data []byte) error
type TypedDataTypeFieldInput ¶ added in v0.4.0
type TypedDataTypeFieldInput struct {
Name string `json:"name" api:"required"`
Type string `json:"type" api:"required"`
// contains filtered or unexported fields
}
A single field definition in an EIP-712 typed data type.
The properties Name, Type are required.
func (TypedDataTypeFieldInput) MarshalJSON ¶ added in v0.6.0
func (r TypedDataTypeFieldInput) MarshalJSON() (data []byte, err error)
func (*TypedDataTypeFieldInput) UnmarshalJSON ¶ added in v0.4.0
func (r *TypedDataTypeFieldInput) UnmarshalJSON(data []byte) error
type TypedDataTypeFieldInputResp ¶ added in v0.6.0
type TypedDataTypeFieldInputResp struct {
Name string `json:"name" api:"required"`
Type string `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single field definition in an EIP-712 typed data type.
func (TypedDataTypeFieldInputResp) RawJSON ¶ added in v0.6.0
func (r TypedDataTypeFieldInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (TypedDataTypeFieldInputResp) ToParam ¶ added in v0.6.0
func (r TypedDataTypeFieldInputResp) ToParam() TypedDataTypeFieldInput
ToParam converts this TypedDataTypeFieldInputResp to a TypedDataTypeFieldInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TypedDataTypeFieldInput.Overrides()
func (*TypedDataTypeFieldInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *TypedDataTypeFieldInputResp) UnmarshalJSON(data []byte) error
type TypedDataTypesInputParams ¶ added in v0.4.0
type TypedDataTypesInputParams map[string][]TypedDataTypeFieldInput
type TypedDataTypesInputParamsResp ¶ added in v0.4.0
type TypedDataTypesInputParamsResp map[string][]TypedDataTypeFieldInputResp
type UnsafeUnwrapWebhookEventUnion ¶ added in v0.7.0
type UnsafeUnwrapWebhookEventUnion struct {
// This field is from variant [IntentAuthorizedWebhookPayload].
AuthorizedAt float64 `json:"authorized_at"`
// This field is a union of [float64], [float64], [float64], [float64], [float64],
// [string], [string], [string], [string], [string], [string], [string], [string],
// [string], [string], [string], [string], [string], [string], [string], [string],
// [string], [string], [string], [string], [string], [string], [string], [string]
CreatedAt UnsafeUnwrapWebhookEventUnionCreatedAt `json:"created_at"`
ExpiresAt float64 `json:"expires_at"`
IntentID string `json:"intent_id"`
// This field is from variant [IntentAuthorizedWebhookPayload].
IntentType IntentType `json:"intent_type"`
// This field is from variant [IntentAuthorizedWebhookPayload].
Member IntentAuthorizationKeyQuorumMemberUnion `json:"member"`
Status string `json:"status"`
// Any of "intent.authorized", "intent.created", "intent.executed",
// "intent.failed", "intent.rejected", "mfa.disabled", "mfa.enabled",
// "transaction.broadcasted", "transaction.confirmed",
// "transaction.execution_reverted", "transaction.failed",
// "transaction.provider_error", "transaction.replaced",
// "transaction.still_pending", "user.authenticated", "user.created",
// "user.linked_account", "user.transferred_account", "user.unlinked_account",
// "user.updated_account", "user.wallet_created", "user_operation.completed",
// "wallet.archived", "wallet.funds_deposited", "wallet.funds_withdrawn",
// "wallet.private_key_export", "wallet.recovered", "wallet.recovery_setup",
// "wallet.restored", "wallet_action.earn_deposit.created",
// "wallet_action.earn_deposit.failed", "wallet_action.earn_deposit.rejected",
// "wallet_action.earn_deposit.succeeded",
// "wallet_action.earn_fee_collect.created",
// "wallet_action.earn_fee_collect.failed",
// "wallet_action.earn_fee_collect.rejected",
// "wallet_action.earn_fee_collect.succeeded",
// "wallet_action.earn_incentive_claim.created",
// "wallet_action.earn_incentive_claim.failed",
// "wallet_action.earn_incentive_claim.rejected",
// "wallet_action.earn_incentive_claim.succeeded",
// "wallet_action.earn_withdraw.created", "wallet_action.earn_withdraw.failed",
// "wallet_action.earn_withdraw.rejected", "wallet_action.earn_withdraw.succeeded",
// "wallet_action.swap.created", "wallet_action.swap.failed",
// "wallet_action.swap.rejected", "wallet_action.swap.succeeded",
// "wallet_action.transfer.created", "wallet_action.transfer.failed",
// "wallet_action.transfer.rejected", "wallet_action.transfer.succeeded",
// "yield.claim.confirmed", "yield.deposit.confirmed", "yield.withdraw.confirmed".
Type string `json:"type"`
CreatedByDisplayName string `json:"created_by_display_name"`
CreatedByID string `json:"created_by_id"`
// This field is from variant [IntentCreatedWebhookPayload].
AuthorizationDetails []IntentAuthorization `json:"authorization_details"`
// This field is from variant [IntentExecutedWebhookPayload].
ActionResult BaseActionResult `json:"action_result"`
// This field is a union of [float64], [string], [string], [string], [string],
// [string], [string]
RejectedAt UnsafeUnwrapWebhookEventUnionRejectedAt `json:"rejected_at"`
Method string `json:"method"`
UserID string `json:"user_id"`
Caip2 string `json:"caip2"`
TransactionHash string `json:"transaction_hash"`
TransactionID string `json:"transaction_id"`
WalletID string `json:"wallet_id"`
ReferenceID string `json:"reference_id"`
// This field is from variant [TransactionStillPendingWebhookPayload].
TransactionRequest UnsignedStandardEthereumTransactionResp `json:"transaction_request"`
// This field is from variant [UserAuthenticatedWebhookPayload].
Account LinkedAccountUnion `json:"account"`
// This field is from variant [UserAuthenticatedWebhookPayload].
User User `json:"user"`
// This field is from variant [UserTransferredAccountWebhookPayload].
DeletedUser bool `json:"deletedUser"`
// This field is from variant [UserTransferredAccountWebhookPayload].
FromUser UserReference `json:"fromUser"`
// This field is from variant [UserTransferredAccountWebhookPayload].
ToUser User `json:"toUser"`
// This field is from variant [UserWalletCreatedWebhookPayload].
Wallet LinkedAccountBaseWallet `json:"wallet"`
// This field is from variant [UserOperationCompletedWebhookPayload].
ActualGasCost string `json:"actual_gas_cost"`
// This field is from variant [UserOperationCompletedWebhookPayload].
ActualGasUsed string `json:"actual_gas_used"`
// This field is from variant [UserOperationCompletedWebhookPayload].
BlockNumber float64 `json:"block_number"`
// This field is from variant [UserOperationCompletedWebhookPayload].
LogIndex float64 `json:"log_index"`
// This field is from variant [UserOperationCompletedWebhookPayload].
Nonce string `json:"nonce"`
// This field is from variant [UserOperationCompletedWebhookPayload].
Paymaster string `json:"paymaster"`
Sender string `json:"sender"`
// This field is from variant [UserOperationCompletedWebhookPayload].
Success bool `json:"success"`
// This field is from variant [UserOperationCompletedWebhookPayload].
UserOpHash string `json:"user_op_hash"`
// This field is from variant [WalletArchivedWebhookPayload].
ArchivedAt float64 `json:"archived_at"`
ChainType string `json:"chain_type"`
WalletAddress string `json:"wallet_address"`
Amount string `json:"amount"`
// This field is a union of [WalletFundsAssetUnion], [string], [string], [string],
// [string], [string], [string], [string], [string], [string], [string], [string],
// [string]
Asset UnsafeUnwrapWebhookEventUnionAsset `json:"asset"`
// This field is from variant [FundsDepositedWebhookPayload].
Block BlockInfo `json:"block"`
IdempotencyKey string `json:"idempotency_key"`
Recipient string `json:"recipient"`
// This field is from variant [FundsDepositedWebhookPayload].
BridgeMetadata BridgeMetadataUnion `json:"bridge_metadata"`
TransactionFee string `json:"transaction_fee"`
// This field is from variant [PrivateKeyExportWebhookPayload].
ExportSource ExportType `json:"export_source"`
// This field is from variant [WalletActionEarnDepositCreatedWebhookPayload].
ActionType WalletActionType `json:"action_type"`
AssetAddress string `json:"asset_address"`
RawAmount string `json:"raw_amount"`
VaultAddress string `json:"vault_address"`
VaultID string `json:"vault_id"`
WalletActionID string `json:"wallet_action_id"`
Decimals int64 `json:"decimals"`
FailedAt string `json:"failed_at"`
// This field is from variant [WalletActionEarnDepositFailedWebhookPayload].
FailureReason FailureReason `json:"failure_reason"`
Steps []WalletActionStepUnion `json:"steps"`
CompletedAt string `json:"completed_at"`
Chain string `json:"chain"`
// This field is a union of [[]EarnIncetiveClaimRewardEntry],
// [[]EarnIncetiveClaimRewardEntry], [[]EarnIncetiveClaimRewardEntry],
// [[]EarnIncetiveClaimRewardEntry], [[]YieldClaimReward]
Rewards UnsafeUnwrapWebhookEventUnionRewards `json:"rewards"`
InputAmount string `json:"input_amount"`
InputToken string `json:"input_token"`
OutputToken string `json:"output_token"`
// This field is from variant [WalletActionSwapSucceededWebhookPayload].
OutputAmount string `json:"output_amount"`
DestinationAddress string `json:"destination_address"`
SourceChain string `json:"source_chain"`
SourceAmount string `json:"source_amount"`
SourceAsset string `json:"source_asset"`
SourceAssetAddress string `json:"source_asset_address"`
SourceAssetDecimals int64 `json:"source_asset_decimals"`
Assets string `json:"assets"`
Owner string `json:"owner"`
// This field is from variant [YieldWithdrawConfirmedWebhookPayload].
Receiver string `json:"receiver"`
JSON struct {
AuthorizedAt respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
IntentID respjson.Field
IntentType respjson.Field
Member respjson.Field
Status respjson.Field
Type respjson.Field
CreatedByDisplayName respjson.Field
CreatedByID respjson.Field
AuthorizationDetails respjson.Field
ActionResult respjson.Field
RejectedAt respjson.Field
Method respjson.Field
UserID respjson.Field
Caip2 respjson.Field
TransactionHash respjson.Field
TransactionID respjson.Field
WalletID respjson.Field
ReferenceID respjson.Field
TransactionRequest respjson.Field
Account respjson.Field
User respjson.Field
DeletedUser respjson.Field
FromUser respjson.Field
ToUser respjson.Field
Wallet respjson.Field
ActualGasCost respjson.Field
ActualGasUsed respjson.Field
BlockNumber respjson.Field
LogIndex respjson.Field
Nonce respjson.Field
Paymaster respjson.Field
Sender respjson.Field
Success respjson.Field
UserOpHash respjson.Field
ArchivedAt respjson.Field
ChainType respjson.Field
WalletAddress respjson.Field
Amount respjson.Field
Asset respjson.Field
Block respjson.Field
IdempotencyKey respjson.Field
Recipient respjson.Field
BridgeMetadata respjson.Field
TransactionFee respjson.Field
ExportSource respjson.Field
ActionType respjson.Field
AssetAddress respjson.Field
RawAmount respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
Decimals respjson.Field
FailedAt respjson.Field
FailureReason respjson.Field
Steps respjson.Field
CompletedAt respjson.Field
ShareAmount respjson.Field
Chain respjson.Field
Rewards respjson.Field
InputAmount respjson.Field
InputToken respjson.Field
OutputToken respjson.Field
OutputAmount respjson.Field
DestinationAddress respjson.Field
SourceChain respjson.Field
SourceAmount respjson.Field
SourceAsset respjson.Field
SourceAssetAddress respjson.Field
SourceAssetDecimals respjson.Field
Assets respjson.Field
Owner respjson.Field
Shares respjson.Field
Receiver respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsafeUnwrapWebhookEventUnion contains all possible properties and values from IntentAuthorizedWebhookPayload, IntentCreatedWebhookPayload, IntentExecutedWebhookPayload, IntentFailedWebhookPayload, IntentRejectedWebhookPayload, MfaDisabledWebhookPayload, MfaEnabledWebhookPayload, TransactionBroadcastedWebhookPayload, TransactionConfirmedWebhookPayload, TransactionExecutionRevertedWebhookPayload, TransactionFailedWebhookPayload, TransactionProviderErrorWebhookPayload, TransactionReplacedWebhookPayload, TransactionStillPendingWebhookPayload, UserAuthenticatedWebhookPayload, UserCreatedWebhookPayload, UserLinkedAccountWebhookPayload, UserTransferredAccountWebhookPayload, UserUnlinkedAccountWebhookPayload, UserUpdatedAccountWebhookPayload, UserWalletCreatedWebhookPayload, UserOperationCompletedWebhookPayload, WalletArchivedWebhookPayload, FundsDepositedWebhookPayload, FundsWithdrawnWebhookPayload, PrivateKeyExportWebhookPayload, WalletRecoveredWebhookPayload, WalletRecoverySetupWebhookPayload, WalletRestoredWebhookPayload, WalletActionEarnDepositCreatedWebhookPayload, WalletActionEarnDepositFailedWebhookPayload, WalletActionEarnDepositRejectedWebhookPayload, WalletActionEarnDepositSucceededWebhookPayload, WalletActionEarnFeeCollectCreatedWebhookPayload, WalletActionEarnFeeCollectFailedWebhookPayload, WalletActionEarnFeeCollectRejectedWebhookPayload, WalletActionEarnFeeCollectSucceededWebhookPayload, WalletActionEarnIncentiveClaimCreatedWebhookPayload, WalletActionEarnIncentiveClaimFailedWebhookPayload, WalletActionEarnIncentiveClaimRejectedWebhookPayload, WalletActionEarnIncentiveClaimSucceededWebhookPayload, WalletActionEarnWithdrawCreatedWebhookPayload, WalletActionEarnWithdrawFailedWebhookPayload, WalletActionEarnWithdrawRejectedWebhookPayload, WalletActionEarnWithdrawSucceededWebhookPayload, WalletActionSwapCreatedWebhookPayload, WalletActionSwapFailedWebhookPayload, WalletActionSwapRejectedWebhookPayload, WalletActionSwapSucceededWebhookPayload, WalletActionTransferCreatedWebhookPayload, WalletActionTransferFailedWebhookPayload, WalletActionTransferRejectedWebhookPayload, WalletActionTransferSucceededWebhookPayload, YieldClaimConfirmedWebhookPayload, YieldDepositConfirmedWebhookPayload, YieldWithdrawConfirmedWebhookPayload.
Use the UnsafeUnwrapWebhookEventUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (UnsafeUnwrapWebhookEventUnion) AsAny ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsAny() anyUnsafeUnwrapWebhookEvent
Use the following switch statement to find the correct variant
switch variant := UnsafeUnwrapWebhookEventUnion.AsAny().(type) {
case privyclient.IntentAuthorizedWebhookPayload:
case privyclient.IntentCreatedWebhookPayload:
case privyclient.IntentExecutedWebhookPayload:
case privyclient.IntentFailedWebhookPayload:
case privyclient.IntentRejectedWebhookPayload:
case privyclient.MfaDisabledWebhookPayload:
case privyclient.MfaEnabledWebhookPayload:
case privyclient.TransactionBroadcastedWebhookPayload:
case privyclient.TransactionConfirmedWebhookPayload:
case privyclient.TransactionExecutionRevertedWebhookPayload:
case privyclient.TransactionFailedWebhookPayload:
case privyclient.TransactionProviderErrorWebhookPayload:
case privyclient.TransactionReplacedWebhookPayload:
case privyclient.TransactionStillPendingWebhookPayload:
case privyclient.UserAuthenticatedWebhookPayload:
case privyclient.UserCreatedWebhookPayload:
case privyclient.UserLinkedAccountWebhookPayload:
case privyclient.UserTransferredAccountWebhookPayload:
case privyclient.UserUnlinkedAccountWebhookPayload:
case privyclient.UserUpdatedAccountWebhookPayload:
case privyclient.UserWalletCreatedWebhookPayload:
case privyclient.UserOperationCompletedWebhookPayload:
case privyclient.WalletArchivedWebhookPayload:
case privyclient.FundsDepositedWebhookPayload:
case privyclient.FundsWithdrawnWebhookPayload:
case privyclient.PrivateKeyExportWebhookPayload:
case privyclient.WalletRecoveredWebhookPayload:
case privyclient.WalletRecoverySetupWebhookPayload:
case privyclient.WalletRestoredWebhookPayload:
case privyclient.WalletActionEarnDepositCreatedWebhookPayload:
case privyclient.WalletActionEarnDepositFailedWebhookPayload:
case privyclient.WalletActionEarnDepositRejectedWebhookPayload:
case privyclient.WalletActionEarnDepositSucceededWebhookPayload:
case privyclient.WalletActionEarnFeeCollectCreatedWebhookPayload:
case privyclient.WalletActionEarnFeeCollectFailedWebhookPayload:
case privyclient.WalletActionEarnFeeCollectRejectedWebhookPayload:
case privyclient.WalletActionEarnFeeCollectSucceededWebhookPayload:
case privyclient.WalletActionEarnIncentiveClaimCreatedWebhookPayload:
case privyclient.WalletActionEarnIncentiveClaimFailedWebhookPayload:
case privyclient.WalletActionEarnIncentiveClaimRejectedWebhookPayload:
case privyclient.WalletActionEarnIncentiveClaimSucceededWebhookPayload:
case privyclient.WalletActionEarnWithdrawCreatedWebhookPayload:
case privyclient.WalletActionEarnWithdrawFailedWebhookPayload:
case privyclient.WalletActionEarnWithdrawRejectedWebhookPayload:
case privyclient.WalletActionEarnWithdrawSucceededWebhookPayload:
case privyclient.WalletActionSwapCreatedWebhookPayload:
case privyclient.WalletActionSwapFailedWebhookPayload:
case privyclient.WalletActionSwapRejectedWebhookPayload:
case privyclient.WalletActionSwapSucceededWebhookPayload:
case privyclient.WalletActionTransferCreatedWebhookPayload:
case privyclient.WalletActionTransferFailedWebhookPayload:
case privyclient.WalletActionTransferRejectedWebhookPayload:
case privyclient.WalletActionTransferSucceededWebhookPayload:
case privyclient.YieldClaimConfirmedWebhookPayload:
case privyclient.YieldDepositConfirmedWebhookPayload:
case privyclient.YieldWithdrawConfirmedWebhookPayload:
default:
fmt.Errorf("no variant present")
}
func (UnsafeUnwrapWebhookEventUnion) AsIntentAuthorized ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsIntentAuthorized() (v IntentAuthorizedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsIntentCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsIntentCreated() (v IntentCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsIntentExecuted ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsIntentExecuted() (v IntentExecutedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsIntentFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsIntentFailed() (v IntentFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsIntentRejected ¶ added in v0.8.0
func (u UnsafeUnwrapWebhookEventUnion) AsIntentRejected() (v IntentRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsMfaDisabled ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsMfaDisabled() (v MfaDisabledWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsMfaEnabled ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsMfaEnabled() (v MfaEnabledWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionBroadcasted ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionBroadcasted() (v TransactionBroadcastedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionConfirmed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionConfirmed() (v TransactionConfirmedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionExecutionReverted ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionExecutionReverted() (v TransactionExecutionRevertedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionFailed() (v TransactionFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionProviderError ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionProviderError() (v TransactionProviderErrorWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionReplaced ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionReplaced() (v TransactionReplacedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsTransactionStillPending ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsTransactionStillPending() (v TransactionStillPendingWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserAuthenticated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserAuthenticated() (v UserAuthenticatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserCreated() (v UserCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserLinkedAccount ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserLinkedAccount() (v UserLinkedAccountWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserOperationCompleted ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserOperationCompleted() (v UserOperationCompletedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserTransferredAccount ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserTransferredAccount() (v UserTransferredAccountWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserUnlinkedAccount ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserUnlinkedAccount() (v UserUnlinkedAccountWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserUpdatedAccount ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserUpdatedAccount() (v UserUpdatedAccountWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsUserWalletCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsUserWalletCreated() (v UserWalletCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositCreated() (v WalletActionEarnDepositCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositFailed() (v WalletActionEarnDepositFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositRejected ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositRejected() (v WalletActionEarnDepositRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositSucceeded ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnDepositSucceeded() (v WalletActionEarnDepositSucceededWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectCreated ¶ added in v0.13.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectCreated() (v WalletActionEarnFeeCollectCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectFailed ¶ added in v0.13.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectFailed() (v WalletActionEarnFeeCollectFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectRejected ¶ added in v0.13.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectRejected() (v WalletActionEarnFeeCollectRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectSucceeded ¶ added in v0.13.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnFeeCollectSucceeded() (v WalletActionEarnFeeCollectSucceededWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimCreated() (v WalletActionEarnIncentiveClaimCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimFailed() (v WalletActionEarnIncentiveClaimFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimRejected ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimRejected() (v WalletActionEarnIncentiveClaimRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimSucceeded ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnIncentiveClaimSucceeded() (v WalletActionEarnIncentiveClaimSucceededWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawCreated() (v WalletActionEarnWithdrawCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawFailed() (v WalletActionEarnWithdrawFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawRejected ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawRejected() (v WalletActionEarnWithdrawRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawSucceeded ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionEarnWithdrawSucceeded() (v WalletActionEarnWithdrawSucceededWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapCreated() (v WalletActionSwapCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapFailed() (v WalletActionSwapFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapRejected ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapRejected() (v WalletActionSwapRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapSucceeded ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionSwapSucceeded() (v WalletActionSwapSucceededWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferCreated ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferCreated() (v WalletActionTransferCreatedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferFailed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferFailed() (v WalletActionTransferFailedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferRejected ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferRejected() (v WalletActionTransferRejectedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferSucceeded ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletActionTransferSucceeded() (v WalletActionTransferSucceededWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletArchived ¶ added in v0.11.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletArchived() (v WalletArchivedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletFundsDeposited ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletFundsDeposited() (v FundsDepositedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletFundsWithdrawn ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletFundsWithdrawn() (v FundsWithdrawnWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletPrivateKeyExport ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletPrivateKeyExport() (v PrivateKeyExportWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletRecovered ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletRecovered() (v WalletRecoveredWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletRecoverySetup ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletRecoverySetup() (v WalletRecoverySetupWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsWalletRestored ¶ added in v0.11.0
func (u UnsafeUnwrapWebhookEventUnion) AsWalletRestored() (v WalletRestoredWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsYieldClaimConfirmed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsYieldClaimConfirmed() (v YieldClaimConfirmedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsYieldDepositConfirmed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsYieldDepositConfirmed() (v YieldDepositConfirmedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) AsYieldWithdrawConfirmed ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) AsYieldWithdrawConfirmed() (v YieldWithdrawConfirmedWebhookPayload)
func (UnsafeUnwrapWebhookEventUnion) RawJSON ¶ added in v0.7.0
func (u UnsafeUnwrapWebhookEventUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnsafeUnwrapWebhookEventUnion) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsafeUnwrapWebhookEventUnion) UnmarshalJSON(data []byte) error
type UnsafeUnwrapWebhookEventUnionAsset ¶ added in v0.7.0
type UnsafeUnwrapWebhookEventUnionAsset struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field is a union of [any], [string], [string]
Address UnsafeUnwrapWebhookEventUnionAssetAddress `json:"address"`
Type string `json:"type"`
// This field is from variant [WalletFundsAssetUnion].
Mint string `json:"mint"`
JSON struct {
OfString respjson.Field
Address respjson.Field
Type respjson.Field
Mint respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsafeUnwrapWebhookEventUnionAsset is an implicit subunion of UnsafeUnwrapWebhookEventUnion. UnsafeUnwrapWebhookEventUnionAsset provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the UnsafeUnwrapWebhookEventUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString]
func (*UnsafeUnwrapWebhookEventUnionAsset) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsafeUnwrapWebhookEventUnionAsset) UnmarshalJSON(data []byte) error
type UnsafeUnwrapWebhookEventUnionAssetAddress ¶ added in v0.7.0
type UnsafeUnwrapWebhookEventUnionAssetAddress struct {
// This field will be present if the value is a [any] instead of an object.
OfWalletFundsNativeTokenAssetAddress any `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfWalletFundsNativeTokenAssetAddress respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsafeUnwrapWebhookEventUnionAssetAddress is an implicit subunion of UnsafeUnwrapWebhookEventUnion. UnsafeUnwrapWebhookEventUnionAssetAddress provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the UnsafeUnwrapWebhookEventUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfWalletFundsNativeTokenAssetAddress OfString]
func (*UnsafeUnwrapWebhookEventUnionAssetAddress) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsafeUnwrapWebhookEventUnionAssetAddress) UnmarshalJSON(data []byte) error
type UnsafeUnwrapWebhookEventUnionCreatedAt ¶ added in v0.11.0
type UnsafeUnwrapWebhookEventUnionCreatedAt struct {
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfFloat respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsafeUnwrapWebhookEventUnionCreatedAt is an implicit subunion of UnsafeUnwrapWebhookEventUnion. UnsafeUnwrapWebhookEventUnionCreatedAt provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the UnsafeUnwrapWebhookEventUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfFloat OfString]
func (*UnsafeUnwrapWebhookEventUnionCreatedAt) UnmarshalJSON ¶ added in v0.11.0
func (r *UnsafeUnwrapWebhookEventUnionCreatedAt) UnmarshalJSON(data []byte) error
type UnsafeUnwrapWebhookEventUnionRejectedAt ¶ added in v0.11.0
type UnsafeUnwrapWebhookEventUnionRejectedAt struct {
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
JSON struct {
OfFloat respjson.Field
OfString respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsafeUnwrapWebhookEventUnionRejectedAt is an implicit subunion of UnsafeUnwrapWebhookEventUnion. UnsafeUnwrapWebhookEventUnionRejectedAt provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the UnsafeUnwrapWebhookEventUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfFloat OfString]
func (*UnsafeUnwrapWebhookEventUnionRejectedAt) UnmarshalJSON ¶ added in v0.11.0
func (r *UnsafeUnwrapWebhookEventUnionRejectedAt) UnmarshalJSON(data []byte) error
type UnsafeUnwrapWebhookEventUnionRewards ¶ added in v0.7.0
type UnsafeUnwrapWebhookEventUnionRewards struct {
// This field will be present if the value is a [[]EarnIncetiveClaimRewardEntry]
// instead of an object.
OfEarnIncetiveClaimRewardEntryArray []EarnIncetiveClaimRewardEntry `json:",inline"`
// This field will be present if the value is a [[]YieldClaimReward] instead of an
// object.
OfYieldClaimRewardArray []YieldClaimReward `json:",inline"`
JSON struct {
OfEarnIncetiveClaimRewardEntryArray respjson.Field
OfYieldClaimRewardArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsafeUnwrapWebhookEventUnionRewards is an implicit subunion of UnsafeUnwrapWebhookEventUnion. UnsafeUnwrapWebhookEventUnionRewards provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the UnsafeUnwrapWebhookEventUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfEarnIncetiveClaimRewardEntryArray OfYieldClaimRewardArray]
func (*UnsafeUnwrapWebhookEventUnionRewards) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsafeUnwrapWebhookEventUnionRewards) UnmarshalJSON(data []byte) error
type UnsignedEthereumTransactionUnion ¶ added in v0.7.0
type UnsignedEthereumTransactionUnion struct {
OfUnsignedStandardEthereumTransaction *UnsignedStandardEthereumTransaction `json:",omitzero,inline"`
OfUnsignedTempoTransaction *UnsignedTempoTransaction `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func UnsignedEthereumTransactionOfUnsignedTempoTransaction ¶ added in v0.7.0
func UnsignedEthereumTransactionOfUnsignedTempoTransaction(calls []TempoCall, type_ float64) UnsignedEthereumTransactionUnion
func (UnsignedEthereumTransactionUnion) MarshalJSON ¶ added in v0.7.0
func (u UnsignedEthereumTransactionUnion) MarshalJSON() ([]byte, error)
func (*UnsignedEthereumTransactionUnion) UnmarshalJSON ¶ added in v0.7.0
func (u *UnsignedEthereumTransactionUnion) UnmarshalJSON(data []byte) error
type UnsignedEthereumTransactionUnionResp ¶ added in v0.7.0
type UnsignedEthereumTransactionUnionResp struct {
// This field is from variant [UnsignedStandardEthereumTransactionResp].
AuthorizationList []EthereumSign7702AuthorizationResp `json:"authorization_list"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
ChainID QuantityUnionResp `json:"chain_id"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
Data Hex `json:"data"`
From string `json:"from"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
GasLimit QuantityUnionResp `json:"gas_limit"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
GasPrice QuantityUnionResp `json:"gas_price"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
MaxFeePerGas QuantityUnionResp `json:"max_fee_per_gas"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
MaxPriorityFeePerGas QuantityUnionResp `json:"max_priority_fee_per_gas"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
Nonce QuantityUnionResp `json:"nonce"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
To string `json:"to"`
Type float64 `json:"type"`
// This field is from variant [UnsignedStandardEthereumTransactionResp].
Value QuantityUnionResp `json:"value"`
// This field is from variant [UnsignedTempoTransactionResp].
Calls []TempoCallResp `json:"calls"`
// This field is from variant [UnsignedTempoTransactionResp].
AaAuthorizationList []TempoAaAuthorizationResp `json:"aa_authorization_list"`
// This field is from variant [UnsignedTempoTransactionResp].
AccessList []AccessListEntryResp `json:"access_list"`
// This field is from variant [UnsignedTempoTransactionResp].
FeePayerSignature TempoFeePayerSignatureResp `json:"fee_payer_signature"`
// This field is from variant [UnsignedTempoTransactionResp].
FeeToken string `json:"fee_token"`
// This field is from variant [UnsignedTempoTransactionResp].
NonceKey QuantityUnionResp `json:"nonce_key"`
// This field is from variant [UnsignedTempoTransactionResp].
ValidAfter QuantityUnionResp `json:"valid_after"`
// This field is from variant [UnsignedTempoTransactionResp].
ValidBefore QuantityUnionResp `json:"valid_before"`
JSON struct {
AuthorizationList respjson.Field
ChainID respjson.Field
Data respjson.Field
From respjson.Field
GasLimit respjson.Field
GasPrice respjson.Field
MaxFeePerGas respjson.Field
MaxPriorityFeePerGas respjson.Field
Nonce respjson.Field
To respjson.Field
Type respjson.Field
Value respjson.Field
Calls respjson.Field
AaAuthorizationList respjson.Field
AccessList respjson.Field
FeePayerSignature respjson.Field
FeeToken respjson.Field
NonceKey respjson.Field
ValidAfter respjson.Field
ValidBefore respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
UnsignedEthereumTransactionUnionResp contains all possible properties and values from UnsignedStandardEthereumTransactionResp, UnsignedTempoTransactionResp.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (UnsignedEthereumTransactionUnionResp) AsUnsignedStandardEthereumTransaction ¶ added in v0.7.0
func (u UnsignedEthereumTransactionUnionResp) AsUnsignedStandardEthereumTransaction() (v UnsignedStandardEthereumTransactionResp)
func (UnsignedEthereumTransactionUnionResp) AsUnsignedTempoTransaction ¶ added in v0.7.0
func (u UnsignedEthereumTransactionUnionResp) AsUnsignedTempoTransaction() (v UnsignedTempoTransactionResp)
func (UnsignedEthereumTransactionUnionResp) RawJSON ¶ added in v0.7.0
func (u UnsignedEthereumTransactionUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (UnsignedEthereumTransactionUnionResp) ToParam ¶ added in v0.7.0
func (r UnsignedEthereumTransactionUnionResp) ToParam() UnsignedEthereumTransactionUnion
ToParam converts this UnsignedEthereumTransactionUnionResp to a UnsignedEthereumTransactionUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UnsignedEthereumTransactionUnion.Overrides()
func (*UnsignedEthereumTransactionUnionResp) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsignedEthereumTransactionUnionResp) UnmarshalJSON(data []byte) error
type UnsignedStandardEthereumTransaction ¶ added in v0.6.0
type UnsignedStandardEthereumTransaction struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Data param.Opt[Hex] `json:"data,omitzero"`
From param.Opt[string] `json:"from,omitzero"`
To param.Opt[string] `json:"to,omitzero"`
AuthorizationList []EthereumSign7702Authorization `json:"authorization_list,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnion `json:"chain_id,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
GasLimit QuantityUnion `json:"gas_limit,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
GasPrice QuantityUnion `json:"gas_price,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxFeePerGas QuantityUnion `json:"max_fee_per_gas,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxPriorityFeePerGas QuantityUnion `json:"max_priority_fee_per_gas,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnion `json:"nonce,omitzero"`
// Any of 0, 1, 2, 4.
Type float64 `json:"type,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Value QuantityUnion `json:"value,omitzero"`
// contains filtered or unexported fields
}
An unsigned standard Ethereum transaction object. Supports EVM transaction types 0, 1, 2, and 4.
func (UnsignedStandardEthereumTransaction) MarshalJSON ¶ added in v0.6.0
func (r UnsignedStandardEthereumTransaction) MarshalJSON() (data []byte, err error)
func (*UnsignedStandardEthereumTransaction) UnmarshalJSON ¶ added in v0.6.0
func (r *UnsignedStandardEthereumTransaction) UnmarshalJSON(data []byte) error
type UnsignedStandardEthereumTransactionResp ¶ added in v0.6.0
type UnsignedStandardEthereumTransactionResp struct {
AuthorizationList []EthereumSign7702AuthorizationResp `json:"authorization_list"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnionResp `json:"chain_id"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Data Hex `json:"data"`
From string `json:"from"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
GasLimit QuantityUnionResp `json:"gas_limit"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
GasPrice QuantityUnionResp `json:"gas_price"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxFeePerGas QuantityUnionResp `json:"max_fee_per_gas"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxPriorityFeePerGas QuantityUnionResp `json:"max_priority_fee_per_gas"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnionResp `json:"nonce"`
To string `json:"to"`
// Any of 0, 1, 2, 4.
Type float64 `json:"type"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Value QuantityUnionResp `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AuthorizationList respjson.Field
ChainID respjson.Field
Data respjson.Field
From respjson.Field
GasLimit respjson.Field
GasPrice respjson.Field
MaxFeePerGas respjson.Field
MaxPriorityFeePerGas respjson.Field
Nonce respjson.Field
To respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An unsigned standard Ethereum transaction object. Supports EVM transaction types 0, 1, 2, and 4.
func (UnsignedStandardEthereumTransactionResp) RawJSON ¶ added in v0.6.0
func (r UnsignedStandardEthereumTransactionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (UnsignedStandardEthereumTransactionResp) ToParam ¶ added in v0.6.0
func (r UnsignedStandardEthereumTransactionResp) ToParam() UnsignedStandardEthereumTransaction
ToParam converts this UnsignedStandardEthereumTransactionResp to a UnsignedStandardEthereumTransaction.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UnsignedStandardEthereumTransaction.Overrides()
func (*UnsignedStandardEthereumTransactionResp) UnmarshalJSON ¶ added in v0.6.0
func (r *UnsignedStandardEthereumTransactionResp) UnmarshalJSON(data []byte) error
type UnsignedTempoTransaction ¶ added in v0.7.0
type UnsignedTempoTransaction struct {
Calls []TempoCall `json:"calls,omitzero" api:"required"`
// Any of 118.
Type float64 `json:"type,omitzero" api:"required"`
FeeToken param.Opt[string] `json:"fee_token,omitzero"`
From param.Opt[string] `json:"from,omitzero"`
AaAuthorizationList []TempoAaAuthorization `json:"aa_authorization_list,omitzero"`
AccessList []AccessListEntry `json:"access_list,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnion `json:"chain_id,omitzero"`
// A fee payer signature for sponsored Tempo transactions (secp256k1 only).
FeePayerSignature TempoFeePayerSignature `json:"fee_payer_signature,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
GasLimit QuantityUnion `json:"gas_limit,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxFeePerGas QuantityUnion `json:"max_fee_per_gas,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxPriorityFeePerGas QuantityUnion `json:"max_priority_fee_per_gas,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnion `json:"nonce,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
NonceKey QuantityUnion `json:"nonce_key,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ValidAfter QuantityUnion `json:"valid_after,omitzero"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ValidBefore QuantityUnion `json:"valid_before,omitzero"`
// contains filtered or unexported fields
}
An unsigned Tempo transaction (type 118) with batched calls.
The properties Calls, Type are required.
func (UnsignedTempoTransaction) MarshalJSON ¶ added in v0.7.0
func (r UnsignedTempoTransaction) MarshalJSON() (data []byte, err error)
func (*UnsignedTempoTransaction) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsignedTempoTransaction) UnmarshalJSON(data []byte) error
type UnsignedTempoTransactionResp ¶ added in v0.7.0
type UnsignedTempoTransactionResp struct {
Calls []TempoCallResp `json:"calls" api:"required"`
// Any of 118.
Type float64 `json:"type" api:"required"`
AaAuthorizationList []TempoAaAuthorizationResp `json:"aa_authorization_list"`
AccessList []AccessListEntryResp `json:"access_list"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ChainID QuantityUnionResp `json:"chain_id"`
// A fee payer signature for sponsored Tempo transactions (secp256k1 only).
FeePayerSignature TempoFeePayerSignatureResp `json:"fee_payer_signature"`
FeeToken string `json:"fee_token"`
From string `json:"from"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
GasLimit QuantityUnionResp `json:"gas_limit"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxFeePerGas QuantityUnionResp `json:"max_fee_per_gas"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
MaxPriorityFeePerGas QuantityUnionResp `json:"max_priority_fee_per_gas"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
Nonce QuantityUnionResp `json:"nonce"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
NonceKey QuantityUnionResp `json:"nonce_key"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ValidAfter QuantityUnionResp `json:"valid_after"`
// A quantity value that can be either a hex string starting with '0x' or a
// non-negative integer.
ValidBefore QuantityUnionResp `json:"valid_before"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Calls respjson.Field
Type respjson.Field
AaAuthorizationList respjson.Field
AccessList respjson.Field
ChainID respjson.Field
FeePayerSignature respjson.Field
FeeToken respjson.Field
From respjson.Field
GasLimit respjson.Field
MaxFeePerGas respjson.Field
MaxPriorityFeePerGas respjson.Field
Nonce respjson.Field
NonceKey respjson.Field
ValidAfter respjson.Field
ValidBefore respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An unsigned Tempo transaction (type 118) with batched calls.
func (UnsignedTempoTransactionResp) RawJSON ¶ added in v0.7.0
func (r UnsignedTempoTransactionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (UnsignedTempoTransactionResp) ToParam ¶ added in v0.7.0
func (r UnsignedTempoTransactionResp) ToParam() UnsignedTempoTransaction
ToParam converts this UnsignedTempoTransactionResp to a UnsignedTempoTransaction.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UnsignedTempoTransaction.Overrides()
func (*UnsignedTempoTransactionResp) UnmarshalJSON ¶ added in v0.7.0
func (r *UnsignedTempoTransactionResp) UnmarshalJSON(data []byte) error
type User ¶
type User struct {
ID string `json:"id" api:"required"`
// Unix timestamp of when the user was created in seconds.
CreatedAt float64 `json:"created_at" api:"required"`
// Indicates if the user has accepted the terms of service.
HasAcceptedTerms bool `json:"has_accepted_terms" api:"required"`
// Indicates if the user is a guest account user.
IsGuest bool `json:"is_guest" api:"required"`
LinkedAccounts []LinkedAccountUnion `json:"linked_accounts" api:"required"`
MfaMethods []LinkedMfaMethodUnion `json:"mfa_methods" api:"required"`
// Custom metadata associated with the user.
CustomMetadata CustomMetadataResp `json:"custom_metadata"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
HasAcceptedTerms respjson.Field
IsGuest respjson.Field
LinkedAccounts respjson.Field
MfaMethods respjson.Field
CustomMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A Privy user object.
func (*User) UnmarshalJSON ¶
type UserAuthenticatedWebhookPayload ¶ added in v0.7.0
type UserAuthenticatedWebhookPayload struct {
// A linked account for the user.
Account LinkedAccountUnion `json:"account" api:"required"`
// The type of webhook event.
//
// Any of "user.authenticated".
Type UserAuthenticatedWebhookPayloadType `json:"type" api:"required"`
// A Privy user object.
User User `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.authenticated webhook event.
func (UserAuthenticatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserAuthenticatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserAuthenticatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserAuthenticatedWebhookPayload) UnmarshalJSON(data []byte) error
type UserAuthenticatedWebhookPayloadType ¶ added in v0.7.0
type UserAuthenticatedWebhookPayloadType string
The type of webhook event.
const (
UserAuthenticatedWebhookPayloadTypeUserAuthenticated UserAuthenticatedWebhookPayloadType = "user.authenticated"
)
type UserCreatedWebhookPayload ¶ added in v0.7.0
type UserCreatedWebhookPayload struct {
// The type of webhook event.
//
// Any of "user.created".
Type UserCreatedWebhookPayloadType `json:"type" api:"required"`
// A Privy user object.
User User `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.created webhook event.
func (UserCreatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type UserCreatedWebhookPayloadType ¶ added in v0.7.0
type UserCreatedWebhookPayloadType string
The type of webhook event.
const (
UserCreatedWebhookPayloadTypeUserCreated UserCreatedWebhookPayloadType = "user.created"
)
type UserGetByCustomAuthIDParams ¶
type UserGetByCustomAuthIDParams struct {
CustomUserID string `json:"custom_user_id" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByCustomAuthIDParams) MarshalJSON ¶
func (r UserGetByCustomAuthIDParams) MarshalJSON() (data []byte, err error)
func (*UserGetByCustomAuthIDParams) UnmarshalJSON ¶
func (r *UserGetByCustomAuthIDParams) UnmarshalJSON(data []byte) error
type UserGetByDiscordUsernameParams ¶
type UserGetByDiscordUsernameParams struct {
Username string `json:"username" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByDiscordUsernameParams) MarshalJSON ¶
func (r UserGetByDiscordUsernameParams) MarshalJSON() (data []byte, err error)
func (*UserGetByDiscordUsernameParams) UnmarshalJSON ¶
func (r *UserGetByDiscordUsernameParams) UnmarshalJSON(data []byte) error
type UserGetByEmailAddressParams ¶
type UserGetByEmailAddressParams struct {
Address string `json:"address" api:"required" format:"email"`
// contains filtered or unexported fields
}
func (UserGetByEmailAddressParams) MarshalJSON ¶
func (r UserGetByEmailAddressParams) MarshalJSON() (data []byte, err error)
func (*UserGetByEmailAddressParams) UnmarshalJSON ¶
func (r *UserGetByEmailAddressParams) UnmarshalJSON(data []byte) error
type UserGetByFarcasterIDParams ¶
type UserGetByFarcasterIDParams struct {
Fid float64 `json:"fid" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByFarcasterIDParams) MarshalJSON ¶
func (r UserGetByFarcasterIDParams) MarshalJSON() (data []byte, err error)
func (*UserGetByFarcasterIDParams) UnmarshalJSON ¶
func (r *UserGetByFarcasterIDParams) UnmarshalJSON(data []byte) error
type UserGetByGitHubUsernameParams ¶
type UserGetByGitHubUsernameParams struct {
Username string `json:"username" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByGitHubUsernameParams) MarshalJSON ¶
func (r UserGetByGitHubUsernameParams) MarshalJSON() (data []byte, err error)
func (*UserGetByGitHubUsernameParams) UnmarshalJSON ¶
func (r *UserGetByGitHubUsernameParams) UnmarshalJSON(data []byte) error
type UserGetByPhoneNumberParams ¶
type UserGetByPhoneNumberParams struct {
Number string `json:"number" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByPhoneNumberParams) MarshalJSON ¶
func (r UserGetByPhoneNumberParams) MarshalJSON() (data []byte, err error)
func (*UserGetByPhoneNumberParams) UnmarshalJSON ¶
func (r *UserGetByPhoneNumberParams) UnmarshalJSON(data []byte) error
type UserGetBySmartWalletAddressParams ¶
type UserGetBySmartWalletAddressParams struct {
Address string `json:"address" api:"required"`
// contains filtered or unexported fields
}
func (UserGetBySmartWalletAddressParams) MarshalJSON ¶
func (r UserGetBySmartWalletAddressParams) MarshalJSON() (data []byte, err error)
func (*UserGetBySmartWalletAddressParams) UnmarshalJSON ¶
func (r *UserGetBySmartWalletAddressParams) UnmarshalJSON(data []byte) error
type UserGetByTelegramUserIDParams ¶
type UserGetByTelegramUserIDParams struct {
TelegramUserID string `json:"telegram_user_id" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByTelegramUserIDParams) MarshalJSON ¶
func (r UserGetByTelegramUserIDParams) MarshalJSON() (data []byte, err error)
func (*UserGetByTelegramUserIDParams) UnmarshalJSON ¶
func (r *UserGetByTelegramUserIDParams) UnmarshalJSON(data []byte) error
type UserGetByTelegramUsernameParams ¶
type UserGetByTelegramUsernameParams struct {
Username string `json:"username" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByTelegramUsernameParams) MarshalJSON ¶
func (r UserGetByTelegramUsernameParams) MarshalJSON() (data []byte, err error)
func (*UserGetByTelegramUsernameParams) UnmarshalJSON ¶
func (r *UserGetByTelegramUsernameParams) UnmarshalJSON(data []byte) error
type UserGetByTwitterSubjectParams ¶
type UserGetByTwitterSubjectParams struct {
Subject string `json:"subject" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByTwitterSubjectParams) MarshalJSON ¶
func (r UserGetByTwitterSubjectParams) MarshalJSON() (data []byte, err error)
func (*UserGetByTwitterSubjectParams) UnmarshalJSON ¶
func (r *UserGetByTwitterSubjectParams) UnmarshalJSON(data []byte) error
type UserGetByTwitterUsernameParams ¶
type UserGetByTwitterUsernameParams struct {
Username string `json:"username" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByTwitterUsernameParams) MarshalJSON ¶
func (r UserGetByTwitterUsernameParams) MarshalJSON() (data []byte, err error)
func (*UserGetByTwitterUsernameParams) UnmarshalJSON ¶
func (r *UserGetByTwitterUsernameParams) UnmarshalJSON(data []byte) error
type UserGetByWalletAddressParams ¶
type UserGetByWalletAddressParams struct {
Address string `json:"address" api:"required"`
// contains filtered or unexported fields
}
func (UserGetByWalletAddressParams) MarshalJSON ¶
func (r UserGetByWalletAddressParams) MarshalJSON() (data []byte, err error)
func (*UserGetByWalletAddressParams) UnmarshalJSON ¶
func (r *UserGetByWalletAddressParams) UnmarshalJSON(data []byte) error
type UserInviteInputUnion ¶ added in v0.4.0
type UserInviteInputUnion struct {
OfEmail *EmailInviteInput `json:",omitzero,inline"`
OfEmailDomain *EmailDomainInviteInput `json:",omitzero,inline"`
OfWallet *WalletInviteInput `json:",omitzero,inline"`
OfPhone *PhoneInviteInput `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func UserInviteInputOfEmail ¶ added in v0.4.0
func UserInviteInputOfEmail(value string) UserInviteInputUnion
func UserInviteInputOfEmailDomain ¶ added in v0.6.0
func UserInviteInputOfEmailDomain(value EmailDomain) UserInviteInputUnion
func UserInviteInputOfPhone ¶ added in v0.4.0
func UserInviteInputOfPhone(value string) UserInviteInputUnion
func UserInviteInputOfWallet ¶ added in v0.4.0
func UserInviteInputOfWallet(value string) UserInviteInputUnion
func (UserInviteInputUnion) MarshalJSON ¶ added in v0.4.0
func (u UserInviteInputUnion) MarshalJSON() ([]byte, error)
func (*UserInviteInputUnion) UnmarshalJSON ¶ added in v0.4.0
func (u *UserInviteInputUnion) UnmarshalJSON(data []byte) error
type UserLinkedAccountWebhookPayload ¶ added in v0.7.0
type UserLinkedAccountWebhookPayload struct {
// A linked account for the user.
Account LinkedAccountUnion `json:"account" api:"required"`
// The type of webhook event.
//
// Any of "user.linked_account".
Type UserLinkedAccountWebhookPayloadType `json:"type" api:"required"`
// A Privy user object.
User User `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.linked_account webhook event.
func (UserLinkedAccountWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserLinkedAccountWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserLinkedAccountWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserLinkedAccountWebhookPayload) UnmarshalJSON(data []byte) error
type UserLinkedAccountWebhookPayloadType ¶ added in v0.7.0
type UserLinkedAccountWebhookPayloadType string
The type of webhook event.
const (
UserLinkedAccountWebhookPayloadTypeUserLinkedAccount UserLinkedAccountWebhookPayloadType = "user.linked_account"
)
type UserListParams ¶
type UserListParams struct {
Limit param.Opt[float64] `query:"limit,omitzero" json:"-"`
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (UserListParams) URLQuery ¶
func (r UserListParams) URLQuery() (v url.Values, err error)
URLQuery serializes UserListParams's query parameters as `url.Values`.
type UserNewParams ¶
type UserNewParams struct {
LinkedAccounts []LinkedAccountInputUnion `json:"linked_accounts,omitzero" api:"required"`
// Custom metadata associated with the user.
CustomMetadata CustomMetadata `json:"custom_metadata,omitzero"`
// Wallets to create for the user.
Wallets []UserNewParamsWallet `json:"wallets,omitzero"`
// contains filtered or unexported fields
}
func (UserNewParams) MarshalJSON ¶
func (r UserNewParams) MarshalJSON() (data []byte, err error)
func (*UserNewParams) UnmarshalJSON ¶
func (r *UserNewParams) UnmarshalJSON(data []byte) error
type UserNewParamsWallet ¶
type UserNewParamsWallet struct {
// The wallet chain types.
//
// Any of "ethereum", "solana", "cosmos", "stellar", "sui", "aptos", "movement",
// "tron", "bitcoin-segwit", "bitcoin-taproot", "pearl", "near", "ton", "starknet",
// "spark".
ChainType WalletChainType `json:"chain_type,omitzero" api:"required"`
// Create a smart wallet with this wallet as the signer. Only supported for wallets
// with `chain_type: "ethereum"`.
CreateSmartWallet param.Opt[bool] `json:"create_smart_wallet,omitzero"`
// Additional signers for the wallet.
AdditionalSigners []UserNewParamsWalletAdditionalSigner `json:"additional_signers,omitzero"`
// Policy IDs to enforce on the wallet. Currently, only one policy is supported per
// wallet.
PolicyIDs []string `json:"policy_ids,omitzero"`
// contains filtered or unexported fields
}
The property ChainType is required.
func (UserNewParamsWallet) MarshalJSON ¶
func (r UserNewParamsWallet) MarshalJSON() (data []byte, err error)
func (*UserNewParamsWallet) UnmarshalJSON ¶
func (r *UserNewParamsWallet) UnmarshalJSON(data []byte) error
type UserNewParamsWalletAdditionalSigner ¶
type UserNewParamsWalletAdditionalSigner struct {
// A unique identifier for a key quorum.
SignerID KeyQuorumID `json:"signer_id" api:"required" format:"cuid2"`
// The array of policy IDs that will be applied to wallet requests. If specified,
// this will override the base policy IDs set on the wallet. Currently, only one
// policy is supported per signer.
OverridePolicyIDs []string `json:"override_policy_ids,omitzero"`
// contains filtered or unexported fields
}
The property SignerID is required.
func (UserNewParamsWalletAdditionalSigner) MarshalJSON ¶
func (r UserNewParamsWalletAdditionalSigner) MarshalJSON() (data []byte, err error)
func (*UserNewParamsWalletAdditionalSigner) UnmarshalJSON ¶
func (r *UserNewParamsWalletAdditionalSigner) UnmarshalJSON(data []byte) error
type UserOperationCompletedWebhookPayload ¶ added in v0.7.0
type UserOperationCompletedWebhookPayload struct {
ActualGasCost string `json:"actual_gas_cost" api:"required"`
ActualGasUsed string `json:"actual_gas_used" api:"required"`
BlockNumber float64 `json:"block_number" api:"required"`
Caip2 string `json:"caip2" api:"required"`
LogIndex float64 `json:"log_index" api:"required"`
Nonce string `json:"nonce" api:"required"`
Paymaster string `json:"paymaster" api:"required"`
Sender string `json:"sender" api:"required"`
Success bool `json:"success" api:"required"`
TransactionHash string `json:"transaction_hash" api:"required"`
// The type of webhook event.
//
// Any of "user_operation.completed".
Type UserOperationCompletedWebhookPayloadType `json:"type" api:"required"`
UserOpHash string `json:"user_op_hash" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActualGasCost respjson.Field
ActualGasUsed respjson.Field
BlockNumber respjson.Field
Caip2 respjson.Field
LogIndex respjson.Field
Nonce respjson.Field
Paymaster respjson.Field
Sender respjson.Field
Success respjson.Field
TransactionHash respjson.Field
Type respjson.Field
UserOpHash respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user_operation.completed webhook event.
func (UserOperationCompletedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserOperationCompletedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserOperationCompletedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserOperationCompletedWebhookPayload) UnmarshalJSON(data []byte) error
type UserOperationCompletedWebhookPayloadType ¶ added in v0.7.0
type UserOperationCompletedWebhookPayloadType string
The type of webhook event.
const (
UserOperationCompletedWebhookPayloadTypeUserOperationCompleted UserOperationCompletedWebhookPayloadType = "user_operation.completed"
)
type UserOperationInput ¶ added in v0.4.0
type UserOperationInput struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
CallData Hex `json:"call_data" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
CallGasLimit Hex `json:"call_gas_limit" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
MaxFeePerGas Hex `json:"max_fee_per_gas" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
MaxPriorityFeePerGas Hex `json:"max_priority_fee_per_gas" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Nonce Hex `json:"nonce" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PreVerificationGas Hex `json:"pre_verification_gas" api:"required"`
Sender string `json:"sender" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
VerificationGasLimit Hex `json:"verification_gas_limit" api:"required"`
Factory param.Opt[string] `json:"factory,omitzero"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
FactoryData param.Opt[Hex] `json:"factory_data,omitzero"`
Paymaster param.Opt[string] `json:"paymaster,omitzero"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PaymasterData param.Opt[Hex] `json:"paymaster_data,omitzero"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PaymasterPostOpGasLimit param.Opt[Hex] `json:"paymaster_post_op_gas_limit,omitzero"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PaymasterVerificationGasLimit param.Opt[Hex] `json:"paymaster_verification_gas_limit,omitzero"`
// contains filtered or unexported fields
}
An ERC-4337 user operation.
The properties CallData, CallGasLimit, MaxFeePerGas, MaxPriorityFeePerGas, Nonce, PreVerificationGas, Sender, VerificationGasLimit are required.
func (UserOperationInput) MarshalJSON ¶ added in v0.6.0
func (r UserOperationInput) MarshalJSON() (data []byte, err error)
func (*UserOperationInput) UnmarshalJSON ¶ added in v0.4.0
func (r *UserOperationInput) UnmarshalJSON(data []byte) error
type UserOperationInputResp ¶ added in v0.6.0
type UserOperationInputResp struct {
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
CallData Hex `json:"call_data" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
CallGasLimit Hex `json:"call_gas_limit" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
MaxFeePerGas Hex `json:"max_fee_per_gas" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
MaxPriorityFeePerGas Hex `json:"max_priority_fee_per_gas" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
Nonce Hex `json:"nonce" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PreVerificationGas Hex `json:"pre_verification_gas" api:"required"`
Sender string `json:"sender" api:"required"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
VerificationGasLimit Hex `json:"verification_gas_limit" api:"required"`
Factory string `json:"factory"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
FactoryData Hex `json:"factory_data"`
Paymaster string `json:"paymaster"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PaymasterData Hex `json:"paymaster_data"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PaymasterPostOpGasLimit Hex `json:"paymaster_post_op_gas_limit"`
// A hex-encoded string prefixed with '0x', capped at 300002 characters (150,000
// bytes).
PaymasterVerificationGasLimit Hex `json:"paymaster_verification_gas_limit"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CallData respjson.Field
CallGasLimit respjson.Field
MaxFeePerGas respjson.Field
MaxPriorityFeePerGas respjson.Field
Nonce respjson.Field
PreVerificationGas respjson.Field
Sender respjson.Field
VerificationGasLimit respjson.Field
Factory respjson.Field
FactoryData respjson.Field
Paymaster respjson.Field
PaymasterData respjson.Field
PaymasterPostOpGasLimit respjson.Field
PaymasterVerificationGasLimit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An ERC-4337 user operation.
func (UserOperationInputResp) RawJSON ¶ added in v0.6.0
func (r UserOperationInputResp) RawJSON() string
Returns the unmodified JSON received from the API
func (UserOperationInputResp) ToParam ¶ added in v0.6.0
func (r UserOperationInputResp) ToParam() UserOperationInput
ToParam converts this UserOperationInputResp to a UserOperationInput.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UserOperationInput.Overrides()
func (*UserOperationInputResp) UnmarshalJSON ¶ added in v0.6.0
func (r *UserOperationInputResp) UnmarshalJSON(data []byte) error
type UserOwnedRecoveryOption ¶ added in v0.4.0
type UserOwnedRecoveryOption string
A user-owned recovery option for embedded wallets.
const ( UserOwnedRecoveryOptionUserPasscode UserOwnedRecoveryOption = "user-passcode" UserOwnedRecoveryOptionGoogleDrive UserOwnedRecoveryOption = "google-drive" UserOwnedRecoveryOptionICloud UserOwnedRecoveryOption = "icloud" )
type UserPregenerateWalletsParams ¶
type UserPregenerateWalletsParams struct {
Wallets []WalletCreationInput `json:"wallets,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (UserPregenerateWalletsParams) MarshalJSON ¶
func (r UserPregenerateWalletsParams) MarshalJSON() (data []byte, err error)
func (*UserPregenerateWalletsParams) UnmarshalJSON ¶
func (r *UserPregenerateWalletsParams) UnmarshalJSON(data []byte) error
type UserReference ¶ added in v0.11.0
type UserReference struct {
ID string `json:"id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A reference to a user by their unique identifier.
func (UserReference) RawJSON ¶ added in v0.11.0
func (r UserReference) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserReference) UnmarshalJSON ¶ added in v0.11.0
func (r *UserReference) UnmarshalJSON(data []byte) error
type UserSearchParams ¶
type UserSearchParams struct {
// This field is a request body variant, only one variant field can be set.
OfSearchTerm *UserSearchParamsBodySearchTerm `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfObject *UserSearchParamsBodyObject `json:",inline"`
// contains filtered or unexported fields
}
func (UserSearchParams) MarshalJSON ¶
func (u UserSearchParams) MarshalJSON() ([]byte, error)
func (*UserSearchParams) UnmarshalJSON ¶
func (r *UserSearchParams) UnmarshalJSON(data []byte) error
type UserSearchParamsBodyObject ¶
type UserSearchParamsBodyObject struct {
Emails []string `json:"emails,omitzero" api:"required" format:"email"`
PhoneNumbers []string `json:"phoneNumbers,omitzero" api:"required"`
WalletAddresses []string `json:"walletAddresses,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Emails, PhoneNumbers, WalletAddresses are required.
func (UserSearchParamsBodyObject) MarshalJSON ¶
func (r UserSearchParamsBodyObject) MarshalJSON() (data []byte, err error)
func (*UserSearchParamsBodyObject) UnmarshalJSON ¶
func (r *UserSearchParamsBodyObject) UnmarshalJSON(data []byte) error
type UserSearchParamsBodySearchTerm ¶
type UserSearchParamsBodySearchTerm struct {
SearchTerm string `json:"searchTerm" api:"required"`
// contains filtered or unexported fields
}
The property SearchTerm is required.
func (UserSearchParamsBodySearchTerm) MarshalJSON ¶
func (r UserSearchParamsBodySearchTerm) MarshalJSON() (data []byte, err error)
func (*UserSearchParamsBodySearchTerm) UnmarshalJSON ¶
func (r *UserSearchParamsBodySearchTerm) UnmarshalJSON(data []byte) error
type UserService ¶
type UserService struct {
Options []option.RequestOption
}
Operations related to users
UserService contains methods and other services that help with interacting with the Privy API 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 NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r UserService)
NewUserService 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 (*UserService) Delete ¶
func (r *UserService) Delete(ctx context.Context, userID string, opts ...option.RequestOption) (err error)
Delete a user by user ID.
func (*UserService) Get ¶
func (r *UserService) Get(ctx context.Context, userID string, opts ...option.RequestOption) (res *User, err error)
Get a user by user ID.
func (*UserService) GetByCustomAuthID ¶
func (r *UserService) GetByCustomAuthID(ctx context.Context, body UserGetByCustomAuthIDParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their custom auth ID.
func (*UserService) GetByDiscordUsername ¶
func (r *UserService) GetByDiscordUsername(ctx context.Context, body UserGetByDiscordUsernameParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Discord username.
func (*UserService) GetByEmailAddress ¶
func (r *UserService) GetByEmailAddress(ctx context.Context, body UserGetByEmailAddressParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their email address.
func (*UserService) GetByFarcasterID ¶
func (r *UserService) GetByFarcasterID(ctx context.Context, body UserGetByFarcasterIDParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Farcaster ID.
func (*UserService) GetByGitHubUsername ¶
func (r *UserService) GetByGitHubUsername(ctx context.Context, body UserGetByGitHubUsernameParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Github username.
func (*UserService) GetByPhoneNumber ¶
func (r *UserService) GetByPhoneNumber(ctx context.Context, body UserGetByPhoneNumberParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their phone number.
func (*UserService) GetBySmartWalletAddress ¶
func (r *UserService) GetBySmartWalletAddress(ctx context.Context, body UserGetBySmartWalletAddressParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their smart wallet address.
func (*UserService) GetByTelegramUserID ¶
func (r *UserService) GetByTelegramUserID(ctx context.Context, body UserGetByTelegramUserIDParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Telegram user ID.
func (*UserService) GetByTelegramUsername ¶
func (r *UserService) GetByTelegramUsername(ctx context.Context, body UserGetByTelegramUsernameParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Telegram username.
func (*UserService) GetByTwitterSubject ¶
func (r *UserService) GetByTwitterSubject(ctx context.Context, body UserGetByTwitterSubjectParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Twitter subject.
func (*UserService) GetByTwitterUsername ¶
func (r *UserService) GetByTwitterUsername(ctx context.Context, body UserGetByTwitterUsernameParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their Twitter username.
func (*UserService) GetByWalletAddress ¶
func (r *UserService) GetByWalletAddress(ctx context.Context, body UserGetByWalletAddressParams, opts ...option.RequestOption) (res *User, err error)
Looks up a user by their wallet address.
func (*UserService) List ¶
func (r *UserService) List(ctx context.Context, query UserListParams, opts ...option.RequestOption) (res *pagination.Cursor[User], err error)
Get all users in your app.
func (*UserService) ListAutoPaging ¶
func (r *UserService) ListAutoPaging(ctx context.Context, query UserListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[User]
Get all users in your app.
func (*UserService) New ¶
func (r *UserService) New(ctx context.Context, body UserNewParams, opts ...option.RequestOption) (res *User, err error)
Create a new user with linked accounts. Optionally pre-generate embedded wallets for the user.
func (*UserService) PregenerateWallets ¶
func (r *UserService) PregenerateWallets(ctx context.Context, userID string, body UserPregenerateWalletsParams, opts ...option.RequestOption) (res *User, err error)
Creates an embedded wallet for an existing user.
func (*UserService) Search ¶
func (r *UserService) Search(ctx context.Context, body UserSearchParams, opts ...option.RequestOption) (res *User, err error)
Search users by search term, emails, phone numbers, or wallet addresses.
func (*UserService) SetCustomMetadata ¶
func (r *UserService) SetCustomMetadata(ctx context.Context, userID string, body UserSetCustomMetadataParams, opts ...option.RequestOption) (res *User, err error)
Adds custom metadata to a user by user ID.
func (*UserService) UnlinkLinkedAccount ¶
func (r *UserService) UnlinkLinkedAccount(ctx context.Context, userID string, body UserUnlinkLinkedAccountParams, opts ...option.RequestOption) (res *User, err error)
Unlinks a user linked account.
type UserSetCustomMetadataParams ¶
type UserSetCustomMetadataParams struct {
// Custom metadata associated with the user.
CustomMetadata CustomMetadata `json:"custom_metadata,omitzero" api:"required"`
// contains filtered or unexported fields
}
func (UserSetCustomMetadataParams) MarshalJSON ¶
func (r UserSetCustomMetadataParams) MarshalJSON() (data []byte, err error)
func (*UserSetCustomMetadataParams) UnmarshalJSON ¶
func (r *UserSetCustomMetadataParams) UnmarshalJSON(data []byte) error
type UserTransferredAccountWebhookPayload ¶ added in v0.7.0
type UserTransferredAccountWebhookPayload struct {
// A linked account for the user.
Account LinkedAccountUnion `json:"account" api:"required"`
// Any of true.
DeletedUser bool `json:"deletedUser" api:"required"`
// A reference to a user by their unique identifier.
FromUser UserReference `json:"fromUser" api:"required"`
// A Privy user object.
ToUser User `json:"toUser" api:"required"`
// The type of webhook event.
//
// Any of "user.transferred_account".
Type UserTransferredAccountWebhookPayloadType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
DeletedUser respjson.Field
FromUser respjson.Field
ToUser respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.transferred_account webhook event.
func (UserTransferredAccountWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserTransferredAccountWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserTransferredAccountWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserTransferredAccountWebhookPayload) UnmarshalJSON(data []byte) error
type UserTransferredAccountWebhookPayloadType ¶ added in v0.7.0
type UserTransferredAccountWebhookPayloadType string
The type of webhook event.
const (
UserTransferredAccountWebhookPayloadTypeUserTransferredAccount UserTransferredAccountWebhookPayloadType = "user.transferred_account"
)
type UserUnlinkLinkedAccountParams ¶
type UserUnlinkLinkedAccountParams struct {
Handle string `json:"handle" api:"required"`
// The possible types of linked accounts.
Type LinkedAccountType `json:"type,omitzero" api:"required"`
Provider param.Opt[string] `json:"provider,omitzero"`
// contains filtered or unexported fields
}
func (UserUnlinkLinkedAccountParams) MarshalJSON ¶
func (r UserUnlinkLinkedAccountParams) MarshalJSON() (data []byte, err error)
func (*UserUnlinkLinkedAccountParams) UnmarshalJSON ¶
func (r *UserUnlinkLinkedAccountParams) UnmarshalJSON(data []byte) error
type UserUnlinkedAccountWebhookPayload ¶ added in v0.7.0
type UserUnlinkedAccountWebhookPayload struct {
// A linked account for the user.
Account LinkedAccountUnion `json:"account" api:"required"`
// The type of webhook event.
//
// Any of "user.unlinked_account".
Type UserUnlinkedAccountWebhookPayloadType `json:"type" api:"required"`
// A Privy user object.
User User `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.unlinked_account webhook event.
func (UserUnlinkedAccountWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserUnlinkedAccountWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserUnlinkedAccountWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserUnlinkedAccountWebhookPayload) UnmarshalJSON(data []byte) error
type UserUnlinkedAccountWebhookPayloadType ¶ added in v0.7.0
type UserUnlinkedAccountWebhookPayloadType string
The type of webhook event.
const (
UserUnlinkedAccountWebhookPayloadTypeUserUnlinkedAccount UserUnlinkedAccountWebhookPayloadType = "user.unlinked_account"
)
type UserUpdatedAccountWebhookPayload ¶ added in v0.7.0
type UserUpdatedAccountWebhookPayload struct {
// A linked account for the user.
Account LinkedAccountUnion `json:"account" api:"required"`
// The type of webhook event.
//
// Any of "user.updated_account".
Type UserUpdatedAccountWebhookPayloadType `json:"type" api:"required"`
// A Privy user object.
User User `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Type respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.updated_account webhook event.
func (UserUpdatedAccountWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserUpdatedAccountWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserUpdatedAccountWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserUpdatedAccountWebhookPayload) UnmarshalJSON(data []byte) error
type UserUpdatedAccountWebhookPayloadType ¶ added in v0.7.0
type UserUpdatedAccountWebhookPayloadType string
The type of webhook event.
const (
UserUpdatedAccountWebhookPayloadTypeUserUpdatedAccount UserUpdatedAccountWebhookPayloadType = "user.updated_account"
)
type UserWalletCreatedWebhookPayload ¶ added in v0.7.0
type UserWalletCreatedWebhookPayload struct {
// The type of webhook event.
//
// Any of "user.wallet_created".
Type UserWalletCreatedWebhookPayloadType `json:"type" api:"required"`
// A Privy user object.
User User `json:"user" api:"required"`
// Base schema for wallet accounts linked to the user.
Wallet LinkedAccountBaseWallet `json:"wallet" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Type respjson.Field
User respjson.Field
Wallet respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the user.wallet_created webhook event.
func (UserWalletCreatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r UserWalletCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*UserWalletCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *UserWalletCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type UserWalletCreatedWebhookPayloadType ¶ added in v0.7.0
type UserWalletCreatedWebhookPayloadType string
The type of webhook event.
const (
UserWalletCreatedWebhookPayloadTypeUserWalletCreated UserWalletCreatedWebhookPayloadType = "user.wallet_created"
)
type VerifyInput ¶ added in v0.7.0
type VerifyInput struct {
// Payload is the raw request body bytes. Must not be modified.
Payload []byte
// Headers are the HTTP request headers. Must include svix-id, svix-timestamp, svix-signature.
Headers http.Header
// SigningSecret is an optional per-call override for the webhook signing secret.
// Falls back to the client-level secret if empty.
SigningSecret string
}
VerifyInput contains the parameters for webhook verification.
type Wallet ¶
type Wallet struct {
// Unique ID of the wallet. This will be the primary identifier when using the
// wallet in the future.
ID string `json:"id" api:"required"`
// Additional signers for the wallet.
AdditionalSigners WalletAdditionalSigner `json:"additional_signers" api:"required"`
// Address of the wallet.
Address string `json:"address" api:"required"`
// The wallet chain types.
//
// Any of "ethereum", "solana", "cosmos", "stellar", "sui", "aptos", "movement",
// "tron", "bitcoin-segwit", "bitcoin-taproot", "pearl", "near", "ton", "starknet",
// "spark".
ChainType WalletChainType `json:"chain_type" api:"required"`
// Unix timestamp of when the wallet was created in milliseconds.
CreatedAt float64 `json:"created_at" api:"required"`
// Unix timestamp of when the wallet was exported in milliseconds, if the wallet
// was exported.
ExportedAt float64 `json:"exported_at" api:"required"`
// Unix timestamp of when the wallet was imported in milliseconds, if the wallet
// was imported.
ImportedAt float64 `json:"imported_at" api:"required"`
// The key quorum ID of the owner of the wallet.
OwnerID string `json:"owner_id" api:"required" format:"cuid2"`
// List of policy IDs for policies that are enforced on the wallet.
PolicyIDs []string `json:"policy_ids" api:"required"`
// Unix timestamp of when the wallet was archived in milliseconds, or null if the
// wallet is active.
ArchivedAt float64 `json:"archived_at" api:"nullable"`
// The number of keys that must sign for an action to be valid.
AuthorizationThreshold float64 `json:"authorization_threshold"`
// Information about the custodian managing this wallet.
Custody WalletCustodian `json:"custody"`
// A human-readable label for the wallet.
DisplayName string `json:"display_name"`
// A customer-provided identifier for mapping to external systems. Write-once, set
// only at creation.
ExternalID string `json:"external_id"`
// The compressed, raw public key for the wallet along the chain cryptographic
// curve.
PublicKey string `json:"public_key"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AdditionalSigners respjson.Field
Address respjson.Field
ChainType respjson.Field
CreatedAt respjson.Field
ExportedAt respjson.Field
ImportedAt respjson.Field
OwnerID respjson.Field
PolicyIDs respjson.Field
ArchivedAt respjson.Field
AuthorizationThreshold respjson.Field
Custody respjson.Field
DisplayName respjson.Field
ExternalID respjson.Field
PublicKey respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A wallet managed by Privy's wallet infrastructure.
func (*Wallet) UnmarshalJSON ¶
type WalletActionEarnDepositCreatedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnDepositCreatedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Base-unit amount of asset deposited (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "pending".
Status WalletActionEarnDepositCreatedWebhookPayloadStatus `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_deposit.created".
Type WalletActionEarnDepositCreatedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
Status respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_deposit.created webhook event.
func (WalletActionEarnDepositCreatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnDepositCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnDepositCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnDepositCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnDepositCreatedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnDepositCreatedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnDepositCreatedWebhookPayloadStatusPending WalletActionEarnDepositCreatedWebhookPayloadStatus = "pending"
)
type WalletActionEarnDepositCreatedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnDepositCreatedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnDepositCreatedWebhookPayloadTypeWalletActionEarnDepositCreated WalletActionEarnDepositCreatedWebhookPayloadType = "wallet_action.earn_deposit.created"
)
type WalletActionEarnDepositFailedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnDepositFailedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// ISO 8601 timestamp of when the wallet action failed.
FailedAt string `json:"failed_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Base-unit amount of asset deposited (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "failed".
Status WalletActionEarnDepositFailedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action. Completed steps will have transaction hashes;
// the failing step will have a failure_reason.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_deposit.failed".
Type WalletActionEarnDepositFailedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
FailedAt respjson.Field
FailureReason respjson.Field
RawAmount respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_deposit.failed webhook event.
func (WalletActionEarnDepositFailedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnDepositFailedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnDepositFailedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnDepositFailedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnDepositFailedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnDepositFailedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnDepositFailedWebhookPayloadStatusFailed WalletActionEarnDepositFailedWebhookPayloadStatus = "failed"
)
type WalletActionEarnDepositFailedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnDepositFailedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnDepositFailedWebhookPayloadTypeWalletActionEarnDepositFailed WalletActionEarnDepositFailedWebhookPayloadType = "wallet_action.earn_deposit.failed"
)
type WalletActionEarnDepositRejectedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnDepositRejectedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Base-unit amount of asset deposited (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// ISO 8601 timestamp of when the wallet action was rejected.
RejectedAt string `json:"rejected_at" api:"required"`
// The status of the wallet action.
//
// Any of "rejected".
Status WalletActionEarnDepositRejectedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action at the time of rejection.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_deposit.rejected".
Type WalletActionEarnDepositRejectedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
FailureReason respjson.Field
RawAmount respjson.Field
RejectedAt respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_deposit.rejected webhook event.
func (WalletActionEarnDepositRejectedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnDepositRejectedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnDepositRejectedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnDepositRejectedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnDepositRejectedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnDepositRejectedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnDepositRejectedWebhookPayloadStatusRejected WalletActionEarnDepositRejectedWebhookPayloadStatus = "rejected"
)
type WalletActionEarnDepositRejectedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnDepositRejectedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnDepositRejectedWebhookPayloadTypeWalletActionEarnDepositRejected WalletActionEarnDepositRejectedWebhookPayloadType = "wallet_action.earn_deposit.rejected"
)
type WalletActionEarnDepositSucceededWebhookPayload ¶ added in v0.7.0
type WalletActionEarnDepositSucceededWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action completed successfully.
CompletedAt string `json:"completed_at" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Base-unit amount of asset deposited (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
ShareAmount string `json:"share_amount" api:"required"`
// The status of the wallet action.
//
// Any of "succeeded".
Status WalletActionEarnDepositSucceededWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action, including transaction hashes.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_deposit.succeeded".
Type WalletActionEarnDepositSucceededWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset deposited (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
ShareAmount respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_deposit.succeeded webhook event.
func (WalletActionEarnDepositSucceededWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnDepositSucceededWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnDepositSucceededWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnDepositSucceededWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnDepositSucceededWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnDepositSucceededWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnDepositSucceededWebhookPayloadStatusSucceeded WalletActionEarnDepositSucceededWebhookPayloadStatus = "succeeded"
)
type WalletActionEarnDepositSucceededWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnDepositSucceededWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnDepositSucceededWebhookPayloadTypeWalletActionEarnDepositSucceeded WalletActionEarnDepositSucceededWebhookPayloadType = "wallet_action.earn_deposit.succeeded"
)
type WalletActionEarnFeeCollectCreatedWebhookPayload ¶ added in v0.13.0
type WalletActionEarnFeeCollectCreatedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Base-unit amount of fees collected (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "pending".
Status WalletActionEarnFeeCollectCreatedWebhookPayloadStatus `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_fee_collect.created".
Type WalletActionEarnFeeCollectCreatedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
Status respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_fee_collect.created webhook event.
func (WalletActionEarnFeeCollectCreatedWebhookPayload) RawJSON ¶ added in v0.13.0
func (r WalletActionEarnFeeCollectCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnFeeCollectCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.13.0
func (r *WalletActionEarnFeeCollectCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnFeeCollectCreatedWebhookPayloadStatus ¶ added in v0.13.0
type WalletActionEarnFeeCollectCreatedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnFeeCollectCreatedWebhookPayloadStatusPending WalletActionEarnFeeCollectCreatedWebhookPayloadStatus = "pending"
)
type WalletActionEarnFeeCollectCreatedWebhookPayloadType ¶ added in v0.13.0
type WalletActionEarnFeeCollectCreatedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnFeeCollectCreatedWebhookPayloadTypeWalletActionEarnFeeCollectCreated WalletActionEarnFeeCollectCreatedWebhookPayloadType = "wallet_action.earn_fee_collect.created"
)
type WalletActionEarnFeeCollectFailedWebhookPayload ¶ added in v0.13.0
type WalletActionEarnFeeCollectFailedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// ISO 8601 timestamp of when the wallet action failed.
FailedAt string `json:"failed_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Base-unit amount of fees collected (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "failed".
Status WalletActionEarnFeeCollectFailedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action. Completed steps will have transaction hashes;
// the failing step will have a failure_reason.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_fee_collect.failed".
Type WalletActionEarnFeeCollectFailedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
FailedAt respjson.Field
FailureReason respjson.Field
RawAmount respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_fee_collect.failed webhook event.
func (WalletActionEarnFeeCollectFailedWebhookPayload) RawJSON ¶ added in v0.13.0
func (r WalletActionEarnFeeCollectFailedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnFeeCollectFailedWebhookPayload) UnmarshalJSON ¶ added in v0.13.0
func (r *WalletActionEarnFeeCollectFailedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnFeeCollectFailedWebhookPayloadStatus ¶ added in v0.13.0
type WalletActionEarnFeeCollectFailedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnFeeCollectFailedWebhookPayloadStatusFailed WalletActionEarnFeeCollectFailedWebhookPayloadStatus = "failed"
)
type WalletActionEarnFeeCollectFailedWebhookPayloadType ¶ added in v0.13.0
type WalletActionEarnFeeCollectFailedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnFeeCollectFailedWebhookPayloadTypeWalletActionEarnFeeCollectFailed WalletActionEarnFeeCollectFailedWebhookPayloadType = "wallet_action.earn_fee_collect.failed"
)
type WalletActionEarnFeeCollectRejectedWebhookPayload ¶ added in v0.13.0
type WalletActionEarnFeeCollectRejectedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Base-unit amount of fees collected (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// ISO 8601 timestamp of when the wallet action was rejected.
RejectedAt string `json:"rejected_at" api:"required"`
// The status of the wallet action.
//
// Any of "rejected".
Status WalletActionEarnFeeCollectRejectedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action at the time of rejection.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_fee_collect.rejected".
Type WalletActionEarnFeeCollectRejectedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
FailureReason respjson.Field
RawAmount respjson.Field
RejectedAt respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_fee_collect.rejected webhook event.
func (WalletActionEarnFeeCollectRejectedWebhookPayload) RawJSON ¶ added in v0.13.0
func (r WalletActionEarnFeeCollectRejectedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnFeeCollectRejectedWebhookPayload) UnmarshalJSON ¶ added in v0.13.0
func (r *WalletActionEarnFeeCollectRejectedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnFeeCollectRejectedWebhookPayloadStatus ¶ added in v0.13.0
type WalletActionEarnFeeCollectRejectedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnFeeCollectRejectedWebhookPayloadStatusRejected WalletActionEarnFeeCollectRejectedWebhookPayloadStatus = "rejected"
)
type WalletActionEarnFeeCollectRejectedWebhookPayloadType ¶ added in v0.13.0
type WalletActionEarnFeeCollectRejectedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnFeeCollectRejectedWebhookPayloadTypeWalletActionEarnFeeCollectRejected WalletActionEarnFeeCollectRejectedWebhookPayloadType = "wallet_action.earn_fee_collect.rejected"
)
type WalletActionEarnFeeCollectSucceededWebhookPayload ¶ added in v0.13.0
type WalletActionEarnFeeCollectSucceededWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action completed successfully.
CompletedAt string `json:"completed_at" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Base-unit amount of fees collected (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "succeeded".
Status WalletActionEarnFeeCollectSucceededWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action, including transaction hashes.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_fee_collect.succeeded".
Type WalletActionEarnFeeCollectSucceededWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of fees collected (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_fee_collect.succeeded webhook event.
func (WalletActionEarnFeeCollectSucceededWebhookPayload) RawJSON ¶ added in v0.13.0
func (r WalletActionEarnFeeCollectSucceededWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnFeeCollectSucceededWebhookPayload) UnmarshalJSON ¶ added in v0.13.0
func (r *WalletActionEarnFeeCollectSucceededWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnFeeCollectSucceededWebhookPayloadStatus ¶ added in v0.13.0
type WalletActionEarnFeeCollectSucceededWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnFeeCollectSucceededWebhookPayloadStatusSucceeded WalletActionEarnFeeCollectSucceededWebhookPayloadStatus = "succeeded"
)
type WalletActionEarnFeeCollectSucceededWebhookPayloadType ¶ added in v0.13.0
type WalletActionEarnFeeCollectSucceededWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnFeeCollectSucceededWebhookPayloadTypeWalletActionEarnFeeCollectSucceeded WalletActionEarnFeeCollectSucceededWebhookPayloadType = "wallet_action.earn_fee_collect.succeeded"
)
type WalletActionEarnIncentiveClaimCreatedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimCreatedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// EVM chain name (e.g. "tempo", "base").
Chain string `json:"chain" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Claimed reward tokens. Populated after the preparation step fetches from Merkl.
Rewards []EarnIncetiveClaimRewardEntry `json:"rewards" api:"required"`
// The status of the wallet action.
//
// Any of "pending".
Status WalletActionEarnIncentiveClaimCreatedWebhookPayloadStatus `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_incentive_claim.created".
Type WalletActionEarnIncentiveClaimCreatedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
Chain respjson.Field
CreatedAt respjson.Field
Rewards respjson.Field
Status respjson.Field
Type respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_incentive_claim.created webhook event.
func (WalletActionEarnIncentiveClaimCreatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnIncentiveClaimCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnIncentiveClaimCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnIncentiveClaimCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnIncentiveClaimCreatedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimCreatedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnIncentiveClaimCreatedWebhookPayloadStatusPending WalletActionEarnIncentiveClaimCreatedWebhookPayloadStatus = "pending"
)
type WalletActionEarnIncentiveClaimCreatedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimCreatedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnIncentiveClaimCreatedWebhookPayloadTypeWalletActionEarnIncentiveClaimCreated WalletActionEarnIncentiveClaimCreatedWebhookPayloadType = "wallet_action.earn_incentive_claim.created"
)
type WalletActionEarnIncentiveClaimFailedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimFailedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// EVM chain name (e.g. "tempo", "base").
Chain string `json:"chain" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// ISO 8601 timestamp of when the wallet action failed.
FailedAt string `json:"failed_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Claimed reward tokens. Populated after the preparation step fetches from Merkl.
Rewards []EarnIncetiveClaimRewardEntry `json:"rewards" api:"required"`
// The status of the wallet action.
//
// Any of "failed".
Status WalletActionEarnIncentiveClaimFailedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action. Completed steps will have transaction hashes;
// the failing step will have a failure_reason.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_incentive_claim.failed".
Type WalletActionEarnIncentiveClaimFailedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
Chain respjson.Field
CreatedAt respjson.Field
FailedAt respjson.Field
FailureReason respjson.Field
Rewards respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_incentive_claim.failed webhook event.
func (WalletActionEarnIncentiveClaimFailedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnIncentiveClaimFailedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnIncentiveClaimFailedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnIncentiveClaimFailedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnIncentiveClaimFailedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimFailedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnIncentiveClaimFailedWebhookPayloadStatusFailed WalletActionEarnIncentiveClaimFailedWebhookPayloadStatus = "failed"
)
type WalletActionEarnIncentiveClaimFailedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimFailedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnIncentiveClaimFailedWebhookPayloadTypeWalletActionEarnIncentiveClaimFailed WalletActionEarnIncentiveClaimFailedWebhookPayloadType = "wallet_action.earn_incentive_claim.failed"
)
type WalletActionEarnIncentiveClaimRejectedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimRejectedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// EVM chain name (e.g. "tempo", "base").
Chain string `json:"chain" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// ISO 8601 timestamp of when the wallet action was rejected.
RejectedAt string `json:"rejected_at" api:"required"`
// Claimed reward tokens. Populated after the preparation step fetches from Merkl.
Rewards []EarnIncetiveClaimRewardEntry `json:"rewards" api:"required"`
// The status of the wallet action.
//
// Any of "rejected".
Status WalletActionEarnIncentiveClaimRejectedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action at the time of rejection.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_incentive_claim.rejected".
Type WalletActionEarnIncentiveClaimRejectedWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
Chain respjson.Field
CreatedAt respjson.Field
FailureReason respjson.Field
RejectedAt respjson.Field
Rewards respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_incentive_claim.rejected webhook event.
func (WalletActionEarnIncentiveClaimRejectedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnIncentiveClaimRejectedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnIncentiveClaimRejectedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnIncentiveClaimRejectedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnIncentiveClaimRejectedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimRejectedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnIncentiveClaimRejectedWebhookPayloadStatusRejected WalletActionEarnIncentiveClaimRejectedWebhookPayloadStatus = "rejected"
)
type WalletActionEarnIncentiveClaimRejectedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimRejectedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnIncentiveClaimRejectedWebhookPayloadTypeWalletActionEarnIncentiveClaimRejected WalletActionEarnIncentiveClaimRejectedWebhookPayloadType = "wallet_action.earn_incentive_claim.rejected"
)
type WalletActionEarnIncentiveClaimSucceededWebhookPayload ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimSucceededWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// EVM chain name (e.g. "tempo", "base").
Chain string `json:"chain" api:"required"`
// ISO 8601 timestamp of when the wallet action completed successfully.
CompletedAt string `json:"completed_at" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Claimed reward tokens. Populated after the preparation step fetches from Merkl.
Rewards []EarnIncetiveClaimRewardEntry `json:"rewards" api:"required"`
// The status of the wallet action.
//
// Any of "succeeded".
Status WalletActionEarnIncentiveClaimSucceededWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action, including transaction hashes.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_incentive_claim.succeeded".
Type WalletActionEarnIncentiveClaimSucceededWebhookPayloadType `json:"type" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
Chain respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
Rewards respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_incentive_claim.succeeded webhook event.
func (WalletActionEarnIncentiveClaimSucceededWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnIncentiveClaimSucceededWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnIncentiveClaimSucceededWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnIncentiveClaimSucceededWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnIncentiveClaimSucceededWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimSucceededWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnIncentiveClaimSucceededWebhookPayloadStatusSucceeded WalletActionEarnIncentiveClaimSucceededWebhookPayloadStatus = "succeeded"
)
type WalletActionEarnIncentiveClaimSucceededWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnIncentiveClaimSucceededWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnIncentiveClaimSucceededWebhookPayloadTypeWalletActionEarnIncentiveClaimSucceeded WalletActionEarnIncentiveClaimSucceededWebhookPayloadType = "wallet_action.earn_incentive_claim.succeeded"
)
type WalletActionEarnWithdrawCreatedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnWithdrawCreatedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Base-unit amount of asset withdrawn (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "pending".
Status WalletActionEarnWithdrawCreatedWebhookPayloadStatus `json:"status" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_withdraw.created".
Type WalletActionEarnWithdrawCreatedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
Status respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_withdraw.created webhook event.
func (WalletActionEarnWithdrawCreatedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnWithdrawCreatedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnWithdrawCreatedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnWithdrawCreatedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnWithdrawCreatedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnWithdrawCreatedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnWithdrawCreatedWebhookPayloadStatusPending WalletActionEarnWithdrawCreatedWebhookPayloadStatus = "pending"
)
type WalletActionEarnWithdrawCreatedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnWithdrawCreatedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnWithdrawCreatedWebhookPayloadTypeWalletActionEarnWithdrawCreated WalletActionEarnWithdrawCreatedWebhookPayloadType = "wallet_action.earn_withdraw.created"
)
type WalletActionEarnWithdrawFailedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnWithdrawFailedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// ISO 8601 timestamp of when the wallet action failed.
FailedAt string `json:"failed_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Base-unit amount of asset withdrawn (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// The status of the wallet action.
//
// Any of "failed".
Status WalletActionEarnWithdrawFailedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action. Completed steps will have transaction hashes;
// the failing step will have a failure_reason.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_withdraw.failed".
Type WalletActionEarnWithdrawFailedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
FailedAt respjson.Field
FailureReason respjson.Field
RawAmount respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_withdraw.failed webhook event.
func (WalletActionEarnWithdrawFailedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnWithdrawFailedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnWithdrawFailedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnWithdrawFailedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnWithdrawFailedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnWithdrawFailedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnWithdrawFailedWebhookPayloadStatusFailed WalletActionEarnWithdrawFailedWebhookPayloadStatus = "failed"
)
type WalletActionEarnWithdrawFailedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnWithdrawFailedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnWithdrawFailedWebhookPayloadTypeWalletActionEarnWithdrawFailed WalletActionEarnWithdrawFailedWebhookPayloadType = "wallet_action.earn_withdraw.failed"
)
type WalletActionEarnWithdrawRejectedWebhookPayload ¶ added in v0.7.0
type WalletActionEarnWithdrawRejectedWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// A description of why a wallet action (or a step within a wallet action) failed.
FailureReason FailureReason `json:"failure_reason" api:"required"`
// Base-unit amount of asset withdrawn (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
// ISO 8601 timestamp of when the wallet action was rejected.
RejectedAt string `json:"rejected_at" api:"required"`
// The status of the wallet action.
//
// Any of "rejected".
Status WalletActionEarnWithdrawRejectedWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action at the time of rejection.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_withdraw.rejected".
Type WalletActionEarnWithdrawRejectedWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CreatedAt respjson.Field
FailureReason respjson.Field
RawAmount respjson.Field
RejectedAt respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_withdraw.rejected webhook event.
func (WalletActionEarnWithdrawRejectedWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnWithdrawRejectedWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnWithdrawRejectedWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnWithdrawRejectedWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnWithdrawRejectedWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnWithdrawRejectedWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnWithdrawRejectedWebhookPayloadStatusRejected WalletActionEarnWithdrawRejectedWebhookPayloadStatus = "rejected"
)
type WalletActionEarnWithdrawRejectedWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnWithdrawRejectedWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnWithdrawRejectedWebhookPayloadTypeWalletActionEarnWithdrawRejected WalletActionEarnWithdrawRejectedWebhookPayloadType = "wallet_action.earn_withdraw.rejected"
)
type WalletActionEarnWithdrawSucceededWebhookPayload ¶ added in v0.7.0
type WalletActionEarnWithdrawSucceededWebhookPayload struct {
// Type of wallet action
//
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
ActionType WalletActionType `json:"action_type" api:"required"`
// Underlying asset token address.
AssetAddress string `json:"asset_address" api:"required"`
// CAIP-2 chain identifier.
Caip2 string `json:"caip2" api:"required"`
// ISO 8601 timestamp of when the wallet action completed successfully.
CompletedAt string `json:"completed_at" api:"required"`
// ISO 8601 timestamp of when the wallet action was created.
CreatedAt string `json:"created_at" api:"required"`
// Base-unit amount of asset withdrawn (e.g. "1500000").
RawAmount string `json:"raw_amount" api:"required"`
ShareAmount string `json:"share_amount" api:"required"`
// The status of the wallet action.
//
// Any of "succeeded".
Status WalletActionEarnWithdrawSucceededWebhookPayloadStatus `json:"status" api:"required"`
// The steps of the wallet action, including transaction hashes.
Steps []WalletActionStepUnion `json:"steps" api:"required"`
// The type of webhook event.
//
// Any of "wallet_action.earn_withdraw.succeeded".
Type WalletActionEarnWithdrawSucceededWebhookPayloadType `json:"type" api:"required"`
// ERC-4626 vault contract address.
VaultAddress string `json:"vault_address" api:"required"`
// The vault ID.
VaultID string `json:"vault_id" api:"required"`
// The ID of the wallet action.
WalletActionID string `json:"wallet_action_id" api:"required"`
// The ID of the wallet involved in the action.
WalletID string `json:"wallet_id" api:"required"`
// Human-readable decimal amount of asset withdrawn (e.g. "1.5"). Only present when
// the token is known in the asset registry.
Amount string `json:"amount"`
// Asset identifier (e.g. "usdc", "eth"). Only present when the token is known in
// the asset registry.
Asset string `json:"asset"`
// Number of decimals for the underlying asset (e.g. 6 for USDC, 18 for ETH). Only
// present when the token is known in the asset registry.
Decimals int64 `json:"decimals"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionType respjson.Field
AssetAddress respjson.Field
Caip2 respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
RawAmount respjson.Field
ShareAmount respjson.Field
Status respjson.Field
Steps respjson.Field
Type respjson.Field
VaultAddress respjson.Field
VaultID respjson.Field
WalletActionID respjson.Field
WalletID respjson.Field
Amount respjson.Field
Asset respjson.Field
Decimals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Payload for the wallet_action.earn_withdraw.succeeded webhook event.
func (WalletActionEarnWithdrawSucceededWebhookPayload) RawJSON ¶ added in v0.7.0
func (r WalletActionEarnWithdrawSucceededWebhookPayload) RawJSON() string
Returns the unmodified JSON received from the API
func (*WalletActionEarnWithdrawSucceededWebhookPayload) UnmarshalJSON ¶ added in v0.7.0
func (r *WalletActionEarnWithdrawSucceededWebhookPayload) UnmarshalJSON(data []byte) error
type WalletActionEarnWithdrawSucceededWebhookPayloadStatus ¶ added in v0.7.0
type WalletActionEarnWithdrawSucceededWebhookPayloadStatus string
The status of the wallet action.
const (
WalletActionEarnWithdrawSucceededWebhookPayloadStatusSucceeded WalletActionEarnWithdrawSucceededWebhookPayloadStatus = "succeeded"
)
type WalletActionEarnWithdrawSucceededWebhookPayloadType ¶ added in v0.7.0
type WalletActionEarnWithdrawSucceededWebhookPayloadType string
The type of webhook event.
const (
WalletActionEarnWithdrawSucceededWebhookPayloadTypeWalletActionEarnWithdrawSucceeded WalletActionEarnWithdrawSucceededWebhookPayloadType = "wallet_action.earn_withdraw.succeeded"
)
type WalletActionGetParams ¶ added in v0.11.0
type WalletActionGetParams struct {
// ID of the wallet.
WalletID string `path:"wallet_id" api:"required" json:"-"`
// Request authorization signature. If multiple signatures are required, they
// should be comma separated.
PrivyAuthorizationSignature param.Opt[string] `header:"privy-authorization-signature,omitzero" json:"-"`
// Expandable relations to include on a wallet action response.
//
// Any of "steps".
Include WalletActionInclude `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (WalletActionGetParams) URLQuery ¶ added in v0.11.0
func (r WalletActionGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes WalletActionGetParams's query parameters as `url.Values`.
type WalletActionInclude ¶ added in v0.11.0
type WalletActionInclude string
Expandable relations to include on a wallet action response.
const (
WalletActionIncludeSteps WalletActionInclude = "steps"
)
type WalletActionResponseUnion ¶ added in v0.11.0
type WalletActionResponseUnion struct {
ID string `json:"id"`
Caip2 string `json:"caip2"`
CreatedAt time.Time `json:"created_at"`
// This field is from variant [SwapActionResponse].
InputAmount string `json:"input_amount"`
// This field is from variant [SwapActionResponse].
InputToken string `json:"input_token"`
// This field is from variant [SwapActionResponse].
OutputAmount string `json:"output_amount"`
// This field is from variant [SwapActionResponse].
OutputToken string `json:"output_token"`
// This field is from variant [SwapActionResponse].
Status WalletActionStatus `json:"status"`
// Any of "swap", "transfer", "earn_deposit", "earn_withdraw",
// "earn_incentive_claim", "earn_fee_collect".
Type string `json:"type"`
WalletID string `json:"wallet_id"`
DestinationAddress string `json:"destination_address"`
// This field is from variant [SwapActionResponse].
DestinationCaip2 string `json:"destination_caip2"`
EstimatedFees []FeeLineItemUnion `json:"estimated_fees"`
// This field is from variant [SwapActionResponse].
EstimatedGas Gas `json:"estimated_gas"`
// This field is from variant [SwapActionResponse].
FailureReason FailureReason `json:"failure_reason"`
Fees []FeeLineItemUnion `json:"fees"`
// This field is from variant [SwapActionResponse].
Gas Gas `json:"gas"`
Steps []WalletActionStepUnion `json:"steps"`
// This field is from variant [TransferActionResponse].
DestinationAmount string `json:"destination_amount"`
// This field is from variant [TransferActionResponse].
SourceChain string `json:"source_chain"`
// This field is from variant [TransferActionResponse].
AmountType AmountType `json:"amount