Skip to content

Commit f106797

Browse files
kcsongorMaxwell DulinMaxwell Dulinemreboga
authored
ntt: sui implementation (#613)
* sui: implement NTT * sui: add docs on auth system * sui: fix transceiver message serialisation * sui: handle additional payload in native token transfers * sui: fix wormhole transceiver auth type name this needs to be Auth * sui: add wormhole transceiver init logic * sui: allow updating peers (and updating inbound rate limit) * sui: remove frontrun protection in payload handling payloads are supposed to be handled by modifying the ntt source code, instead of having the recipient handle it. because of this, we don't need to implemnent any additional protections in the default ntt instance * sui: untrim amounts in outbound rate limiting * Add demo of accountant changes * Edit implementation to include only a single SetPeer * Add parsing tests to files * Add more comments * Remove 'option' from the WH message ticket * sui: fine grained access control in contract_auth.move * sui: tie transceiver to a particular manager * sui: store admin cap in state for off-chain discoverability * sui: add get_next_sequence * sui: switch to testnet branch of wormhole (temporary) * sui: rename test auth module duplicate module names across different packages triggers a compiler bug * sui: store admin cap id in state for off-chain discoverability * sui: store transceiver state object id for off-chain discoverability * sui: separate entrypoint for completing burning and locking setup * sui: store upgrade cap id for off chain discoverability * sui: manager identifies itself by its state object * sui: add get_transceiver_type to transceiver * sui: cli + sdk sui: store state object id in transceiver registry sui: store admin cap id in wormhole transceiver cli: deployment works sdk: add ability to set threshold sdk/sui: some clean up sdk/sui: better typing for sui contract data cli: sui upgradeability wip cli: create local env for sui commands instead of relying on global environment cli: register correct address sui cli: use sui manager package id in registration the deployment json stores the state id, but we need to register the package id sui: add get_transceiver_type to transceiver [sdk] * sui/sdk: dynamic coin metadata (does it work? haven't tried yet) * wip cli separate entrypoint * small cli fixes * cli: await askForConfirmation * cli: update sui dependency revision * cli/install: don't link package by name * Adding executor SDK for Sui NTT (#27) * Implement redeem and add unit tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add Executor SDK Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Verify executor SDK and trim down excessive tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Revert previous redeem implementation Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Update tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Combine tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix gas limits for Sui executor route Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Enable EVM Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Copy sui/ts to Dockerfile.cli build Signed-off-by: Emre Bogazliyanlioglu <[email protected]> --------- Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add Mainnet addresses and use isSameType for coin type comparison on Sui Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * omit cli-checking from 'build' script we do this for the practical reason that the cli is not included in the ci docker image * chore: Address previous feedback from PR#27 Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * chore: Remove unnecessary chain/platform check Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * fix: TS error for unused import Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * chore: Add temp values for inboud limits to unblock local testing Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * chore: Use SUI_CLOCK_OBJECT_ID instead Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * feat: Adding impl for rate limiting functions (#28) Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * sui: add pausing functionality * sdk: sui pausing * sui: threshold invariants * feat: Adding implementation for redeem and transfer status functions (#29) * feat: Adding implementation for transfer status functions Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add redeem implementation Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> --------- Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add completeInboundQueuedTransfer implementation and fix function signatures to match NTT interface Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add Sui to Publish workflow Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix Attestation creation and add more checks Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Use seconds instead of millis for rate limit timestamp Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add ntt::release call to redeem flow (#30) * Add ntt::release call to redeem flow Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> --------- Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix coin split Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Refactor Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix transfer function manual outbound transfers Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * sui: take/return treasury cap * Move shared functionality to utils and constants (#32) * Move shared functionality to utils and constants Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Fix unit tests Signed-off-by: Emre Bogazliyanlioglu <[email protected]> --------- Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Add implementation for setOwner (#31) * Implement setOwner Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Remove extensive variable checks Signed-off-by: Emre Bogazliyanlioglu <[email protected]> --------- Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * sui: pause create_transceiver_message * Address PR feedback Signed-off-by: Emre Bogazliyanlioglu <[email protected]> * Revert wormhole-foundation/sdk* version bumps Signed-off-by: Emre Bogazliyanlioglu <[email protected]> --------- Signed-off-by: Emre Bogazliyanlioglu <[email protected]> Co-authored-by: Maxwell Dulin <[email protected]> Co-authored-by: Maxwell Dulin <[email protected]> Co-authored-by: Emre Bogazliyanlioglu <[email protected]> Co-authored-by: Emre Bogazliyanlioglu <[email protected]>
1 parent 94a4f6b commit f106797

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+10559
-68
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version to publish'
7+
description: "Version to publish"
88
required: true
9-
type: 'string'
9+
type: "string"
1010

