Skip to content

Commit

Permalink
feat: added multi nft token status update endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lazars14-f committed Oct 10, 2023
1 parent 8a23faa commit b97b02a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions fireblocks_sdk/api_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ class NFTOwnershipStatusValues(str, Enum):
ARCHIVED = "ARCHIVED"


class NFTOwnershipStatusUpdatedPayload:
assetId: str
status: NFTOwnershipStatusValues

class GetOwnedCollectionsSortValue(str, Enum):
COLLECTION_NAME = "name"

Expand Down
12 changes: 11 additions & 1 deletion fireblocks_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DestinationTransferPeerPath, TransferTicketTerm, TRANSACTION_TRANSFER, SIGNING_ALGORITHM, UnsignedMessage, \
FEE_LEVEL, PagedVaultAccountsRequestFilters, TransactionDestination, NFTOwnershipStatusValues, IssueTokenRequest, \
GetAssetWalletsFilters, TimePeriod, GetOwnedCollectionsSortValue, GetOwnedNftsSortValues, GetNftsSortValues, OrderValues, \
GetOwnedAssetsSortValues, PolicyRule
GetOwnedAssetsSortValues, PolicyRule, NFTOwnershipStatusUpdatedPayload
from .sdk_token_provider import SdkTokenProvider


Expand Down Expand Up @@ -248,6 +248,16 @@ def update_nft_ownership_status(self, id: str, status: NFTOwnershipStatusValues)

return self._put_request(url, {"status": status.value})

def update_nft_ownerships_status(self, payload: List[NFTOwnershipStatusUpdatedPayload]):
"""Updates tokens status for a tenant, in all tenant vaults.
Args:
payload (string): List of assets with status for update
"""
url = "/v1/nfts/ownership/tokens/status"

return self._put_request(url, payload)

def get_supported_assets(self):
"""Gets all assets that are currently supported by Fireblocks"""

Expand Down

0 comments on commit b97b02a

Please sign in to comment.