@huma-finance/sdk 0.0.31 → 0.0.32
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/API.md +1041 -977
- package/LICENSE +660 -660
- package/README.md +34 -34
- package/dist/cjs/graphql/generatedTypes.d.ts +40 -40
- package/dist/cjs/graphql/generatedTypes.js +8 -8
- package/dist/cjs/graphql/index.d.ts +1 -1
- package/dist/cjs/graphql/index.js +4 -4
- package/dist/cjs/helpers/BaseCreditPoolReceivableContractHelper.d.ts +10 -0
- package/dist/cjs/helpers/BaseCreditPoolReceivableContractHelper.js +22 -0
- package/dist/cjs/helpers/BaseCreditPoolReceivableContractHelper.js.map +1 -0
- package/dist/cjs/helpers/ERC20TransferableReceivableContractHelper.d.ts +10 -10
- package/dist/cjs/helpers/ERC20TransferableReceivableContractHelper.js +21 -21
- package/dist/cjs/helpers/PoolContractHelper.d.ts +119 -119
- package/dist/cjs/helpers/PoolContractHelper.js +142 -142
- package/dist/cjs/helpers/RealWorldReceivableContractHelper.d.ts +10 -10
- package/dist/cjs/helpers/RealWorldReceivableContractHelper.js +21 -21
- package/dist/cjs/helpers/index.d.ts +3 -3
- package/dist/cjs/helpers/index.js +6 -6
- package/dist/cjs/hooks/index.d.ts +4 -4
- package/dist/cjs/hooks/index.js +7 -7
- package/dist/cjs/hooks/useBaseCreditPoolReceivableContract.d.ts +10 -0
- package/dist/cjs/hooks/useBaseCreditPoolReceivableContract.js +20 -0
- package/dist/cjs/hooks/useBaseCreditPoolReceivableContract.js.map +1 -0
- package/dist/cjs/hooks/useContract.d.ts +13 -13
- package/dist/cjs/hooks/useContract.js +30 -30
- package/dist/cjs/hooks/useERC20TransferableReceivableContract.d.ts +12 -12
- package/dist/cjs/hooks/useERC20TransferableReceivableContract.js +20 -20
- package/dist/cjs/hooks/usePoolContract.d.ts +60 -60
- package/dist/cjs/hooks/usePoolContract.js +53 -53
- package/dist/cjs/hooks/useRealWorldReceivableContract.d.ts +10 -10
- package/dist/cjs/hooks/useRealWorldReceivableContract.js +19 -19
- package/dist/cjs/hooks/useReceivableFactoringPoolContract.d.ts +10 -0
- package/dist/cjs/hooks/useReceivableFactoringPoolContract.js +17 -0
- package/dist/cjs/hooks/useReceivableFactoringPoolContract.js.map +1 -0
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/services/ARWeaveService.d.ts +106 -106
- package/dist/cjs/services/ARWeaveService.js +190 -190
- package/dist/cjs/services/ARWeaveService.js.map +1 -1
- package/dist/cjs/services/EAService.d.ts +20 -20
- package/dist/cjs/services/EAService.js +33 -33
- package/dist/cjs/services/ReceivableService.d.ts +105 -105
- package/dist/cjs/services/ReceivableService.js +310 -253
- package/dist/cjs/services/ReceivableService.js.map +1 -1
- package/dist/cjs/services/SubgraphService.d.ts +53 -53
- package/dist/cjs/services/SubgraphService.js +93 -93
- package/dist/cjs/services/index.d.ts +4 -4
- package/dist/cjs/services/index.js +7 -7
- package/dist/cjs/utils/chain.d.ts +15 -15
- package/dist/cjs/utils/chain.js +37 -37
- package/dist/cjs/utils/index.d.ts +4 -4
- package/dist/cjs/utils/index.js +7 -7
- package/dist/cjs/utils/maticGasStation.d.ts +3 -3
- package/dist/cjs/utils/maticGasStation.js +38 -38
- package/dist/cjs/utils/poolInfo.d.ts +8 -8
- package/dist/cjs/utils/poolInfo.js +12 -12
- package/dist/cjs/utils/web3.d.ts +5 -5
- package/dist/cjs/utils/web3.js +33 -33
- package/dist/graphql/generatedTypes.d.ts +40 -40
- package/dist/graphql/generatedTypes.js +4 -4
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.js +1 -1
- package/dist/helpers/BaseCreditPoolReceivableContractHelper.d.ts +10 -0
- package/dist/helpers/BaseCreditPoolReceivableContractHelper.js +18 -0
- package/dist/helpers/BaseCreditPoolReceivableContractHelper.js.map +1 -0
- package/dist/helpers/ERC20TransferableReceivableContractHelper.d.ts +10 -10
- package/dist/helpers/ERC20TransferableReceivableContractHelper.js +17 -17
- package/dist/helpers/PoolContractHelper.d.ts +119 -119
- package/dist/helpers/PoolContractHelper.js +133 -133
- package/dist/helpers/RealWorldReceivableContractHelper.d.ts +10 -10
- package/dist/helpers/RealWorldReceivableContractHelper.js +17 -17
- package/dist/helpers/index.d.ts +3 -3
- package/dist/helpers/index.js +3 -3
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/useBaseCreditPoolReceivableContract.d.ts +10 -0
- package/dist/hooks/useBaseCreditPoolReceivableContract.js +16 -0
- package/dist/hooks/useBaseCreditPoolReceivableContract.js.map +1 -0
- package/dist/hooks/useContract.d.ts +13 -13
- package/dist/hooks/useContract.js +26 -26
- package/dist/hooks/useERC20TransferableReceivableContract.d.ts +12 -12
- package/dist/hooks/useERC20TransferableReceivableContract.js +16 -16
- package/dist/hooks/usePool.d.ts +0 -0
- package/dist/hooks/usePool.js +2 -0
- package/dist/hooks/usePool.js.map +1 -0
- package/dist/hooks/usePoolContract.d.ts +60 -60
- package/dist/hooks/usePoolContract.js +48 -48
- package/dist/hooks/useRealWorldReceivableContract.d.ts +10 -10
- package/dist/hooks/useRealWorldReceivableContract.js +15 -15
- package/dist/hooks/useReceivableFactoringPoolContract.d.ts +10 -0
- package/dist/hooks/useReceivableFactoringPoolContract.js +13 -0
- package/dist/hooks/useReceivableFactoringPoolContract.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/services/ARWeaveService.d.ts +106 -106
- package/dist/services/ARWeaveService.js +185 -185
- package/dist/services/ARWeaveService.js.map +1 -1
- package/dist/services/EAService.d.ts +20 -20
- package/dist/services/EAService.js +30 -30
- package/dist/services/ReceivableService.d.ts +105 -105
- package/dist/services/ReceivableService.js +306 -249
- package/dist/services/ReceivableService.js.map +1 -1
- package/dist/services/SubgraphService.d.ts +53 -53
- package/dist/services/SubgraphService.js +90 -90
- package/dist/services/index.d.ts +4 -4
- package/dist/services/index.js +4 -4
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/utils/chain.d.ts +15 -15
- package/dist/utils/chain.js +31 -31
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.js +4 -4
- package/dist/utils/maticGasStation.d.ts +3 -3
- package/dist/utils/maticGasStation.js +33 -33
- package/dist/utils/poolInfo.d.ts +8 -8
- package/dist/utils/poolInfo.js +8 -8
- package/dist/utils/web3.d.ts +5 -5
- package/dist/utils/web3.js +27 -27
- package/getting-started.md +190 -190
- package/package.json +3 -3
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { TransactionResponse, Web3Provider } from '@ethersproject/providers';
|
|
2
|
-
import { BigNumberish, ethers, Overrides } from 'ethers';
|
|
3
|
-
import { POOL_NAME, POOL_TYPE, RealWorldReceivableInfo } from '@huma-finance/shared';
|
|
4
|
-
/**
|
|
5
|
-
* Declares a payment on a RealWorldReceivable given a reference
|
|
6
|
-
*
|
|
7
|
-
* @async
|
|
8
|
-
* @function
|
|
9
|
-
* @memberof ReceivableService
|
|
10
|
-
* @param {ethers.Signer} signer - The signer used to send the transaction. Note only the receivable owner can pay the receivable.
|
|
11
|
-
* @param {string} referenceId - An internal identifier value added as a tag on ARWeave
|
|
12
|
-
* @param {number} paymentAmount - The amount to declare paid to the receivable.
|
|
13
|
-
* @param {Overrides} [gasOpts] - The gas options to use for the transaction.
|
|
14
|
-
* @returns {Promise<TransactionResponse>} - A Promise of the transaction receipt.
|
|
15
|
-
*/
|
|
16
|
-
declare function declareReceivablePaymentByReferenceId(signer: ethers.Signer, referenceId: string, paymentAmount: number, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Declares a payment on a RealWorldReceivable given a
|
|
19
|
-
*
|
|
20
|
-
* @async
|
|
21
|
-
* @function
|
|
22
|
-
* @memberof ReceivableService
|
|
23
|
-
* @param {ethers.Signer} signer - The signer used to send the transaction. Note only the receivable owner can pay the receivable.
|
|
24
|
-
* @param {BigNumberish} receivableTokenId - The
|
|
25
|
-
* @param {number} paymentAmount - The amount to pay the receivable.
|
|
26
|
-
* @param {Overrides} [gasOpts] - The gas options to use for the transaction.
|
|
27
|
-
* @returns {Promise<TransactionResponse>} - A Promise of the transaction receipt.
|
|
28
|
-
* @throws {Error} - Throws an error if the RealWorldReceivable contract is not available on the network.
|
|
29
|
-
*/
|
|
30
|
-
declare function declareReceivablePaymentByTokenId(signer: ethers.Signer, receivableTokenId: BigNumberish, paymentAmount: number, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
31
|
-
/**
|
|
32
|
-
* Creates a new RealWorldReceivable token on the given chain of the signer
|
|
33
|
-
*
|
|
34
|
-
* @async
|
|
35
|
-
* @function
|
|
36
|
-
* @memberof ReceivableService
|
|
37
|
-
* @param {ethers.Signer} signer - The signer used to send the transaction.
|
|
38
|
-
* @param {POOL_NAME} poolName - The name of the credit pool to mint the receivable token from. Used to lookup the pool address.
|
|
39
|
-
* @param {POOL_TYPE} poolType - The type of the credit pool to mint the receivable token from. Used to lookup the pool address.
|
|
40
|
-
* @param {number} currencyCode - The ISO 4217 currency code that the receivable is denominated in
|
|
41
|
-
* @param {number} receivableAmount - The amount of the receivable token to mint.
|
|
42
|
-
* @param {number} maturityDate - The maturity date of the receivable token, in UNIX timestamp format.
|
|
43
|
-
* @param {string} uri - The URI of the receivable token metadata.
|
|
44
|
-
* @param {Overrides} [gasOpts] - The gas options to use for the transaction.
|
|
45
|
-
* @returns {Promise<TransactionResponse>} - A Promise of the transaction response.
|
|
46
|
-
* @throws {Error} - Throws an error if the RealWorldReceivable contract is not available on the network.
|
|
47
|
-
*/
|
|
48
|
-
declare function createReceivable(signer: ethers.Signer, poolName: POOL_NAME, poolType: POOL_TYPE, currencyCode: number, receivableAmount: number, maturityDate: number, uri: string, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
49
|
-
/**
|
|
50
|
-
* Creates a RealWorldReceivable token with metadata uploaded onto ARWeave
|
|
51
|
-
*
|
|
52
|
-
* @async
|
|
53
|
-
* @function
|
|
54
|
-
* @memberof ReceivableService
|
|
55
|
-
* @param {Web3Provider | ethers.Signer} signerOrProvider - If calling this function from a browser, this function expects a Web3Provider.
|
|
56
|
-
* If calling this function from a server, this function expects an ethers Signer. Note that privateKey only needs to be included
|
|
57
|
-
* from server calls.
|
|
58
|
-
* @param {string | null} privateKey - Private key of the wallet used to upload metadata to ARWeave. Only required if calling this function from a server.
|
|
59
|
-
* @param {number} chainId - The chain
|
|
60
|
-
* @param {string} recipient - The receivable token recipient.
|
|
61
|
-
* @param {POOL_NAME} poolName - The pool name. Used to lookup the pool address to pay to.
|
|
62
|
-
* @param {POOL_TYPE} poolType - The pool type. Used to lookup the pool address to pay to.
|
|
63
|
-
* @param {number} currencyCode - The ISO 4217 currency code that the receivable is denominated in
|
|
64
|
-
* @param {number} receivableAmount - The receivable amount.
|
|
65
|
-
* @param {number} maturityDate - The maturity date of the receivable, in UNIX timestamp format.
|
|
66
|
-
* @param {
|
|
67
|
-
* @param {number} referenceId - An internal identifier value added as a tag on ARWeave, for easily querying the metadata later.
|
|
68
|
-
* @param {Array<{ name: string, value: string }>} extraTags - Any extraTags you'd like to tag your metadata with. Note that metadata on
|
|
69
|
-
* ARWeave is indexed by these tags, so make sure to include any tags that you'd like to be able to query by.
|
|
70
|
-
* @param {boolean} [lazyFund=true] - Whether to lazy fund the ARWeave uploads. If true, the ARWeave uploads will be paid for by the
|
|
71
|
-
* metadata uploader immediately before uploading. If false, the ARWeave node must be pre-funded before calling this function.
|
|
72
|
-
* @param {Overrides} [gasOpts] - Optional gas overrides for the transaction.
|
|
73
|
-
* @returns {Promise<TransactionResponse>} - The transaction receipt.
|
|
74
|
-
*/
|
|
75
|
-
declare function createReceivableWithMetadata(signerOrProvider: Web3Provider | ethers.Signer, privateKey: string | null, chainId: number, poolName: POOL_NAME, poolType: POOL_TYPE, currencyCode: number, receivableAmount: number, maturityDate: number, metadata:
|
|
76
|
-
name: string;
|
|
77
|
-
value: string;
|
|
78
|
-
}[], lazyFund?: boolean, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
79
|
-
/**
|
|
80
|
-
* Creates a RealWorldReceivable token with metadata uploaded onto ARWeave
|
|
81
|
-
*
|
|
82
|
-
* @async
|
|
83
|
-
* @function
|
|
84
|
-
* @memberof ReceivableService
|
|
85
|
-
* @param {Web3Provider | ethers.Signer} signerOrProvider - If calling this function from a browser, this function expects a Web3Provider.
|
|
86
|
-
* If calling this function from a server, this function expects an ethers Signer. Note that privateKey only needs to be included
|
|
87
|
-
* from server calls.
|
|
88
|
-
* @param {string} owner - The receivable token owner to query from.
|
|
89
|
-
* @param {POOL_NAME} poolName - The pool name. Used to lookup the pool address to pay to.
|
|
90
|
-
* @param {POOL_TYPE} poolType - The pool type. Used to lookup the pool address to pay to.
|
|
91
|
-
* @returns {Promise<RealWorldReceivableInfo[]>} - An array of receivables owned by the owner for the pool.
|
|
92
|
-
*/
|
|
93
|
-
declare function loadReceivablesOfOwnerWithMetadata(signerOrProvider: Web3Provider | ethers.Signer, owner: string, poolName: POOL_NAME, poolType: POOL_TYPE): Promise<RealWorldReceivableInfo[]>;
|
|
94
|
-
/**
|
|
95
|
-
* An object that contains functions to interact with Huma's receivables.
|
|
96
|
-
* @namespace ReceivableService
|
|
97
|
-
*/
|
|
98
|
-
export declare const ReceivableService: {
|
|
99
|
-
createReceivableWithMetadata: typeof createReceivableWithMetadata;
|
|
100
|
-
createReceivable: typeof createReceivable;
|
|
101
|
-
declareReceivablePaymentByTokenId: typeof declareReceivablePaymentByTokenId;
|
|
102
|
-
declareReceivablePaymentByReferenceId: typeof declareReceivablePaymentByReferenceId;
|
|
103
|
-
loadReceivablesOfOwnerWithMetadata: typeof loadReceivablesOfOwnerWithMetadata;
|
|
104
|
-
};
|
|
105
|
-
export {};
|
|
1
|
+
import { TransactionResponse, Web3Provider } from '@ethersproject/providers';
|
|
2
|
+
import { BigNumberish, ethers, Overrides } from 'ethers';
|
|
3
|
+
import { POOL_NAME, POOL_TYPE, RealWorldReceivableInfo } from '@huma-finance/shared';
|
|
4
|
+
/**
|
|
5
|
+
* Declares a payment on a RealWorldReceivable given a reference Id of the receivable, which was used as an index for ARWeave data.
|
|
6
|
+
*
|
|
7
|
+
* @async
|
|
8
|
+
* @function
|
|
9
|
+
* @memberof ReceivableService
|
|
10
|
+
* @param {ethers.Signer} signer - The signer used to send the transaction. Note only the receivable owner can pay the receivable.
|
|
11
|
+
* @param {string} referenceId - An internal identifier value added as a tag on ARWeave
|
|
12
|
+
* @param {number} paymentAmount - The amount to declare paid to the receivable.
|
|
13
|
+
* @param {Overrides} [gasOpts] - The gas options to use for the transaction.
|
|
14
|
+
* @returns {Promise<TransactionResponse>} - A Promise of the transaction receipt.
|
|
15
|
+
*/
|
|
16
|
+
declare function declareReceivablePaymentByReferenceId(signer: ethers.Signer, referenceId: string, paymentAmount: number, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Declares a payment on a RealWorldReceivable given a tokenId of the receivable.
|
|
19
|
+
*
|
|
20
|
+
* @async
|
|
21
|
+
* @function
|
|
22
|
+
* @memberof ReceivableService
|
|
23
|
+
* @param {ethers.Signer} signer - The signer used to send the transaction. Note only the receivable owner can pay the receivable.
|
|
24
|
+
* @param {BigNumberish} receivableTokenId - The Id of the receivable token to pay.
|
|
25
|
+
* @param {number} paymentAmount - The amount to pay the receivable.
|
|
26
|
+
* @param {Overrides} [gasOpts] - The gas options to use for the transaction.
|
|
27
|
+
* @returns {Promise<TransactionResponse>} - A Promise of the transaction receipt.
|
|
28
|
+
* @throws {Error} - Throws an error if the RealWorldReceivable contract is not available on the network.
|
|
29
|
+
*/
|
|
30
|
+
declare function declareReceivablePaymentByTokenId(signer: ethers.Signer, receivableTokenId: BigNumberish, paymentAmount: number, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new RealWorldReceivable token on the given chain of the signer
|
|
33
|
+
*
|
|
34
|
+
* @async
|
|
35
|
+
* @function
|
|
36
|
+
* @memberof ReceivableService
|
|
37
|
+
* @param {ethers.Signer} signer - The signer used to send the transaction.
|
|
38
|
+
* @param {POOL_NAME} poolName - The name of the credit pool to mint the receivable token from. Used to lookup the pool address.
|
|
39
|
+
* @param {POOL_TYPE} poolType - The type of the credit pool to mint the receivable token from. Used to lookup the pool address.
|
|
40
|
+
* @param {number} currencyCode - The ISO 4217 currency code that the receivable is denominated in
|
|
41
|
+
* @param {number} receivableAmount - The amount of the receivable token to mint.
|
|
42
|
+
* @param {number} maturityDate - The maturity date of the receivable token, in UNIX timestamp format.
|
|
43
|
+
* @param {string} uri - The URI of the receivable token metadata.
|
|
44
|
+
* @param {Overrides} [gasOpts] - The gas options to use for the transaction.
|
|
45
|
+
* @returns {Promise<TransactionResponse>} - A Promise of the transaction response.
|
|
46
|
+
* @throws {Error} - Throws an error if the RealWorldReceivable contract is not available on the network.
|
|
47
|
+
*/
|
|
48
|
+
declare function createReceivable(signer: ethers.Signer, poolName: POOL_NAME, poolType: POOL_TYPE, currencyCode: number, receivableAmount: number, maturityDate: number, uri: string, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a RealWorldReceivable token with metadata uploaded onto ARWeave
|
|
51
|
+
*
|
|
52
|
+
* @async
|
|
53
|
+
* @function
|
|
54
|
+
* @memberof ReceivableService
|
|
55
|
+
* @param {Web3Provider | ethers.Signer} signerOrProvider - If calling this function from a browser, this function expects a Web3Provider.
|
|
56
|
+
* If calling this function from a server, this function expects an ethers Signer. Note that privateKey only needs to be included
|
|
57
|
+
* from server calls.
|
|
58
|
+
* @param {string | null} privateKey - Private key of the wallet used to upload metadata to ARWeave. Only required if calling this function from a server.
|
|
59
|
+
* @param {number} chainId - The chain Id to mint the receivable token on and pay ARWeave funds from.
|
|
60
|
+
* @param {string} recipient - The receivable token recipient.
|
|
61
|
+
* @param {POOL_NAME} poolName - The pool name. Used to lookup the pool address to pay to.
|
|
62
|
+
* @param {POOL_TYPE} poolType - The pool type. Used to lookup the pool address to pay to.
|
|
63
|
+
* @param {number} currencyCode - The ISO 4217 currency code that the receivable is denominated in
|
|
64
|
+
* @param {number} receivableAmount - The receivable amount.
|
|
65
|
+
* @param {number} maturityDate - The maturity date of the receivable, in UNIX timestamp format.
|
|
66
|
+
* @param {Record<string, any>} metadata - The metadata in JSON format. This will be uploaded onto ARWeave
|
|
67
|
+
* @param {number} referenceId - An internal identifier value added as a tag on ARWeave, for easily querying the metadata later.
|
|
68
|
+
* @param {Array<{ name: string, value: string }>} extraTags - Any extraTags you'd like to tag your metadata with. Note that metadata on
|
|
69
|
+
* ARWeave is indexed by these tags, so make sure to include any tags that you'd like to be able to query by.
|
|
70
|
+
* @param {boolean} [lazyFund=true] - Whether to lazy fund the ARWeave uploads. If true, the ARWeave uploads will be paid for by the
|
|
71
|
+
* metadata uploader immediately before uploading. If false, the ARWeave node must be pre-funded before calling this function.
|
|
72
|
+
* @param {Overrides} [gasOpts] - Optional gas overrides for the transaction.
|
|
73
|
+
* @returns {Promise<TransactionResponse>} - The transaction receipt.
|
|
74
|
+
*/
|
|
75
|
+
declare function createReceivableWithMetadata(signerOrProvider: Web3Provider | ethers.Signer, privateKey: string | null, chainId: number, poolName: POOL_NAME, poolType: POOL_TYPE, currencyCode: number, receivableAmount: number, maturityDate: number, metadata: Record<string, unknown>, referenceId: string, extraTags: {
|
|
76
|
+
name: string;
|
|
77
|
+
value: string;
|
|
78
|
+
}[], lazyFund?: boolean, gasOpts?: Overrides): Promise<TransactionResponse>;
|
|
79
|
+
/**
|
|
80
|
+
* Creates a RealWorldReceivable token with metadata uploaded onto ARWeave
|
|
81
|
+
*
|
|
82
|
+
* @async
|
|
83
|
+
* @function
|
|
84
|
+
* @memberof ReceivableService
|
|
85
|
+
* @param {Web3Provider | ethers.Signer} signerOrProvider - If calling this function from a browser, this function expects a Web3Provider.
|
|
86
|
+
* If calling this function from a server, this function expects an ethers Signer. Note that privateKey only needs to be included
|
|
87
|
+
* from server calls.
|
|
88
|
+
* @param {string} owner - The receivable token owner to query from.
|
|
89
|
+
* @param {POOL_NAME} poolName - The pool name. Used to lookup the pool address to pay to.
|
|
90
|
+
* @param {POOL_TYPE} poolType - The pool type. Used to lookup the pool address to pay to.
|
|
91
|
+
* @returns {Promise<RealWorldReceivableInfo[]>} - An array of receivables owned by the owner for the pool.
|
|
92
|
+
*/
|
|
93
|
+
declare function loadReceivablesOfOwnerWithMetadata(signerOrProvider: Web3Provider | ethers.Signer, owner: string, poolName: POOL_NAME, poolType: POOL_TYPE): Promise<RealWorldReceivableInfo[]>;
|
|
94
|
+
/**
|
|
95
|
+
* An object that contains functions to interact with Huma's receivables.
|
|
96
|
+
* @namespace ReceivableService
|
|
97
|
+
*/
|
|
98
|
+
export declare const ReceivableService: {
|
|
99
|
+
createReceivableWithMetadata: typeof createReceivableWithMetadata;
|
|
100
|
+
createReceivable: typeof createReceivable;
|
|
101
|
+
declareReceivablePaymentByTokenId: typeof declareReceivablePaymentByTokenId;
|
|
102
|
+
declareReceivablePaymentByReferenceId: typeof declareReceivablePaymentByReferenceId;
|
|
103
|
+
loadReceivablesOfOwnerWithMetadata: typeof loadReceivablesOfOwnerWithMetadata;
|
|
104
|
+
};
|
|
105
|
+
export {};
|