How to use the stellar-base.StrKey.encodeEd25519PublicKey function in stellar-base

To help you get started, we’ve selected a few stellar-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stellar / js-stellar-sdk / src / server.ts View on Github external
);

                  const assetSold = {
                    type: sold.getAssetType(),
                    assetCode: sold.getCode(),
                    issuer: sold.getIssuer(),
                  };

                  const assetBought = {
                    type: bought.getAssetType(),
                    assetCode: bought.getCode(),
                    issuer: bought.getIssuer(),
                  };

                  return {
                    sellerId: StrKey.encodeEd25519PublicKey(
                      offerClaimed.sellerId().ed25519(),
                    ),
                    offerId: offerClaimed.offerId().toString(),
                    assetSold,
                    amountSold: _getAmountInLumens(claimedOfferAmountSold),
                    assetBought,
                    amountBought: _getAmountInLumens(claimedOfferAmountBought),
                  };
                });
github rate-engineering / rate3-monorepo / packages / demo / token-swap / src / utils / general.ts View on Github external
export const hexToEd25519PublicKey = (input) => {
  return StrKey.encodeEd25519PublicKey(hexToArrayBuffer(input));
};