Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Merge pull request #10 from argoapp-live/dev
Browse files Browse the repository at this point in the history
Publishing v1.1.0
  • Loading branch information
rekpero authored Mar 22, 2022
2 parents 359aa6d + 47f0faf commit 1d03f4e
Show file tree
Hide file tree
Showing 52 changed files with 8,895 additions and 7,863 deletions.
Binary file added .DS_Store
Binary file not shown.
8 changes: 7 additions & 1 deletion build/abstracts/deployed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export default abstract class implements Keyed {
erc20Contract?: Contract;
biconomyERC20Contract?: Contract;
services: Services;
protected constructor(v: Vendor, a: Abi, e: Abi);
subscriptionPaymentAbi: Abi;
subscriptionPaymentContract?: Contract;
subscriptionDataAbi: Abi;
subscriptionDataContract?: Contract;
tokenPrecision?: number;
protected constructor(v: Vendor, a: Abi, e: Abi, subscriptionPayments: Abi, subscriptionData: Abi);
at(a: string, e: string, o?: TransactOpts): Promise<boolean>;
subscriptionAt(subscriptionPayments: string, subscriptionData: string, e: string, p: number, o?: TransactOpts): Promise<boolean>;
}
18 changes: 17 additions & 1 deletion build/abstracts/deployed.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const services_1 = __importDefault(require("../services/services"));
class default_1 {
constructor(v, a, e) {
constructor(v, a, e, subscriptionPayments, subscriptionData) {
this.vendor = v;
this.paymentsAbi = a;
this.erc20Abi = e;
this.subscriptionPaymentAbi = subscriptionPayments;
this.subscriptionDataAbi = subscriptionData;
this.services = new services_1.default();
}
at(a, e, o) {
return __awaiter(this, void 0, void 0, function* () {
this.paymentsContract = this.vendor.contract(a, this.paymentsAbi, o);
this.erc20Contract = this.vendor.contract(e, this.erc20Abi);
this.tokenPrecision = 18;
this.services = new services_1.default();
if (this.vendor.biconomy !== undefined) {
this.biconomyERC20Contract = this.vendor.contract(e, this.erc20Abi, this.vendor.biconomy.getSignerByAddress(yield this.vendor.signer.getAddress()));
}
return !!this.paymentsContract && !!this.erc20Contract;
});
}
subscriptionAt(subscriptionPayments, subscriptionData, e, p, o) {
return __awaiter(this, void 0, void 0, function* () {
this.subscriptionPaymentContract = this.vendor.contract(subscriptionPayments, this.subscriptionPaymentAbi, o);
this.subscriptionDataContract = this.vendor.contract(subscriptionData, this.subscriptionDataAbi, o);
this.tokenPrecision = p;
this.erc20Contract = this.vendor.contract(e, this.erc20Abi);
this.services = new services_1.default();
if (this.vendor.biconomy !== undefined) {
this.biconomyERC20Contract = this.vendor.contract(e, this.erc20Abi, this.vendor.biconomy.getSignerByAddress(yield this.vendor.signer.getAddress()));
}
return !!this.subscriptionPaymentContract && !!this.subscriptionPaymentContract && !!this.erc20Contract;
});
}
}
exports.default = default_1;
4 changes: 2 additions & 2 deletions build/abstracts/services.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Keyed } from '../interfaces';
export default abstract class implements Keyed {
[key: string]: any;
abstract arweaveToUsd(a: string, k: string): Promise<number>;
abstract arweaveQuote(k: string): Promise<number>;
abstract tokenToUSD(a: string, t: number, k: string): Promise<number>;
abstract tokenQuote(t: number, k: string): Promise<number>;
}
5 changes: 3 additions & 2 deletions build/abstracts/vendor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ export default abstract class implements Keyed {
biconomy: any;
abstract contract(address: string, abi: Abi, o?: TransactOpts): Contract;
abstract convertToBN(amount: string): any;
abstract convertToWei(amount: string): any;
abstract convertToWei(amount: string, precision: number): any;
abstract convertStringArrayToBigNumberArray(array: Array<string>): Array<any>;
abstract convertWeiToEth(wei: any): any;
abstract convertWeiToEth(wei: any, precision: number): any;
abstract verifySignedMessage(m: string, s: string): any;
abstract signMessage(m: string): Promise<string>;
abstract getSignatureParameters(signature: string): SignatureParams;
abstract abiEncodeErc20Functions(f: string, p: Array<any>): string;
abstract signedMessageForTx(u: string, n: number, f: string, a: string, c: number): Promise<string>;
abstract signedMessageForMultiTokenTx(u: string, n: number, f: string, tokenAddress: string, tokenName: string, c: number): Promise<string>;
}
6 changes: 5 additions & 1 deletion build/constants/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand Down
85 changes: 85 additions & 0 deletions build/constants/payment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,91 @@ export declare const ERC20_ABI: ({
}[];
anonymous?: undefined;
})[];
export declare const SUBSCRIPTION_PAYMENT_ABI: ({
inputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
name?: undefined;
outputs?: undefined;
} | {
anonymous: boolean;
inputs: {
indexed: boolean;
internalType: string;
name: string;
type: string;
}[];
name: string;
type: string;
stateMutability?: undefined;
outputs?: undefined;
} | {
inputs: {
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: never[];
stateMutability: string;
type: string;
anonymous?: undefined;
} | {
inputs: never[];
name: string;
outputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
})[];
export declare const SUBSCRIPTION_DATA_ABI: ({
inputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
name?: undefined;
outputs?: undefined;
} | {
anonymous: boolean;
inputs: {
indexed: boolean;
internalType: string;
name: string;
type: string;
}[];
name: string;
type: string;
stateMutability?: undefined;
outputs?: undefined;
} | {
inputs: {
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: {
internalType: string;
name: string;
type: string;
}[];
stateMutability: string;
type: string;
anonymous?: undefined;
})[];
export declare const metaTransactionType: {
name: string;
type: string;
Expand Down
Loading

0 comments on commit 1d03f4e

Please sign in to comment.