@verified-network/verified-sdk 1.9.9 → 2.0.1

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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/abi/assetmanager/balancer/MarginIssueManager.json +7309 -7271
  3. package/dist/contract/amm/margin/index.d.ts +20 -45
  4. package/dist/contract/amm/margin/index.js +20 -17
  5. package/dist/contract/amm/primary/index.d.ts +22 -53
  6. package/dist/contract/amm/primary/index.js +3 -0
  7. package/dist/contract/amm/secondary/index.d.ts +16 -29
  8. package/dist/contract/amm/secondary/index.js +3 -0
  9. package/dist/contract/bond/index.d.ts +24 -31
  10. package/dist/contract/bond/index.js +25 -22
  11. package/dist/contract/cash/index.d.ts +21 -28
  12. package/dist/contract/cash/index.js +19 -16
  13. package/dist/contract/client/index.d.ts +33 -73
  14. package/dist/contract/client/index.js +11 -8
  15. package/dist/contract/custody/index.d.ts +20 -45
  16. package/dist/contract/custody/index.js +3 -0
  17. package/dist/contract/distribution/index.d.ts +32 -42
  18. package/dist/contract/distribution/index.js +20 -17
  19. package/dist/contract/erc20/index.d.ts +16 -29
  20. package/dist/contract/erc20/index.js +3 -0
  21. package/dist/contract/factory/index.d.ts +32 -66
  22. package/dist/contract/factory/index.js +14 -11
  23. package/dist/contract/index.d.ts +15 -0
  24. package/dist/contract/index.js +172 -16
  25. package/dist/contract/liquidity/index.d.ts +98 -144
  26. package/dist/contract/liquidity/index.js +63 -60
  27. package/dist/contract/loans/compound/index.d.ts +17 -21
  28. package/dist/contract/loans/compound/index.js +7 -4
  29. package/dist/contract/pool/index.d.ts +12 -13
  30. package/dist/contract/pool/index.js +4 -1
  31. package/dist/contract/rates/index.d.ts +13 -17
  32. package/dist/contract/rates/index.js +3 -0
  33. package/dist/contract/securitiesfactory/index.d.ts +23 -48
  34. package/dist/contract/securitiesfactory/index.js +6 -3
  35. package/dist/contract/security/index.d.ts +36 -109
  36. package/dist/contract/security/index.js +3 -0
  37. package/dist/contract/token/index.d.ts +19 -35
  38. package/dist/contract/token/index.js +7 -4
  39. package/dist/contractAddress/index.js +1 -1
  40. package/dist/utils/constants.js +1 -0
  41. package/package.json +5 -4
@@ -1,86 +1,46 @@
1
- import { VerifiedContract } from '../index';
1
+ import { VerifiedContract, Options } from "../index";
2
2
  import { VerifiedWallet } from "../../wallet";
3
3
  export default class Client extends VerifiedContract {
4
4
  contractAddress: string;
5
5
  constructor(signer: VerifiedWallet, contractNetworkAddress: string);
6
6
  setSigner(_address: string): any;
7
+ _getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
8
+ tokenAddress: string;
9
+ amount: string;
10
+ amountInWei: string;
11
+ amouuntValue: string;
12
+ chainId: number;
13
+ functionName: string;
14
+ }>;
7
15
  /**
8
- * Get sub-managers for role [callable only by manager]
9
- * @params (address _submanager, bytes32 _country)
10
- * @returns {address[] memory}
11
- */
12
- getRole(_submanager: string, options?: {
13
- gasPrice: any;
14
- gasLimit: any;
15
- }): any;
16
+ * Get sub-managers for role [callable only by manager]
17
+ * @params (address _submanager, bytes32 _country)
18
+ * @returns {address[] memory}
19
+ */
20
+ getRole(_submanager: string, options?: Options): any;
16
21
  /**
17
- * Remove sub-manager from role [callable only by manager]
18
- * @params (address _submanager, bytes32 _country, bytes32 _role)
19
- * @returns
20
- */
21
- removeRole(_manager: string, _submanager: string, _country: string, _role: string, _hashedMessage: string, _v: string, _r: string, _s: string, options?: {
22
- gasPrice: any;
23
- gasLimit: any;
24
- }): any;
22
+ * Remove sub-manager from role [callable only by manager]
23
+ * @params (address _submanager, bytes32 _country, bytes32 _role)
24
+ * @returns
25
+ */
26
+ removeRole(_manager: string, _submanager: string, _country: string, _role: string, _hashedMessage: string, _v: string, _r: string, _s: string, options?: Options): any;
25
27
  /**
26
28
  * Create role for sub-manager [callable only by manager
27
29
  * @params (address _submanager, bytes32 _country, bytes32 _role)
28
30
  * @returns
29
31
  */
