omnipin 2.1.0 → 2.1.1
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/index.js +50 -49
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -776,13 +776,7 @@ function Signature_toHex(signature) {
|
|
|
776
776
|
size: 32
|
|
777
777
|
}), fromNumber(s, {
|
|
778
778
|
size: 32
|
|
779
|
-
}), 'number' == typeof signature.yParity ? fromNumber(
|
|
780
|
-
if (0 === yParity) return 27;
|
|
781
|
-
if (1 === yParity) return 28;
|
|
782
|
-
throw new InvalidYParityError({
|
|
783
|
-
value: yParity
|
|
784
|
-
});
|
|
785
|
-
}(signature.yParity), {
|
|
779
|
+
}), 'number' == typeof signature.yParity ? fromNumber(yParityToV(signature.yParity), {
|
|
786
780
|
size: 1
|
|
787
781
|
}) : '0x');
|
|
788
782
|
}
|
|
@@ -794,6 +788,13 @@ function vToYParity(v) {
|
|
|
794
788
|
value: v
|
|
795
789
|
});
|
|
796
790
|
}
|
|
791
|
+
function yParityToV(yParity) {
|
|
792
|
+
if (0 === yParity) return 27;
|
|
793
|
+
if (1 === yParity) return 28;
|
|
794
|
+
throw new InvalidYParityError({
|
|
795
|
+
value: yParity
|
|
796
|
+
});
|
|
797
|
+
}
|
|
797
798
|
function Value_format(value, decimals = 0) {
|
|
798
799
|
let display = value.toString(), negative = display.startsWith('-');
|
|
799
800
|
negative && (display = display.slice(1));
|
|
@@ -6600,6 +6601,29 @@ class InvalidLabelhashError extends Error {
|
|
|
6600
6601
|
super(`${labelhash}: ${details}`);
|
|
6601
6602
|
}
|
|
6602
6603
|
}
|
|
6604
|
+
let defaultSpinner = {
|
|
6605
|
+
interval: 120,
|
|
6606
|
+
frames: [
|
|
6607
|
+
'⠋',
|
|
6608
|
+
'⠙',
|
|
6609
|
+
'⠹',
|
|
6610
|
+
'⠸',
|
|
6611
|
+
'⠼',
|
|
6612
|
+
'⠴',
|
|
6613
|
+
'⠦',
|
|
6614
|
+
'⠧',
|
|
6615
|
+
'⠇',
|
|
6616
|
+
'⠏'
|
|
6617
|
+
]
|
|
6618
|
+
}, simpleSpinner = {
|
|
6619
|
+
interval: 120,
|
|
6620
|
+
frames: [
|
|
6621
|
+
'-',
|
|
6622
|
+
'\\',
|
|
6623
|
+
'|',
|
|
6624
|
+
'/'
|
|
6625
|
+
]
|
|
6626
|
+
};
|
|
6603
6627
|
class AsciiBar {
|
|
6604
6628
|
formatString = '#spinner #bar #message';
|
|
6605
6629
|
total = 100;
|
|
@@ -6622,10 +6646,7 @@ class AsciiBar {
|
|
|
6622
6646
|
currentSpinnerSymbol = '';
|
|
6623
6647
|
current = 0;
|
|
6624
6648
|
constructor(options){
|
|
6625
|
-
|
|
6626
|
-
for(let opt in options)void 0 !== this[opt] && (this[opt] = options[opt]);
|
|
6627
|
-
'win32' === process.platform && (this.spinner = simpleSpinner), this.enableSpinner && (this.spinnerTimeout = setTimeout(this.updateSpinner, this.spinner.interval));
|
|
6628
|
-
}
|
|
6649
|
+
options && (void 0 !== options.formatString && (this.formatString = options.formatString), void 0 !== options.total && (this.total = options.total), void 0 !== options.startDate && (this.startDate = options.startDate), void 0 !== options.stream && (this.stream = options.stream), void 0 !== options.width && (this.width = options.width), void 0 !== options.doneSymbol && (this.doneSymbol = options.doneSymbol), void 0 !== options.undoneSymbol && (this.undoneSymbol = options.undoneSymbol), void 0 !== options.print && (this.print = options.print), void 0 !== options.start && (this.current = options.start), void 0 !== options.enableSpinner && (this.enableSpinner = options.enableSpinner), void 0 !== options.lastUpdateForTiming && (this.lastUpdateForTiming = options.lastUpdateForTiming), void 0 !== options.autoStop && (this.autoStop = options.autoStop), void 0 !== options.hideCursor && (this.hideCursor = options.hideCursor), 'win32' === process.platform && (this.spinner = simpleSpinner), this.enableSpinner && (this.spinnerTimeout = setTimeout(this.updateSpinner, this.spinner.interval)));
|
|
6629
6650
|
}
|
|
6630
6651
|
renderLine() {
|
|
6631
6652
|
let plusCount = Math.round(this.current / this.total * this.width), minusCount = this.width - plusCount, plusString = '', minusString = '';
|
|
@@ -6663,35 +6684,10 @@ class AsciiBar {
|
|
|
6663
6684
|
}
|
|
6664
6685
|
let colorCodes = {
|
|
6665
6686
|
Reset: '\x1b[0m',
|
|
6666
|
-
|
|
6667
|
-
Blink: '\x1b[5m',
|
|
6668
|
-
Reverse: '\x1b[7m',
|
|
6669
|
-
Hidden: '\x1b[8m',
|
|
6687
|
+
Bright: '\x1b[1m',
|
|
6670
6688
|
Green: '\x1b[32m',
|
|
6671
6689
|
HideCursor: '\x1B[?25l',
|
|
6672
6690
|
ShowCursor: '\x1B[?25h'
|
|
6673
|
-
}, defaultSpinner = {
|
|
6674
|
-
interval: 120,
|
|
6675
|
-
frames: [
|
|
6676
|
-
'⠋',
|
|
6677
|
-
'⠙',
|
|
6678
|
-
'⠹',
|
|
6679
|
-
'⠸',
|
|
6680
|
-
'⠼',
|
|
6681
|
-
'⠴',
|
|
6682
|
-
'⠦',
|
|
6683
|
-
'⠧',
|
|
6684
|
-
'⠇',
|
|
6685
|
-
'⠏'
|
|
6686
|
-
]
|
|
6687
|
-
}, simpleSpinner = {
|
|
6688
|
-
interval: 120,
|
|
6689
|
-
frames: [
|
|
6690
|
-
'-',
|
|
6691
|
-
'\\',
|
|
6692
|
-
'|',
|
|
6693
|
-
'/'
|
|
6694
|
-
]
|
|
6695
6691
|
}, logger = {
|
|
6696
6692
|
start (...args) {
|
|
6697
6693
|
console.log('📦', ...args);
|
|
@@ -8520,6 +8516,7 @@ let createPresignedUrl = async ({ bucketName, apiUrl, file, token })=>{
|
|
|
8520
8516
|
verbose,
|
|
8521
8517
|
name,
|
|
8522
8518
|
car,
|
|
8519
|
+
size: car.size,
|
|
8523
8520
|
token
|
|
8524
8521
|
})).headers.get('x-amz-meta-cid'),
|
|
8525
8522
|
status: 'queued'
|
|
@@ -11275,7 +11272,7 @@ class TipAboveFeeCapError extends BaseError {
|
|
|
11275
11272
|
});
|
|
11276
11273
|
}
|
|
11277
11274
|
}
|
|
11278
|
-
let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = async ({ provider, to, data, from, value = '0x0' })=>toBigInt(await provider.request({
|
|
11275
|
+
let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', SIMULATION_GAS_LIMIT = fromNumber(16777216), estimateGas = async ({ provider, to, data, from, value = '0x0' })=>toBigInt(await provider.request({
|
|
11279
11276
|
method: 'eth_estimateGas',
|
|
11280
11277
|
params: [
|
|
11281
11278
|
{
|
|
@@ -11283,7 +11280,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
11283
11280
|
to,
|
|
11284
11281
|
data,
|
|
11285
11282
|
value,
|
|
11286
|
-
gas:
|
|
11283
|
+
gas: fromNumber(SIMULATION_GAS_LIMIT)
|
|
11287
11284
|
},
|
|
11288
11285
|
'latest'
|
|
11289
11286
|
]
|
|
@@ -11294,7 +11291,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
11294
11291
|
to,
|
|
11295
11292
|
data,
|
|
11296
11293
|
from,
|
|
11297
|
-
gas:
|
|
11294
|
+
gas: fromNumber(SIMULATION_GAS_LIMIT)
|
|
11298
11295
|
},
|
|
11299
11296
|
'latest'
|
|
11300
11297
|
]
|
|
@@ -11530,7 +11527,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
11530
11527
|
calls
|
|
11531
11528
|
]),
|
|
11532
11529
|
to: chain.contracts.multicall3.address,
|
|
11533
|
-
gas:
|
|
11530
|
+
gas: fromNumber(SIMULATION_GAS_LIMIT)
|
|
11534
11531
|
},
|
|
11535
11532
|
'latest'
|
|
11536
11533
|
]
|
|
@@ -11735,7 +11732,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
11735
11732
|
chain
|
|
11736
11733
|
});
|
|
11737
11734
|
if (balance < amount) throw Error(`Not enough USDfc to deposit (need: ${Value_format(amount - balance, 18).slice(0, 5)})`);
|
|
11738
|
-
let { r, s } = await signErc20Permit({
|
|
11735
|
+
let { r, s, yParity } = await signErc20Permit({
|
|
11739
11736
|
privateKey,
|
|
11740
11737
|
address,
|
|
11741
11738
|
amount,
|
|
@@ -11749,7 +11746,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
11749
11746
|
address,
|
|
11750
11747
|
amount,
|
|
11751
11748
|
deadline,
|
|
11752
|
-
27,
|
|
11749
|
+
void 0 !== yParity ? yParityToV(yParity) : 27,
|
|
11753
11750
|
fromNumber(r, {
|
|
11754
11751
|
size: 32
|
|
11755
11752
|
}),
|
|
@@ -12759,7 +12756,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
12759
12756
|
});
|
|
12760
12757
|
verbose && logger.request('POST', res.url, res.status);
|
|
12761
12758
|
let json = await res.json();
|
|
12762
|
-
if (!res.ok) throw new DeployError(lighthouse_providerName, json.error?.message || json.message || 'Unknown error');
|
|
12759
|
+
if (!res.ok) throw new DeployError(lighthouse_providerName, json.error?.message || json.error || json.message || json.details || 'Unknown error');
|
|
12763
12760
|
return {
|
|
12764
12761
|
cid: json.data?.Hash || cid
|
|
12765
12762
|
};
|
|
@@ -12776,7 +12773,7 @@ let serializedType = '0x02', TxEnvelopeEip1559_type = 'eip1559', estimateGas = a
|
|
|
12776
12773
|
});
|
|
12777
12774
|
verbose && logger.request('POST', res.url, res.status);
|
|
12778
12775
|
let json = await res.json();
|
|
12779
|
-
if (!res.ok) throw new DeployError(lighthouse_providerName, json.error.message);
|
|
12776
|
+
if (!res.ok) throw new DeployError(lighthouse_providerName, json.error?.message || json.error || json.message || json.details || 'Unknown error');
|
|
12780
12777
|
return {
|
|
12781
12778
|
cid,
|
|
12782
12779
|
status: 'queued'
|
|
@@ -20159,7 +20156,8 @@ let addr_abi = {
|
|
|
20159
20156
|
namehash(name)
|
|
20160
20157
|
])
|
|
20161
20158
|
]),
|
|
20162
|
-
to: '0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe'
|
|
20159
|
+
to: '0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe',
|
|
20160
|
+
gas: SIMULATION_GAS_LIMIT
|
|
20163
20161
|
},
|
|
20164
20162
|
'latest'
|
|
20165
20163
|
]
|
|
@@ -20216,7 +20214,8 @@ let addr_abi = {
|
|
|
20216
20214
|
data: AbiFunction_encodeData(get_resolver_abi, [
|
|
20217
20215
|
Bytes_toHex(utils_packetToBytes(name))
|
|
20218
20216
|
]),
|
|
20219
|
-
to: '0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe'
|
|
20217
|
+
to: '0xeEeEEEeE14D718C2B47D9923Deab1335E144EeEe',
|
|
20218
|
+
gas: SIMULATION_GAS_LIMIT
|
|
20220
20219
|
},
|
|
20221
20220
|
'latest'
|
|
20222
20221
|
]
|
|
@@ -20323,7 +20322,8 @@ let addr_abi = {
|
|
|
20323
20322
|
zeroAddress,
|
|
20324
20323
|
zeroAddress,
|
|
20325
20324
|
txData.nonce
|
|
20326
|
-
])
|
|
20325
|
+
]),
|
|
20326
|
+
gas: SIMULATION_GAS_LIMIT
|
|
20327
20327
|
},
|
|
20328
20328
|
'latest'
|
|
20329
20329
|
]
|
|
@@ -20698,7 +20698,8 @@ let ENS_DEPLOYER_ROLE = keccak256(Bytes_fromString('ENS_DEPLOYER')), execTransac
|
|
|
20698
20698
|
params: [
|
|
20699
20699
|
{
|
|
20700
20700
|
to: safe,
|
|
20701
|
-
data: AbiFunction_encodeData(getNonce)
|
|
20701
|
+
data: AbiFunction_encodeData(getNonce),
|
|
20702
|
+
gas: SIMULATION_GAS_LIMIT
|
|
20702
20703
|
},
|
|
20703
20704
|
'latest'
|
|
20704
20705
|
]
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnipin",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"author": "v1rtl <hi@v1rtl.site>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/omnipin/omnipin.git"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@biomejs/biome": "^2.
|
|
10
|
+
"@biomejs/biome": "^2.4.5",
|
|
11
11
|
"@ipld/car": "^5.4.2",
|
|
12
12
|
"@ipld/dag-ucan": "^3.4.5",
|
|
13
13
|
"@rslib/core": "^0.19.4",
|