@imtbl/sdk 1.24.0-alpha.3 → 1.24.0-alpha.5
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/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout.js +20 -25
- package/dist/config.js +1 -1
- package/dist/index.browser.js +17 -17
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +23 -28
- package/dist/index.js +23 -28
- package/dist/orderbook.js +17 -22
- package/dist/passport.js +4 -4
- package/dist/x.js +3 -3
- package/package.json +1 -1
package/dist/checkout.js
CHANGED
|
@@ -140,7 +140,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
143
|
-
const SDK_VERSION$1 = '1.24.0-alpha.
|
|
143
|
+
const SDK_VERSION$1 = '1.24.0-alpha.5';
|
|
144
144
|
const getReferrer$1 = () => {
|
|
145
145
|
if (isNode$1()) {
|
|
146
146
|
return '';
|
|
@@ -17551,7 +17551,7 @@ const flattenProperties = (properties) => {
|
|
|
17551
17551
|
};
|
|
17552
17552
|
|
|
17553
17553
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
17554
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
17554
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
17555
17555
|
const getReferrer = () => {
|
|
17556
17556
|
if (isNode()) {
|
|
17557
17557
|
return '';
|
|
@@ -22648,12 +22648,12 @@ function getOrderComponentsFromMessage(orderMessage) {
|
|
|
22648
22648
|
// This can always be overwritten by the user signing the transaction
|
|
22649
22649
|
function prepareTransaction(transactionMethods,
|
|
22650
22650
|
// chainId is required for EIP155
|
|
22651
|
-
chainId) {
|
|
22651
|
+
chainId, callerAddress) {
|
|
22652
22652
|
return async () => {
|
|
22653
22653
|
const v6ContractTransaction = await transactionMethods.buildTransaction();
|
|
22654
22654
|
const v5PopulatedTransaction = {
|
|
22655
22655
|
to: v6ContractTransaction.to,
|
|
22656
|
-
from:
|
|
22656
|
+
from: callerAddress,
|
|
22657
22657
|
type: v6ContractTransaction.type,
|
|
22658
22658
|
maxFeePerGas: v6ContractTransaction.maxFeePerGas
|
|
22659
22659
|
? BigNumber$1.from(v6ContractTransaction.maxFeePerGas)
|
|
@@ -22661,8 +22661,6 @@ chainId) {
|
|
|
22661
22661
|
maxPriorityFeePerGas: v6ContractTransaction.maxPriorityFeePerGas
|
|
22662
22662
|
? BigNumber$1.from(v6ContractTransaction.maxPriorityFeePerGas)
|
|
22663
22663
|
: undefined,
|
|
22664
|
-
accessList: v6ContractTransaction.accessList,
|
|
22665
|
-
customData: v6ContractTransaction.customData,
|
|
22666
22664
|
value: v6ContractTransaction.value ? BigNumber$1.from(v6ContractTransaction.value) : undefined,
|
|
22667
22665
|
data: v6ContractTransaction.data,
|
|
22668
22666
|
nonce: v6ContractTransaction.nonce,
|
|
@@ -22764,7 +22762,7 @@ class Seaport {
|
|
|
22764
22762
|
listingActions.push({
|
|
22765
22763
|
type: ActionType.TRANSACTION,
|
|
22766
22764
|
purpose: TransactionPurpose.APPROVAL,
|
|
22767
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
22765
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, offerer),
|
|
22768
22766
|
});
|
|
22769
22767
|
}
|
|
22770
22768
|
const createAction = seaportActions.find((action) => action.type === 'create');
|
|
@@ -22792,15 +22790,12 @@ class Seaport {
|
|
|
22792
22790
|
const address = await signer.getAddress();
|
|
22793
22791
|
// eslint-disable-next-line no-console
|
|
22794
22792
|
console.log(`Fulfiller address: ${address}`);
|
|
22795
|
-
// eslint-disable-next-line no-console
|
|
22796
|
-
console.log(`Provided address: ${account}`);
|
|
22797
22793
|
}
|
|
22798
22794
|
catch {
|
|
22799
22795
|
// no-op - this is for temporary debugging
|
|
22800
22796
|
}
|
|
22801
22797
|
const { actions: seaportActions } = await seaportLib.fulfillOrders({
|
|
22802
22798
|
accountAddress: account,
|
|
22803
|
-
recipientAddress: account,
|
|
22804
22799
|
fulfillOrderDetails: [
|
|
22805
22800
|
{
|
|
22806
22801
|
order: {
|
|
@@ -22817,7 +22812,7 @@ class Seaport {
|
|
|
22817
22812
|
if (approvalAction) {
|
|
22818
22813
|
fulfillmentActions.push({
|
|
22819
22814
|
type: ActionType.TRANSACTION,
|
|
22820
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
22815
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
22821
22816
|
purpose: TransactionPurpose.APPROVAL,
|
|
22822
22817
|
});
|
|
22823
22818
|
}
|
|
@@ -22827,7 +22822,7 @@ class Seaport {
|
|
|
22827
22822
|
}
|
|
22828
22823
|
fulfillmentActions.push({
|
|
22829
22824
|
type: ActionType.TRANSACTION,
|
|
22830
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
22825
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
22831
22826
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
22832
22827
|
});
|
|
22833
22828
|
return {
|
|
@@ -22857,7 +22852,7 @@ class Seaport {
|
|
|
22857
22852
|
if (approvalAction) {
|
|
22858
22853
|
fulfillmentActions.push({
|
|
22859
22854
|
type: ActionType.TRANSACTION,
|
|
22860
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
22855
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
22861
22856
|
purpose: TransactionPurpose.APPROVAL,
|
|
22862
22857
|
});
|
|
22863
22858
|
}
|
|
@@ -22867,7 +22862,7 @@ class Seaport {
|
|
|
22867
22862
|
}
|
|
22868
22863
|
fulfillmentActions.push({
|
|
22869
22864
|
type: ActionType.TRANSACTION,
|
|
22870
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
22865
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
22871
22866
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
22872
22867
|
});
|
|
22873
22868
|
return {
|
|
@@ -22884,7 +22879,7 @@ class Seaport {
|
|
|
22884
22879
|
const cancellationTransaction = await seaportLib.cancelOrders(orderComponents, account);
|
|
22885
22880
|
return {
|
|
22886
22881
|
type: ActionType.TRANSACTION,
|
|
22887
|
-
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId),
|
|
22882
|
+
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId, account),
|
|
22888
22883
|
purpose: TransactionPurpose.CANCEL,
|
|
22889
22884
|
};
|
|
22890
22885
|
}
|
|
@@ -23103,6 +23098,14 @@ function getOrderbookConfig(environment) {
|
|
|
23103
23098
|
// safely instantiate a V6 provider for the V5 provider URL.
|
|
23104
23099
|
function convertToV6Provider(provider) {
|
|
23105
23100
|
const overwrittenProvider = new JsonRpcProvider(provider.connection.url);
|
|
23101
|
+
// eslint-disable-next-line no-console
|
|
23102
|
+
console.log('Overwritten provider getSigner method');
|
|
23103
|
+
// eslint-disable-next-line no-console
|
|
23104
|
+
console.log(overwrittenProvider.getSigner);
|
|
23105
|
+
// eslint-disable-next-line no-console
|
|
23106
|
+
console.log('Overwriter provider methods');
|
|
23107
|
+
// eslint-disable-next-line no-console
|
|
23108
|
+
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
23106
23109
|
// Need to override the getSigner method to mimic V5 behaviour
|
|
23107
23110
|
overwrittenProvider.getSigner = async function getSigner(address) {
|
|
23108
23111
|
if (address == null) {
|
|
@@ -23123,14 +23126,6 @@ function convertToV6Provider(provider) {
|
|
|
23123
23126
|
// provider has access to the address as a signer.
|
|
23124
23127
|
return new JsonRpcSigner(this, address);
|
|
23125
23128
|
};
|
|
23126
|
-
// eslint-disable-next-line no-console
|
|
23127
|
-
console.log('Overwritten provider getSigner method');
|
|
23128
|
-
// eslint-disable-next-line no-console
|
|
23129
|
-
console.log(overwrittenProvider.getSigner);
|
|
23130
|
-
// eslint-disable-next-line no-console
|
|
23131
|
-
console.log('Overwriter provider methods');
|
|
23132
|
-
// eslint-disable-next-line no-console
|
|
23133
|
-
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
23134
23129
|
return overwrittenProvider;
|
|
23135
23130
|
}
|
|
23136
23131
|
class SeaportLibFactory {
|
|
@@ -28278,7 +28273,7 @@ class APIError extends Error {
|
|
|
28278
28273
|
|
|
28279
28274
|
/* eslint-disable implicit-arrow-linebreak */
|
|
28280
28275
|
const defaultHeaders = {
|
|
28281
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha.
|
|
28276
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha.5',
|
|
28282
28277
|
};
|
|
28283
28278
|
/**
|
|
28284
28279
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -29709,7 +29704,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
29709
29704
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
29710
29705
|
};
|
|
29711
29706
|
|
|
29712
|
-
const SDK_VERSION_MARKER = '1.24.0-alpha.
|
|
29707
|
+
const SDK_VERSION_MARKER = '1.24.0-alpha.5';
|
|
29713
29708
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
29714
29709
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
29715
29710
|
|
package/dist/config.js
CHANGED
|
@@ -128,7 +128,7 @@ const flattenProperties = (properties) => {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
131
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
131
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
132
132
|
const getReferrer = () => {
|
|
133
133
|
if (isNode()) {
|
|
134
134
|
return '';
|