@huma-finance/sdk 0.0.59-beta.511 → 0.0.59-beta.517

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 (39) hide show
  1. package/API.md +0 -112
  2. package/dist/cjs/index.d.ts +0 -1
  3. package/dist/cjs/index.js +0 -1
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/index.d.ts +0 -1
  6. package/dist/index.js +0 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  9. package/package.json +4 -6
  10. package/dist/cjs/hooks/index.d.ts +0 -4
  11. package/dist/cjs/hooks/index.js +0 -8
  12. package/dist/cjs/hooks/index.js.map +0 -1
  13. package/dist/cjs/hooks/useContract.d.ts +0 -13
  14. package/dist/cjs/hooks/useContract.js +0 -31
  15. package/dist/cjs/hooks/useContract.js.map +0 -1
  16. package/dist/cjs/hooks/useERC20TransferableReceivableContract.d.ts +0 -12
  17. package/dist/cjs/hooks/useERC20TransferableReceivableContract.js +0 -21
  18. package/dist/cjs/hooks/useERC20TransferableReceivableContract.js.map +0 -1
  19. package/dist/cjs/hooks/usePoolContract.d.ts +0 -60
  20. package/dist/cjs/hooks/usePoolContract.js +0 -54
  21. package/dist/cjs/hooks/usePoolContract.js.map +0 -1
  22. package/dist/cjs/hooks/useRealWorldReceivableContract.d.ts +0 -10
  23. package/dist/cjs/hooks/useRealWorldReceivableContract.js +0 -20
  24. package/dist/cjs/hooks/useRealWorldReceivableContract.js.map +0 -1
  25. package/dist/hooks/index.d.ts +0 -4
  26. package/dist/hooks/index.js +0 -5
  27. package/dist/hooks/index.js.map +0 -1
  28. package/dist/hooks/useContract.d.ts +0 -13
  29. package/dist/hooks/useContract.js +0 -27
  30. package/dist/hooks/useContract.js.map +0 -1
  31. package/dist/hooks/useERC20TransferableReceivableContract.d.ts +0 -12
  32. package/dist/hooks/useERC20TransferableReceivableContract.js +0 -17
  33. package/dist/hooks/useERC20TransferableReceivableContract.js.map +0 -1
  34. package/dist/hooks/usePoolContract.d.ts +0 -60
  35. package/dist/hooks/usePoolContract.js +0 -49
  36. package/dist/hooks/usePoolContract.js.map +0 -1
  37. package/dist/hooks/useRealWorldReceivableContract.d.ts +0 -10
  38. package/dist/hooks/useRealWorldReceivableContract.js +0 -16
  39. package/dist/hooks/useRealWorldReceivableContract.js.map +0 -1
package/API.md CHANGED
@@ -1,8 +1,6 @@
1
1
  ## Objects
2
2
 
3
3
  <dl>
4
- <dt><a href="#usePoolContract">usePoolContract</a> ⇒ <code>T</code></dt>
5
- <dd><p>A react hook that returns a contract instance of a specific pool using an ethers provider or signer</p></dd>
6
4
  <dt><a href="#ARWeaveService">ARWeaveService</a> : <code>object</code></dt>
7
5
  <dd><p>An object that contains functions to interact with Huma-related data stored on ARWeave</p></dd>
8
6
  <dt><a href="#EAService">EAService</a> : <code>object</code></dt>
@@ -65,14 +63,6 @@ associated with the given pool name on the current chain.</p></dd>
65
63
  associated with the given pool name on the current chain.</p></dd>
66
64
  <dt><a href="#getReceivableTokenIdFromReferenceId">getReceivableTokenIdFromReferenceId(referenceId, creator, poolName, signer)</a> ⇒</dt>
67
65
  <dd><p>Retrieves the receivable token ID associated with a given reference ID.</p></dd>
68
- <dt><a href="#useContract">useContract(address, ABI, signerOrProvider)</a> ⇒ <code>T</code> | <code>null</code></dt>
69
- <dd><p>Custom hook for creating an ethers instance of a smart contract.</p></dd>
70
- <dt><a href="#useERC20TransferableReceivableContract">useERC20TransferableReceivableContract(signerOrProvider, chainId, poolName)</a> ⇒ <code>Contract</code> | <code>null</code></dt>
71
- <dd><p>A react hook that returns an ethers contract instance for the ERC20TransferableReceivable contract
72
- associated with the given pool name on the current chain.</p></dd>
73
- <dt><a href="#useRealWorldReceivableContract">useRealWorldReceivableContract(signerOrProvider, chainId)</a> ⇒ <code>Contract</code> | <code>null</code></dt>
74
- <dd><p>A react hook that returns an ethers contract instance for the RealWorldReceivable contract
75
- associated with the given pool name on the current chain.</p></dd>
76
66
  <dt><a href="#preapprove">preapprove(payload, chainId)</a> ⇒ <code>Promise.&lt;Approval&gt;</code></dt>
