The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canisters on IC,

Overview

Agent of Internet Computer for Unity

The Intro

The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canisters on IC, providing useful utilities to make authentication and authorization easy.

The Status

The project is in an early stage, feature-less, documentation-sparse, and API will be changed frequently.

NOTE: Beta version is available, Only for experiment!

Milestones

Milestone 01: 【Draft】Call IC methods on Unity3D

  • Support HostKeyStore, a simple encrypted account module;
  • Support login/logout by HostKeyStore;
  • Call query methods on ic mainnet;
  • Call update methods on ic mainnet;
  • Support target: x86_64-win;
  • Support target: x86_64-nix;
  • Support target: aarch64-osx;
  • Support target: x86_64-osx;

Milestone 02: 【Basic】Core features/libraries mapping

  • Mapping candid from rs to cs;
  • Mapping ic-types from rs to cs;
  • Mapping ic-agent from rs to cs;
  • Mapping ic-utils from rs to cs;

Milestone 03: 【Enhancement】Provide helpful utilities for Unity3D Devs

  • Candid file downloader(For hot-update);
  • Encrypted account file module;
  • Authentication & Authorization by II;

How to build

# init python env
sh ./init.sh

# make the unity package, will produce a unity package with four targets:
# x86_64-win, x86_64-nix, x86_64-osx, aarch64-win
./publish --release --input=all

Look the detail.

How to install

  • Install of the official UPM package

    TODO

  • Installation via Git in UPM

    upm-via-git

    https://github.com/ShikuLabs/agent-unity.git#upm
    
  • Installation via

    upm-via-git

    NOTE: The installation file will be put on Release page.

How to use

using IC;

// Create keyStore
var keyStore = Agent.CreateKeyStore("Name", "Password");

// Login & Get login receipt
var receipt = Agent.LoginByHost(keyStore, "Password");

// Call query & update functions on ic mainneet
//
// Use II(Internet Identity Canister) as an instance:
//
// 1. Load candid file
// __NOTE__:
//      II_CANISTER_ID = rdmx6-jaaaa-aaaaa-aaadq-cai
//      II_CANDID_FILE: Get from https://k7gat-daaaa-aaaae-qaahq-cai.raw.ic0.app/listing/internet-identity-10235/rdmx6-jaaaa-aaaaa-aaadq-cai
Agent.RegisterIdl(II_CANISTER_ID, II_CANDID_FILE);

// 2. Call query function
// __NOTE__: The function will return a struct which is serialized, that representation is literal;
string rstStrQ = Agent.QuerySync(receipt.Principal, II_CANISTER_ID, "lookup", "(1974210: nat64)");

// 3. Call update function
string rstStrU = Agent.UpdateSync(receipt.Principal, II_CANISTER_ID, "create_challenge", "()");

