# 7.4 Invite a Member
Now that you have purchased a bronze membership you can invite a previously unlisted address provided by direct person to person exchange to the network.
As a Bronze member there is a reward value given to you, if someone you invite buys upgrades to a metal membership. The reward is based on your metal membership type and the membership that any user you have accredited buys.
|Invitee / Invited||Bronze||Silver||Gold||Black|
If an address has already been used in the netwok the invitation action is invalid.
You need to obtain this address by direct exchange from the invitee.
Here's how to perform the invitaion.
# Use cases
Sends a new transaction in order to invite the given userDid.
The Bitcoin BIP39 Mnemonic code for generating deterministic keys.
The Sacco library, our own open source tool to sign and send transactions to any Cosmos SDK based blockchain, including Commercio.network.
The Commercio SDK, our own open source tool to format transactions to Commercio.network
# Functions and APIs
- Wallet derive;
- MembershipHelper inviteUser.
# Step by step sequence
- Generate a new mnemonic using bip39;
- Set up the network;
- Call the wallet derive function;
- Finally, execute the MembershipHelper inviteUser to invite a member.
# Code Examples
Here's an example of the implemetation in all the available languages.
final newUserMnemonic = bip39.generateMnemonic(strength: 256).split(' '); final networkInfo = NetworkInfo( bech32Hrp: 'did:com:', lcdUrl: 'http://localhost:1317', ); final newUserWallet = Wallet.derive(newUserMnemonic, networkInfo); final response = await MembershipHelper.inviteUser( newUserWallet.bech32Address, wallet );
val networkInfo = NetworkInfo( bech32Hrp = "did:com:", lcdUrl = "http://localhost:1317" ) val newUserMnemonic = generateMnemonic(strength = 256, wordList = WORDLIST_ENGLISH).split(" ") val newUserWallet = Wallet.derive(newUserMnemonic, networkInfo) val fee = StdFee(gas = "200000", amount = listOf(StdCoin(denom = "ucommercio", amount = "10000")))// optional val mode = TxHelper.BroadcastingMode.BLOCK // optional val response = MembershipHelper.inviteUser( user = Did(newUserWallet.bech32Address), wallet = wallet, fee = fee, // optional mode = mode // optional )