Skip to content

Commit

Permalink
mint burn
Browse files Browse the repository at this point in the history
  • Loading branch information
orman committed Jul 11, 2024
1 parent 22e75b3 commit d7fa49a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ import {
CreateCollectionRequest,
CollectionTokenResponseDto,
MintCollectionTokenRequest,
BurnCollectionTokenRequest,
} from "./types";
import { AxiosProxyConfig, AxiosResponse, InternalAxiosRequestConfig } from "axios";
import { PIIEncryption } from "./pii-client";
Expand Down Expand Up @@ -2138,7 +2139,16 @@ export class FireblocksSDK {
* @returns WriteCallFunctionResponseDto
*/
public async mintCollectionToken(collectionId: string, payload: MintCollectionTokenRequest): Promise<WriteCallFunctionResponseDto> {
return await this.apiClient.issuePostRequest(`/v1/tokenization/collections/${collectionId}/tokens`, payload);
return await this.apiClient.issuePostRequest(`/v1/tokenization/collections/${collectionId}/tokens/mint`, payload);
}

/**
* Burn collection token
*
* @returns WriteCallFunctionResponseDto
*/
public async burnCollectionToken(collectionId: string, payload: BurnCollectionTokenRequest): Promise<WriteCallFunctionResponseDto> {
return await this.apiClient.issuePostRequest(`/v1/tokenization/collections/${collectionId}/tokens/burn`, payload);
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,13 @@ export interface MintCollectionTokenRequest {
metadata?: TokenMetadataDto;
}

export interface BurnCollectionTokenRequest {
to: string;
tokenId: string;
vaultAccountId: string;
amount?: string;
}

export interface IssueTokenRequest {
assetId?: string;
blockchainId?: string;
Expand Down

0 comments on commit d7fa49a

Please sign in to comment.