@bosonprotocol/core-sdk 1.29.0-ludo.1 → 1.29.0
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/LICENSE +202 -0
- package/dist/cjs/accounts/handler.d.ts +63 -63
- package/dist/cjs/accounts/handler.js +129 -129
- package/dist/cjs/accounts/index.d.ts +8 -8
- package/dist/cjs/accounts/index.js +37 -37
- package/dist/cjs/accounts/interface.d.ts +38 -38
- package/dist/cjs/accounts/interface.js +130 -130
- package/dist/cjs/accounts/mixin.d.ts +222 -222
- package/dist/cjs/accounts/mixin.js +506 -506
- package/dist/cjs/accounts/subgraph.d.ts +17 -17
- package/dist/cjs/accounts/subgraph.d.ts.map +1 -1
- package/dist/cjs/accounts/subgraph.js +107 -107
- package/dist/cjs/accounts/types.d.ts +28 -28
- package/dist/cjs/accounts/types.d.ts.map +1 -1
- package/dist/cjs/accounts/types.js +8 -8
- package/dist/cjs/core-sdk.d.ts +55 -55
- package/dist/cjs/core-sdk.js +98 -98
- package/dist/cjs/disputes/handler.d.ts +71 -71
- package/dist/cjs/disputes/handler.js +127 -127
- package/dist/cjs/disputes/index.d.ts +3 -3
- package/dist/cjs/disputes/index.js +29 -29
- package/dist/cjs/disputes/interface.d.ts +28 -28
- package/dist/cjs/disputes/interface.js +72 -72
- package/dist/cjs/disputes/mixin.d.ts +117 -117
- package/dist/cjs/disputes/mixin.js +202 -202
- package/dist/cjs/disputes/subgraph.d.ts +5 -5
- package/dist/cjs/disputes/subgraph.d.ts.map +1 -1
- package/dist/cjs/disputes/subgraph.js +29 -29
- package/dist/cjs/erc1155/handler.d.ts +8 -8
- package/dist/cjs/erc1155/handler.js +27 -27
- package/dist/cjs/erc1155/index.d.ts +2 -2
- package/dist/cjs/erc1155/index.js +28 -28
- package/dist/cjs/erc1155/interface.d.ts +2 -2
- package/dist/cjs/erc1155/interface.js +6 -6
- package/dist/cjs/erc1155/mixin.d.ts +5 -5
- package/dist/cjs/erc1155/mixin.js +25 -25
- package/dist/cjs/erc20/handler.d.ts +38 -38
- package/dist/cjs/erc20/handler.js +88 -88
- package/dist/cjs/erc20/index.d.ts +3 -3
- package/dist/cjs/erc20/index.js +29 -29
- package/dist/cjs/erc20/interface.d.ts +2 -2
- package/dist/cjs/erc20/interface.js +6 -6
- package/dist/cjs/erc20/mixin.d.ts +11 -11
- package/dist/cjs/erc20/mixin.js +55 -55
- package/dist/cjs/erc20/subgraph.d.ts +4 -4
- package/dist/cjs/erc20/subgraph.d.ts.map +1 -1
- package/dist/cjs/erc20/subgraph.js +29 -29
- package/dist/cjs/erc721/handler.d.ts +18 -18
- package/dist/cjs/erc721/handler.js +50 -50
- package/dist/cjs/erc721/index.d.ts +2 -2
- package/dist/cjs/erc721/index.js +28 -28
- package/dist/cjs/erc721/interface.d.ts +2 -2
- package/dist/cjs/erc721/interface.js +6 -6
- package/dist/cjs/erc721/mixin.d.ts +7 -7
- package/dist/cjs/erc721/mixin.js +35 -35
- package/dist/cjs/event-logs/index.d.ts +1 -1
- package/dist/cjs/event-logs/index.js +27 -27
- package/dist/cjs/event-logs/mixin.d.ts +10 -10
- package/dist/cjs/event-logs/mixin.js +27 -27
- package/dist/cjs/event-logs/subgraph.d.ts +2 -2
- package/dist/cjs/event-logs/subgraph.js +21 -21
- package/dist/cjs/exchanges/getExchangeState.d.ts +8 -8
- package/dist/cjs/exchanges/getExchangeState.d.ts.map +1 -1
- package/dist/cjs/exchanges/getExchangeState.js +21 -21
- package/dist/cjs/exchanges/getExchangeState.js.map +1 -1
- package/dist/cjs/exchanges/handler.d.ts +30 -30
- package/dist/cjs/exchanges/handler.d.ts.map +1 -1
- package/dist/cjs/exchanges/handler.js +201 -201
- package/dist/cjs/exchanges/index.d.ts +4 -4
- package/dist/cjs/exchanges/index.js +33 -33
- package/dist/cjs/exchanges/interface.d.ts +10 -10
- package/dist/cjs/exchanges/interface.js +49 -49
- package/dist/cjs/exchanges/mixin.d.ts +76 -76
- package/dist/cjs/exchanges/mixin.js +171 -171
- package/dist/cjs/exchanges/subgraph.d.ts +5 -5
- package/dist/cjs/exchanges/subgraph.d.ts.map +1 -1
- package/dist/cjs/exchanges/subgraph.js +29 -29
- package/dist/cjs/forwarder/biconomy-interface.d.ts +71 -71
- package/dist/cjs/forwarder/biconomy-interface.d.ts.map +1 -1
- package/dist/cjs/forwarder/biconomy-interface.js +30 -30
- package/dist/cjs/forwarder/handler.d.ts +18 -18
- package/dist/cjs/forwarder/handler.js +76 -76
- package/dist/cjs/forwarder/index.d.ts +3 -3
- package/dist/cjs/forwarder/index.js +29 -29
- package/dist/cjs/forwarder/mock-interface.d.ts +40 -40
- package/dist/cjs/forwarder/mock-interface.d.ts.map +1 -1
- package/dist/cjs/forwarder/mock-interface.js +15 -15
- package/dist/cjs/funds/handler.d.ts +22 -22
- package/dist/cjs/funds/handler.js +64 -64
- package/dist/cjs/funds/index.d.ts +3 -3
- package/dist/cjs/funds/index.js +29 -29
- package/dist/cjs/funds/interface.d.ts +5 -5
- package/dist/cjs/funds/interface.js +22 -22
- package/dist/cjs/funds/mixin.d.ts +41 -41
- package/dist/cjs/funds/mixin.js +94 -94
- package/dist/cjs/funds/subgraph.d.ts +5 -5
- package/dist/cjs/funds/subgraph.d.ts.map +1 -1
- package/dist/cjs/funds/subgraph.js +29 -29
- package/dist/cjs/groups/handler.d.ts +6 -6
- package/dist/cjs/groups/handler.js +22 -22
- package/dist/cjs/groups/index.d.ts +3 -3
- package/dist/cjs/groups/index.js +29 -29
- package/dist/cjs/groups/interface.d.ts +5 -5
- package/dist/cjs/groups/interface.js +28 -28
- package/dist/cjs/groups/mixin.d.ts +13 -13
- package/dist/cjs/groups/mixin.js +32 -32
- package/dist/cjs/groups/subgraph.d.ts +1 -1
- package/dist/cjs/groups/subgraph.js +4 -4
- package/dist/cjs/index.d.ts +17 -17
- package/dist/cjs/index.js +51 -51
- package/dist/cjs/meta-tx/biconomy.d.ts +59 -59
- package/dist/cjs/meta-tx/biconomy.d.ts.map +1 -1
- package/dist/cjs/meta-tx/biconomy.js +107 -107
- package/dist/cjs/meta-tx/handler.d.ts +230 -230
- package/dist/cjs/meta-tx/handler.d.ts.map +1 -1
- package/dist/cjs/meta-tx/handler.js +665 -665
- package/dist/cjs/meta-tx/index.d.ts +2 -2
- package/dist/cjs/meta-tx/index.js +28 -28
- package/dist/cjs/meta-tx/interface.d.ts +2 -2
- package/dist/cjs/meta-tx/interface.js +6 -6
- package/dist/cjs/meta-tx/mixin.d.ts +219 -219
- package/dist/cjs/meta-tx/mixin.js +474 -474
- package/dist/cjs/metadata/index.d.ts +1 -1
- package/dist/cjs/metadata/index.js +27 -27
- package/dist/cjs/metadata/mixin.d.ts +41 -41
- package/dist/cjs/metadata/mixin.js +88 -88
- package/dist/cjs/metadata/subgraph.d.ts +20 -20
- package/dist/cjs/metadata/subgraph.d.ts.map +1 -1
- package/dist/cjs/metadata/subgraph.js +108 -108
- package/dist/cjs/mixins/base-core-sdk.d.ts +44 -44
- package/dist/cjs/mixins/base-core-sdk.js +52 -52
- package/dist/cjs/native-meta-tx/handler.d.ts +42 -42
- package/dist/cjs/native-meta-tx/handler.js +135 -135
- package/dist/cjs/native-meta-tx/index.d.ts +2 -2
- package/dist/cjs/native-meta-tx/index.js +28 -28
- package/dist/cjs/native-meta-tx/interface.d.ts +3 -3
- package/dist/cjs/native-meta-tx/interface.js +29 -29
- package/dist/cjs/native-meta-tx/mixin.d.ts +34 -34
- package/dist/cjs/native-meta-tx/mixin.js +67 -67
- package/dist/cjs/native-meta-tx/tokenSpecifics.d.ts +6 -6
- package/dist/cjs/native-meta-tx/tokenSpecifics.d.ts.map +1 -1
- package/dist/cjs/native-meta-tx/tokenSpecifics.js +20 -20
- package/dist/cjs/offers/checkExchangePolicy.d.ts +48 -48
- package/dist/cjs/offers/checkExchangePolicy.d.ts.map +1 -1
- package/dist/cjs/offers/checkExchangePolicy.js +24 -24
- package/dist/cjs/offers/getOfferStatus.d.ts +8 -8
- package/dist/cjs/offers/getOfferStatus.js +25 -25
- package/dist/cjs/offers/getOfferStatus.js.map +1 -1
- package/dist/cjs/offers/handler.d.ts +51 -51
- package/dist/cjs/offers/handler.js +151 -151
- package/dist/cjs/offers/index.d.ts +12 -12
- package/dist/cjs/offers/index.js +41 -41
- package/dist/cjs/offers/interface.d.ts +18 -18
- package/dist/cjs/offers/interface.js +91 -91
- package/dist/cjs/offers/mixin.d.ts +170 -170
- package/dist/cjs/offers/mixin.js +408 -408
- package/dist/cjs/offers/renderContractualAgreement.d.ts +53 -53
- package/dist/cjs/offers/renderContractualAgreement.d.ts.map +1 -1
- package/dist/cjs/offers/renderContractualAgreement.js +232 -232
- package/dist/cjs/offers/storage.d.ts +12 -12
- package/dist/cjs/offers/storage.js +29 -29
- package/dist/cjs/offers/subgraph.d.ts +5 -5
- package/dist/cjs/offers/subgraph.d.ts.map +1 -1
- package/dist/cjs/offers/subgraph.js +29 -29
- package/dist/cjs/offers/types.d.ts +1 -1
- package/dist/cjs/offers/types.js +2 -2
- package/dist/cjs/orchestration/handler.d.ts +73 -73
- package/dist/cjs/orchestration/handler.js +146 -146
- package/dist/cjs/orchestration/index.d.ts +2 -2
- package/dist/cjs/orchestration/index.js +28 -28
- package/dist/cjs/orchestration/interface.d.ts +14 -14
- package/dist/cjs/orchestration/interface.js +114 -114
- package/dist/cjs/orchestration/mixin.d.ts +84 -84
- package/dist/cjs/orchestration/mixin.js +163 -163
- package/dist/cjs/seaport/abi.d.ts +40 -40
- package/dist/cjs/seaport/abi.js +152 -152
- package/dist/cjs/seaport/handler.d.ts +45 -45
- package/dist/cjs/seaport/handler.d.ts.map +1 -1
- package/dist/cjs/seaport/handler.js +27 -27
- package/dist/cjs/seaport/handler.js.map +1 -1
- package/dist/cjs/seaport/index.d.ts +1 -1
- package/dist/cjs/seaport/index.js +27 -27
- package/dist/cjs/subgraph.d.ts +33033 -33033
- package/dist/cjs/subgraph.d.ts.map +1 -1
- package/dist/cjs/subgraph.js +854 -854
- package/dist/cjs/subgraph.js.map +1 -1
- package/dist/cjs/utils/errors.d.ts +4 -4
- package/dist/cjs/utils/errors.js +10 -10
- package/dist/cjs/utils/graphql.d.ts +315 -315
- package/dist/cjs/utils/graphql.js +10 -10
- package/dist/cjs/utils/logs.d.ts +20 -20
- package/dist/cjs/utils/logs.js +53 -53
- package/dist/cjs/utils/signature.d.ts +23 -23
- package/dist/cjs/utils/signature.d.ts.map +1 -1
- package/dist/cjs/utils/signature.js +64 -64
- package/dist/cjs/utils/tokenInfoManager.d.ts +23 -23
- package/dist/cjs/utils/tokenInfoManager.js +139 -139
- package/dist/cjs/voucher/handler.d.ts +68 -68
- package/dist/cjs/voucher/handler.js +134 -134
- package/dist/cjs/voucher/index.d.ts +2 -2
- package/dist/cjs/voucher/index.js +28 -28
- package/dist/cjs/voucher/interface.d.ts +21 -21
- package/dist/cjs/voucher/interface.js +140 -140
- package/dist/cjs/voucher/mixin.d.ts +67 -67
- package/dist/cjs/voucher/mixin.js +166 -166
- package/dist/esm/accounts/handler.d.ts +63 -63
- package/dist/esm/accounts/handler.js +91 -91
- package/dist/esm/accounts/index.d.ts +8 -8
- package/dist/esm/accounts/index.js +8 -8
- package/dist/esm/accounts/interface.d.ts +38 -38
- package/dist/esm/accounts/interface.js +111 -111
- package/dist/esm/accounts/mixin.d.ts +222 -222
- package/dist/esm/accounts/mixin.js +416 -416
- package/dist/esm/accounts/subgraph.d.ts +17 -17
- package/dist/esm/accounts/subgraph.d.ts.map +1 -1
- package/dist/esm/accounts/subgraph.js +99 -99
- package/dist/esm/accounts/types.d.ts +28 -28
- package/dist/esm/accounts/types.d.ts.map +1 -1
- package/dist/esm/accounts/types.js +1 -1
- package/dist/esm/core-sdk.d.ts +55 -55
- package/dist/esm/core-sdk.js +97 -97
- package/dist/esm/disputes/handler.d.ts +71 -71
- package/dist/esm/disputes/handler.js +82 -82
- package/dist/esm/disputes/index.d.ts +3 -3
- package/dist/esm/disputes/index.js +3 -3
- package/dist/esm/disputes/interface.d.ts +28 -28
- package/dist/esm/disputes/interface.js +59 -59
- package/dist/esm/disputes/mixin.d.ts +117 -117
- package/dist/esm/disputes/mixin.js +172 -172
- package/dist/esm/disputes/subgraph.d.ts +5 -5
- package/dist/esm/disputes/subgraph.d.ts.map +1 -1
- package/dist/esm/disputes/subgraph.js +14 -14
- package/dist/esm/erc1155/handler.d.ts +8 -8
- package/dist/esm/erc1155/handler.js +12 -12
- package/dist/esm/erc1155/index.d.ts +2 -2
- package/dist/esm/erc1155/index.js +2 -2
- package/dist/esm/erc1155/interface.d.ts +2 -2
- package/dist/esm/erc1155/interface.js +3 -3
- package/dist/esm/erc1155/mixin.d.ts +5 -5
- package/dist/esm/erc1155/mixin.js +10 -10
- package/dist/esm/erc20/handler.d.ts +38 -38
- package/dist/esm/erc20/handler.js +55 -55
- package/dist/esm/erc20/index.d.ts +3 -3
- package/dist/esm/erc20/index.js +3 -3
- package/dist/esm/erc20/interface.d.ts +2 -2
- package/dist/esm/erc20/interface.js +3 -3
- package/dist/esm/erc20/mixin.d.ts +11 -11
- package/dist/esm/erc20/mixin.js +28 -28
- package/dist/esm/erc20/subgraph.d.ts +4 -4
- package/dist/esm/erc20/subgraph.d.ts.map +1 -1
- package/dist/esm/erc20/subgraph.js +14 -14
- package/dist/esm/erc721/handler.d.ts +18 -18
- package/dist/esm/erc721/handler.js +29 -29
- package/dist/esm/erc721/index.d.ts +2 -2
- package/dist/esm/erc721/index.js +2 -2
- package/dist/esm/erc721/interface.d.ts +2 -2
- package/dist/esm/erc721/interface.js +3 -3
- package/dist/esm/erc721/mixin.d.ts +7 -7
- package/dist/esm/erc721/mixin.js +16 -16
- package/dist/esm/event-logs/index.d.ts +1 -1
- package/dist/esm/event-logs/index.js +1 -1
- package/dist/esm/event-logs/mixin.d.ts +10 -10
- package/dist/esm/event-logs/mixin.js +12 -12
- package/dist/esm/event-logs/subgraph.d.ts +2 -2
- package/dist/esm/event-logs/subgraph.js +6 -6
- package/dist/esm/exchanges/getExchangeState.d.ts +8 -8
- package/dist/esm/exchanges/getExchangeState.d.ts.map +1 -1
- package/dist/esm/exchanges/getExchangeState.js +17 -17
- package/dist/esm/exchanges/handler.d.ts +30 -30
- package/dist/esm/exchanges/handler.d.ts.map +1 -1
- package/dist/esm/exchanges/handler.js +168 -168
- package/dist/esm/exchanges/index.d.ts +4 -4
- package/dist/esm/exchanges/index.js +4 -4
- package/dist/esm/exchanges/interface.d.ts +10 -10
- package/dist/esm/exchanges/interface.js +39 -39
- package/dist/esm/exchanges/mixin.d.ts +76 -76
- package/dist/esm/exchanges/mixin.js +140 -140
- package/dist/esm/exchanges/subgraph.d.ts +5 -5
- package/dist/esm/exchanges/subgraph.d.ts.map +1 -1
- package/dist/esm/exchanges/subgraph.js +14 -14
- package/dist/esm/forwarder/biconomy-interface.d.ts +71 -71
- package/dist/esm/forwarder/biconomy-interface.d.ts.map +1 -1
- package/dist/esm/forwarder/biconomy-interface.js +23 -23
- package/dist/esm/forwarder/handler.d.ts +18 -18
- package/dist/esm/forwarder/handler.js +35 -35
- package/dist/esm/forwarder/index.d.ts +3 -3
- package/dist/esm/forwarder/index.js +3 -3
- package/dist/esm/forwarder/mock-interface.d.ts +40 -40
- package/dist/esm/forwarder/mock-interface.d.ts.map +1 -1
- package/dist/esm/forwarder/mock-interface.js +10 -10
- package/dist/esm/funds/handler.d.ts +22 -22
- package/dist/esm/funds/handler.js +43 -43
- package/dist/esm/funds/index.d.ts +3 -3
- package/dist/esm/funds/index.js +3 -3
- package/dist/esm/funds/interface.d.ts +5 -5
- package/dist/esm/funds/interface.js +17 -17
- package/dist/esm/funds/mixin.d.ts +41 -41
- package/dist/esm/funds/mixin.js +71 -71
- package/dist/esm/funds/subgraph.d.ts +5 -5
- package/dist/esm/funds/subgraph.d.ts.map +1 -1
- package/dist/esm/funds/subgraph.js +14 -14
- package/dist/esm/groups/handler.d.ts +6 -6
- package/dist/esm/groups/handler.js +7 -7
- package/dist/esm/groups/index.d.ts +3 -3
- package/dist/esm/groups/index.js +3 -3
- package/dist/esm/groups/interface.d.ts +5 -5
- package/dist/esm/groups/interface.js +23 -23
- package/dist/esm/groups/mixin.d.ts +13 -13
- package/dist/esm/groups/mixin.js +17 -17
- package/dist/esm/groups/subgraph.d.ts +1 -1
- package/dist/esm/groups/subgraph.js +1 -1
- package/dist/esm/index.d.ts +17 -17
- package/dist/esm/index.js +17 -17
- package/dist/esm/meta-tx/biconomy.d.ts +59 -59
- package/dist/esm/meta-tx/biconomy.d.ts.map +1 -1
- package/dist/esm/meta-tx/biconomy.js +89 -89
- package/dist/esm/meta-tx/handler.d.ts +230 -230
- package/dist/esm/meta-tx/handler.d.ts.map +1 -1
- package/dist/esm/meta-tx/handler.js +733 -733
- package/dist/esm/meta-tx/index.d.ts +2 -2
- package/dist/esm/meta-tx/index.js +2 -2
- package/dist/esm/meta-tx/interface.d.ts +2 -2
- package/dist/esm/meta-tx/interface.js +3 -3
- package/dist/esm/meta-tx/mixin.d.ts +219 -219
- package/dist/esm/meta-tx/mixin.js +568 -568
- package/dist/esm/metadata/index.d.ts +1 -1
- package/dist/esm/metadata/index.js +1 -1
- package/dist/esm/metadata/mixin.d.ts +41 -41
- package/dist/esm/metadata/mixin.js +59 -59
- package/dist/esm/metadata/subgraph.d.ts +20 -20
- package/dist/esm/metadata/subgraph.d.ts.map +1 -1
- package/dist/esm/metadata/subgraph.js +86 -86
- package/dist/esm/mixins/base-core-sdk.d.ts +44 -44
- package/dist/esm/mixins/base-core-sdk.js +57 -57
- package/dist/esm/native-meta-tx/handler.d.ts +42 -42
- package/dist/esm/native-meta-tx/handler.js +121 -121
- package/dist/esm/native-meta-tx/index.d.ts +2 -2
- package/dist/esm/native-meta-tx/index.js +2 -2
- package/dist/esm/native-meta-tx/interface.d.ts +3 -3
- package/dist/esm/native-meta-tx/interface.js +26 -26
- package/dist/esm/native-meta-tx/mixin.d.ts +34 -34
- package/dist/esm/native-meta-tx/mixin.js +50 -50
- package/dist/esm/native-meta-tx/tokenSpecifics.d.ts +6 -6
- package/dist/esm/native-meta-tx/tokenSpecifics.d.ts.map +1 -1
- package/dist/esm/native-meta-tx/tokenSpecifics.js +15 -15
- package/dist/esm/offers/checkExchangePolicy.d.ts +48 -48
- package/dist/esm/offers/checkExchangePolicy.d.ts.map +1 -1
- package/dist/esm/offers/checkExchangePolicy.js +19 -19
- package/dist/esm/offers/getOfferStatus.d.ts +8 -8
- package/dist/esm/offers/getOfferStatus.js +21 -21
- package/dist/esm/offers/handler.d.ts +51 -51
- package/dist/esm/offers/handler.js +118 -118
- package/dist/esm/offers/index.d.ts +12 -12
- package/dist/esm/offers/index.js +12 -12
- package/dist/esm/offers/interface.d.ts +18 -18
- package/dist/esm/offers/interface.js +75 -75
- package/dist/esm/offers/mixin.d.ts +170 -170
- package/dist/esm/offers/mixin.js +338 -338
- package/dist/esm/offers/renderContractualAgreement.d.ts +53 -53
- package/dist/esm/offers/renderContractualAgreement.d.ts.map +1 -1
- package/dist/esm/offers/renderContractualAgreement.js +208 -208
- package/dist/esm/offers/storage.d.ts +12 -12
- package/dist/esm/offers/storage.js +14 -14
- package/dist/esm/offers/subgraph.d.ts +5 -5
- package/dist/esm/offers/subgraph.d.ts.map +1 -1
- package/dist/esm/offers/subgraph.js +16 -16
- package/dist/esm/offers/types.d.ts +1 -1
- package/dist/esm/offers/types.js +1 -1
- package/dist/esm/orchestration/handler.d.ts +73 -73
- package/dist/esm/orchestration/handler.js +110 -110
- package/dist/esm/orchestration/index.d.ts +2 -2
- package/dist/esm/orchestration/index.js +2 -2
- package/dist/esm/orchestration/interface.d.ts +14 -14
- package/dist/esm/orchestration/interface.js +103 -103
- package/dist/esm/orchestration/mixin.d.ts +84 -84
- package/dist/esm/orchestration/mixin.js +136 -136
- package/dist/esm/seaport/abi.d.ts +40 -40
- package/dist/esm/seaport/abi.js +149 -149
- package/dist/esm/seaport/handler.d.ts +45 -45
- package/dist/esm/seaport/handler.d.ts.map +1 -1
- package/dist/esm/seaport/handler.js +23 -23
- package/dist/esm/seaport/index.d.ts +1 -1
- package/dist/esm/seaport/index.js +1 -1
- package/dist/esm/subgraph.d.ts +33033 -33033
- package/dist/esm/subgraph.d.ts.map +1 -1
- package/dist/esm/subgraph.js +854 -854
- package/dist/esm/utils/errors.d.ts +4 -4
- package/dist/esm/utils/errors.js +7 -7
- package/dist/esm/utils/graphql.d.ts +315 -315
- package/dist/esm/utils/graphql.js +6 -6
- package/dist/esm/utils/logs.d.ts +20 -20
- package/dist/esm/utils/logs.js +47 -47
- package/dist/esm/utils/signature.d.ts +23 -23
- package/dist/esm/utils/signature.d.ts.map +1 -1
- package/dist/esm/utils/signature.js +57 -57
- package/dist/esm/utils/tokenInfoManager.d.ts +23 -23
- package/dist/esm/utils/tokenInfoManager.js +125 -125
- package/dist/esm/voucher/handler.d.ts +68 -68
- package/dist/esm/voucher/handler.js +86 -86
- package/dist/esm/voucher/index.d.ts +2 -2
- package/dist/esm/voucher/index.js +2 -2
- package/dist/esm/voucher/interface.d.ts +21 -21
- package/dist/esm/voucher/interface.js +119 -119
- package/dist/esm/voucher/mixin.d.ts +67 -67
- package/dist/esm/voucher/mixin.js +135 -135
- package/package.json +10 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeGetNonce = exports.encodeGetNonce = exports.abi = void 0;
|
|
4
|
-
const common_1 = require("@bosonprotocol/common");
|
|
5
|
-
const abi_1 = require("@ethersproject/abi");
|
|
6
|
-
exports.abi = common_1.abis.MockForwarderABI;
|
|
7
|
-
const forwarderInterface = new abi_1.Interface(exports.abi);
|
|
8
|
-
function encodeGetNonce(signerAddress) {
|
|
9
|
-
return forwarderInterface.encodeFunctionData("getNonce", [signerAddress]);
|
|
10
|
-
}
|
|
11
|
-
exports.encodeGetNonce = encodeGetNonce;
|
|
12
|
-
function decodeGetNonce(result) {
|
|
13
|
-
return forwarderInterface.decodeFunctionResult("getNonce", result);
|
|
14
|
-
}
|
|
15
|
-
exports.decodeGetNonce = decodeGetNonce;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeGetNonce = exports.encodeGetNonce = exports.abi = void 0;
|
|
4
|
+
const common_1 = require("@bosonprotocol/common");
|
|
5
|
+
const abi_1 = require("@ethersproject/abi");
|
|
6
|
+
exports.abi = common_1.abis.MockForwarderABI;
|
|
7
|
+
const forwarderInterface = new abi_1.Interface(exports.abi);
|
|
8
|
+
function encodeGetNonce(signerAddress) {
|
|
9
|
+
return forwarderInterface.encodeFunctionData("getNonce", [signerAddress]);
|
|
10
|
+
}
|
|
11
|
+
exports.encodeGetNonce = encodeGetNonce;
|
|
12
|
+
function decodeGetNonce(result) {
|
|
13
|
+
return forwarderInterface.decodeFunctionResult("getNonce", result);
|
|
14
|
+
}
|
|
15
|
+
exports.decodeGetNonce = decodeGetNonce;
|
|
16
16
|
//# sourceMappingURL=mock-interface.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { BigNumberish } from "@ethersproject/bignumber";
|
|
2
|
-
import { Web3LibAdapter, TransactionResponse } from "@bosonprotocol/common";
|
|
3
|
-
export declare function depositFunds(args: {
|
|
4
|
-
sellerId: BigNumberish;
|
|
5
|
-
fundsTokenAddress?: string;
|
|
6
|
-
fundsAmount: BigNumberish;
|
|
7
|
-
contractAddress: string;
|
|
8
|
-
web3Lib: Web3LibAdapter;
|
|
9
|
-
}): Promise<TransactionResponse>;
|
|
10
|
-
export declare function withdrawFunds(args: {
|
|
11
|
-
sellerId: BigNumberish;
|
|
12
|
-
tokensToWithdraw: Array<string>;
|
|
13
|
-
amountsToWithdraw: Array<BigNumberish>;
|
|
14
|
-
contractAddress: string;
|
|
15
|
-
web3Lib: Web3LibAdapter;
|
|
16
|
-
}): Promise<TransactionResponse>;
|
|
17
|
-
export declare function withdrawAllAvailableFunds(args: {
|
|
18
|
-
sellerId: BigNumberish;
|
|
19
|
-
subgraphUrl: string;
|
|
20
|
-
contractAddress: string;
|
|
21
|
-
web3Lib: Web3LibAdapter;
|
|
22
|
-
}): Promise<TransactionResponse>;
|
|
1
|
+
import { BigNumberish } from "@ethersproject/bignumber";
|
|
2
|
+
import { Web3LibAdapter, TransactionResponse } from "@bosonprotocol/common";
|
|
3
|
+
export declare function depositFunds(args: {
|
|
4
|
+
sellerId: BigNumberish;
|
|
5
|
+
fundsTokenAddress?: string;
|
|
6
|
+
fundsAmount: BigNumberish;
|
|
7
|
+
contractAddress: string;
|
|
8
|
+
web3Lib: Web3LibAdapter;
|
|
9
|
+
}): Promise<TransactionResponse>;
|
|
10
|
+
export declare function withdrawFunds(args: {
|
|
11
|
+
sellerId: BigNumberish;
|
|
12
|
+
tokensToWithdraw: Array<string>;
|
|
13
|
+
amountsToWithdraw: Array<BigNumberish>;
|
|
14
|
+
contractAddress: string;
|
|
15
|
+
web3Lib: Web3LibAdapter;
|
|
16
|
+
}): Promise<TransactionResponse>;
|
|
17
|
+
export declare function withdrawAllAvailableFunds(args: {
|
|
18
|
+
sellerId: BigNumberish;
|
|
19
|
+
subgraphUrl: string;
|
|
20
|
+
contractAddress: string;
|
|
21
|
+
web3Lib: Web3LibAdapter;
|
|
22
|
+
}): Promise<TransactionResponse>;
|
|
23
23
|
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.withdrawAllAvailableFunds = exports.withdrawFunds = exports.depositFunds = void 0;
|
|
13
|
-
const address_1 = require("@ethersproject/address");
|
|
14
|
-
const constants_1 = require("@ethersproject/constants");
|
|
15
|
-
const interface_1 = require("./interface");
|
|
16
|
-
const subgraph_1 = require("./subgraph");
|
|
17
|
-
function depositFunds(args) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const { fundsTokenAddress = constants_1.AddressZero } = args;
|
|
20
|
-
if (!(0, address_1.isAddress)(fundsTokenAddress)) {
|
|
21
|
-
throw new Error(`Invalid fundsTokenAddress: ${fundsTokenAddress}`);
|
|
22
|
-
}
|
|
23
|
-
const isNativeCoin = fundsTokenAddress === constants_1.AddressZero;
|
|
24
|
-
return args.web3Lib.sendTransaction({
|
|
25
|
-
to: args.contractAddress,
|
|
26
|
-
data: (0, interface_1.encodeDepositFunds)(args.sellerId, args.fundsTokenAddress, args.fundsAmount),
|
|
27
|
-
value: isNativeCoin ? args.fundsAmount : "0"
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
exports.depositFunds = depositFunds;
|
|
32
|
-
function withdrawFunds(args) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
return args.web3Lib.sendTransaction({
|
|
35
|
-
to: args.contractAddress,
|
|
36
|
-
data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, args.tokensToWithdraw, args.amountsToWithdraw)
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
exports.withdrawFunds = withdrawFunds;
|
|
41
|
-
function withdrawAllAvailableFunds(args) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
const funds = yield (0, subgraph_1.getFunds)(args.subgraphUrl, {
|
|
44
|
-
fundsFilter: {
|
|
45
|
-
accountId: args.sellerId.toString()
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const { tokensToWithdraw, amountsToWithdraw } = funds
|
|
49
|
-
.filter((fund) => Number(fund.availableAmount))
|
|
50
|
-
.reduce((acc, fund) => {
|
|
51
|
-
acc.tokensToWithdraw.push(fund.token.address);
|
|
52
|
-
acc.amountsToWithdraw.push(fund.availableAmount);
|
|
53
|
-
return acc;
|
|
54
|
-
}, {
|
|
55
|
-
tokensToWithdraw: [],
|
|
56
|
-
amountsToWithdraw: []
|
|
57
|
-
});
|
|
58
|
-
return args.web3Lib.sendTransaction({
|
|
59
|
-
to: args.contractAddress,
|
|
60
|
-
data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, tokensToWithdraw, amountsToWithdraw)
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
exports.withdrawAllAvailableFunds = withdrawAllAvailableFunds;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.withdrawAllAvailableFunds = exports.withdrawFunds = exports.depositFunds = void 0;
|
|
13
|
+
const address_1 = require("@ethersproject/address");
|
|
14
|
+
const constants_1 = require("@ethersproject/constants");
|
|
15
|
+
const interface_1 = require("./interface");
|
|
16
|
+
const subgraph_1 = require("./subgraph");
|
|
17
|
+
function depositFunds(args) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const { fundsTokenAddress = constants_1.AddressZero } = args;
|
|
20
|
+
if (!(0, address_1.isAddress)(fundsTokenAddress)) {
|
|
21
|
+
throw new Error(`Invalid fundsTokenAddress: ${fundsTokenAddress}`);
|
|
22
|
+
}
|
|
23
|
+
const isNativeCoin = fundsTokenAddress === constants_1.AddressZero;
|
|
24
|
+
return args.web3Lib.sendTransaction({
|
|
25
|
+
to: args.contractAddress,
|
|
26
|
+
data: (0, interface_1.encodeDepositFunds)(args.sellerId, args.fundsTokenAddress, args.fundsAmount),
|
|
27
|
+
value: isNativeCoin ? args.fundsAmount : "0"
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.depositFunds = depositFunds;
|
|
32
|
+
function withdrawFunds(args) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return args.web3Lib.sendTransaction({
|
|
35
|
+
to: args.contractAddress,
|
|
36
|
+
data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, args.tokensToWithdraw, args.amountsToWithdraw)
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.withdrawFunds = withdrawFunds;
|
|
41
|
+
function withdrawAllAvailableFunds(args) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const funds = yield (0, subgraph_1.getFunds)(args.subgraphUrl, {
|
|
44
|
+
fundsFilter: {
|
|
45
|
+
accountId: args.sellerId.toString()
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const { tokensToWithdraw, amountsToWithdraw } = funds
|
|
49
|
+
.filter((fund) => Number(fund.availableAmount))
|
|
50
|
+
.reduce((acc, fund) => {
|
|
51
|
+
acc.tokensToWithdraw.push(fund.token.address);
|
|
52
|
+
acc.amountsToWithdraw.push(fund.availableAmount);
|
|
53
|
+
return acc;
|
|
54
|
+
}, {
|
|
55
|
+
tokensToWithdraw: [],
|
|
56
|
+
amountsToWithdraw: []
|
|
57
|
+
});
|
|
58
|
+
return args.web3Lib.sendTransaction({
|
|
59
|
+
to: args.contractAddress,
|
|
60
|
+
data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, tokensToWithdraw, amountsToWithdraw)
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
exports.withdrawAllAvailableFunds = withdrawAllAvailableFunds;
|
|
65
65
|
//# sourceMappingURL=handler.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * as iface from "./interface";
|
|
2
|
-
export * as subgraph from "./subgraph";
|
|
3
|
-
export * as handler from "./handler";
|
|
1
|
+
export * as iface from "./interface";
|
|
2
|
+
export * as subgraph from "./subgraph";
|
|
3
|
+
export * as handler from "./handler";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/funds/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.handler = exports.subgraph = exports.iface = void 0;
|
|
27
|
-
exports.iface = __importStar(require("./interface"));
|
|
28
|
-
exports.subgraph = __importStar(require("./subgraph"));
|
|
29
|
-
exports.handler = __importStar(require("./handler"));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.handler = exports.subgraph = exports.iface = void 0;
|
|
27
|
+
exports.iface = __importStar(require("./interface"));
|
|
28
|
+
exports.subgraph = __importStar(require("./subgraph"));
|
|
29
|
+
exports.handler = __importStar(require("./handler"));
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Interface } from "@ethersproject/abi";
|
|
2
|
-
import { BigNumberish } from "@ethersproject/bignumber";
|
|
3
|
-
export declare const bosonFundsHandlerIface: Interface;
|
|
4
|
-
export declare function encodeDepositFunds(sellerId: BigNumberish, tokenAddress: string, amount: BigNumberish): string;
|
|
5
|
-
export declare function encodeWithdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): string;
|
|
1
|
+
import { Interface } from "@ethersproject/abi";
|
|
2
|
+
import { BigNumberish } from "@ethersproject/bignumber";
|
|
3
|
+
export declare const bosonFundsHandlerIface: Interface;
|
|
4
|
+
export declare function encodeDepositFunds(sellerId: BigNumberish, tokenAddress: string, amount: BigNumberish): string;
|
|
5
|
+
export declare function encodeWithdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): string;
|
|
6
6
|
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeWithdrawFunds = exports.encodeDepositFunds = exports.bosonFundsHandlerIface = void 0;
|
|
4
|
-
const common_1 = require("@bosonprotocol/common");
|
|
5
|
-
const abi_1 = require("@ethersproject/abi");
|
|
6
|
-
exports.bosonFundsHandlerIface = new abi_1.Interface(common_1.abis.IBosonFundsHandlerABI);
|
|
7
|
-
function encodeDepositFunds(sellerId, tokenAddress, amount) {
|
|
8
|
-
return exports.bosonFundsHandlerIface.encodeFunctionData("depositFunds", [
|
|
9
|
-
sellerId,
|
|
10
|
-
tokenAddress,
|
|
11
|
-
amount
|
|
12
|
-
]);
|
|
13
|
-
}
|
|
14
|
-
exports.encodeDepositFunds = encodeDepositFunds;
|
|
15
|
-
function encodeWithdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
|
|
16
|
-
return exports.bosonFundsHandlerIface.encodeFunctionData("withdrawFunds", [
|
|
17
|
-
sellerId,
|
|
18
|
-
tokensToWithdraw,
|
|
19
|
-
amountsToWithdraw
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
exports.encodeWithdrawFunds = encodeWithdrawFunds;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encodeWithdrawFunds = exports.encodeDepositFunds = exports.bosonFundsHandlerIface = void 0;
|
|
4
|
+
const common_1 = require("@bosonprotocol/common");
|
|
5
|
+
const abi_1 = require("@ethersproject/abi");
|
|
6
|
+
exports.bosonFundsHandlerIface = new abi_1.Interface(common_1.abis.IBosonFundsHandlerABI);
|
|
7
|
+
function encodeDepositFunds(sellerId, tokenAddress, amount) {
|
|
8
|
+
return exports.bosonFundsHandlerIface.encodeFunctionData("depositFunds", [
|
|
9
|
+
sellerId,
|
|
10
|
+
tokenAddress,
|
|
11
|
+
amount
|
|
12
|
+
]);
|
|
13
|
+
}
|
|
14
|
+
exports.encodeDepositFunds = encodeDepositFunds;
|
|
15
|
+
function encodeWithdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
|
|
16
|
+
return exports.bosonFundsHandlerIface.encodeFunctionData("withdrawFunds", [
|
|
17
|
+
sellerId,
|
|
18
|
+
tokensToWithdraw,
|
|
19
|
+
amountsToWithdraw
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
exports.encodeWithdrawFunds = encodeWithdrawFunds;
|
|
23
23
|
//# sourceMappingURL=interface.js.map
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { BaseCoreSDK } from "./../mixins/base-core-sdk";
|
|
2
|
-
import * as subgraph from "../subgraph";
|
|
3
|
-
import { TransactionResponse } from "@bosonprotocol/common";
|
|
4
|
-
import { BigNumberish } from "@ethersproject/bignumber";
|
|
5
|
-
export declare class FundsMixin extends BaseCoreSDK {
|
|
6
|
-
/**
|
|
7
|
-
* Deposit funds by calling the `FundsHandlerFacet` contract.
|
|
8
|
-
* @param sellerId - ID of seller account to deposit funds for.
|
|
9
|
-
* @param fundsAmount - Amount of funds.
|
|
10
|
-
* @param fundsTokenAddress - Address of funds token.
|
|
11
|
-
* @returns Transaction response.
|
|
12
|
-
*/
|
|
13
|
-
depositFunds(sellerId: BigNumberish, fundsAmount: BigNumberish, fundsTokenAddress?: string): Promise<TransactionResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* Returns funds entity from subgraph.
|
|
16
|
-
* @param fundsId - ID of funds entity.
|
|
17
|
-
* @param queryVars - Optional query variables to skip, order or filter.
|
|
18
|
-
* @returns Funds entity from subgraph.
|
|
19
|
-
*/
|
|
20
|
-
getFundsById(fundsId: BigNumberish, queryVars?: subgraph.GetFundsByIdQueryVariables): Promise<subgraph.FundsEntityFieldsFragment>;
|
|
21
|
-
/**
|
|
22
|
-
* Returns funds entities from subgraph.
|
|
23
|
-
* @param queryVars - Optional query variables to skip, order or filter.
|
|
24
|
-
* @returns Funds entities from subgraph.
|
|
25
|
-
*/
|
|
26
|
-
getFunds(queryVars?: subgraph.GetFundsQueryVariables): Promise<subgraph.FundsEntityFieldsFragment[]>;
|
|
27
|
-
/**
|
|
28
|
-
* Withdraw selected funds by calling the `FundsHandlerFacet` contract.
|
|
29
|
-
* @param sellerId - ID of seller account to withdraw funds for.
|
|
30
|
-
* @param tokensToWithdraw - Addresses of funds tokens to withdraw.
|
|
31
|
-
* @param amountsToWithdraw - Amounts of funds token to withdraw.
|
|
32
|
-
* @returns Transaction response.
|
|
33
|
-
*/
|
|
34
|
-
withdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): Promise<TransactionResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Withdraw all available funds by calling the `FundsHandlerFacet` contract.
|
|
37
|
-
* @param sellerId - ID of seller account to withdraw funds for.
|
|
38
|
-
* @returns Transaction response.
|
|
39
|
-
*/
|
|
40
|
-
withdrawAllAvailableFunds(sellerId: BigNumberish): Promise<TransactionResponse>;
|
|
41
|
-
}
|
|
1
|
+
import { BaseCoreSDK } from "./../mixins/base-core-sdk";
|
|
2
|
+
import * as subgraph from "../subgraph";
|
|
3
|
+
import { TransactionResponse } from "@bosonprotocol/common";
|
|
4
|
+
import { BigNumberish } from "@ethersproject/bignumber";
|
|
5
|
+
export declare class FundsMixin extends BaseCoreSDK {
|
|
6
|
+
/**
|
|
7
|
+
* Deposit funds by calling the `FundsHandlerFacet` contract.
|
|
8
|
+
* @param sellerId - ID of seller account to deposit funds for.
|
|
9
|
+
* @param fundsAmount - Amount of funds.
|
|
10
|
+
* @param fundsTokenAddress - Address of funds token.
|
|
11
|
+
* @returns Transaction response.
|
|
12
|
+
*/
|
|
13
|
+
depositFunds(sellerId: BigNumberish, fundsAmount: BigNumberish, fundsTokenAddress?: string): Promise<TransactionResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Returns funds entity from subgraph.
|
|
16
|
+
* @param fundsId - ID of funds entity.
|
|
17
|
+
* @param queryVars - Optional query variables to skip, order or filter.
|
|
18
|
+
* @returns Funds entity from subgraph.
|
|
19
|
+
*/
|
|
20
|
+
getFundsById(fundsId: BigNumberish, queryVars?: subgraph.GetFundsByIdQueryVariables): Promise<subgraph.FundsEntityFieldsFragment>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns funds entities from subgraph.
|
|
23
|
+
* @param queryVars - Optional query variables to skip, order or filter.
|
|
24
|
+
* @returns Funds entities from subgraph.
|
|
25
|
+
*/
|
|
26
|
+
getFunds(queryVars?: subgraph.GetFundsQueryVariables): Promise<subgraph.FundsEntityFieldsFragment[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Withdraw selected funds by calling the `FundsHandlerFacet` contract.
|
|
29
|
+
* @param sellerId - ID of seller account to withdraw funds for.
|
|
30
|
+
* @param tokensToWithdraw - Addresses of funds tokens to withdraw.
|
|
31
|
+
* @param amountsToWithdraw - Amounts of funds token to withdraw.
|
|
32
|
+
* @returns Transaction response.
|
|
33
|
+
*/
|
|
34
|
+
withdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): Promise<TransactionResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Withdraw all available funds by calling the `FundsHandlerFacet` contract.
|
|
37
|
+
* @param sellerId - ID of seller account to withdraw funds for.
|
|
38
|
+
* @returns Transaction response.
|
|
39
|
+
*/
|
|
40
|
+
withdrawAllAvailableFunds(sellerId: BigNumberish): Promise<TransactionResponse>;
|
|
41
|
+
}
|
|
42
42
|
//# sourceMappingURL=mixin.d.ts.map
|
package/dist/cjs/funds/mixin.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FundsMixin = void 0;
|
|
13
|
-
const base_core_sdk_1 = require("./../mixins/base-core-sdk");
|
|
14
|
-
const constants_1 = require("@ethersproject/constants");
|
|
15
|
-
const handler_1 = require("./handler");
|
|
16
|
-
const subgraph_1 = require("./subgraph");
|
|
17
|
-
class FundsMixin extends base_core_sdk_1.BaseCoreSDK {
|
|
18
|
-
/* -------------------------------------------------------------------------- */
|
|
19
|
-
/* Funds related methods */
|
|
20
|
-
/* -------------------------------------------------------------------------- */
|
|
21
|
-
/**
|
|
22
|
-
* Deposit funds by calling the `FundsHandlerFacet` contract.
|
|
23
|
-
* @param sellerId - ID of seller account to deposit funds for.
|
|
24
|
-
* @param fundsAmount - Amount of funds.
|
|
25
|
-
* @param fundsTokenAddress - Address of funds token.
|
|
26
|
-
* @returns Transaction response.
|
|
27
|
-
*/
|
|
28
|
-
depositFunds(sellerId, fundsAmount, fundsTokenAddress = constants_1.AddressZero) {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
return (0, handler_1.depositFunds)({
|
|
31
|
-
sellerId,
|
|
32
|
-
fundsAmount,
|
|
33
|
-
fundsTokenAddress,
|
|
34
|
-
contractAddress: this._protocolDiamond,
|
|
35
|
-
web3Lib: this._web3Lib
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Returns funds entity from subgraph.
|
|
41
|
-
* @param fundsId - ID of funds entity.
|
|
42
|
-
* @param queryVars - Optional query variables to skip, order or filter.
|
|
43
|
-
* @returns Funds entity from subgraph.
|
|
44
|
-
*/
|
|
45
|
-
getFundsById(fundsId, queryVars) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
return (0, subgraph_1.getFundsById)(this._subgraphUrl, fundsId, queryVars);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Returns funds entities from subgraph.
|
|
52
|
-
* @param queryVars - Optional query variables to skip, order or filter.
|
|
53
|
-
* @returns Funds entities from subgraph.
|
|
54
|
-
*/
|
|
55
|
-
getFunds(queryVars) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
return (0, subgraph_1.getFunds)(this._subgraphUrl, queryVars);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Withdraw selected funds by calling the `FundsHandlerFacet` contract.
|
|
62
|
-
* @param sellerId - ID of seller account to withdraw funds for.
|
|
63
|
-
* @param tokensToWithdraw - Addresses of funds tokens to withdraw.
|
|
64
|
-
* @param amountsToWithdraw - Amounts of funds token to withdraw.
|
|
65
|
-
* @returns Transaction response.
|
|
66
|
-
*/
|
|
67
|
-
withdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
return (0, handler_1.withdrawFunds)({
|
|
70
|
-
sellerId,
|
|
71
|
-
tokensToWithdraw,
|
|
72
|
-
amountsToWithdraw,
|
|
73
|
-
contractAddress: this._protocolDiamond,
|
|
74
|
-
web3Lib: this._web3Lib
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Withdraw all available funds by calling the `FundsHandlerFacet` contract.
|
|
80
|
-
* @param sellerId - ID of seller account to withdraw funds for.
|
|
81
|
-
* @returns Transaction response.
|
|
82
|
-
*/
|
|
83
|
-
withdrawAllAvailableFunds(sellerId) {
|
|
84
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
return (0, handler_1.withdrawAllAvailableFunds)({
|
|
86
|
-
sellerId,
|
|
87
|
-
subgraphUrl: this._subgraphUrl,
|
|
88
|
-
contractAddress: this._protocolDiamond,
|
|
89
|
-
web3Lib: this._web3Lib
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
exports.FundsMixin = FundsMixin;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FundsMixin = void 0;
|
|
13
|
+
const base_core_sdk_1 = require("./../mixins/base-core-sdk");
|
|
14
|
+
const constants_1 = require("@ethersproject/constants");
|
|
15
|
+
const handler_1 = require("./handler");
|
|
16
|
+
const subgraph_1 = require("./subgraph");
|
|
17
|
+
class FundsMixin extends base_core_sdk_1.BaseCoreSDK {
|
|
18
|
+
/* -------------------------------------------------------------------------- */
|
|
19
|
+
/* Funds related methods */
|
|
20
|
+
/* -------------------------------------------------------------------------- */
|
|
21
|
+
/**
|
|
22
|
+
* Deposit funds by calling the `FundsHandlerFacet` contract.
|
|
23
|
+
* @param sellerId - ID of seller account to deposit funds for.
|
|
24
|
+
* @param fundsAmount - Amount of funds.
|
|
25
|
+
* @param fundsTokenAddress - Address of funds token.
|
|
26
|
+
* @returns Transaction response.
|
|
27
|
+
*/
|
|
28
|
+
depositFunds(sellerId, fundsAmount, fundsTokenAddress = constants_1.AddressZero) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return (0, handler_1.depositFunds)({
|
|
31
|
+
sellerId,
|
|
32
|
+
fundsAmount,
|
|
33
|
+
fundsTokenAddress,
|
|
34
|
+
contractAddress: this._protocolDiamond,
|
|
35
|
+
web3Lib: this._web3Lib
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns funds entity from subgraph.
|
|
41
|
+
* @param fundsId - ID of funds entity.
|
|
42
|
+
* @param queryVars - Optional query variables to skip, order or filter.
|
|
43
|
+
* @returns Funds entity from subgraph.
|
|
44
|
+
*/
|
|
45
|
+
getFundsById(fundsId, queryVars) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return (0, subgraph_1.getFundsById)(this._subgraphUrl, fundsId, queryVars);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Returns funds entities from subgraph.
|
|
52
|
+
* @param queryVars - Optional query variables to skip, order or filter.
|
|
53
|
+
* @returns Funds entities from subgraph.
|
|
54
|
+
*/
|
|
55
|
+
getFunds(queryVars) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
return (0, subgraph_1.getFunds)(this._subgraphUrl, queryVars);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Withdraw selected funds by calling the `FundsHandlerFacet` contract.
|
|
62
|
+
* @param sellerId - ID of seller account to withdraw funds for.
|
|
63
|
+
* @param tokensToWithdraw - Addresses of funds tokens to withdraw.
|
|
64
|
+
* @param amountsToWithdraw - Amounts of funds token to withdraw.
|
|
65
|
+
* @returns Transaction response.
|
|
66
|
+
*/
|
|
67
|
+
withdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
return (0, handler_1.withdrawFunds)({
|
|
70
|
+
sellerId,
|
|
71
|
+
tokensToWithdraw,
|
|
72
|
+
amountsToWithdraw,
|
|
73
|
+
contractAddress: this._protocolDiamond,
|
|
74
|
+
web3Lib: this._web3Lib
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Withdraw all available funds by calling the `FundsHandlerFacet` contract.
|
|
80
|
+
* @param sellerId - ID of seller account to withdraw funds for.
|
|
81
|
+
* @returns Transaction response.
|
|
82
|
+
*/
|
|
83
|
+
withdrawAllAvailableFunds(sellerId) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
return (0, handler_1.withdrawAllAvailableFunds)({
|
|
86
|
+
sellerId,
|
|
87
|
+
subgraphUrl: this._subgraphUrl,
|
|
88
|
+
contractAddress: this._protocolDiamond,
|
|
89
|
+
web3Lib: this._web3Lib
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.FundsMixin = FundsMixin;
|
|
95
95
|
//# sourceMappingURL=mixin.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FundsEntityFieldsFragment, GetFundsByIdQueryVariables, GetFundsQueryVariables } from "../subgraph";
|
|
2
|
-
import { BigNumberish } from "@ethersproject/bignumber";
|
|
3
|
-
export
|
|
4
|
-
export declare function getFunds(subgraphUrl: string, queryVars?: GetFundsQueryVariables): Promise<FundsEntityFieldsFragment[]>;
|
|
5
|
-
export declare function getFundsById(subgraphUrl: string, fundsId: BigNumberish, queryVars?: SingleFundsQueryVariables): Promise<FundsEntityFieldsFragment>;
|
|
1
|
+
import { FundsEntityFieldsFragment, GetFundsByIdQueryVariables, GetFundsQueryVariables } from "../subgraph";
|
|
2
|
+
import { BigNumberish } from "@ethersproject/bignumber";
|
|
3
|
+
export type SingleFundsQueryVariables = Omit<GetFundsByIdQueryVariables, "fundsId">;
|
|
4
|
+
export declare function getFunds(subgraphUrl: string, queryVars?: GetFundsQueryVariables): Promise<FundsEntityFieldsFragment[]>;
|
|
5
|
+
export declare function getFundsById(subgraphUrl: string, fundsId: BigNumberish, queryVars?: SingleFundsQueryVariables): Promise<FundsEntityFieldsFragment>;
|
|
6
6
|
//# sourceMappingURL=subgraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../src/funds/subgraph.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,
|
|
1
|
+
{"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../src/funds/subgraph.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,0BAA0B,EAC1B,SAAS,CACV,CAAC;AAEF,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,sBAA2B,GACrC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAItC;AAED,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,YAAY,EACrB,SAAS,GAAE,yBAA8B,GACxC,OAAO,CAAC,yBAAyB,CAAC,CAQpC"}
|