IMPORTANT: Sologenic is currently running on SIMULATOR mode and therefore all transactions must take place on the TESTNET XRP Ledger.
Removing a Trustline

Sologenic Ecosystem uses the XRP Ledger Blockchain to conduct tokenizations and thus allowing the tokenized assets to be traded/exchanged on the XRP Ledger Built-in Decentralized Exchange. There are two types of Trustlines in the XRP Ledger, a regular one-way Trustline, and an Authorized two-way Trustline. Sologenic, requires an Authorized Trustline to allow assets to be withdrawn from the platform.

To withdraw your tokenized assets from Sologenic, you need to setup a Trustline from your personal wallet to Sologenic (Issuer) and request Sologenic gateway to Authorize this Trustline once it is established.

Sologenic Trustline structure

Follow the instructions below to remove a Trustline to Sologenic for an asset.

Please note that the following instructions are to be used by advanced users who know details about the inner workings of the XRP Ledger transactions and Trustlines.
Use at your own risk. Sologenic is not responsible for any loss of your assets or misconfigurations.
Please note that removing a Trustline decreases your reserve requirements by 5 XRP. to learn more visit: https://xrpl.org/reserves.html
1 Transfer tokenized assets from your wallet

In order to remove a trustline, you need to make sure your balance for the asset is 0. To do so, you can transfer back your Assets to Sologenic (Deposit) or another authorized wallet.

2 Remove a Trustline from your wallet

Using your favorite wallet, create and sign a transaction on the XRP Ledger as follows (Replace with your values) To see how to submit transactions to the XRP Ledger, you can use the Sologenic JS SDK https://github.com/sologenic/sologenic-xrpl-stream-js or follow guides provided by the https://xrpl.org

            {
              "TransactionType": "TrustSet",
              "Account": "{YOUR WALLET ADDRESS}",
              "LimitAmount": {
                "currency": "{CURRENCY CODE}",
                "issuer": "{ISSUER}",
                "value": "0"
              },
              "Flags": 2147483648
            }
            

For example if you are using sologenic-xrpl-stream, your code will look like:

            $ mkdir sologenic-trustline && cd sologenic-trustline
            $ npm init
            $ npm install sologenic-xrpl-stream-js

Create a file with the following code, for example: trustline.js

            'use strict';
            const ƨ = require('sologenic-xrpl-stream-js');
            
            (async () => {
              try {
                const sologenic = await new ƨ.SologenicTxHandler(
                  {
                    server: 'wss://s.altnet.rippletest.net',
                  },
                  {
                    clearCache: true,
                    queueType: "hash",
                    hash: {}
                  }
                ).connect();
            
                await sologenic.setAccount({
                  address: '{YOUR WALLET ADDRESS}',
                  secret: '{YOUR WALLET SECRET}'
                });
            
                const tx = sologenic.submit({
                  TransactionType: 'TrustSet',
                  Account: 'rNbe8nh1K6nDC5XNsdAzHMtgYDXHZB486G',
                  LimitAmount: {
                    currency: '{CURRENCY}',
                    issuer: '{ISSUER}',
                    value: '0'
                  },
                  Flags: 2147483648
                });
            
                }).on('validated' => {
                  console.log('Success');
                });.on('failed' => {
                  console.log('Failed');
                });            
                console.log(await tx.promise);
              } catch (error) {
                console.log('Error:', error);
              }
            })();
          

And execute the code

            $ node trustline
3 Remove the Trustline from Sologenic

Now that you have removed the Trustline from test.xrptoolkit.com, you need to remove it by going back to the Sologenic Platform.
Find the asset in the list and click "Delete"

Next, You have to confirm that you have removed the Trustline from the XRP Ledger. Check the box and click "Continue"

Once removed, you will get a notification.