ArweaveKit Docs
  • ArweaveKit
    • Introduction
  • πŸ”Wallets
    • Introduction to Wallets
    • Create Wallet
    • Get Wallet Address
    • Get Wallet Balance
    • Wallet Plugins
  • πŸ’³ARWEAVE WALLET KIT
    • Introduction to Arweave Wallet Kit
    • Setup
    • Connect Button
    • Hooks
    • Customization
  • 🏦Transactions
    • Introduction to Transactions
    • Create Transaction
    • Sign Transaction
    • Post Transaction
    • Get Transaction Status
    • Get Transaction
    • Create and Post Transaction with Othent
    • Transaction Plugins
  • πŸ“„SMART CONTRACTS
    • Introduction to Smart Contracts
    • Create Contract
    • Write Contract
    • Read Contract State
    • View Contract State
    • Write Contract with Othent
    • Read Contract with Othent
    • Smart Contract Plugins
  • βœ…AUTH
    • Introduction to Auth
    • Connect
    • Disconnect
    • Get Active Address
    • Get Permissions
    • Get Wallet Names
    • Get All Addresses
    • Get Active Public Key
    • Is Installed
    • Log In with Othent
    • Log Out with Othent
    • Get User Details with Othent
    • Auth Plugins
  • πŸ”Encryption
    • Introduction to Encryption
    • Encrypt Data with AES
    • Decrypt Data with AES
    • Encrypt AES Key with RSA
    • Decrypt AES Key with RSA
    • Encryption Plugins
  • 🌐GRAPHQL
    • Introduction to GraphQL
    • Query All Arweave Transactions
    • Query Arweave Data
    • Query Arweave Transactions
    • GraphQL Plugins
  • πŸ—ΊοΈRoadMap
    • Features
  • πŸ“˜REFERENCES
    • ArweaveKit in Browser Environments
  • πŸ› οΈSUPPORTING TOOLS
    • Arweave StarterKit
Powered by GitBook
On this page
  • Basic Syntax
  • Create a Plugin

Was this helpful?

  1. AUTH

Auth Plugins

Plug in a external package to arweavekit/auth

The use function exposed via the ArweaveKit object from arweavekit/auth package allows you to plugin external packages into arweave kit package.

Basic Syntax

The function is called as follows:

usage.js
import * as externalPackage from 'externalPackage';
import { ArweaveKit } from 'arweavekit/auth';

const arweaveKit = ArweaveKit.use({ name: 'MyPlugIn', plugin: externalPackage });

console.log(arweavekit.functionFromExternalPackage())

The ArweaveKit object imported also contains all functions from the ArweaveKit package for ease of use.

Create a Plugin

Most existing packages in Arweave will already be supported without any additional work, the functions just need to be defined and exported in the external package:

externalPackage.js
import * as ExternalPackage from 'package'
export function PackagePlugIn() {
    return ExternalPackage
}
PreviousGet User Details with OthentNextIntroduction to Encryption

Last updated 1 year ago

Was this helpful?

βœ