30
- addRole(_manager: string, _submanager: string, _country: string, _role: string, _id: string, _hashedMessage: string, _v: string, _r: string, _s: string, options?: {
31
- gasPrice: any;
32
- gasLimit: any;
33
- }): any;
34
- KycUpdate(client: string, name: string, surname: string, country: string, contact: string, status: string, options?: {
35
- gasPrice: any;
36
- gasLimit: any;
37
- }): any;
38
- fullKycUpdate(client: string, identity: string, videokyc: string, docs: string, options?: {
39
- gasPrice: any;
40
- gasLimit: any;
41
- }): any;
42
- getClientKYC(_client: string, options?: {
43
- gasPrice: any;
44
- gasLimit: any;
45
- }): any;
46
- getFullClientKYC(_client: string, options?: {
47
- gasPrice: any;
48
- gasLimit: any;
49
- }): any;
50
- setAmlScore(_client: string, _score: string, options?: {
51
- gasPrice: any;
52
- gasLimit: any;
53
- }): any;
54
- setCreditScore(_client: string, _score: string, options?: {
55
- gasPrice: any;
56
- gasLimit: any;
57
- }): any;
58
- setAmlPassScore(_score: string, options?: {
59
- gasPrice: any;
60
- gasLimit: any;
61
- }): any;
62
- getAMLStatus(_client: string, options?: {
63
- gasPrice: any;
64
- gasLimit: any;
65
- }): any;
66
- setCustodyAccount(_submanager: string, _currency: string, _accountId: string, options?: {
67
- gasPrice: any;
68
- gasLimit: any;
69
- }): any;
70
- getCustodyAccount(_submanager: string, options?: {
71
- gasPrice: any;
72
- gasLimit: any;
73
- }): any;
74
- getManagers(_country: string, _role: string, options?: {
75
- gasPrice: any;
76
- gasLimit: any;
77
- }): any;
78
- setCustody(_client: string, _account: string, options?: {
79
- gasPrice: any;
80
- gasLimit: any;
81
- }): any;
82
- getCustody(_client: string, options?: {
83
- gasPrice: any;
84
- gasLimit: any;
85
- }): any;
32
+ addRole(_manager: string, _submanager: string, _country: string, _role: string, _id: string, _hashedMessage: string, _v: string, _r: string, _s: string, options?: Options): any;
33
+ KycUpdate(client: string, name: string, surname: string, country: string, contact: string, status: string, options?: Options): any;
34
+ fullKycUpdate(client: string, identity: string, videokyc: string, docs: string, options?: Options): any;
35
+ getClientKYC(_client: string, options?: Options): any;
36
+ getFullClientKYC(_client: string, options?: Options): any;
37
+ setAmlScore(_client: string, _score: string, options?: Options): any;
38
+ setCreditScore(_client: string, _score: string, options?: Options): any;
39
+ setAmlPassScore(_score: string, options?: Options): any;
40
+ getAMLStatus(_client: string, options?: Options): any;
41
+ setCustodyAccount(_submanager: string, _currency: string, _accountId: string, options?: Options): any;
42
+ getCustodyAccount(_submanager: string, options?: Options): any;
43
+ getManagers(_country: string, _role: string, options?: Options): any;
44
+ setCustody(_client: string, _account: string, options?: Options): any;
45
+ getCustody(_client: string, options?: Options): any;
86
46
  }
