UNPKG

template_assets

Version:

![Compatibility](https://img.shields.io/badge/compatibility-0.6.25-blue) [![Build Status](https://github.com/dfinity/examples/workflows/motoko-superheroes-example/badge.svg)](https://github.com/dfinity/examples/actions?query=workflow%3Amotoko-superheroes

44 lines (43 loc) 1.19 kB
export const idlFactory = ({ IDL }) => { const UserInfoExt = IDL.Record({ 'sex' : IDL.Nat, 'dateOfBirth' : IDL.Text, 'allowedTokens' : IDL.Vec(IDL.Nat), 'tokens' : IDL.Vec(IDL.Nat), 'operators' : IDL.Vec(IDL.Principal), 'phone' : IDL.Text, 'allowedBy' : IDL.Vec(IDL.Principal), 'lastName' : IDL.Text, 'liveIn' : IDL.Text, 'firstName' : IDL.Text, }); const NFTSale = IDL.Service({ 'createAccount' : IDL.Func( [IDL.Text, IDL.Text, IDL.Nat, IDL.Text, IDL.Text, IDL.Text], [UserInfoExt], [], ), 'deleteAccount' : IDL.Func([IDL.Principal], [IDL.Bool], []), 'getUserInfo' : IDL.Func( [IDL.Principal], [IDL.Opt(UserInfoExt)], ['query'], ), 'readAccount' : IDL.Func([], [IDL.Vec(UserInfoExt)], ['query']), 'updateAccount' : IDL.Func( [ IDL.Principal, IDL.Text, IDL.Text, IDL.Nat, IDL.Text, IDL.Text, IDL.Text, ], [UserInfoExt], [], ), }); return NFTSale; }; export const init = ({ IDL }) => { return [IDL.Principal]; };