@relay-protocol/settlement-sdk 0.0.89 → 0.0.90

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.d.ts CHANGED
@@ -4,8 +4,9 @@ import { DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaV
4
4
  import { SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId } from "./messages/v2.1/solver-refund";
5
5
  import { SolverFillMessage, SolverFillStatus, getSolverFillMessageId } from "./messages/v2.1/solver-fill";
6
6
  import { ActionType, ExecutionMessage, ExecutionMessageMetadata, getExecutionMessageId, encodeAction, decodeAction } from "./messages/v2.2/execution";
7
- import { VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency } from "./utils";
7
+ import { GenericMappingMessage, getGenericMappingMessageId } from "./messages/v2.2/generic-mapping";
8
8
  import { SubmitWithdrawRequest, DenormalizedSubmitWithdrawRequest, getSubmitWithdrawRequestHash, WithdrawalAddressParams, getWithdrawalAddress, OrderAddressParams, getOrderAddress, normalizePayloadParams } from "./messages/v2.2/withdrawal";
9
+ import { VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency } from "./utils";
9
10
  import { TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, generateAddress, generateTokenId } from "./hub/hub-utils";
10
11
  import type { NetworkConfig, NetworkConfigs, ProtocolContracts } from "./networks";
11
- export { Order, encodeOrderCall, decodeOrderCall, encodeOrderExtraData, decodeOrderExtraData, getOrderId, VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency, DepositoryDepositMessage, getDepositoryDepositMessageId, DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaVmWithdrawal, DecodedSuiVmWithdrawal, DecodedHyperliquidVmWithdrawal, DepositoryWithdrawalMessage, DepositoryWithdrawalStatus, getDepositoryWithdrawalMessageId, encodeWithdrawal, decodeWithdrawal, getDecodedWithdrawalId, getDecodedWithdrawalCurrency, getDecodedWithdrawalAmount, getDecodedWithdrawalRecipient, SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId, SolverFillMessage, SolverFillStatus, getSolverFillMessageId, ExecutionMessage, ExecutionMessageMetadata, ActionType, getExecutionMessageId, encodeAction, decodeAction, SubmitWithdrawRequest, DenormalizedSubmitWithdrawRequest, getSubmitWithdrawRequestHash, WithdrawalAddressParams, getWithdrawalAddress, OrderAddressParams, getOrderAddress, normalizePayloadParams, TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, generateAddress, generateTokenId, NetworkConfigs, ProtocolContracts, NetworkConfig, };
12
+ export { Order, encodeOrderCall, decodeOrderCall, encodeOrderExtraData, decodeOrderExtraData, getOrderId, VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency, DepositoryDepositMessage, getDepositoryDepositMessageId, DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaVmWithdrawal, DecodedSuiVmWithdrawal, DecodedHyperliquidVmWithdrawal, DepositoryWithdrawalMessage, DepositoryWithdrawalStatus, getDepositoryWithdrawalMessageId, encodeWithdrawal, decodeWithdrawal, getDecodedWithdrawalId, getDecodedWithdrawalCurrency, getDecodedWithdrawalAmount, getDecodedWithdrawalRecipient, SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId, SolverFillMessage, SolverFillStatus, getSolverFillMessageId, ExecutionMessage, ExecutionMessageMetadata, ActionType, getExecutionMessageId, encodeAction, decodeAction, GenericMappingMessage, getGenericMappingMessageId, SubmitWithdrawRequest, DenormalizedSubmitWithdrawRequest, getSubmitWithdrawRequestHash, WithdrawalAddressParams, getWithdrawalAddress, OrderAddressParams, getOrderAddress, normalizePayloadParams, TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, generateAddress, generateTokenId, NetworkConfigs, ProtocolContracts, NetworkConfig, };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateTokenId = exports.generateAddress = exports.normalizePayloadParams = exports.getOrderAddress = exports.getWithdrawalAddress = exports.getSubmitWithdrawRequestHash = exports.decodeAction = exports.encodeAction = exports.getExecutionMessageId = exports.ActionType = exports.getSolverFillMessageId = exports.SolverFillStatus = exports.getSolverRefundMessageId = exports.SolverRefundStatus = exports.getDecodedWithdrawalRecipient = exports.getDecodedWithdrawalAmount = exports.getDecodedWithdrawalCurrency = exports.getDecodedWithdrawalId = exports.decodeWithdrawal = exports.encodeWithdrawal = exports.getDepositoryWithdrawalMessageId = exports.DepositoryWithdrawalStatus = exports.getDepositoryDepositMessageId = exports.getVmTypeNativeCurrency = exports.encodeTransactionId = exports.encodeBytes = exports.encodeAddress = exports.decodeTransactionId = exports.decodeAddress = exports.getOrderId = exports.decodeOrderExtraData = exports.encodeOrderExtraData = exports.decodeOrderCall = exports.encodeOrderCall = void 0;
3
+ exports.generateTokenId = exports.generateAddress = exports.normalizePayloadParams = exports.getOrderAddress = exports.getWithdrawalAddress = exports.getSubmitWithdrawRequestHash = exports.getGenericMappingMessageId = exports.decodeAction = exports.encodeAction = exports.getExecutionMessageId = exports.ActionType = exports.getSolverFillMessageId = exports.SolverFillStatus = exports.getSolverRefundMessageId = exports.SolverRefundStatus = exports.getDecodedWithdrawalRecipient = exports.getDecodedWithdrawalAmount = exports.getDecodedWithdrawalCurrency = exports.getDecodedWithdrawalId = exports.decodeWithdrawal = exports.encodeWithdrawal = exports.getDepositoryWithdrawalMessageId = exports.DepositoryWithdrawalStatus = exports.getDepositoryDepositMessageId = exports.getVmTypeNativeCurrency = exports.encodeTransactionId = exports.encodeBytes = exports.encodeAddress = exports.decodeTransactionId = exports.decodeAddress = exports.getOrderId = exports.decodeOrderExtraData = exports.encodeOrderExtraData = exports.decodeOrderCall = exports.encodeOrderCall = void 0;
4
4
  const order_1 = require("./order");
5
5
  Object.defineProperty(exports, "encodeOrderCall", { enumerable: true, get: function () { return order_1.encodeOrderCall; } });
6
6
  Object.defineProperty(exports, "decodeOrderCall", { enumerable: true, get: function () { return order_1.decodeOrderCall; } });
@@ -29,6 +29,13 @@ Object.defineProperty(exports, "ActionType", { enumerable: true, get: function (
29
29
  Object.defineProperty(exports, "getExecutionMessageId", { enumerable: true, get: function () { return execution_1.getExecutionMessageId; } });
30
30
  Object.defineProperty(exports, "encodeAction", { enumerable: true, get: function () { return execution_1.encodeAction; } });
31
31
  Object.defineProperty(exports, "decodeAction", { enumerable: true, get: function () { return execution_1.decodeAction; } });
32
+ const generic_mapping_1 = require("./messages/v2.2/generic-mapping");
33
+ Object.defineProperty(exports, "getGenericMappingMessageId", { enumerable: true, get: function () { return generic_mapping_1.getGenericMappingMessageId; } });
34
+ const withdrawal_1 = require("./messages/v2.2/withdrawal");
35
+ Object.defineProperty(exports, "getSubmitWithdrawRequestHash", { enumerable: true, get: function () { return withdrawal_1.getSubmitWithdrawRequestHash; } });
36
+ Object.defineProperty(exports, "getWithdrawalAddress", { enumerable: true, get: function () { return withdrawal_1.getWithdrawalAddress; } });
37
+ Object.defineProperty(exports, "getOrderAddress", { enumerable: true, get: function () { return withdrawal_1.getOrderAddress; } });
38
+ Object.defineProperty(exports, "normalizePayloadParams", { enumerable: true, get: function () { return withdrawal_1.normalizePayloadParams; } });
32
39
  const utils_1 = require("./utils");
33
40
  Object.defineProperty(exports, "decodeAddress", { enumerable: true, get: function () { return utils_1.decodeAddress; } });
34
41
  Object.defineProperty(exports, "decodeTransactionId", { enumerable: true, get: function () { return utils_1.decodeTransactionId; } });
@@ -36,11 +43,6 @@ Object.defineProperty(exports, "encodeAddress", { enumerable: true, get: functio
36
43
  Object.defineProperty(exports, "encodeBytes", { enumerable: true, get: function () { return utils_1.encodeBytes; } });
37
44
  Object.defineProperty(exports, "encodeTransactionId", { enumerable: true, get: function () { return utils_1.encodeTransactionId; } });
38
45
  Object.defineProperty(exports, "getVmTypeNativeCurrency", { enumerable: true, get: function () { return utils_1.getVmTypeNativeCurrency; } });
39
- const withdrawal_1 = require("./messages/v2.2/withdrawal");
40
- Object.defineProperty(exports, "getSubmitWithdrawRequestHash", { enumerable: true, get: function () { return withdrawal_1.getSubmitWithdrawRequestHash; } });
41
- Object.defineProperty(exports, "getWithdrawalAddress", { enumerable: true, get: function () { return withdrawal_1.getWithdrawalAddress; } });
42
- Object.defineProperty(exports, "getOrderAddress", { enumerable: true, get: function () { return withdrawal_1.getOrderAddress; } });
43
- Object.defineProperty(exports, "normalizePayloadParams", { enumerable: true, get: function () { return withdrawal_1.normalizePayloadParams; } });
44
46
  const hub_utils_1 = require("./hub/hub-utils");
45
47
  Object.defineProperty(exports, "generateAddress", { enumerable: true, get: function () { return hub_utils_1.generateAddress; } });
46
48
  Object.defineProperty(exports, "generateTokenId", { enumerable: true, get: function () { return hub_utils_1.generateTokenId; } });
@@ -1,3 +1,4 @@
1
+ import { Address } from "viem";
1
2
  import { VmType } from "../../utils";
2
3
  export declare enum ActionType {
3
4
  MINT = 0,
@@ -12,7 +13,7 @@ export type ExecutionMessageMetadata = {
12
13
  family: VmType;
13
14
  };
14
15
  oracleChainId: string;
15
- oracleContract: `0x${string}`;
16
+ oracleContract: Address;
16
17
  };
17
18
  export type ExecutionMessage = {
18
19
  idempotencyKey: string;
@@ -0,0 +1,7 @@
1
+ export type GenericMappingMessage = {
2
+ user: string;
3
+ id: string;
4
+ data: string;
5
+ nonce: string;
6
+ };
7
+ export declare const getGenericMappingMessageId: (message: GenericMappingMessage) => `0x${string}`;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGenericMappingMessageId = void 0;
4
+ const viem_1 = require("viem");
5
+ const getGenericMappingMessageId = (message) => {
6
+ return (0, viem_1.hashStruct)({
7
+ types: {
8
+ SetEntry: [
9
+ { name: "user", type: "address" },
10
+ { name: "id", type: "bytes32" },
11
+ { name: "data", type: "bytes" },
12
+ { name: "nonce", type: "bytes32" },
13
+ ],
14
+ },
15
+ primaryType: "SetEntry",
16
+ data: {
17
+ user: message.user,
18
+ id: message.id,
19
+ data: message.data,
20
+ nonce: message.nonce,
21
+ },
22
+ });
23
+ };
24
+ exports.getGenericMappingMessageId = getGenericMappingMessageId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relay-protocol/settlement-sdk",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "description": "Relay protocol SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",