Skip to content

Vitiv/doctoken

This branch is 25 commits behind ava-vs/doctoken:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f99341f · Jan 29, 2024

History

37 Commits
Dec 3, 2023
Jan 9, 2024
Jan 4, 2024
Aug 2, 2023
Aug 2, 2023
Jul 31, 2023
Jan 29, 2024
Dec 4, 2023
Dec 3, 2023
Aug 2, 2023
Aug 2, 2023

Repository files navigation

aVa Doctoken (draft ICRC-7 version)

Overview

aVa Doctoken allows user to create an NFT document and issue reputation based on it. Default cost of NFT with reputation set to 750B (~$1) cycles.

ICRC-7 Specification

For standard methods and structures documentation, read the specifications.

Deployment

For deployment to mainnet of Internet Computer use: If necessary, enter your information in the Name, Symbol, and Description fields in /commands/deploy-ic.sh.

cd commands sh ./deploy-ic.sh

Available methods

All ICRC-7 methods available except icrc7_transfer

Additional method:

addUser (to whitelist)

Add the member to the whitelist for update calls. The deployer is whitelisted by default.

addUser : (principal) -> (bool);

removeUser (from whitelist)

Remove the principal from the whitelist. The last user will not be deleted.

removeUser : (principal) -> (bool);

burn

burn : (TransferArgs) -> (variant { Ok: nat; Err: TransferError; });
type Subaccount = blob;

type Account = record {
		owner: principal; 
		subaccount: opt blob;
  };
  
type TransferArgs = record {
    spender_subaccount: opt Subaccount; // the subaccount of the caller (used to identify the spender)
    from: opt Account;     /* if supplied and is not caller then is permit transfer, if not supplied defaults to subaccount 0 of the caller principal */
    to: Account;
    token_ids: vec {nat};   
    memo: ?Blob;
    created_at_time: opt nat64;
    is_atomic: opt bool;
  };

type TransferError = variant {
    Unauthorized: record { token_ids: vec (nat) };
    TooOld;
    CreatedInFuture: record { ledger_time: nat };
    Duplicate: record { duplicate_of: nat };
    TemporarilyUnavailable: {};
    GenericError: record { error_code: nat; message: text };
  };

About

Document storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Motoko 82.4%
  • JavaScript 16.9%
  • Shell 0.7%