Skip to content

Commit

Permalink
Tokenization - Add displayName (#172)
Browse files Browse the repository at this point in the history
* display_name

* Add display_name parameter to CreateTokenRequest class

---------

Co-authored-by: orman <[email protected]>
  • Loading branch information
or109 and orman authored Mar 18, 2024
1 parent 832bb1a commit 4e4b1f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2880,11 +2880,14 @@ def get_linked_token(self, id: str):
def get_linked_tokens_count(self):
return self._get_request(f"/v1/tokenization/tokens/count")

def link_token(self, type: TokenLinkType, ref_id: str):
def link_token(self, type: TokenLinkType, ref_id: str, display_name: Optional[str] = None):
body = {
"type": type,
"refId": ref_id
"refId": ref_id,
}
if display_name:
body["displayName"] = display_name

return self._post_request(f"/v1/tokenization/tokens/link", body)

def unlink_token(self, id: str):
Expand Down
4 changes: 3 additions & 1 deletion fireblocks_sdk/tokenization_api_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ def __init__(
vault_account_id: str,
create_params: Union[EVMTokenCreateParams, StellarRippleCreateParams],
asset_id: Optional[str] = None,
blockchain_id: Optional[str] = None
blockchain_id: Optional[str] = None,
display_name: Optional[str] = None,
):
self.vault_account_id = vault_account_id
self.create_params = create_params
self.asset_id = asset_id
self.blockchain_id = blockchain_id
self.display_name = display_name


class ContractDeployRequest(BaseDictClass):
Expand Down

0 comments on commit 4e4b1f9

Please sign in to comment.