@avail-project/ca-common 1.0.0-dev.4 → 1.0.0-rc.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/cjs/data/chaindata.js +0 -4
- package/dist/cjs/index.js +1 -4
- package/dist/cjs/rff/rff.js +0 -34
- package/dist/cjs/vaultcontracts/vaultcontracts.js +4 -4
- package/dist/esm/data/chaindata.js +0 -4
- package/dist/esm/index.js +11 -12
- package/dist/esm/rff/rff.js +0 -34
- package/dist/esm/vaultcontracts/vaultcontracts.js +4 -4
- package/dist/types/index.d.ts +11 -12
- package/dist/types/rff/rff.d.ts +0 -3
- package/package.json +1 -7
- package/dist/cjs/fuelcontracts/ArcanaVault.js +0 -2407
- package/dist/cjs/fuelcontracts/ArcanaVaultFactory.js +0 -18
- package/dist/cjs/fuelcontracts/common.js +0 -3
- package/dist/cjs/fuelcontracts/index.js +0 -6
- package/dist/cjs/rff/fuel.js +0 -27
- package/dist/esm/fuelcontracts/ArcanaVault.js +0 -2402
- package/dist/esm/fuelcontracts/ArcanaVaultFactory.js +0 -14
- package/dist/esm/fuelcontracts/common.js +0 -2
- package/dist/esm/fuelcontracts/index.js +0 -3
- package/dist/esm/rff/fuel.js +0 -23
- package/dist/types/fuelcontracts/ArcanaVault.d.ts +0 -448
- package/dist/types/fuelcontracts/ArcanaVaultFactory.d.ts +0 -8
- package/dist/types/fuelcontracts/common.d.ts +0 -23
- package/dist/types/fuelcontracts/index.d.ts +0 -3
- package/dist/types/rff/fuel.d.ts +0 -4
|
@@ -694,8 +694,4 @@ exports.RPCURLMap = new chainid_1.ChainIDKeyedMap([
|
|
|
694
694
|
new chainid_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 10143),
|
|
695
695
|
"https://lb.drpc.org/monad-testnet/Am5nENoJmEuovqui8_LMxzp4ChJzW7kR8JfPrqRhf0fE",
|
|
696
696
|
],
|
|
697
|
-
[
|
|
698
|
-
new chainid_1.OmniversalChainID(definition_1.Universe.FUEL, 9889),
|
|
699
|
-
"https://omniscient-fittest-pallet.fuel-mainnet.quiknode.pro/3193ae52f2522af1a4357a482e475e019857f02b/v1/graphql",
|
|
700
|
-
],
|
|
701
697
|
]);
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GrpcWebImpl = exports.GrpcWebError = exports.QueryClientImpl =
|
|
3
|
+
exports.GrpcWebImpl = exports.GrpcWebError = exports.QueryClientImpl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
require("./_polyfill");
|
|
6
|
-
var fuelcontracts_1 = require("./fuelcontracts");
|
|
7
|
-
Object.defineProperty(exports, "ArcanaVault", { enumerable: true, get: function () { return fuelcontracts_1.ArcanaVault; } });
|
|
8
|
-
Object.defineProperty(exports, "ArcanaVaultFactory", { enumerable: true, get: function () { return fuelcontracts_1.ArcanaVaultFactory; } });
|
|
9
6
|
tslib_1.__exportStar(require("./proto/definition"), exports);
|
|
10
7
|
var grpc_1 = require("./proto/grpc");
|
|
11
8
|
Object.defineProperty(exports, "QueryClientImpl", { enumerable: true, get: function () { return grpc_1.QueryClientImpl; } });
|
package/dist/cjs/rff/rff.js
CHANGED
|
@@ -2,13 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OmniversalRFF = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
|
-
const fuels_1 = require("fuels");
|
|
6
5
|
const data_1 = require("../data");
|
|
7
|
-
const fuel_1 = require("./fuel");
|
|
8
6
|
class OmniversalRFF {
|
|
9
7
|
protobufRFF;
|
|
10
8
|
evmRFF;
|
|
11
|
-
fuelRFF;
|
|
12
9
|
constructor(protobufRFF) {
|
|
13
10
|
this.protobufRFF = protobufRFF;
|
|
14
11
|
}
|
|
@@ -38,37 +35,6 @@ class OmniversalRFF {
|
|
|
38
35
|
}
|
|
39
36
|
return this.evmRFF;
|
|
40
37
|
}
|
|
41
|
-
asFuelRFF() {
|
|
42
|
-
if (this.fuelRFF == null) {
|
|
43
|
-
this.fuelRFF = {
|
|
44
|
-
sources: this.protobufRFF.sources.map((s) => ({
|
|
45
|
-
universe: (0, fuel_1.protobufUniverseToFuelUniverse)(s.universe),
|
|
46
|
-
chain_id: new fuels_1.BN(s.chainID),
|
|
47
|
-
asset_id: {
|
|
48
|
-
bits: (0, data_1.ezPadTo32Hex)(s.contractAddress),
|
|
49
|
-
},
|
|
50
|
-
value: new fuels_1.BN(s.value),
|
|
51
|
-
})),
|
|
52
|
-
destination_chain_id: new fuels_1.BN(this.protobufRFF.destinationChainID),
|
|
53
|
-
destination_universe: (0, fuel_1.protobufUniverseToFuelUniverse)(this.protobufRFF.destinationUniverse),
|
|
54
|
-
destinations: this.protobufRFF.destinations.map((d) => ({
|
|
55
|
-
asset_id: {
|
|
56
|
-
bits: (0, data_1.ezPadTo32Hex)(d.contractAddress),
|
|
57
|
-
},
|
|
58
|
-
value: new fuels_1.BN(d.value),
|
|
59
|
-
})),
|
|
60
|
-
expiry: new fuels_1.BN(this.protobufRFF.expiry.toBytesBE()),
|
|
61
|
-
nonce: new fuels_1.BN(this.protobufRFF.nonce),
|
|
62
|
-
parties: this.protobufRFF.signatureData.map((sd) => ({
|
|
63
|
-
universe: (0, fuel_1.protobufUniverseToFuelUniverse)(sd.universe),
|
|
64
|
-
address: {
|
|
65
|
-
bits: (0, data_1.ezPadTo32Hex)(sd.address),
|
|
66
|
-
},
|
|
67
|
-
})),
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return this.fuelRFF;
|
|
71
|
-
}
|
|
72
38
|
asProtobufRFF() {
|
|
73
39
|
return this.protobufRFF;
|
|
74
40
|
}
|
|
@@ -126,10 +126,6 @@ const dataSets = new Map([
|
|
|
126
126
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 143),
|
|
127
127
|
"0xC0DED5d7F424276c821AF21F68E1e663bC671C3D",
|
|
128
128
|
],
|
|
129
|
-
[
|
|
130
|
-
new data_1.OmniversalChainID(definition_1.Universe.FUEL, 9889),
|
|
131
|
-
"0xe2586f908cc885e630cec6d8d578f02e6ade66983baf23f82757be502127dfb1",
|
|
132
|
-
],
|
|
133
129
|
],
|
|
134
130
|
],
|
|
135
131
|
[
|
|
@@ -175,6 +171,10 @@ const dataSets = new Map([
|
|
|
175
171
|
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 56),
|
|
176
172
|
"0x00000000ac0ac9d69424fA5Adc291D75Ec4a0F11",
|
|
177
173
|
],
|
|
174
|
+
[
|
|
175
|
+
new data_1.OmniversalChainID(definition_1.Universe.ETHEREUM, 143),
|
|
176
|
+
"0x00000000ac0ac9d69424fA5Adc291D75Ec4a0F11",
|
|
177
|
+
],
|
|
178
178
|
],
|
|
179
179
|
],
|
|
180
180
|
]);
|
|
@@ -691,8 +691,4 @@ export const RPCURLMap = new ChainIDKeyedMap([
|
|
|
691
691
|
new OmniversalChainID(Universe.ETHEREUM, 10143),
|
|
692
692
|
"https://lb.drpc.org/monad-testnet/Am5nENoJmEuovqui8_LMxzp4ChJzW7kR8JfPrqRhf0fE",
|
|
693
693
|
],
|
|
694
|
-
[
|
|
695
|
-
new OmniversalChainID(Universe.FUEL, 9889),
|
|
696
|
-
"https://omniscient-fittest-pallet.fuel-mainnet.quiknode.pro/3193ae52f2522af1a4357a482e475e019857f02b/v1/graphql",
|
|
697
|
-
],
|
|
698
694
|
]);
|
package/dist/esm/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import "./_polyfill";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from './evmabi';
|
|
2
|
+
export * from "./proto/definition";
|
|
3
|
+
export { QueryClientImpl, GrpcWebError, GrpcWebImpl, } from "./proto/grpc";
|
|
4
|
+
export * from "./data";
|
|
5
|
+
export * from "./vaultcontracts";
|
|
6
|
+
export * from "./permitutils";
|
|
7
|
+
export * from "./xcs";
|
|
8
|
+
export * from "./cosmos";
|
|
9
|
+
export * from "./rff/rff";
|
|
10
|
+
export * from "./types";
|
|
11
|
+
export * from "./balances/ub-api";
|
|
12
|
+
export * from "./evmabi";
|
package/dist/esm/rff/rff.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { bytesToBigInt } from "viem";
|
|
2
|
-
import { BN } from "fuels";
|
|
3
2
|
import { ezPadTo32Hex } from "../data";
|
|
4
|
-
import { protobufUniverseToFuelUniverse } from "./fuel";
|
|
5
3
|
export class OmniversalRFF {
|
|
6
4
|
protobufRFF;
|
|
7
5
|
evmRFF;
|
|
8
|
-
fuelRFF;
|
|
9
6
|
constructor(protobufRFF) {
|
|
10
7
|
this.protobufRFF = protobufRFF;
|
|
11
8
|
}
|
|
@@ -35,37 +32,6 @@ export class OmniversalRFF {
|
|
|
35
32
|
}
|
|
36
33
|
return this.evmRFF;
|
|
37
34
|
}
|
|
38
|
-
asFuelRFF() {
|
|
39
|
-
if (this.fuelRFF == null) {
|
|
40
|
-
this.fuelRFF = {
|
|
41
|
-
sources: this.protobufRFF.sources.map((s) => ({
|
|
42
|
-
universe: protobufUniverseToFuelUniverse(s.universe),
|
|
43
|
-
chain_id: new BN(s.chainID),
|
|
44
|
-
asset_id: {
|
|
45
|
-
bits: ezPadTo32Hex(s.contractAddress),
|
|
46
|
-
},
|
|
47
|
-
value: new BN(s.value),
|
|
48
|
-
})),
|
|
49
|
-
destination_chain_id: new BN(this.protobufRFF.destinationChainID),
|
|
50
|
-
destination_universe: protobufUniverseToFuelUniverse(this.protobufRFF.destinationUniverse),
|
|
51
|
-
destinations: this.protobufRFF.destinations.map((d) => ({
|
|
52
|
-
asset_id: {
|
|
53
|
-
bits: ezPadTo32Hex(d.contractAddress),
|
|
54
|
-
},
|
|
55
|
-
value: new BN(d.value),
|
|
56
|
-
})),
|
|
57
|
-
expiry: new BN(this.protobufRFF.expiry.toBytesBE()),
|
|
58
|
-
nonce: new BN(this.protobufRFF.nonce),
|
|
59
|
-
parties: this.protobufRFF.signatureData.map((sd) => ({
|
|
60
|
-
universe: protobufUniverseToFuelUniverse(sd.universe),
|
|
61
|
-
address: {
|
|
62
|
-
bits: ezPadTo32Hex(sd.address),
|
|
63
|
-
},
|
|
64
|
-
})),
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
return this.fuelRFF;
|
|
68
|
-
}
|
|
69
35
|
asProtobufRFF() {
|
|
70
36
|
return this.protobufRFF;
|
|
71
37
|
}
|
|
@@ -122,10 +122,6 @@ const dataSets = new Map([
|
|
|
122
122
|
new OmniversalChainID(Universe.ETHEREUM, 143),
|
|
123
123
|
"0xC0DED5d7F424276c821AF21F68E1e663bC671C3D",
|
|
124
124
|
],
|
|
125
|
-
[
|
|
126
|
-
new OmniversalChainID(Universe.FUEL, 9889),
|
|
127
|
-
"0xe2586f908cc885e630cec6d8d578f02e6ade66983baf23f82757be502127dfb1",
|
|
128
|
-
],
|
|
129
125
|
],
|
|
130
126
|
],
|
|
131
127
|
[
|
|
@@ -171,6 +167,10 @@ const dataSets = new Map([
|
|
|
171
167
|
new OmniversalChainID(Universe.ETHEREUM, 56),
|
|
172
168
|
"0x00000000ac0ac9d69424fA5Adc291D75Ec4a0F11",
|
|
173
169
|
],
|
|
170
|
+
[
|
|
171
|
+
new OmniversalChainID(Universe.ETHEREUM, 143),
|
|
172
|
+
"0x00000000ac0ac9d69424fA5Adc291D75Ec4a0F11",
|
|
173
|
+
],
|
|
174
174
|
],
|
|
175
175
|
],
|
|
176
176
|
]);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import "./_polyfill";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from './evmabi';
|
|
2
|
+
export * from "./proto/definition";
|
|
3
|
+
export { QueryClientImpl, Query, GrpcWebError, GrpcWebImpl, } from "./proto/grpc";
|
|
4
|
+
export * from "./data";
|
|
5
|
+
export * from "./vaultcontracts";
|
|
6
|
+
export * from "./permitutils";
|
|
7
|
+
export * from "./xcs";
|
|
8
|
+
export * from "./cosmos";
|
|
9
|
+
export * from "./rff/rff";
|
|
10
|
+
export * from "./types";
|
|
11
|
+
export * from "./balances/ub-api";
|
|
12
|
+
export * from "./evmabi";
|
package/dist/types/rff/rff.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { RequestForFunds } from "../proto/definition";
|
|
2
2
|
import { type EVMRFF } from "../vaultcontracts";
|
|
3
|
-
import { RequestInput as FuelRFF } from "../fuelcontracts/ArcanaVault";
|
|
4
3
|
export declare class OmniversalRFF {
|
|
5
4
|
readonly protobufRFF: RequestForFunds;
|
|
6
5
|
private evmRFF;
|
|
7
|
-
private fuelRFF;
|
|
8
6
|
constructor(protobufRFF: RequestForFunds);
|
|
9
7
|
asEVMRFF(): EVMRFF;
|
|
10
|
-
asFuelRFF(): FuelRFF;
|
|
11
8
|
asProtobufRFF(): RequestForFunds;
|
|
12
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avail-project/ca-common",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
4
|
"description": "common utilities for CA",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
"types": "./dist/types/index.d.ts",
|
|
16
16
|
"require": "./dist/cjs/index.js",
|
|
17
17
|
"import": "./dist/esm/index.js"
|
|
18
|
-
},
|
|
19
|
-
"./fuelcontracts": {
|
|
20
|
-
"types": "./dist/types/fuelcontracts/index.d.ts",
|
|
21
|
-
"require": "./dist/cjs/fuelcontracts/index.js",
|
|
22
|
-
"import": "./dist/esm/fuelcontracts/index.js"
|
|
23
18
|
}
|
|
24
19
|
},
|
|
25
20
|
"scripts": {
|
|
@@ -53,7 +48,6 @@
|
|
|
53
48
|
"@cosmjs/stargate": "^0.34.0",
|
|
54
49
|
"axios": "^1.10.0",
|
|
55
50
|
"decimal.js": "^10.6.0",
|
|
56
|
-
"fuels": "^0.101.1",
|
|
57
51
|
"long": "^5.3.2",
|
|
58
52
|
"viem": "^2.31.7",
|
|
59
53
|
"msgpackr": "^1.11.4"
|