Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
tlv_use_case_trusted_name.h File Reference
#include "tlv_library.h"
#include "buffer.h"
Include dependency graph for tlv_use_case_trusted_name.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  semver_s
 
struct  tlv_trusted_name_out_s
 

Macros

#define TRUSTED_NAME_STRINGS_MAX_SIZE   64
 
#define NFT_ID_SIZE   32
 
#define SOURCE_CONTRACT_RECEIVED_MIN_VERSION   2
 
#define CURRENT_TRUSTED_NAME_SPEC_VERSION   3
 
#define SEMVER_SIZE   3
 
#define DER_SIGNATURE_MIN_SIZE   64
 
#define DER_SIGNATURE_MAX_SIZE   72
 

Typedefs

typedef enum tlv_structure_type_e tlv_structure_type_t
 
typedef enum tlv_trusted_name_type_e tlv_trusted_name_type_t
 
typedef enum tlv_trusted_name_source_e tlv_trusted_name_source_t
 
typedef enum tlv_trusted_name_signer_key_id_e tlv_trusted_name_signer_key_id_t
 
typedef enum tlv_trusted_name_signer_algorithm_e tlv_trusted_name_signer_algorithm_t
 
typedef struct semver_s semver_t
 
typedef struct tlv_trusted_name_out_s tlv_trusted_name_out_t
 
typedef enum tlv_trusted_name_status_e tlv_trusted_name_status_t
 

Enumerations

enum  tlv_structure_type_e { TLV_STRUCTURE_TYPE_TRUSTED_NAME = 0x03 }
 
enum  tlv_trusted_name_type_e {
  TLV_TRUSTED_NAME_TYPE_EOA = 0x01 , TLV_TRUSTED_NAME_TYPE_SMART_CONTRACT = 0x02 , TLV_TRUSTED_NAME_TYPE_COLLECTION = 0x03 , TLV_TRUSTED_NAME_TYPE_TOKEN = 0x04 ,
  TLV_TRUSTED_NAME_TYPE_WALLET = 0x05 , TLV_TRUSTED_NAME_TYPE_CONTEXT_ADDRESS = 0x06
}
 
enum  tlv_trusted_name_source_e {
  TLV_TRUSTED_NAME_SOURCE_LOCAL_ADDRESS_BOOK = 0x00 , TLV_TRUSTED_NAME_SOURCE_CRYPTO_ASSET_LIST = 0x01 , TLV_TRUSTED_NAME_SOURCE_ENS = 0x02 , TLV_TRUSTED_NAME_SOURCE_UNSTOPPABLE_DOMAINS = 0x03 ,
  TLV_TRUSTED_NAME_SOURCE_FREENAME = 0x04 , TLV_TRUSTED_NAME_SOURCE_DNS = 0x05 , TLV_TRUSTED_NAME_SOURCE_DYNAMIC_RESOLVER = 0x06
}
 
enum  tlv_trusted_name_signer_key_id_e { TLV_TRUSTED_NAME_SIGNER_KEY_ID_TEST = 0x00 , TLV_TRUSTED_NAME_SIGNER_KEY_ID_PROD = 0x07 }
 
enum  tlv_trusted_name_signer_algorithm_e {
  TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_SHA256 = 0x01 , TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_SHA3_256 = 0x02 , TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_KECCAK_256 = 0x03 , TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_RIPEMD160 = 0x04 ,
  TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_SHA512 = 0x16 , TLV_TRUSTED_NAME_SIGNER_ALGORITHM_EDDSA_KECCAK_256 = 0x17 , TLV_TRUSTED_NAME_SIGNER_ALGORITHM_EDDSA_SHA3_256 = 0x18
}
 
enum  tlv_trusted_name_status_e {
  TLV_TRUSTED_NAME_SUCCESS = 0 , TLV_TRUSTED_NAME_PARSING_ERROR = 1 , TLV_TRUSTED_NAME_MISSING_STRUCTURE_TAG = 2 , TLV_TRUSTED_NAME_WRONG_TYPE = 3 ,
  TLV_TRUSTED_NAME_MISSING_TAG = 4 , TLV_TRUSTED_NAME_UNKNOWN_VERSION = 5 , TLV_TRUSTED_NAME_UNSUPPORTED_TAG = 6 , TLV_TRUSTED_NAME_WRONG_KEY_ID = 7 ,
  TLV_TRUSTED_NAME_HASH_FAILED = 8 , TLV_TRUSTED_NAME_SIGNATURE_ERROR = 0x80
}
 

Functions

tlv_trusted_name_status_t tlv_use_case_trusted_name (const buffer_t *payload, tlv_trusted_name_out_t *out)
 Processes a TLV dynamic descriptor use case.
 

Macro Definition Documentation

◆ CURRENT_TRUSTED_NAME_SPEC_VERSION

#define CURRENT_TRUSTED_NAME_SPEC_VERSION   3

Definition at line 39 of file tlv_use_case_trusted_name.h.

◆ DER_SIGNATURE_MAX_SIZE

#define DER_SIGNATURE_MAX_SIZE   72

