Skip to content

Commit

Permalink
yarn fmt run though there's hella eslint still to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed May 30, 2024
1 parent 1b6d7aa commit 476daa3
Show file tree
Hide file tree
Showing 44 changed files with 503 additions and 476 deletions.
6 changes: 3 additions & 3 deletions src/browser.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* tslint:disable:no-var-requires */

export * from "./index";
export * as StellarBase from "@stellar/stellar-base";
import axios from "axios";

import axios from "axios"; // idk why axios is weird
export * from "./index";
export * as StellarBase from "@stellar/stellar-base"; // idk why axios is weird
export { axios };

export default module.exports;
6 changes: 2 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
interface Configuration {
/**
* Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
*
* @type {boolean}
*/
allowHttp: boolean;
/**
* Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
*
* @type {number}
*/
timeout: number;
Expand All @@ -18,7 +16,7 @@ const defaultConfig: Configuration = {
timeout: 0,
};

let config = Object.assign({}, defaultConfig);
let config = { ...defaultConfig};

/**
* Global config class.
Expand Down Expand Up @@ -82,7 +80,7 @@ class Config {
* @returns {void}
*/
public static setDefault(): void {
config = Object.assign({}, defaultConfig);
config = { ...defaultConfig};
}
}

Expand Down
10 changes: 10 additions & 0 deletions src/contract/assembled_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ export class AssembledTransaction<T> {
* ...,
* simulate: false,
* })
* @param options
*/
static async build<T>(
options: AssembledTransactionOptions<T>,
Expand Down Expand Up @@ -509,6 +510,9 @@ export class AssembledTransaction<T> {
* includes the `signTransaction` method. After signing, this method will
* send the transaction to the network and return a `SentTransaction` that
* keeps track of all the attempts to fetch the transaction.
* @param root0
* @param root0.force
* @param root0.signTransaction
*/
signAndSend = async ({
force = false,
Expand Down Expand Up @@ -584,6 +588,8 @@ export class AssembledTransaction<T> {
* deserialize the transaction with `txFromJson`, and call
* {@link AssembledTransaction#signAuthEntries}. Then re-serialize and send to
* the next account in this list.
* @param root0
* @param root0.includeAlreadySigned
*/
needsNonInvokerSigningBy = ({
includeAlreadySigned = false,
Expand Down Expand Up @@ -646,6 +652,10 @@ export class AssembledTransaction<T> {
*
* Sending to all `needsNonInvokerSigningBy` owners in parallel is not
* currently supported!
* @param root0
* @param root0.expiration
* @param root0.publicKey
* @param root0.signAuthEntry
*/
signAuthEntries = async ({
expiration = this.getStorageExpiration(),
Expand Down
2 changes: 2 additions & 0 deletions src/contract/basic_node_signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import type { Client } from "./client";
* those classes. This is useful for testing and maybe some simple Node
* applications. Feel free to use this as a starting point for your own
* Wallet/TransactionSigner implementation.
* @param keypair
* @param networkPassphrase
*/
export const basicNodeSigner = (
/** {@link Keypair} to use to sign the transaction or auth entry */
Expand Down
5 changes: 2 additions & 3 deletions src/contract/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export class Client {
* Each method returns an {@link AssembledTransaction} that can be used to
* modify, simulate, decode results, and possibly sign, & submit the
* transaction.
* @param spec
* @param options
*/
constructor(
/** {@link Spec} to construct a Client for */
Expand Down Expand Up @@ -53,7 +55,6 @@ export class Client {
/**
* Generates a Client instance from the provided ClientOptions and the contract's wasm hash.
* The wasmHash can be provided in either hex or base64 format.
*
* @param wasmHash The hash of the contract's wasm binary, in either hex or base64 format.
* @param options The ClientOptions object containing the necessary configuration, including the rpcUrl.
* @param format The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex".
Expand All @@ -76,7 +77,6 @@ export class Client {

/**
* Generates a Client instance from the provided ClientOptions and the contract's wasm binary.
*
* @param wasm The contract's wasm binary as a Buffer.
* @param options The ClientOptions object containing the necessary configuration.
* @returns A Promise that resolves to a Client instance.
Expand All @@ -96,7 +96,6 @@ export class Client {

/**
* Generates a Client instance from the provided ClientOptions, which must include the contractId and rpcUrl.
*
* @param options The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl.
* @returns A Promise that resolves to a Client instance.
* @throws {TypeError} If the provided options object does not contain both rpcUrl and contractId.
Expand Down
2 changes: 2 additions & 0 deletions src/contract/sent_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export class SentTransaction<T> {
* Initialize a `SentTransaction` from an existing `AssembledTransaction` and
* a `signTransaction` function. This will also send the transaction to the
* network.
* @param signTransaction
* @param assembled
*/
static init = async <U>(
/** More info in {@link MethodOptions} */
Expand Down
Loading

0 comments on commit 476daa3

Please sign in to comment.