@verified-network/verified-sdk 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abi/loans/compound/Comet.json +1967 -0
- package/dist/contract/comet/index.d.ts +16 -0
- package/dist/contract/comet/index.js +32 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VerifiedContract, Options } from "../index";
|
|
2
|
+
import { VerifiedWallet } from "../../wallet";
|
|
3
|
+
export default class Comet extends VerifiedContract {
|
|
4
|
+
contractAddress: string;
|
|
5
|
+
constructor(signer: VerifiedWallet, contractNetworkAddress: string);
|
|
6
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[], apiKey?: string, rpcUrl?: string, isReactNative?: boolean): Promise<{
|
|
7
|
+
tokenAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
amountInWei: string;
|
|
10
|
+
amouuntValue: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
functionName: string;
|
|
13
|
+
}>;
|
|
14
|
+
allow(manager: string, isAllowed: string, options?: Options): any;
|
|
15
|
+
hasPermission(owner: string, manager: string): any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const index_1 = require("../index");
|
|
6
|
+
const Comet_json_1 = require("../../abi/loans/compound/Comet.json");
|
|
7
|
+
var FUNCTIONS;
|
|
8
|
+
(function (FUNCTIONS) {
|
|
9
|
+
FUNCTIONS["ALLOW"] = "allow";
|
|
10
|
+
FUNCTIONS["HASPERMISSION"] = "hasPermission";
|
|
11
|
+
})(FUNCTIONS || (FUNCTIONS = {}));
|
|
12
|
+
class Comet extends index_1.VerifiedContract {
|
|
13
|
+
constructor(signer, contractNetworkAddress) {
|
|
14
|
+
const address = contractNetworkAddress;
|
|
15
|
+
super(address, JSON.stringify(Comet_json_1.abi), signer);
|
|
16
|
+
this.contractAddress = address;
|
|
17
|
+
}
|
|
18
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args, apiKey, rpcUrl, isReactNative) {
|
|
19
|
+
return await this.getQuote(paymentTokenAddress, functionName, args, rpcUrl, apiKey, isReactNative);
|
|
20
|
+
}
|
|
21
|
+
async allow(manager, isAllowed, options) {
|
|
22
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, manager);
|
|
23
|
+
await this.validateInput(index_1.DATATYPES.BOOLEAN, isAllowed);
|
|
24
|
+
return this.callContract(FUNCTIONS.ALLOW, manager, isAllowed, options);
|
|
25
|
+
}
|
|
26
|
+
async hasPermission(owner, manager) {
|
|
27
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, owner);
|
|
28
|
+
await this.validateInput(index_1.DATATYPES.ADDRESS, manager);
|
|
29
|
+
return this.callContract(FUNCTIONS.HASPERMISSION, owner, manager);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = Comet;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ import SecuritiesFactory from "./contract/securitiesfactory";
|
|
|
17
17
|
import Distribution from "./contract/distribution";
|
|
18
18
|
import Client from "./contract/client";
|
|
19
19
|
import Compound from "./contract/loans/compound";
|
|
20
|
+
import Comet from "./contract/comet";
|
|
20
21
|
import { utils } from "ethers";
|
|
21
22
|
import contractAddress from "./contractAddress";
|
|
22
23
|
import { PaymasterConstants } from "./utils/constants";
|
|
23
|
-
export { VerifiedWallet, Provider, ERC20, Bond, Cash, Factory, Token, Pool, Custody, Liquidity, Rates, PrimaryIssueManager, SecondaryIssueManager, MarginIssueManager, Security, SecuritiesFactory, Distribution, Client, Compound, utils, contractAddress, PaymasterConstants, };
|
|
24
|
+
export { VerifiedWallet, Provider, ERC20, Bond, Cash, Factory, Token, Pool, Custody, Liquidity, Rates, PrimaryIssueManager, SecondaryIssueManager, MarginIssueManager, Security, SecuritiesFactory, Distribution, Client, Compound, Comet, utils, contractAddress, PaymasterConstants, };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PaymasterConstants = exports.contractAddress = exports.utils = exports.Compound = exports.Client = exports.Distribution = exports.SecuritiesFactory = exports.Security = exports.MarginIssueManager = exports.SecondaryIssueManager = exports.PrimaryIssueManager = exports.Rates = exports.Liquidity = exports.Custody = exports.Pool = exports.Token = exports.Factory = exports.Cash = exports.Bond = exports.ERC20 = exports.Provider = exports.VerifiedWallet = void 0;
|
|
6
|
+
exports.PaymasterConstants = exports.contractAddress = exports.utils = exports.Comet = exports.Compound = exports.Client = exports.Distribution = exports.SecuritiesFactory = exports.Security = exports.MarginIssueManager = exports.SecondaryIssueManager = exports.PrimaryIssueManager = exports.Rates = exports.Liquidity = exports.Custody = exports.Pool = exports.Token = exports.Factory = exports.Cash = exports.Bond = exports.ERC20 = exports.Provider = exports.VerifiedWallet = void 0;
|
|
7
7
|
// SPDX-License-Identifier: BUSL-1.1
|
|
8
8
|
const wallet_1 = require("./wallet");
|
|
9
9
|
Object.defineProperty(exports, "VerifiedWallet", { enumerable: true, get: function () { return wallet_1.VerifiedWallet; } });
|
|
@@ -43,6 +43,8 @@ const client_1 = __importDefault(require("./contract/client"));
|
|
|
43
43
|
exports.Client = client_1.default;
|
|
44
44
|
const compound_1 = __importDefault(require("./contract/loans/compound"));
|
|
45
45
|
exports.Compound = compound_1.default;
|
|
46
|
+
const comet_1 = __importDefault(require("./contract/comet"));
|
|
47
|
+
exports.Comet = comet_1.default;
|
|
46
48
|
const ethers_1 = require("ethers");
|
|
47
49
|
Object.defineProperty(exports, "utils", { enumerable: true, get: function () { return ethers_1.utils; } });
|
|
48
50
|
const contractAddress_1 = __importDefault(require("./contractAddress"));
|