Definition at line 44 of file tlv_use_case_trusted_name.h.

◆ DER_SIGNATURE_MIN_SIZE

#define DER_SIGNATURE_MIN_SIZE   64

Definition at line 43 of file tlv_use_case_trusted_name.h.

◆ NFT_ID_SIZE

#define NFT_ID_SIZE   32

Definition at line 35 of file tlv_use_case_trusted_name.h.

◆ SEMVER_SIZE

#define SEMVER_SIZE   3

Definition at line 41 of file tlv_use_case_trusted_name.h.

◆ SOURCE_CONTRACT_RECEIVED_MIN_VERSION

#define SOURCE_CONTRACT_RECEIVED_MIN_VERSION   2

Definition at line 38 of file tlv_use_case_trusted_name.h.

◆ TRUSTED_NAME_STRINGS_MAX_SIZE

#define TRUSTED_NAME_STRINGS_MAX_SIZE   64

Definition at line 34 of file tlv_use_case_trusted_name.h.

Typedef Documentation

◆ semver_t

typedef struct semver_s semver_t

◆ tlv_structure_type_t

◆ tlv_trusted_name_out_t

◆ tlv_trusted_name_signer_algorithm_t

◆ tlv_trusted_name_signer_key_id_t

◆ tlv_trusted_name_source_t

◆ tlv_trusted_name_status_t

◆ tlv_trusted_name_type_t

Enumeration Type Documentation

◆ tlv_structure_type_e

Enumerator
TLV_STRUCTURE_TYPE_TRUSTED_NAME 

Definition at line 46 of file tlv_use_case_trusted_name.h.

◆ tlv_trusted_name_signer_algorithm_e

Enumerator
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_SHA256 
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_SHA3_256 
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_KECCAK_256 
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_RIPEMD160 
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_ECDSA_SHA512 
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_EDDSA_KECCAK_256 
TLV_TRUSTED_NAME_SIGNER_ALGORITHM_EDDSA_SHA3_256 

Definition at line 74 of file tlv_use_case_trusted_name.h.

◆ tlv_trusted_name_signer_key_id_e

Enumerator
TLV_TRUSTED_NAME_SIGNER_KEY_ID_TEST 
TLV_TRUSTED_NAME_SIGNER_KEY_ID_PROD 

Definition at line 69 of file tlv_use_case_trusted_name.h.

◆ tlv_trusted_name_source_e

Enumerator
TLV_TRUSTED_NAME_SOURCE_LOCAL_ADDRESS_BOOK 
TLV_TRUSTED_NAME_SOURCE_CRYPTO_ASSET_LIST 
TLV_TRUSTED_NAME_SOURCE_ENS 
TLV_TRUSTED_NAME_SOURCE_UNSTOPPABLE_DOMAINS 
TLV_TRUSTED_NAME_SOURCE_FREENAME 
TLV_TRUSTED_NAME_SOURCE_DNS 
TLV_TRUSTED_NAME_SOURCE_DYNAMIC_RESOLVER 

Definition at line 59 of file tlv_use_case_trusted_name.h.

◆ tlv_trusted_name_status_e

Enumerator
TLV_TRUSTED_NAME_SUCCESS 
TLV_TRUSTED_NAME_PARSING_ERROR 
TLV_TRUSTED_NAME_MISSING_STRUCTURE_TAG 
TLV_TRUSTED_NAME_WRONG_TYPE 
TLV_TRUSTED_NAME_MISSING_TAG 
TLV_TRUSTED_NAME_UNKNOWN_VERSION 
TLV_TRUSTED_NAME_UNSUPPORTED_TAG 
TLV_TRUSTED_NAME_WRONG_KEY_ID 
TLV_TRUSTED_NAME_HASH_FAILED 
TLV_TRUSTED_NAME_SIGNATURE_ERROR 

Definition at line 122 of file tlv_use_case_trusted_name.h.

◆ tlv_trusted_name_type_e

Enumerator
TLV_TRUSTED_NAME_TYPE_EOA 
TLV_TRUSTED_NAME_TYPE_SMART_CONTRACT 
TLV_TRUSTED_NAME_TYPE_COLLECTION 
TLV_TRUSTED_NAME_TYPE_TOKEN 
TLV_TRUSTED_NAME_TYPE_WALLET 
TLV_TRUSTED_NAME_TYPE_CONTEXT_ADDRESS 

Definition at line 50 of file tlv_use_case_trusted_name.h.

Function Documentation

◆ tlv_use_case_trusted_name()

tlv_trusted_name_status_t tlv_use_case_trusted_name ( const buffer_t payload,
tlv_trusted_name_out_t out 
)

Processes a TLV dynamic descriptor use case.

This function parses the provided payload buffer and extracts dynamic descriptor information, storing the results in the output structure.

Parameters
[in]payloadPointer to the buffer containing the TLV payload data.
[out]outPointer to the structure where the parsed dynamic descriptor will be stored.
Returns
Status code indicating the result of the operation. See tlv_dynamic_descriptor_status_t for possible values.

Definition at line 351 of file tlv_use_case_trusted_name.c.