diff --git a/.github/workflows/typescript-sdk-publish.yml b/.github/workflows/typescript-sdk-publish.yml index 468f802e67..b994185a31 100644 --- a/.github/workflows/typescript-sdk-publish.yml +++ b/.github/workflows/typescript-sdk-publish.yml @@ -17,16 +17,15 @@ concurrency: defaults: run: shell: bash + working-directory: './typescript-sdk' env: - NODE_OPTIONS: '--no-warnings' ACTIONS_RUNNER_DEBUG: true + NODE_OPTIONS: '--no-warnings' jobs: - publish-jsr: - # manually temporarily disabled - if: false - name: 'Publish JSR' + publish-sdk: + name: 'Publish to Registries' runs-on: ['ubuntu-latest'] permissions: contents: read @@ -40,9 +39,22 @@ jobs: uses: oven-sh/setup-bun@v2 with: bun-version: 'latest' + registry-url: 'https://registry.npmjs.org' - - name: 'Publish to JSR' - working-directory: './typescript-sdk' + - name: 'Install Dependencies' + run: bun install + + - name: 'Prechecks' run: | - bun install - bun scripts/publish.ts --period patch + bun run build + bun run typecheck + bun run check-package + + - name: 'Publish to JSR' + run: bun scripts/publish.ts --period patch + + - name: 'Publish to NPM' + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --access='public' --no-git-tags diff --git a/flake.lock b/flake.lock index cf0a6104f7..94977ffa57 100644 --- a/flake.lock +++ b/flake.lock @@ -432,11 +432,11 @@ }, "nixpkgs-js": { "locked": { - "lastModified": 1732014248, - "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { diff --git a/networks/mkCosmosDevnet.nix b/networks/mkCosmosDevnet.nix index 9306d307a9..08cb048e46 100644 --- a/networks/mkCosmosDevnet.nix +++ b/networks/mkCosmosDevnet.nix @@ -603,19 +603,17 @@ let mkdir -p $out/checksums echo -n $(cat "${checksum}") > "$out/checksums/$(basename $wasm .wasm)" mkdir -p $out/addresses - ${ - builtins.concatStringsSep "\n" ( - pkgs.lib.imap0 ( - idx: - { salt, ... }: - '' - echo -n "$(cat ${ - getContractAddress creator checksum salt - })" > "$out/addresses/$(basename $wasm .wasm)_${builtins.toString idx}" - '' - ) instances - ) - } + ${builtins.concatStringsSep "\n" ( + pkgs.lib.imap0 ( + idx: + { salt, ... }: + '' + echo -n "$(cat ${ + getContractAddress creator checksum salt + })" > "$out/addresses/$(basename $wasm .wasm)_${builtins.toString idx}" + '' + ) instances + )} done ''; diff --git a/typescript-sdk/bun.lockb b/typescript-sdk/bun.lockb index 218330d8c4..a3cbaebe43 100755 Binary files a/typescript-sdk/bun.lockb and b/typescript-sdk/bun.lockb differ diff --git a/typescript-sdk/jsr.json b/typescript-sdk/jsr.json index 7191f25835..1274a03289 100644 --- a/typescript-sdk/jsr.json +++ b/typescript-sdk/jsr.json @@ -1,7 +1,7 @@ { "$schema": "https://jsr.io/schema/config-file.v1.json", "name": "@union/client", - "version": "0.0.39", + "version": "0.0.48", "license": "MIT", "exports": { ".": "./src/mod.ts" diff --git a/typescript-sdk/package.json b/typescript-sdk/package.json index b3f79a18c7..66efdf04bd 100644 --- a/typescript-sdk/package.json +++ b/typescript-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@unionlabs/client", - "version": "0.0.45", + "version": "0.0.48", "homepage": "https://union.build", "description": "Union Labs cross-chain transfers client", "type": "module", @@ -29,32 +29,31 @@ "check-package": "deno run --allow-all npm:publint --strict && deno run --allow-all npm:@arethetypeswrong/cli@latest --pack --ignore-rules 'cjs-resolves-to-esm'" }, "dependencies": { - "@aptos-labs/ts-sdk": "^1.33.1", - "@cosmjs/amino": "^0.32.4", - "@cosmjs/cosmwasm-stargate": "0.32.4", - "@cosmjs/proto-signing": "^0.32.4", - "@cosmjs/stargate": "0.32.4", - "@cosmjs/tendermint-rpc": "^0.32.4", - "@scure/base": "^1.2.1", + "@scure/base": "^1.2.4", "neverthrow": "^8.1.1", "ofetch": "^1.4.1", - "ox": "^0.6.0", "patch-package": "^8.0.0", - "viem": "^2.22.3" + "@aptos-labs/ts-sdk": "^1.33.1", + "@cosmjs/amino": "^0.33.0", + "@cosmjs/cosmwasm-stargate": "0.33.0", + "@cosmjs/proto-signing": "^0.33.0", + "@cosmjs/stargate": "0.33.0", + "@cosmjs/tendermint-rpc": "^0.33.0", + "viem": "^2.22.10" }, "devDependencies": { "@total-typescript/ts-reset": "^0.6.1", - "@types/bun": "^1.1.15", - "@types/node": "^22.10.5", - "consola": "^3.3.3", + "@types/bun": "^1.1.17", + "@types/node": "^22.10.7", + "consola": "^3.4.0", "cosmjs-types": "^0.9.0", "jsr": "^0.13.2", - "knip": "^5.41.1", + "knip": "^5.42.2", "tsup": "^8.3.5", "tsx": "^4.19.2", - "typescript": "^5.7.2", + "typescript": "^5.7.3", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^2.1.8" + "vitest": "^3.0.2" }, "repository": { "type": "git", diff --git a/typescript-sdk/patches/@cosmjs+amino+0.32.4.patch b/typescript-sdk/patches/@cosmjs+amino+0.33.0.patch similarity index 100% rename from typescript-sdk/patches/@cosmjs+amino+0.32.4.patch rename to typescript-sdk/patches/@cosmjs+amino+0.33.0.patch diff --git a/typescript-sdk/patches/@cosmjs+tendermint-rpc+0.32.4.patch b/typescript-sdk/patches/@cosmjs+tendermint-rpc+0.33.0.patch similarity index 82% rename from typescript-sdk/patches/@cosmjs+tendermint-rpc+0.32.4.patch rename to typescript-sdk/patches/@cosmjs+tendermint-rpc+0.33.0.patch index c665ebc107..aff8596225 100644 --- a/typescript-sdk/patches/@cosmjs+tendermint-rpc+0.32.4.patch +++ b/typescript-sdk/patches/@cosmjs+tendermint-rpc+0.33.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js b/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js -index e8b2dc3..b5c540a 100644 +index 29ec063..28a5c02 100644 --- a/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js +++ b/node_modules/@cosmjs/tendermint-rpc/build/comet38/adaptor/responses.js @@ -72,7 +72,7 @@ function decodePubkey(data) { @@ -11,7 +11,7 @@ index e8b2dc3..b5c540a 100644 return { algorithm, data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(value)), -@@ -91,6 +91,11 @@ function decodePubkey(data) { +@@ -91,6 +91,16 @@ function decodePubkey(data) { algorithm: "secp256k1", data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)), }; @@ -19,12 +19,17 @@ index e8b2dc3..b5c540a 100644 + return { + algorithm: "bn254", + data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)), ++ }; ++ case "cometbft/PubKeyBn254": ++ return { ++ algorithm: "bn254", ++ data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)), + }; default: throw new Error(`unknown pubkey type: ${data.type}`); } diff --git a/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js b/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js -index 5c9a406..0083a25 100644 +index 19df9de..c73c4ca 100644 --- a/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js +++ b/node_modules/@cosmjs/tendermint-rpc/build/tendermint37/adaptor/responses.js @@ -72,7 +72,7 @@ function decodePubkey(data) { @@ -36,7 +41,7 @@ index 5c9a406..0083a25 100644 return { algorithm, data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(value)), -@@ -91,6 +91,11 @@ function decodePubkey(data) { +@@ -91,6 +91,16 @@ function decodePubkey(data) { algorithm: "secp256k1", data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)), }; @@ -44,6 +49,11 @@ index 5c9a406..0083a25 100644 + return { + algorithm: "bn254", + data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)), ++ }; ++ case "cometbft/PubKeyBn254": ++ return { ++ algorithm: "bn254", ++ data: (0, encoding_1.fromBase64)((0, encodings_1.assertNotEmpty)(data.value)), + }; default: throw new Error(`unknown pubkey type: ${data.type}`); diff --git a/typescript-sdk/playground/union-to-holesky.ts b/typescript-sdk/playground/union-to-holesky.ts index 4a542e0a52..bde68a634c 100644 --- a/typescript-sdk/playground/union-to-holesky.ts +++ b/typescript-sdk/playground/union-to-holesky.ts @@ -3,9 +3,9 @@ import "scripts/patch.ts" import { http } from "viem" import { holesky } from "viem/chains" import { parseArgs } from "node:util" +import { hexToBytes } from "#convert.ts" import { raise } from "#utilities/index.ts" import { consola } from "../scripts/logger.ts" -import { hexToBytes } from "#convert.ts" import { privateKeyToAccount } from "viem/accounts" import { DirectSecp256k1Wallet } from "@cosmjs/proto-signing" import { createUnionClient, type TransferAssetsParameters } from "#mod.ts" diff --git a/typescript-sdk/src/abi/index.ts b/typescript-sdk/src/abi/index.ts deleted file mode 100644 index 3d87a6379b..0000000000 --- a/typescript-sdk/src/abi/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./ucs-01.ts" -export * from "./ucs-02.ts" -export * from "./ucs-03.ts" diff --git a/typescript-sdk/src/abi/ucs-02.ts b/typescript-sdk/src/abi/ucs-02.ts deleted file mode 100644 index 781e2073ed..0000000000 --- a/typescript-sdk/src/abi/ucs-02.ts +++ /dev/null @@ -1,1065 +0,0 @@ -export const ucs02NftAbi = [ - { - type: "constructor", - inputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", - inputs: [], - outputs: [ - { - name: "", - type: "string", - internalType: "string" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "getOutstanding", - inputs: [ - { - name: "sourceChannel", - type: "string", - internalType: "string" - }, - { - name: "token", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "ibcAddress", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "initialize", - inputs: [ - { - name: "_ibcHandler", - type: "address", - internalType: "contract IIBCPacket" - }, - { - name: "admin", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onAcknowledgementPacket", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "acknowledgement", - type: "bytes", - internalType: "bytes" - }, - { - name: "", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanCloseConfirm", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanCloseInit", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanOpenAck", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "counterpartyVersion", - type: "string", - internalType: "string" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanOpenConfirm", - inputs: [ - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onChanOpenInit", - inputs: [ - { - name: "order", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "", - type: "string[]", - internalType: "string[]" - }, - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onChanOpenTry", - inputs: [ - { - name: "order", - type: "uint8", - internalType: "enum IbcCoreChannelV1GlobalEnums.Order" - }, - { - name: "", - type: "string[]", - internalType: "string[]" - }, - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "string", - internalType: "string" - }, - { - name: "", - type: "tuple", - internalType: "struct IbcCoreChannelV1Counterparty.Data", - components: [ - { - name: "port_id", - type: "string", - internalType: "string" - }, - { - name: "channel_id", - type: "string", - internalType: "string" - } - ] - }, - { - name: "version", - type: "string", - internalType: "string" - }, - { - name: "counterpartyVersion", - type: "string", - internalType: "string" - } - ], - outputs: [], - stateMutability: "view" - }, - { - type: "function", - name: "onERC721Received", - inputs: [ - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "", - type: "address", - internalType: "address" - }, - { - name: "", - type: "uint256", - internalType: "uint256" - }, - { - name: "", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [ - { - name: "", - type: "bytes4", - internalType: "bytes4" - } - ], - stateMutability: "pure" - }, - { - type: "function", - name: "onRecvPacket", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "relayer", - type: "address", - internalType: "address" - } - ], - outputs: [ - { - name: "", - type: "bytes", - internalType: "bytes" - } - ], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onRecvPacketProcessing", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "onTimeoutPacket", - inputs: [ - { - name: "ibcPacket", - type: "tuple", - internalType: "struct IbcCoreChannelV1Packet.Data", - components: [ - { - name: "sequence", - type: "uint64", - internalType: "uint64" - }, - { - name: "source_port", - type: "string", - internalType: "string" - }, - { - name: "source_channel", - type: "string", - internalType: "string" - }, - { - name: "destination_port", - type: "string", - internalType: "string" - }, - { - name: "destination_channel", - type: "string", - internalType: "string" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - }, - { - name: "timeout_height", - type: "tuple", - internalType: "struct IbcCoreClientV1Height.Data", - components: [ - { - name: "revision_number", - type: "uint64", - internalType: "uint64" - }, - { - name: "revision_height", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "timeout_timestamp", - type: "uint64", - internalType: "uint64" - } - ] - }, - { - name: "", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "paused", - inputs: [], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "proxiableUUID", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32" - } - ], - stateMutability: "view" - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "send", - inputs: [ - { - name: "sourceChannel", - type: "string", - internalType: "string" - }, - { - name: "receiver", - type: "string", - internalType: "string" - }, - { - name: "nftClass", - type: "address", - internalType: "address" - }, - { - name: "tokens", - type: "uint256[]", - internalType: "uint256[]" - }, - { - name: "timeoutTimestamp", - type: "uint64", - internalType: "uint64" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "transferOwnership", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address" - } - ], - outputs: [], - stateMutability: "nonpayable" - }, - { - type: "function", - name: "upgradeToAndCall", - inputs: [ - { - name: "newImplementation", - type: "address", - internalType: "address" - }, - { - name: "data", - type: "bytes", - internalType: "bytes" - } - ], - outputs: [], - stateMutability: "payable" - }, - { - type: "event", - name: "ClassCreated", - inputs: [ - { - name: "packetSequence", - type: "uint64", - indexed: false, - internalType: "uint64" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "nftClass", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Initialized", - inputs: [ - { - name: "version", - type: "uint64", - indexed: false, - internalType: "uint64" - } - ], - anonymous: false - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Paused", - inputs: [ - { - name: "account", - type: "address", - indexed: false, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Received", - inputs: [ - { - name: "packetSequence", - type: "uint64", - indexed: false, - internalType: "uint64" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "sender", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "receiver", - type: "address", - indexed: false, - internalType: "address" - }, - { - name: "nftClass", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "tokenIds", - type: "uint256[]", - indexed: false, - internalType: "uint256[]" - } - ], - anonymous: false - }, - { - type: "event", - name: "Refunded", - inputs: [ - { - name: "packetSequence", - type: "uint64", - indexed: false, - internalType: "uint64" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "sender", - type: "address", - indexed: false, - internalType: "address" - }, - { - name: "receiver", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "nftClass", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "tokenIds", - type: "uint256[]", - indexed: false, - internalType: "uint256[]" - } - ], - anonymous: false - }, - { - type: "event", - name: "Sent", - inputs: [ - { - name: "packetSequence", - type: "uint64", - indexed: false, - internalType: "uint64" - }, - { - name: "channelId", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "sender", - type: "address", - indexed: false, - internalType: "address" - }, - { - name: "receiver", - type: "string", - indexed: false, - internalType: "string" - }, - { - name: "nftClass", - type: "address", - indexed: true, - internalType: "address" - }, - { - name: "tokenIds", - type: "uint256[]", - indexed: false, - internalType: "uint256[]" - } - ], - anonymous: false - }, - { - type: "event", - name: "Unpaused", - inputs: [ - { - name: "account", - type: "address", - indexed: false, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "event", - name: "Upgraded", - inputs: [ - { - name: "implementation", - type: "address", - indexed: true, - internalType: "address" - } - ], - anonymous: false - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [ - { - name: "target", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "ERC1967InvalidImplementation", - inputs: [ - { - name: "implementation", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "ERC1967NonPayable", - inputs: [] - }, - { - type: "error", - name: "EnforcedPause", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidAcknowledgement", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidCounterpartyProtocolVersion", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidHexAddress", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidProtocolOrdering", - inputs: [] - }, - { - type: "error", - name: "ErrInvalidProtocolVersion", - inputs: [] - }, - { - type: "error", - name: "ErrNotIBC", - inputs: [] - }, - { - type: "error", - name: "ErrUnauthorized", - inputs: [] - }, - { - type: "error", - name: "ErrUnstoppable", - inputs: [] - }, - { - type: "error", - name: "ExpectedPause", - inputs: [] - }, - { - type: "error", - name: "FailedInnerCall", - inputs: [] - }, - { - type: "error", - name: "InvalidInitialization", - inputs: [] - }, - { - type: "error", - name: "MustTransferAtLeastOneToken", - inputs: [] - }, - { - type: "error", - name: "NotInitializing", - inputs: [] - }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [ - { - name: "account", - type: "address", - internalType: "address" - } - ] - }, - { - type: "error", - name: "UUPSUnauthorizedCallContext", - inputs: [] - }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [ - { - name: "slot", - type: "bytes32", - internalType: "bytes32" - } - ] - } -] as const diff --git a/typescript-sdk/src/evm/client.ts b/typescript-sdk/src/evm/client.ts index 800f03122f..368876b505 100644 --- a/typescript-sdk/src/evm/client.ts +++ b/typescript-sdk/src/evm/client.ts @@ -26,7 +26,7 @@ import { berachainTestnetbArtio } from "viem/chains" import type { TransferAssetsParameters, LooseAutocomplete, Hex, HexAddress } from "../types.ts" -import { ucs03ZkgmAbi } from "#abi/ucs-03.ts" +import { ucs03ZkgmAbi } from "../abi/ucs-03.ts" export { sepolia, scrollSepolia, arbitrumSepolia, berachainTestnetbArtio } export const evmChains = [ diff --git a/typescript-sdk/src/pfm.ts b/typescript-sdk/src/pfm.ts index ec00cfbac6..62fefdb0de 100644 --- a/typescript-sdk/src/pfm.ts +++ b/typescript-sdk/src/pfm.ts @@ -1,6 +1,6 @@ import type { ChainId } from "./types.ts" import { err, ok, Result } from "neverthrow" -import { sepolia } from "#mod.ts" +import { sepolia } from "./mod.ts" import { holesky } from "viem/chains" export const createPfmMemo: (_args: { @@ -48,9 +48,9 @@ export async function getHubbleChainDetails({ Error > > { - if (sourceChainId === destinationChainId) { - return err(new Error("Source and destination chains cannot be the same")) - } + // if (sourceChainId === destinationChainId) { + // return err(new Error("Source and destination chains cannot be the same")) + // } // const { data: chains } = await offchainQuery.chains({ // includeContracts: true, diff --git a/typescript-sdk/src/utilities/functions.ts b/typescript-sdk/src/utilities/functions.ts deleted file mode 100644 index 75e0906bd6..0000000000 --- a/typescript-sdk/src/utilities/functions.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Creates a new composite function that invokes the functions from right to left - */ - -export default function compose(...functions: Array<(...args: Array) => T>) { - return functions.reduce( - (acc, currentFn) => - (...args: Array) => - acc(currentFn(...args)) - ) -} diff --git a/typescript-sdk/src/utilities/index.ts b/typescript-sdk/src/utilities/index.ts index ed648d89ad..4bb320a216 100644 --- a/typescript-sdk/src/utilities/index.ts +++ b/typescript-sdk/src/utilities/index.ts @@ -1,13 +1,3 @@ -/** - * sleep for the specified number of milliseconds - * @example - * ```ts - * await sleep(1000) - * ``` - */ -export const sleep = async (ms: number): Promise => - new Promise(resolve => setTimeout(resolve, ms)) - /** * get the current timestamp in the format `YYYY-MM-DD--HH-MM-SS` * @example