Skip to content

ICRC-2 canister interface for Motoko (includes ICRC-1)

License

Notifications You must be signed in to change notification settings

ZenVoich/icrc2-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icrc2-types

mops documentation

ICRC-2 canister interface for Motoko.

Includes the ICRC-1 interface.

Install

mops add icrc2-types

Usage

Get the token allowance that the spender account can transfer from the specified account on the ryjl3-tyaaa-aaaaa-aaaba-cai (ICP) canister.

import ICRC2 "mo:icrc2-types";

let icp = actor("ryjl3-tyaaa-aaaaa-aaaba-cai") : ICRC2.Service;

let allowance = await icp.icrc2_allowance({
  account = targetAccount;
  spender = spenderAccount;
});

Debug.print("Allowance amount: " # debug_show(allowance.allowance));
Debug.print("Allowance exires at: " # debug_show(allowance.expires_at));

About

ICRC-2 canister interface for Motoko (includes ICRC-1)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published