pos_client library

Classes

AbiType<T>
A type that can be encoded and decoded as specified in the solidity ABI, available at https://solidity.readthedocs.io/en/develop/abi-spec.html
AddressType
Solidity address type
AddressUtils
ApproveResponse
AttestationResponse
AuthApiValidators
AuthPublicKey
AuthSignature
AuthUtils
BaseArrayType<T>
Base class for (non-byte) arrays in solidity.
BlockInformation
BlockNum
For operations that are reading data from the blockchain without making a transaction that would modify it, the Ethereum client can read that data from previous states of the blockchain as well. This class specifies which state to use.
BoolType
Solidity bool type
Cacao
CacaoHeader
CacaoPayload
CacaoRequestPayload
CacaoSignature
CompositeFunctionParameter
A function parameter that includes other named parameter instead of just wrapping single types.
ConnectedEvent
ℹ️ Wallet is connected
ConnectFailedEvent
ConnectionMetadata
ConnectRejectedEvent
ConnectResponse
ContractAbi
Defines the abi of a deployed Ethereum contract. The abi contains information about the functions defined in that contract.
ContractEvent
An event that can be emitted by a smart contract during a transaction.
ContractFunction
A function defined in the ABI of an compiled contract.
CosmosUtils
CreateResponse
Credentials
Anything that can sign payloads with a private key.
CredentialsWithKnownAddress
Credentials where the address is known synchronously.
CryptoKeyPair
key pairs hex encoded
CustomTransactionSender
Interface for Credentials that don't sign transactions locally, for instance because the private key is not known to this library.
DecodeOptions
DecodingResult<T>
Decoding Result.
DeployedContract
Helper class that defines a contract with a known ABI that has been deployed on a Ethereum blockchain.
DisconnectedEvent
ℹ️ Wallet/POS session got disconnected
DynamicBytes
The solidity bytes type, which decodes byte arrays of arbitrary length.
DynamicLengthArray<T>
The solidity T[] type for arrays with an dynamic length.
EncodeOptions
EncodingLengthInfo
Information about whether the length of an encoding depends on the data (dynamic) or is fixed (static). If it's static, also contains information about the length of the encoding.
EncodingParams
EncodingValidation
EncryptParams
ErrorEvent
Errors
EtherAmount
Utility class to easily convert amounts of Ether into different units of quantities.
EthereumAddress
Represents an Ethereum address.
EthPrivateKey
Credentials that can sign payloads with an Ethereum private key.
EventComponent<T>
A FunctionParameter that is a component of an event. Contains additional information about whether the parameter is indexed.
EventsConstants
EvmChainUtils
ExpirationEvent
FilterEvent
A log event emitted in a transaction.
FilterOptions
Options for event filters created with Web3Client.events.
FixedBytes
The bytes
FixedLengthArray<T>
The solidity T[k] type for arrays whose length is known.
FunctionParameter<T>
The parameter of a function with its name and the expected type.
FunctionType
Function Type
GeneratedContract
Base classes for generated contracts.
HistoryEvent
InitializedEvent
IntType
The solidity int
IPairingStore
IPosClient
IReownCore
IReownSign
IReownSignClient
ISessions
JsonRPC
Json RPC Service.
JsonRpcError
JsonRpcRecord
JsonRpcRequest
JsonRpcResponse<T>
LengthTrackingByteSink
MessageEvent
Metadata
MethodConstants
MethodsConstants
MsgSignature
Signatures used to sign Ethereum transactions and messages.
Namespace
NamespaceUtils
PairingActivateEvent
PairingEvent
PairingInfo
PairingInvalidEvent
PairingMetadata
PaymentBroadcastedEvent
ℹ️ Payment was sent to blockchain
PaymentFailedEvent
PaymentIntent
PaymentRequestedEvent
ℹ️ Payment was sent to wallet
PaymentRequestFailedEvent
PaymentRequestRejectedEvent
PaymentSuccessfulEvent
PendingSessionAuthRequest
PolkadotChainUtils
PosClient
PosErrorEvent
PosEvent
PosNetwork
PosToken
ProposalData
ProposalExpire
PublicKey
PublicKey is the type of Ed25519 public keys.
PublishOptions
QrBitBuffer
QrCode
QrDataModuleStyle
Styling options for data module.
QrEmbeddedImageStyle
Styling options for any embedded image overlay
QrErrorCorrectLevel
QrEyeStyle
Styling options for finder pattern eye.
QrImage
Renders the encoded data from a QrCode in a portable format.
QrImageView
A widget that shows a QR code.
QrPainter
A CustomPainter object that you can use to paint a QR code.
QrReadyEvent
ℹ️ Pairing URI is created, QR is ready to be displayed
QrValidationResult
Captures the status or a QR code validation operations, as well as the rendered and validated data / object so that it can be used in any secondary operations (to avoid re-rendering). It also keeps any exception that was thrown.
QrValidator
A utility class for validating and pre-rendering QR code data.
QrVersions
This class only contains special version codes. QR codes support version numbers from 1-40 and you should just use the numeric version directly.
ReceiverPublicKey
Redirect
RegisteredFunction
Relay
ReownConstants
ReownCore
ReownCoreError
ReownCoreErrorSilent
ERRORS
ReownCoreUtils
ReownSign
ReownSignClient
ReownSignError
ReownSignErrorSilent
ERRORS
RequiredNamespace
RpcOptions
RPCResponse
Response from the server to an rpc request. Contains the id of the request and the corresponding result as sent by the server.
RpcService
RPC Service base class.
SessionAuthenticateCompleter
SessionAuthPayload
SessionAuthRequest
SessionAuthRequestParams
SessionAuthRequestResponse
SessionAuthResponse
SessionConnect
SessionData
SessionDelete
SessionEvent
SessionEventParams
SessionExpire
SessionExtend
SessionPing
SessionProposal
SessionProposalCompleter
SessionProposalErrorEvent
SessionProposalEvent
SessionRequest
SessionRequestEvent
SessionRequestParams
Sessions
SessionUpdate
SHA256Digest
Implementation of SHA-256 digest.
SolanaChainUtils
StoreCreateEvent<T>
StoredCacao
StoreDeleteEvent<T>
StoreErrorEvent<T>
StoreSyncEvent
StoreUpdateEvent<T>
StoreVersions
StringType
The solidity string type, which utf-8 encodes strings
SubscribeOptions
SubscriptionDeletionEvent
SubscriptionEvent
SyncInformation
When the client is currently syncing its blockchain with the network, this representation can be used to find information about at which block the node was before the sync, at which node it currently is and at which block the node will complete its sync.
Transaction
TransactionInformation
TransactionReceipt
TupleType
Tuple Type
UintType
The solidity uint
URIParseResult
URIV1ParsedData
URIV2ParsedData
VerifyClaims
VerifyContext
Wallet
Represents a wallet file. Wallets are used to securely store credentials like a private key belonging to an Ethereum address. The private key in a wallet is encrypted with a secret password that needs to be known in order to obtain the private key.
WcPairingDeleteRequest
WcPairingPingRequest
WcSessionAuthRequestParams
WcSessionAuthRequestResult
WcSessionDeleteRequest
WcSessionEventRequest
WcSessionExtendRequest
WcSessionPingRequest
WcSessionProposeRequest
WcSessionProposeResponse
WcSessionRequestRequest
WcSessionSettleRequest
WcSessionUpdateRequest
Web3Client
Class for sending requests over an HTTP JSON-RPC API endpoint to Ethereum clients. This library won't use the accounts feature of clients to use them to create transactions, you will instead have to obtain private keys of accounts yourself.
WebSocketErrors

