Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@metaplex-foundation/js-plugin-aws

Package Overview
Dependencies
2
Maintainers
10
Versions
12
Issues
File Explorer

Advanced tools

@metaplex-foundation/js-plugin-aws

Metaplex JavaScript SDK

    0.18.2latest
    GitHub

Version published
Maintainers
10
Weekly downloads
647
decreased by-12.21%

Weekly downloads

Changelog

Source

@metaplex-foundation/js@0.18.2

Patch Changes

  • 10644449: Allow updating items of fully loaded CMs
  • 2c01466e: pNFTs: pass the authorizationRulesProgram in the instruction

Readme

Source

AWS Plugin for the Metaplex JavaScript SDK

This plugin provides a storage driver for the Metaplex JavaScript SDK that uses Amazon Web Services (AWS) to upload assets.

Installation

npm install @metaplex-foundation/js-plugin-aws

Usage

The awsStorage plugin uploads assets off-chain to an S3 bucket of your choice.

To set this up, you need to pass in the AWS client as well as the bucket name you wish to use. For instance:

import { awsStorage } from "@metaplex-foundation/js-plugin-aws"; import { S3Client } from "@aws-sdk/client-s3"; const awsClient = new S3Client({ region: "us-east-1", credentials: { accessKeyId: "", secretAccessKey: "", }, }); metaplex.use(awsStorage(awsClient, 'my-nft-bucket'));

When uploading a MetaplexFile using metaplex.storage().upload(file), the unique name of the file will be used as the AWS key. By default, this will be a random string generated by the SDK but you may explicitly provide your own like so.

const file = toMetaplexFile('file-content', 'filename.jpg', { uniqueName: 'my-unique-aws-key', }) const uri = await metaplex.storage().upload(file);

Keywords

FAQs

Last updated on 27 Feb 2023

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc