You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
Norton Wang edited this page Sep 7, 2021
·
1 revision
Goal
A canister that acts as the global database of all known tokens, fungible and non-fungible. A developer can query for this list, then query each of them individually for user balances.
Specification
public type Data = {
canister: Principal; // token ledger canister
id: ?Text; // optional ID, needs to support all widely used standards
name: Text; // eg. "ICPunks" or "XTC"
};
public type InternalId = Nat;
public type TokenDatabase = actor {
// Public: Retrieve all data
get : shared () -> async [Data];
// Permissioned:
// Add a datum
add : shared (Data) -> async ();
// Delete data by id
remove : shared ([InternalId]) -> async ();
};