tiki_sdk_dart 3.0.0 copy "tiki_sdk_dart: ^3.0.0" to clipboard
tiki_sdk_dart: ^3.0.0 copied to clipboard

discontinuedreplaced by: tiki_trail

Create and enforce immutable data licensing records client-side. The core-implementation of TIKI's client-side infrastructure.

example/lib/example.dart

/*
 * Copyright (c) TIKI Inc.
 * MIT license. See LICENSE file in root directory.
 */

import 'dart:io';

import 'package:example/in_mem.dart';
import 'package:tiki_sdk_dart/tiki_sdk.dart';
import 'package:uuid/uuid.dart';

void main(List<String> arguments) async {
  TikiSdk tikiSdk = await InMemBuilders.tikiSdk();

  String ptr = const Uuid().v4();
  TitleRecord title =
      await tikiSdk.title.create(ptr, tags: [TitleTag.emailAddress()]);
  print("Created a Title Record with id ${title.id} for PTR: $ptr");
  LicenseRecord first = await tikiSdk.license.create(
      title,
      [
        LicenseUse([LicenseUsecase.attribution()])
      ],
      'terms');
  print("Created a License Record with id ${first.id} for PTR: $ptr");
  tikiSdk.guard(ptr, [LicenseUsecase.attribution()],
      onPass: () => print(
          "There is a valid License Record for attribution use for Title Record with PTR $ptr"));
  tikiSdk.guard(ptr, [LicenseUsecase.support()],
      onFail: (cause) => print(
          "There is no valid License Record for support use for Title Record with PTR $ptr. Cause: $cause"));
  exit(0);
}
0
likes
130
points
208
downloads

Publisher

verified publishermytiki.com

Weekly Downloads

Create and enforce immutable data licensing records client-side. The core-implementation of TIKI's client-side infrastructure.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

html, http, pointycastle, sqlite3, uuid

More

Packages that depend on tiki_sdk_dart