@@ -35,20 +35,23 @@ class Client extends index_1.VerifiedContract {
35
35
  setSigner(_address) {
36
36
  return this.callContract(FUNCTIONS.SETSIGNER, _address);
37
37
  }
38
+ async _getMeeQuote(paymentTokenAddress, functionName, args) {
39
+ return await this.getQuote(paymentTokenAddress, functionName, args);
40
+ }
38
41
  /**
39
- * Get sub-managers for role [callable only by manager]
40
- * @params (address _submanager, bytes32 _country)
41
- * @returns {address[] memory}
42
- */
42
+ * Get sub-managers for role [callable only by manager]
43
+ * @params (address _submanager, bytes32 _country)
44
+ * @returns {address[] memory}
45
+ */
43
46
  async getRole(_submanager, options) {
44
47
  await this.validateInput(index_1.DATATYPES.ADDRESS, _submanager);
45
48
  return this.callContract(FUNCTIONS.GETROLE, _submanager, options);
46
49
  }
47
50
  /**
48
- * Remove sub-manager from role [callable only by manager]
49
- * @params (address _submanager, bytes32 _country, bytes32 _role)
50
- * @returns
51
- */
51
+ * Remove sub-manager from role [callable only by manager]
52
+ * @params (address _submanager, bytes32 _country, bytes32 _role)
53
+ * @returns
54
+ */
52
55
  async removeRole(_manager, _submanager, _country, _role, _hashedMessage, _v, _r, _s, options) {
53
56
  await this.validateInput(index_1.DATATYPES.ADDRESS, _manager);
54
57
  await this.validateInput(index_1.DATATYPES.ADDRESS, _submanager);
@@ -1,53 +1,28 @@
1
- import { VerifiedContract } from '../index';
1
+ import { VerifiedContract, Options } from "../index";
2
2
  import { VerifiedWallet } from "../../wallet";
3
3
  export default class Custody extends VerifiedContract {
4
4
  contractAddress: string;
5
5
  constructor(signer: VerifiedWallet, contractNetworkAddress: string);
6
- createVault(_creator: string, _id: string, options?: {
7
- gasPrice: number;
8
- gasLimit: number;
9
- }): any;
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
+ }>;
14
+ createVault(_creator: string, _id: string, options?: Options): any;
10
15
  getVaults(): any;
11
- transferVault(_creator: string, _id: string, _transferee: string, options?: {
12
- gasPrice: number;
13
- gasLimit: number;
14
- }): any;
15
- getCreator(_creator: string, _pin: string, options?: {
16
- gasPrice: number;
17
- gasLimit: number;
18
- }): any;
19
- addParticipant(_creator: string, _id: string, _participant: string, _shard: string, options?: {
20
- gasPrice: number;
21
- gasLimit: number;
22
- }): any;
23
- removeParticipant(_creator: string, _id: string, _participant: string, options?: {
24
- gasPrice: number;
25
- gasLimit: number;
26
- }): any;
27
- confirmParticipant(_creator: string, _id: string, _participant: string, _pin: string, _confirmation: string, options?: {
28
- gasPrice: number;
29
- gasLimit: number;
30
- }): any;
31
- defineQuorum(_creator: string, _id: string, _minParticipants: string, options?: {
32
- gasPrice: number;
33
- gasLimit: number;
34
- }): any;
35
- promptSignatures(_creator: string, _id: string, options?: {
36
- gasPrice: number;
37
- gasLimit: number;
38
- }): any;
39
- signTransaction(_creator: string, _id: string, _participant: string, _tx: string, _pin: string, options?: {
40
- gasPrice: number;
41
- gasLimit: number;
42
- }): any;
43
- checkQuorum(_creator: string, _id: string, _participant: string, _txid: string, options?: {
44
- gasPrice: number;
45
- gasLimit: number;
46
- }): any;
47
- getShards(_creator: string, _id: string, _txid: string, options?: {
48
- gasPrice: number;
49
- gasLimit: number;
50
- }): any;
16
+ transferVault(_creator: string, _id: string, _transferee: string, options?: Options): any;
17
+ getCreator(_creator: string, _pin: string, options?: Options): any;
18
+ addParticipant(_creator: string, _id: string, _participant: string, _shard: string, options?: Options): any;
19
+ removeParticipant(_creator: string, _id: string, _participant: string, options?: Options): any;
20
+ confirmParticipant(_creator: string, _id: string, _participant: string, _pin: string, _confirmation: string, options?: Options): any;
21
+ defineQuorum(_creator: string, _id: string, _minParticipants: string, options?: Options): any;
22
+ promptSignatures(_creator: string, _id: string, options?: Options): any;
23
+ signTransaction(_creator: string, _id: string, _participant: string, _tx: string, _pin: string, options?: Options): any;
24
+ checkQuorum(_creator: string, _id: string, _participant: string, _txid: string, options?: Options): any;
25
+ getShards(_creator: string, _id: string, _txid: string, options?: Options): any;
51
26
  notifyNewParticipant(callback: any): object;
52
27
  notifyNewTransaction(callback: any): object;
53
28
  notifySignTransaction(callback: any): object;
@@ -28,6 +28,9 @@ class Custody extends index_1.VerifiedContract {
28
28
  super(address, JSON.stringify(Vault_json_1.abi), signer);
29
29
  this.contractAddress = address;
30
30
  }
31
+ async _getMeeQuote(paymentTokenAddress, functionName, args) {
32
+ return await this.getQuote(paymentTokenAddress, functionName, args);
33
+ }
31
34
  async createVault(_creator, _id, options) {
32
35
  await this.validateInput(index_1.DATATYPES.STRING, _creator);
33
36
  await this.validateInput(index_1.DATATYPES.STRING, _id);
@@ -1,55 +1,45 @@
1
- import { VerifiedContract } from '../index';
1
+ import { VerifiedContract, Options } from "../index";
2
2
  import { VerifiedWallet } from "../../../wallet";
3
3
  export default class Distribution extends VerifiedContract {
4
4
  contractAddress: string;
5
5
  constructor(signer: VerifiedWallet, contractNetworkAddress: 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
- Shares fee income with revenue shareholders
8
- */
15
+ Shares fee income with revenue shareholders
16
+ */
9
17
  shareFee(): any;
10
18
  shareCollection(): any;
11
19
  /**
12
- Gets payment fee collected
13
- @param _currency payment fee in currency collected
14
- */
15
- getPaymentFeeCollected(_currency: string, options?: {
16
- gasPrice: number;
17
- gasLimit: number;
18
- }): any;
20
+ Gets payment fee collected
21
+ @param _currency payment fee in currency collected
22
+ */
23
+ getPaymentFeeCollected(_currency: string, options?: Options): any;
19
24
  /**
20
- Gets loan fee collected
21
- @param _currency loan fee in currency collected
22
- */
23
- getLoanFeeCollected(_currency: string, options?: {
24
- gasPrice: number;
25
- gasLimit: number;
26
- }): any;
25
+ Gets loan fee collected
26
+ @param _currency loan fee in currency collected
27
+ */
28
+ getLoanFeeCollected(_currency: string, options?: Options): any;
27
29
  /**
28
- Get revenue shareholders
29
- @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
30
- @param _currency currency revenue is collected
31
- */
32
- getRevenueShareholders(_type: string, _currency: string, options?: {
33
- gasPrice: number;
34
- gasLimit: number;
35
- }): any;
30
+ Get revenue shareholders
31
+ @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
32
+ @param _currency currency revenue is collected
33
+ */
34
+ getRevenueShareholders(_type: string, _currency: string, options?: Options): any;
36
35
  /**
37
- Add revenue shareholders
38
- @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
39
- @param _shareholder address of shareholder to add
40
- @param _currency currency revenue is collected
41
- */
42
- addRevenueShareholder(_type: string, _shareholder: string, _currency: string, options?: {
43
- gasPrice: number;
44
- gasLimit: number;
45
- }): any;
46
- getIssuingFeeCollected(_platform: string, _token: string, options?: {
47
- gasPrice: number;
48
- gasLimit: number;
49
- }): any;
50
- getTradingFeeCollected(_platform: string, _token: string, options?: {
51
- gasPrice: number;
52
- gasLimit: number;
53
- }): any;
36
+ Add revenue shareholders
37
+ @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
38
+ @param _shareholder address of shareholder to add
39
+ @param _currency currency revenue is collected
40
+ */
41
+ addRevenueShareholder(_type: string, _shareholder: string, _currency: string, options?: Options): any;
42
+ getIssuingFeeCollected(_platform: string, _token: string, options?: Options): any;
43
+ getTradingFeeCollected(_platform: string, _token: string, options?: Options): any;
54
44
  notifyRevenueShare(callback: any): object;
55
45
  }
@@ -22,9 +22,12 @@ class Distribution extends index_1.VerifiedContract {
22
22
  super(address, JSON.stringify(Distribution_json_1.abi), signer);
23
23
  this.contractAddress = address;
24
24
  }
25
+ async _getMeeQuote(paymentTokenAddress, functionName, args) {
26
+ return await this.getQuote(paymentTokenAddress, functionName, args);
27
+ }
25
28
  /**
26
- Shares fee income with revenue shareholders
27
- */
29
+ Shares fee income with revenue shareholders
30
+ */
28
31
  async shareFee() {
29
32
  return this.callContract(FUNCTIONS.SHAREFEE);
30
33
  }
@@ -32,37 +35,37 @@ class Distribution extends index_1.VerifiedContract {
32
35
  return this.callContract(FUNCTIONS.SHARECOLLECTION);
33
36
  }
34
37
  /**
35
- Gets payment fee collected
36
- @param _currency payment fee in currency collected
37
- */
38
+ Gets payment fee collected
39
+ @param _currency payment fee in currency collected
40
+ */
38
41
  async getPaymentFeeCollected(_currency, options) {
39
42
  await this.validateInput(index_1.DATATYPES.STRING, _currency);
40
43
  return this.callContract(FUNCTIONS.GETPAYMENTFEECOLLECTED, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), options);
41
44
  }
42
45
  /**
43
- Gets loan fee collected
44
- @param _currency loan fee in currency collected
45
- */
46
+ Gets loan fee collected
47
+ @param _currency loan fee in currency collected
48
+ */
46
49
  async getLoanFeeCollected(_currency, options) {
47
50
  await this.validateInput(index_1.DATATYPES.STRING, _currency);
48
51
  return this.callContract(FUNCTIONS.GETLOANFEECOLLECTED, this.sanitiseInput(index_1.DATATYPES.BYTE32, _currency), options);
49
52
  }
50
53
  /**
51
- Get revenue shareholders
52
- @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
53
- @param _currency currency revenue is collected
54
- */
54
+ Get revenue shareholders
55
+ @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
56
+ @param _currency currency revenue is collected
57
+ */
55
58
  async getRevenueShareholders(_type, _currency, options) {
56
59
  await this.validateInput(index_1.DATATYPES.STRING, _type);
57
60
  await this.validateInput(index_1.DATATYPES.ADDRESS, _currency);
58
61
  return this.callContract(FUNCTIONS.GETREVENUESHAREHOLDER, this.sanitiseInput(index_1.DATATYPES.BYTE32, _type), _currency, options);
59
62
  }
60
63
  /**
61
- Add revenue shareholders
62
- @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
63
- @param _shareholder address of shareholder to add
64
- @param _currency currency revenue is collected
65
- */
64
+ Add revenue shareholders
65
+ @param _type type of shareholder, ie, 'BUSINESS' or 'OPERATOR'
66
+ @param _shareholder address of shareholder to add
67
+ @param _currency currency revenue is collected
68
+ */
66
69
  async addRevenueShareholder(_type, _shareholder, _currency, options) {
67
70
  await this.validateInput(index_1.DATATYPES.STRING, _type);
68
71
  await this.validateInput(index_1.DATATYPES.STRING, _shareholder);
@@ -1,38 +1,25 @@
1
- import { VerifiedContract } from '../index';
1
+ import { VerifiedContract, Options } from "../index";
2
2
  import { VerifiedWallet } from "../../wallet";
3
3
  export default class ERC20 extends VerifiedContract {
4
4
  contractAddress: string;
5
5
  constructor(signer: VerifiedWallet, contractNetworkAddress: 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
  name(): any;
7
15
  symbol(): any;
8
16
  decimals(): any;
9
17
  totalSupply(): any;
10
- balanceOf(_account: string, options?: {
11
- gasPrice: number;
12
- gasLimit: number;
13
- }): any;
14
- transfer(_recipient: string, _amount: string, options?: {
15
- gasPrice: number;
16
- gasLimit: number;
17
- }): any;
18
- approve(_spender: string, _amount: string, options?: {
19
- gasPrice: number;
20
- gasLimit: number;
21
- }): any;
22
- allowance(_owner: string, _spender: string, options?: {
23
- gasPrice: number;
24
- gasLimit: number;
25
- }): any;
26
- increaseAllowance(_spender: string, _addedValue: string, options?: {
27
- gasPrice: number;
28
- gasLimit: number;
29
- }): any;
30
- decreaseAllowance(_spender: string, _subtractedValue: string, options?: {
31
- gasPrice: number;
32
- gasLimit: number;
33
- }): any;
34
- transferFrom(_senderAddress: string, _recieverAddress: string, _tokens: string, options?: {
35
- gasPrice: number;
36
- gasLimit: number;
37
- }): any;
18
+ balanceOf(_account: string, options?: Options): any;
19
+ transfer(_recipient: string, _amount: string, options?: Options): any;
20
+ approve(_spender: string, _amount: string, options?: Options): any;
21
+ allowance(_owner: string, _spender: string, options?: Options): any;
22
+ increaseAllowance(_spender: string, _addedValue: string, options?: Options): any;
23
+ decreaseAllowance(_spender: string, _subtractedValue: string, options?: Options): any;
24
+ transferFrom(_senderAddress: string, _recieverAddress: string, _tokens: string, options?: Options): any;
38
25
  }
@@ -24,6 +24,9 @@ class ERC20 extends index_1.VerifiedContract {
24
24
  super(address, JSON.stringify(ERC20_json_1.abi), signer);
25
25
  this.contractAddress = address;
26
26
  }
27
+ async _getMeeQuote(paymentTokenAddress, functionName, args) {
28
+ return await this.getQuote(paymentTokenAddress, functionName, args);
29
+ }
27
30
  async name() {
28
31
  return this.callContract(FUNCTIONS.NAME);
29
32
  }
@@ -1,8 +1,16 @@
1
- import { VerifiedContract } from '../index';
1
+ import { VerifiedContract, Options } from "../index";
2
2
  import { VerifiedWallet } from "../../wallet";
3
3
  export default class Factory extends VerifiedContract {
4
4
  contractAddress: string;
5
5
  constructor(signer: VerifiedWallet, contractNetworkAddress: 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
  * Get number of tokens [callable by client]
8
16
  * @param
@@ -11,71 +19,29 @@ export default class Factory extends VerifiedContract {
11
19
  getTokenCount(): any;
12
20
  getOracles(): any;
13
21
  /**
14
- * Get address of token by index [callable by client].
15
- * @param (uint256 n)
16
- * @returns boolean
17
- */
18
- getToken(_n: string, options?: {
19
- gasPrice: number;
20
- gasLimit: number;
21
- }): any;
22
+ * Get address of token by index [callable by client].
23
+ * @param (uint256 n)
24
+ * @returns boolean
25
+ */
26
+ getToken(_n: string, options?: Options): any;
22
27
  /**
23
- * Get name and type of token by its address callable by client
24
- * @param (address _viaAddress)
25
- * @returns boolean
26
- * returns name and type of token by its address passed as parameter.
27
- */
28
- getNameAndType(_viaAddress: string, options?: {
29
- gasPrice: number;
30
- gasLimit: number;
31
- }): any;
28
+ * Get name and type of token by its address callable by client
29
+ * @param (address _viaAddress)
30
+ * @returns boolean
31
+ * returns name and type of token by its address passed as parameter.
32
+ */
33
+ getNameAndType(_viaAddress: string, options?: Options): any;
32
34
  notifyTokenCreated(callback: any): object;
33
- getTokenByNameType(tokenName: string, tokenType: string, options?: {
34
- gasPrice: number;
35
- gasLimit: number;
36
- }): any;
37
- getIssuer(tokenName: string, tokenType: string, options?: {
38
- gasPrice: number;
39
- gasLimit: number;
40
- }): any;
41
- getAddressAndType(tokenName: string, options?: {
42
- gasPrice: number;
43
- gasLimit: number;
44
- }): any;
45
- setViaOracleUrl(_url: string, options?: {
46
- gasPrice: number;
47
- gasLimit: number;
48
- }): any;
49
- setFiatPayoutUrl(_url: string, options?: {
50
- gasPrice: number;
51
- gasLimit: number;
52
- }): any;
53
- getViaOracleUrl(options?: {
54
- gasPrice: number;
55
- gasLimit: number;
56
- }): any;
57
- getFiatPayoutUrl(options?: {
58
- gasPrice: number;
59
- gasLimit: number;
60
- }): any;
61
- setCryptoDataURL(_url: string, _fromCurrency: string, _toCurrency: string, options?: {
62
- gasPrice: number;
63
- gasLimit: number;
64
- }): any;
65
- setOracles(_oracles: string, options?: {
66
- gasPrice: number;
67
- gasLimit: number;
68
- }): any;
69
- supportTokens(_currency: string, _address: string, options?: {
70
- gasPrice: number;
71
- gasLimit: number;
72
- }): any;
73
- setBondTerm(bondToken: string, term: string, options?: {
74
- gasPrice: number;
75
- gasLimit: number;
76
- }): any;
77
- getBondTerm(bondToken: string, options?: {
78
- gasPrice: number;
79
- gasLimit: number;
80
- }): any;
35
+ getTokenByNameType(tokenName: string, tokenType: string, options?: Options): any;
36
+ getIssuer(tokenName: string, tokenType: string, options?: Options): any;
37
+ getAddressAndType(tokenName: string, options?: Options): any;
38
+ setViaOracleUrl(_url: string, options?: Options): any;
39
+ setFiatPayoutUrl(_url: string, options?: Options): any;
40
+ getViaOracleUrl(options?: Options): any;
41
+ getFiatPayoutUrl(options?: Options): any;
42
+ setCryptoDataURL(_url: string, _fromCurrency: string, _toCurrency: string, options?: Options): any;
43
+ setOracles(_oracles: string, options?: Options): any;
44
+ supportTokens(_currency: string, _address: string, options?: Options): any;
45
+ setBondTerm(bondToken: string, term: string, options?: Options): any;
46
+ getBondTerm(bondToken: string, options?: Options): any;
81
47
  }
@@ -30,6 +30,9 @@ class Factory extends index_1.VerifiedContract {
30
30
  super(address, JSON.stringify(Factory_json_1.abi), signer);
31
31
  this.contractAddress = address;
32
32
  }
33
+ async _getMeeQuote(paymentTokenAddress, functionName, args) {
34
+ return await this.getQuote(paymentTokenAddress, functionName, args);
35
+ }
33
36
  /**
34
37
  * Get number of tokens [callable by client]
35
38
  * @param
@@ -42,27 +45,27 @@ class Factory extends index_1.VerifiedContract {
42
45
  return this.callContract(FUNCTIONS.GETORACLES);
43
46
  }
44
47
  /**
45
- * Get address of token by index [callable by client].
46
- * @param (uint256 n)
47
- * @returns boolean
48
- */
48
+ * Get address of token by index [callable by client].
49
+ * @param (uint256 n)
50
+ * @returns boolean
51
+ */
49
52
  async getToken(_n, options) {
50
53
  await this.validateInput(index_1.DATATYPES.NUMBER, _n);
51
54
  return this.callContract(FUNCTIONS.GETTOKEN, _n, options);
52
55
  }
53
56
  /**
54
- * Get name and type of token by its address callable by client
55
- * @param (address _viaAddress)
56
- * @returns boolean
57
- * returns name and type of token by its address passed as parameter.
58
- */
57
+ * Get name and type of token by its address callable by client
58
+ * @param (address _viaAddress)
59
+ * @returns boolean
60
+ * returns name and type of token by its address passed as parameter.
61
+ */
59
62
  async getNameAndType(_viaAddress, options) {
60
63
  await this.validateInput(index_1.DATATYPES.ADDRESS, _viaAddress);
61
64
  return this.callContract(FUNCTIONS.GETNAMEANDTYPE, _viaAddress, options);
62
65
  }
63
66
  /*
64
- Watches and notifies event (TokenCreated) that is emitted when the factory creates a bond token.
65
- */
67
+ Watches and notifies event (TokenCreated) that is emitted when the factory creates a bond token.
68
+ */
66
69
  notifyTokenCreated(callback) {
67
70
  this.getEvent(FUNCTIONS.TOKENCREATED, callback);
68
71
  }
@@ -20,6 +20,11 @@ export declare enum DATATYPES {
20
20
  BYTE16 = "byte16",
21
21
  BIGNUMBER = "bignumber"
22
22
  }
23
+ export type Options = {
24
+ gasPrice?: number;
25
+ gasLimit?: number;
26
+ paymentToken?: string;
27
+ };
23
28
  export declare class VerifiedContract {
24
29
  private signer;
25
30
  private contract;
@@ -51,7 +56,17 @@ export declare class VerifiedContract {
51
56
  callFunctionWithEthers(functionName: string, ...args: any): Promise<SCResponse>;
52
57
  /** Constructs and call function as userop for biconomy gassless(sponsored/erc20 mode) */
53
58
  callFunctionAsUserOp(smartAccount: any, tx: any, functionName: string, paymentToken: string, ...args: any): Promise<SCResponse>;
59
+ /** Constructs and call function using MEE client that allows gas payment in ERC20 tokens */
60
+ callFunctionWithMEEClient(nexusAccount: any, chainId: number, tx: any, paymentToken: `0x${string}`): Promise<SCResponse>;
54
61
  callContract(functionName: string, ...args: any): Promise<SCResponse>;
62
+ getQuote(paymentTokenAddress: string, functionName: string, args: any[]): Promise<{
63
+ tokenAddress: string;
64
+ amount: string;
65
+ amountInWei: string;
66
+ amouuntValue: string;
67
+ chainId: number;
68
+ functionName: string;
69
+ }>;
55
70
  protected getEvent(eventName: string, callback: any): void;
56
71
  }
57
72
  export {};