// Logout
Agent.Logout(receipt.Principal);
Comments
  • add github-actions

    add github-actions

    • action: deploy-unity3d-package
      • [x] support distributing to release page;
      • [x] support distributing to upm branch;
      • [x] trig by upload version tag;
      • [x] trig from master branch;
    • action: check-version
      • [x] check Cargo.toml version;
      • [x] check Cargo.lock version;
      • [x] check package.json version;
      • [x] ensure the same version between different files;
    • action: clippy rust code
      • [x] check rust code format;
      • [x] run cargo clippy;
    workflow 
    opened by AllenPocketGamer 0
  • add deploy-unity3d-package github-action

    add deploy-unity3d-package github-action

    • action: deploy-unity3d-package
      • [x] support distributing to release page;
      • [x] support distributing to upm branch;
      • [x] trigger by upload version tag;
    enhancement workflow 
    opened by AllenPocketGamer 0
  • add github-actions[dec]

    add github-actions[dec]

    • action: deploy-unity3d-package
      • [x] support distributing to release page;
      • [x] support distributing to upm branch;
      • [x] trigger by upload version tag;
    • action: check-version
      • [ ] check Cargo.toml version;
      • [ ] check Cargo.lock version;
      • [ ] check package.json version;
      • [ ] ensure the same version between different files;
    • action: [post-process] format code after PR merged
      • [ ] format rs code;
      • [ ] format cs code;
    workflow 
    opened by AllenPocketGamer 0
  • Bump version from `0.1.0-alpha` to `0.1.0-beta-pre`

    Bump version from `0.1.0-alpha` to `0.1.0-beta-pre`

    • [x] develop scripts to automate the build flow
    • [x] delete exp-cs
    • [x] refactor project README.md
    • [x] support ic-update function
    • [x] add CHANGELOGS.md
    • [x] bump version to 0.1.0.beta-pre
    • [x] find & Filling in the gaps
    • [x] add license
    • [x] add milestone
    documentation enhancement 
    opened by AllenPocketGamer 0
  • Bump version from `0.1.0-alpha` to `0.1.0-beta-pre`

    Bump version from `0.1.0-alpha` to `0.1.0-beta-pre`

    • [x] develop scripts to automate the build flow
    • [x] delete exp-cs
    • [x] refactor project README.md
    • [x] support ic-update function
    • [ ] add CHANGELOGS.md
    • [ ] find & Filling in the gaps
    opened by AllenPocketGamer 0
  • develop scripts to automate the build flow

    develop scripts to automate the build flow

    • [x] ic-agent-ffi api redesign;
    • [x] refactor project architecture(It's too chaotic previously);
    • [x] add automation script
      • [x] init.sh: init script enviornment(python3)
      • [x] build.py
        • [x] support native build
        • [x] support cross build, cross-compile to:
          • [ ] ~~x86_64-apple-darwin;~~
          • [x] x86_64-pc-windows-gnu;
          • [x] x86_64-unknown-linux-gnu;
          • [ ] ~~aarch64-apple-darwin;~~
      • [x] pack.py: pack the libraries compiled with package-template to unity-package;
        • [x] basic
        • [x] compress option
        • [x] version option
      • [x] clean.py
      • [x] publish.py
      • [x] add scripts/README.md
    documentation enhancement 
    opened by AllenPocketGamer 0
  • develop scripts to automate the build flow

    develop scripts to automate the build flow

    • [x] ic-agent-ffi api redesign;
    • [x] refactor project architecture(It's too chaotic previously);
    • [ ] ~~support ic-update feature;~~
    • [x] add automation script
      • [x] init.sh: init script enviornment(python3)
      • [x] build.py
        • [x] support native build
        • [x] support cross build, cross-compile to:
          • [ ] ~~x86_64-apple-darwin;~~
          • [x] x86_64-pc-windows-gnu;
          • [x] x86_64-unknown-linux-gnu;
          • [ ] ~~aarch64-apple-darwin;~~
      • [x] pack.py: pack the libraries compiled with package-template to unity-package;
        • [x] basic
        • [x] compress option
        • [x] version option
      • [x] clean.py
      • [x] publish.py
      • [ ] add scripts/README.md
    documentation enhancement 
    opened by AllenPocketGamer 0
Releases(0.3.1)
Owner
Shiku Labs
Shiku Labs
Call Rust from Swift and vice versa.

swift-bridge Call Rust from Swift and vice versa. swift-bridge generates code that helps you call Rust from Swift and vice versa. swift-bridge takes i

Chinedu Francis Nwafili 422 Dec 30, 2022
A high performance Remote Procedure Call system.

A high performance Remote Procedure Call (RPC) system. Usage Add this to your Cargo.toml file. [dependencies] frpc = { git = "https://github.com/nurmo

Nur 5 Jul 28, 2023
An automated CLI tool that optimizes gas usage in Solidity smart contracts, focusing on storage and function call efficiency.

Solidity-Gas-Optimizoor An high performance automated CLI tool that optimizes gas usage in Solidity smart contracts, focusing on storage and function

Chia Yong Kang 10 Mar 11, 2024
`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks

llm-chain ?? llm-chain is a collection of Rust crates designed to help you work with Large Language Models (LLMs) more effectively. Our primary focus

Sobel IO 36 Apr 6, 2023
Radix Babylon vanity address finder allowing easy import into Radix mobile Wallet.

Rad Vanity address finder for Radix Babylon which you can import directly into your Radix Wallet using QR scanner using Import from a Legacy Wallet fe

Alexander Cyon 6 Nov 13, 2023
The underlying cryptographic primitives for Manta Ecosystem

manta crypto The underlying cryptography that manta ecosystem relies on. It comes with the following traits: checksum: definitions for message digest.

Manta Network 10 Nov 10, 2021
Rust-native building blocks for the Cardano blockchain ecosystem

Pallas Rust-native building blocks for the Cardano blockchain ecosystem. Introduction Pallas is an expanding collection of modules that re-implements

null 78 Dec 6, 2022
Simple, reliable, open-source contract verification built for an L2 centric Ethereum ecosystem

Cove This repo contains the backend verification1 code for Cove, a simple, reliable, open-source contract verification built for an L2 centric Ethereu

ScopeLift 12 Apr 1, 2023
A guide for Mozilla's developers and data scientists to analyze and interpret the data gathered by our data collection systems.

Mozilla Data Documentation This documentation was written to help Mozillians analyze and interpret data collected by our products, such as Firefox and

Mozilla 75 Dec 1, 2022
A holistic, minimal documentation portal for the Polkadot developers.

polkadot-sdk-docs A holistic, minimal documentation portal for the Polkadot developers. Master Tutorial The very, very rough plan that I have so far i

Parity Technologies 9 May 26, 2023
An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve

tiny-keccak An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve. Documentation The Keccak-f[1600] permut

Marek Kotewicz 168 Oct 21, 2022
Collection of cryptographic hash functions written in pure Rust

RustCrypto: hashes Collection of cryptographic hash functions written in pure Rust. All algorithms reside in the separate crates and implemented using

Rust Crypto 1.2k Jan 8, 2023
Password hashing functions / KDFs

RustCrypto: Password Hashes Collection of password hashing algorithms, otherwise known as password-based key derivation functions, written in pure Rus

Rust Crypto 387 Dec 28, 2022
Dexios-Core is a library used for managing cryptographic functions and headers that adhere to the Dexios format.

What is it? Dexios-Core is a library used for managing cryptographic functions and headers that adhere to the Dexios format. Security Dexios-Core uses

brxken 3 Jul 4, 2022
Helpful functions and macros for developing smart contracts on NEAR Protocol.

near-contract-tools Helpful functions and macros for developing smart contracts on NEAR Protocol. This package is a collection of common tools and pat

Jacob 27 Dec 17, 2022
Helpful functions and macros for developing smart contracts on NEAR Protocol.

near-contract-tools Helpful functions and macros for developing smart contracts on NEAR Protocol. This package is a collection of common tools and pat

NEARFoundation 9 Aug 3, 2022
Expose various non-cryptographic hashing functions with Digest traits

noncrypto-digests Expose various non-cryptographic hashing functions with Digest traits. This allows users to use any hashing function with the same t

Yuri Astrakhan 3 Dec 9, 2023
A Rust port of the password primitives used in Django Project.

Rust DjangoHashers A Rust port of the password primitives used in Django Project. Django's django.contrib.auth.models.User class has a few methods to

Ronaldo Ferreira 52 Nov 17, 2022
Temporary edit external crates that your project depends on

rhack You want to quickly put a sneaky macro kind of like dbg! into external crates to find out how some internal data structure works? If so rhack is

Ryo Nakao 119 Nov 3, 2022