How to use @requestnetwork/advanced-logic - 3 common examples

To help you get started, we’ve selected a few @requestnetwork/advanced-logic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RequestNetwork / requestNetwork / packages / prototype-estimator / src / size.ts View on Github external
type: RequestLogicTypes.CURRENCY.ETH,
    value: 'ETH',
  },
  expectedAmount: '100000000000',
  payee: signerIdentity,
  payer: {
    type: IdentityTypes.TYPE.ETHEREUM_ADDRESS,
    value: '0x740fc87Bd3f41d07d23A01DEc90623eBC5fed9D6',
  },
};

// Signature provider setup
const signatureProvider = new EthereumPrivateKeySignatureProvider(signatureInfo);

// Advanced logic setup
const advancedLogic = new AdvancedLogic();

/**
 * Sets up the test environment: instantiate the layers, including a mock storage
 *
 * @returns {Promise}
 */
async function setup(): Promise<{ mockStorage: MockStorage; requestLogic: RequestLogic }> {
  const mockStorage = new MockStorage();

  // Data access setup
  const dataAccess = new DataAccess(mockStorage);
  await dataAccess.initialize();

  // Logic setup
  return {
    mockStorage,
github RequestNetwork / requestNetwork / packages / request-client.js / src / api / request-network.ts View on Github external
public constructor(
    dataAccess: DataAccessTypes.IDataAccess,
    signatureProvider?: SignatureProviderTypes.ISignatureProvider,
    decryptionProvider?: DecryptionProviderTypes.IDecryptionProvider,
    bitcoinDetectionProvider?: Types.IBitcoinDetectionProvider,
  ) {
    this.advancedLogic = new AdvancedLogic();
    this.transaction = new TransactionManager(dataAccess, decryptionProvider);
    this.requestLogic = new RequestLogic(this.transaction, signatureProvider, this.advancedLogic);
    this.contentData = new ContentDataExtension(this.advancedLogic);
    this.bitcoinDetectionProvider = bitcoinDetectionProvider;
  }
github RequestNetwork / requestNetwork / packages / request-client.js / src / api / request-network.ts View on Github external
public constructor(
    dataAccess: DataAccessTypes.IDataAccess,
    signatureProvider?: SignatureProviderTypes.ISignatureProvider,
  ) {
    this.advancedLogic = new AdvancedLogic();
    this.transaction = new TransactionManager(dataAccess);
    this.requestLogic = new RequestLogic(this.transaction, signatureProvider, this.advancedLogic);
    this.contentData = new ContentDataExtension(this.advancedLogic);
  }

@requestnetwork/advanced-logic

Main package for the Advanced Request Network logic layer.

MIT
Latest version published 3 days ago

Package Health Score

76 / 100
Full package analysis

Popular @requestnetwork/advanced-logic functions