TikiSdkBuilder class Null safety

The Builder for the TikiSdk object

How to use

1 - Initialize the builder

  TikiSdkBuilder builder = TikiSdkBuilder();

2 - Set the default Origin

The default origin is the one that will be used as origin for all ownership assignments that doesn't define different origins. It should follow a reversed FQDN syntax. i.e. com.mycompany.myproduct

builder.origin('com.mycompany.myproduct');

3 - Set the Database Directory

TIKI SDK uses SQLite for local database caching. This directory defines where the database files will be stored.

builder.databaseDir('path/to/database')

4 - Set the storage for user`s private key

The user private key is sensitive information and should be kept in a secure and encrypted key-value storage. It should use an implementation of the KeyStorage interface,

builder.keyStorage = InMemKeyStorage();

DO NOT USE InMemKeyStorage in production.

5 - Set the API key for connection with TIKI Cloud

Create your API key in mytiki.com

builder.apiKey = "api_key_from_mytiki.com";

6 - address

Set the user address. If it is not set, a new private key will be created for the user.

builder.apiKey = "api_key_from_mytiki.com";

7 - Build it!

After setting all the properties for the builder, build it to use.

TikiSdk sdk = builder.build();

Constructors

TikiSdkBuilder()

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

address(String? address) → void
Sets the blockchain address for the private key used in the SDK object.
apiKey(String? apiKey) → void
Sets the apiKey to connect to TIKI cloud.
build() → Future<TikiSdk>
Builds the TikiSdk object.
databaseDir(String databaseDir) → void
Sets the directory to be used for the database files.
keyStorage(KeyStorage keyStorage) → void
Sets the secure key storage to be used
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
origin(String origin) → void
Sets the default origin for all registries.
toString() → String
A string representation of this object.
inherited

Operators

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