You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi team, any plans on supporting authenticators for enabling permissioned keys functionality?
It looks like v4-proto >=7 already has the right protobufs for it.
I upgraded protobuf==5.29, grpcio==1.70.0 and v4-proto==7.0.5 and tried with the following example, but the transaction fails with "Out Of Gas" error every time.
importasyncioimportbase64importjsonimportosfromdotenvimportload_dotenvfromdydx_v4_client.networkimportmake_mainnetfromdydx_v4_client.node.clientimportNodeClientfromdydx_v4_client.walletimportKeyPair, Walletfromv4_proto.dydxprotocol.accountplus.tx_pb2importMsgAddAuthenticatorload_dotenv()
NODE_URL='dydx-grpc.publicnode.com:443'asyncdefsetup_key():
# Set up a node connection to broadcast transactions tonetwork=make_mainnet(
rest_indexer='',
websocket_indexer='',
node_url=NODE_URL
)
node: NodeClient=awaitNodeClient.connect(network.node)
# Set up the primary wallet for which we want to add authenticatorwallet=awaitWallet.from_mnemonic(
node,
mnemonic=os.environ['DYDX_MNEMONIC'],
address=os.environ['DYDX_ADDRESS'],
)
# Derive the public address of the signer wallet from its private keykey_pair=KeyPair.from_mnemonic(os.environ['DYDX_SIGNER_MNEMONIC'])
signer_public_key=key_pair.public_key_bytessub_authenticators= [
{
'type': 'SignatureVerification',
'config': base64.b64encode(signer_public_key).decode(),
},
{
'type': 'MessageFilter',
'config': base64.b64encode(b'/dydxprotocol.clob.MsgPlaceOrder').decode(),
},
]
request=MsgAddAuthenticator(
sender=wallet.address,
authenticator_type="AllOf",
data=json.dumps(sub_authenticators).encode(),
)
transaction=awaitnode.send_message(wallet, request)
print(transaction)
if__name__=='__main__':
asyncio.run(setup_key())
The text was updated successfully, but these errors were encountered:
Hi team, any plans on supporting authenticators for enabling permissioned keys functionality?
It looks like
v4-proto >=7
already has the right protobufs for it.I upgraded
protobuf==5.29
,grpcio==1.70.0
andv4-proto==7.0.5
and tried with the following example, but the transaction fails with "Out Of Gas" error every time.The text was updated successfully, but these errors were encountered: