@wormhole-foundation/connect-sdk-solana
Advanced tools
Comparing version 0.2.3-beta.1 to 0.2.4-beta.0
@@ -14,3 +14,3 @@ import { Address, Platform, UniversalAddress } from '@wormhole-foundation/connect-sdk'; | ||
static readonly byteSize = 32; | ||
readonly platform: Platform; | ||
static readonly platform: Platform; | ||
private readonly address; | ||
@@ -17,0 +17,0 @@ constructor(address: AnySolanaAddress); |
@@ -6,7 +6,7 @@ "use strict"; | ||
const web3_js_1 = require("@solana/web3.js"); | ||
const platform_1 = require("./platform"); | ||
const types_1 = require("./types"); | ||
exports.SolanaZeroAddress = '11111111111111111111111111111111'; | ||
class SolanaAddress { | ||
static byteSize = 32; | ||
platform = platform_1.SolanaPlatform._platform; | ||
static platform = types_1._platform; | ||
address; | ||
@@ -44,3 +44,3 @@ constructor(address) { | ||
static instanceof(address) { | ||
return address.platform === platform_1.SolanaPlatform._platform; | ||
return address.constructor.platform === SolanaAddress.platform; | ||
} | ||
@@ -47,0 +47,0 @@ equals(other) { |
@@ -32,12 +32,12 @@ "use strict"; | ||
// Uncomment for debug | ||
// const st = transaction as Transaction; | ||
// console.log(st.signatures); | ||
// console.log(st.feePayer); | ||
// st.instructions.forEach((ix) => { | ||
// console.log('Program', ix.programId.toBase58()); | ||
// console.log('Data: ', ix.data.toString('hex')); | ||
// ix.keys.forEach((k) => { | ||
// console.log(k, k.pubkey.toBase58()); | ||
// }); | ||
// }); | ||
const st = transaction; | ||
console.log(st.signatures); | ||
console.log(st.feePayer); | ||
st.instructions.forEach((ix) => { | ||
console.log('Program', ix.programId.toBase58()); | ||
console.log('Data: ', ix.data.toString('hex')); | ||
ix.keys.forEach((k) => { | ||
console.log(k, k.pubkey.toBase58()); | ||
}); | ||
}); | ||
transaction.partialSign(this._keypair); | ||
@@ -44,0 +44,0 @@ signed.push(transaction.serialize()); |
@@ -14,3 +14,3 @@ import { Address, Platform, UniversalAddress } from '@wormhole-foundation/connect-sdk'; | ||
static readonly byteSize = 32; | ||
readonly platform: Platform; | ||
static readonly platform: Platform; | ||
private readonly address; | ||
@@ -17,0 +17,0 @@ constructor(address: AnySolanaAddress); |
import { UniversalAddress, encoding, registerNative, } from '@wormhole-foundation/connect-sdk'; | ||
import { PublicKey } from '@solana/web3.js'; | ||
import { SolanaPlatform } from './platform'; | ||
import { _platform } from './types'; | ||
export const SolanaZeroAddress = '11111111111111111111111111111111'; | ||
export class SolanaAddress { | ||
static byteSize = 32; | ||
platform = SolanaPlatform._platform; | ||
static platform = _platform; | ||
address; | ||
@@ -40,3 +40,3 @@ constructor(address) { | ||
static instanceof(address) { | ||
return address.platform === SolanaPlatform._platform; | ||
return address.constructor.platform === SolanaAddress.platform; | ||
} | ||
@@ -43,0 +43,0 @@ equals(other) { |
@@ -28,12 +28,12 @@ import { Keypair } from '@solana/web3.js'; | ||
// Uncomment for debug | ||
// const st = transaction as Transaction; | ||
// console.log(st.signatures); | ||
// console.log(st.feePayer); | ||
// st.instructions.forEach((ix) => { | ||
// console.log('Program', ix.programId.toBase58()); | ||
// console.log('Data: ', ix.data.toString('hex')); | ||
// ix.keys.forEach((k) => { | ||
// console.log(k, k.pubkey.toBase58()); | ||
// }); | ||
// }); | ||
const st = transaction; | ||
console.log(st.signatures); | ||
console.log(st.feePayer); | ||
st.instructions.forEach((ix) => { | ||
console.log('Program', ix.programId.toBase58()); | ||
console.log('Data: ', ix.data.toString('hex')); | ||
ix.keys.forEach((k) => { | ||
console.log(k, k.pubkey.toBase58()); | ||
}); | ||
}); | ||
transaction.partialSign(this._keypair); | ||
@@ -40,0 +40,0 @@ signed.push(transaction.serialize()); |
{ | ||
"name": "@wormhole-foundation/connect-sdk-solana", | ||
"version": "0.2.3-beta.1", | ||
"version": "0.2.4-beta.0", | ||
"repository": { | ||
@@ -49,3 +49,3 @@ "type": "git", | ||
"dependencies": { | ||
"@wormhole-foundation/connect-sdk": "^0.2.3-beta.1", | ||
"@wormhole-foundation/connect-sdk": "^0.2.4-beta.0", | ||
"@coral-xyz/borsh": "0.2.6", | ||
@@ -52,0 +52,0 @@ "@project-serum/anchor": "0.25.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
365585