Skip to content

Create Wallet Address

Overview

createWalletAddress API creates a new wallet address associated with an existing AddressBookEntry.

Params

The CreateAddressBookWalletAddressParams used to initialize and perform createWalletAddress API.

Result

The CreateAddressBookWalletAddressResult contains the complete AddressBookWalletAddress with id's.

  • wallet address: the newly created wallet address with full details.

Errors

List of the possible errors that can be returned by this API:

  • AddressBookNotFound: Address Book entry specified wasn't found
  • AddressAlreadyUsed: Wallet Address already present in one Address Book entry
  • WalletAddressInvalidParameters: invalid parameters provided to create an Address Book Wallet Address entry
  • WalletAddressValidationError: unable to create/update an Address Book Wallet Address because the provided parameters are not conformed to the Travel Rule / Agenzia delle Entrate requirements
  • InvalidCountry: the Vasp.country provided does not match the ISO 3166-1 alpha-2 standard.

Code

iOS

let params = CreateAddressBookWalletAddressParams.make(
    addressBookId: ...,
    CreateAddressBookWalletAddress.make(
        walletAddress: ...,
        isForeign: ...,
        isUnhostedWallet: ...,
        vasp: ...,
        proofOfOwnership: ...,
        label: ...,
        threshold: ...
    )
)

addressBookService
    .createWalletAddress(params: params)
    .asPublisher()
    .sink { result in
        // ...
    }

Android

// val vasp = Vasp.buildWithDid(
//      name = "...",
//      did = "..."
//  )
val vasp = Vasp.buildWithWebsite(
    name = "...",
    websiteUrl = "..."
)

val proofOfOwnership = ProofOfOwnership(
    message = ProofOfOwnershipMessage(
        value = "..."
    ),
    signature = ProofOfOwnershipSignature(
        value = "..."
    )
)

val walletAddress = CreateAddressBookWalletAddress(
    walletAddress = "...",
    isForeign = false,
    isUnhostedWallet = false,
    vasp = vasp,
    proofOfOwnership = proofOfOwnership,
    label = "...",
    threshold = FiatAmount(1000)
)

val params = CreateAddressBookWalletAddressParams(
    addressBookId = "...",
    walletAddress = walletAddress
)

conio.addressBookService
    .createWalletAddress(params)
    .asFlow()
    .collect { result -> 
        //...
    }