1111
jobs:
1212
publish-ts-sdk:
@@ -36,8 +36,9 @@ jobs:
3636
--workspace sdk/definitions \
3737
--workspace evm/ts \
3838
--workspace solana \
39+
--workspace sui \
3940
--workspace sdk/route
4041
env:
4142
VERSION: ${{ inputs.version }}
4243
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43-
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
44+
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
cache/
33
out/
44
target/
5+
build/
6+
tsconfig.tsbuildinfo
57

68
# Ignores development broadcast logs
79
!/broadcast
@@ -25,3 +27,6 @@ node_modules
2527

2628
# Tilt
2729
.wormhole
30+
31+
# Claude code
32+
.claude/settings.local.json

Dockerfile.cli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ COPY solana/package.json solana/package.json
4848
COPY solana/ts solana/ts
4949
COPY evm/ts evm/ts
5050
COPY solana/tsconfig.*.json solana/
51+
COPY sui/ts sui/ts
5152
COPY cli/package.json cli/package.json
5253
COPY cli/package-lock.json cli/package-lock.json
5354
COPY cli/src cli/src

bun.lock

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
},
1919
"cli": {
2020
"name": "@wormhole-foundation/ntt-cli",
21-
"version": "1.2.0",
21+
"version": "1.3.0",
2222
"bin": {
2323
"ntt": "src/index.ts",
2424
},
2525
"dependencies": {
26+
"@mysten/sui": "^1.33.0",
27+
"@wormhole-foundation/sdk-sui-ntt": "^0.5.0",
2628
"chalk": "^5.3.0",
2729
"yargs": "^17.7.2",
2830
},
@@ -122,6 +124,23 @@
122124
"@wormhole-foundation/sdk-solana-core": "^2.4.0",
123125
},
124126
},
127+
"sui/ts": {
128+
"name": "@wormhole-foundation/sdk-sui-ntt",
129+
"version": "0.5.0",
130+
"dependencies": {
131+
"@mysten/sui": "^1.26.1",
132+
"@wormhole-foundation/sdk-definitions-ntt": "1.0.0",
133+
},
134+
"peerDependencies": {
135+
"@wormhole-foundation/sdk-base": "^2.4.0",
136+
"@wormhole-foundation/sdk-definitions": "^2.4.0",
137+
"@wormhole-foundation/sdk-sui": "^2.4.0",
138+
"@wormhole-foundation/sdk-sui-core": "^2.4.0",
139+
},
140+
},
141+
},
142+
"overrides": {
143+
"@mysten/sui": "1.26.1",
125144
},
126145
"packages": {
127146
"@0no-co/graphql.web": ["@0no-co/[email protected]", "", { "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, "sha512-N2NGsU5FLBhT8NZ+3l2YrzZSHITjNXNuDhC4iDiikv0IujaJ0Xc6xIxQZ/Ek3Cb+rgPjnLHYyJm11tInuJn+cw=="],
@@ -534,7 +553,7 @@
534553

535554
"@types/bn.js": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A=="],
536555

537-
"@types/bun": ["@types/bun@1.1.0", "", { "dependencies": { "bun-types": "1.1.0" } }, "sha512-QGK0yU4jh0OK1A7DyhPkQuKjHQCC5jSJa3dpWIEhHv/rPfb6zLfdArc4/uUUZBMTcjilsafRXnPWO+1owb572Q=="],
556+
"@types/bun": ["@types/bun@1.2.19", "", { "dependencies": { "bun-types": "1.2.19" } }, "sha512-d9ZCmrH3CJ2uYKXQIUuZ/pUnTqIvLDS0SK7pFmbx8ma+ziH/FRMoAq5bYpRG7y+w1gl+HgyNZbtqgMq4W4e2Lg=="],
538557

539558
"@types/cacheable-request": ["@types/[email protected]", "", { "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", "@types/node": "*", "@types/responselike": "^1.0.0" } }, "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw=="],
540559

@@ -562,6 +581,8 @@
562581

563582
"@types/prettier": ["@types/[email protected]", "", {}, "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA=="],
564583

584+
"@types/react": ["@types/[email protected]", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g=="],
585+
565586
"@types/responselike": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="],
566587

567588
"@types/secp256k1": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ=="],
@@ -646,6 +667,8 @@
646667

647668
"@wormhole-foundation/sdk-sui-core": ["@wormhole-foundation/[email protected]", "", { "dependencies": { "@mysten/sui": "^1.21.2", "@wormhole-foundation/sdk-connect": "2.4.0", "@wormhole-foundation/sdk-sui": "2.4.0" } }, "sha512-y+E0lLRqFscXht6olP0xwtWvPx9Lv6D+9+k/PVeiHPyREusTQdDOFB6rymAvEFkLLASwiPHzdt4AnqyuLSXl3w=="],
648669

670+
"@wormhole-foundation/sdk-sui-ntt": ["@wormhole-foundation/sdk-sui-ntt@workspace:sui/ts"],
671+
649672
"@wormhole-foundation/sdk-sui-tokenbridge": ["@wormhole-foundation/[email protected]", "", { "dependencies": { "@mysten/sui": "^1.21.2", "@wormhole-foundation/sdk-connect": "2.4.0", "@wormhole-foundation/sdk-sui": "2.4.0", "@wormhole-foundation/sdk-sui-core": "2.4.0" } }, "sha512-fDfmn0OmDyXH64NFyN8T9GQVtqBngvAXctoBg6Ob8559FByFveXVaqSRLvVOc+EZkWxhkCAiFj2FYiHDN37WOA=="],
650673

651674
"@wormhole-foundation/wormchain-sdk": ["@wormhole-foundation/[email protected]", "", { "dependencies": { "@certusone/wormhole-sdk": "^0.2.0", "@cosmjs/cosmwasm-stargate": "^0.27.1", "@cosmjs/launchpad": "^0.27.1", "@cosmjs/math": "^0.27.1", "@cosmjs/proto-signing": "^0.27.1", "@cosmjs/stargate": "^0.27.1", "@cosmjs/tendermint-rpc": "^0.27.1", "axios": "^0.26.0", "bech32": "^2.0.0", "elliptic": "^6.5.4", "ethers": "^5.5.4", "keccak256": "^1.0.6", "node-fetch": "^2.6.7", "protobufjs": "^6.11.2", "ts-jest": "^27.1.3", "tslint": "^6.1.3", "typescript": "^4.5.5" } }, "sha512-yZbhgyizH6mdAhECtarDMejjgNkrhXlfyPjC5+qVS6NfIxdLv3zcwv0IFiDo92hxbo3Q7Kq67ssa/hdlvLpLCQ=="],
@@ -766,7 +789,7 @@
766789

767790
"builtin-modules": ["[email protected]", "", {}, "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ=="],
768791

769-
"bun-types": ["bun-types@1.1.0", "", { "dependencies": { "@types/node": "~20.11.3", "@types/ws": "~8.5.10" } }, "sha512-GhMDD7TosdJzQPGUOcQD5PZshvXVxDfwGAZs2dq+eSaPsRn3iUCzvpFlsg7Q51bXVzLAUs+FWHlnmpgZ5UggIg=="],
792+
"bun-types": ["bun-types@1.2.19", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-uAOTaZSPuYsWIXRpj7o56Let0g/wjihKCkeRqUBhlLVM/Bt+Fj9xTo+LhC1OV1XDaGkz4hNC80et5xgy+9KTHQ=="],
770793

771794
"cacheable-lookup": ["[email protected]", "", {}, "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA=="],
772795

@@ -834,6 +857,8 @@
834857

835858
"cssstyle": ["[email protected]", "", { "dependencies": { "cssom": "~0.3.6" } }, "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A=="],
836859

860+
"csstype": ["[email protected]", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
861+
837862
"data-urls": ["[email protected]", "", { "dependencies": { "abab": "^2.0.3", "whatwg-mimetype": "^2.3.0", "whatwg-url": "^8.0.0" } }, "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ=="],
838863

839864
"debug": ["[email protected]", "", { "dependencies": { "ms": "2.1.2" } }, "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="],
@@ -1726,9 +1751,7 @@
17261751

17271752
"bip32/@types/node": ["@types/[email protected]", "", {}, "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ=="],
17281753

1729-
"bun-types/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw=="],
1730-
1731-
"bun-types/@types/ws": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A=="],
1754+
"bun-types/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.19.2" } }, "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ=="],
17321755

17331756
"cacheable-request/get-stream": ["[email protected]", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="],
17341757

@@ -2106,6 +2129,8 @@
21062129

21072130
"babel-jest/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
21082131

2132+
"bun-types/@types/node/undici-types": ["[email protected]", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
2133+
21092134
"command-line-usage/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^1.9.0" } }, "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA=="],
21102135

