To setup and manage a Stellar asset on Rehive there are two processes. The Stellar ledger setup and the Rehive company setup. Below we outline these processes although the Stellar section might differ depending on the wallet holding the Issuer asset.
This section assumes you have an issuer Stellar account setup and funded with base amounts of XLM (usually 1.5 XLM we work) as well as an activated and setup Rehive company with Stellar. This issuer account should be secure as it can mint any amounts of the assets it's trusted for. Stellar does have added security to lock the account but we will not be covering this here.
Issuer account sanity checks
Issuer account is funded with at least 1.5 XLM
Issuer account is stored securely and the private key is backed up
On the Rehive side all that is required is for the Hot Wallet to create a trust line for your asset. This will allow it to send and receive the currency (and by extension your end users). To do this:
Browse to the Stellar extension section
Click to through to the "Assets" section using the top menu
Enter the asset details: the important details here are the asset code (3 to 12 characters) and the public address of the Issuer. Together these are the tool that tell the Stellar ledger what the asset is and who owns it.
On success two things will happen:
The Hot Wallet creates a Stellar transaction with a trust line operation trusting your issuer for the asset code defined in the setup above.
The Stellar extension creates a currency on Rehive using the asset details
Minting your first tokens
With the Hot Wallet setup it can now receive the first of your tokens. To do this click the "Fund" button next to the asset entry in the dashboard. Here you have two options:
[Recommended] Make a send transaction from the wallet controlling the Issuer account to the Hot Wallet for the amount you wish to mint. The Hot Wallet public address can be found on the Hot Wallet page.
[Testnet only. Copy and pasting your mainnet secrets into any website is never recommended] Using the popup to enter the secret of the Issuer and the amount you wish to fund/mint. The Stellar extension will then create and broadcast the transaction from your Issuer on your behalf.
Congrats you have minted your first Stellar asset! Your end users can now send and receive that token.
Mainnet Warm Storage setup
This is not necessary for testnet setup in our system but is required for mainnet. Skip forward to the Rehive setup section if just using testnet.
For mainnet setups you are in control of the Warm Storage account (deposit account). This means whichever wallet is holding it will need to setup a trustline with the Issuer account so your users will be able to deposit the asset.
Using Stellar labs and the Rehive signer
This method might only be nescessary if the issuer is stored on a hardware device such as a Ledger or Trezor that by default do not support easily creating trustlines. Other wallets might have easy methods for handling trustline creation. Ideally use built in wallet functionality but if that is not possible follow the below:
Navigate to: https://www.stellar.org/laboratory/#txbuilder?network=public. This will be used to build the Stellar transaction that will be signed by the hardware device.
Next the builder form needs to be completed as follows, Source Account: Warm Storage public address (public address of account on the Ledger/Trezor), Transaction sequence: Click "Fetch next sequence number..", Base Fee: 100, Memo: None
Next add the trust line operation like so: Operation Type: Select “Change Trust” from the drop down list. With the operation fields matching your asset details (Asset code is the code used for the asset and Asset Issuer is the public address of the Issuer account)
Once everything is inputted the success box should contain Network passphrase, hash and xdr details. Copy ONLY the text in the xdr section. An example of what this looks like:
Connect your hardware wallet. If using a Ledger, open the Stellar App on the device
Navigate to: https://stellar-signer.rehive.com/
Paste the XDR text into the text area input
Make sure the “Account on device to be used for signing” is set to the correct derivation that matches the public address used for the issuer.
Click either “Sign with Trezor” or “Sign with Ledger” depending on the connected hardware device.
Closely follow the on device prompts. Checking that the device displays the same transaction data that was inputted in Step 2
After completely the device signing phase the Stellar Signer should display a new signed XDR text. Make sure to copy that.
Paste the signed XDR text into the Transaction Envelope XDR field
Click “Submit” this will broadcast the transaction to the network. If all went well your Warm Storage account will now be able to hold your new asset. This can be double checked here: https://www.stellar.org/laboratory/#explorer?resource=accounts&endpoint=single&network=public
Ideally your wallet handled the above for you or you managed to follow through. If you are stuck at any point feel free to ping our support team on Intercom as we are always willing to lend a hand.