Hierarchy

  • PKPSuiWallet

Implements

Constructors

Properties

defaultSigName: string = 'pkp-sui-sign-tx'
provider: JsonRpcProvider
publicKey: Secp256k1PublicKey

Methods

  • Runs the transaction in dev-inspect mode. Which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.

    Parameters

    • input: Omit<{
          epoch?: string;
          gasPrice?: number | bigint;
          sender: any;
          transactionBlock: string | Uint8Array | TransactionBlock;
      }, "sender">

    Returns Promise<any>

  • Dry run a transaction and return the result.

    Parameters

    • input: {
          transactionBlock: string | Uint8Array | TransactionBlock;
      }
      • transactionBlock: string | Uint8Array | TransactionBlock

    Returns Promise<any>

  • Returns the estimated gas cost for the transaction

    Returns

    total gas cost estimation

    Throws

    whens fails to estimate the gas cost

    Parameters

    • Rest ...args: [input: {
          transactionBlock: string | Uint8Array | TransactionBlock;
      }]

    Returns Promise<any>

  • Derive transaction digest from

    Returns

    transaction digest

    Parameters

    • tx: Uint8Array | TransactionBlock

      BCS serialized transaction data or a Transaction object

    Returns Promise<string>

  • Parameters

    • transactionBlock: Uint8Array | TransactionBlock

    Returns Promise<any>

  • Request gas tokens from a faucet server and send to the signer address

    Parameters

    • Optional httpHeaders: HttpHeaders

      optional request headers

    Returns Promise<any>

  • Runs the specified Lit action with the given parameters.

    Returns

    • A Promise that resolves with the signature returned by the Lit action.

    Throws

    • Throws an error if pkpPubKey is not provided, if controllerAuthSig or controllerSessionSigs is not provided, if controllerSessionSigs is not an object, if executeJsArgs does not have either code or ipfsId, or if an error occurs during the execution of the Lit action.

    Parameters

    • toSign: Uint8Array

      The data to be signed by the Lit action.

    • sigName: string

      The name of the signature to be returned by the Lit action.

    Returns Promise<any>

  • Sign the provided data with the PKP private key.

    Returns

    • A Promise that resolves with the signature of the provided data.

    Throws

    • Throws an error if pkpPubKey is not provided, if controllerAuthSig or controllerSessionSigs is not provided, if controllerSessionSigs is not an object, or if an error occurs during the signing process.

    Parameters

    • toSign: Uint8Array

      The data to be signed.

    Returns Promise<SigResponse>

  • Sign a transaction block and submit to the Fullnode for execution.

    Parameters

    • input: {
          options?: any;
          requestType?: ExecuteTransactionRequestType;
          transactionBlock: Uint8Array | TransactionBlock;
      }
      • Optional options?: any

        specify which fields to return (e.g., transaction, effects, events, etc). By default, only the transaction digest will be returned.

      • Optional requestType?: ExecuteTransactionRequestType

        WaitForEffectsCert or WaitForLocalExecution, see details in ExecuteTransactionRequestType. Defaults to WaitForLocalExecution if options.show_effects or options.show_events is true

      • transactionBlock: Uint8Array | TransactionBlock

    Returns Promise<any>

  • Sign a message using the keypair, with the PersonalMessage intent.

    Parameters

    • input: {
          message: Uint8Array;
      }
      • message: Uint8Array

    Returns Promise<SignedMessage>

  • Sign a transaction.

    Parameters

    • input: {
          transactionBlock: Uint8Array | TransactionBlock;
      }
      • transactionBlock: Uint8Array | TransactionBlock

    Returns Promise<SignedTransaction>

Generated using TypeDoc