21112136
"create-jest/chalk/ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],

cli/install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ function install_cli {
157157
cd cli
158158

159159
bun link
160-
161-
bun link @wormhole-foundation/ntt-cli
162160
}
163161

164162
main "$@"

cli/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
"ntt": "src/index.ts"
1818
},
1919
"dependencies": {
20+
"@mysten/sui": "1.37.2",
21+
"@wormhole-foundation/sdk-sui-ntt": "^0.5.0",
2022
"chalk": "^5.3.0",
2123
"yargs": "^17.7.2"
2224
}

cli/src/getSigner.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import solana from "@wormhole-foundation/sdk/platforms/solana";
22
import * as myEvmSigner from "./evmsigner.js";
3+
import * as mySuiSigner from "./suisigner.js";
34
import { ChainContext, Wormhole, chainToPlatform, type Chain, type ChainAddress, type Network, type Signer } from "@wormhole-foundation/sdk";
45
import { Keypair } from "@solana/web3.js";
56
import fs from "fs";
@@ -55,12 +56,14 @@ export async function getSigner<N extends Network, C extends Chain>(
5556
// Read the private key from the file if filePath is provided
5657
const keyPair = Keypair.fromSecretKey(new Uint8Array(JSON.parse(fs.readFileSync(filePath, 'utf8'))));
5758
privateKey = encoding.b58.encode(keyPair.secretKey);
59+
source = filePath;
5860
} else {
5961
const privateKeySource = source ?? process.env.SOLANA_PRIVATE_KEY;
6062
if (privateKeySource === undefined) {
6163
throw new Error("Private key not provided and SOLANA_PRIVATE_KEY env var not set");
6264
}
6365
privateKey = privateKeySource;
66+
source = privateKeySource;
6467
}
6568
source = privateKey;
6669
signer = await solana.getSigner(
@@ -94,6 +97,26 @@ export async function getSigner<N extends Network, C extends Chain>(
9497
throw new Error("Unsupported signer type");
9598
}
9699
break;
100+
case "Sui":
101+
switch (type) {
102+
case "privateKey":
103+
const privateKey = source ?? process.env.SUI_PRIVATE_KEY;
104+
if (!privateKey) {
105+
throw new Error("SUI_PRIVATE_KEY env var not set");
106+
}
107+
source = privateKey;
108+
signer = await mySuiSigner.getSuiSigner(
109+
await chain.getRpc(),
110+
privateKey,
111+
{ debug: false }
112+
);
113+
break;
114+
case "ledger":
115+
throw new Error("Ledger not yet supported on Sui");
116+
default:
117+
throw new Error("Unsupported signer type");
118+
}
119+
break;
97120
default:
98121
throw new Error("Unrecognized platform: " + platform);
99122
}

0 commit comments

Comments
 (0)