Skip to content

Commit

Permalink
adding api mint functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Jul 22, 2022
1 parent 4ce658f commit d14e499
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/common/rest/contracts-mint/index.ts
@@ -0,0 +1,50 @@
import { MethodMetadata, Parameter } from '..';
import { useRestCall } from '../../helpers/rest-calls';

const path = 'contracts/mint';

export function useMethod({ body }: any) {
const { data, error, loading, getData } = useRestCall({
headers: Headers,
metadata,
body,
});

return { data, error, loading, getData };
}

const parameters: Parameter[] = [
{
key: 1,
name: 'operation',
description: 'The Soul Bound Token type to Mint',
required: 'yes',
default: 'Identity',
dataType: 'string',
},
{
key: 2,
name: 'address',
description: 'The receiver address of the Soul Bound Token',
required: 'yes',
default: '',
dataType: 'string',
},
{
key: 3,
name: 'signature',
description: 'The signature of the Users wallet',
required: 'yes',
default: '',
dataType: 'string',
},
];

export const metadata: MethodMetadata = {
author: 'Sebastian Gerske',
authorPicture: '',
description: 'Mints an Soul Bound Token to a users Wallet',
name: path,
method: 'POST',
parameters: parameters,
};
3 changes: 3 additions & 0 deletions src/common/rest/index.ts
Expand Up @@ -6,6 +6,8 @@ import * as getCountries from './get-countries';
import * as postCountry from './post-country';
import * as farming from './farming';

import * as contractsMint from './contracts-mint';

import * as getVezgoLink from './vezgo/get-link';
import * as listVezgoProviders from './vezgo/list-providers';
import * as listVezgoAccounts from './vezgo/list-accounts';
Expand Down Expand Up @@ -51,6 +53,7 @@ export const masaRestClient = {
farming,
getClient,
postClient,
contractsMint,
getVezgoLink,
listVezgoProviders,
listVezgoAccounts,
Expand Down

0 comments on commit d14e499

Please sign in to comment.