SimpleOnchainApi class

Constructors

SimpleOnchainApi({required String publicKey, String baseUrl = 'https://ga-api-dev.onchainlabs.ch', int? chainId, String? expectedSiweDomain})

Properties

baseUrl String
final
chainId int?
Chain the sign-in challenge must be bound to, or null to skip the check.
final
expectedSiweDomain String?
Domain the sign-in challenge must declare, or null to skip the check. See SiweChallenge.validate for why this defaults to off.
final
hashCode int
The hash code for this object.
no setterinherited
publicKey String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

approve({required PolygonWallet signerWallet, required String contractAddress, required String spender, required String amountHuman, bool waitForTx = true}) Future<Map<String, dynamic>>
balanceOfPublic(String address) Future<Map<String, dynamic>>
buyToken({required PolygonWallet signerWallet, required String contractAddress, required String from, required String to, required String amountHuman, bool waitForTx = true}) Future<Map<String, dynamic>>
checkAccount({required PolygonWallet signerWallet, required String contractAddress, required String account}) Future<Map<String, dynamic>>
mint({required PolygonWallet signerWallet, required String contractAddress, required String receiver, required String amountHuman, bool waitForTx = true}) Future<Map<String, dynamic>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sellToken({required PolygonWallet signerWallet, required String contractAddress, required String from, required String to, required String amountHuman, bool waitForTx = true}) Future<Map<String, dynamic>>
toString() String
A string representation of this object.
inherited
transfer({required PolygonWallet signerWallet, required String contractAddress, required String to, required String amountHuman, bool waitForTx = true}) Future<Map<String, dynamic>>
transferFrom({required PolygonWallet signerWallet, required String contractAddress, required String from, required String to, required String amountHuman, bool waitForTx = true}) Future<Map<String, dynamic>>

Operators

operator ==(Object other) bool
The equality operator.
inherited