Enums

ContractFunctionType
Contract Function Type
EtherUnit
FinderPatternPosition
Enumeration representing the three finder pattern (square 'eye') locations.
LogLevel
PosApiError
ProtocolType
QrCodeElement
Represents a specific element / part of a QR code. This is used to isolate the different parts so that we can style and modify specific parts independently.
QrDataModuleShape
Enumeration representing the shape of Data modules inside QR.
QrEyeShape
Enumeration representing the finder pattern eye's shape.
QrValidationStatus
The status of the QR code data you requested to be validated.
StateMutability
The state mutability of a contract function defines how that function interacts with the blockchain.
TransportType
URIVersion
Validation

Extensions

AddressUtilsExtension on String
AttestationResponsePatterns on AttestationResponse
Adds pattern-matching-related methods to AttestationResponse.
AuthPublicKeyPatterns on AuthPublicKey
Adds pattern-matching-related methods to AuthPublicKey.
CacaoHeaderPatterns on CacaoHeader
Adds pattern-matching-related methods to CacaoHeader.
CacaoPatterns on Cacao
Adds pattern-matching-related methods to Cacao.
CacaoPayloadPatterns on CacaoPayload
Adds pattern-matching-related methods to CacaoPayload.
CacaoRequestPayloadPatterns on CacaoRequestPayload
Adds pattern-matching-related methods to CacaoRequestPayload.
CacaoSignaturePatterns on CacaoSignature
Adds pattern-matching-related methods to CacaoSignature.
ConnectionMetadataPatterns on ConnectionMetadata
Adds pattern-matching-related methods to ConnectionMetadata.
EtheraAmountExtension on String?
JsonRpcErrorPatterns on JsonRpcError
Adds pattern-matching-related methods to JsonRpcError.
JsonRpcRecordPatterns on JsonRpcRecord
Adds pattern-matching-related methods to JsonRpcRecord.
JsonRpcRequestPatterns on JsonRpcRequest
Adds pattern-matching-related methods to JsonRpcRequest.
JsonRpcResponsePatterns on JsonRpcResponse<T>
Adds pattern-matching-related methods to JsonRpcResponse.
MetadataPatterns on Metadata
Adds pattern-matching-related methods to Metadata.
NamespacePatterns on Namespace
Adds pattern-matching-related methods to Namespace.
PairingInfoPatterns on PairingInfo
Adds pattern-matching-related methods to PairingInfo.
PairingMetadataPatterns on PairingMetadata
Adds pattern-matching-related methods to PairingMetadata.
PaymentIntentPatterns on PaymentIntent
Adds pattern-matching-related methods to PaymentIntent.
PendingSessionAuthRequestPatterns on PendingSessionAuthRequest
Adds pattern-matching-related methods to PendingSessionAuthRequest.
PosNetworkPatterns on PosNetwork
Adds pattern-matching-related methods to PosNetwork.
PosTokenPatterns on PosToken
Adds pattern-matching-related methods to PosToken.
ProposalDataPatterns on ProposalData
Adds pattern-matching-related methods to ProposalData.
PublishOptionsExtension on PublishOptions
PublishOptionsPatterns on PublishOptions
Adds pattern-matching-related methods to PublishOptions.
ReceiverPublicKeyPatterns on ReceiverPublicKey
Adds pattern-matching-related methods to ReceiverPublicKey.
RedirectPatterns on Redirect
Adds pattern-matching-related methods to Redirect.
ReownCoreErrorPatterns on ReownCoreError
Adds pattern-matching-related methods to ReownCoreError.
ReownSignErrorExtension on ReownCoreError
ReownSignErrorPatterns on ReownSignError
Adds pattern-matching-related methods to ReownSignError.
RequiredNamespacePatterns on RequiredNamespace
Adds pattern-matching-related methods to RequiredNamespace.
RpcOptionsPatterns on RpcOptions
Adds pattern-matching-related methods to RpcOptions.
SessionAuthPayloadPatterns on SessionAuthPayload
Adds pattern-matching-related methods to SessionAuthPayload.
SessionAuthRequestParamsPatterns on SessionAuthRequestParams
Adds pattern-matching-related methods to SessionAuthRequestParams.
SessionDataPatterns on SessionData
Adds pattern-matching-related methods to SessionData.
SessionEventParamsPatterns on SessionEventParams
Adds pattern-matching-related methods to SessionEventParams.
SessionProposalPatterns on SessionProposal
Adds pattern-matching-related methods to SessionProposal.
SessionRequestParamsPatterns on SessionRequestParams
Adds pattern-matching-related methods to SessionRequestParams.
SessionRequestPatterns on SessionRequest
Adds pattern-matching-related methods to SessionRequest.
StoredCacaoPatterns on StoredCacao
Adds pattern-matching-related methods to StoredCacao.
SubscribeOptionsPatterns on SubscribeOptions
Adds pattern-matching-related methods to SubscribeOptions.
TransactionExtension on Transaction
TransactionExtension2 on Map<String, dynamic>
UriExtension on String
VerifyClaimsExtension on VerifyClaims
VerifyClaimsPatterns on VerifyClaims
Adds pattern-matching-related methods to VerifyClaims.
VerifyContextPatterns on VerifyContext
Adds pattern-matching-related methods to VerifyContext.
WcPairingDeleteRequestPatterns on WcPairingDeleteRequest
Adds pattern-matching-related methods to WcPairingDeleteRequest.
WcPairingPingRequestPatterns on WcPairingPingRequest
Adds pattern-matching-related methods to WcPairingPingRequest.
WcSessionAuthRequestParamsPatterns on WcSessionAuthRequestParams
Adds pattern-matching-related methods to WcSessionAuthRequestParams.
WcSessionAuthRequestResultPatterns on WcSessionAuthRequestResult
Adds pattern-matching-related methods to WcSessionAuthRequestResult.
WcSessionDeleteRequestPatterns on WcSessionDeleteRequest
Adds pattern-matching-related methods to WcSessionDeleteRequest.
WcSessionEventRequestPatterns on WcSessionEventRequest
Adds pattern-matching-related methods to WcSessionEventRequest.
WcSessionExtendRequestPatterns on WcSessionExtendRequest
Adds pattern-matching-related methods to WcSessionExtendRequest.
WcSessionPingRequestPatterns on WcSessionPingRequest
Adds pattern-matching-related methods to WcSessionPingRequest.
WcSessionProposeRequestPatterns on WcSessionProposeRequest
Adds pattern-matching-related methods to WcSessionProposeRequest.
WcSessionProposeResponsePatterns on WcSessionProposeResponse
Adds pattern-matching-related methods to WcSessionProposeResponse.
WcSessionRequestRequestPatterns on WcSessionRequestRequest
Adds pattern-matching-related methods to WcSessionRequestRequest.
WcSessionSettleRequestPatterns on WcSessionSettleRequest
Adds pattern-matching-related methods to WcSessionSettleRequest.
WcSessionUpdateRequestPatterns on WcSessionUpdateRequest
Adds pattern-matching-related methods to WcSessionUpdateRequest.

