2938 lines
77 KiB
Plaintext
2938 lines
77 KiB
Plaintext
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Enumeration: TypedDataError
|
||
|
||
|
||
## Enumeration members
|
||
|
||
### InvalidMetamaskSigner
|
||
|
||
• **InvalidMetamaskSigner**: = "MetaMask provider must be wrapped in a MetamaskSubprovider (from the '@0x/subproviders' package) in order to work with this method."
|
||
|
||
*Defined in [order-utils/src/types.ts:5](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L5)*
|
||
|
||
___
|
||
|
||
### InvalidSignature
|
||
|
||
• **InvalidSignature**: = "INVALID_SIGNATURE"
|
||
|
||
*Defined in [order-utils/src/types.ts:4](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L4)*
|
||
|
||
<hr />
|
||
|
||
# Enumeration: AssetProxyId
|
||
|
||
|
||
## Enumeration members
|
||
|
||
### ERC1155
|
||
|
||
• **ERC1155**: = "0xa7cb5fb7"
|
||
|
||
*Defined in [types/src/index.ts:166](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L166)*
|
||
|
||
___
|
||
|
||
### ERC20
|
||
|
||
• **ERC20**: = "0xf47261b0"
|
||
|
||
*Defined in [types/src/index.ts:163](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L163)*
|
||
|
||
___
|
||
|
||
### ERC20Bridge
|
||
|
||
• **ERC20Bridge**: = "0xdc1600f3"
|
||
|
||
*Defined in [types/src/index.ts:168](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L168)*
|
||
|
||
___
|
||
|
||
### ERC721
|
||
|
||
• **ERC721**: = "0x02571792"
|
||
|
||
*Defined in [types/src/index.ts:164](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L164)*
|
||
|
||
___
|
||
|
||
### MultiAsset
|
||
|
||
• **MultiAsset**: = "0x94cfcdd7"
|
||
|
||
*Defined in [types/src/index.ts:165](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L165)*
|
||
|
||
___
|
||
|
||
### StaticCall
|
||
|
||
• **StaticCall**: = "0xc339d10a"
|
||
|
||
*Defined in [types/src/index.ts:167](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L167)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Enumeration: SignatureType
|
||
|
||
|
||
## Enumeration members
|
||
|
||
### EIP1271Wallet
|
||
|
||
• **EIP1271Wallet**:
|
||
|
||
*Defined in [types/src/index.ts:158](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L158)*
|
||
|
||
___
|
||
|
||
### EIP712
|
||
|
||
• **EIP712**:
|
||
|
||
*Defined in [types/src/index.ts:153](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L153)*
|
||
|
||
___
|
||
|
||
### EthSign
|
||
|
||
• **EthSign**:
|
||
|
||
*Defined in [types/src/index.ts:154](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L154)*
|
||
|
||
___
|
||
|
||
### Illegal
|
||
|
||
• **Illegal**:
|
||
|
||
*Defined in [types/src/index.ts:151](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L151)*
|
||
|
||
___
|
||
|
||
### Invalid
|
||
|
||
• **Invalid**:
|
||
|
||
*Defined in [types/src/index.ts:152](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L152)*
|
||
|
||
___
|
||
|
||
### NSignatureTypes
|
||
|
||
• **NSignatureTypes**:
|
||
|
||
*Defined in [types/src/index.ts:159](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L159)*
|
||
|
||
___
|
||
|
||
### PreSigned
|
||
|
||
• **PreSigned**:
|
||
|
||
*Defined in [types/src/index.ts:157](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L157)*
|
||
|
||
___
|
||
|
||
### Validator
|
||
|
||
• **Validator**:
|
||
|
||
*Defined in [types/src/index.ts:156](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L156)*
|
||
|
||
___
|
||
|
||
### Wallet
|
||
|
||
• **Wallet**:
|
||
|
||
*Defined in [types/src/index.ts:155](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L155)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: EIP1193Provider
|
||
|
||
|
||
## Properties
|
||
|
||
### isEIP1193
|
||
|
||
• **isEIP1193**: *boolean*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:73](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L73)*
|
||
|
||
## Methods
|
||
|
||
### on
|
||
|
||
▸ **on**(`event`: [EIP1193Event](#eip1193event), `listener`: function): *this*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:75](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L75)*
|
||
|
||
**Parameters:**
|
||
|
||
▪ **event**: *[EIP1193Event](#eip1193event)*
|
||
|
||
▪ **listener**: *function*
|
||
|
||
▸ (`result`: any): *void*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`result` | any |
|
||
|
||
**Returns:** *this*
|
||
|
||
___
|
||
|
||
### send
|
||
|
||
▸ **send**(`method`: string, `params?`: any[]): *`Promise<any>`*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:74](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L74)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`method` | string |
|
||
`params?` | any[] |
|
||
|
||
**Returns:** *`Promise<any>`*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: GanacheProvider
|
||
|
||
|
||
## Methods
|
||
|
||
### sendAsync
|
||
|
||
▸ **sendAsync**(`payload`: [JSONRPCRequestPayload](_ethereum_types_src_index_.jsonrpcrequestpayload.md), `callback`: [JSONRPCErrorCallback](#jsonrpcerrorcallback)): *void*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:14](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L14)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`payload` | [JSONRPCRequestPayload](#class-jsonrpcrequestpayload) |
|
||
`callback` | [JSONRPCErrorCallback](#jsonrpcerrorcallback) |
|
||
|
||
**Returns:** *void*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
# Interface: JSONRPCRequestPayload
|
||
|
||
|
||
## Properties
|
||
|
||
### id
|
||
|
||
• **id**: *number*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:331](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L331)*
|
||
|
||
___
|
||
|
||
### jsonrpc
|
||
|
||
• **jsonrpc**: *string*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:332](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L332)*
|
||
|
||
___
|
||
|
||
### method
|
||
|
||
• **method**: *string*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:330](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L330)*
|
||
|
||
___
|
||
|
||
### params
|
||
|
||
• **params**: *any[]*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:329](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L329)*
|
||
|
||
<hr />
|
||
|
||
# Interface: JSONRPCResponseError
|
||
|
||
|
||
## Properties
|
||
|
||
### code
|
||
|
||
• **code**: *number*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:337](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L337)*
|
||
|
||
___
|
||
|
||
### message
|
||
|
||
• **message**: *string*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:336](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L336)*
|
||
|
||
<hr />
|
||
|
||
# Interface: JSONRPCResponsePayload
|
||
|
||
|
||
## Properties
|
||
|
||
### `Optional` error
|
||
|
||
• **error**? : *[JSONRPCResponseError](#class-jsonrpcresponseerror)*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:344](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L344)*
|
||
|
||
___
|
||
|
||
### id
|
||
|
||
• **id**: *number*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:342](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L342)*
|
||
|
||
___
|
||
|
||
### jsonrpc
|
||
|
||
• **jsonrpc**: *string*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:343](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L343)*
|
||
|
||
___
|
||
|
||
### result
|
||
|
||
• **result**: *any*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:341](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L341)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: Web3JsV1Provider
|
||
|
||
Web3.js version 1 provider interface
|
||
This provider interface was implemented in the pre-1.0Beta releases for Web3.js.
|
||
This interface allowed sending synchonous requests, support for which was later dropped.
|
||
|
||
|
||
## Methods
|
||
|
||
### send
|
||
|
||
▸ **send**(`payload`: [JSONRPCRequestPayload](_ethereum_types_src_index_.jsonrpcrequestpayload.md)): *[JSONRPCResponsePayload](#class-jsonrpcresponsepayload)*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:45](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L45)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`payload` | [JSONRPCRequestPayload](#class-jsonrpcrequestpayload) |
|
||
|
||
**Returns:** *[JSONRPCResponsePayload](#class-jsonrpcresponsepayload)*
|
||
|
||
___
|
||
|
||
### sendAsync
|
||
|
||
▸ **sendAsync**(`payload`: [JSONRPCRequestPayload](_ethereum_types_src_index_.jsonrpcrequestpayload.md), `callback`: [JSONRPCErrorCallback](#jsonrpcerrorcallback)): *void*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:44](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L44)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`payload` | [JSONRPCRequestPayload](#class-jsonrpcrequestpayload) |
|
||
`callback` | [JSONRPCErrorCallback](#jsonrpcerrorcallback) |
|
||
|
||
**Returns:** *void*
|
||
|
||
<hr />
|
||
|
||
# Interface: Web3JsV2Provider
|
||
|
||
Web3.js version 2 provider interface
|
||
This provider interface was used in a couple of Web3.js 1.0 beta releases
|
||
before the first attempts to conform to EIP1193
|
||
|
||
|
||
## Methods
|
||
|
||
### send
|
||
|
||
▸ **send**(`payload`: [JSONRPCRequestPayload](_ethereum_types_src_index_.jsonrpcrequestpayload.md), `callback`: [JSONRPCErrorCallback](#jsonrpcerrorcallback)): *void*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:54](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L54)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`payload` | [JSONRPCRequestPayload](#class-jsonrpcrequestpayload) |
|
||
`callback` | [JSONRPCErrorCallback](#jsonrpcerrorcallback) |
|
||
|
||
**Returns:** *void*
|
||
|
||
<hr />
|
||
|
||
# Interface: Web3JsV3Provider
|
||
|
||
Web3.js version 3 provider interface
|
||
This provider interface was implemented with the hopes for conforming to the EIP1193 spec,
|
||
however it does not conform entirely.
|
||
|
||
|
||
## Methods
|
||
|
||
### send
|
||
|
||
▸ **send**(`method`: string, `params?`: any[]): *`Promise<any>`*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:63](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L63)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`method` | string |
|
||
`params?` | any[] |
|
||
|
||
**Returns:** *`Promise<any>`*
|
||
|
||
<hr />
|
||
|
||
# Interface: ZeroExProvider
|
||
|
||
The interface for the provider used internally by 0x libraries
|
||
Any property we use from any SupportedProvider should we explicitly
|
||
add here
|
||
|
||
|
||
## Properties
|
||
|
||
### `Optional` isMetaMask
|
||
|
||
• **isMetaMask**? : *undefined | false | true*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:31](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L31)*
|
||
|
||
___
|
||
|
||
### `Optional` isParity
|
||
|
||
• **isParity**? : *undefined | false | true*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:32](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L32)*
|
||
|
||
___
|
||
|
||
### `Optional` isZeroExProvider
|
||
|
||
• **isZeroExProvider**? : *undefined | false | true*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:30](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L30)*
|
||
|
||
## Methods
|
||
|
||
### `Optional` enable
|
||
|
||
▸ **enable**(): *`Promise<void>`*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:34](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L34)*
|
||
|
||
**Returns:** *`Promise<void>`*
|
||
|
||
___
|
||
|
||
### sendAsync
|
||
|
||
▸ **sendAsync**(`payload`: [JSONRPCRequestPayload](_ethereum_types_src_index_.jsonrpcrequestpayload.md), `callback`: [JSONRPCErrorCallback](#jsonrpcerrorcallback)): *void*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:35](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L35)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`payload` | [JSONRPCRequestPayload](#class-jsonrpcrequestpayload) |
|
||
`callback` | [JSONRPCErrorCallback](#jsonrpcerrorcallback) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### `Optional` stop
|
||
|
||
▸ **stop**(): *void*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:33](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L33)*
|
||
|
||
**Returns:** *void*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
# Interface: FeeOrdersAndRemainingFeeAmount <**T**>
|
||
|
||
## Type parameters
|
||
|
||
▪ **T**
|
||
|
||
|
||
## Properties
|
||
|
||
### feeOrdersRemainingFillableMakerAssetAmounts
|
||
|
||
• **feeOrdersRemainingFillableMakerAssetAmounts**: *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:68](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L68)*
|
||
|
||
___
|
||
|
||
### remainingFeeAmount
|
||
|
||
• **remainingFeeAmount**: *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/types.ts:69](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L69)*
|
||
|
||
___
|
||
|
||
### resultFeeOrders
|
||
|
||
• **resultFeeOrders**: *`T`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:67](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L67)*
|
||
|
||
<hr />
|
||
|
||
# Interface: FindFeeOrdersThatCoverFeesForTargetOrdersOpts
|
||
|
||
remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
|
||
You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values.
|
||
Defaults to `makerAssetAmount` values from the orders param.
|
||
remainingFillableFeeAmounts: An array of BigNumbers corresponding to the feeOrders parameter.
|
||
You can use OrderStateUtils @0x/order-utils to perform blockchain lookups for these values.
|
||
Defaults to `makerAssetAmount` values from the feeOrders param.
|
||
slippageBufferAmount: An additional amount of fee to be covered by the result in case of trade collisions or partial fills.
|
||
Defaults to 0
|
||
|
||
|
||
## Properties
|
||
|
||
### `Optional` remainingFillableFeeAmounts
|
||
|
||
• **remainingFillableFeeAmounts**? : *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:62](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L62)*
|
||
|
||
___
|
||
|
||
### `Optional` remainingFillableMakerAssetAmounts
|
||
|
||
• **remainingFillableMakerAssetAmounts**? : *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:61](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L61)*
|
||
|
||
___
|
||
|
||
### `Optional` slippageBufferAmount
|
||
|
||
• **slippageBufferAmount**? : *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/types.ts:63](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L63)*
|
||
|
||
<hr />
|
||
|
||
# Interface: FindOrdersThatCoverMakerAssetFillAmountOpts
|
||
|
||
remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
|
||
You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values.
|
||
Defaults to `makerAssetAmount` values from the orders param.
|
||
slippageBufferAmount: An additional amount of makerAsset to be covered by the result in case of trade collisions or partial fills.
|
||
Defaults to 0
|
||
|
||
|
||
## Properties
|
||
|
||
### `Optional` remainingFillableMakerAssetAmounts
|
||
|
||
• **remainingFillableMakerAssetAmounts**? : *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:34](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L34)*
|
||
|
||
___
|
||
|
||
### `Optional` slippageBufferAmount
|
||
|
||
• **slippageBufferAmount**? : *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/types.ts:35](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L35)*
|
||
|
||
<hr />
|
||
|
||
# Interface: FindOrdersThatCoverTakerAssetFillAmountOpts
|
||
|
||
remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
|
||
You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values.
|
||
Defaults to `makerAssetAmount` values from the orders param.
|
||
slippageBufferAmount: An additional amount of makerAsset to be covered by the result in case of trade collisions or partial fills.
|
||
Defaults to 0
|
||
|
||
|
||
## Properties
|
||
|
||
### `Optional` remainingFillableTakerAssetAmounts
|
||
|
||
• **remainingFillableTakerAssetAmounts**? : *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:46](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L46)*
|
||
|
||
___
|
||
|
||
### `Optional` slippageBufferAmount
|
||
|
||
• **slippageBufferAmount**? : *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/types.ts:47](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L47)*
|
||
|
||
<hr />
|
||
|
||
# Interface: OrdersAndRemainingMakerFillAmount <**T**>
|
||
|
||
## Type parameters
|
||
|
||
▪ **T**
|
||
|
||
|
||
## Properties
|
||
|
||
### ordersRemainingFillableMakerAssetAmounts
|
||
|
||
• **ordersRemainingFillableMakerAssetAmounts**: *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:74](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L74)*
|
||
|
||
___
|
||
|
||
### remainingFillAmount
|
||
|
||
• **remainingFillAmount**: *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/types.ts:75](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L75)*
|
||
|
||
___
|
||
|
||
### resultOrders
|
||
|
||
• **resultOrders**: *`T`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:73](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L73)*
|
||
|
||
<hr />
|
||
|
||
# Interface: OrdersAndRemainingTakerFillAmount <**T**>
|
||
|
||
## Type parameters
|
||
|
||
▪ **T**
|
||
|
||
|
||
## Properties
|
||
|
||
### ordersRemainingFillableTakerAssetAmounts
|
||
|
||
• **ordersRemainingFillableTakerAssetAmounts**: *`BigNumber`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:80](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L80)*
|
||
|
||
___
|
||
|
||
### remainingFillAmount
|
||
|
||
• **remainingFillAmount**: *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/types.ts:81](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L81)*
|
||
|
||
___
|
||
|
||
### resultOrders
|
||
|
||
• **resultOrders**: *`T`[]*
|
||
|
||
*Defined in [order-utils/src/types.ts:79](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/types.ts#L79)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: DutchAuctionData
|
||
|
||
|
||
## Properties
|
||
|
||
### assetData
|
||
|
||
• **assetData**: *[AssetData](#assetdata)*
|
||
|
||
*Defined in [types/src/index.ts:219](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L219)*
|
||
|
||
___
|
||
|
||
### beginAmount
|
||
|
||
• **beginAmount**: *`BigNumber`*
|
||
|
||
*Defined in [types/src/index.ts:221](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L221)*
|
||
|
||
___
|
||
|
||
### beginTimeSeconds
|
||
|
||
• **beginTimeSeconds**: *`BigNumber`*
|
||
|
||
*Defined in [types/src/index.ts:220](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L220)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
# Interface: ECSignature
|
||
|
||
Elliptic Curve signature
|
||
|
||
|
||
## Properties
|
||
|
||
### r
|
||
|
||
• **r**: *string*
|
||
|
||
*Defined in [types/src/index.ts:62](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L62)*
|
||
|
||
___
|
||
|
||
### s
|
||
|
||
• **s**: *string*
|
||
|
||
*Defined in [types/src/index.ts:63](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L63)*
|
||
|
||
___
|
||
|
||
### v
|
||
|
||
• **v**: *number*
|
||
|
||
*Defined in [types/src/index.ts:61](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L61)*
|
||
|
||
<hr />
|
||
|
||
# Interface: EIP712DomainWithDefaultSchema
|
||
|
||
|
||
## Properties
|
||
|
||
### chainId
|
||
|
||
• **chainId**: *number*
|
||
|
||
*Defined in [types/src/index.ts:793](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L793)*
|
||
|
||
___
|
||
|
||
### `Optional` name
|
||
|
||
• **name**? : *undefined | string*
|
||
|
||
*Defined in [types/src/index.ts:791](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L791)*
|
||
|
||
___
|
||
|
||
### verifyingContract
|
||
|
||
• **verifyingContract**: *string*
|
||
|
||
*Defined in [types/src/index.ts:794](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L794)*
|
||
|
||
___
|
||
|
||
### `Optional` version
|
||
|
||
• **version**? : *undefined | string*
|
||
|
||
*Defined in [types/src/index.ts:792](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L792)*
|
||
|
||
<hr />
|
||
|
||
# Interface: EIP712Object
|
||
|
||
|
||
## Hierarchy
|
||
|
||
* **EIP712Parameter**
|
||
|
||
|
||
## Properties
|
||
|
||
### name
|
||
|
||
• **name**: *string*
|
||
|
||
*Defined in [types/src/index.ts:732](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L732)*
|
||
|
||
___
|
||
|
||
### type
|
||
|
||
• **type**: *string*
|
||
|
||
*Defined in [types/src/index.ts:733](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L733)*
|
||
|
||
<hr />
|
||
|
||
# Interface: EIP712TypedData
|
||
|
||
|
||
## Properties
|
||
|
||
### domain
|
||
|
||
• **domain**: *[EIP712Object](#class-eip712object)*
|
||
|
||
*Defined in [types/src/index.ts:748](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L748)*
|
||
|
||
___
|
||
|
||
### message
|
||
|
||
• **message**: *[EIP712Object](#class-eip712object)*
|
||
|
||
*Defined in [types/src/index.ts:749](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L749)*
|
||
|
||
___
|
||
|
||
### primaryType
|
||
|
||
• **primaryType**: *string*
|
||
|
||
*Defined in [types/src/index.ts:750](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L750)*
|
||
|
||
___
|
||
|
||
### types
|
||
|
||
• **types**: *[EIP712Types](#class-eip712types)*
|
||
|
||
*Defined in [types/src/index.ts:747](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L747)*
|
||
|
||
<hr />
|
||
|
||
# Interface: EIP712Types
|
||
|
||
|
||
## Hierarchy
|
||
|
||
* **ElementType**
|
||
|
||
|
||
## Properties
|
||
|
||
### name
|
||
|
||
• **name**: *string*
|
||
|
||
*Defined in [types/src/index.ts:686](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L686)*
|
||
|
||
___
|
||
|
||
### typeDocType
|
||
|
||
• **typeDocType**: *[TypeDocTypes](#enumeration-typedoctypes)*
|
||
|
||
*Defined in [types/src/index.ts:687](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L687)*
|
||
|
||
<hr />
|
||
|
||
# Interface: ERC1155AssetData
|
||
|
||
|
||
## Properties
|
||
|
||
### assetProxyId
|
||
|
||
• **assetProxyId**: *string*
|
||
|
||
*Defined in [types/src/index.ts:183](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L183)*
|
||
|
||
___
|
||
|
||
### callbackData
|
||
|
||
• **callbackData**: *string*
|
||
|
||
*Defined in [types/src/index.ts:187](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L187)*
|
||
|
||
___
|
||
|
||
### tokenAddress
|
||
|
||
• **tokenAddress**: *string*
|
||
|
||
*Defined in [types/src/index.ts:184](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L184)*
|
||
|
||
___
|
||
|
||
### tokenIds
|
||
|
||
• **tokenIds**: *`BigNumber`[]*
|
||
|
||
*Defined in [types/src/index.ts:185](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L185)*
|
||
|
||
___
|
||
|
||
### tokenValues
|
||
|
||
• **tokenValues**: *`BigNumber`[]*
|
||
|
||
*Defined in [types/src/index.ts:186](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L186)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
# Interface: ERC20AssetData
|
||
|
||
|
||
## Properties
|
||
|
||
### assetProxyId
|
||
|
||
• **assetProxyId**: *string*
|
||
|
||
*Defined in [types/src/index.ts:172](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L172)*
|
||
|
||
___
|
||
|
||
### tokenAddress
|
||
|
||
• **tokenAddress**: *string*
|
||
|
||
*Defined in [types/src/index.ts:173](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L173)*
|
||
|
||
<hr />
|
||
|
||
# Interface: ERC721AssetData
|
||
|
||
|
||
## Properties
|
||
|
||
### assetProxyId
|
||
|
||
• **assetProxyId**: *string*
|
||
|
||
*Defined in [types/src/index.ts:177](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L177)*
|
||
|
||
___
|
||
|
||
### tokenAddress
|
||
|
||
• **tokenAddress**: *string*
|
||
|
||
*Defined in [types/src/index.ts:178](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L178)*
|
||
|
||
___
|
||
|
||
### tokenId
|
||
|
||
• **tokenId**: *`BigNumber`*
|
||
|
||
*Defined in [types/src/index.ts:179](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L179)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: MultiAssetData
|
||
|
||
|
||
## Properties
|
||
|
||
### amounts
|
||
|
||
• **amounts**: *`BigNumber`[]*
|
||
|
||
*Defined in [types/src/index.ts:208](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L208)*
|
||
|
||
___
|
||
|
||
### assetProxyId
|
||
|
||
• **assetProxyId**: *string*
|
||
|
||
*Defined in [types/src/index.ts:207](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L207)*
|
||
|
||
___
|
||
|
||
### nestedAssetData
|
||
|
||
• **nestedAssetData**: *string[]*
|
||
|
||
*Defined in [types/src/index.ts:209](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L209)*
|
||
|
||
<hr />
|
||
|
||
# Interface: MultiAssetDataWithRecursiveDecoding
|
||
|
||
|
||
## Properties
|
||
|
||
### amounts
|
||
|
||
• **amounts**: *`BigNumber`[]*
|
||
|
||
*Defined in [types/src/index.ts:214](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L214)*
|
||
|
||
___
|
||
|
||
### assetProxyId
|
||
|
||
• **assetProxyId**: *string*
|
||
|
||
*Defined in [types/src/index.ts:213](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L213)*
|
||
|
||
___
|
||
|
||
### nestedAssetData
|
||
|
||
• **nestedAssetData**: *[SingleAssetData](#singleassetdata)[]*
|
||
|
||
*Defined in [types/src/index.ts:215](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L215)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: SignedOrder
|
||
|
||
|
||
## Properties
|
||
|
||
### chainId
|
||
|
||
• **chainId**: *number*
|
||
|
||
*Inherited from [Order](#interface-order).[chainId](#chainid)*
|
||
|
||
*Defined in [types/src/index.ts:14](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L14)*
|
||
|
||
___
|
||
|
||
### exchangeAddress
|
||
|
||
• **exchangeAddress**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[exchangeAddress](#exchangeaddress)*
|
||
|
||
*Defined in [types/src/index.ts:15](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L15)*
|
||
|
||
___
|
||
|
||
### expirationTimeSeconds
|
||
|
||
• **expirationTimeSeconds**: *`BigNumber`*
|
||
|
||
*Inherited from [Order](#interface-order).[expirationTimeSeconds](#expirationtimeseconds)*
|
||
|
||
*Defined in [types/src/index.ts:24](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L24)*
|
||
|
||
___
|
||
|
||
### feeRecipientAddress
|
||
|
||
• **feeRecipientAddress**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[feeRecipientAddress](#feerecipientaddress)*
|
||
|
||
*Defined in [types/src/index.ts:18](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L18)*
|
||
|
||
___
|
||
|
||
### makerAddress
|
||
|
||
• **makerAddress**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[makerAddress](#makeraddress)*
|
||
|
||
*Defined in [types/src/index.ts:16](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L16)*
|
||
|
||
___
|
||
|
||
### makerAssetAmount
|
||
|
||
• **makerAssetAmount**: *`BigNumber`*
|
||
|
||
*Inherited from [Order](#interface-order).[makerAssetAmount](#makerassetamount)*
|
||
|
||
*Defined in [types/src/index.ts:20](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L20)*
|
||
|
||
___
|
||
|
||
### makerAssetData
|
||
|
||
• **makerAssetData**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[makerAssetData](#makerassetdata)*
|
||
|
||
*Defined in [types/src/index.ts:26](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L26)*
|
||
|
||
___
|
||
|
||
### makerFee
|
||
|
||
• **makerFee**: *`BigNumber`*
|
||
|
||
*Inherited from [Order](#interface-order).[makerFee](#makerfee)*
|
||
|
||
*Defined in [types/src/index.ts:22](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L22)*
|
||
|
||
___
|
||
|
||
### makerFeeAssetData
|
||
|
||
• **makerFeeAssetData**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[makerFeeAssetData](#makerfeeassetdata)*
|
||
|
||
*Defined in [types/src/index.ts:28](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L28)*
|
||
|
||
___
|
||
|
||
### salt
|
||
|
||
• **salt**: *`BigNumber`*
|
||
|
||
*Inherited from [Order](#interface-order).[salt](#salt)*
|
||
|
||
*Defined in [types/src/index.ts:25](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L25)*
|
||
|
||
___
|
||
|
||
### senderAddress
|
||
|
||
• **senderAddress**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[senderAddress](#senderaddress)*
|
||
|
||
*Defined in [types/src/index.ts:19](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L19)*
|
||
|
||
___
|
||
|
||
### signature
|
||
|
||
• **signature**: *string*
|
||
|
||
*Defined in [types/src/index.ts:33](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L33)*
|
||
|
||
___
|
||
|
||
### takerAddress
|
||
|
||
• **takerAddress**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[takerAddress](#takeraddress)*
|
||
|
||
*Defined in [types/src/index.ts:17](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L17)*
|
||
|
||
___
|
||
|
||
### takerAssetAmount
|
||
|
||
• **takerAssetAmount**: *`BigNumber`*
|
||
|
||
*Inherited from [Order](#interface-order).[takerAssetAmount](#takerassetamount)*
|
||
|
||
*Defined in [types/src/index.ts:21](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L21)*
|
||
|
||
___
|
||
|
||
### takerAssetData
|
||
|
||
• **takerAssetData**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[takerAssetData](#takerassetdata)*
|
||
|
||
*Defined in [types/src/index.ts:27](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L27)*
|
||
|
||
___
|
||
|
||
### takerFee
|
||
|
||
• **takerFee**: *`BigNumber`*
|
||
|
||
*Inherited from [Order](#interface-order).[takerFee](#takerfee)*
|
||
|
||
*Defined in [types/src/index.ts:23](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L23)*
|
||
|
||
___
|
||
|
||
### takerFeeAssetData
|
||
|
||
• **takerFeeAssetData**: *string*
|
||
|
||
*Inherited from [Order](#interface-order).[takerFeeAssetData](#takerfeeassetdata)*
|
||
|
||
*Defined in [types/src/index.ts:29](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L29)*
|
||
|
||
<hr />
|
||
|
||
# Interface: SignedZeroExTransaction
|
||
|
||
|
||
## Properties
|
||
|
||
### data
|
||
|
||
• **data**: *string*
|
||
|
||
*Inherited from [ZeroExTransaction](#interface-zeroextransaction).[data](#data)*
|
||
|
||
*Defined in [types/src/index.ts:49](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L49)*
|
||
|
||
___
|
||
|
||
### domain
|
||
|
||
• **domain**: *[EIP712DomainWithDefaultSchema](#class-eip712domainwithdefaultschema)*
|
||
|
||
*Inherited from [ZeroExTransaction](#interface-zeroextransaction).[domain](#domain)*
|
||
|
||
*Defined in [types/src/index.ts:50](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L50)*
|
||
|
||
___
|
||
|
||
### expirationTimeSeconds
|
||
|
||
• **expirationTimeSeconds**: *`BigNumber`*
|
||
|
||
*Inherited from [ZeroExTransaction](#interface-zeroextransaction).[expirationTimeSeconds](#expirationtimeseconds)*
|
||
|
||
*Defined in [types/src/index.ts:46](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L46)*
|
||
|
||
___
|
||
|
||
### gasPrice
|
||
|
||
• **gasPrice**: *`BigNumber`*
|
||
|
||
*Inherited from [ZeroExTransaction](#interface-zeroextransaction).[gasPrice](#gasprice)*
|
||
|
||
*Defined in [types/src/index.ts:47](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L47)*
|
||
|
||
___
|
||
|
||
### salt
|
||
|
||
• **salt**: *`BigNumber`*
|
||
|
||
*Inherited from [ZeroExTransaction](#interface-zeroextransaction).[salt](#salt)*
|
||
|
||
*Defined in [types/src/index.ts:45](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L45)*
|
||
|
||
___
|
||
|
||
### signature
|
||
|
||
• **signature**: *string*
|
||
|
||
*Defined in [types/src/index.ts:54](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L54)*
|
||
|
||
___
|
||
|
||
### signerAddress
|
||
|
||
• **signerAddress**: *string*
|
||
|
||
*Inherited from [ZeroExTransaction](#interface-zeroextransaction).[signerAddress](#signeraddress)*
|
||
|
||
*Defined in [types/src/index.ts:48](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L48)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: StaticCallAssetData
|
||
|
||
|
||
## Properties
|
||
|
||
### assetProxyId
|
||
|
||
• **assetProxyId**: *string*
|
||
|
||
*Defined in [types/src/index.ts:191](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L191)*
|
||
|
||
___
|
||
|
||
### callResultHash
|
||
|
||
• **callResultHash**: *string*
|
||
|
||
*Defined in [types/src/index.ts:194](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L194)*
|
||
|
||
___
|
||
|
||
### callTarget
|
||
|
||
• **callTarget**: *string*
|
||
|
||
*Defined in [types/src/index.ts:192](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L192)*
|
||
|
||
___
|
||
|
||
### staticCallData
|
||
|
||
• **staticCallData**: *string*
|
||
|
||
*Defined in [types/src/index.ts:193](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L193)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Interface: ValidatorSignature
|
||
|
||
Validator signature components
|
||
|
||
|
||
## Properties
|
||
|
||
### signature
|
||
|
||
• **signature**: *string*
|
||
|
||
*Defined in [types/src/index.ts:71](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L71)*
|
||
|
||
___
|
||
|
||
### validatorAddress
|
||
|
||
• **validatorAddress**: *string*
|
||
|
||
*Defined in [types/src/index.ts:70](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L70)*
|
||
|
||
<hr />
|
||
|
||
# Interface: ZeroExTransaction
|
||
|
||
ZeroExTransaction for use with 0x Exchange executeTransaction
|
||
|
||
|
||
## Properties
|
||
|
||
### data
|
||
|
||
• **data**: *string*
|
||
|
||
*Defined in [types/src/index.ts:49](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L49)*
|
||
|
||
___
|
||
|
||
### domain
|
||
|
||
• **domain**: *[EIP712DomainWithDefaultSchema](#class-eip712domainwithdefaultschema)*
|
||
|
||
*Defined in [types/src/index.ts:50](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L50)*
|
||
|
||
___
|
||
|
||
### expirationTimeSeconds
|
||
|
||
• **expirationTimeSeconds**: *`BigNumber`*
|
||
|
||
*Defined in [types/src/index.ts:46](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L46)*
|
||
|
||
___
|
||
|
||
### gasPrice
|
||
|
||
• **gasPrice**: *`BigNumber`*
|
||
|
||
*Defined in [types/src/index.ts:47](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L47)*
|
||
|
||
___
|
||
|
||
### salt
|
||
|
||
• **salt**: *`BigNumber`*
|
||
|
||
*Defined in [types/src/index.ts:45](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L45)*
|
||
|
||
___
|
||
|
||
### signerAddress
|
||
|
||
• **signerAddress**: *string*
|
||
|
||
*Defined in [types/src/index.ts:48](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L48)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Type aliases
|
||
|
||
|
||
|
||
### AssetData
|
||
|
||
Ƭ **AssetData**: *[SingleAssetData](_types_src_index_.md#singleassetdata) | [MultiAssetData](#interface-multiassetdata) | [MultiAssetDataWithRecursiveDecoding](#interface-multiassetdatawithrecursivedecoding)*
|
||
|
||
*Defined in [types/src/index.ts:224](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L224)*
|
||
|
||
___
|
||
|
||
|
||
|
||
|
||
|
||
### EIP712ObjectValue
|
||
|
||
Ƭ **EIP712ObjectValue**: *string | number | [EIP712Object](#interface-eip712object)*
|
||
|
||
*Defined in [types/src/index.ts:740](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L740)*
|
||
|
||
___
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### SingleAssetData
|
||
|
||
Ƭ **SingleAssetData**: *[ERC20AssetData](#interface-erc20assetdata) | [ERC721AssetData](#interface-erc721assetdata) | [ERC1155AssetData](#interface-erc1155assetdata) | [StaticCallAssetData](#interface-staticcallassetdata)*
|
||
|
||
*Defined in [types/src/index.ts:204](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/types/src/index.ts#L204)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Type aliases
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### EIP1193Event
|
||
|
||
Ƭ **EIP1193Event**: *"accountsChanged" | "networkChanged" | "close" | "connect" | "notification"*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:70](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L70)*
|
||
|
||
Interface for providers that conform to EIP 1193
|
||
Source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md
|
||
|
||
___
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### JSONRPCErrorCallback
|
||
|
||
Ƭ **JSONRPCErrorCallback**: *function*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:3](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L3)*
|
||
|
||
#### Type declaration:
|
||
|
||
▸ (`err`: `Error` | null, `result?`: [JSONRPCResponsePayload](#interface-jsonrpcresponsepayload)): *void*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`err` | `Error` \| null |
|
||
`result?` | [JSONRPCResponsePayload](#interface-jsonrpcresponsepayload) |
|
||
|
||
___
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
### SupportedProvider
|
||
|
||
Ƭ **SupportedProvider**: *[Web3JsProvider](_ethereum_types_src_index_.md#web3jsprovider) | [GanacheProvider](#interface-ganacheprovider) | [EIP1193Provider](#interface-eip1193provider) | [ZeroExProvider](#interface-zeroexprovider)*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:9](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L9)*
|
||
|
||
Do not create your own provider. Use an existing provider from a Web3 or ProviderEngine library
|
||
Read more about Providers in the guides section of the 0x docs.
|
||
|
||
___
|
||
|
||
|
||
|
||
|
||
|
||
### Web3JsProvider
|
||
|
||
Ƭ **Web3JsProvider**: *[Web3JsV1Provider](#interface-web3jsv1provider) | [Web3JsV2Provider](#interface-web3jsv2provider) | [Web3JsV3Provider](#interface-web3jsv3provider)*
|
||
|
||
*Defined in [ethereum-types/src/index.ts:11](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/ethereum-types/src/index.ts#L11)*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Object literals
|
||
|
||
### `Const` assetDataUtils
|
||
|
||
#### ▪ **assetDataUtils**: *object*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:23](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L23)*
|
||
|
||
#### assertIsERC1155AssetData
|
||
|
||
▸ **assertIsERC1155AssetData**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:397](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L397)*
|
||
|
||
Throws if the assetData is not ERC1155.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
#### assertIsERC20AssetData
|
||
|
||
▸ **assertIsERC20AssetData**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:353](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L353)*
|
||
|
||
Throws if the length or assetProxyId are invalid for the ERC20Proxy.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
#### assertIsERC721AssetData
|
||
|
||
▸ **assertIsERC721AssetData**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:375](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L375)*
|
||
|
||
Throws if the length or assetProxyId are invalid for the ERC721Proxy.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
#### assertIsMultiAssetData
|
||
|
||
▸ **assertIsMultiAssetData**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:419](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L419)*
|
||
|
||
Throws if the length or assetProxyId are invalid for the MultiAssetProxy.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
#### assertIsStaticCallAssetData
|
||
|
||
▸ **assertIsStaticCallAssetData**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:441](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L441)*
|
||
|
||
Throws if the assetData is not StaticCallData.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
#### assertWordAlignedAssetData
|
||
|
||
▸ **assertWordAlignedAssetData**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:463](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L463)*
|
||
|
||
Throws if the assetData is not padded to 32 bytes.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
#### decodeAssetDataOrThrow
|
||
|
||
▸ **decodeAssetDataOrThrow**(`assetData`: string): *[SingleAssetData](#singleassetdata) | `MultiAssetData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:502](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L502)*
|
||
|
||
Decode any assetData into its corresponding assetData object
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *[SingleAssetData](#singleassetdata) | `MultiAssetData`*
|
||
|
||
Either a ERC20, ERC721, ERC1155, or MultiAsset assetData object
|
||
|
||
#### decodeAssetProxyId
|
||
|
||
▸ **decodeAssetProxyId**(`assetData`: string): *`AssetProxyId`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:294](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L294)*
|
||
|
||
Decode and return the assetProxyId from the assetData
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`AssetProxyId`*
|
||
|
||
The assetProxyId
|
||
|
||
#### decodeDutchAuctionData
|
||
|
||
▸ **decodeDutchAuctionData**(`dutchAuctionData`: string): *`DutchAuctionData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:263](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L263)*
|
||
|
||
Dutch auction details are encoded with the asset data for a 0x order. This function decodes a hex
|
||
encoded assetData string, containing information both about the asset being traded and the
|
||
dutch auction.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`dutchAuctionData` | string | Hex encoded assetData string for the asset being auctioned. |
|
||
|
||
**Returns:** *`DutchAuctionData`*
|
||
|
||
An object containing the auction asset, auction begin time and auction begin amount.
|
||
|
||
#### decodeERC1155AssetData
|
||
|
||
▸ **decodeERC1155AssetData**(`assetData`: string): *`ERC1155AssetData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:107](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L107)*
|
||
|
||
Decodes an ERC1155 assetData hex string into its corresponding ERC1155 components.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`ERC1155AssetData`*
|
||
|
||
An object containing the decoded tokenAddress, tokenIds, tokenValues, callbackData & assetProxyId
|
||
|
||
#### decodeERC20AssetData
|
||
|
||
▸ **decodeERC20AssetData**(`assetData`: string): *`ERC20AssetData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:41](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L41)*
|
||
|
||
Decodes an ERC20 assetData hex string into its corresponding ERC20 tokenAddress & assetProxyId
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`ERC20AssetData`*
|
||
|
||
An object containing the decoded tokenAddress & assetProxyId
|
||
|
||
#### decodeERC721AssetData
|
||
|
||
▸ **decodeERC721AssetData**(`assetData`: string): *`ERC721AssetData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:70](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L70)*
|
||
|
||
Decodes an ERC721 assetData hex string into its corresponding ERC721 tokenAddress, tokenId & assetProxyId
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`ERC721AssetData`*
|
||
|
||
An object containing the decoded tokenAddress, tokenId & assetProxyId
|
||
|
||
#### decodeMultiAssetData
|
||
|
||
▸ **decodeMultiAssetData**(`assetData`: string): *`MultiAssetData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:149](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L149)*
|
||
|
||
Decodes a MultiAsset assetData hex string into its corresponding amounts and nestedAssetData
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`MultiAssetData`*
|
||
|
||
An object containing the decoded amounts and nestedAssetData
|
||
|
||
#### decodeMultiAssetDataRecursively
|
||
|
||
▸ **decodeMultiAssetDataRecursively**(`assetData`: string): *`MultiAssetDataWithRecursiveDecoding`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:175](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L175)*
|
||
|
||
Decodes a MultiAsset assetData hex string into its corresponding amounts and decoded nestedAssetData elements (all nested elements are flattened)
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`MultiAssetDataWithRecursiveDecoding`*
|
||
|
||
An object containing the decoded amounts and nestedAssetData
|
||
|
||
#### decodeStaticCallAssetData
|
||
|
||
▸ **decodeStaticCallAssetData**(`assetData`: string): *`StaticCallAssetData`*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:225](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L225)*
|
||
|
||
Decoded StaticCall assetData into its corresponding callTarget, staticCallData, and expected callResultHash
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string to decode |
|
||
|
||
**Returns:** *`StaticCallAssetData`*
|
||
|
||
An object containing the decoded callTarget, staticCallData, and expected callResultHash
|
||
|
||
#### encodeDutchAuctionAssetData
|
||
|
||
▸ **encodeDutchAuctionAssetData**(`assetData`: string, `beginTimeSeconds`: `BigNumber`, `beginAmount`: `BigNumber`): *string*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:245](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L245)*
|
||
|
||
Dutch auction details are encoded with the asset data for a 0x order. This function produces a hex
|
||
encoded assetData string, containing information both about the asset being traded and the
|
||
dutch auction; which is usable in the makerAssetData or takerAssetData fields in a 0x order.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string for the asset being auctioned. |
|
||
`beginTimeSeconds` | `BigNumber` | Begin time of the dutch auction. |
|
||
`beginAmount` | `BigNumber` | Starting amount being sold in the dutch auction. |
|
||
|
||
**Returns:** *string*
|
||
|
||
The hex encoded assetData string.
|
||
|
||
#### encodeERC1155AssetData
|
||
|
||
▸ **encodeERC1155AssetData**(`tokenAddress`: string, `tokenIds`: `BigNumber`[], `tokenValues`: `BigNumber`[], `callbackData`: string): *string*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:91](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L91)*
|
||
|
||
Encodes a set of ERC1155 assets into an assetData string, usable in the makerAssetData or
|
||
takerAssetData fields of a 0x order.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`tokenAddress` | string | The token address of the ERC1155 contract |
|
||
`tokenIds` | `BigNumber`[] | The Id's of the ERC1155 tokens to transfer |
|
||
`tokenValues` | `BigNumber`[] | The values of each respective token Id to transfer |
|
||
`callbackData` | string | The data forwarded to a receiver, if receiver is a contract. |
|
||
|
||
**Returns:** *string*
|
||
|
||
The hex encoded assetData string
|
||
|
||
#### encodeERC20AssetData
|
||
|
||
▸ **encodeERC20AssetData**(`tokenAddress`: string): *string*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:30](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L30)*
|
||
|
||
Encodes an ERC20 token address into a hex encoded assetData string, usable in the makerAssetData or
|
||
takerAssetData fields in a 0x order.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`tokenAddress` | string | The ERC20 token address to encode |
|
||
|
||
**Returns:** *string*
|
||
|
||
The hex encoded assetData string
|
||
|
||
#### encodeERC721AssetData
|
||
|
||
▸ **encodeERC721AssetData**(`tokenAddress`: string, `tokenId`: `BigNumber`): *string*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:59](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L59)*
|
||
|
||
Encodes an ERC721 token address into a hex encoded assetData string, usable in the makerAssetData or
|
||
takerAssetData fields in a 0x order.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`tokenAddress` | string | The ERC721 token address to encode |
|
||
`tokenId` | `BigNumber` | The ERC721 tokenId to encode |
|
||
|
||
**Returns:** *string*
|
||
|
||
The hex encoded assetData string
|
||
|
||
#### encodeMultiAssetData
|
||
|
||
▸ **encodeMultiAssetData**(`amounts`: `BigNumber`[], `nestedAssetData`: string[]): *string*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:130](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L130)*
|
||
|
||
Encodes assetData for multiple AssetProxies into a single hex encoded assetData string, usable in the makerAssetData or
|
||
takerAssetData fields in a 0x order.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`amounts` | `BigNumber`[] | Amounts of each asset that correspond to a single unit within an order. |
|
||
`nestedAssetData` | string[] | assetData strings that correspond to a valid assetProxyId. |
|
||
|
||
**Returns:** *string*
|
||
|
||
The hex encoded assetData string
|
||
|
||
#### encodeStaticCallAssetData
|
||
|
||
▸ **encodeStaticCallAssetData**(`callTarget`: string, `staticCallData`: string, `callResultHash`: string): *string*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:214](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L214)*
|
||
|
||
Encodes StaticCallProxy data into an assetData hex string
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`callTarget` | string | Address of contract to call from StaticCallProxy |
|
||
`staticCallData` | string | The function data that will be called on the callTarget contract |
|
||
`callResultHash` | string | The keccak256 hash of the ABI encoded expected output of the static call |
|
||
|
||
**Returns:** *string*
|
||
|
||
The hex encoded assetData string
|
||
|
||
#### isERC1155AssetData
|
||
|
||
▸ **isERC1155AssetData**(`decodedAssetData`: [SingleAssetData](#singleassetdata) | `MultiAssetData`): *boolean*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:332](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L332)*
|
||
|
||
Checks if the decoded asset data is valid ERC1155 data
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`decodedAssetData` | [SingleAssetData](#singleassetdata) \| `MultiAssetData` | The decoded asset data to check |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### isERC20AssetData
|
||
|
||
▸ **isERC20AssetData**(`decodedAssetData`: [SingleAssetData](#singleassetdata) | `MultiAssetData`): *boolean*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:318](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L318)*
|
||
|
||
Checks if the decoded asset data is valid ERC20 data
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`decodedAssetData` | [SingleAssetData](#singleassetdata) \| `MultiAssetData` | The decoded asset data to check |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### isERC721AssetData
|
||
|
||
▸ **isERC721AssetData**(`decodedAssetData`: [SingleAssetData](#singleassetdata) | `MultiAssetData`): *boolean*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:325](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L325)*
|
||
|
||
Checks if the decoded asset data is valid ERC721 data
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`decodedAssetData` | [SingleAssetData](#singleassetdata) \| `MultiAssetData` | The decoded asset data to check |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### isMultiAssetData
|
||
|
||
▸ **isMultiAssetData**(`decodedAssetData`: [SingleAssetData](#singleassetdata) | `MultiAssetData`): *boolean*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:339](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L339)*
|
||
|
||
Checks if the decoded asset data is valid MultiAsset data
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`decodedAssetData` | [SingleAssetData](#singleassetdata) \| `MultiAssetData` | The decoded asset data to check |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### isStaticCallAssetData
|
||
|
||
▸ **isStaticCallAssetData**(`decodedAssetData`: [SingleAssetData](#singleassetdata) | `MultiAssetData`): *boolean*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:346](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L346)*
|
||
|
||
Checks if the decoded asset data is valid StaticCall data
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`decodedAssetData` | [SingleAssetData](#singleassetdata) \| `MultiAssetData` | The decoded asset data to check |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### validateAssetDataOrThrow
|
||
|
||
▸ **validateAssetDataOrThrow**(`assetData`: string): *void*
|
||
|
||
*Defined in [order-utils/src/asset_data_utils.ts:475](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/asset_data_utils.ts#L475)*
|
||
|
||
Throws if the length or assetProxyId are invalid for the corresponding AssetProxy.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`assetData` | string | Hex encoded assetData string |
|
||
|
||
**Returns:** *void*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Object literals
|
||
|
||
#### `Const` eip712Utils
|
||
|
||
#### ▪ **eip712Utils**: *object*
|
||
|
||
*Defined in [order-utils/src/eip712_utils.ts:18](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/eip712_utils.ts#L18)*
|
||
|
||
#### createCoordinatorApprovalTypedDataAsync
|
||
|
||
▸ **createCoordinatorApprovalTypedDataAsync**(`transaction`: `SignedZeroExTransaction`, `verifyingContract`: string, `txOrigin`: string): *`Promise<EIP712TypedData>`*
|
||
|
||
*Defined in [order-utils/src/eip712_utils.ts:104](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/eip712_utils.ts#L104)*
|
||
|
||
Creates an Coordinator typedData EIP712TypedData object for use with the Coordinator extension contract
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`transaction` | `SignedZeroExTransaction` | A 0x transaction |
|
||
`verifyingContract` | string | The coordinator extension contract address that will be verifying the typedData |
|
||
`txOrigin` | string | The desired `tx.origin` that should be able to submit an Ethereum txn involving this 0x transaction |
|
||
|
||
**Returns:** *`Promise<EIP712TypedData>`*
|
||
|
||
A typed data object
|
||
|
||
#### createOrderTypedData
|
||
|
||
▸ **createOrderTypedData**(`order`: `Order`): *`EIP712TypedData`*
|
||
|
||
*Defined in [order-utils/src/eip712_utils.ts:57](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/eip712_utils.ts#L57)*
|
||
|
||
Creates an Order EIP712TypedData object for use with signTypedData.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`order` | `Order` |
|
||
|
||
**Returns:** *`EIP712TypedData`*
|
||
|
||
A typed data object
|
||
|
||
#### createTypedData
|
||
|
||
▸ **createTypedData**(`primaryType`: string, `types`: `EIP712Types`, `message`: `EIP712Object`, `domain`: `EIP712DomainWithDefaultSchema`): *`EIP712TypedData`*
|
||
|
||
*Defined in [order-utils/src/eip712_utils.ts:27](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/eip712_utils.ts#L27)*
|
||
|
||
Creates a EIP712TypedData object specific to the 0x protocol for use with signTypedData.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`primaryType` | string | The primary type found in message |
|
||
`types` | `EIP712Types` | The additional types for the data in message |
|
||
`message` | `EIP712Object` | The contents of the message |
|
||
`domain` | `EIP712DomainWithDefaultSchema` | Domain containing a name (optional), version (optional), and verifying contract address |
|
||
|
||
**Returns:** *`EIP712TypedData`*
|
||
|
||
A typed data object
|
||
|
||
#### createZeroExTransactionTypedData
|
||
|
||
▸ **createZeroExTransactionTypedData**(`zeroExTransaction`: `ZeroExTransaction`): *`EIP712TypedData`*
|
||
|
||
*Defined in [order-utils/src/eip712_utils.ts:82](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/eip712_utils.ts#L82)*
|
||
|
||
Creates an ExecuteTransaction EIP712TypedData object for use with signTypedData and
|
||
0x Exchange executeTransaction.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`zeroExTransaction` | `ZeroExTransaction` | the 0x transaction |
|
||
|
||
**Returns:** *`EIP712TypedData`*
|
||
|
||
A typed data object
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Object literals
|
||
|
||
#### `Const` marketUtils
|
||
|
||
#### ▪ **marketUtils**: *object*
|
||
|
||
*Defined in [order-utils/src/market_utils.ts:17](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/market_utils.ts#L17)*
|
||
|
||
#### findFeeOrdersThatCoverFeesForTargetOrders
|
||
|
||
▸ **findFeeOrdersThatCoverFeesForTargetOrders**<**T**>(`orders`: `T`[], `feeOrders`: `T`[], `opts?`: [FindFeeOrdersThatCoverFeesForTargetOrdersOpts](#interface-findfeeordersthatcoverfeesfortargetordersopts)): *[FeeOrdersAndRemainingFeeAmount](#interface-feeordersandremainingfeeamount)‹*`T`*›*
|
||
|
||
*Defined in [order-utils/src/market_utils.ts:64](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/market_utils.ts#L64)*
|
||
|
||
Takes an array of orders and an array of feeOrders. Returns a subset of the feeOrders that has enough ZRX
|
||
in order to fill the takerFees required by orders plus a slippageBufferAmount.
|
||
Iterates from first feeOrder to last. Sort the feeOrders by ascending rate in order to get the subset of
|
||
feeOrders that will cost the least ETH.
|
||
|
||
**Type parameters:**
|
||
|
||
▪ **T**: *`Order`*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`orders` | `T`[] | An array of objects that extend the Order interface. All orders should specify ZRX as the makerAsset and WETH as the takerAsset. |
|
||
`feeOrders` | `T`[] | An array of objects that extend the Order interface. All orders should specify ZRX as the makerAsset and WETH as the takerAsset. |
|
||
`opts?` | [FindFeeOrdersThatCoverFeesForTargetOrdersOpts](#interface-findfeeordersthatcoverfeesfortargetordersopts) | Optional arguments this function accepts. |
|
||
|
||
**Returns:** *[FeeOrdersAndRemainingFeeAmount](#interface-feeordersandremainingfeeamount)‹*`T`*›*
|
||
|
||
Resulting orders and remaining fee amount that could not be covered by the input.
|
||
|
||
#### findOrdersThatCoverMakerAssetFillAmount
|
||
|
||
▸ **findOrdersThatCoverMakerAssetFillAmount**<**T**>(`orders`: `T`[], `makerAssetFillAmount`: `BigNumber`, `opts?`: [FindOrdersThatCoverMakerAssetFillAmountOpts](#interface-findordersthatcovermakerassetfillamountopts)): *[OrdersAndRemainingMakerFillAmount](#interface-ordersandremainingmakerfillamount)‹*`T`*›*
|
||
|
||
*Defined in [order-utils/src/market_utils.ts:40](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/market_utils.ts#L40)*
|
||
|
||
Takes an array of orders and returns a subset of those orders that has enough makerAssetAmount
|
||
in order to fill the input makerAssetFillAmount plus slippageBufferAmount. Iterates from first order to last order.
|
||
Sort the input by ascending rate in order to get the subset of orders that will cost the least ETH.
|
||
|
||
**Type parameters:**
|
||
|
||
▪ **T**: *`Order`*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`orders` | `T`[] | An array of objects that extend the Order interface. All orders should specify the same makerAsset. All orders should specify WETH as the takerAsset. |
|
||
`makerAssetFillAmount` | `BigNumber` | The amount of makerAsset desired to be filled. |
|
||
`opts?` | [FindOrdersThatCoverMakerAssetFillAmountOpts](#interface-findordersthatcovermakerassetfillamountopts) | Optional arguments this function accepts. |
|
||
|
||
**Returns:** *[OrdersAndRemainingMakerFillAmount](#interface-ordersandremainingmakerfillamount)‹*`T`*›*
|
||
|
||
Resulting orders and remaining fill amount that could not be covered by the input.
|
||
|
||
#### findOrdersThatCoverTakerAssetFillAmount
|
||
|
||
▸ **findOrdersThatCoverTakerAssetFillAmount**<**T**>(`orders`: `T`[], `takerAssetFillAmount`: `BigNumber`, `opts?`: [FindOrdersThatCoverTakerAssetFillAmountOpts](#interface-findordersthatcovertakerassetfillamountopts)): *[OrdersAndRemainingTakerFillAmount](#interface-ordersandremainingtakerfillamount)‹*`T`*›*
|
||
|
||
*Defined in [order-utils/src/market_utils.ts:18](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/market_utils.ts#L18)*
|
||
|
||
**Type parameters:**
|
||
|
||
▪ **T**: *`Order`*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`orders` | `T`[] |
|
||
`takerAssetFillAmount` | `BigNumber` |
|
||
`opts?` | [FindOrdersThatCoverTakerAssetFillAmountOpts](#interface-findordersthatcovertakerassetfillamountopts) |
|
||
|
||
**Returns:** *[OrdersAndRemainingTakerFillAmount](#interface-ordersandremainingtakerfillamount)‹*`T`*›*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Object literals
|
||
|
||
#### `Const` orderCalculationUtils
|
||
|
||
#### ▪ **orderCalculationUtils**: *object*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:6](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L6)*
|
||
|
||
#### getMakerFeeAmount
|
||
|
||
▸ **getMakerFeeAmount**(`order`: `Order`, `makerFillAmount`: `BigNumber`): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:75](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L75)*
|
||
|
||
Given an amount of maker asset, calculate the fee amount required for the maker
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order |
|
||
`makerFillAmount` | `BigNumber` | the amount of maker asset |
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
#### getMakerFillAmount
|
||
|
||
▸ **getMakerFillAmount**(`order`: `Order`, `takerFillAmount`: `BigNumber`): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:36](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L36)*
|
||
|
||
Given an amount of taker asset, calculate the the amount of maker asset
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order |
|
||
`takerFillAmount` | `BigNumber` | - |
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
#### getTakerFeeAmount
|
||
|
||
▸ **getTakerFeeAmount**(`order`: `Order`, `takerFillAmount`: `BigNumber`): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:62](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L62)*
|
||
|
||
Given an amount of taker asset, calculate the fee amount required for the taker
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order |
|
||
`takerFillAmount` | `BigNumber` | the amount of taker asset |
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
#### getTakerFillAmount
|
||
|
||
▸ **getTakerFillAmount**(`order`: `Order`, `makerFillAmount`: `BigNumber`): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:49](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L49)*
|
||
|
||
Given an amount of maker asset, calculate the equivalent amount in taker asset
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order |
|
||
`makerFillAmount` | `BigNumber` | the amount of maker asset |
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
#### getTakerFillAmountForFeeOrder
|
||
|
||
▸ **getTakerFillAmountForFeeOrder**(`order`: `Order`, `makerFillAmount`: `BigNumber`): *[`BigNumber`, `BigNumber`]*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:89](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L89)*
|
||
|
||
Given a desired amount of ZRX from a fee order, calculate the amount of taker asset required to fill.
|
||
Also calculate how much ZRX needs to be purchased in order to fill the desired amount plus the taker fee amount
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order |
|
||
`makerFillAmount` | `BigNumber` | the amount of maker asset |
|
||
|
||
**Returns:** *[`BigNumber`, `BigNumber`]*
|
||
|
||
#### isOpenOrder
|
||
|
||
▸ **isOpenOrder**(`order`: `Order`): *boolean*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:28](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L28)*
|
||
|
||
Determines if the order is open and fillable by any taker.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### isOrderExpired
|
||
|
||
▸ **isOrderExpired**(`order`: `Order`): *boolean*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:11](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L11)*
|
||
|
||
Determines if the order is expired given the current time
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order for expiry calculation |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
#### willOrderExpire
|
||
|
||
▸ **willOrderExpire**(`order`: `Order`, `secondsFromNow`: number): *boolean*
|
||
|
||
*Defined in [order-utils/src/order_calculation_utils.ts:19](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/order_calculation_utils.ts#L19)*
|
||
|
||
Calculates if the order will expire in the future.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`order` | `Order` | The order for expiry calculation |
|
||
`secondsFromNow` | number | The amount of seconds from current time |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Object literals
|
||
|
||
#### `Const` rateUtils
|
||
|
||
#### ▪ **rateUtils**: *object*
|
||
|
||
*Defined in [order-utils/src/rate_utils.ts:8](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/rate_utils.ts#L8)*
|
||
|
||
#### getFeeAdjustedRateOfFeeOrder
|
||
|
||
▸ **getFeeAdjustedRateOfFeeOrder**(`feeOrder`: `Order`): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/rate_utils.ts:36](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/rate_utils.ts#L36)*
|
||
|
||
Takes a fee order (makerAssetData corresponds to ZRX and takerAssetData corresponds to WETH) and calculates
|
||
the fee adjusted rate (WETH/ZRX) by dividing the takerAssetAmount by the makerAmount minus the takerFee
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`feeOrder` | `Order` | An object that conforms to the order interface |
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
The rate (WETH/ZRX) of the fee order adjusted for fees
|
||
|
||
#### getFeeAdjustedRateOfOrder
|
||
|
||
▸ **getFeeAdjustedRateOfOrder**(`order`: `Order`, `feeRate`: `BigNumber`): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/rate_utils.ts:18](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/rate_utils.ts#L18)*
|
||
|
||
Takes an order and calculates the fee adjusted rate (takerAsset/makerAsset) by calculating how much takerAsset
|
||
is required to cover the fees (feeRate * takerFee), adding the takerAssetAmount and dividing by makerAssetAmount
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Default | Description |
|
||
------ | ------ | ------ | ------ |
|
||
`order` | `Order` | - | An object that conforms to the order interface |
|
||
`feeRate` | `BigNumber` | constants.ZERO_AMOUNT | The market rate of ZRX denominated in takerAssetAmount (ex. feeRate is 0.1 takerAsset/ZRX if it takes 1 unit of takerAsset to buy 10 ZRX) Defaults to 0 |
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
The rate (takerAsset/makerAsset) of the order adjusted for fees
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Functions
|
||
|
||
#### generatePseudoRandomSalt
|
||
|
||
▸ **generatePseudoRandomSalt**(): *`BigNumber`*
|
||
|
||
*Defined in [order-utils/src/salt.ts:9](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/salt.ts#L9)*
|
||
|
||
Generates a pseudo-random 256-bit salt.
|
||
The salt can be included in a 0x order, ensuring that the order generates a unique orderHash
|
||
and will not collide with other outstanding orders that are identical in all other parameters.
|
||
|
||
**Returns:** *`BigNumber`*
|
||
|
||
A pseudo-random 256-bit number that can be used as a salt.
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Functions
|
||
|
||
#### isValidECSignature
|
||
|
||
▸ **isValidECSignature**(`data`: string, `signature`: `ECSignature`, `signerAddress`: string): *boolean*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:353](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L353)*
|
||
|
||
Checks if the supplied elliptic curve signature corresponds to signing `data` with
|
||
the private key corresponding to `signerAddress`
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`data` | string | The hex encoded data signed by the supplied signature. |
|
||
`signature` | `ECSignature` | An object containing the elliptic curve signature parameters. |
|
||
`signerAddress` | string | The hex encoded address that signed the data, producing the supplied signature. |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
Whether the ECSignature is valid.
|
||
|
||
___
|
||
|
||
### parseSignatureHexAsVRS
|
||
|
||
▸ **parseSignatureHexAsVRS**(`signatureHex`: string): *`ECSignature`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:311](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L311)*
|
||
|
||
Parses a signature hex string, which is assumed to be in the VRS format.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`signatureHex` | string |
|
||
|
||
**Returns:** *`ECSignature`*
|
||
|
||
## Object literals
|
||
|
||
### `Const` signatureUtils
|
||
|
||
#### ▪ **signatureUtils**: *object*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:26](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L26)*
|
||
|
||
#### addSignedMessagePrefix
|
||
|
||
▸ **addSignedMessagePrefix**(`message`: string): *string*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:284](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L284)*
|
||
|
||
Adds the relevant prefix to the message being signed.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`message` | string | Message to sign |
|
||
|
||
**Returns:** *string*
|
||
|
||
Prefixed message
|
||
|
||
#### convertECSignatureToSignatureHex
|
||
|
||
▸ **convertECSignatureToSignatureHex**(`ecSignature`: `ECSignature`): *string*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:258](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L258)*
|
||
|
||
Combines ECSignature with V,R,S and the EthSign signature type for use in 0x protocol
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`ecSignature` | `ECSignature` | The ECSignature of the signed data |
|
||
|
||
**Returns:** *string*
|
||
|
||
Hex encoded string of signature (v,r,s) with Signature Type
|
||
|
||
#### convertToSignatureWithType
|
||
|
||
▸ **convertToSignatureWithType**(`signature`: string, `signatureType`: `SignatureType`): *string*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:274](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L274)*
|
||
|
||
Combines the signature proof and the Signature Type.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`signature` | string | The hex encoded signature proof |
|
||
`signatureType` | `SignatureType` | The signature type, i.e EthSign, Wallet etc. |
|
||
|
||
**Returns:** *string*
|
||
|
||
Hex encoded string of signature proof with Signature Type
|
||
|
||
#### ecSignHashAsync
|
||
|
||
▸ **ecSignHashAsync**(`supportedProvider`: [SupportedProvider](#supportedprovider), `msgHash`: string, `signerAddress`: string): *`Promise<string>`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:209](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L209)*
|
||
|
||
Signs a hash using `eth_sign` and returns its elliptic curve signature and signature type.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`supportedProvider` | [SupportedProvider](#supportedprovider) | Web3 provider to use for all JSON RPC requests |
|
||
`msgHash` | string | Hex encoded message to sign. |
|
||
`signerAddress` | string | The hex encoded Ethereum address you wish to sign it with. This address must be available via the supplied Provider. |
|
||
|
||
**Returns:** *`Promise<string>`*
|
||
|
||
A hex encoded string containing the Elliptic curve signature generated by signing the msgHash and the Signature Type.
|
||
|
||
#### ecSignOrderAsync
|
||
|
||
▸ **ecSignOrderAsync**(`supportedProvider`: [SupportedProvider](#supportedprovider), `order`: `Order`, `signerAddress`: string): *`Promise<SignedOrder>`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:36](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L36)*
|
||
|
||
Signs an order and returns a SignedOrder. First `eth_signTypedData` is requested
|
||
then a fallback to `eth_sign` if not available on the supplied provider.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`supportedProvider` | [SupportedProvider](#supportedprovider) | Web3 provider to use for all JSON RPC requests |
|
||
`order` | `Order` | The Order to sign. |
|
||
`signerAddress` | string | The hex encoded Ethereum address you wish to sign it with. This address must be available via the supplied Provider. |
|
||
|
||
**Returns:** *`Promise<SignedOrder>`*
|
||
|
||
A SignedOrder containing the order and Elliptic curve signature with Signature Type.
|
||
|
||
#### ecSignTransactionAsync
|
||
|
||
▸ **ecSignTransactionAsync**(`supportedProvider`: [SupportedProvider](#supportedprovider), `transaction`: `ZeroExTransaction`, `signerAddress`: string): *`Promise<SignedZeroExTransaction>`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:117](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L117)*
|
||
|
||
Signs a transaction and returns a SignedZeroExTransaction. First `eth_signTypedData` is requested
|
||
then a fallback to `eth_sign` if not available on the supplied provider.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`supportedProvider` | [SupportedProvider](#supportedprovider) | Web3 provider to use for all JSON RPC requests |
|
||
`transaction` | `ZeroExTransaction` | The ZeroExTransaction to sign. |
|
||
`signerAddress` | string | The hex encoded Ethereum address you wish to sign it with. This address must be available via the supplied Provider. |
|
||
|
||
**Returns:** *`Promise<SignedZeroExTransaction>`*
|
||
|
||
A SignedTransaction containing the order and Elliptic curve signature with Signature Type.
|
||
|
||
#### ecSignTypedDataOrderAsync
|
||
|
||
▸ **ecSignTypedDataOrderAsync**(`supportedProvider`: [SupportedProvider](#supportedprovider), `order`: `Order`, `signerAddress`: string): *`Promise<SignedOrder>`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:73](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L73)*
|
||
|
||
Signs an order using `eth_signTypedData` and returns a SignedOrder.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`supportedProvider` | [SupportedProvider](#supportedprovider) | Web3 provider to use for all JSON RPC requests |
|
||
`order` | `Order` | The Order to sign. |
|
||
`signerAddress` | string | The hex encoded Ethereum address you wish to sign it with. This address must be available via the supplied Provider. |
|
||
|
||
**Returns:** *`Promise<SignedOrder>`*
|
||
|
||
A SignedOrder containing the order and Elliptic curve signature with Signature Type.
|
||
|
||
#### ecSignTypedDataTransactionAsync
|
||
|
||
▸ **ecSignTypedDataTransactionAsync**(`supportedProvider`: [SupportedProvider](#supportedprovider), `transaction`: `ZeroExTransaction`, `signerAddress`: string): *`Promise<SignedZeroExTransaction>`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:166](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L166)*
|
||
|
||
Signs a ZeroExTransaction using `eth_signTypedData` and returns a SignedZeroExTransaction.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`supportedProvider` | [SupportedProvider](#supportedprovider) | Web3 provider to use for all JSON RPC requests |
|
||
`transaction` | `ZeroExTransaction` | The ZeroEx Transaction to sign. |
|
||
`signerAddress` | string | The hex encoded Ethereum address you wish to sign it with. This address must be available via the supplied Provider. |
|
||
|
||
**Returns:** *`Promise<SignedZeroExTransaction>`*
|
||
|
||
A SignedZeroExTransaction containing the ZeroExTransaction and Elliptic curve signature with Signature Type.
|
||
|
||
#### parseValidatorSignature
|
||
|
||
▸ **parseValidatorSignature**(`signature`: string): *`ValidatorSignature`*
|
||
|
||
*Defined in [order-utils/src/signature_utils.ts:296](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/signature_utils.ts#L296)*
|
||
|
||
Parse a hex-encoded Validator signature into validator address and signature components
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`signature` | string | A hex encoded Validator 0x Protocol signature |
|
||
|
||
**Returns:** *`ValidatorSignature`*
|
||
|
||
A ValidatorSignature with validatorAddress and signature parameters
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
|
||
## Object literals
|
||
|
||
#### `Const` sortingUtils
|
||
|
||
#### ▪ **sortingUtils**: *object*
|
||
|
||
*Defined in [order-utils/src/sorting_utils.ts:10](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/sorting_utils.ts#L10)*
|
||
|
||
#### sortFeeOrdersByFeeAdjustedRate
|
||
|
||
▸ **sortFeeOrdersByFeeAdjustedRate**<**T**>(`feeOrders`: `T`[]): *`T`[]*
|
||
|
||
*Defined in [order-utils/src/sorting_utils.ts:35](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/sorting_utils.ts#L35)*
|
||
|
||
Takes an array of fee orders (makerAssetData corresponds to ZRX and takerAssetData corresponds to WETH)
|
||
and sorts them by rate in ascending order (best rate first). Adjusts the rate according to the takerFee.
|
||
|
||
**Type parameters:**
|
||
|
||
▪ **T**: *`Order`*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Description |
|
||
------ | ------ | ------ |
|
||
`feeOrders` | `T`[] | An array of objects that extend the Order interface. All orders should specify ZRX as the makerAsset and WETH as the takerAsset. |
|
||
|
||
**Returns:** *`T`[]*
|
||
|
||
The input orders sorted by rate in ascending order
|
||
|
||
#### sortOrdersByFeeAdjustedRate
|
||
|
||
▸ **sortOrdersByFeeAdjustedRate**<**T**>(`orders`: `T`[], `feeRate`: `BigNumber`): *`T`[]*
|
||
|
||
*Defined in [order-utils/src/sorting_utils.ts:21](https://github.com/0xProject/0x-monorepo/blob/34538f2ce/packages/order-utils/src/sorting_utils.ts#L21)*
|
||
|
||
Takes an array of orders and sorts them by takerAsset/makerAsset rate in ascending order (best rate first).
|
||
Adjusts the rate of each order according to the feeRate and takerFee for that order.
|
||
|
||
**Type parameters:**
|
||
|
||
▪ **T**: *`Order`*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type | Default | Description |
|
||
------ | ------ | ------ | ------ |
|
||
`orders` | `T`[] | - | An array of objects that extend the Order interface. All orders should specify ZRX as the makerAsset and WETH as the takerAsset. |
|
||
`feeRate` | `BigNumber` | constants.ZERO_AMOUNT | The market rate of ZRX denominated in takerAssetAmount (ex. feeRate is 0.1 takerAsset/ZRX if it takes 1 unit of takerAsset to buy 10 ZRX) Defaults to 0 |
|
||
|
||
**Returns:** *`T`[]*
|
||
|
||
The input orders sorted by rate in ascending order
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
<hr />
|
||
|