Git Product home page Git Product logo

arweavekit's People

Contributors

7i7o avatar codingknite avatar crookse-cl avatar kranthicodes avatar lorimerjenkins avatar pawanpaudel93 avatar ropats16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

arweavekit's Issues

Add support for warps injectedArweaveSigner plugin

Ran into an issue when using writeContract from an arConnect wallet in the browser.

"Uncaught (in promise) Error: Signer not set correctly. If you connect wallet through 'use_wallet', please remember that it only works when bundling is disabled."

image

Would be fantastic to support the injectedArweaveSigner plugin with arweavekit so transactions could be bundled and sequenced by warp.

❤️

tx/post

Description

  • function to post or submit a transaction
  • returns transaction data
  • options.bundler specifies if it should go to a bundler other than the current gateway

inputs

  • data
  • options
  • key
interface Inputs {
    data: string | Uint8Array | ArrayBuffer;
    options: {
	chunk: boolean;
	bundler: boolean;
     };
    key: JWKInterface
}

return type

type transaction = Transaction

wallet/create

Description

  • function to generate new wallet and private key
  • returns wallet address, JWK and seed phrase if options.seedPhrase is passed in as true

inputs

  • options
interface options {
    seedPhrase: boolean
}

return type

interface ReturnProps {
    key: JWKInterface;
    walletAddress: string;
    seedPhrase?: string;
}

tx/status

Description

  • get status of a transaction
  • returns transaction status

inputs

  • transactionId

connect wallet

  • Connect wallet to transaction
  • Before writeInteraction

tx/get

Description

  • gets transaction OR transaction data OR transaction data and tags
  • returns transaction OR transaction data OR transaction data and tags

inputs

  • transactionId
  • options
interface Inputs {
  transactionId: string;
  options?: {
    data?: boolean;
    tags?: boolean;
  };
}

wallet/getBalance

Description

  • function to get the balance of a wallet address
  • accepts wallet address and returns balance

inputs

  • address
interface options {
    address: boolean
}

####return type

interface ReturnProps {
    balance: string;
}

wallet/getAddress

Description

  • function to get the wallet address for a private key new wallet and private key
  • returns wallet address

inputs

  • key
    type Key = JWKInterface 

return type

interface ReturnProps {
    walletAddress: string;
}

tx/sign

Description

  • function to sign transaction
  • Returns transaction data

inputs

  • transaction
type transaction = Transaction
  • key
type key = JWKInterface 

return type

interface Transaction {
    id: string,
    format: number;
    last_tx: string;
    owner: string;
    tags: Tag[];
    target: string;
    ....
}

permawebjs tag

add permawebjs tag to all transactions made through the library

transaction/create

Description

  • function to create new transaction
  • returns transaction data
  • use ArBundles if options.uploadLargeBatch = true
  • create wallet to wallet transaction if both options.target and
    options.quantity are provided
  • either options.quantity && options.target || data params must be provided
    to create a transaction

inputs

  • data
    Data to send with transaction
type data = string | Uint8Array | ArrayBuffer;
  • options
interface Options {
    tags: Tag[];
    quantity?: string;
    target?: string;
    uploadLargeBatch?: boolean
}

return data

interface Transaction {
    id: string,
    format: number;
    last_tx: string;
    owner: string;
    tags: Tag[];
    .....
}

Add function to get raw transaction data (the core image, video, file, etc)

Description

Create a getData function that returns the core data associated with a transaction id for mainnet, bundled and arlocal transactions.

Steps for usage

Here's how the function will be used:

import { getData } from 'arweavekit/transaction'

const data = await getData({
   transactionId: string,
   environment: string,
});

Compatible Environments

  • NodeJS
  • Browser

Additional Context

  • The arweave-js implementation can be used for some reference, however, this does not support bundled transaction ids (the ArweaveKit' getData function should fetch the core data for bundled transaction ids as well).
  • Make sure to update types and tests accordingly.
  • The getTransaction function will be deprecated after this implementation as it returns the transaction metadata associated with a transaction id (docs for function) however this can be fetched with our GraphQL utilities as well.

wallet/getKey

Description

  • function to get the private key of a wallet address
  • returns private key

inputs

  • seedPhrase
type seedPhrase = string

return type

type key = JWKInterface

Add support for custom configs of the Warp SDK

This is a feature request to upgrade the contract utilities of arweavekit by adding support for custom warp configs :

  • the ability to set evaluation options when creating a warp instance on the backend by taking in input params as an evaluation options object.
  • the ability to disable bundling for being able to use the window object for contract interactions

fix/createTransaction

  • check if no params are given
    • to avoid passing in empty object
  • create transaction folder for tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.