Constants

packageVersion → const String
sizeUnitBytes → const int
The length of the encoding of a solidity type is always a multiplicative of this unit size.

Properties

base58 ↔ BaseXCodec
getter/setter pair
keccakDigest → KeccakDigest
final

Functions

bytesToInt(List<int> bytes) BigInt
Converts the bytes from that list (big endian) to a (potentially signed) BigInt.
bytesToUnsignedInt(Uint8List bytes) BigInt
calculatePadLength(int bodyLength, {bool allowEmpty = false}) int
Calculates the amount of padding bytes needed so that the length of the padding plus the bodyLength is a multiplicative of sizeUnitBytes. If allowEmpty (defaults to false) is true, an empty length is allowed. Otherwise an empty bodyLength will be given a full sizeUnitBytes padding.
compressPublicKey(Uint8List compressedPubKey) Uint8List
Given a byte array computes its compressed version and returns it as a byte array, including the leading 02 or 03
decompressPublicKey(Uint8List compressedPubKey) Uint8List
Given a byte array computes its expanded version and returns it as a byte array, including the leading 04
ecRecover(Uint8List messageHash, MsgSignature signatureData) Uint8List
Given an arbitrary message hash and an Ethereum message signature encoded in bytes, returns the public key that was used to sign it. https://github.com/web3j/web3j/blob/c0b7b9c2769a466215d416696021aa75127c2ff1/crypto/src/main/java/org/web3j/crypto/Sign.java#L241
encode(dynamic value) List<int>
encodeList(List list, LengthTrackingByteSink builder) → void
generateNewPrivateKey(Random random) BigInt
Generates a new private key using the random instance provided. Please make sure you're using a cryptographically secure generator.
hexToBytes(String hexStr) Uint8List
Converts the hexadecimal string, which can be prefixed with 0x, to a byte sequence.
hexToDartInt(String hex) int
Converts the hexadecimal input and creates an int.
hexToInt(String hex) BigInt
Takes the hexadecimal input and creates a BigInt.
intToBytes(BigInt number) Uint8List
isValidSignature(Uint8List messageHash, MsgSignature signatureData, Uint8List publicKey) bool
Given an arbitrary message hash, an Ethereum message signature encoded in bytes and a public key encoded in bytes, confirms whether that public key was used to sign the message or not.
keccak256(Uint8List input) Uint8List
keccakAscii(String input) Uint8List
keccakUtf8(String input) Uint8List
padUint8ListTo32(Uint8List data) Uint8List
parseAbiType(String name) AbiType
Parses an ABI type from its AbiType.name.
prependTransactionType(int type, Uint8List transaction) Uint8List
privateKeyBytesToPublic(Uint8List privateKey) Uint8List
Generates a public key for the given private key using the ecdsa curve which Ethereum uses.
privateKeyToPublic(BigInt privateKey) Uint8List
Generates a public key for the given private key using the ecdsa curve which Ethereum uses.
publicKeyToAddress(Uint8List publicKey) Uint8List
Constructs the Ethereum address associated with the given public key by taking the lower 160 bits of the key's sha3 hash.
sign(Uint8List messageHash, Uint8List privateKey) MsgSignature
Signs the hashed data in messageHash using the given private key.
signTransactionRaw(Transaction transaction, Credentials c, {int? chainId = 1}) Uint8List
strip0x(String hex) String
If present, removes the 0x from the start of a hex-string.
uint8ListFromList(List<int> data) Uint8List
unsignedIntToBytes(BigInt number) Uint8List

Typedefs

QrErrorBuilder = Widget Function(BuildContext context, Object? error)
A function type to be called when any form of error occurs while painting a QrImageView.
SocketConnector = StreamChannel<String> Function()
Signature for a function that opens a socket on which json-rpc operations can be performed.

Exceptions / Errors

AttestationNotFound
InputTooLongException
QrEmbeddedImageException
An exception that is thrown when something goes wrong with the ImageProvider for the embedded image of a QrImageView or QrPainter.
QrUnsupportedVersionException
An exception that is thrown when an invalid QR code version / type is requested.
RPCError
Exception thrown when an the server returns an error code to an rpc request.