Closed SyedImam1998 closed 6 months ago
go
const Signtx = async (initialTx: any) => { try { console.log('started'); await initMPCSdk(true); await initMPCKeyService(apiKeyName, privateKey); await initMPCWalletService(apiKeyName, privateKey); const retrievedAddress = await getAddress(addressName); const keyName = retrievedAddress.MPCKeys[0]!; const resultTx = initialTx as Transaction; await createSignatureFromTx(keyName, resultTx); const pendingSignatures = await pollForPendingSignatures(deviceGroupName); await computeMPCOperation(pendingSignatures[0]!.MPCData); let signatureResult = await waitPendingSignature( pendingSignatures[0]!.Operation, ); const signedTxResult = await getSignedTransaction( resultTx, signatureResult, ); setSignedTx(signedTxResult); const txReceipt = await provider.sendTransaction( signedTxResult.RawTransaction, ); console.log('Transaction hash:', txReceipt.hash); } catch (error) { console.log('error'); console.log(error); throw new Error('Invalid initialTx value'); } };
{ "name": "organizations/4124b181-5f9d-443a-9901-b34d2b2a0dd7/apiKeys/17c8f37c-1aa4-420b-9419-c163b2346e4a", "principal": "257b9fc8-eda1-59bb-aeb0-64e92be2ccf3", "principalType": "USER", "publicKey": "-----BEGIN EC PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV9qY4D6xL1qIOZUW6l4EvG0DDjhI\nF5hXhQN66CydYrXORu6ZWaSfzG393/9W1xeRWdvc9kZ1mHGbJ7x6MYCJLg==\n-----END EC PUBLIC KEY-----\n", "privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFTtTWAtyqpMCtVgbIK41iFnFxk7G8cDflyOtQw9ZUTWoAoGCCqGSM49\nAwEHoUQDQgAEV9qY4D6xL1qIOZUW6l4EvG0DDjhIF5hXhQN66CydYrXORu6ZWaSf\nzG393/9W1xeRWdvc9kZ1mHGbJ7x6MYCJLg==\n-----END EC PRIVATE KEY-----\n", "createTime": "2024-01-05T18:57:05.666163829Z", "projectId": "20a8cc65-aca5-4b91-bfbc-331ceffff2fb", "nickname": "cloud-project-2-key-20240105185700826Z", "scopes": [], "allowedIps": [], "keyType": "GENERAL_KEY", "enabled": true
Why are you sending me your private keys
On Fri, Jan 5, 2024, 1:59 PM caledrummond90 @.***> wrote:
{ "name": "organizations/4124b181-5f9d-443a-9901-b34d2b2a0dd7/apiKeys/17c8f37c-1aa4-420b-9419-c163b2346e4a", "principal": "257b9fc8-eda1-59bb-aeb0-64e92be2ccf3", "principalType": "USER", "publicKey": "-----BEGIN EC PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV9qY4D6xL1qIOZUW6l4EvG0DDjhI\nF5hXhQN66CydYrXORu6ZWaSfzG393/9W1xeRWdvc9kZ1mHGbJ7x6MYCJLg==\n-----END EC PUBLIC KEY-----\n", "privateKey": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFTtTWAtyqpMCtVgbIK41iFnFxk7G8cDflyOtQw9ZUTWoAoGCCqGSM49\nAwEHoUQDQgAEV9qY4D6xL1qIOZUW6l4EvG0DDjhIF5hXhQN66CydYrXORu6ZWaSf\nzG393/9W1xeRWdvc9kZ1mHGbJ7x6MYCJLg==\n-----END EC PRIVATE KEY-----\n", "createTime": "2024-01-05T18:57:05.666163829Z", "projectId": "20a8cc65-aca5-4b91-bfbc-331ceffff2fb", "nickname": "cloud-project-2-key-20240105185700826Z", "scopes": [], "allowedIps": [], "keyType": "GENERAL_KEY", "enabled": true
— Reply to this email directly, view it on GitHub https://github.com/coinbase/waas-sdk-react-native/issues/28#issuecomment-1879129387, or unsubscribe https://github.com/notifications/unsubscribe-auth/A47JDC5Y7GDLY44WD6LFYJLYNBEQRAVCNFSM6AAAAAAXYH2REOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGEZDSMZYG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Can you accept my invite, and help me get my gift? Just download the SHEIN app, and search for my code there! ebgjq9
Hi Team,
I am trying generate a signed tx that would change the state of the smart contract but not sure why i am not able to generate signed transaction.
I am Getting this Error:
[Error: error getting RLP transaction in CreateTxSignature: invalid value ]
Smart Contract: 0x28983feD81de3548d2e4C110BCB997A4879dA478 - This is the smart contract that i trying to interact deployed on Goerli Test Network.
Below is my React-Native code:
Can someone please help me here.