77
67
  <dd><p>Checks whether or not a credit underwriting request to Huma's EAVerse would be approved.
78
68
  Note that this does not approve a creditline in Huma's pools and an approve call is still required.</p></dd>
@@ -97,65 +87,6 @@ Note that this does not approve a creditline in Huma's pools and an approve call
97
87
  <dd><p>Represents the pagination options for a query.</p></dd>
98
88
  </dl>
99
89
 
100
- <a name="usePoolContract"></a>
101
-
102
- ## usePoolContract ⇒ <code>T</code>
103
- <p>A react hook that returns a contract instance of a specific pool using an ethers provider or signer</p>
104
-
105
- **Kind**: global namespace
106
- **Returns**: <code>T</code> - <p>A contract instance of the specific pool.</p>
107
-
108
- | Param | Type | Description |
109
- | --- | --- | --- |
110
- | signerOrProvider | <code>ethers.providers.Provider</code> \| <code>ethers.Signer</code> | <p>An ethers signer or provider instance.</p> |
111
- | chainId | <code>number</code> | <p>The chain id where the contract instance exists</p> |
112
- | poolName | <code>POOL\_NAME</code> | <p>The name of the pool.</p> |
113
- | poolType | <code>POOL\_TYPE</code> | <p>The type of the pool.</p> |
114
-
115
-
116
- * [usePoolContract](#usePoolContract) ⇒ <code>T</code>
117
- * [.useCreditRecordDetails(userAddress, signerOrProvider, chainId, poolName, poolType)](#usePoolContract.useCreditRecordDetails) ⇒ <code>Array.&lt;(CreditRecordDetails\|undefined), function(): void&gt;</code>
118
- * [.CreditRecordDetails](#usePoolContract.CreditRecordDetails) : <code>Object</code>
119
-
120
- <a name="usePoolContract.useCreditRecordDetails"></a>
121
-
122
- ### usePoolContract.useCreditRecordDetails(userAddress, signerOrProvider, chainId, poolName, poolType) ⇒ <code>Array.&lt;(CreditRecordDetails\|undefined), function(): void&gt;</code>
123
- <p>A react hook that returns the credit record details for a user in a given pool, as well as a function to refresh the data.</p>
124
-
125
- **Kind**: static method of [<code>usePoolContract</code>](#usePoolContract)
126
- **Returns**: <code>Array.&lt;(CreditRecordDetails\|undefined), function(): void&gt;</code> - <p>An array containing the credit record details and a function to refresh the data.</p>
127
-
128
- | Param | Type | Description |
129
- | --- | --- | --- |
130
- | userAddress | <code>string</code> | <p>The address of the user to get the credit record details for.</p> |
131
- | signerOrProvider | <code>ethers.providers.Provider</code> \| <code>ethers.Signer</code> | <p>The signer or provider object to use for the contract.</p> |
132
- | chainId | <code>number</code> | <p>The chain id where the contract instance exists</p> |
133
- | poolName | <code>POOL\_NAME</code> | <p>The name of the pool to get the credit record details for.</p> |
134
- | poolType | <code>POOL\_TYPE</code> | <p>The type of the pool.</p> |
135
-
136
- <a name="usePoolContract.CreditRecordDetails"></a>
137
-
138
- ### usePoolContract.CreditRecordDetails : <code>Object</code>
139
- <p>CreditRecordDetails type object representing the details of a credit line.</p>
140
-
141
- **Kind**: static typedef of [<code>usePoolContract</code>](#usePoolContract)
142
- **Properties**
143
-
144
- | Name | Type | Description |
145
- | --- | --- | --- |
146
- | aprInBps | <code>number</code> | <p>The APR (annual percentage rate) in basis points.</p> |
147
- | correction | <code>BigNumber</code> | <p>adjustment of interest over or under-counted because of drawdown or principal payment in the middle of a billing period</p> |
148
- | creditLimit | <code>BigNumber</code> | <p>The credit limit in the pools base currency.</p> |
149
- | defaultAmount | <code>BigNumber</code> | <p>The amount of the default, if any.</p> |
150
- | dueDate | <code>BigNumber</code> | <p>The due date of the next payment.</p> |
151
- | feesAndInterestDue | <code>BigNumber</code> | <p>The fees and interest due.</p> |
152
- | intervalInDays | <code>number</code> | <p>The interval in days between payment periods.</p> |
153
- | missedPeriods | <code>number</code> | <p>The number of missed periods.</p> |
154
- | remainingPeriods | <code>number</code> | <p>The number of remaining periods before this credit line is considered paid off.</p> |
155
- | state | <code>number</code> | <p>The state of the factorization. Please see the CreditState in huma-contracts for more details.</p> |
156
- | totalDue | <code>BigNumber</code> | <p>The total due amount of this credit line.</p> |
157
- | unbilledPrincipal | <code>BigNumber</code> | <p>The unbilled principal of the next payment.</p> |
158
-
159
90
  <a name="ARWeaveService"></a>
160
91
 
161
92
  ## ARWeaveService : <code>object</code>
@@ -912,49 +843,6 @@ associated with the given pool name on the current chain.</p>
912
843
  | poolName | <p>The name of the pool.</p> |
913
844
  | signer | <p>The signer used for the contract interaction.</p> |
914
845
 
915
- <a name="useContract"></a>
916
-
917
- ## useContract(address, ABI, signerOrProvider) ⇒ <code>T</code> \| <code>null</code>
918
- <p>Custom hook for creating an ethers instance of a smart contract.</p>
919
-
920
- **Kind**: global function
921
- **Returns**: <code>T</code> \| <code>null</code> - <p>An instance of the smart contract, or null if an error occurs.</p>
922
-
923
- | Param | Type | Description |
924
- | --- | --- | --- |
925
- | address | <code>string</code> \| <code>null</code> \| <code>undefined</code> | <p>The address of the smart contract instance.</p> |
926
- | ABI | <code>any</code> | <p>The ABI of the smart contract.</p> |
927
- | signerOrProvider | <code>ethers.providers.Provider</code> \| <code>ethers.Signer</code> | <p>The signer or provider used to sign transactions or retrieve blockchain data. Note that this signerOrProvider must be connected to the same network as the smart contract in question.</p> |
928
-
929
- <a name="useERC20TransferableReceivableContract"></a>
930
-
931
- ## useERC20TransferableReceivableContract(signerOrProvider, chainId, poolName) ⇒ <code>Contract</code> \| <code>null</code>
932
- <p>A react hook that returns an ethers contract instance for the ERC20TransferableReceivable contract
933
- associated with the given pool name on the current chain.</p>
934
-
935
- **Kind**: global function
936
- **Returns**: <code>Contract</code> \| <code>null</code> - <p>A contract instance for the ERC20TransferableReceivable contract or null if it could not be found.</p>
937
-
938
- | Param | Type | Description |
939
- | --- | --- | --- |
940
- | signerOrProvider | <code>ethers.providers.Provider</code> \| <code>ethers.Signer</code> | <p>The provider or signer instance to use for the contract.</p> |
941
- | chainId | <code>number</code> | <p>The chain id where the contract instance exists</p> |
942
- | poolName | <code>POOL\_NAME</code> | <p>The name of the pool to get the contract for.</p> |
943
-
944
- <a name="useRealWorldReceivableContract"></a>
945
-
946
- ## useRealWorldReceivableContract(signerOrProvider, chainId) ⇒ <code>Contract</code> \| <code>null</code>
947
- <p>A react hook that returns an ethers contract instance for the RealWorldReceivable contract
948
- associated with the given pool name on the current chain.</p>
949
-
950
- **Kind**: global function
951
- **Returns**: <code>Contract</code> \| <code>null</code> - <p>A contract instance for the RealWorldReceivable contract or null if it could not be found.</p>
952
-
953
- | Param | Type | Description |
954
- | --- | --- | --- |
955
- | signerOrProvider | <code>ethers.providers.Provider</code> \| <code>ethers.Signer</code> | <p>The provider or signer instance to use for the contract.</p> |
956
- | chainId | <code>number</code> | <p>The chain id where the contract instance exists</p> |
957
-
958
846
  <a name="preapprove"></a>
959
847
 
960
848
  ## preapprove(payload, chainId) ⇒ <code>Promise.&lt;Approval&gt;</code>
@@ -1,4 +1,3 @@
1
1
  export * from './helpers';
2
- export * from './hooks';
3
2
  export * from './services';
4
3
  export * from './utils';
package/dist/cjs/index.js CHANGED
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./helpers"), exports);
5
- tslib_1.__exportStar(require("./hooks"), exports);
6
5
  tslib_1.__exportStar(require("./services"), exports);
7
6
  tslib_1.__exportStar(require("./utils"), exports);
8
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,kDAAuB;AACvB,qDAA0B;AAC1B,kDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,qDAA0B;AAC1B,kDAAuB"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './helpers';
2
- export * from './hooks';
3
2
  export * from './services';
4
3
  export * from './utils';
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './helpers';
2
- export * from './hooks';
3
2
  export * from './services';
4
3
  export * from './utils';
5
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}