npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vwbl-sdk-xrpl

v0.1.1

Published

VWBL SDK for XRPL

Downloads

8

Readme

VWBL SDK for XRPL

official document

https://docs.vwbl-protocol.org

install

Using NPM

npm install vwbl-sdk-xrpl

Using Yarn

yarn add vwbl-sdk-xrpl

Build

npm run build:xrpl

Test

npm run test:xrpl

api document

create instance

const vwblXrpl = new VWBLXRPL({
  xrplChainId: 0, // Mainnet:0 / Testnet:1 / Devnet:2
  vwblNetworkUrl: "https://vwbl.network",
  uploadContentType: UploadContentType.S3,
  uploadMetadataType: UploadMetadataType.S3,
  awsConfig: {
    region: "ap-northeast-1",
    idPoolId: "ap-northeast-1:...",
    cloudFrontUrl: "https://xxx.cloudfront.net",
    bucketName: {
      metadata: "vwbl-metadata",
      content: "vwbl-content",
    },
  },
});

Constructor Options

| name | required | type | description | | ------------------ | -------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------- | | xrplChainId | true | number | XRPL public server type | | vwblNetworkUrl | true | string | VWBL network's url | | uploadContentType | flase | UploadContentType | where to upload content, you can choose from S3 IPFS CUSTOM | | uploadMetadataType | flase | UploadMetadataType | where to upload content, you can choose from S3 IPFS CUSTOM | | awsConfig | true if you choose to upload content or metadata to S3 | AWSConfig | AWSConfig *1 | | ipfsConfig | true if you choose to upload content or metadata to IPFS | IPFSConfig | IPFSConfig *2 |

AWSConfig(*1)

| name | required | type | description | | ------------- | -------- | ----------------------------------- | --------------------------------------------------------- | | region | true | string | AWS region | | idPoolId | true | string | idPoolId which has granted S3-put-object | | cloudFrontUrl | true | string | cloudFront url connect to s3 which is uploaded content | | bucketName | true | {content: string, metadata: string} | bucketName of metadata and content, it's ok they are same |

IPFSConfig(*2)

| name | required | type | description | | --------- | -------- | ------ | -------------- | | apiKey | true | string | API key | | apiSecret | false | string | API secret key |

|

SDK

SDK Flow

Generate NFT mint tx object to get user's signature

await vwblXrpl.generateMintTokenTx(
  walletAddress, // user's wallet address
  transferRoyalty,
  isTransferable,
  isBurnable
);

mint VWBL NFT

await vwblXrpl.mintAndGeneratePaymentTx(
  signedMintTx, // signed tx of `generateMintTokenTx`
  walletAddress
);

pay mint fee

await vwblXrpl.payMintFee(
  walletAddress,
  signedPaymentTx // signed tx of `mintAndGeneratePaymentTx`
);

create token

await vwbl.managedCreateToken(
  tokenId,
  xrplChainId,
  signedEmptyTx,
  signedPaymentTxHash,
  signerPublicKey,
  name,
  description,
  plainFile,
  thumbnailImage,
  encryptLogic="base64",
  uploadEncryptedFileCallback?,
  uploadThumbnailCallback?,
  uploadMetadataCallBack?
);

view contents ( get NFT metadata from given tokenId)

// generate tx object to get user's signature
const emptyTxObject = await vwblXrpl.generateTxForSigning(walletAddress);

// decrypt & fetch metadata
const {
  id,
  name,
  description,
  image,
  mimeType,
  encryptLogic,
  ownDataBase64,
  ownFiles,
  fileName,
} = vwblXrpl.extractMetadata(
  tokenId,
  signedEmptyTx,
  signerPublicKey
)