@verified-network/verified-sdk 2.0.0 → 2.0.2
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/README.md +1 -1
- package/dist/contract/amm/margin/index.d.ts +20 -45
- package/dist/contract/amm/margin/index.js +20 -17
- package/dist/contract/amm/primary/index.d.ts +22 -53
- package/dist/contract/amm/primary/index.js +3 -0
- package/dist/contract/amm/secondary/index.d.ts +16 -29
- package/dist/contract/amm/secondary/index.js +3 -0
- package/dist/contract/bond/index.d.ts +24 -31
- package/dist/contract/bond/index.js +25 -22
- package/dist/contract/cash/index.d.ts +21 -28
- package/dist/contract/cash/index.js +19 -16
- package/dist/contract/client/index.d.ts +33 -73
- package/dist/contract/client/index.js +11 -8
- package/dist/contract/custody/index.d.ts +20 -45
- package/dist/contract/custody/index.js +3 -0
- package/dist/contract/distribution/index.d.ts +32 -42
- package/dist/contract/distribution/index.js +20 -17
- package/dist/contract/erc20/index.d.ts +16 -29
- package/dist/contract/erc20/index.js +3 -0
- package/dist/contract/factory/index.d.ts +32 -66
- package/dist/contract/factory/index.js +14 -11
- package/dist/contract/index.d.ts +15 -0
- package/dist/contract/index.js +163 -16
- package/dist/contract/liquidity/index.d.ts +98 -144
- package/dist/contract/liquidity/index.js +63 -60
- package/dist/contract/loans/compound/index.d.ts +17 -21
- package/dist/contract/loans/compound/index.js +7 -4
- package/dist/contract/pool/index.d.ts +12 -13
- package/dist/contract/pool/index.js +4 -1
- package/dist/contract/rates/index.d.ts +13 -17
- package/dist/contract/rates/index.js +3 -0
- package/dist/contract/securitiesfactory/index.d.ts +23 -48
- package/dist/contract/securitiesfactory/index.js +6 -3
- package/dist/contract/security/index.d.ts +36 -109
- package/dist/contract/security/index.js +3 -0
- package/dist/contract/token/index.d.ts +19 -35
- package/dist/contract/token/index.js +7 -4
- package/dist/utils/constants.js +1 -0
- package/package.json +5 -4
|
@@ -40,6 +40,9 @@ class Security extends index_1.VerifiedContract {
|
|
|
40
40
|
super(address, JSON.stringify(Security_json_1.abi), signer);
|
|
41
41
|
this.contractAddress = address;
|
|
42
42
|
}
|
|
43
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
44
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
45
|
+
}
|
|
43
46
|
async whiteList(_spender, _amount, options) {
|
|
44
47
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _spender);
|
|
45
48
|
await this.validateInput(index_1.DATATYPES.NUMBER, _amount);
|
|
@@ -1,51 +1,35 @@
|
|
|
1
|
-
import { VerifiedContract } from
|
|
1
|
+
import { VerifiedContract, Options } from "../index";
|
|
2
2
|
import { VerifiedWallet } from "../../wallet";
|
|
3
3
|
export default class Token extends VerifiedContract {
|
|
4
4
|
contractAddress: string;
|
|
5
5
|
constructor(signer: VerifiedWallet, bondCurrencyAddress: string);
|
|
6
|
+
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
|
|
7
|
+
tokenAddress: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
amountInWei: string;
|
|
10
|
+
amouuntValue: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
functionName: string;
|
|
13
|
+
}>;
|
|
6
14
|
/**
|
|
7
15
|
* Lend by purchasing bond token against other cash token [callable by client]
|
|
8
16
|
* _sender is address of bond token redeemed,
|
|
9
17
|
* _receiver is bond token address,
|
|
10
18
|
* _tokens is amount of tokens redeemed
|
|
11
19
|
* @param (address _sender, address _receiver, uint256 _tokens)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
transferFrom(_senderAddress: string, _recieverAddress: string, _tokens: string, options?:
|
|
15
|
-
|
|
16
|
-
gasLimit: number;
|
|
17
|
-
}): any;
|
|
18
|
-
balanceOf(_wallet: string, options?: {
|
|
19
|
-
gasPrice: number;
|
|
20
|
-
gasLimit: number;
|
|
21
|
-
}): any;
|
|
20
|
+
* @returns bool
|
|
21
|
+
*/
|
|
22
|
+
transferFrom(_senderAddress: string, _recieverAddress: string, _tokens: string, options?: Options): any;
|
|
23
|
+
balanceOf(_wallet: string, options?: Options): any;
|
|
22
24
|
getIssuer(): any;
|
|
23
|
-
requestTransfer(_recieverAddress: string, _tokens: string, options?:
|
|
24
|
-
|
|
25
|
-
gasLimit: number;
|
|
26
|
-
}): any;
|
|
27
|
-
requestTransaction(_amount: string, _payer: string, _collateralName: string, _collateralContract: string, options?: {
|
|
28
|
-
gasPrice: number;
|
|
29
|
-
gasLimit: number;
|
|
30
|
-
}): any;
|
|
25
|
+
requestTransfer(_recieverAddress: string, _tokens: string, options?: Options): any;
|
|
26
|
+
requestTransaction(_amount: string, _payer: string, _collateralName: string, _collateralContract: string, options?: Options): any;
|
|
31
27
|
name(): any;
|
|
32
28
|
symbol(): any;
|
|
33
29
|
decimals(): any;
|
|
34
30
|
totalSupply(): any;
|
|
35
|
-
approve(_spender: string, _amount: string, options?:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
allowance(_owner: string, _spender: string, options?: {
|
|
40
|
-
gasPrice: number;
|
|
41
|
-
gasLimit: number;
|
|
42
|
-
}): any;
|
|
43
|
-
increaseAllowance(_spender: string, _addedValue: string, options?: {
|
|
44
|
-
gasPrice: number;
|
|
45
|
-
gasLimit: number;
|
|
46
|
-
}): any;
|
|
47
|
-
decreaseAllowance(_spender: string, _subtractedValue: string, options?: {
|
|
48
|
-
gasPrice: number;
|
|
49
|
-
gasLimit: number;
|
|
50
|
-
}): any;
|
|
31
|
+
approve(_spender: string, _amount: string, options?: Options): any;
|
|
32
|
+
allowance(_owner: string, _spender: string, options?: Options): any;
|
|
33
|
+
increaseAllowance(_spender: string, _addedValue: string, options?: Options): any;
|
|
34
|
+
decreaseAllowance(_spender: string, _subtractedValue: string, options?: Options): any;
|
|
51
35
|
}
|
|
@@ -27,14 +27,17 @@ class Token extends index_1.VerifiedContract {
|
|
|
27
27
|
super(address, JSON.stringify(Token_json_1.abi), signer);
|
|
28
28
|
this.contractAddress = address;
|
|
29
29
|
}
|
|
30
|
+
async _getMeeQuote(paymentTokenAddress, functionName, args) {
|
|
31
|
+
return await this.getQuote(paymentTokenAddress, functionName, args);
|
|
32
|
+
}
|
|
30
33
|
/**
|
|
31
34
|
* Lend by purchasing bond token against other cash token [callable by client]
|
|
32
35
|
* _sender is address of bond token redeemed,
|
|
33
36
|
* _receiver is bond token address,
|
|
34
37
|
* _tokens is amount of tokens redeemed
|
|
35
38
|
* @param (address _sender, address _receiver, uint256 _tokens)
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
* @returns bool
|
|
40
|
+
*/
|
|
38
41
|
async transferFrom(_senderAddress, _recieverAddress, _tokens, options) {
|
|
39
42
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _senderAddress);
|
|
40
43
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _recieverAddress);
|
|
@@ -42,13 +45,13 @@ class Token extends index_1.VerifiedContract {
|
|
|
42
45
|
return this.callContract(FUNCTIONS.TRANSFERFROM, _senderAddress, _recieverAddress, _tokens, options);
|
|
43
46
|
}
|
|
44
47
|
/* Request bond token balance of wallet
|
|
45
|
-
|
|
48
|
+
*/
|
|
46
49
|
async balanceOf(_wallet, options) {
|
|
47
50
|
await this.validateInput(index_1.DATATYPES.ADDRESS, _wallet);
|
|
48
51
|
return this.callContract(FUNCTIONS.BALANCE, _wallet, options);
|
|
49
52
|
}
|
|
50
53
|
/* Get address of issuer of token
|
|
51
|
-
|
|
54
|
+
*/
|
|
52
55
|
async getIssuer() {
|
|
53
56
|
return this.callContract(FUNCTIONS.GETISSUER);
|
|
54
57
|
}
|
package/dist/utils/constants.js
CHANGED
|
@@ -12,6 +12,7 @@ exports.PaymasterConstants = {
|
|
|
12
12
|
PAYMASTER_API_KEY: "BuFP2-5w-.5b3daf3a-d044-4dda-819c-4c4d8431df88",
|
|
13
13
|
BUNDLER_API_KEY: "nJPK7B3ru.dd7f7861-190d-41bd-af80-6877f74b8f44",
|
|
14
14
|
RPC_URL: "https://rpc.sepolia.org",
|
|
15
|
+
PAYMENT_TOKEN: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
15
16
|
},
|
|
16
17
|
//polgon mainnet
|
|
17
18
|
137: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verified-network/verified-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "An SDK to develop applications on the Verified Network",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,11 +31,12 @@
|
|
|
31
31
|
"greet": "./bin/index.bin.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"@biconomy/abstractjs": "^1.0.13",
|
|
34
35
|
"@biconomy/account": "^4.1.1",
|
|
35
|
-
"
|
|
36
|
+
"@rhinestone/module-sdk": "^0.2.8",
|
|
36
37
|
"ethers": "^5.7.2",
|
|
37
38
|
"tslib": "^2.6.2",
|
|
38
|
-
"viem": "^2.
|
|
39
|
+
"viem": "^2.29.3"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/mocha": "^10.0.6",
|
|
@@ -43,4 +44,4 @@
|
|
|
43
44
|
"ts-node": "^10.9.1",
|
|
44
45
|
"typescript": "^5.4.5"
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
|
+
}
|