Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NCW tenant NFTs refresh #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@ def refresh_nft_metadata(self, id: str):
url = "/v1/nfts/tokens/" + id
return self._put_request(path=url)

def refresh_nft_ownership_by_vault(self, blockchain_descriptor: str, vault_account_id: str):
def refresh_nft_ownership_by_vault(self, blockchain_descriptor: str,
vault_account_id: str = None, ncw_id: str = None, ncw_account_id: str = None):
"""

:param blockchain_descriptor:
:param vault_account_id:
:param vault_account_id: Required for Non-NCW
:param ncw_id: Required for NCW
:param ncw_account_id: Required for NCW
:return:
"""
url = "/v1/nfts/ownership/tokens"
Expand All @@ -135,6 +138,12 @@ def refresh_nft_ownership_by_vault(self, blockchain_descriptor: str, vault_accou
if vault_account_id:
params['vaultAccountId'] = vault_account_id

if ncw_id:
params['ncwId'] = ncw_id

if ncw_account_id:
params['ncwAccountId'] = ncw_account_id

return self._put_request(url, query_params=params)

def get_owned_nfts(self, blockchain_descriptor: str, vault_account_ids: List[str] = None, ids: List[str] = None,
Expand Down