Add support for O3 wallet #82

Closed
opened 2025-12-28 18:06:58 +00:00 by sami · 9 comments
Owner

Originally created by @roman-khimov on GitHub (Jan 25, 2024).

Originally assigned to: @mike-petrov on GitHub.

I'm always frustrated when we can't work with wallets supported by https://governance.neo.org/

Describe the solution you'd like

Research O3 and what's needed to support it.

Originally created by @roman-khimov on GitHub (Jan 25, 2024). Originally assigned to: @mike-petrov on GitHub. ## Is your feature request related to a problem? Please describe. I'm always frustrated when we can't work with wallets supported by https://governance.neo.org/ ## Describe the solution you'd like Research O3 and what's needed to support it.
sami 2025-12-28 18:06:58 +00:00
Author
Owner

@mike-petrov commented on GitHub (Feb 6, 2024):

As for O3, there are few options for wallet:

O3 WALLET

  • no app connection function

O3 CROSS-CHAIN WALLET

Also wallet connect official example shows availabale methods to login:

image
@mike-petrov commented on GitHub (Feb 6, 2024): As for [O3](https://o3.network/#/wallet), there are few options for wallet: **O3 WALLET** - no app connection function **O3 CROSS-CHAIN WALLET** - connection function not working with neo - also not working with [wallet connect official example](https://app.web3inbox.com/) <img src="https://github.com/nspcc-dev/panel-fs-neo-org/assets/32885629/35ceb317-2cac-45bb-ac98-4f8c00d682fe" width="200" /> Also [wallet connect official example](https://app.web3inbox.com/) shows availabale methods to login: <img width="388" alt="image" src="https://github.com/nspcc-dev/panel-fs-neo-org/assets/32885629/3f7fc1a9-8066-4e0a-839a-2a271689b4af">
Author
Owner

@roman-khimov commented on GitHub (Feb 6, 2024):

Can you check what API governance.neo.org uses for O3? And what's NEOPIN, really?

@roman-khimov commented on GitHub (Feb 6, 2024): Can you check what API governance.neo.org uses for O3? And what's NEOPIN, really?
Author
Owner

@mike-petrov commented on GitHub (Feb 6, 2024):

Like an OneGate, O3 has own Discover page with dapps, but no have N3 Governance and also not working in explorer section. But as for the O3 wallet desktop app, it works for governance.neo.org, because it uses a local wc route: http://127.0.0.1:60004/socket.io/?EIO=3&transport=polling&t=...&sid=...

Screenshot 2024-02-06 at 14 59 32
@mike-petrov commented on GitHub (Feb 6, 2024): Like an OneGate, O3 has own Discover page with dapps, but no have `N3 Governance` and also not working in explorer section. But as for the O3 wallet desktop app, it works for governance.neo.org, because it uses a local wc route: `http://127.0.0.1:60004/socket.io/?EIO=3&transport=polling&t=...&sid=...` <img width="319" alt="Screenshot 2024-02-06 at 14 59 32" src="https://github.com/nspcc-dev/panel-fs-neo-org/assets/32885629/e01c2043-1ed8-4f71-b3cc-07bd1439596c">
Author
Owner

@mike-petrov commented on GitHub (Feb 6, 2024):

NEOPIN Wallet is a private wallet with enhanced security, not related to neo blockchain

@mike-petrov commented on GitHub (Feb 6, 2024): `NEOPIN Wallet is a private wallet with enhanced security`, not related to neo blockchain
Author
Owner

@roman-khimov commented on GitHub (Feb 6, 2024):

Does it support https://github.com/neo-ngd/neo-dapi-monorepo/tree/master/packages/neo-dapi#signmessagewithoutsalt? Can you check this function to produce the same result we need for our objects?

@roman-khimov commented on GitHub (Feb 6, 2024): Does it support https://github.com/neo-ngd/neo-dapi-monorepo/tree/master/packages/neo-dapi#signmessagewithoutsalt? Can you check this function to produce the same result we need for our objects?
Author
Owner

@mike-petrov commented on GitHub (Feb 8, 2024):

Сurrent @nspcc-dev/neofs-rest-gw does not support @neo-ngd/neo-dapi-monorepo signing and gives error: invalid session token: invalid signature.

Some updates:

  • Library @neo-ngd/neo-dapi-monorepo works only in wallet Explorer section, because use window parameters, like: window.OneGate, window.Neo, window.Vital.
  • We use WC v1 (legacy) version for signing strings, but there are 3 options for using:
    You can use different versions, the default is 2, but you can use 3 to sign a message without salt, and 1 to use the legacy version (@CityOfZion/wallet-connect-sdk).
  • We already tried WC v2 signing, but it didn't work.
  • We have an example to test v2 and v3 signature methods (wc-dapp-react), but after signing with neo-dapi-monorepo and verifying that signature with wc-dapp-react, verified method gives: false.
  • Parameters v2 and v3 are based on WC v2 signature as they have the same signature structure, examples are given below:
1. @nspcc-dev/panel-fs-neo-org (v1)
signature: d8e82f0937cbf8f02a5c28b2e4ac75c08c1c905941436892a592631db8a0c037468c223591a359b85b8d03b968014a92157e7cc1a6b27489b8c5d7d87e41909fa08501f26ac3635cf94fb01c41a16f60
publicKey: 03bd9108c0b49f657e9eee50d1399022bd1e436118e5b7529a1b7cd606652f578f

2. @neo-ngd/neo-dapi-monorepo
signature: 61d3727d23dcc2953fcc93fc2835ee57e16d42e307d87d8a4fa7575b4bd7353c34cb1fb8eadedf9702f228e7e3f1a6ca7c2910b68a273bb4fc3c9b64991841c2
publicKey: 0233b83d9f22f4fd5cf215480fefd903624a3761166bfb4e6fd540dc9748617a7a

3. wc-dapp-react (v2 with salt)
signature: c46903e8168595cb8e06384d0cf5682d6e0eecc0d01040318316682c22ed071fb6cb87a6669f66adccb6fb4fc73156d0aac50df6a91a374a91be7f3f4d548827
publicKey: 03bd9108c0b49f657e9eee50d1399022bd1e436118e5b7529a1b7cd606652f578f
salt: 64a20cad335f20ed17ec3e344bbf561c
messageHex: 43684368394a324c33667446546f6f555a587473514c33444568734b47545678665135366130755165466d4f4f36336d71796b425331484e70773172785367614267692f5852693958534968413935346c46362b576f4333686a2f58746d397a544c5251674b346b67657179667133397232485a353459364d67514941684142

4. wc-dapp-react (v3)
signature: 1f176221435b0afc0cbc1135001eca81ec663852595dff9417a477e412339aaf371ddde0552914606386c403f27e10c2b2979b34d34058451b6844b58ad2ab55
publicKey: 03bd9108c0b49f657e9eee50d1399022bd1e436118e5b7529a1b7cd606652f578f
messageHex: 010001f011596f7572207369676e206d6573736167650000

Some libraries use messageHex, this converts text to hexadecimal format.

@mike-petrov commented on GitHub (Feb 8, 2024): Сurrent [@nspcc-dev/neofs-rest-gw](https://github.com/nspcc-dev/neofs-rest-gw) does not support [@neo-ngd/neo-dapi-monorepo](https://github.com/neo-ngd/neo-dapi-monorepo) signing and gives error: `invalid session token: invalid signature`. Some updates: - Library [@neo-ngd/neo-dapi-monorepo](https://github.com/neo-ngd/neo-dapi-monorepo) works only in wallet Explorer section, because use window parameters, like: window.OneGate, window.Neo, window.Vital. - We use WC v1 (legacy) version for signing strings, but there are 3 options for using: `You can use different versions, the default is 2, but you can use 3 to sign a message without salt, and 1 to use the legacy version` ([@CityOfZion/wallet-connect-sdk](https://github.com/CityOfZion/wallet-connect-sdk/blob/main/USAGE_GUIDE.md#sign-and-verify-message)). - We already [tried WC v2 signing](https://github.com/nspcc-dev/panel-fs-neo-org/commit/f5943f4b3928ad6dd7c349402a36745ae34de59c), but it didn't work. - We have an example to test v2 and v3 signature methods ([wc-dapp-react](https://github.com/CityOfZion/wallet-connect-sdk/tree/main/examples/wc-dapp-react)), but after signing with neo-dapi-monorepo and verifying that signature with wc-dapp-react, verified method gives: false. - Parameters v2 and v3 are based on WC v2 signature as they have the same signature structure, examples are given below: ``` 1. @nspcc-dev/panel-fs-neo-org (v1) signature: d8e82f0937cbf8f02a5c28b2e4ac75c08c1c905941436892a592631db8a0c037468c223591a359b85b8d03b968014a92157e7cc1a6b27489b8c5d7d87e41909fa08501f26ac3635cf94fb01c41a16f60 publicKey: 03bd9108c0b49f657e9eee50d1399022bd1e436118e5b7529a1b7cd606652f578f 2. @neo-ngd/neo-dapi-monorepo signature: 61d3727d23dcc2953fcc93fc2835ee57e16d42e307d87d8a4fa7575b4bd7353c34cb1fb8eadedf9702f228e7e3f1a6ca7c2910b68a273bb4fc3c9b64991841c2 publicKey: 0233b83d9f22f4fd5cf215480fefd903624a3761166bfb4e6fd540dc9748617a7a 3. wc-dapp-react (v2 with salt) signature: c46903e8168595cb8e06384d0cf5682d6e0eecc0d01040318316682c22ed071fb6cb87a6669f66adccb6fb4fc73156d0aac50df6a91a374a91be7f3f4d548827 publicKey: 03bd9108c0b49f657e9eee50d1399022bd1e436118e5b7529a1b7cd606652f578f salt: 64a20cad335f20ed17ec3e344bbf561c messageHex: 43684368394a324c33667446546f6f555a587473514c33444568734b47545678665135366130755165466d4f4f36336d71796b425331484e70773172785367614267692f5852693958534968413935346c46362b576f4333686a2f58746d397a544c5251674b346b67657179667133397232485a353459364d67514941684142 4. wc-dapp-react (v3) signature: 1f176221435b0afc0cbc1135001eca81ec663852595dff9417a477e412339aaf371ddde0552914606386c403f27e10c2b2979b34d34058451b6844b58ad2ab55 publicKey: 03bd9108c0b49f657e9eee50d1399022bd1e436118e5b7529a1b7cd606652f578f messageHex: 010001f011596f7572207369676e206d6573736167650000 ``` Some libraries use messageHex, this converts text to hexadecimal format.
Author
Owner

@roman-khimov commented on GitHub (Feb 8, 2024):

Can you try against this set? data is the data to sign (hexified), the key is in the wif.

wif L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g
public key 02028a99826edc0c97d18e22b6932373d908d323aa7f92656a77ec26e8861699ef
scheme ECDSA_RFC6979_SHA256
data 48656c6c6f2c20776f726c6421
signature b2346dda0bd73f3ecd5ca83d29f68b5c7c240827101fcabfd7a9c886e18a46462e6f82eb84291d17823a3932bfb0d46403586273642ed1a46d01ec5eee416e38
@roman-khimov commented on GitHub (Feb 8, 2024): Can you try against this set? `data` is the data to sign (hexified), the key is in the `wif`. ``` wif L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g public key 02028a99826edc0c97d18e22b6932373d908d323aa7f92656a77ec26e8861699ef scheme ECDSA_RFC6979_SHA256 data 48656c6c6f2c20776f726c6421 signature b2346dda0bd73f3ecd5ca83d29f68b5c7c240827101fcabfd7a9c886e18a46462e6f82eb84291d17823a3932bfb0d46403586273642ed1a46d01ec5eee416e38 ```
Author
Owner

@roman-khimov commented on GitHub (Feb 8, 2024):

For the reference (to check the key setup), the same thing signed with WC scheme by SDK:

wif L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g
public key 02028a99826edc0c97d18e22b6932373d908d323aa7f92656a77ec26e8861699ef
scheme ECDSA_RFC6979_SHA256_WALLET_CONNECT
data 48656c6c6f2c20776f726c6421
signature e984f3180d63b61b52e34e510e4bdc411b0b8280d8b6b9a50ca458c07a2bbcf8e1240f234dc643ee39c79a2032d3d7ebc2e9f057253001473f13496d7340e17a770df28f3d6be295abeede6f96aaaed0

data is

data := []byte("Hello, world!")

in fact.

@roman-khimov commented on GitHub (Feb 8, 2024): For the reference (to check the key setup), the same thing signed with WC scheme by SDK: ``` wif L1QqQJnpBwbsPGAuutuzPTac8piqvbR1HRjrY5qHup48TBCBFe4g public key 02028a99826edc0c97d18e22b6932373d908d323aa7f92656a77ec26e8861699ef scheme ECDSA_RFC6979_SHA256_WALLET_CONNECT data 48656c6c6f2c20776f726c6421 signature e984f3180d63b61b52e34e510e4bdc411b0b8280d8b6b9a50ca458c07a2bbcf8e1240f234dc643ee39c79a2032d3d7ebc2e9f057253001473f13496d7340e17a770df28f3d6be295abeede6f96aaaed0 ``` data is ``` data := []byte("Hello, world!") ``` in fact.
Author
Owner

@mike-petrov commented on GitHub (Feb 9, 2024):

After verifyMessage in (wc-dapp-react):

  • ECDSA_RFC6979_SHA256: true
  • ECDSA_RFC6979_SHA256_WALLET_CONNECT: false

It uses message packaging for signMessageWithoutSalt, so signatures are different, but they are the same with @neo-ngd/neo-dapi-monorepo. As for signMessage, there no message packaging, but it use salt.

@mike-petrov commented on GitHub (Feb 9, 2024): After verifyMessage in ([wc-dapp-react](https://github.com/CityOfZion/wallet-connect-sdk/tree/main/examples/wc-dapp-react)): - ECDSA_RFC6979_SHA256: `true` - ECDSA_RFC6979_SHA256_WALLET_CONNECT: `false` It uses [message packaging](https://github.com/CityOfZion/neon-wallet/blob/dev/app/util/N3Helper.js#L200) for signMessageWithoutSalt, so signatures are different, but they are the same with [@neo-ngd/neo-dapi-monorepo](https://github.com/neo-ngd/neo-dapi-monorepo). As for signMessage, there no message packaging, but it use salt.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/panel-fs-neo-org#82
No description provided.